/* Staff desk. Same night-hotel palette as hotelnightshift.com, quieter: this is a tool. */
:root {
  --night: #070912; --wall: #0d1122; --panel: #131830; --line: #232a4a;
  --text: #eceef7; --muted: #9aa3c2; --lamp: #f6b93b; --exit: #2bd47d; --bellhop: #e5484d;
  --display: "Fraunces", Georgia, serif; --body: "Manrope", "Segoe UI", system-ui, sans-serif; --mono: "JetBrains Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--night); color: var(--text); font: 15.5px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--lamp); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2 { font-family: var(--display); font-weight: 800; line-height: 1.1; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 22px; }
h2 { font-size: 20px; margin-bottom: 14px; }
h2 small { font: 600 12px var(--mono); color: var(--muted); margin-left: 8px; }
p { margin: 0 0 12px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 13px; }
.nowrap { white-space: nowrap; }
.kicker { font: 600 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--lamp); }
:focus-visible { outline: 2px solid var(--lamp); outline-offset: 2px; border-radius: 4px; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 11px 20px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: 700 15px var(--body); cursor: pointer; }
.btn:hover { border-color: var(--lamp); text-decoration: none; }
.btn.primary { background: var(--exit); border-color: var(--exit); color: #04130b; }
.btn.primary:hover { background: #45e692; }
.btn.danger { border-color: var(--bellhop); color: #ffb3b5; }
.btn.danger:hover { background: var(--bellhop); color: #fff; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.btn.small { padding: 6px 12px; font-size: 13px; }
button.link { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
button.link:hover { color: var(--text); }

/* Sign-in and "no access" pages */
.gate { min-height: 100vh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 6px; padding: 24px; background: radial-gradient(ellipse 60% 50% at 50% 0%, rgb(246 185 59 / .12), transparent 70%); }
.gate img { border-radius: 16px; margin-bottom: 14px; }
.gate h1 { max-width: 14em; margin-bottom: 10px; }
.gate .muted { max-width: 34em; margin-bottom: 22px; }

/* App frame */
.app { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--wall); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font: 800 18px var(--display); padding: 0 8px; }
.brand img { border-radius: 8px; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a { color: var(--muted); padding: 9px 12px; border-radius: 8px; font-weight: 500; }
.side nav a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.side nav a[aria-current] { color: var(--text); background: var(--panel); box-shadow: inset 3px 0 0 var(--lamp); }
.me { margin-top: auto; display: grid; grid-template-columns: 36px 1fr; gap: 4px 10px; align-items: center; padding: 12px 8px 0; border-top: 1px solid var(--line); }
.me img { border-radius: 50%; }
.me b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me span { display: block; font-size: 12px; color: var(--lamp); }
.me form { grid-column: 2; }
.main { padding: clamp(20px, 4vw, 44px); max-width: 1180px; width: 100%; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 18px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.stat span { display: block; font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stat b { display: block; font: 800 26px/1.25 var(--display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat small { color: var(--muted); font-size: 12.5px; }

.scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th { text-align: left; font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 12px 8px 0; white-space: nowrap; }
td { padding: 9px 12px 9px 0; border-top: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
td:last-child, th:last-child { padding-right: 0; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); background: var(--wall); font: 600 12px var(--mono); white-space: nowrap; }
.tag.warn { border-color: var(--lamp); color: var(--lamp); }

.chart { width: 100%; height: 150px; display: block; }
.chart rect { fill: var(--lamp); }
.chart rect.empty { fill: var(--line); }
.chart-ends { display: flex; justify-content: space-between; font: 12px var(--mono); color: var(--muted); margin-top: 6px; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bars li { display: grid; grid-template-columns: 9em 1fr 2.5em; gap: 10px; align-items: center; font-size: 14px; }
.bars b { text-align: right; font-variant-numeric: tabular-nums; }
meter { width: 100%; height: 10px; appearance: none; border: 0; border-radius: 99px; background: var(--line); overflow: hidden; }
meter::-webkit-meter-bar { background: var(--line); border: 0; border-radius: 99px; height: 10px; }
meter::-webkit-meter-optimum-value { background: var(--lamp); border-radius: 99px; }
meter::-moz-meter-bar { background: var(--lamp); border-radius: 99px; }

.crumbs { margin: -10px 0 16px; }
.notice { background: rgb(43 212 125 / .12); border: 1px solid var(--exit); border-radius: 9px; padding: 10px 14px; }
.thread { display: grid; gap: 16px; }
.msg { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; }
.msg img { border-radius: 50%; }
.msg header { font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.msg header b { color: var(--text); font-size: 14.5px; margin-right: 6px; }
.msg.bot header b { color: var(--lamp); }
.msg p { margin: 0 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg blockquote { margin: 6px 0; padding: 8px 12px; border-left: 3px solid var(--line); background: var(--wall); border-radius: 0 8px 8px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.msg blockquote b { display: block; }

.reply, .search { display: grid; gap: 10px; }
label { font-weight: 700; }
textarea, input[type="text"], input:not([type]) { width: 100%; background: var(--wall); border: 1px solid var(--line); border-radius: 9px; color: var(--text); font: inherit; padding: 10px 12px; }
textarea { resize: vertical; }
.reply .btn { justify-self: start; }
.search div { display: flex; gap: 10px; }
.profile { display: flex; gap: 18px; align-items: flex-start; }
.profile img { border-radius: 50%; }
.profile h2 { margin-bottom: 2px; }
.list { margin: 0; padding-left: 18px; display: grid; gap: 6px; }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side nav { flex-direction: row; flex-wrap: wrap; order: 3; width: 100%; }
  .side nav a[aria-current] { box-shadow: inset 0 -3px 0 var(--lamp); }
  .me { margin: 0 0 0 auto; border: 0; padding: 0; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2 { grid-template-columns: 1fr; }
  .search div { flex-direction: column; }
}

/* ---------- search, people, tools ---------- */
.find input { width: 100%; background: var(--night); border: 1px solid var(--line); border-radius: 9px; color: var(--text); font: inherit; font-size: 14px; padding: 9px 12px; }
.find input:focus { border-color: var(--lamp); outline: 0; }
.side nav span { font: 600 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); opacity: .7; padding: 14px 12px 4px; }
.small { font-size: 13px; }
.live { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: -6px 0 18px; }
.live span { width: 8px; height: 8px; border-radius: 50%; background: var(--exit); box-shadow: 0 0 8px var(--exit); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.tag.good { border-color: var(--exit); color: var(--exit); }
.tag.bad { border-color: var(--bellhop); color: #ff9a9d; }
.profile h2 small { font: 500 14px var(--body); }
.grid2.top { align-items: start; }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.person { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: grid; gap: 12px; align-content: start; }
.person header { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.person img, .avatar { width: 48px; height: 48px; border-radius: 50%; }
.avatar { display: grid; place-items: center; background: var(--wall); border: 1px solid var(--line); font: 800 20px var(--display); color: var(--lamp); }
.person h2 { font-size: 19px; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person header p { margin: 0; font-size: 13px; color: var(--muted); }
.big { font: 800 34px/1 var(--display); color: var(--lamp); font-variant-numeric: tabular-nums; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { background: var(--wall); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; font-size: 13.5px; color: var(--muted); }
.chips b { color: var(--text); margin-right: 3px; }
.person footer:empty { display: none; }

select, input[type="color"] { background: var(--wall); border: 1px solid var(--line); border-radius: 9px; color: var(--text); font: inherit; padding: 10px 12px; }
select { width: 100%; }
input[type="color"] { display: block; width: 64px; height: 44px; padding: 4px; margin-top: 6px; cursor: pointer; }
.fields { align-items: flex-end; gap: 16px; }
.fields .grow { flex: 1; min-width: 180px; }
.fields .grow input { margin-top: 6px; }
label small { font-weight: 400; }
.embed { display: grid; grid-template-columns: 4px minmax(0, 1fr); gap: 14px; background: var(--wall); border-radius: 6px; overflow: hidden; margin-bottom: 12px; }
.embed svg { display: block; height: 100%; min-height: 60px; }
.embed > div { padding: 12px 14px 12px 0; }
.embed h3 { font: 700 16px var(--body); margin: 0 0 6px; }
.embed p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 6px; }
@media (prefers-reduced-motion: reduce) { .live span { animation: none; } }

/* ---------- notes, signals ---------- */
.notes { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; }
.notes li { background: var(--wall); border-left: 3px solid var(--lamp); border-radius: 0 8px 8px 0; padding: 10px 14px; }
.notes p { margin: 0 0 4px; white-space: pre-wrap; overflow-wrap: anywhere; }
.notes small { color: var(--muted); }
.signal { border-color: var(--lamp); background: rgb(246 185 59 / .06); }
input[type="number"] { width: 100%; background: var(--wall); border: 1px solid var(--line); border-radius: 9px; color: var(--text); font: inherit; padding: 10px 12px; margin-top: 6px; }

.server header h2 { margin-bottom: 2px; }
.server header p { margin: 0 0 12px; }
.server .chips { margin-bottom: 12px; }
.server .row input { flex: 1; min-width: 160px; }
