/* Toponexa team page. Its own small look (dark, the app's blue); nothing here is shared with css/style.css. */
:root {
  --bg: #070b14; --side: #0b111d; --card: #101828; --card-2: #16213a; --line: #1f2c44; --text: #e8eef8; --muted: #8b9cb5;
  --accent: #38bdf8; --accent-ink: #04202e; --ok: #22c55e; --bad: #fb7185; --warn: #fbbf24; --violet: #a78bfa;
  --r: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.ok { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn); }
code { font: 13px ui-monospace, Consolas, monospace; background: var(--card-2); padding: 1px 6px; border-radius: 6px; }

/* ---- sign-in ---- */
.center-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.boot-mark { width: 80px; height: 80px; border-radius: 50%; display: block; margin: 0 auto 20px; }
.spinner { width: 26px; height: 26px; margin: 0 auto; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-card { width: 100%; max-width: 380px; display: grid; gap: 12px; text-align: center; }
.auth-mark { width: 68px; height: 68px; border-radius: 50%; margin: 0 auto 4px; }
.auth-card h1 { margin: 0; font-size: 24px; }
.auth-card p { margin: 0; }
.auth-card label { display: grid; gap: 6px; text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; }
.auth-card input { height: 48px; font-size: 16px; }
.code-input { text-align: center; letter-spacing: 0.5em; font-size: 24px !important; font-weight: 700; }
.captcha:empty { display: none; }
.mfa-qr { width: 200px; height: 200px; margin: 4px auto; background: #fff; border-radius: 12px; padding: 8px; }
.mfa-qr:not([src]) { visibility: hidden; }
#mfa-secret { word-break: break-all; }
.form-error { color: var(--bad); font-size: 14px; text-align: left; margin: 0; }

input, select, textarea { width: 100%; min-height: 40px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); outline: none; }
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input[type="checkbox"] { width: auto; min-height: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card-2); color: var(--text); font-weight: 650; cursor: pointer; white-space: nowrap; text-decoration: none !important; }
.btn:hover { border-color: #33476b; }
.btn.small { min-height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: 0.55; cursor: default; }

/* ---- frame ---- */
.shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.side { background: var(--side); border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px 6px; }
.brand img { width: 36px; height: 36px; border-radius: 50%; }
.brand b { display: block; font-size: 16px; }
.brand span { display: block; font-size: 12px; color: var(--warn); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
#nav { display: grid; gap: 2px; }
#nav a { display: flex; align-items: center; justify-content: space-between; padding: 9px 10px; border-radius: 9px; color: var(--muted); font-weight: 600; text-decoration: none; }
#nav a:hover { background: var(--card); color: var(--text); }
#nav a.active { background: var(--card-2); color: var(--text); box-shadow: inset 3px 0 0 var(--accent); }
.nav-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--bad); color: #fff; font-size: 12px; font-weight: 800; display: inline-grid; place-items: center; }
.nav-badge.warn { background: var(--warn); color: #2a1d00; }
.side-foot { margin-top: auto; display: grid; gap: 8px; }
#me { word-break: break-all; padding: 0 4px; }

.body { min-width: 0; display: flex; flex-direction: column; }
.support-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 22px; background: #3b2a06; color: #fde68a; border-bottom: 1px solid #5a4410; }
.support-bar span { flex: 1 1 auto; }
.head { display: flex; align-items: center; gap: 12px; padding: 18px 22px 6px; }
.head h1 { margin: 0; font-size: 22px; flex: 1 1 auto; }
.menu-btn { display: none; }
main { padding: 10px 22px 40px; outline: none; max-width: 1500px; }

/* ---- content ---- */
.grid { display: grid; gap: 14px; }
.cols-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.cols-2 { grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); align-items: start; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; min-width: 0; }
.card h2 { margin: 0 0 10px; font-size: 16px; }
.card h2 .muted { font-weight: 500; font-size: 13px; }
.card + .card, .grid + .card, .card + .grid, .grid + .grid { margin-top: 14px; }
.stat { display: grid; gap: 2px; }
.stat b { font-size: 28px; line-height: 1.1; }
.stat span { color: var(--muted); font-size: 13px; }
.stat.hot b { color: var(--warn); }
.stat.good b { color: var(--ok); }
.empty { color: var(--muted); font-size: 14px; padding: 6px 0; }
.note { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row.end { justify-content: flex-end; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 12px; }
.toolbar input, .toolbar select { width: auto; min-width: 220px; }
.form { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); align-items: end; }
.form label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.form .wide { grid-column: 1 / -1; }
.error-box { background: #3a1220; border: 1px solid #6b2238; color: #fecdd3; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 14px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 9px 8px; border-bottom: 1px solid #17223a; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #131d31; }
td.actions { white-space: nowrap; text-align: right; }
td.actions .btn { margin-left: 4px; }
td .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }

.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--card-2); color: var(--muted); white-space: nowrap; }
.pill.ok { background: #0f2e1d; color: #86efac; }
.pill.bad { background: #3a1220; color: #fda4af; }
.pill.warn { background: #3b2a06; color: #fde68a; }
.pill.info { background: #0c2a3c; color: #7dd3fc; }
.pill.violet { background: #241a45; color: #c4b5fd; }

.list { display: grid; gap: 8px; }
.item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; background: var(--card-2); border-radius: 10px; }
.item .grow { flex: 1 1 auto; min-width: 0; }
.item .title { font-weight: 650; }
.item.done { opacity: 0.55; }
.item.late { box-shadow: inset 3px 0 0 var(--bad); }
.item.soon { box-shadow: inset 3px 0 0 var(--warn); }
.item p { margin: 2px 0 0; color: var(--muted); font-size: 13px; white-space: pre-wrap; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; min-width: 0; word-break: break-word; }
.back { display: inline-block; margin-bottom: 10px; font-weight: 600; }
.bar { height: 8px; border-radius: 4px; background: var(--card-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: #1e293b; color: var(--text); border: 1px solid var(--line);
  padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; max-width: calc(100vw - 32px); z-index: 50; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- narrow screens: the menu folds away ---- */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 250px; z-index: 40; transform: translateX(-100%); transition: transform 0.2s; }
  .shell.menu-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.5); }
  .menu-btn { display: inline-flex; }
  .head { padding: 14px 16px 4px; }
  main { padding: 8px 16px 32px; }
  .support-bar { padding: 10px 16px; }
  .cols-2 { grid-template-columns: 1fr; }
  .toolbar input, .toolbar select { min-width: 0; flex: 1 1 160px; }
}
