/* Dashboard chrome for /owner and /menu-admin. Layers on top of site.css
   tokens (--red, --card, --line, --txt, --dim) so the consoles match the site. */

body.dash { background: var(--bg); }

/* ---------- top bar ---------- */
.dash-top {
  display: flex; align-items: center; gap: 14px;
  padding: 0 22px; height: 62px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 7, 9, .9); backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 30;
}
.dash-top .logo { font-size: 18px; font-weight: 800; letter-spacing: 3px; text-decoration: none; white-space: nowrap; }
.dash-top .logo span { color: var(--red); }
.dash-top .kicker {
  font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--dim);
  border: 1px solid var(--line); border-radius: 20px; padding: 4px 11px; white-space: nowrap;
}
.dash-top .grow { flex: 1; }
.dash-top .who { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.dash-top .who img, .dash-top .who .fallback {
  width: 30px; height: 30px; border-radius: 50%; background: #1b1b21; border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--dim);
}
.dash-top .who b { color: #fff; font-weight: 600; }
.dash-top .who .role { font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--red); }
@media (max-width: 720px) { .dash-top .kicker, .dash-top .who .nameline { display: none; } }

/* ---------- shell ---------- */
.dash-shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 26px;
  max-width: 1240px; margin: 0 auto; padding: 24px 22px 90px; position: relative; z-index: 1; }
.dash-side { position: sticky; top: 86px; align-self: start; display: flex; flex-direction: column; gap: 3px; }
.navgroup { font-size: 9.5px; letter-spacing: 2.4px; text-transform: uppercase; color: #62626e;
  margin: 16px 0 5px; padding-left: 13px; }
.navgroup:first-child { margin-top: 2px; }
.navitem {
  display: flex; align-items: center; gap: 11px; text-align: left; width: 100%;
  background: transparent; border: 1px solid transparent; border-radius: 11px;
  color: var(--dim); padding: 10px 13px; font-size: 14px; cursor: pointer; font-family: inherit;
  text-decoration: none;
  transition: color .12s ease, background .12s ease;
}
.navitem:hover { color: #fff; background: rgba(255, 255, 255, .03); }
.navitem.on { color: #fff; background: linear-gradient(90deg, rgba(217, 13, 18, .19), rgba(217, 13, 18, .05));
  border-color: rgba(217, 13, 18, .38); box-shadow: inset 2px 0 0 var(--red); }
.navitem .icon { width: 17px; height: 17px; flex: none; }
.navitem .count { margin-left: auto; font-size: 11px; color: var(--dim); background: rgba(255, 255, 255, .05);
  border-radius: 20px; padding: 1px 8px; min-width: 22px; text-align: center; }
.navitem.on .count { color: #ffbcc0; }
.side-note { margin-top: 14px; padding: 13px; border: 1px dashed var(--line); border-radius: 12px;
  font-size: 12px; color: var(--dim); line-height: 1.6; }
.side-note b { color: var(--txt); font-weight: 600; }

.dash-main { min-width: 0; }
.panel { margin-bottom: 22px; }
.panel-head { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; font-size: 21px; letter-spacing: -.3px; }
.panel-head .micro { flex: none; }
.panel-head .grow { flex: 1; }
.page-title { font-size: 30px; margin: 2px 0 4px; letter-spacing: -.8px; }
.page-sub { color: var(--dim); margin: 0 0 22px; font-size: 14px; }

@media (max-width: 900px) {
  .dash-shell { grid-template-columns: 1fr; gap: 0; padding: 16px 14px 80px; }
  .dash-side { position: static; flex-direction: row; overflow-x: auto; gap: 8px;
    padding-bottom: 12px; margin-bottom: 6px; scrollbar-width: none; }
  .dash-side::-webkit-scrollbar { display: none; }
  .navitem { width: auto; white-space: nowrap; border-color: var(--line); padding: 9px 14px; }
  .navitem .count { margin-left: 6px; }
  .navgroup { display: none; }
  .side-note { display: none; }
  .page-title { font-size: 24px; }
}

/* ---------- tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 12px; margin-bottom: 22px; }
.tile { background: linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, 0) 40%), var(--card);
  border: 1px solid var(--line); border-radius: 14px; padding: 16px 17px; position: relative; overflow: hidden; }
.tile::after { content: ""; position: absolute; right: -26px; top: -26px; width: 78px; height: 78px; border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 13, 18, .16), transparent 70%); }
.tile .n { font-size: 30px; font-weight: 800; line-height: 1.1; letter-spacing: -1px; }
.tile .n small { font-size: 14px; font-weight: 600; color: var(--dim); letter-spacing: 0; }
.tile .k { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--dim); margin-top: 5px; }
.tile .hint { font-size: 11px; color: #6f6f7c; margin-top: 7px; }
.tile.muted .n { color: var(--dim); }
.tile.hot .n { color: #ff9d9f; }
.tile.warn .n { color: #ffd98a; }
.tile.good .n { color: #9fe6a0; }

/* label / value rows inside the overview panels */
.slines { display: flex; flex-direction: column; }
.sline { display: flex; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid #16161c; font-size: 13.5px; }
.sline:last-child { border-bottom: 0; }
.sline .l { color: var(--dim); flex: 1; min-width: 0; }
.sline .v { font-variant-numeric: tabular-nums; font-weight: 600; }
.sline .v.mono { font-family: Consolas, monospace; font-size: 12.5px; font-weight: 400; }

/* ---------- bars + feed ---------- */
.bars { display: flex; flex-direction: column; gap: 11px; }
.bar { display: grid; grid-template-columns: minmax(90px, 168px) 1fr auto; align-items: center; gap: 12px; font-size: 13px; }
.bar .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--txt); }
.bar .track { height: 9px; border-radius: 6px; background: #0d0d11; border: 1px solid #1c1c23; overflow: hidden; }
.bar .fill { height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, #A80B10, #E8141A);
  transition: width .5s cubic-bezier(.2, .7, .3, 1); }
.bar.zero .fill { background: #2A2A33; }
.bar .v { font-variant-numeric: tabular-nums; color: var(--dim); min-width: 42px; text-align: right; }

.feed { display: flex; flex-direction: column; max-height: 330px; overflow: auto; margin: -4px -6px; padding: 4px 6px; }
.feed .ev { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; border-bottom: 1px solid #16161c; font-size: 13px; }
.feed .ev:last-child { border-bottom: 0; }
.feed .dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--red); align-self: center; }
.feed .dot.token { background: #E8C55A; }
.feed .dot.heartbeat { background: #3d3d49; }
.feed .ev .txt { flex: 1; min-width: 0; }
.feed .ev .txt b { font-weight: 600; }
.feed .ev .mono { font-family: Consolas, monospace; font-size: 11.5px; color: #6f6f7c; }
.feed .ev .t { flex: none; font-size: 11px; color: #6f6f7c; font-variant-numeric: tabular-nums; }

/* ---------- menu rows ---------- */
.toolbar { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input[type=search] { max-width: 300px; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { background: transparent; border: 0; color: var(--dim); padding: 8px 13px; font-size: 12.5px; cursor: pointer; font-family: inherit; }
.seg button.on { background: #2A0D0F; color: #fff; }

.rows { display: flex; flex-direction: column; gap: 10px; }
.row-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  transition: border-color .14s ease; }
.row-card:hover { border-color: #33333f; }
.row-card.open { border-color: rgba(217, 13, 18, .42); }
.row-card.flash { border-color: var(--red); box-shadow: 0 0 0 3px rgba(217, 13, 18, .14); }
.row-head { display: flex; align-items: center; gap: 14px; padding: 13px 15px; cursor: pointer; user-select: none; }
.row-head .thumb { flex: none; width: 86px; height: 46px; border-radius: 9px; background: #000 center/cover no-repeat;
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; letter-spacing: 1px; color: #fff; }
.row-head .idn { min-width: 0; flex: 1; }
.row-head .idn .nm { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.row-head .idn .mt { font-size: 12px; color: var(--dim); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-head .rt { display: flex; align-items: center; gap: 8px; flex: none; }
.row-head .chev { color: var(--dim); transition: transform .18s ease; }
.row-card.open .chev { transform: rotate(90deg); }
.row-body { display: none; border-top: 1px solid var(--line); padding: 18px 20px 22px; background: rgba(0, 0, 0, .18); }
.row-card.open .row-body { display: block; }
@media (max-width: 620px) { .row-head .thumb { display: none; } .row-body { padding: 15px 14px 18px; } }

.blk { margin-bottom: 20px; }
.blk:last-child { margin-bottom: 0; }
.blk-t { font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--dim);
  margin: 0 0 11px; display: flex; align-items: center; gap: 9px; }
.blk-t::after { content: ""; flex: 1; border-top: 1px solid #1a1a21; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 700px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
label.f { font-size: 10.5px; color: var(--dim); display: block; margin: 0 0 6px;
  text-transform: uppercase; letter-spacing: 1.4px; }
.field { margin-bottom: 13px; }
.field:last-child { margin-bottom: 0; }
.hint { font-size: 11.5px; color: #6f6f7c; margin-top: 6px; line-height: 1.5; }
.swatch-row { display: flex; align-items: center; gap: 10px; }
input[type=color].sw { width: 42px; height: 34px; padding: 0; background: none; border: 1px solid var(--line);
  border-radius: 8px; cursor: pointer; flex: none; }
.checks { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--txt); }
.checks label { display: inline-flex; gap: 7px; align-items: center; margin: 0; text-transform: none;
  letter-spacing: 0; font-size: 13px; color: var(--txt); cursor: pointer; }
.checks input { width: auto; }

.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px;
  padding-top: 15px; border-top: 1px solid #1a1a21; }
.actions .grow { flex: 1; }
.save-state { font-size: 12px; color: var(--dim); }

.btn.act { background: linear-gradient(180deg, #E8141A, #A80B10); color: #fff; border: 0; border-radius: 10px;
  padding: 10px 18px; font-size: 13.5px; font-weight: 700; cursor: pointer; font-family: inherit;
  box-shadow: 0 6px 20px rgba(217, 13, 18, .28); }
.btn.act:hover { opacity: .92; transform: translateY(-1px); }
.btn.gh { background: rgba(255, 255, 255, .03); border: 1px solid var(--line); color: var(--txt);
  border-radius: 10px; padding: 9px 15px; font-size: 13px; cursor: pointer; font-family: inherit; }
.btn.gh:hover { border-color: var(--red); color: #fff; }
.btn.danger:hover { border-color: #ff5d61; color: #ff8083; }
.btn.sm { padding: 6px 11px; font-size: 12px; border-radius: 8px; }
.btn.wide { width: 100%; justify-content: center; display: flex; align-items: center; gap: 9px; }
.btn.discord { background: #5865F2; box-shadow: 0 6px 20px rgba(88, 101, 242, .3); }
.btn.discord:hover { background: #4752c4; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn .icon { width: 15px; height: 15px; }

/* ---------- lists inside rows ---------- */
.items { display: flex; flex-direction: column; gap: 7px; }
.item { display: flex; align-items: center; gap: 11px; background: #0B0B0E; border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.item .mono { font-family: Consolas, monospace; font-size: 12.5px; word-break: break-all; }
.item .nm { font-weight: 600; color: var(--txt); margin-bottom: 3px; overflow-wrap: anywhere; }
.item .lbl { color: var(--dim); font-size: 11.5px; }
.item .grow { flex: 1; min-width: 0; }
.item .csw { flex: none; width: 15px; height: 15px; border-radius: 5px; border: 1px solid var(--line); background: #8f1015; }
.item.dead { opacity: .5; }
.sub-panel { border: 1px solid var(--line); border-radius: 11px; background: rgba(0, 0, 0, .22);
  padding: 13px 14px; font-size: 13px; }
.sub-panel .checks { gap: 12px 18px; }
.pill { display: inline-block; font-size: 10px; padding: 2px 8px; border-radius: 20px;
  border: 1px solid var(--line); color: var(--dim); background: rgba(0, 0, 0, .4); white-space: nowrap; }
.pill.ok { color: #9fe6a0; border-color: rgba(60, 180, 80, .32); background: rgba(30, 120, 40, .14); }
.pill.warn { color: #ffd98a; border-color: rgba(200, 140, 0, .32); background: rgba(160, 110, 0, .14); }
.pill.hot { color: #ff9d9f; border-color: rgba(217, 13, 18, .4); background: rgba(217, 13, 18, .14); }

.empty { text-align: center; padding: 40px 20px; color: var(--dim); border: 1px dashed var(--line);
  border-radius: 14px; font-size: 13.5px; line-height: 1.8; }
.empty b { color: var(--txt); display: block; font-size: 15px; margin-bottom: 4px; }
.skel { height: 62px; border-radius: 14px; background: linear-gradient(90deg, #101014, #17171d, #101014);
  background-size: 200% 100%; animation: sh 1.2s linear infinite; }
@keyframes sh { to { background-position: -200% 0; } }

/* ---------- login ---------- */
.login-stage { max-width: 470px; margin: 9vh auto 0; position: relative; z-index: 1; }
.login-stage .card { padding: 36px 32px; }
.login-stage h1 { font-size: 27px; margin: 0 0 6px; letter-spacing: -.6px; }
.login-mark { width: 52px; height: 52px; border-radius: 15px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, rgba(217, 13, 18, .26), rgba(217, 13, 18, .06));
  border: 1px solid rgba(217, 13, 18, .4); margin-bottom: 18px; }
.login-mark .icon { width: 26px; height: 26px; stroke: #ff6b6e; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 11px;
  letter-spacing: 2px; text-transform: uppercase; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.site-links { display: flex; gap: 18px; justify-content: center; margin-top: 22px; font-size: 12.5px; }
.site-links a { color: var(--dim); text-decoration: none; }
.site-links a:hover { color: #fff; }

/* ---------- toast ---------- */
.dash-toast { position: fixed; bottom: 26px; left: 50%; transform: translate(-50%, 14px);
  background: #101014; border: 1px solid var(--line); color: #fff; padding: 12px 20px; border-radius: 11px;
  font-size: 13.5px; z-index: 100; opacity: 0; pointer-events: none; transition: opacity .16s ease, transform .16s ease;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .55); max-width: 80vw; }
.dash-toast.show { opacity: 1; transform: translate(-50%, 0); }
.dash-toast.bad { border-color: var(--red); }
.dash-toast.good { border-color: rgba(60, 180, 80, .55); }

.spin { width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, .25); border-top-color: #fff;
  border-radius: 50%; animation: sp .7s linear infinite; display: inline-block; vertical-align: -2px; }
@keyframes sp { to { transform: rotate(360deg); } }
.up { display: none; height: 5px; border-radius: 4px; background: #0d0d11; overflow: hidden; margin-top: 8px; }
.up.show { display: block; }
.up i { display: block; height: 100%; width: 0; background: var(--red); transition: width .2s; }

/* ---------- overview + guide blocks ---------- */
.panel-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.split3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 880px) { .split, .split3 { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 9px 14px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--dim); }
.kv dd { margin: 0; font-family: Consolas, monospace; word-break: break-all; }
.guide { font-size: 14px; line-height: 1.75; color: var(--dim); }
.guide h3 { color: var(--txt); font-size: 15px; margin: 22px 0 6px; letter-spacing: -.2px; }
.guide h3:first-child { margin-top: 0; }
.guide code { font-family: Consolas, monospace; font-size: 12.5px; background: #0B0B0E; border: 1px solid var(--line);
  border-radius: 6px; padding: 1px 6px; color: #ffbcc0; }
.guide b { color: var(--txt); font-weight: 600; }
.guide a { color: var(--red); }
.stepnum { color: var(--red); font-weight: 800; font-size: 11px; letter-spacing: 2px; display: block; margin-bottom: 6px; }
.note { border-left: 2px solid var(--red); background: rgba(217, 13, 18, .06); border-radius: 0 10px 10px 0;
  padding: 12px 15px; font-size: 13.5px; color: var(--txt); line-height: 1.7; margin: 14px 0; }
.mini-form { display: flex; gap: 9px; flex-wrap: wrap; align-items: flex-end; }
.mini-form .field { margin: 0; }
