:root {
    --ink: #101828;
    --muted: #667085;
    --line: #e4e7ec;
    --panel: #ffffff;
    --soft: #f6f8fb;
    --blue: #1d4ed8;
    --teal: #0f9f8f;
    --green: #12b76a;
    --rose: #e11d48;
    --amber: #f59e0b;
    --radius: 8px;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #eef2f7; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: 0; }
a { text-decoration: none; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 270px 1fr; }
.sidebar { background: #0b1220; color: #fff; padding: 22px 18px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 1.08rem; }
.brand-mark { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 8px; background: linear-gradient(135deg, #22c55e, #2563eb); color: #fff; }
.nav-menu { margin-top: 30px; display: grid; gap: 6px; }
.nav-menu a { color: #cbd5e1; padding: 12px; border-radius: 8px; display: flex; align-items: center; gap: 12px; font-weight: 650; }
.nav-menu a:hover { background: rgba(255,255,255,.08); color: #fff; }
.main-panel { padding: 20px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.eyebrow { color: var(--teal); text-transform: uppercase; font-size: .72rem; font-weight: 800; }
.page-title { font-size: clamp(1.3rem, 2vw, 2rem); font-weight: 850; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { border: 1px solid var(--line); width: 42px; height: 42px; border-radius: 8px; background: #fff; color: var(--ink); display: inline-grid; place-items: center; }
.sidebar-toggle { display: none; }
.hero-card { background: linear-gradient(135deg, #0b1220 0%, #173b58 48%, #0f9f8f 100%); color: #fff; border-radius: var(--radius); padding: 24px; overflow: hidden; position: relative; }
.hero-card:after { content: ""; position: absolute; inset: auto -80px -120px auto; width: 260px; height: 260px; background: rgba(255,255,255,.1); transform: rotate(25deg); }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.admin-stat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat-card, .panel-card, .plan-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: 0 16px 40px rgba(16,24,40,.06); }
.stat-card .icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 8px; background: #eef6ff; color: var(--blue); margin-bottom: 12px; }
.stat-card p, .muted { color: var(--muted); }
.stat-card h3 { font-weight: 850; margin: 0; }
.content-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 16px; align-items: start; }
.panel-title { font-size: 1rem; font-weight: 800; margin-bottom: 14px; }
.table { --bs-table-bg: transparent; }
.table th { color: var(--muted); font-size: .78rem; text-transform: uppercase; }
.badge-soft { border-radius: 999px; padding: 6px 10px; font-weight: 750; background: #eef2ff; color: var(--blue); }
.badge-active { background: #ecfdf3; color: #047857; }
.badge-pending { background: #fffbeb; color: #b45309; }
.badge-rejected, .badge-inactive { background: #fff1f2; color: #be123c; }
.btn-primary { background: var(--blue); border-color: var(--blue); }
.btn-success { background: var(--green); border-color: var(--green); }
.form-control, .form-select { border-radius: 8px; min-height: 44px; }
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.plan-card { display: grid; gap: 12px; }
.plan-price { font-size: 2rem; font-weight: 900; }
.copy-box { display: flex; gap: 8px; }
.copy-box input { min-width: 0; }
.auth-body { min-height: 100vh; background: #0b1220; }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-visual { color: #fff; padding: 44px; display: flex; flex-direction: column; justify-content: center; background: linear-gradient(135deg, rgba(11,18,32,.96), rgba(15,159,143,.78)), url("https://images.unsplash.com/photo-1642790106117-e829e14a795f?auto=format&fit=crop&w=1400&q=80") center/cover; }
.auth-visual h1 { max-width: 620px; font-size: clamp(2rem, 5vw, 4.8rem); font-weight: 900; line-height: .96; margin: 42px 0 18px; }
.auth-visual p { color: #dbeafe; max-width: 560px; font-size: 1.08rem; }
.auth-card { background: #f8fafc; display: flex; flex-direction: column; justify-content: center; padding: clamp(22px, 5vw, 70px); }
.auth-card form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: 0 24px 70px rgba(2,6,23,.16); }
.auth-metrics { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.auth-metrics span { border: 1px solid rgba(255,255,255,.22); border-radius: 8px; padding: 12px 14px; background: rgba(255,255,255,.08); }
.countdown { font-variant-numeric: tabular-nums; font-weight: 850; }
.timeline-item { border-left: 3px solid #dbeafe; padding: 0 0 12px 12px; margin-bottom: 10px; display: grid; gap: 2px; }
.timeline-item span { color: var(--muted); font-size: .84rem; }
.tree-list, .tree-list ul { list-style: none; padding-left: 0; }
.tree-list ul { margin-left: 18px; border-left: 1px solid var(--line); padding-left: 14px; }
.tree-node { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
@media (max-width: 991px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: 270px; transform: translateX(-100%); transition: .2s ease; }
    .sidebar.open { transform: translateX(0); }
    .sidebar-toggle { display: inline-grid; }
    .stat-grid, .admin-stat-grid, .content-grid, .plan-grid, .auth-wrap { grid-template-columns: 1fr; }
    .auth-visual { min-height: 42vh; padding: 28px; }
}
@media (max-width: 575px) {
    .main-panel { padding: 14px; }
    .topbar { align-items: flex-start; }
    .topbar-actions { align-self: center; }
    .hero-card, .stat-card, .panel-card, .plan-card { padding: 15px; }
    .table-responsive { border: 1px solid var(--line); border-radius: var(--radius); }
    .copy-box { flex-direction: column; }
}
