[hidden] { display: none !important; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(ellipse at 70% 0%, rgba(200,255,61,0.12), transparent 55%); }
.login-card { width: 100%; max-width: 420px; background: var(--card); border: 1px solid var(--line-2); border-radius: 24px; padding: 34px 28px; }
.login-card .logo { margin-bottom: 26px; }
.login-card h1 { font-size: 30px; margin-bottom: 6px; }
.login-card form { margin-top: 22px; }
.login-card .btn { width: 100%; justify-content: center; margin-top: 4px; }
.link { background: none; border: 0; color: var(--muted); font: inherit; font-size: 14px; margin-top: 14px; cursor: pointer; text-decoration: underline; padding: 0; }
.msg { margin-top: 14px; font-size: 14px; border-radius: 10px; padding: 10px 12px; background: rgba(255,255,255,0.05); color: #dfe3e8; }
.msg.err { background: rgba(255,107,107,0.12); color: #ffb3b3; }
.msg.ok { background: var(--lime-dim); color: var(--lime); }

/* Header + tabs */
.top-right { display: flex; align-items: center; gap: 10px; }
.top-right select { background: var(--card); border: 1px solid var(--line-2); color: var(--text); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 14px; max-width: 200px; }
.btn.small { padding: 8px 14px; font-size: 13px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; padding-top: 14px; padding-bottom: 2px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { white-space: nowrap; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; padding: 10px 14px; border-radius: 10px 10px 0 0; border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); border-bottom-color: var(--lime); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--lime); color: #07080a; font-size: 12px; font-weight: 800; margin-left: 4px; }
.head-right { display: flex; align-items: center; gap: 10px; }
.page[hidden] { display: none !important; }

/* Usage bar */
.usage { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 20px; margin-bottom: 14px; }
.usage .row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); margin-bottom: 10px; flex-wrap: wrap; }
.usage .row b { color: var(--text); }
.meter { height: 10px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 999px; background: var(--lime); transition: width .6s; }
.meter.warn i { background: #f5c451; }
.meter.over i { background: #ff6b6b; }

/* Segmented filters */
.seg { display: inline-flex; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 14px; flex-wrap: wrap; }
.seg button { background: transparent; border: 0; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 999px; cursor: pointer; }
.seg button.on { background: var(--lime); color: #07080a; }

/* Action cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.acard { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.acard.fresh { border-color: rgba(200,255,61,0.45); box-shadow: 0 0 0 3px rgba(200,255,61,0.08); }
.acard .top-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.acard h3 { font-size: 19px; margin: 0; }
.acard p { margin: 0; font-size: 14px; }
.acard .who { color: #dfe3e8; font-size: 15px; }
.acard .who a { color: var(--lime); text-decoration: none; }
.acard .actions { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.acard .actions .btn { padding: 10px 16px; font-size: 14px; }
.btn.danger { background: transparent; color: #ffb3b3; border: 1px solid rgba(255,107,107,0.4); }
.btn.danger:hover { background: rgba(255,107,107,0.08); }
.cards .none { grid-column: 1 / -1; text-align: center; padding: 30px 0; color: var(--muted); }

/* Transcript */
.transcript { margin-top: 10px; max-height: 260px; overflow-y: auto; white-space: pre-wrap; font-size: 13px; color: #cfd4da; border-top: 1px solid var(--line); padding-top: 10px; }

/* Mon agent */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
.panel h2 { margin-bottom: 12px; }
.panel textarea { width: 100%; background: var(--bg); border: 1px solid var(--line-2); color: var(--text); border-radius: 12px; padding: 12px 14px; font: inherit; font-size: 15px; margin-bottom: 12px; resize: vertical; }
.panel textarea:focus { outline: none; border-color: var(--lime); }
.plan-line { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.plan-line span { color: var(--muted); }
.plan-line b { text-align: right; }
.req { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; }
.req p { margin: 0; color: #dfe3e8; }
.req small { color: var(--muted); display: block; margin-top: 2px; }

/* Admin */
.table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 720px; font-size: 14px; }
.admin-table th, .admin-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.admin-table th { color: var(--muted); font-weight: 600; font-size: 13px; }
.admin-table td .meter { width: 120px; display: inline-block; vertical-align: middle; margin-right: 8px; }
.pos { color: var(--lime); } .neg { color: #ff6b6b; }

/* Toast */
.toast { position: fixed; right: 16px; bottom: 16px; z-index: 40; background: var(--lime); color: #07080a; font-weight: 700; border-radius: 14px; padding: 14px 18px; box-shadow: 0 20px 50px -20px rgba(0,0,0,0.9); max-width: 340px; }

@media (max-width: 760px) {
  .top-right select { max-width: 130px; font-size: 13px; }
  .tabs a { padding: 10px 10px; font-size: 14px; }
  .cards { grid-template-columns: 1fr; }
  .dash-head { align-items: flex-start; }
}
