.admin-body { background: #f3f6fa; }
.admin-layout { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.admin-sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 16px; display: flex; flex-direction: column; background: #061d40; color: #fff; }
.admin-brand { width: 190px; height: 54px; display: block; overflow: hidden; border-radius: 8px; background: #fff; }
.admin-brand img { width: 100%; height: 100%; object-fit: cover; }
.admin-sidebar > p { margin: 12px 7px 28px; color: #8195b3; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.admin-sidebar nav { display: grid; gap: 6px; }
.admin-sidebar nav a { padding: 12px 13px; display: flex; align-items: center; gap: 11px; border-radius: 9px; color: #aebdd1; font-size: 13px; font-weight: 700; }
.admin-sidebar nav a span { width: 20px; color: #7389aa; text-align: center; }
.admin-sidebar nav a:hover, .admin-sidebar nav a.is-active { background: rgba(255,255,255,.09); color: #fff; }
.admin-sidebar nav a.is-active span { color: #f5b830; }
.admin-account { margin-top: auto; padding: 16px 12px 4px; display: grid; gap: 4px; border-top: 1px solid rgba(255,255,255,.1); }
.admin-account strong { font-size: 12px; }
.admin-account small { color: #7f91ac; font-size: 10px; overflow: hidden; text-overflow: ellipsis; }
.admin-account a { margin-top: 9px; color: #f6c75a; font-size: 11px; font-weight: 750; }
.admin-main { min-width: 0; }
.admin-topbar { height: 72px; padding: 0 32px; display: flex; align-items: center; gap: 18px; border-bottom: 1px solid #dce3ed; background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
.admin-topbar > div { display: grid; }
.admin-topbar span { color: #7b8799; font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.admin-topbar strong { color: #082a5b; font-size: 14px; }
.admin-topbar .button { margin-left: auto; }
#admin-menu-toggle { display: none; border: 0; background: transparent; color: #082a5b; font-size: 22px; }
.admin-content { max-width: 1500px; margin: 0 auto; padding: 36px; }
.admin-heading { margin-bottom: 28px; display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; }
.admin-heading .eyebrow { margin-bottom: 11px; }
.admin-heading h1 { margin: 0; color: #061d40; font-size: clamp(30px,3vw,44px); line-height: 1.08; letter-spacing: -.04em; }
.admin-heading p:not(.eyebrow) { margin: 10px 0 0; color: #647186; font-size: 13px; }
.admin-panel { margin-bottom: 24px; padding: 25px; border: 1px solid #dce3ed; border-radius: 15px; background: #fff; box-shadow: 0 8px 24px rgba(8,42,91,.045); }
.panel-heading { margin-bottom: 22px; padding-bottom: 17px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid #e5eaf1; }
.panel-heading h2 { margin: 0; color: #082a5b; font-size: 18px; }
.panel-heading p { margin: 5px 0 0; color: #778397; font-size: 11px; }
.panel-heading a { color: #245ff5; font-size: 12px; font-weight: 800; }
.stat-grid { margin-bottom: 24px; display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.stat-grid article { min-height: 140px; padding: 22px; display: grid; align-content: space-between; border: 1px solid #dce3ed; border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(8,42,91,.04); }
.stat-grid span { color: #5e6b80; font-size: 11px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.stat-grid strong { color: #082a5b; font-size: 34px; letter-spacing: -.04em; }
.stat-grid small { color: #8a95a6; font-size: 10px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 14px; border-bottom: 1px solid #dce3ed; color: #7a8798; font-size: 10px; font-weight: 850; letter-spacing: .07em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 15px 14px; border-bottom: 1px solid #edf0f4; color: #3b4a61; font-size: 12px; vertical-align: middle; }
tbody tr:hover { background: #fafbfe; }
td strong { color: #082a5b; }
.table-sub { margin-top: 4px; display: block; color: #8a95a6; font-size: 9px; }
.table-action { color: #245ff5; font-size: 11px; font-weight: 850; white-space: nowrap; }
.table-actions { display: flex; align-items: center; gap: 12px; }
.table-actions form { margin: 0; }
.status { padding: 6px 8px; display: inline-block; border-radius: 999px; background: #edf1f6; color: #526177; font-size: 9px; font-weight: 850; white-space: nowrap; }
.status-new, .status-published { background: #e8f0ff; color: #225ed2; }
.status-under-review { background: #fff5d9; color: #8c6300; }
.status-contacted { background: #ede9ff; color: #6547bd; }
.status-documents-pending { background: #fff0e3; color: #a15410; }
.status-accepted, .status-enrolled { background: #e5f7eb; color: #257547; }
.status-rejected { background: #ffeaec; color: #b5303e; }
.status-draft { background: #edf1f6; color: #647186; }
.course-table-title { min-width: 220px; display: flex; align-items: center; gap: 10px; }
.course-table-title > span { min-width: 38px; height: 38px; padding: 0 6px; display: grid; place-items: center; border-radius: 8px; background: #eaf1ff; color: #245ff5; font-size: 9px; font-weight: 900; }
.course-table-title div { display: grid; gap: 3px; }
.course-table-title small { color: #8a95a6; font-size: 9px; }
.danger-link { padding: 0; border: 0; background: transparent; color: #c43846; font-size: 11px; font-weight: 800; }
.count-badge { padding: 9px 12px; border-radius: 8px; background: #eaf1ff; color: #245ff5; font-size: 11px; font-weight: 850; }
.empty-state { padding: 50px 20px; color: #7d899a; font-size: 13px; text-align: center; }
.compact-empty { padding: 20px; }
.filter-bar { display: grid; grid-template-columns: minmax(220px,1.6fr) 1fr 1fr auto auto; align-items: end; gap: 12px; }
.filter-bar label { display: grid; gap: 6px; color: #657287; font-size: 10px; font-weight: 750; }
.filter-bar input, .filter-bar select { height: 42px; padding: 0 11px; }
.admin-form { display: grid; gap: 20px; }
.admin-form hr { width: 100%; margin: 4px 0; border: 0; border-top: 1px solid #dce3ed; }
.course-editor { display: grid; }
.stage-editor { display: grid; gap: 16px; }
.stage-editor-card { padding: 20px; border: 1px solid #dce3ed; border-radius: 13px; background: #fafbfd; }
.stage-editor-heading { margin-bottom: 17px; display: flex; align-items: center; justify-content: space-between; }
.stage-editor-heading strong { color: #082a5b; font-size: 13px; }
.sticky-save { position: sticky; bottom: 14px; z-index: 5; margin-top: 5px; padding: 15px 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid #cfd8e6; border-radius: 13px; background: rgba(255,255,255,.96); box-shadow: 0 15px 45px rgba(8,42,91,.14); backdrop-filter: blur(12px); }
.sticky-save span { color: #667389; font-size: 11px; }
.application-admin-grid { display: grid; grid-template-columns: 1fr 350px; gap: 24px; align-items: start; }
.application-admin-grid aside { position: sticky; top: 25px; }
.detail-grid { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 22px 30px; }
.detail-grid div { min-width: 0; }
.detail-full { grid-column: 1 / -1; }
.detail-grid dt { margin-bottom: 5px; color: #7a8798; font-size: 9px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.detail-grid dd { margin: 0; color: #26364e; font-size: 12px; line-height: 1.55; overflow-wrap: anywhere; }
.detail-grid dd a { color: #245ff5; }
.document-list { display: grid; gap: 10px; }
.document-list a { padding: 13px 15px; display: flex; align-items: center; gap: 12px; border: 1px solid #dce3ed; border-radius: 10px; }
.document-list a:hover { border-color: #245ff5; background: #f8faff; }
.document-list a > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 8px; background: #eaf1ff; color: #245ff5; font-weight: 900; }
.document-list div { display: grid; gap: 3px; }
.document-list strong { color: #082a5b; font-size: 11px; }
.document-list small { color: #8792a3; font-size: 9px; }
.decision-panel { display: grid; gap: 17px; }
.decision-panel h2 { margin: 0; color: #082a5b; font-size: 18px; }
.danger-zone { padding: 20px; border: 1px solid #f0c4c9; border-radius: 13px; background: #fff6f7; }
.danger-zone strong { color: #9d2632; font-size: 12px; }
.danger-zone p { margin: 5px 0 14px; color: #a2636a; font-size: 10px; }
.danger-button { padding: 9px 12px; border: 1px solid #d64957; border-radius: 7px; background: #fff; color: #bd2e3d; font-size: 10px; font-weight: 850; }

.login-body, .setup-shell { min-height: 100vh; background: linear-gradient(140deg,#edf3ff,#f9fbff 55%,#fff2df); }
.login-shell, .setup-shell { min-height: 100vh; padding: 35px 20px; display: grid; place-items: center; }
.login-card, .setup-card { width: min(100%, 460px); padding: 38px; border: 1px solid #dce3ed; border-radius: 20px; background: #fff; box-shadow: 0 25px 80px rgba(8,42,91,.15); }
.setup-card { width: min(100%, 800px); }
.login-card > a:first-child, .setup-card > img { width: 230px; height: 70px; margin-bottom: 25px; display: block; overflow: hidden; }
.login-card > a:first-child img, .setup-card > img { width: 100%; height: 100%; object-fit: cover; }
.login-card h1, .setup-card h1 { margin: 0 0 8px; color: #061d40; font-size: 35px; letter-spacing: -.04em; }
.login-card .muted, .setup-card .muted { margin: 0 0 25px; font-size: 12px; line-height: 1.6; }
.back-link { margin-top: 20px; display: block; color: #657287; font-size: 11px; text-align: center; }

@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .application-admin-grid { grid-template-columns: 1fr; }
  .application-admin-grid aside { position: static; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .admin-layout { display: block; }
  .admin-sidebar { position: fixed; z-index: 50; width: 250px; transform: translateX(-105%); transition: transform .2s ease; box-shadow: 15px 0 40px rgba(0,0,0,.18); }
  .admin-sidebar.is-open { transform: translateX(0); }
  #admin-menu-toggle { display: block; }
  .admin-topbar { padding: 0 18px; }
  .admin-topbar .button { display: none; }
  .admin-content { padding: 26px 18px; }
  .admin-heading { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 600px) {
  .stat-grid, .detail-grid, .filter-bar { grid-template-columns: 1fr; }
  .admin-panel { padding: 18px; }
  .detail-full { grid-column: auto; }
  .sticky-save { align-items: stretch; flex-direction: column; }
  .sticky-save .button { width: 100%; }
  .login-card, .setup-card { padding: 28px 20px; }
}

