/* Stage 1: retained original Tailwind styling; additive refinements only */
.stage1-sticky-actions{position:sticky;top:4rem;z-index:25}
.stage1-order-item{cursor:grab;user-select:none}
.stage1-order-item:active{cursor:grabbing}
.stage1-drop-zone:hover,.stage1-drop-zone:focus-within{background:#eef2ff;border-color:#6366f1}
.stage1-filter-bar :is(input,select){min-width:0;width:100%;background:white;color:#1e293b}
#adm-tests-list{overscroll-behavior:contain;scrollbar-gutter:stable}
#stage1-bulk-preview:empty{display:none}
@media(max-width:640px){.stage1-sticky-actions{top:4rem}#adm-tests-list{max-height:490px}}
@media print{.stage1-sticky-actions,#stage1-bulk-panel{display:none!important}}

.stage1-tab{border:1px solid #cbd5e1;background:#f8fafc;border-radius:0.65rem;padding:.65rem .8rem;font-weight:800;color:#334155;transition:background .15s}
.stage1-tab:hover{background:#e0e7ff}
.stage1-tab-active{background:#312e81;color:#fff;border-color:#312e81}
#stage1-admin-tabs{position:sticky;top:4rem;background:#fff;z-index:27;padding-top:.7rem;scroll-margin-top:4rem}

/* Stage 1 revision: Modern Academic Blue (Option B) */
:root{--fp-blue:#2256b2;--fp-deep:#173b72;--fp-sky:#e9f2ff;--fp-gold:#d08b23;--fp-ink:#142a49}
body{background:#f4f8fe!important;color:var(--fp-ink)}
header{background:var(--fp-deep)!important;border-color:#365d93!important}
header .bg-white\/95{background:#0b1830!important;border:1px solid #2f4d78!important;box-shadow:0 0 0 1px rgba(255,255,255,.08)!important;padding:.1rem!important}
#main-site-logo{mix-blend-mode:screen;filter:contrast(1.15) brightness(1.22);height:2.25rem!important;max-height:2.25rem}
#view-admin>div{border-radius:1.1rem}
#view-admin h3,#view-admin h4{letter-spacing:-.01em}
#view-admin .stage2-top-actions{box-shadow:0 8px 28px rgba(23,59,114,.08);top:calc(4rem + 3.3rem);z-index:26}
.stage2-primary{background:var(--fp-blue)!important;border:1px solid #204f9c!important;color:white!important;transition:background .16s}
.stage2-primary:hover{background:#18458e!important}
#stage1-admin-tabs{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;overscroll-behavior-x:contain;white-space:nowrap;gap:.5rem;scrollbar-width:thin;border-bottom-color:#d6e5fa;background:#f8fbff;top:4rem;z-index:28}
#stage1-admin-tabs .stage1-tab{flex:none;white-space:nowrap;border-color:#c7daf6;background:white;color:#244675}
#stage1-admin-tabs .stage1-tab-active{background:var(--fp-blue);border-color:var(--fp-blue);color:white;box-shadow:0 3px 12px rgba(34,86,178,.17)}
.stage2-explorer-panel{background:linear-gradient(160deg,#fff,#f9fcff)}
.stage2-curriculum-tree{scrollbar-color:#98b7e1 #eef5ff}
.stage2-curriculum-tree details{border-left:2px solid #c4d8f6;margin-left:.55rem;padding-left:.7rem;margin-top:.5rem}
.stage2-curriculum-tree .stage2-root{border-color:#82a8e0;margin:.35rem 0;padding:.5rem .4rem .5rem .75rem;background:white;border-radius:8px}
.stage2-curriculum-tree summary{cursor:pointer;padding:.3rem .25rem;line-height:1.7}
.stage2-curriculum-tree summary:hover{background:#ebf3ff;border-radius:6px}
.stage2-count{float:right;font-size:10px;color:#64748b;font-weight:500;padding-right:.5rem}
.stage2-tree-node{display:block;width:100%;text-align:left;padding:.4rem .65rem;border-radius:7px;font-size:11px;color:#315b92;background:transparent;margin:.15rem 0}
.stage2-tree-node:hover,.stage2-tree-node:focus{background:#dbeaff;outline:2px solid #b7d2fa}
.stage2-tree-node.stage2-current{background:#e9f2ff;border:1px solid #7ea7e5;font-weight:700}
.stage2-tree-leaf{margin-left:.6rem}
.stage2-selection{padding:.5rem .8rem;background:#e9f2ff;border-radius:8px;color:#1b457f;font-weight:700;max-width:100%;overflow-wrap:anywhere}
#stage2-advanced-editor summary{padding:.55rem}
#stage1-bulk-preview{max-height:440px;overflow:auto}
#stage1-bulk-preview td{vertical-align:top;min-width:100px}
#stage1-bulk-preview td:first-child{min-width:140px}
#stage1-bulk-preview td:nth-child(2){min-width:220px}
#stage1-bulk-status{overflow-wrap:anywhere}
#view-courses .bg-indigo-600,#view-admin .bg-indigo-600,#view-subjects .bg-indigo-600,#view-series .bg-indigo-600{background:var(--fp-blue)!important}
#view-courses .bg-indigo-600:hover,#view-admin .bg-indigo-600:hover{background:#18458e!important}
@media(max-width:640px){
  #stage1-admin-tabs{margin-left:-.25rem;margin-right:-.25rem;padding-bottom:.65rem}
  #stage1-admin-tabs .stage1-tab{padding:.6rem .9rem}
  #view-admin .stage2-top-actions{top:calc(4rem + 3.35rem);gap:.7rem}
  #view-admin .stage2-top-actions button{padding:.55rem .85rem}
  .stage2-count{float:none;display:inline;margin-left:.25rem}
  .stage2-curriculum-tree details{margin-left:.25rem;padding-left:.5rem}
}
