/* ==========================================================================
   Flex Academy – design system
   ========================================================================== */
:root {
  --brand: #1d4ed8;
  --brand-2: color-mix(in srgb, var(--brand) 55%, #7c3aed);
  --brand-dark: color-mix(in srgb, var(--brand) 45%, #020617);
  --brand-soft: color-mix(in srgb, var(--brand) 10%, #fff);
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f6f7fb;
  --radius: 18px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.08);
  --shadow: 0 10px 30px -12px rgba(15,23,42,.18), 0 2px 6px rgba(15,23,42,.05);
  --shadow-lg: 0 30px 60px -20px rgba(15,23,42,.35);
}
html { scroll-behavior: smooth; }
body { font-family: "Plus Jakarta Sans", Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, .display-5, .display-6 { letter-spacing: -.02em; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--brand) 25%, #fff); }

/* Buttons ---------------------------------------------------------------- */
.btn { border-radius: 12px; font-weight: 600; }
.btn-lg { border-radius: 14px; padding: .8rem 1.4rem; }
.btn-sm { border-radius: 9px; }
.bg-brand { background: var(--brand) !important; }
.btn-brand { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border: 0; color: #fff; box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--brand) 70%, transparent); transition: transform .15s, box-shadow .15s, filter .15s; }
.btn-brand:hover, .btn-brand:focus { color: #fff; filter: brightness(1.07); transform: translateY(-1px); box-shadow: 0 12px 26px -10px color-mix(in srgb, var(--brand) 80%, transparent); }
.btn-outline-brand { border: 1.5px solid var(--brand); color: var(--brand); background: #fff; }
.btn-outline-brand:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-glass { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); color: #fff; backdrop-filter: blur(8px); }
.btn-glass:hover { background: rgba(255,255,255,.24); color: #fff; }
.nav-pills .nav-link.active { background: var(--brand); }

/* Forms ------------------------------------------------------------------ */
.form-control, .form-select { border-radius: 11px; border-color: #d7dde6; padding: .6rem .85rem; }
.form-control:focus, .form-select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 15%, transparent); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-label { font-weight: 600; font-size: .9rem; color: #334155; }
.card { border-radius: var(--radius); border-color: var(--line); }
.alert { border-radius: 14px; border: 0; }
.badge { font-weight: 600; letter-spacing: .01em; }

/* Navbar ----------------------------------------------------------------- */
.site-nav { background: rgba(255,255,255,.82); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid rgba(226,232,240,.8); }
.site-nav .nav-link { font-weight: 600; color: #334155; border-radius: 10px; padding: .5rem .85rem !important; }
.site-nav .nav-link:hover, .site-nav .nav-link.active { color: var(--brand); background: var(--brand-soft); }
.brand-mark { display: inline-flex; width: 38px; height: 38px; border-radius: 12px; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-size: 1.1rem; box-shadow: 0 6px 14px -6px var(--brand); }

/* Hero ------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(1200px 500px at 85% -10%, color-mix(in srgb, var(--brand-2) 85%, #fff) 0%, transparent 55%), radial-gradient(900px 500px at -10% 110%, color-mix(in srgb, var(--brand) 70%, #22d3ee) 0%, transparent 55%), linear-gradient(135deg, var(--brand-dark), var(--brand)); }
.hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(180deg, transparent, #000 40%, transparent); pointer-events: none; }
.hero > .container { position: relative; z-index: 1; }
.hero .eyebrow { display: inline-flex; gap: .5rem; align-items: center; padding: .35rem .8rem; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); font-size: .85rem; font-weight: 600; backdrop-filter: blur(6px); }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; line-height: 1.05; }
.hero .lead { opacity: .9; max-width: 560px; }
.hero-search { background: #fff; border-radius: 18px; padding: 6px; box-shadow: var(--shadow-lg); max-width: 560px; }
.hero-search .form-control { border: 0; box-shadow: none; font-size: 1.05rem; }
.hero-stats { display: flex; gap: 2rem; flex-wrap: wrap; }
.hero-stats .num { font-size: 1.8rem; font-weight: 800; line-height: 1; }
.hero-stats .lbl { font-size: .82rem; opacity: .8; }
.hero-art { position: relative; height: 340px; }
.float-card { position: absolute; background: rgba(255,255,255,.95); color: var(--ink); border-radius: 18px; padding: 14px 16px; box-shadow: var(--shadow-lg); animation: floaty 6s ease-in-out infinite; min-width: 220px; }
.float-card .ico { width: 40px; height: 40px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-size: 1.1rem; }
.float-card:nth-child(2) { animation-delay: -2s; }
.float-card:nth-child(3) { animation-delay: -4s; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.section-title { font-weight: 800; letter-spacing: -.02em; }
.section-kicker { color: var(--brand); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; }

/* Chips ------------------------------------------------------------------ */
.chip { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem 1rem; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; box-shadow: var(--shadow-sm); transition: all .15s; }
.chip:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); box-shadow: var(--shadow); }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; }
.chip .count { background: var(--bg); border-radius: 999px; padding: 0 .5rem; font-size: .78rem; color: var(--muted); }

/* Event cards ------------------------------------------------------------ */
.event-card { border: 0; border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.event-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.event-thumb { --c: var(--brand); position: relative; display: flex; align-items: center; justify-content: center; min-height: 180px; background: radial-gradient(400px 160px at 100% 0%, color-mix(in srgb, var(--c) 55%, #fff) 0%, transparent 70%), linear-gradient(135deg, color-mix(in srgb, var(--c) 85%, #0f172a), var(--c)); background-size: cover; background-position: center; color: rgba(255,255,255,.9); font-size: 2.6rem; text-decoration: none; overflow: hidden; }
.event-thumb::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.18) 1px, transparent 1px); background-size: 16px 16px; opacity: .6; }
.event-thumb.has-img::before { background: linear-gradient(180deg, transparent 50%, rgba(2,6,23,.45)); opacity: 1; }
.event-thumb > * { position: relative; }
.event-card:hover .event-thumb i { transform: scale(1.08) rotate(-4deg); }
.event-thumb i { transition: transform .3s; }
.event-thumb .badge { font-size: .72rem; }
.date-badge { position: absolute !important; left: 14px; top: 14px; background: #fff; border-radius: 12px; padding: 6px 11px; text-align: center; font-size: .72rem; text-transform: uppercase; font-weight: 700; color: var(--muted); line-height: 1.1; box-shadow: 0 6px 16px rgba(2,6,23,.18); }
.date-badge span { display: block; font-size: 1.35rem; color: var(--ink); font-weight: 800; }
.cat-label { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.meta { color: var(--muted); font-size: .86rem; display: flex; gap: .4rem; align-items: center; }
.price-tag { font-weight: 800; font-size: 1.1rem; }

/* Event page ------------------------------------------------------------- */
.event-hero { position: relative; color: #fff; background: radial-gradient(900px 400px at 90% 0%, color-mix(in srgb, var(--brand-2) 70%, #fff) 0%, transparent 60%), linear-gradient(135deg, var(--brand-dark), var(--brand)); background-size: cover; background-position: center; }
.event-hero a { color: rgba(255,255,255,.85); text-decoration: none; }
.event-hero .info-pill { display: inline-flex; gap: .5rem; align-items: center; padding: .45rem .9rem; border-radius: 999px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(6px); font-weight: 600; font-size: .92rem; }
.event-body { font-size: 1.04rem; line-height: 1.7; }
.event-body img { max-width: 100%; height: auto; border-radius: 12px; }
.booking-card { border: 0; border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.booking-card .card-body { padding: 1.6rem; }
@media (min-width: 992px) { .booking-float { margin-top: -110px; top: 90px; z-index: 2; } }
.avatar { flex: 0 0 52px; height: 52px; border-radius: 16px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.2rem; }
.agenda-item { display: flex; gap: 1rem; padding: .85rem 1rem; border-radius: 14px; background: #fff; border: 1px solid var(--line); margin-bottom: .5rem; }
.agenda-item .time { font-weight: 800; color: var(--brand); min-width: 70px; }

.empty-state { text-align: center; padding: 3.5rem 1rem; background: #fff; border: 2px dashed #dbe2ea; border-radius: var(--radius); color: var(--muted); }
.empty-state i { font-size: 2.6rem; display: block; margin-bottom: .5rem; color: #94a3b8; }

.filter-bar { background: #fff; padding: .75rem; border-radius: 16px; border: 1px solid var(--line); margin-left: 0; margin-right: 0; box-shadow: var(--shadow-sm); }
.page-banner { background: linear-gradient(135deg, var(--brand-soft), #fff); border-bottom: 1px solid var(--line); }

/* Features & CTA --------------------------------------------------------- */
.feature { background: #fff; border-radius: var(--radius); padding: 1.5rem; height: 100%; border: 1px solid var(--line); transition: transform .2s, box-shadow .2s; }
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature .ico { width: 50px; height: 50px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.35rem; color: #fff; margin-bottom: 1rem; }
.cta-band { position: relative; overflow: hidden; border-radius: 28px; color: #fff; background: radial-gradient(600px 300px at 100% 0%, color-mix(in srgb, var(--brand-2) 80%, #fff), transparent 60%), linear-gradient(135deg, var(--brand-dark), var(--brand)); box-shadow: var(--shadow-lg); }
.cta-band::after { content: "\F1DD"; font-family: bootstrap-icons; position: absolute; right: -20px; bottom: -60px; font-size: 16rem; opacity: .08; }

/* Calendar --------------------------------------------------------------- */
.calendar { grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.cal-head { background: #f8fafc; padding: .6rem; font-weight: 700; font-size: .78rem; text-align: center; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.cal-day { background: #fff; min-height: 115px; padding: .45rem; overflow: hidden; }
.cal-day.empty { background: #fafbfc; }
.cal-day.today { background: var(--brand-soft); }
.cal-day .num { font-size: .82rem; font-weight: 700; color: var(--muted); }
.cal-day.today .num { display: inline-flex; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; align-items: center; justify-content: center; }
.cal-event { display: block; font-size: .75rem; padding: 3px 7px; margin-top: 4px; border-left: 3px solid var(--brand); background: #f1f5f9; border-radius: 6px; color: var(--ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.cal-event:hover { background: #e2e8f0; }

.pay-method { transition: border-color .15s, background .15s; }
.pay-method:has(input:checked) { border-color: var(--brand) !important; background: var(--brand-soft); }
.success-icon { width: 84px; height: 84px; margin: 0 auto; border-radius: 50%; background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 2.6rem; box-shadow: 0 16px 30px -12px #16a34a; animation: pop .5s cubic-bezier(.2,1.6,.4,1); }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.field-wrap.d-none { display: none !important; }
.steps .card { border: 0; box-shadow: var(--shadow-sm); }

/* File uploads ------------------------------------------------------------- */
.upload-box { border: 2px dashed #d7dde6; border-radius: 14px; padding: .75rem; background: #fafbfc; transition: border-color .15s, background .15s; }
.upload-box.has-file { border-color: #16a34a; background: #f0fdf4; }

.cert-tile { display: flex; gap: .75rem; align-items: center; padding: .9rem 1rem; border-radius: 14px; border: 1px solid #bbf7d0; background: #f0fdf4; }

/* Attendance register ------------------------------------------------------ */
.att-row { border-left: 5px solid #e2e8f0 !important; transition: border-color .15s, background .15s; }
.att-row.is-present { border-left-color: #16a34a !important; background: #f0fdf4; }
.att-row.is-absent { border-left-color: #dc2626 !important; background: #fef2f2; }
.att-toggle .btn { min-width: 52px; }
.att-badge { display: inline-flex; align-items: center; gap: .25rem; font-size: .8rem; font-weight: 700; }

/* Footer ----------------------------------------------------------------- */
.site-footer { background: #0b1222; color: #94a3b8; }
.site-footer a { color: #cbd5e1; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer h6 { color: #fff; font-weight: 700; }

/* Reveal on scroll ------------------------------------------------------- */
.reveal-ready .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal-ready .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } .float-card, .success-icon { animation: none; } }

/* Print pages ------------------------------------------------------------ */
.print-page { background: #eef1f6; }
.ticket { display: flex; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); page-break-inside: avoid; }
.ticket-main { flex: 1; padding: 1.75rem; background: radial-gradient(400px 200px at 100% 0%, var(--brand-soft), transparent 70%); border-left: 10px solid var(--brand); }
.ticket-stub { width: 210px; padding: 1.5rem; border-left: 2px dashed #cbd5e1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.certificate-wrap { padding: 2rem 1rem; display: flex; justify-content: center; }
.certificate { width: 1000px; max-width: 100%; aspect-ratio: 1.414; background: #fff; padding: 22px; box-shadow: var(--shadow); }
.cert-inner { height: 100%; border: 6px double color-mix(in srgb, var(--brand) 70%, #b45309); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 2rem; background: radial-gradient(500px 260px at 50% 0%, var(--brand-soft), transparent 70%); }
.cert-org { font-weight: 800; text-transform: uppercase; letter-spacing: .18em; color: var(--brand); margin-bottom: 1rem; }
.cert-title { font-family: "Playfair Display", Georgia, serif; font-size: clamp(1.8rem, 4vw, 3rem); margin-bottom: 1rem; }
.cert-sub { color: var(--muted); margin: .25rem 0; }
.cert-name { font-family: "Playfair Display", Georgia, serif; font-size: clamp(1.6rem, 4vw, 2.6rem); border-bottom: 1px solid #cbd5e1; padding: 0 2rem .25rem; margin: .5rem 0 1rem; }
.cert-event { font-size: 1.4rem; font-weight: 700; margin: .25rem 0; }
.cert-footer { margin-top: auto; width: 100%; display: flex; justify-content: space-between; align-items: flex-end; padding-top: 2rem; }
.cert-line { width: 220px; border-top: 1px solid #334155; margin-bottom: .25rem; }
.invoice { box-shadow: var(--shadow); border: 0 !important; border-radius: 20px !important; }

@media (max-width: 575px) {
  .ticket { flex-direction: column; }
  .ticket-stub { width: auto; border-left: 0; border-top: 2px dashed #cbd5e1; }
}
@media print {
  .no-print { display: none !important; }
  body, .print-page { background: #fff; }
  .certificate, .ticket, .invoice { box-shadow: none; }
  @page { margin: 10mm; }
}

/* ==========================================================================
   Admin
   ========================================================================== */
.admin-body { background: #f3f5f9; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { width: 264px; flex: 0 0 264px; background: radial-gradient(400px 300px at 0% 0%, color-mix(in srgb, var(--brand) 45%, transparent), transparent 70%), #0b1222; color: #cbd5e1; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-sidebar .brand { color: #fff; text-decoration: none; font-weight: 800; font-size: 1.05rem; }
.admin-sidebar .nav-link { color: #a8b3c7; border-radius: 11px; padding: .55rem .8rem; font-size: .92rem; font-weight: 600; display: flex; align-items: center; gap: .65rem; }
.admin-sidebar .nav-link i { font-size: 1.05rem; opacity: .9; }
.admin-sidebar .nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-sidebar .nav-link.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 8px 18px -8px var(--brand); }
.admin-sidebar .nav-link .badge { margin-left: auto; }
.admin-sidebar .section { color: #5b6b84; font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; padding: 1.1rem .8rem .35rem; font-weight: 700; }
.admin-main { flex: 1; min-width: 0; }
.admin-topbar { position: sticky; top: 0; z-index: 1010; background: rgba(243,245,249,.85); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.admin-topbar .search { max-width: 380px; }
.admin-topbar .search .form-control { background: #fff; padding-left: 2.3rem; border-radius: 12px; }
.admin-topbar .search i { position: absolute; left: .85rem; top: 50%; transform: translateY(-50%); color: var(--muted); }
.icon-btn { position: relative; width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: #fff; border: 1px solid var(--line); color: #334155; font-size: 1.15rem; }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: #ef4444; border: 2px solid #fff; }
.me { display: inline-flex; align-items: center; gap: .5rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: .3rem .7rem .3rem .3rem; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; }
.avatar-sm, .avatar-lg, .me .av { display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: #fff; font-weight: 800; background: linear-gradient(135deg, var(--brand), var(--brand-2)); flex: 0 0 auto; }
.avatar-sm, .me .av { width: 32px; height: 32px; font-size: .85rem; }
.avatar-lg { width: 60px; height: 60px; border-radius: 18px; font-size: 1.5rem; }
.admin-content { padding: 1.75rem; }
.page-head { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.page-head h1 { font-size: 1.6rem; font-weight: 800; margin: 0; }
.page-head p { color: var(--muted); margin: .2rem 0 0; }
.panel { background: #fff; border-radius: var(--radius); padding: 1.35rem; box-shadow: var(--shadow-sm); border: 1px solid #eef1f5; }
.panel-title { font-size: 1.02rem; font-weight: 800; margin-bottom: 1rem; }
.empty-panel { text-align: center; color: var(--muted); padding: 3rem 1rem; }
.empty-panel i { font-size: 2.4rem; color: #94a3b8; }
.decision.focus { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); outline-offset: 2px; }
.pill-tabs .nav-link { color: #475569; font-weight: 600; border-radius: 11px; }
.pill-tabs .nav-link.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

.kpi { position: relative; overflow: hidden; background: #fff; border-radius: var(--radius); padding: 1.2rem 1.3rem; box-shadow: var(--shadow-sm); border: 1px solid #eef1f5; height: 100%; transition: transform .2s, box-shadow .2s; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi .ico { width: 44px; height: 44px; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem; color: #fff; }
.kpi .val { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: clamp(1.15rem, 1.45vw, 1.65rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin-top: .75rem; }
.kpi .lbl { color: var(--muted); font-size: .85rem; font-weight: 600; }
.kpi::after { content: ""; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; background: var(--k, var(--brand)); opacity: .07; }
.g-blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); } .g-green { background: linear-gradient(135deg, #34d399, #059669); }
.g-amber { background: linear-gradient(135deg, #fbbf24, #d97706); } .g-rose { background: linear-gradient(135deg, #fb7185, #e11d48); }
.g-violet { background: linear-gradient(135deg, #a78bfa, #7c3aed); } .g-cyan { background: linear-gradient(135deg, #22d3ee, #0891b2); }
.welcome { position: relative; overflow: hidden; border-radius: 22px; padding: 1.6rem 1.8rem; color: #fff; background: radial-gradient(500px 240px at 100% 0%, color-mix(in srgb, var(--brand-2) 80%, #fff), transparent 60%), linear-gradient(135deg, var(--brand-dark), var(--brand)); box-shadow: var(--shadow); }
.welcome::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px); background-size: 18px 18px; mask-image: linear-gradient(90deg, transparent, #000); }
.welcome > * { position: relative; z-index: 1; }
.mini-progress { height: 6px; border-radius: 99px; background: #eef2f7; overflow: hidden; }
.mini-progress > div { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.app-item { display: flex; flex-wrap: wrap; gap: .85rem; align-items: center; padding: .8rem; border-radius: 14px; border: 1px solid var(--line); margin-bottom: .6rem; background: #fffbeb; }
.app-item.todo-attendance { background: #f0fdf4; }
.todo-panel { border-left: 5px solid var(--brand); }
.role-option { cursor: pointer; transition: border-color .15s, background .15s; }
.role-option:has(input:checked) { border-color: var(--brand) !important; background: var(--brand-soft); }

.mail-off-bar { background: #b91c1c; color: #fff; padding: .55rem 1.75rem; font-weight: 600; font-size: .9rem; }
.mail-off-bar a, .mail-off-bar code { color: #fff; text-decoration: underline; }

/* Restyle Bootstrap inside admin so every page picks up the look */
.admin-content .card { border: 1px solid #eef1f5 !important; border-radius: var(--radius); box-shadow: var(--shadow-sm) !important; }
.admin-content .card-header { background: #fff; border-bottom: 1px solid #eef1f5; font-weight: 800; padding: 1rem 1.25rem; border-radius: var(--radius) var(--radius) 0 0 !important; }
.admin-content .table { --bs-table-bg: transparent; }
.admin-content .table thead th, .admin-content .table-light th { background: #f8fafc !important; color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; border-bottom: 1px solid var(--line); padding-top: .8rem; padding-bottom: .8rem; }
.admin-content .table td { border-color: #f1f4f8; padding-top: .75rem; padding-bottom: .75rem; }
.admin-content .table-hover tbody tr:hover > * { background: #f8fafc; }
.admin-content > h1.h3, .admin-content .d-flex > h1.h3 { font-weight: 800 !important; font-size: 1.6rem; }
.admin-content .nav-tabs { border-bottom: 0; gap: .25rem; }
.admin-content .nav-tabs .nav-link { border: 0; border-radius: 12px 12px 0 0; color: #475569; font-weight: 600; }
.admin-content .nav-tabs .nav-link.active { background: #fff; color: var(--ink); box-shadow: 0 -2px 0 var(--brand) inset; }
.admin-content .list-group-item.active { background: var(--brand); border-color: var(--brand); }
.table td, .table th { vertical-align: middle; }
/* Tab panes wrapped in a .card-body: Bootstrap only hides direct children of .tab-content, so hide inactive ones here too. */
.tab-content > .card-body > .tab-pane { display: none; }
.tab-content > .card-body > .tab-pane.active { display: block; }

@media (max-width: 991px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; flex: none; height: auto; position: relative; }
  .admin-content { padding: 1rem; }
}
