*{box-sizing:border-box;margin:0;padding:0}
:root{
  --bg:#0f172a; --bg2:#1e293b; --card:#ffffff; --text:#0f172a; --muted:#64748b;
  --primary:#6366f1; --primary2:#8b5cf6; --success:#10b981; --danger:#ef4444; --warning:#f59e0b;
  --border:#e2e8f0; --shadow:0 10px 30px rgba(2,6,23,.08); --shadow2:0 18px 45px rgba(79,70,229,.16);
}
body{font-family:'Hind Siliguri','Segoe UI',system-ui,sans-serif;background:linear-gradient(180deg,#eef2ff 0%,#f8fafc 260px,#f1f5f9 100%);color:var(--text);line-height:1.6}
a{color:var(--primary);text-decoration:none}
.btn{display:inline-flex;align-items:center;gap:6px;padding:10px 18px;border:none;border-radius:10px;background:linear-gradient(135deg,var(--primary),var(--primary2));color:#fff;cursor:pointer;font-weight:600;font-size:14px;transition:transform .15s, box-shadow .15s}
.btn:hover{transform:translateY(-1px);box-shadow:0 8px 20px rgba(99,102,241,.35)}
.btn.sm{padding:6px 12px;font-size:12px}
.btn.danger{background:linear-gradient(135deg,#ef4444,#f97316)}
.btn.success{background:linear-gradient(135deg,#10b981,#059669)}
.btn.ghost{background:#fff;color:var(--text);border:1px solid var(--border)}
.card{background:#fff;border-radius:14px;padding:20px;box-shadow:var(--shadow);border:1px solid var(--border)}
.input,select,textarea{width:100%;padding:11px 14px;border:1px solid var(--border);border-radius:10px;font-family:inherit;font-size:14px;background:#fff;transition:border .15s}
.input:focus,select:focus,textarea:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px rgba(99,102,241,.15)}
label{display:block;margin:0 0 6px;font-weight:600;font-size:13px;color:#334155}
.field{margin-bottom:14px}
.grid{display:grid;gap:14px}
.grid.g2{grid-template-columns:repeat(2,1fr)}
.grid.g3{grid-template-columns:repeat(3,1fr)}
.grid.g4{grid-template-columns:repeat(4,1fr)}
/* Mobile: keep horizontal (2 columns) instead of stacking */
@media (max-width:768px){
  .grid.g2,.grid.g3,.grid.g4{grid-template-columns:repeat(2,1fr);gap:10px}
}
.alert{padding:12px 16px;border-radius:10px;margin-bottom:14px;font-size:14px}
.alert.err{background:#fef2f2;color:#991b1b;border:1px solid #fecaca}
.alert.ok{background:#f0fdf4;color:#166534;border:1px solid #bbf7d0}
.alert.info{background:#eff6ff;color:#1e40af;border:1px solid #bfdbfe}
table{width:100%;border-collapse:collapse;background:#fff;border-radius:12px;overflow:hidden}
th,td{padding:12px;text-align:left;border-bottom:1px solid var(--border);font-size:14px}
th{background:#f8fafc;font-weight:600;color:#475569;font-size:12px;text-transform:uppercase;letter-spacing:.5px}
.badge{display:inline-block;padding:3px 10px;border-radius:999px;font-size:11px;font-weight:600}
.badge.ok{background:#dcfce7;color:#166534}
.badge.pending{background:#fef3c7;color:#92400e}
.badge.fail{background:#fee2e2;color:#991b1b}

/* Layout */
.app{display:flex;min-height:100vh}
.sidebar{width:250px;background:linear-gradient(180deg,#0f172a,#1e293b);color:#cbd5e1;padding:20px 0;position:fixed;height:100vh;overflow-y:auto;transition:transform .2s;z-index:100}
.sidebar h2{color:#fff;padding:0 20px 20px;font-size:18px;border-bottom:1px solid rgba(255,255,255,.1);margin-bottom:15px}
.sidebar a{display:flex;align-items:center;gap:10px;padding:11px 20px;color:#cbd5e1;font-weight:500;font-size:14px;border-left:3px solid transparent}
.sidebar a:hover,.sidebar a.active{background:rgba(99,102,241,.15);color:#fff;border-left-color:var(--primary)}
.main{margin-left:250px;flex:1;padding:20px 30px;width:calc(100% - 250px)}
.topbar{display:flex;justify-content:space-between;align-items:center;background:#fff;padding:14px 20px;border-radius:12px;margin-bottom:20px;box-shadow:var(--shadow)}
.hamburger{display:none;background:none;border:none;font-size:24px;cursor:pointer}
@media (max-width:768px){
  .sidebar{transform:translateX(-100%)} .sidebar.open{transform:translateX(0)}
  .main{margin-left:0;width:100%;padding:15px}
  .hamburger{display:block}
}
.stat{background:linear-gradient(135deg,#fff,#f8fafc);padding:18px;border-radius:16px;border:1px solid rgba(226,232,240,.9);box-shadow:var(--shadow);position:relative;overflow:hidden}
.stat:before{content:'';position:absolute;left:0;top:0;bottom:0;width:5px;background:linear-gradient(180deg,var(--primary),var(--primary2))}
.stat .label{color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.5px;font-weight:600}
.stat .value{font-size:24px;font-weight:700;margin-top:6px;background:linear-gradient(135deg,var(--primary),var(--primary2));-webkit-background-clip:text;-webkit-text-fill-color:transparent}
.stat .sub{color:var(--muted);font-size:12px;margin-top:4px}

/* Shortcut tiles (admin home) */
.admin-hero{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:18px;padding:20px;border-radius:20px;background:linear-gradient(135deg,#312e81,#7c3aed 55%,#db2777);color:#fff;box-shadow:var(--shadow2);position:relative;overflow:hidden}
.admin-hero:after{content:'';position:absolute;right:-70px;bottom:-90px;width:220px;height:220px;border-radius:50%;background:rgba(255,255,255,.16)}
.admin-hero>*{position:relative;z-index:1}.admin-hero .eyebrow{font-size:12px;text-transform:uppercase;letter-spacing:1px;color:#ddd6fe;font-weight:700}.admin-hero h2{font-size:24px;margin:3px 0}.admin-hero p{color:#ede9fe;font-size:14px}.hero-action{background:#fff;color:#4c1d95;padding:10px 14px;border-radius:12px;font-weight:700;white-space:nowrap;box-shadow:0 10px 24px rgba(0,0,0,.16)}
/* Shortcut tiles — clean minimal card grid (reference style) */
.tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:22px}
.tile{background:#ffffff;border:1px solid #eef0f3;border-radius:22px;padding:22px 12px;text-align:center;box-shadow:0 4px 14px rgba(17,24,39,.05);color:#111827;transition:transform .15s, box-shadow .15s;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;min-height:120px;position:relative;overflow:hidden}
.tile:hover{transform:translateY(-2px);box-shadow:0 10px 24px rgba(17,24,39,.10)}
.tile .ic{font-size:30px;display:grid;place-items:center;width:auto;height:auto;margin:0;background:transparent;border-radius:0}
.tile .lb{font-size:15px;font-weight:600;color:#111827;line-height:1.2;display:block}
.tile.featured{background:#0b0b0f;border-color:#0b0b0f;box-shadow:0 12px 28px rgba(0,0,0,.28);color:#fff}
.tile.featured .lb{color:#fff}
.tile.featured:hover{box-shadow:0 16px 34px rgba(0,0,0,.32)}
@media (max-width:768px){.admin-hero{align-items:flex-start;flex-direction:column;padding:18px}.hero-action{width:100%;text-align:center}.tiles{grid-template-columns:repeat(3,1fr);gap:10px}.tile{padding:18px 8px;min-height:108px;border-radius:18px}.tile .ic{font-size:26px}.tile .lb{font-size:13px}}

/* Auth pages */
.auth-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#6366f1,#8b5cf6,#ec4899);padding:20px}
.auth-card{background:rgba(255,255,255,.98);backdrop-filter:blur(20px);padding:40px;border-radius:20px;box-shadow:0 20px 60px rgba(0,0,0,.3);width:100%;max-width:420px}
.auth-card h1{font-size:26px;margin-bottom:6px;text-align:center}
.auth-card .sub{color:var(--muted);text-align:center;margin-bottom:24px;font-size:14px}
.auth-card .btn{width:100%;justify-content:center;padding:12px}
.auth-card .link{text-align:center;margin-top:16px;font-size:14px}

/* Landing */
.hero{min-height:100vh;background:linear-gradient(135deg,#0f172a 0%,#1e1b4b 50%,#4c1d95 100%);color:#fff;display:flex;align-items:center;justify-content:center;text-align:center;padding:60px 20px;position:relative;overflow:hidden}
.hero::before{content:'';position:absolute;inset:0;background:radial-gradient(circle at 20% 30%,rgba(139,92,246,.3),transparent 50%),radial-gradient(circle at 80% 70%,rgba(236,72,153,.3),transparent 50%)}
.hero-inner{position:relative;z-index:1;max-width:800px}
.hero h1{font-size:52px;font-weight:800;margin-bottom:16px;background:linear-gradient(135deg,#fff,#c7d2fe);-webkit-background-clip:text;-webkit-text-fill-color:transparent;line-height:1.15}
.hero p{font-size:18px;color:#cbd5e1;margin-bottom:30px}
.hero .btn{padding:14px 28px;font-size:16px;margin:0 6px}
.features{padding:60px 20px;max-width:1100px;margin:0 auto}
.features h2{text-align:center;font-size:32px;margin-bottom:40px}
.feat{background:#fff;padding:24px;border-radius:14px;box-shadow:var(--shadow);text-align:center}
.feat .icon{font-size:36px;margin-bottom:10px}
@media (max-width:768px){.hero h1{font-size:34px}.hero p{font-size:15px}}

/* NID result card */
.nid-result{background:#fff;border-radius:14px;padding:0;overflow:hidden;box-shadow:var(--shadow);margin-top:20px}
.nid-result .head{background:linear-gradient(135deg,var(--primary),var(--primary2));color:#fff;padding:16px 20px;display:flex;justify-content:space-between;align-items:center}
.nid-result .body{padding:20px}
.nid-row{display:flex;padding:9px 0;border-bottom:1px dashed #e2e8f0;font-size:14px}
.nid-row:last-child{border:none}
.nid-row .k{width:170px;color:var(--muted);font-weight:600}
.nid-row .v{flex:1;color:#0f172a}

/* Pending count badge on admin tiles */
.tile .count-badge{position:absolute;top:8px;right:10px;min-width:22px;height:22px;padding:0 7px;border-radius:999px;background:#dc2626;color:#fff;font-size:12px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;box-shadow:0 4px 10px rgba(220,38,38,.35);line-height:1;z-index:2}
.tile.featured .count-badge{box-shadow:0 4px 10px rgba(220,38,38,.55)}
