/* GK CyberTech — shadcn/ui-style shell: flat surfaces, neutral zinc palette, border-driven,
   tight radii, ring-based focus. Custom-property NAMES are unchanged from before (dozens of
   pages reference var(--line), var(--brand-ink), etc. directly) — only values + component
   rules changed, so no other file needs to move. */
:root{
  --bg:#fafafa; --surface:#ffffff; --ink:#18181b; --muted:#71717a; --faint:#a1a1aa;
  --line:#e4e4e7; --line-2:#f0f0f1; --brand:#4f46e5; --brand-ink:#4338ca;
  --brand-soft:#eef2ff; --green:#15803d; --green-soft:#ecfdf5; --amber:#b45309;
  --amber-soft:#fffbeb; --red:#b91c1c; --red-soft:#fef2f2; --radius:0.5rem;
  --shadow:0 1px 2px 0 rgba(24,24,27,.04), 0 1px 3px 0 rgba(24,24,27,.06);
  --shadow-md:0 4px 6px -1px rgba(24,24,27,.07), 0 2px 4px -2px rgba(24,24,27,.05);
  /* Kept for pages that still reference them (e.g. auth background); no gradient fills
     are applied to components any more — see the flat-theme block at the bottom. */
  --brand-2:#7c3aed;
  --grad:linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  --wash:none;
}
*{box-sizing:border-box}
html,body{margin:0}
body{
  font-family:'Inter',system-ui,-apple-system,Segoe UI,Roboto,sans-serif;
  background:var(--bg);
  color:var(--ink); font-size:14px; line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none}
.muted{color:var(--muted)} .faint{color:var(--faint)}
:focus-visible{outline:none}

/* ── Shell ─────────────────────────────────────────────── */
.app{display:grid; grid-template-columns:248px 1fr; min-height:100vh}
.sidebar{
  background:var(--surface); border-right:1px solid var(--line);
  padding:20px 14px; display:flex; flex-direction:column; gap:4px; position:sticky; top:0; height:100vh;
}
.brand{display:flex; align-items:center; gap:10px; padding:6px 10px 18px; font-weight:600; font-size:15px; letter-spacing:-.01em}
.brand .logo{width:30px;height:30px;border-radius:8px;background:var(--brand);
  display:grid;place-items:center;color:#fff;font-weight:700;font-size:14px}
.nav-label{font-size:11px;font-weight:600;letter-spacing:.06em;color:var(--faint);text-transform:uppercase;padding:14px 10px 6px}
.nav a{
  display:flex; align-items:center; gap:11px; padding:8px 10px; border-radius:6px;
  color:var(--muted); font-weight:500; font-size:13.5px; border-left:2px solid transparent; transition:.12s;
}
.nav a svg{width:17px;height:17px;flex:0 0 17px;stroke-width:1.9}
.nav a:hover{background:var(--line-2); color:var(--ink)}
.nav a.active{background:var(--brand-soft); color:var(--brand-ink); font-weight:600; border-left-color:var(--brand)}
.sidebar .spacer{flex:1}
.side-user{border-top:1px solid var(--line); padding:12px 6px 2px; display:flex; align-items:center; gap:6px}
.side-prof{display:flex;align-items:center;gap:10px;flex:1;min-width:0;text-decoration:none;color:inherit;
  padding:5px 6px;border-radius:6px;transition:background .12s}
.side-prof:hover{background:var(--line-2)}
.side-prof.active{background:var(--brand-soft)}
.avatar{width:32px;height:32px;border-radius:50%;background:var(--brand-soft);color:var(--brand-ink);
  display:grid;place-items:center;font-weight:600;font-size:12.5px;flex:none;border:1px solid var(--line)}

/* ── Main ─────────────────────────────────────────────── */
.main{display:flex; flex-direction:column; min-width:0; min-height:100vh}
.topbar{
  height:58px; background:var(--surface); border-bottom:1px solid var(--line);
  display:flex; align-items:center; justify-content:space-between; padding:0 24px; position:sticky; top:0; z-index:5;
}
.topbar{gap:14px}
.topbar h1{font-size:15.5px;font-weight:600;letter-spacing:-.005em;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ink)}
.topbar-actions{display:flex;flex-direction:row;align-items:center;gap:10px;flex-wrap:nowrap;flex:none}
.topbar-actions .switcher,.topbar-actions .topuser,.topbar-actions .btn{flex:none}
.topuser{display:inline-flex;text-decoration:none;border-radius:50%;transition:box-shadow .12s}
.topuser:hover{box-shadow:0 0 0 2px var(--line)}
.topuser .avatar{width:30px;height:30px;font-size:11.5px}
.chip{display:inline-flex;align-items:center;gap:6px;background:var(--line-2);color:var(--ink);border:1px solid var(--line);
  font-weight:500;font-size:12px;padding:5px 10px;border-radius:999px}
.content{padding:24px 24px 32px; max-width:1180px; width:100%; flex:1 0 auto}

/* ── Cards / stats ─────────────────────────────────────── */
.grid{display:grid;gap:14px}
.cols-4{grid-template-columns:repeat(4,1fr)}
.cols-3{grid-template-columns:repeat(3,1fr)}
@media(max-width:900px){.cols-4,.cols-3{grid-template-columns:repeat(2,1fr)} .app{grid-template-columns:1fr} .sidebar{display:none}}
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.stat{padding:16px 18px;position:relative}
.stat .k{font-size:12.5px;font-weight:500;color:var(--muted)}
.stat .v{font-size:24px;font-weight:650;letter-spacing:-.015em;margin-top:7px;color:var(--ink);font-variant-numeric:tabular-nums}
.stat .s{font-size:12px;color:var(--faint);margin-top:4px}
.stat .ic{width:34px;height:34px;border-radius:8px;display:grid;place-items:center;float:right;background:var(--brand-soft);color:var(--brand-ink)}

/* ── Panels & tables ───────────────────────────────────── */
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);overflow:hidden;margin-top:20px}
.panel-head{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid var(--line)}
.panel-head h2{font-size:14.5px;font-weight:600;margin:0;color:var(--ink)}
table{width:100%;border-collapse:collapse}
th{font-size:12px;color:var(--muted);font-weight:500;
  text-align:left;padding:10px 18px;border-bottom:1px solid var(--line)}
td{padding:12px 18px;border-bottom:1px solid var(--line);vertical-align:middle}
tr:last-child td{border-bottom:none}
tbody tr:hover{background:var(--line-2)}
.name-cell{display:flex;align-items:center;gap:11px}
.tag{display:inline-flex;align-items:center;gap:5px;font-size:12px;font-weight:500;padding:2px 9px;border-radius:999px;border:1px solid transparent}
.tag svg{width:12px;height:12px;flex:none}
.tag.green{background:var(--green-soft);color:var(--green);border-color:#bbf7d0}
.tag.gray{background:var(--line-2);color:var(--muted);border-color:var(--line)}
.tag.brand{background:var(--brand);color:#fff}
.tag.amber{background:var(--amber-soft);color:var(--amber);border-color:#fde68a}
.tag.red{background:var(--red-soft);color:var(--red);border-color:#fecaca}
.empty{padding:40px 18px;text-align:center;color:var(--faint);font-size:13.5px}

/* ── Buttons & forms ───────────────────────────────────── */
.btn{display:inline-flex;align-items:center;gap:7px;font-weight:500;font-size:13.5px;border-radius:6px;
  padding:8px 14px;border:1px solid transparent;cursor:pointer;transition:.12s;font-family:inherit}
.btn svg{width:15px;height:15px;stroke-width:2}
.btn:focus-visible,input:focus-visible,select:focus-visible,.btn:focus-visible{
  box-shadow:0 0 0 2px var(--surface), 0 0 0 4px var(--brand);
}
.btn-primary{background:var(--brand);color:#fff;border-color:var(--brand)}
.btn-primary:hover{background:var(--brand-ink);border-color:var(--brand-ink)}
.btn-ghost{background:var(--surface);border-color:var(--line);color:var(--ink)}
.btn-ghost:hover{background:var(--line-2)}
.btn-sm{padding:5px 10px;font-size:12.5px}
.btn-danger{background:transparent;border-color:transparent;color:var(--red)}
.btn-danger:hover{background:var(--red-soft)}
.form-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px}
label{display:block;font-size:12.5px;font-weight:500;color:var(--muted);margin-bottom:6px}
input,select{width:100%;padding:8px 11px;border:1px solid var(--line);border-radius:6px;font-size:13.5px;
  font-family:inherit;color:var(--ink);background:var(--surface);transition:.12s}
input:focus,select:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-soft)}
.form-actions{display:flex;gap:10px;margin-top:16px}
.field-wrap{padding:18px}

/* ── Flash / alerts ────────────────────────────────────── */
.flash{background:var(--green-soft);color:#166534;border:1px solid #bbf7d0;padding:10px 14px;border-radius:var(--radius);
  font-weight:500;font-size:13.5px;margin-bottom:16px;display:flex;align-items:center;gap:9px}
.flash svg{width:17px;height:17px;flex:none}
.chip svg{width:13px;height:13px;flex:none}
.stat .ic svg{width:18px;height:18px}
td > svg{width:15px;height:15px;vertical-align:-2px}   /* bare icons in report tables */

/* ── Login ─────────────────────────────────────────────── */
.auth{position:relative;overflow:hidden;min-height:100vh;display:grid;place-items:center;padding:24px;background:var(--bg)}
.auth-bg{position:absolute;inset:0;z-index:0;pointer-events:none;overflow:hidden}
.fic{position:absolute;color:var(--brand);opacity:.11;animation:floaty var(--s,24s) ease-in-out infinite;animation-delay:var(--d,0s)}
.fic.alt{color:var(--brand-2,#7c3aed)}
.fic svg{width:var(--w,52px);height:var(--w,52px);stroke-width:1.4;display:block}
@keyframes floaty{0%,100%{transform:translateY(0) rotate(0deg)}50%{transform:translateY(-24px) rotate(7deg)}}
.auth-card,.auth-foot{position:relative;z-index:1}
@media (prefers-reduced-motion: reduce){.fic{animation:none}}
.auth-card{width:100%;max-width:396px;background:var(--surface);border:1px solid var(--line);
  border-radius:calc(var(--radius) + 4px);box-shadow:var(--shadow-md);padding:32px 28px}
.auth-card .brand{justify-content:center;padding-bottom:6px}
.auth-brand .logo{font-size:12px;letter-spacing:.5px}
.gk-name{color:var(--ink);font-weight:650;letter-spacing:-.01em}
.auth h2{text-align:center;font-size:18px;font-weight:600;margin:2px 0 4px;color:var(--ink)}
.auth .sub{text-align:center;color:var(--muted);margin-bottom:22px;font-size:13px}
.auth label{margin-top:14px}
.auth .btn{width:100%;justify-content:center;margin-top:20px;padding:10px}
.auth .err{background:var(--red-soft);color:#991b1b;border:1px solid #fecaca;padding:10px 13px;border-radius:6px;font-size:13px;margin-bottom:6px}
.auth .demo{margin-top:18px;padding-top:16px;border-top:1px solid var(--line);text-align:center;font-size:12px;color:var(--faint)}
.mb0{margin-bottom:0}
.appfoot{margin-top:auto;text-align:center;padding:16px;color:var(--faint);font-size:12px;
  border-top:1px solid var(--line);background:var(--surface)}
.appfoot a{color:var(--brand-ink);font-weight:500}
.auth-foot{text-align:center;margin-top:18px;color:var(--faint);font-size:12px}
.auth-foot a{color:var(--brand-ink);font-weight:500}

/* ── Company switcher ──────────────────────────────────── */
.switcher form{display:flex;align-items:center;gap:6px;background:var(--surface);border:1px solid var(--line);
  border-radius:6px;padding:6px 10px;color:var(--ink)}
.switcher form svg{width:15px;height:15px;flex:none;color:var(--faint)}
.switcher select{border:none;background:transparent;font-weight:500;font-size:13px;color:var(--ink);
  cursor:pointer;box-shadow:none;width:auto;padding:0 2px;-webkit-appearance:none;appearance:none}
.switcher select:focus{outline:none;box-shadow:none}

/* ── Section headings inside forms ─────────────────────── */
.section-title{font-size:11.5px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:var(--faint);
  margin:8px 0 2px;padding-top:14px;border-top:1px solid var(--line)}
.section-title:first-child{border-top:none;padding-top:0}
.total-row{display:flex;justify-content:space-between;align-items:center;background:var(--brand-soft);
  border:1px solid var(--line);border-radius:var(--radius);padding:11px 15px;margin-top:16px;font-weight:600;color:var(--brand-ink)}
.total-row .big{font-size:19px}
