/* GCBS brand kit: institutional RGB mark, Royal Blue, Imperial Gold and Lato. */
@font-face { font-family:Lato; src:url("fonts/Lato-Regular.ttf") format("truetype"); font-weight:400; font-display:swap; }
@font-face { font-family:Lato; src:url("fonts/Lato-Semibold.ttf") format("truetype"); font-weight:600; font-display:swap; }
@font-face { font-family:Lato; src:url("fonts/Lato-Bold.ttf") format("truetype"); font-weight:700; font-display:swap; }
@font-face { font-family:Lato; src:url("fonts/Lato-Heavy.ttf") format("truetype"); font-weight:800; font-display:swap; }
@font-face { font-family:"DDC Uchen"; src:url("fonts/DDC_Uchen.ttf") format("truetype"); unicode-range:U+0F00-0FFF; font-display:swap; }

:root {
    --gcbs-blue:#002789; --gcbs-gold:#A07A43; --gcbs-white:#fff;
    --ink:#172443; --muted:#495674; --line:#CED6E5; --pale:#F2F5FB; --tint:#E6EBF5;
    --canvas:min(1200px, calc(100% - 40px)); --radius:8px;
    --brand-font:Lato,"DDC Uchen",Arial,sans-serif;
    --bs-body-font-family:var(--brand-font); --bs-body-color:var(--ink); --bs-body-bg:var(--pale);
    --bs-primary:#002789; --bs-primary-rgb:0,39,137; --bs-link-color:#002789; --bs-link-color-rgb:0,39,137;
}
.rp-screen, .rp-screen * { box-sizing:border-box; }
body.rp-screen { display:block; min-height:100vh; margin:0; padding:0 0 36px; color:var(--ink); background:var(--pale) !important; font:400 16px/1.5 var(--brand-font); }
.rp-screen [hidden] { display:none !important; }
.rp-screen :is(input,select,textarea,button) { font-family:var(--brand-font); }
.rp-screen :focus-visible { outline:3px solid var(--gcbs-blue); outline-offset:3px; }
.rp-screen a { color:var(--gcbs-blue); }
.rp-screen :lang(dz) { font-family:"DDC Uchen",Lato,sans-serif; }

.portal-header { position:relative; z-index:20; width:100%; margin:0 0 24px; border-top:4px solid var(--gcbs-blue); background:white; color:var(--ink); font:400 16px/1.5 var(--brand-font); }
.portal-header a { margin:0; text-decoration:none; text-align:left; }
.portal-identity, .portal-heading h1 { width:var(--canvas); margin-inline:auto; }
.portal-identity, .portal-brand, .portal-account { display:flex; align-items:center; }
.portal-identity { justify-content:space-between; gap:12px; min-height:92px; padding-block:5px; }
.rp-screen .portal-brand { gap:19px; color:var(--gcbs-blue); font-size:20px; font-weight:800; }
.portal-brand img { display:block; flex:none; width:auto; height:82px; margin:0; padding:0; border:0; border-radius:0; box-shadow:none; object-fit:contain; }
.portal-brand span { border-left:1px solid var(--gcbs-gold); padding:3px 0 3px 20px; }
.portal-account { gap:20px; color:var(--muted); font-size:14px; font-weight:600; }
.portal-account a, .portal-mobile-account a { text-decoration:underline; text-underline-offset:3px; }
.portal-mobile-account, .portal-toggle { display:none; }
.portal-nav { display:flex; align-items:center; flex-wrap:wrap; gap:3px; padding:2px max(20px,calc((100% - 1200px)/2)); background:var(--gcbs-blue); border-bottom:3px solid var(--gcbs-gold); }
.portal-nav > a, .portal-group summary, .portal-group a { display:block; padding:8px 12px; border-radius:4px; cursor:pointer; font:600 15px/1.45 var(--brand-font); white-space:nowrap; }
.rp-screen .portal-nav > a, .portal-group summary { color:white; }
.portal-nav > a:hover, .portal-group summary:hover, .portal-group[open] summary { background:#294B9C; }
.portal-nav > a[aria-current], .selected-group > summary { background:white; color:var(--gcbs-blue) !important; }
.portal-group { position:relative; }
.portal-group summary { list-style:none; }
.portal-group summary::-webkit-details-marker { display:none; }
.portal-group summary::after { content:'▾'; margin-left:6px; }
.portal-group[open] summary::after { content:'▴'; }
.portal-group > div { position:absolute; z-index:10; top:100%; left:0; min-width:190px; width:max-content; padding:6px; border:1px solid var(--line); border-radius:5px; background:white; box-shadow:0 5px 14px #17244322; }
.portal-group a:hover, .portal-group a[aria-current] { background:var(--tint); }
.portal-nav :focus-visible { outline:2px solid white; outline-offset:-3px; }
.portal-group a:focus-visible { outline-color:var(--gcbs-blue); }
.portal-heading { border-bottom:1px solid var(--line); background:white; }
.portal-heading h1 { padding:16px 0 18px; margin-block:0; text-align:left; color:var(--gcbs-blue); font:800 clamp(24px,3vw,32px)/1.2 var(--brand-font); letter-spacing:-.025em; }
.rp-screen > :is(.container,.container-fluid,.page,.page-wrap,.shell,.result-sheet) { width:var(--canvas); max-width:none; margin:0 auto; padding:0; }
.rp-screen > :is(.container,.container-fluid) { padding-inline:0 !important; }
.rp-screen :is(h2,h3,h4,h5,h6) { color:var(--gcbs-blue); font-family:var(--brand-font); line-height:1.25; text-align:left; letter-spacing:-.01em; }
.rp-screen h2 { font-size:1.4rem; font-weight:700; }
.rp-screen :is(h3,h4) { font-size:1.15rem; font-weight:700; }
.rp-screen :is(h5,h6,label) { font-weight:600; }
.portal-help, .scope-name, .section-subtitle { color:var(--muted); margin:0 0 16px; }
.rp-screen :is(.card,.card-box,.programme-card,.filter-card,.filter-panel,.summary-card,.table-control-bar,.blocks-card,.panel-card,.chart-panel,.analytics-kpi,.story-card,.soft-panel,.insight-card,.menu-card,.detail-panel,.results-panel,.overview > div,.rp-mini-stat,.portal-panel,.result-sheet,.rp-toolbox) {
    background:white; border:1px solid var(--line); border-radius:var(--radius); box-shadow:0 2px 7px #0027890a;
}
.rp-screen :is(.card-box,.programme-card,.panel-card,.filter-panel,.filter-card,.detail-panel,.chart-panel,.table-control-bar) { padding:18px 20px; margin-bottom:18px; }
.rp-screen .card-header { background:white; border-bottom:1px solid var(--line); color:var(--gcbs-blue); font-weight:700; }
.rp-screen .card-box > summary { cursor:pointer; color:var(--gcbs-blue); font-weight:700; }
.rp-screen .card-box[open] > summary { margin-bottom:14px; }
.rp-mini-stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(125px,1fr)); gap:12px; margin-bottom:20px; }
.rp-mini-stat { padding:12px 16px; }
.rp-mini-stat small, .rp-mini-stat strong { display:block; }
.rp-mini-stat small { color:var(--muted); font-weight:600; }
.rp-mini-stat strong { color:var(--gcbs-blue); font-size:1.45rem; }
.rp-screen :is(.overview dd,.summary-card strong,.blocks-card strong,.story-card .big,.analytics-kpi strong,.menu-card i) { color:var(--gcbs-blue); }
.rp-screen :is(.presentation-header,.decision-banner,.result-total) { background:var(--gcbs-blue); color:white; border-radius:var(--radius); box-shadow:none; }
.rp-screen .result-total { border-radius:0; }
.rp-screen :is(.presentation-header,.decision-banner,.result-total) :is(h2,strong,p,small,a) { color:white; }
.rp-screen :is(.filter-chip,.total-pill,.analytics-kpi .icon,.year-semester-title,.portal-msg,.analysis-note) { background:var(--tint); color:var(--gcbs-blue); }
.rp-screen :is(.year-semester-title,.analysis-note,.portal-msg) { border-left:3px solid var(--gcbs-gold); padding:10px 14px; }
.rp-screen .metric-pill.active, .rp-screen .mini-progress span { background:var(--gcbs-blue); }
.rp-screen .menu-card:hover { border-color:var(--gcbs-blue); }
.rp-screen :where(.button,.btn,.print-btn,.logout-link,.portal-panel button,.card-box button:not(.btn),.scope-form button,.compare-form button,.portal-toggle) {
    display:inline-flex; justify-content:center; align-items:center; gap:.3rem; padding:.52rem .9rem; width:auto;
    border:1px solid transparent; border-radius:5px; font:700 .94rem/1.35 var(--brand-font); cursor:pointer; text-decoration:none; box-shadow:none;
}
.rp-screen .portal-toggle { display:none; }
.rp-screen :where(.button,.btn-primary,.print-btn,.portal-panel button,.card-box button:not(.btn),.scope-form button,.compare-form button,.portal-toggle) { background:var(--gcbs-blue); color:white; border-color:var(--gcbs-blue); }
.rp-screen .btn-primary { --bs-btn-bg:var(--gcbs-blue); --bs-btn-border-color:var(--gcbs-blue); --bs-btn-disabled-bg:#6175A9; }
.rp-screen :is(.btn-outline-primary,.btn-outline-secondary,.logout-link,.button.secondary) { color:var(--gcbs-blue); border-color:var(--gcbs-blue); background:white; }
.rp-screen :is(.btn-primary,.btn-outline-primary,.btn-outline-secondary,.button,.print-btn,.portal-panel button,.scope-form button,.compare-form button,.card-box button:not(.btn)):hover { color:white; border-color:#001B61; background:#001B61; }
.rp-screen :is(.btn.btn-success,.btn.btn-danger,.btn.btn-secondary,.btn.btn-dark) { color:white; }
.rp-screen .btn.btn-sm { padding:.32rem .62rem; font-size:.875rem; }
.rp-screen button:disabled { opacity:.58; cursor:default; }
.rp-screen :is(.form-control,.form-select,input[type=text],input[type=number],input[type=password],input[type=email],input[type=search],textarea,select) {
    color:var(--ink); border:1px solid #A5B1C9; border-radius:5px; background-color:white; font-family:var(--brand-font); box-shadow:none;
}
.rp-screen :is(.form-control,.form-select,input,textarea,select):focus { border-color:var(--gcbs-blue); outline:2px solid var(--gcbs-blue); outline-offset:1px; box-shadow:none; }
.rp-screen input[type=checkbox] { accent-color:var(--gcbs-blue); }
.rp-screen :is(.table-responsive,.tbl-wrap,.table-scroll) { max-width:100%; overflow-x:auto; }
.rp-screen table { border-collapse:collapse; font-family:var(--brand-font); font-variant-numeric:tabular-nums; }
.rp-screen table thead th, .rp-screen table thead td { background:var(--gcbs-blue); color:white; border-color:#405DA2; box-shadow:none; vertical-align:middle; }
.rp-screen .table { --bs-table-border-color:var(--line); --bs-table-striped-bg:#F4F6FB; --bs-table-hover-bg:var(--tint); }
.rp-toolbox, .table-control-bar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; }
.rp-toolbox { padding:10px 12px; margin-bottom:10px; }
.rp-table-search { max-width:320px; }
.rp-table-count { color:var(--muted); font-size:.9rem; }
.rp-screen .portal-panel { width:min(490px,var(--canvas)); margin:0 auto; padding:24px; }
.portal-panel label { display:block; margin:12px 0 4px; }
.portal-panel label > input:not([type=checkbox]), .portal-panel form > :is(input:not([type=hidden]),select) { display:block; width:100%; padding:9px 11px; }
.portal-panel button { margin-top:16px; }
.portal-panel p { margin:12px 0; }
.portal-panel p:first-child { margin-top:0; }
.portal-panel .back-link { display:inline-block; margin-top:12px; }
.portal-panel .error-message { color:#8C2525; padding:9px 12px; background:#FBEFEE; }
.home-panel nav { display:grid; gap:10px; }
.footer-note { margin-top:22px; padding-top:15px; border-top:1px solid var(--gcbs-gold); font-size:.875rem; color:var(--muted); }
.rp-screen .result-sheet { padding:20px; }
.result-sheet .student-info { text-align:left; }
.rp-screen .final-remark { background:var(--pale); color:var(--gcbs-blue); border-left:3px solid var(--gcbs-gold); }
.bulk-controls, .bulk-actions, .term-form { display:flex; flex-wrap:wrap; gap:12px 20px; align-items:center; }
.term-form { align-items:end; }
.term-form .term-field { flex:1 1 165px; }
.term-form select { margin-top:4px; }
.bulk-controls { justify-content:space-between; margin:12px 0; }
.bulk-controls output { color:var(--muted); }
.release-choice { display:flex; gap:10px; align-items:baseline; }
.bulk-actions { margin-top:12px; gap:8px; }
.release-date-mobile { display:none; }
@media screen and (max-width:600px) {
    #release-selection .release-date { display:none; }
    #release-selection .release-date-mobile { display:block; margin-top:4px; color:var(--muted); }
    #release-selection table td { overflow-wrap:anywhere; }
}
.rp-screen .header .title-line2 { color:var(--gcbs-blue); }
.report-page #filter-report { max-width:34rem; margin-top:5px; }
.report-filters { margin-top:14px; }
.report-filters summary { color:var(--gcbs-blue); cursor:pointer; width:fit-content; }
.report-fields { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,12rem),1fr)); gap:12px; margin-top:12px; }
.report-fields > div { min-width:0; }
.report-fields select { margin-top:4px; }
.report-top,.report-actions { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px 16px; }
.report-result h2 { margin:0; }
.report-scope,.report-note,.report-empty { color:var(--muted); }
.report-scope { margin:3px 0 0; }
.report-note,.report-empty { margin:14px 0; }
@media screen { .rp-screen .tbl-wrap thead { position:sticky; top:0; z-index:4; } }
@media print { #report-picker,.report-actions { display:none !important; } .report-result .table-responsive { overflow:visible; } }
@media screen { .print-letterhead { display:none !important; } }
@media (max-width:900px) {
    :root { --canvas:calc(100% - 24px); }
    .portal-header { margin-bottom:16px; }
    .portal-nav { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:3px; padding:6px 12px; }
    .portal-nav > a,.portal-group summary { white-space:normal; }
    .rp-screen .portal-toggle { display:inline-flex; }
    .menu-js:not(.menu-open) .portal-nav { display:none; }
    .portal-heading { border-top:3px solid var(--gcbs-gold); }
    .portal-header.menu-open .portal-heading { border-top:0; }
    .portal-group[open] { grid-column:1/-1; }
    .portal-group > div { position:static; width:100%; min-width:0; box-shadow:none; }
    .portal-identity .portal-account > :is(span,a) { display:none; }
    .portal-mobile-account { display:flex; justify-content:space-between; color:white; grid-column:1/-1; padding:6px 12px; }
    .rp-screen .portal-mobile-account a { color:white; }
    .rp-screen > :is(.page,.page-wrap,.container,.container-fluid,.shell,.result-sheet) { overflow-x:auto; }
}
@media (max-width:600px) {
    .portal-brand span { display:none; }
    .portal-heading h1 { padding:12px 0; }
    .portal-brand img { height:80px; }
    .portal-identity { gap:4px; }
    .rp-screen .portal-toggle { padding:7px 10px; }
    .rp-screen :is(.card-box,.portal-panel,.filter-card,.detail-panel,.chart-panel,.panel-card) { padding:14px; }
    .term-form { align-items:stretch; }
}
@media print {
    @page { margin:12mm; }
    body.rp-screen { color:black; background:white !important; padding:0; }
    .portal-header { display:block; border:none; margin:0 0 5mm; }
    .portal-identity, .portal-heading h1 { width:100%; }
    .portal-identity { min-height:0; }
    .portal-brand img,.rp-screen .gcbs-print-mark { height:22mm; width:auto; }
    .portal-heading { border-bottom:1pt solid var(--gcbs-gold); border-top:none; }
    .portal-heading h1 { font-size:16pt; padding:2mm 0; }
    .portal-nav,.portal-account,.rp-screen .rp-toolbox,.rp-screen .actions,.rp-screen .bulk-actions,.rp-screen .bulk-controls,.rp-screen .term-form { display:none !important; }
    .rp-student-sheet .portal-header { display:none; }
    .print-letterhead { display:flex; align-items:center; gap:4mm; padding:2mm 0 4mm; border-bottom:1pt solid var(--gcbs-gold); }
    .rp-screen :is(.result-sheet,.container,.shell,.page,.page-wrap,.container-fluid) { width:100%; max-width:none; margin:0; overflow:visible; }
    .rp-screen .result-sheet { padding:0; border:none; box-shadow:none; }
    .rp-screen table thead th { background:white; color:var(--gcbs-blue); border:1px solid var(--line); }
}
.rp-screen a.btn-primary,.rp-screen a.button:not(.secondary),.rp-screen a.print-btn { color:white; background:var(--gcbs-blue); }
.rp-screen a.btn-primary:is(:hover,:focus-visible,:active),.rp-screen a.button:not(.secondary):is(:hover,:focus-visible,:active) { color:white; background:#001B61; }
.rp-screen a.btn-danger,.rp-screen .deletion-actions .btn-danger { color:white; background:#AD2533; }
.rp-screen .deletion-actions { display:flex; align-items:center; gap:12px; }
.rp-screen .deletion-actions button { margin:0; }
.report-choice { margin-top:18px; border-top:1px solid var(--line); padding-top:14px; }
.report-chart { margin:12px 0 24px; padding:16px; background:var(--pale); border-radius:6px; }
.report-chart figcaption { color:var(--gcbs-blue); font-weight:700; margin-bottom:12px; }
.chart-item { display:grid; grid-template-columns:minmax(10rem,35%) 1fr 4rem; align-items:center; gap:12px; margin:7px 0; font-size:.94rem; }
.chart-track { height:.65rem; border-radius:3px; background:#DCE3F0; overflow:hidden; }
.chart-track i { display:block; height:100%; background:var(--gcbs-blue); }
.chart-item strong { text-align:right; font-variant-numeric:tabular-nums; }
.catalogue-picker select { margin-top:4px; max-width:40rem; }
@media(max-width:600px) {
  .chart-item { grid-template-columns:1fr auto; gap:1px 6px; }
  .chart-item > span { grid-row:1; }
  .chart-item strong { grid-column:2; grid-row:1; }
  .chart-track { grid-row:2; grid-column:1/3; }
}
@media print { .report-chart { break-inside:avoid; print-color-adjust:exact; } .catalogue-picker { display:none; } }
.report-choice { min-width:0; margin-bottom:1rem; }
.report-choice legend { float:none; width:auto; font-size:1.08rem; font-weight:700; margin:0 0 .5rem; }
.report-options { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr)); gap:.35rem 1rem; }
.report-options label { display:flex; align-items:center; gap:.55rem; min-height:2.35rem; cursor:pointer; }
.report-options input { width:1.1rem; height:1.1rem; flex-shrink:0; }
.report-print { justify-content:flex-end; margin-bottom:.75rem; }
@media print { .report-print { display:none !important; } .report-result h2 { break-after:avoid; } }
.limit-index .report-top p { margin:.3rem 0 0; }
.limit-search { margin:1rem 0 .5rem; max-width:32rem; }
.limit-module { border-bottom:1px solid var(--line); }
.limit-module > summary { padding:.75rem .1rem; cursor:pointer; color:var(--gcbs-blue); }
.limit-module > summary span,.limit-module small { color:var(--muted); font-size:.9rem; }
.limit-module > summary small { margin-left:.6rem; }
.limit-offering { display:grid; grid-template-columns:minmax(9rem,1fr) repeat(2,7rem) auto; gap:12px; padding:12px; align-items:end; background:var(--pale); border-top:1px solid var(--line); }
.limit-offering small { display:block; }
.limit-offering label { font-size:.88rem; }
@media(max-width:650px){ .limit-offering { grid-template-columns:1fr 1fr; } .limit-offering > div { grid-column:1/-1; } .limit-offering button { justify-self:start; } }
@media print { .limit-search,.limit-offering button { display:none!important; } .limit-offering { break-inside:avoid; } }

/* Compact academic lists */
.rp-fold > summary { cursor:pointer; font-weight:700; color:#102b80; padding:10px 12px; }
.rp-fold > summary:focus-visible { outline:2px solid #102b80; outline-offset:2px; }
.rp-fold > summary .badge,.rp-group-count { float:right; }
.rp-fold[open] > summary { margin-bottom:12px; }
.rp-module-group > summary.year-semester-title { margin:8px 0; border-radius:8px; background:#e5eaf4; }
.rp-module-group { margin-bottom:8px; }
.rp-group-count { font-size:.85rem; font-weight:600; }
@media print { .rp-fold:not([open]) { display:none!important; } }
