/* BizNode Admin — Dark theme stylesheet */
:root {
  --bg:      #0f1117;
  --surface: #1a1d27;
  --panel:   #1e2130;
  --border:  #2d3148;
  --text:    #e2e4ec;
  --muted:   #7b82a0;
  --green:   #22c55e;
  --amber:   #f59e0b;
  --red:     #ef4444;
  --blue:    #6366f1;
  --primary: #6366f1;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: system-ui, sans-serif; font-size: 14px; }

/* ── Navbar ── */
.navbar { display: flex; align-items: center; justify-content: space-between;
          background: var(--surface); border-bottom: 1px solid var(--border);
          padding: .75rem 1.5rem; position: sticky; top: 0; z-index: 10; }
.nav-brand { font-weight: 700; font-size: 1rem; color: var(--text); }
.nav-links  { list-style: none; display: flex; gap: 1.5rem; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: .85rem; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-logout { color: var(--red) !important; }

/* ── Main layout ── */
.main { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }
.page-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 1.25rem; }
.section-title { font-size: 1rem; font-weight: 600; margin: 1.5rem 0 .75rem; }
.section-row { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.result-count { color: var(--muted); font-size: .8rem; margin-bottom: .5rem; }

/* ── Metric cards ── */
.metric-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .75rem; margin-bottom: 1.5rem; }
.metric-card { background: var(--surface); border: 1px solid var(--border); border-radius: .5rem;
               padding: 1rem; text-align: center; }
.metric-value { font-size: 1.8rem; font-weight: 700; }
.metric-label { color: var(--muted); font-size: .75rem; margin-top: .25rem; }
.metric-green .metric-value { color: var(--green); }
.metric-amber .metric-value { color: var(--amber); }
.metric-blue  .metric-value { color: var(--blue); }
.metric-red   .metric-value { color: var(--red); }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .9rem;
       border-radius: .4rem; font-size: .8rem; font-weight: 600; cursor: pointer;
       border: 1px solid transparent; text-decoration: none; transition: opacity .15s; }
.btn:hover { opacity: .85; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-outline  { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost    { background: transparent; color: var(--muted); }
.btn-danger   { background: var(--red); color: #fff; border-color: var(--red); }
.btn-full     { width: 100%; justify-content: center; }
.btn-sm       { padding: .25rem .6rem; font-size: .75rem; }
.action-btns  { display: flex; gap: .35rem; flex-wrap: wrap; }

/* ── Tables ── */
.data-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.data-table th { text-align: left; padding: .5rem .75rem; border-bottom: 2px solid var(--border);
                 color: var(--muted); font-weight: 600; white-space: nowrap; }
.data-table td { padding: .5rem .75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table tr:hover td { background: var(--surface); }
.empty { text-align: center; color: var(--muted); padding: 2rem !important; }
.text-muted { color: var(--muted); }

/* ── Badges ── */
.badge { display: inline-block; padding: .15rem .5rem; border-radius: .25rem;
         font-size: .7rem; font-weight: 600; }
.badge-trial     { background: rgba(99,102,241,.2); color: var(--blue); }
.badge-converted { background: rgba(34,197,94,.2);  color: var(--green); }
.badge-expired   { background: rgba(245,158,11,.2); color: var(--amber); }
.badge-blocked   { background: rgba(239,68,68,.2);  color: var(--red); }
.badge-active    { background: rgba(34,197,94,.2);  color: var(--green); }
.badge-revoked   { background: rgba(239,68,68,.2);  color: var(--red); }
.badge-suspended { background: rgba(245,158,11,.2); color: var(--amber); }
.badge-success   { background: rgba(34,197,94,.2);  color: var(--green); }
.badge-failed    { background: rgba(239,68,68,.2);  color: var(--red); }

/* ── Forms ── */
.form-group  { margin-bottom: .9rem; }
.form-label  { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: .35rem; }
.form-input  { width: 100%; background: var(--panel); border: 1px solid var(--border);
               color: var(--text); border-radius: .4rem; padding: .5rem .75rem;
               font-size: .85rem; outline: none; }
.form-input:focus { border-color: var(--primary); }
.form-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-card   { background: var(--surface); border: 1px solid var(--border);
               border-radius: .6rem; padding: 1.25rem; }

/* ── Filter bar ── */
.filter-bar   { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filter-input { width: 260px !important; }
.filter-select{ width: 160px !important; }

/* ── Alerts ── */
.alert { padding: .75rem 1rem; border-radius: .5rem; margin-bottom: 1rem; font-size: .85rem; }
.alert-error   { background: rgba(239,68,68,.15);  border: 1px solid rgba(239,68,68,.4);  color: #fca5a5; }
.alert-success { background: rgba(34,197,94,.15);  border: 1px solid rgba(34,197,94,.4);  color: #86efac; }
.alert-info    { background: rgba(99,102,241,.1);  border: 1px solid rgba(99,102,241,.3); color: #a5b4fc; }

/* ── License box (USB files display) ── */
.license-box  { background: var(--surface); border: 1px solid var(--border);
                border-radius: .6rem; padding: 1.25rem; }
.file-block   { margin-bottom: 1rem; }
.file-label   { font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: .35rem; }
.file-content { width: 100%; background: var(--bg); border: 1px solid var(--border);
                color: #a5f3fc; font-family: monospace; font-size: .8rem;
                padding: .6rem; border-radius: .4rem; resize: vertical; }
.meta-row     { display: flex; gap: 1.5rem; font-size: .8rem; color: var(--muted); margin-top: .75rem; }
.help-text    { color: var(--muted); font-size: .8rem; margin-top: .25rem; }

/* ── Login page ── */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box   { background: var(--surface); border: 1px solid var(--border);
               border-radius: .75rem; padding: 2rem; width: 100%; max-width: 360px; }
.login-logo  { font-size: 2rem; text-align: center; margin-bottom: .5rem; }
.login-title { text-align: center; font-size: 1.1rem; font-weight: 700; margin-bottom: 1.25rem; }
code { font-family: monospace; background: var(--panel); padding: .1rem .3rem;
       border-radius: .2rem; font-size: .85em; }
