/* ---------- Panel selector (home) ---------- */
.home-main { padding: 0 !important; }
.home { position: relative; min-height: calc(100vh - 46px); display: grid; place-items: center; overflow: hidden; background: #05030d; padding: 24px 16px; }
.home-card { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(260px, 1fr) minmax(340px, 1.25fr); width: min(920px, 100%); background: rgba(10, 12, 24, .88); border: 1px solid #2a2f4f; border-radius: 14px; backdrop-filter: blur(6px); box-shadow: 0 20px 60px #000a, 0 0 60px rgba(255, 77, 148, .12); overflow: hidden; }
.home-left { padding: 34px 28px; display: flex; flex-direction: column; gap: 10px; border-right: 1px solid #23284a; }
.home-logo { width: 84px; height: 84px; object-fit: contain; margin-bottom: 6px; filter: drop-shadow(0 0 14px rgba(255, 77, 148, .5)); }
.home-left h1 { margin: 0; font-size: 28px; line-height: 1.1; }
.home-left p { margin: 0; color: var(--muted); font-size: 13px; }
.home-links { margin-top: auto; padding-top: 24px; }
.home-right { padding: 28px; }
.home-right h2 { margin: 0; font-size: 22px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.tile { --tile: var(--accent); display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 9px; background: #12162b; border: 1px solid #262c50; color: var(--text); text-decoration: none; transition: .15s; }
.tile:hover { border-color: var(--tile); background: #181d3a; transform: translateY(-1px); }
.tile.live { border-color: var(--ok); box-shadow: 0 0 0 1px var(--ok) inset; }
.tile-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 7px; color: var(--tile); background: color-mix(in srgb, var(--tile) 18%, transparent); flex: none; }
.tile-text { display: grid; line-height: 1.2; min-width: 0; flex: 1; } .tile-text b { font-size: 13.5px; } .tile-text small { color: var(--muted); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-arrow { color: var(--muted); font-size: 18px; }
.ghost-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid #2c3260; background: transparent; color: var(--text); text-decoration: none; cursor: pointer; }
.ghost-btn:hover { background: #181d3a; border-color: var(--accent2); }
.ghost-btn.wide { flex: 1; } .danger-ghost { border-color: #7a2a35; background: #5a1c26; } .danger-ghost:hover { background: #7a2430; border-color: var(--bad); }
@media (max-width: 760px) { .home-card { grid-template-columns: 1fr; } .home-left { border-right: 0; border-bottom: 1px solid #23284a; padding: 22px; } .tiles { grid-template-columns: 1fr; } }

/* ---------- Tyler-style CAD window ---------- */
.tyler { position: fixed; inset: 0; display: grid; grid-template-rows: 26px 70px 26px auto 1fr 26px; background: #0b0b0b; color: #fff; font-family: Arial, "Segoe UI", sans-serif; font-size: 13px; z-index: 1; }
.tyler .t-wait { grid-row: 1 / -1; display: grid; place-items: center; color: #9fb4e8; font-size: 16px; }
.t-menubar { position: relative; display: flex; align-items: center; background: #1c4a9a; padding: 0 6px; border-bottom: 1px solid #0f2e66; }
.t-menu-label { padding: 4px 10px; cursor: default; font-size: 12.5px; } .t-menu-label:hover { background: rgba(255, 255, 255, .22); }
.t-title { position: absolute; left: 50%; transform: translateX(-50%); font-weight: 700; font-size: 12.5px; pointer-events: none; }
.t-brand { margin-left: auto; padding-right: 8px; font-weight: 700; font-size: 12.5px; }
.t-toolbar { display: flex; align-items: center; gap: 6px; padding: 0 10px; background: linear-gradient(#336cc4, #1e4a96); border-bottom: 1px solid #0f2e66; overflow-x: auto; }
.t-btn { flex: none; width: 76px; height: 56px; padding: 4px 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(255, 255, 255, .13); color: #eef4ff; font-size: 11px; cursor: pointer; }
.t-btn:hover:not(:disabled) { background: rgba(255, 255, 255, .26); border-color: #fff; }
.t-btn:disabled, .t-btn.off { opacity: .45; cursor: default; }
.t-btn.current { background: rgba(255, 255, 255, .3); border-color: #fff; }
.t-btn.active { background: #c62828; border-color: #ff8a80; animation: blink .7s infinite; }
.t-btn .ti { display: grid; place-items: center; height: 26px; }
.t-sep { flex: none; width: 1px; height: 44px; background: rgba(255, 255, 255, .3); margin: 0 4px; }
.t-badge { width: 52px; height: 52px; object-fit: contain; margin-left: 8px; flex: none; }
.t-linkbar { display: flex; align-items: center; gap: 16px; padding: 0 12px; background: #3a70c8; overflow-x: auto; white-space: nowrap; border-bottom: 1px solid #1d4a96; }
.t-link { color: #fff; text-decoration: none; font-size: 12px; font-weight: 600; opacity: .95; } .t-link:hover { text-decoration: underline; } .t-link.off { opacity: .5; cursor: default; text-decoration: none; }
.tyler .banner { font-size: 13px; padding: 3px 10px; }
.t-content { overflow: auto; min-height: 0; background: #0b0b0b; }
.t-split { display: grid; grid-template-rows: minmax(120px, 40%) 1fr; height: 100%; }
.t-split > .t-grid:first-child { border-bottom: 3px solid #2a5cb0; }
.t-grid { overflow: auto; min-height: 0; background: #101010; }
.t-grid table { width: 100%; border-collapse: collapse; table-layout: auto; }
.t-grid th { position: sticky; top: 0; z-index: 1; background: #1b1b1b; color: #cfcfcf; font-size: 12px; font-weight: 700; text-transform: none; letter-spacing: 0; padding: 3px 6px; border: 1px solid #2c2c2c; border-top: 0; white-space: nowrap; }
.t-grid td { padding: 3px 6px; font-weight: 700; font-size: 14.5px; text-transform: uppercase; border: 0; border-bottom: 1px solid #262626; white-space: nowrap; cursor: default; }
.t-grid tr:hover td { background: #171717; } .t-grid tr.sel td { background: #17336f; outline: 0; } .t-grid tr.mine td:first-child { box-shadow: inset 4px 0 #fff; }
.t-grid tr.empty td { color: #777; font-weight: 400; text-transform: none; }
.t-grid .panic-row td { background: #5a0a0a; animation: blink .7s infinite; color: #fff; }
.t-statusbar { display: flex; align-items: stretch; background: #1c4a9a; border-top: 1px solid #5d8be0; font-size: 12px; }
.t-cell { display: flex; align-items: center; gap: 5px; padding: 0 14px; border-right: 1px solid rgba(255, 255, 255, .28); font-weight: 600; white-space: nowrap; } .t-cell.clickable { cursor: pointer; } .t-cell.clickable:hover { background: rgba(255, 255, 255, .18); }
.t-statusbar .spacer { flex: 1; } .clock { font-variant-numeric: tabular-nums; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #999; } .dot.ok { background: #35e06a; box-shadow: 0 0 6px #35e06a; } .dot.bad { background: #ff3b3b; }
.t-pad { padding: 10px; }

.t-popup { position: fixed; z-index: 200; min-width: 190px; background: #fff; color: #111; border: 1px solid #7d8db0; box-shadow: 0 6px 20px #0009; padding: 2px; }
.t-popup button { display: block; width: 100%; text-align: left; border: 0; border-radius: 0; background: transparent; color: #111; padding: 6px 12px; font-size: 13px; }
.t-popup button:hover:not(:disabled) { background: #2f66bd; color: #fff; } .t-popup button:disabled { color: #999; }
.t-popup hr { border: 0; border-top: 1px solid #ccc; margin: 2px 0; }

/* Reused modern panels, restyled to match inside the CAD window */
.tyler .panel { border-radius: 0; border-color: #2a5cb0; background: #121212; }
.tyler .panel > header { background: linear-gradient(#336cc4, #1e4a96); color: #fff; text-transform: none; letter-spacing: 0; font-size: 13px; }
.tyler .card { background: #171717; border-radius: 0; border-color: #333; } .tyler .card.wanted { border-color: #ff3434; }
.tyler table th { background: #1b1b1b; color: #cfcfcf; border-bottom: 1px solid #2c2c2c; } .tyler td { border-bottom-color: #262626; }
.tyler tr.click:hover { background: #17336f; }
.tyler input, .tyler select, .tyler textarea { background: #0d0d0d; border-color: #333; border-radius: 2px; } .tyler button { border-radius: 3px; }
.tyler .tabs button.on, .tyler .statusbar button.on { background: #2f66bd; border-color: #2f66bd; color: #fff; }
.tyler .muted { color: #9a9a9a; } .tyler .chip { background: #1b1b1b; border-color: #444; border-radius: 3px; }
@media (max-width: 760px) { .t-title { display: none; } }

/* ---------- Admin console ---------- */
.admin-main { padding: 0 !important; }
.admin-layout { display: grid; grid-template-columns: 230px 1fr; min-height: calc(100vh - 46px); }
.admin-side { background: #0a0f20; border-right: 1px solid var(--line); padding: 12px 0; }
.nav-group { margin-bottom: 10px; } .nav-title { padding: 8px 18px 4px; font-size: 11.5px; font-weight: 700; color: var(--text); letter-spacing: .3px; }
.admin-side a { display: block; padding: 8px 18px; color: var(--muted); text-decoration: none; border-left: 3px solid transparent; }
.admin-side a:hover { color: var(--text); background: #11183a; } .admin-side a.on { color: #fff; background: rgba(255, 77, 148, .14); border-left-color: var(--accent); }
.admin-content { padding: 16px 20px; min-width: 0; overflow: auto; }
.admin-search { width: 220px; }
.two-col { display: grid; grid-template-columns: 220px 1fr; gap: 14px; align-items: start; }
.sub-nav { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 8px 0; }
.sub-nav h3 { margin: 0; padding: 8px 14px 10px; font-size: 14px; }
.sub-nav a { display: block; padding: 7px 14px; color: var(--muted); text-decoration: none; border-top: 1px solid #1b2347; } .sub-nav a:hover { color: var(--text); background: #11183a; }
.sub-nav a.on { background: var(--accent); color: #1a0618; font-weight: 700; }
td.actions { white-space: nowrap; } td.actions a { margin-right: 12px; color: var(--accent2); text-decoration: none; font-size: 13px; } td.actions a:hover { text-decoration: underline; } td.actions a.bad { color: var(--bad); }
.banned-row td { opacity: .6; } .who { display: inline-flex; align-items: center; gap: 8px; }
.avatar.ph { display: inline-grid; place-items: center; background: var(--accent); color: #1a0618; font-weight: 700; font-size: 13px; }
.dot-color { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; }
.pager { display: flex; align-items: center; gap: 8px; padding-top: 10px; }
.form-row { display: grid; grid-template-columns: 200px minmax(0, 520px); gap: 10px; align-items: center; margin: 8px 0; } .form-row > label { margin: 0; }
pre.code { margin: 0; padding: 10px 12px; background: #080c1a; border: 1px solid var(--line); border-radius: 4px; white-space: pre-wrap; word-break: break-all; font: 12.5px/1.5 Consolas, monospace; color: #bfe9ff; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.stat { background: #0e1630; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; } .stat-v { font-size: 26px; font-weight: 700; color: var(--accent2); } .stat-l { color: var(--text); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.bar-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; } .bar { width: 100%; background: linear-gradient(var(--accent), #8a2eff); border-radius: 3px 3px 0 0; min-height: 2px; } .bar-col small { color: var(--muted); font-size: 10px; margin-top: 2px; }

/* toggle switches */
.switch-row { display: flex; gap: 10px; align-items: center; margin: 3px 0; color: var(--text); cursor: pointer; font-size: 13px; }
.switch { position: relative; flex: none; width: 36px; height: 20px; } .switch input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.slider { position: absolute; inset: 0; background: #2a2145; border-radius: 20px; transition: .15s; } .slider::before { content: ''; position: absolute; left: 3px; top: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: .15s; }
.switch input:checked + .slider { background: var(--accent); } .switch input:checked + .slider::before { transform: translateX(16px); }
.switch input:disabled + .slider { opacity: .45; } .switch input:focus-visible + .slider { outline: 2px solid var(--accent2); }
.perm-key { margin-left: 6px; font-size: 10.5px; }

/* permission group editor */
.editor { max-width: 1200px; } .editor .back { color: var(--muted); text-decoration: none; } .editor h2 { margin: 6px 0 12px; }
.perm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; align-items: start; margin-top: 10px; }
.perm-card { background: #1a0f2a; border: 1px solid #3a2358; border-radius: 8px; padding: 10px 12px; } .perm-card .head { margin-bottom: 6px; font-size: 14px; }
.all-row { background: #2a0f2a; border: 1px solid #5a2358; border-radius: 6px; padding: 8px 10px; }
@media (max-width: 860px) { .admin-layout { grid-template-columns: 1fr; } .admin-side { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 0; } .nav-group { display: flex; margin: 0; } .nav-title { display: none; } .admin-side a { white-space: nowrap; border-left: 0; border-bottom: 3px solid transparent; } .admin-side a.on { border-bottom-color: var(--accent); } .two-col { grid-template-columns: 1fr; } .form-row { grid-template-columns: 1fr; } }.perm-key { display: block; margin-left: 0 !important; }
