:root {
  --bg: #0a0f16; --bg2: #0e1622; --panel: #121c2b; --panel2: #16223400;
  --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.14);
  --text: #eef2f8; --muted: #93a1b5; --dim: #6a778c;
  --accent: #5ad1a0; --accent2: #4aa3ff; --warn: #ffb454; --danger: #ff6b6b; --violet: #a78bfa;
  --r: 14px; --san: 'Manrope', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: radial-gradient(1200px 700px at 80% -10%, rgba(74,163,255,.10), transparent 60%), var(--bg); color: var(--text); font-family: var(--san); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--accent2); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }

/* login */
.login-body { min-height: 100vh; display: grid; place-items: center; }
.login-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 34px 30px; width: min(360px, 92vw); display: grid; gap: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.login-logo { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.login-sub { color: var(--muted); font-size: 13px; margin-top: -8px; }
.login-card input { background: var(--bg2); border: 1px solid var(--line2); color: var(--text); border-radius: 10px; padding: 12px 14px; font-size: 15px; }
.login-card button { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #04121a; border: 0; border-radius: 10px; padding: 12px; font-weight: 700; font-size: 15px; }
.login-err { color: var(--danger); font-size: 13px; min-height: 16px; text-align: center; }

/* app shell */
.app { display: grid; grid-template-columns: 246px 1fr; min-height: 100vh; }
.side { background: var(--bg2); border-right: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.brand { font-weight: 800; font-size: 18px; padding: 6px 10px 14px; letter-spacing: -.02em; }
.brand small { display: block; color: var(--muted); font-weight: 500; font-size: 11px; letter-spacing: .04em; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--muted); font-size: 14px; font-weight: 600; }
.nav a:hover { background: rgba(255,255,255,.04); color: var(--text); }
.nav a.active { background: rgba(90,209,160,.12); color: var(--accent); }
.nav a .badge { margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; border-radius: 20px; padding: 1px 7px; font-weight: 700; }
.side-foot { margin-top: auto; padding: 10px; color: var(--dim); font-size: 12px; }
.side-foot .demo { display: inline-block; background: rgba(255,180,84,.14); color: var(--warn); border-radius: 6px; padding: 2px 8px; font-weight: 700; font-size: 11px; }

.main { padding: 26px 30px 60px; max-width: 1080px; }
.h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-bottom: 4px; }
.sub { color: var(--muted); font-size: 14px; margin-bottom: 22px; }

.grid { display: grid; gap: 14px; }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .app { grid-template-columns: 1fr; } .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; } .cols-4, .cols-3, .cols-2 { grid-template-columns: 1fr 1fr; } }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.card h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; font-weight: 700; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .n { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }
.stat .l { color: var(--muted); font-size: 13px; }
.stat.attention .n { color: var(--warn); }

.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.list { display: flex; flex-direction: column; gap: 8px; }
.item { background: var(--bg2); border: 1px solid var(--line); border-radius: 11px; padding: 12px 14px; }
.item .t { font-weight: 600; font-size: 14.5px; }
.item .m { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 20px; padding: 2px 9px; }
.pill.green { background: rgba(90,209,160,.15); color: var(--accent); }
.pill.blue { background: rgba(74,163,255,.15); color: var(--accent2); }
.pill.warn { background: rgba(255,180,84,.16); color: var(--warn); }
.pill.danger { background: rgba(255,107,107,.16); color: var(--danger); }
.pill.violet { background: rgba(167,139,250,.16); color: var(--violet); }
.pill.dim { background: rgba(255,255,255,.06); color: var(--muted); }

.btn { background: rgba(255,255,255,.06); border: 1px solid var(--line2); color: var(--text); border-radius: 9px; padding: 8px 13px; font-size: 13px; font-weight: 600; }
.btn:hover { background: rgba(255,255,255,.1); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #04121a; border: 0; }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn.ghost { background: transparent; }

input.in, textarea.in, select.in { width: 100%; background: var(--bg2); border: 1px solid var(--line2); color: var(--text); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
textarea.in { resize: vertical; min-height: 72px; }
label.fl { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 5px; font-weight: 600; }

/* chat */
.chat { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; padding: 4px; }
.bubble { max-width: 80%; padding: 10px 14px; border-radius: 14px; font-size: 14px; white-space: pre-wrap; }
.bubble.me { align-self: flex-end; background: linear-gradient(135deg, rgba(90,209,160,.2), rgba(74,163,255,.2)); border: 1px solid var(--line2); }
.bubble.anna { align-self: flex-start; background: var(--bg2); border: 1px solid var(--line); }
.chat-input { display: flex; gap: 8px; margin-top: 12px; }
.chat-input input { flex: 1; }

.thread { display: flex; flex-direction: column; gap: 8px; }
.msg { padding: 8px 12px; border-radius: 10px; font-size: 13.5px; max-width: 82%; white-space: pre-wrap; }
.msg.anna { background: rgba(90,209,160,.12); align-self: flex-start; }
.msg.them, .msg.employee { background: var(--bg2); border: 1px solid var(--line); align-self: flex-end; }

.tag { font-size: 11px; color: var(--dim); }
.hidden { display: none !important; }
.empty { color: var(--dim); font-size: 13px; padding: 12px; text-align: center; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th { text-align: left; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 12px; }
table.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; }
.steps { border-left: 2px solid var(--line2); padding-left: 14px; display: flex; flex-direction: column; gap: 10px; }
.steps .st .t { font-weight: 600; font-size: 13.5px; }
.steps .st .d { color: var(--muted); font-size: 12.5px; }
.toast { position: fixed; bottom: 22px; right: 22px; background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; padding: 12px 16px; font-size: 13.5px; box-shadow: 0 20px 50px rgba(0,0,0,.5); opacity: 0; transform: translateY(10px); transition: .25s; z-index: 50; }
.toast.show { opacity: 1; transform: none; }
.intbar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.on { background: var(--accent); }
.dot.off { background: var(--dim); }
