:root {
  --brand: #4338ca;
  --brand-dark: #3730a3;
  --sidebar-w: 250px;
  --bg: #f4f6f8;
}
body { background: var(--bg); font-family: 'Inter', system-ui, -apple-system, sans-serif; font-size: .925rem; }
.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover, .btn-brand:focus { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.text-brand { color: var(--brand) !important; }

/* Sidebar */
.sidebar { width: var(--sidebar-w); background: #14123a; position: fixed; inset: 0 auto 0 0; overflow-y: auto; z-index: 1040; transition: transform .2s; }
.sidebar .brand { color: #fff; font-weight: 700; font-size: 1.1rem; padding: 1.1rem 1.25rem; display: flex; gap: .6rem; align-items: center; text-decoration: none; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar .brand i { background: var(--brand); border-radius: .5rem; padding: .25rem .45rem; }
.sidebar .nav-section { color: rgba(255,255,255,.4); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; padding: 1rem 1.25rem .35rem; }
.sidebar .nav-link { color: rgba(255,255,255,.75); padding: .55rem 1.25rem; display: flex; gap: .7rem; align-items: center; border-left: 3px solid transparent; }
.sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.04); }
.sidebar .nav-link.active { color: #fff; background: rgba(99,102,241,.3); border-left-color: #a5b4fc; }
.sidebar .nav-link .badge { margin-left: auto; }
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { background: #fff; border-bottom: 1px solid #e5e8eb; padding: .6rem 1.5rem; position: sticky; top: 0; z-index: 1030; }
.content { padding: 1.5rem; flex: 1; }
@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.show { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .main { margin-left: 0; }
  .content { padding: 1rem; }
}

/* Cards */
.card { border: 1px solid #e5e8eb; border-radius: .75rem; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card-header { background: #fff; border-bottom: 1px solid #eef0f2; font-weight: 600; padding: .85rem 1.1rem; border-radius: .75rem .75rem 0 0 !important; }
.stat-card .icon { width: 44px; height: 44px; border-radius: .6rem; display: grid; place-items: center; font-size: 1.25rem; }
.stat-card .value { font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.stat-card .label { color: #6b7280; font-size: .8rem; }
.table > :not(caption) > * > * { padding: .65rem .75rem; }
.table thead th { font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; color: #6b7280; background: #f9fafb; font-weight: 600; white-space: nowrap; }
.dl-grid { display: grid; grid-template-columns: 160px 1fr; gap: .4rem 1rem; margin: 0; }
.dl-grid dt { color: #6b7280; font-weight: 500; }
.dl-grid dd { margin: 0; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 1rem 1.4rem; border-left: 2px solid #e5e8eb; margin-left: .4rem; }
.timeline li:last-child { border-left-color: transparent; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--brand); border: 2px solid #fff; box-shadow: 0 0 0 1px var(--brand); }

/* Auth */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-hero { background: linear-gradient(135deg, #14123a, #4338ca); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; }
.auth-form { display: grid; place-items: center; padding: 2rem; background: #fff; }
@media (max-width: 767.98px) { .auth-wrap { grid-template-columns: 1fr; } .auth-hero { display: none; } }
.form-label { font-weight: 500; font-size: .85rem; }
.required::after { content: ' *'; color: #dc3545; }
.table td.text-end, .table th.text-end { white-space: nowrap; }

/* Public site */
.pub-nav { background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid #eceef3; }
.pub-nav .navbar-brand { font-weight: 800; color: var(--brand); }
.hero { background: radial-gradient(1200px 500px at 85% -10%, #c7d2fe 0, transparent 60%), linear-gradient(180deg, #f5f6ff, #fff); padding: 5rem 0 4rem; }
.hero h1 { font-weight: 800; letter-spacing: -.02em; }
.section { padding: 4rem 0; }
.section-title { font-weight: 800; letter-spacing: -.01em; }
.step-num { width: 42px; height: 42px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 700; }
.feature-icon { width: 48px; height: 48px; border-radius: .75rem; background: #eef2ff; color: var(--brand); display: grid; place-items: center; font-size: 1.4rem; }
.pub-footer { background: #14123a; color: rgba(255,255,255,.7); }
.pub-footer a { color: rgba(255,255,255,.85); }
