/* ==========================================================================
   Admissions pages (dashboard, apply wizard, my applications, details)
   Mobile-first: single column by default, enhanced from 768px up.
   Uses the shared --ds-* tokens from stm-design.css.
   ========================================================================== */

/* ---------- hero extras ---------- */
.adm-pill {
    display: inline-flex; align-items: center; gap: .55rem; padding: .38rem .9rem; margin-bottom: .8rem; border-radius: 999px;
    font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
    background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28); color: #fff;
}
.adm-pill .dot { width: 9px; height: 9px; border-radius: 50%; position: relative; background: #4ade80; }
.adm-pill.open .dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #4ade80; animation: adm-ping 1.8s cubic-bezier(0, 0, .2, 1) infinite; }
.adm-pill.closed .dot { background: #fbbf24; }
@keyframes adm-ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }
.adm-hero .hero-text h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
.adm-hero .hero-actions .btn { min-width: 210px; }

.adm-countdown { flex-basis: 100%; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: .4rem; padding-top: 1.1rem; border-top: 1px solid rgba(255, 255, 255, .2); }
.adm-countdown .cd-label { font-weight: 600; font-size: .95rem; color: rgba(255, 255, 255, .9); }
.cd-boxes { display: flex; gap: .55rem; }
.cd-box { min-width: 64px; padding: .5rem .5rem .4rem; text-align: center; border-radius: 14px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); }
.cd-box b { display: block; font-size: 1.5rem; line-height: 1.1; font-variant-numeric: tabular-nums; color: #fff; }
.cd-box small { font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .78) !important; }

/* ---------- cards ---------- */
.adm-card .section-title { font-size: 1.1rem; margin-bottom: 1.1rem; }
.adm-muted { color: var(--ds-muted) !important; }
.adm-grid { display: grid; gap: 1.5rem; }
@media (min-width: 992px) { .adm-grid.with-side { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; } }

/* ---------- how it works ---------- */
.adm-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; counter-reset: step; }
.adm-steps li { position: relative; display: flex; gap: 1rem; align-items: flex-start; }
.adm-steps .n {
    flex: none; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; color: #fff;
    background: var(--ds-grad-btn); box-shadow: 0 8px 18px rgba(13, 71, 161, .28); position: relative; z-index: 1;
}
.adm-steps li:not(:last-child)::before { content: ""; position: absolute; left: 21px; top: 44px; bottom: -1.1rem; width: 2px; background: repeating-linear-gradient(180deg, var(--ds-accent) 0 6px, transparent 6px 12px); opacity: .5; }
.adm-steps h3 { font-size: 1rem; font-weight: 700; margin: .1rem 0 .15rem; color: var(--ds-title); }
.adm-steps p { margin: 0; font-size: .9rem; color: var(--ds-muted); }
body.dark-mode .adm-steps h3 { color: #fff !important; }
body.dark-mode .adm-steps p { color: rgba(255, 255, 255, .7) !important; }
@media (min-width: 768px) {
    .adm-steps { grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
    .adm-steps li { flex-direction: column; gap: .8rem; }
    .adm-steps li:not(:last-child)::before { left: 52px; right: -1.25rem; top: 21px; bottom: auto; width: auto; height: 2px; background: repeating-linear-gradient(90deg, var(--ds-accent) 0 6px, transparent 6px 12px); }
}

/* ---------- application cards + tracker ---------- */
.app-card { position: relative; padding: 1.2rem; border-radius: 18px; background: var(--ds-soft); border: 1px solid var(--ds-border); border-left: 5px solid #f59e0b; }
.app-card.status-approved { border-left-color: #16a34a; }
.app-card.status-rejected { border-left-color: #dc2626; }
.app-card + .app-card { margin-top: 1rem; }
.app-top { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.app-top h3 { margin: 0 0 .2rem; font-size: 1.1rem; font-weight: 700; color: var(--ds-title); word-break: break-word; }
body.dark-mode .app-top h3 { color: #fff !important; }
.app-meta { margin: 0; font-size: .82rem; color: var(--ds-muted); }
body.dark-mode .app-meta { color: rgba(255, 255, 255, .65) !important; }
.app-badge { display: inline-flex; align-items: center; gap: .4rem; padding: .4rem .85rem; border-radius: 999px; font-size: .78rem; font-weight: 800; letter-spacing: .04em; }
.app-badge.pending { background: #fef3c7; color: #92400e !important; }
.app-badge.approved { background: #dcfce7; color: #166534 !important; }
.app-badge.rejected { background: #fee2e2; color: #991b1b !important; }
body.dark-mode .app-badge.pending { background: rgba(251, 191, 36, .18); color: #fcd34d !important; }
body.dark-mode .app-badge.approved { background: rgba(74, 222, 128, .18); color: #86efac !important; }
body.dark-mode .app-badge.rejected { background: rgba(248, 113, 113, .18); color: #fca5a5 !important; }

.track { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; align-items: flex-start; }
.track li { flex: 1; position: relative; text-align: center; }
.track li:not(:last-child)::after { content: ""; position: absolute; top: 17px; left: calc(50% + 22px); right: calc(-50% + 22px); height: 3px; border-radius: 3px; background: var(--ds-border); }
body.dark-mode .track li:not(:last-child)::after { background: rgba(255, 255, 255, .18); }
.track li.done:not(:last-child)::after { background: linear-gradient(90deg, #22c55e, #4ade80); }
.track span { width: 36px; height: 36px; margin: 0 auto .4rem; border-radius: 50%; display: grid; place-items: center; font-size: .95rem; background: var(--ds-surface); border: 2px solid var(--ds-border); color: var(--ds-muted); position: relative; z-index: 1; }
body.dark-mode .track span { background: #0f2447; border-color: rgba(255, 255, 255, .25); color: rgba(255, 255, 255, .6); }
.track li.done span { background: #16a34a; border-color: #16a34a; color: #fff; }
.track li.done.bad span { background: #dc2626; border-color: #dc2626; }
.track li.active span { border-color: #f59e0b; color: #d97706; background: #fffbeb; animation: adm-pulse 2s ease-in-out infinite; }
body.dark-mode .track li.active span { background: rgba(251, 191, 36, .15); color: #fcd34d; border-color: #fbbf24; }
@keyframes adm-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, .45); } 50% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); } }
.track em { font-style: normal; font-size: .75rem; font-weight: 700; color: var(--ds-muted); }
body.dark-mode .track em { color: rgba(255, 255, 255, .7) !important; }
.track li.done em, .track li.active em { color: var(--ds-title); }
body.dark-mode .track li.done em, body.dark-mode .track li.active em { color: #fff !important; }

.app-note { display: flex; gap: .7rem; align-items: flex-start; padding: .85rem 1rem; border-radius: 14px; font-size: .9rem; margin-bottom: 1rem; background: rgba(25, 118, 210, .08); color: var(--ds-text); }
.app-note i { font-size: 1.15rem; margin-top: .1rem; color: var(--ds-accent); }
body.dark-mode .app-note { background: rgba(255, 255, 255, .07); color: rgba(255, 255, 255, .88) !important; }
.app-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.app-actions .btn { flex: 1 1 auto; }
@media (min-width: 576px) { .app-actions .btn { flex: 0 0 auto; } }

/* ---------- requirements checklist ---------- */
.adm-check-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .55rem; }
.adm-check { display: flex; align-items: center; gap: .8rem; padding: .75rem .9rem; border-radius: 14px; background: var(--ds-soft); border: 1px solid transparent; cursor: pointer; transition: background .2s, border-color .2s; min-height: 48px; }
.adm-check:hover { background: var(--ds-soft-hover); }
.adm-check input { position: absolute; opacity: 0; pointer-events: none; }
.adm-check .box { flex: none; width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--ds-input-border); display: grid; place-items: center; color: transparent; transition: all .2s; background: var(--ds-surface); }
body.dark-mode .adm-check .box { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .4); }
.adm-check input:checked + .box { background: #16a34a; border-color: #16a34a; color: #fff; }
.adm-check input:focus-visible + .box { outline: 3px solid rgba(25, 118, 210, .45); outline-offset: 2px; }
.adm-check .lbl { flex: 1; font-size: .95rem; font-weight: 500; color: var(--ds-text); }
body.dark-mode .adm-check .lbl { color: #fff !important; }
.adm-check input:checked ~ .lbl { text-decoration: line-through; opacity: .6; }
.adm-progress-text { font-size: .85rem; font-weight: 700; color: var(--ds-muted); margin: 0 0 .5rem; display: flex; justify-content: space-between; }
body.dark-mode .adm-progress-text { color: rgba(255, 255, 255, .7) !important; }

/* ---------- staff ---------- */
.adm-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; margin-bottom: 1.2rem; }
@media (min-width: 768px) { .adm-stats { grid-template-columns: repeat(4, 1fr); } }
.adm-stat { padding: 1rem; border-radius: 16px; background: var(--ds-soft); border: 1px solid var(--ds-border); }
.adm-stat b { display: block; font-size: 1.8rem; line-height: 1.1; font-weight: 800; color: var(--ds-title); }
body.dark-mode .adm-stat b { color: #fff !important; }
.adm-stat span { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ds-muted); }
body.dark-mode .adm-stat span { color: rgba(255, 255, 255, .65) !important; }
.adm-stat.pending b { color: #d97706; } .adm-stat.approved b { color: #16a34a; } .adm-stat.rejected b { color: #dc2626; }
body.dark-mode .adm-stat.pending b { color: #fcd34d !important; } body.dark-mode .adm-stat.approved b { color: #86efac !important; } body.dark-mode .adm-stat.rejected b { color: #fca5a5 !important; }
.adm-window { font-size: .9rem; margin-bottom: 1rem; color: var(--ds-text); }
body.dark-mode .adm-window { color: rgba(255, 255, 255, .85) !important; }

/* ---------- contact block ---------- */
.adm-contact { display: grid; gap: .6rem; }
.adm-contact a { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; border-radius: 14px; text-decoration: none; background: var(--ds-soft); color: var(--ds-title); font-weight: 600; font-size: .92rem; min-height: 50px; transition: background .2s, transform .2s; word-break: break-all; }
body.dark-mode .adm-contact a { color: #fff !important; }
.adm-contact a:hover { background: var(--ds-soft-hover); transform: translateY(-2px); }
.adm-contact i { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: var(--ds-grad-btn); }

/* ---------- closed / empty states ---------- */
.adm-empty { text-align: center; padding: 2.2rem 1.2rem; }
.adm-empty .ic { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 1.1rem; display: grid; place-items: center; font-size: 2.3rem; color: var(--ds-accent); background: color-mix(in srgb, var(--ds-accent) 14%, transparent); }
.adm-empty h3 { font-weight: 800; font-size: 1.35rem; color: var(--ds-title); }
body.dark-mode .adm-empty h3 { color: #fff !important; }
.adm-empty p { max-width: 46ch; margin: .4rem auto 1.4rem; color: var(--ds-muted); }
body.dark-mode .adm-empty p { color: rgba(255, 255, 255, .75) !important; }

/* ---------- sticky call-to-action (phones) ---------- */
.adm-sticky {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 9980; padding: .7rem 1rem calc(.7rem + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .92); border-top: 1px solid var(--ds-border); box-shadow: 0 -12px 30px rgba(10, 45, 92, .16);
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
body.dark-mode .adm-sticky { background: rgba(10, 26, 58, .92); }
body.has-sticky-cta { padding-bottom: calc(84px + env(safe-area-inset-bottom)) !important; }
body.has-sticky-cta #stm-toasts { bottom: calc(92px + env(safe-area-inset-bottom)); }
body.has-sticky-cta #stm-top { bottom: calc(92px + env(safe-area-inset-bottom)); }
@media (min-width: 768px) { .adm-sticky { display: none !important; } body.has-sticky-cta { padding-bottom: 0 !important; } body.has-sticky-cta #stm-toasts, body.has-sticky-cta #stm-top { bottom: 20px; } }

/* ---------- detail page ---------- */
.det-grid { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .det-grid { grid-template-columns: repeat(2, 1fr); } }
.det-item { padding: .9rem 1rem; border-radius: 14px; background: var(--ds-soft); }
.det-item small { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ds-muted) !important; margin-bottom: .2rem; }
.det-item p { margin: 0; font-weight: 600; font-size: 1rem; color: var(--ds-title); word-break: break-word; }
body.dark-mode .det-item p { color: #fff !important; }
.det-item a { color: var(--ds-link); text-decoration: none; }
.doc-tile { display: flex; align-items: center; gap: .9rem; padding: 1rem; border-radius: 16px; background: var(--ds-soft); flex-wrap: wrap; }
.doc-tile .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; background: rgba(220, 38, 38, .12); color: #dc2626; flex: none; }
.doc-tile .txt { flex: 1; min-width: 150px; }
.doc-tile .txt b { display: block; color: var(--ds-title); }
body.dark-mode .doc-tile .txt b { color: #fff !important; }

/* ---------- application wizard (inside the modal) ---------- */
.wiz-head { margin-bottom: 1.4rem; }
.wiz-steps { list-style: none; margin: 0 0 .8rem; padding: 0; display: flex; justify-content: space-between; gap: .5rem; }
.wiz-steps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .35rem; text-align: center; }
.wiz-steps span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: .9rem; background: rgba(25, 118, 210, .12); color: var(--ds-link); border: 2px solid transparent; transition: all .25s; }
.wiz-steps em { font-style: normal; font-size: .72rem; font-weight: 700; color: #6b7a90; }
body.dark-mode .wiz-steps em { color: rgba(255, 255, 255, .65) !important; }
body.dark-mode .wiz-steps span { background: rgba(255, 255, 255, .1); color: #cfe4ff; }
.wiz-steps li.active span { background: var(--ds-grad-btn); color: #fff; box-shadow: 0 6px 16px rgba(13, 71, 161, .35); }
.wiz-steps li.active em { color: #0d47a1; }
body.dark-mode .wiz-steps li.active em { color: #fff !important; }
.wiz-steps li.done span { background: #16a34a; color: #fff; }
.wiz-bar { height: 5px; border-radius: 5px; background: rgba(25, 118, 210, .14); overflow: hidden; }
.wiz-bar i { display: block; height: 100%; width: 0; border-radius: 5px; background: linear-gradient(90deg, #1976d2, #42a5f5); transition: width .35s ease; }
.wiz-step { display: none; border: 0; margin: 0; padding: 0; min-width: 0; }
.wiz-step.active { display: block; animation: wiz-in .35s ease both; }
@keyframes wiz-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.wiz-step legend { font-size: 1.15rem; font-weight: 800; color: var(--ds-title); margin-bottom: .2rem; float: none; padding: 0; }
body.dark-mode .wiz-step legend { color: #fff !important; }
.wiz-step .hint { font-size: .88rem; color: var(--ds-muted); margin-bottom: 1.1rem; }
body.dark-mode .wiz-step .hint { color: rgba(255, 255, 255, .7) !important; }
.wiz-actions { display: flex; gap: .7rem; margin-top: 1.5rem; }
.wiz-actions .btn { flex: 1; min-height: 50px; }
.wiz-actions [hidden] { display: none !important; }
.wiz-review { margin: 0 0 1rem; display: grid; gap: .5rem; }
.wiz-review div { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem .85rem; border-radius: 12px; background: var(--ds-soft); font-size: .88rem; }
.wiz-review dt { font-weight: 600; color: var(--ds-muted); margin: 0; }
.wiz-review dd { margin: 0; font-weight: 700; text-align: right; word-break: break-word; color: var(--ds-title); }
body.dark-mode .wiz-review dt { color: rgba(255, 255, 255, .65) !important; }
body.dark-mode .wiz-review dd { color: #fff !important; }
.wiz-note { font-size: .82rem; color: var(--ds-muted); }
body.dark-mode .wiz-note { color: rgba(255, 255, 255, .65) !important; }

/* full-screen application form on phones */
@media (max-width: 575.98px) {
    .stm-modal .modal-dialog.modal-fullscreen-sm-down .modal-content { border-radius: 0; }
    .stm-modal .modal-fullscreen-sm-down .modal-body { padding: 1.25rem 1.1rem; }
    .stm-modal .modal-fullscreen-sm-down .wiz-actions { position: sticky; bottom: -1.25rem; margin: 1.2rem -1.1rem -1.25rem; padding: .85rem 1.1rem calc(.85rem + env(safe-area-inset-bottom)); background: var(--bs-modal-bg, #fff); border-top: 1px solid var(--ds-border); }
    body.dark-mode .stm-modal .modal-fullscreen-sm-down .wiz-actions { background: #0f2447; }
}
@media (prefers-reduced-motion: reduce) {
    .adm-pill.open .dot::after, .track li.active span, .wiz-step.active { animation: none; }
}
