/* =====================================================================
   HTU UI - shared design system for HTU_StudentPortal (v3.6, 2026-10-15)

   Rules (see "Legacy Web Forms UIUX Modernization.md"):
   - Class-scoped only (.htu-*). No bare element selectors, so pages that
     have not been migrated are unaffected when this file is linked.
   - Framework-agnostic: works on top of Bootstrap 3 (AdminLTE) and
     Bootstrap 5 alike.
   - Logical properties only (inline-start/end) so one file serves
     Arabic RTL and English LTR.
   - Keep this file ASCII-only (site globalization is windows-1256).

   Brand tokens measured from https://www.htu.edu.jo computed styles.
   ===================================================================== */

:root {
    /* Brand */
    --htu-red-500: #E8343F;          /* website primary: bars, accents, large text */
    --htu-red-700: #C8202B;          /* buttons/links with small text (white = 5.7:1) */
    --htu-red-800: #A51A23;          /* hover/active */
    --htu-red-050: #FDECED;
    --htu-navy-900: #010F1C;
    --htu-ink-900: #161613;
    --htu-gray-700: #57595F;         /* body text on white = 7:1 */
    --htu-gray-600: #625E59;
    --htu-gray-300: #DDDBD6;
    --htu-gray-200: #E9E7E3;
    --htu-gray-050: #F9F9F9;
    --htu-white: #FFFFFF;

    /* Semantic */
    --htu-text: var(--htu-ink-900);
    --htu-text-muted: var(--htu-gray-700);
    --htu-surface: var(--htu-white);
    --htu-surface-alt: var(--htu-gray-050);
    --htu-border: var(--htu-gray-300);
    --htu-primary: var(--htu-red-700);
    --htu-primary-hover: var(--htu-red-800);
    --htu-accent: var(--htu-red-500);

    --htu-success-fg: #1E6B2A; --htu-success-bg: #EAF6EC; --htu-success-bd: #A9D8B1;
    --htu-warning-fg: #7A4B00; --htu-warning-bg: #FFF5E0; --htu-warning-bd: #F2CE8A;
    --htu-danger-fg:  #9F1C24; --htu-danger-bg:  #FDECED; --htu-danger-bd:  #F3B4B8;
    --htu-info-fg:    #0B3A5B; --htu-info-bg:    #EEF4F9; --htu-info-bd:    #BCD3E6;

    /* Typography - px on purpose: Bootstrap 3 sets html{font-size:10px}, Bootstrap 5 uses 16px,
       so rem-based values would render 37% smaller inside the AdminLTE shell. */
    --htu-font-latin: 'Almarai', 'Segoe UI', Tahoma, Arial, sans-serif;
    --htu-font-arabic: 'Almarai', Tahoma, 'Segoe UI', Arial, sans-serif;
    --htu-fs-xs: 13px;   /* 13px */
    --htu-fs-sm: 14px;    /* 14px */
    --htu-fs-md: 16px;        /* 16px */
    --htu-fs-lg: 20px;     /* 20px */
    --htu-fs-xl: 24px;      /* 24px */
    --htu-lh: 1.6;

    /* Spacing / shape */
    --htu-space-1: 4px;
    --htu-space-2: 8px;
    --htu-space-3: 12px;
    --htu-space-4: 16px;
    --htu-space-5: 24px;
    --htu-space-6: 32px;
    --htu-radius-sm: 4px;
    --htu-radius: 8px;
    --htu-radius-lg: 12px;
    --htu-shadow-sm: 0 1px 2px rgba(1, 15, 28, 0.06);
    --htu-shadow: 0 4px 16px rgba(1, 15, 28, 0.08);
    --htu-focus: 0 0 0 3px rgba(232, 52, 63, 0.35);
    --htu-control-h: 44px;  /* 44px touch target */
}

/* ---------- Utilities ---------- */
.htu-visually-hidden {
    position: absolute !important; /* documented: must beat legacy layout rules */
    width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.htu-ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------- Page scope ---------- */
.htu-page {
    font-family: var(--htu-font-latin);
    color: var(--htu-text);
    font-size: var(--htu-fs-sm);
    line-height: var(--htu-lh);
}
.htu-page:lang(ar), [lang="ar"] .htu-page { font-family: var(--htu-font-arabic); }
.htu-page :focus-visible { outline: none; box-shadow: var(--htu-focus); }

/* ---------- Card ---------- */
.htu-card {
    background: var(--htu-surface);
    border: 1px solid var(--htu-border);
    border-radius: var(--htu-radius-lg);
    box-shadow: var(--htu-shadow);
}
.htu-card__body { padding: var(--htu-space-6); }
.htu-card__footer {
    padding: var(--htu-space-4) var(--htu-space-6);
    border-block-start: 1px solid var(--htu-border);
    background: var(--htu-surface-alt);
    border-end-start-radius: var(--htu-radius-lg);
    border-end-end-radius: var(--htu-radius-lg);
}
@media (max-width: 575.98px) {
    .htu-card__body { padding: var(--htu-space-5); }
    .htu-card__footer { padding: var(--htu-space-4) var(--htu-space-5); }
}

/* ---------- Form fields ---------- */
.htu-field { margin-block-end: var(--htu-space-4); }
.htu-field__label {
    display: block;
    margin-block-end: var(--htu-space-1);
    font-size: var(--htu-fs-sm);
    font-weight: 700;
    color: var(--htu-text);
}
.htu-field__hint { display: block; margin-block-start: var(--htu-space-1); font-size: var(--htu-fs-xs); color: var(--htu-text-muted); }
.htu-field__error { display: inline-block; margin-block-start: var(--htu-space-1); font-size: var(--htu-fs-xs); color: var(--htu-danger-fg); font-weight: 700; }

.htu-input-group { position: relative; display: flex; align-items: stretch; }
.htu-input-group__icon {
    position: absolute; inset-block: 0; inset-inline-start: 0;
    display: flex; align-items: center; justify-content: center;
    width: var(--htu-control-h);
    color: var(--htu-gray-600);
    pointer-events: none;
}
.htu-input {
    display: block; width: 100%;
    min-height: var(--htu-control-h);
    padding: var(--htu-space-2) var(--htu-space-3);
    font: inherit; font-size: var(--htu-fs-md);
    color: var(--htu-text);
    background: var(--htu-surface);
    border: 1px solid var(--htu-gray-300);
    border-radius: var(--htu-radius);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.htu-input::placeholder { color: #8A8C91; }
.htu-input:hover { border-color: #C3C0BA; }
.htu-input:focus { outline: none; border-color: var(--htu-accent); box-shadow: var(--htu-focus); }
.htu-input-group .htu-input { padding-inline-start: var(--htu-control-h); }
.htu-input[aria-invalid="true"] { border-color: var(--htu-danger-fg); }
.htu-input:user-invalid { border-color: var(--htu-danger-fg); } /* separate rule: unsupported selector must not drop the one above */

/* ---------- Buttons ---------- */
.htu-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--htu-space-2);
    min-height: var(--htu-control-h);
    padding: var(--htu-space-2) var(--htu-space-5);
    font: inherit; font-size: var(--htu-fs-md); font-weight: 700; line-height: 1.2;
    border: 1px solid transparent;
    border-radius: var(--htu-radius);
    cursor: pointer; text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.htu-btn:focus-visible { outline: none; box-shadow: var(--htu-focus); }
.htu-btn--primary { background: var(--htu-primary); border-color: var(--htu-primary); color: var(--htu-white); }
.htu-btn--primary:hover, .htu-btn--primary:active { background: var(--htu-primary-hover); border-color: var(--htu-primary-hover); color: var(--htu-white); }
.htu-btn--secondary { background: var(--htu-surface); border-color: var(--htu-gray-300); color: var(--htu-text); }
.htu-btn--secondary:hover { background: var(--htu-surface-alt); border-color: #C3C0BA; }
.htu-btn--danger { background: var(--htu-danger-fg); border-color: var(--htu-danger-fg); color: var(--htu-white); }
.htu-btn--icon { padding: 0; width: var(--htu-control-h); }
.htu-btn--block { display: flex; width: 100%; }
.htu-btn[disabled], .htu-btn.is-disabled { opacity: .55; cursor: not-allowed; }
.htu-btn.is-busy { cursor: progress; opacity: .8; pointer-events: none; }

/* ---------- Links ---------- */
.htu-link { color: var(--htu-primary); font-weight: 700; text-decoration: none; }
.htu-link:hover { color: var(--htu-primary-hover); text-decoration: underline; }

/* ---------- Alerts / messages ---------- */
.htu-alert {
    display: flex; gap: var(--htu-space-3); align-items: flex-start;
    padding: var(--htu-space-3) var(--htu-space-4);
    border: 1px solid; border-inline-start-width: 4px;
    border-radius: var(--htu-radius);
    font-size: var(--htu-fs-sm);
}
.htu-alert:empty { display: none; }
.htu-alert--info    { color: var(--htu-info-fg);    background: var(--htu-info-bg);    border-color: var(--htu-info-bd); }
.htu-alert--success { color: var(--htu-success-fg); background: var(--htu-success-bg); border-color: var(--htu-success-bd); }
.htu-alert--warning { color: var(--htu-warning-fg); background: var(--htu-warning-bg); border-color: var(--htu-warning-bd); }
.htu-alert--error   { color: var(--htu-danger-fg);  background: var(--htu-danger-bg);  border-color: var(--htu-danger-bd); font-weight: 700; }

/* ---------- Badges ---------- */
.htu-badge { display: inline-flex; align-items: center; gap: var(--htu-space-1); padding: 2px var(--htu-space-2); border-radius: 999px; font-size: var(--htu-fs-xs); font-weight: 700; border: 1px solid; }
.htu-badge--pending  { color: var(--htu-warning-fg); background: var(--htu-warning-bg); border-color: var(--htu-warning-bd); }
.htu-badge--approved { color: var(--htu-success-fg); background: var(--htu-success-bg); border-color: var(--htu-success-bd); }
.htu-badge--rejected { color: var(--htu-danger-fg);  background: var(--htu-danger-bg);  border-color: var(--htu-danger-bd); }

/* ---------- Segmented control (styles asp:RadioButton output: span > input + label) ---------- */
.htu-segmented {
    display: inline-flex; padding: 3px; gap: 3px;
    background: var(--htu-surface-alt); border: 1px solid var(--htu-border); border-radius: 999px;
}
.htu-segmented__item { position: relative; display: inline-flex; }
.htu-segmented__item input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.htu-segmented__item label {
    display: inline-flex; align-items: center; min-height: 36px; margin: 0;
    padding: 0 var(--htu-space-4); border-radius: 999px;
    font-size: var(--htu-fs-sm); font-weight: 700; color: var(--htu-text-muted); cursor: pointer;
}
.htu-segmented__item input[type="radio"]:checked + label { background: var(--htu-surface); color: var(--htu-primary); box-shadow: var(--htu-shadow-sm); }
.htu-segmented__item input[type="radio"]:focus-visible + label { box-shadow: var(--htu-focus); }

/* =====================================================================
   Login page (Default.aspx) - page-specific layer
   ===================================================================== */
.htu-login {
    min-height: 100vh;
    display: flex; flex-direction: column;
    background: var(--htu-surface-alt);
    border-block-start: 6px solid var(--htu-accent);   /* website top bar */
}
.htu-login__main {
    flex: 1 0 auto;
    display: flex; align-items: center; justify-content: center;
    padding: var(--htu-space-6) var(--htu-space-4);
}
.htu-login__card { width: 100%; max-width: 432px; }
.htu-login__brand { text-align: center; margin-block-end: var(--htu-space-5); }
.htu-login__logo { display: inline-block; max-width: 220px; width: 100%; height: auto; }
.htu-login__title {
    margin: var(--htu-space-4) 0 0;
    font-size: var(--htu-fs-xl); font-weight: 800; line-height: 1.3;
    color: var(--htu-navy-900);
}
.htu-login__title::after {
    content: ""; display: block; width: 48px; height: 3px; margin: var(--htu-space-3) auto 0;
    background: var(--htu-accent); border-radius: 2px;
}
.htu-login__notice { margin-block-end: var(--htu-space-5); }
.htu-login__captcha {
    display: flex; align-items: center; gap: var(--htu-space-2);
    margin-block-end: var(--htu-space-2);
}
.htu-login__captcha-img {
    flex: 0 1 auto; max-width: calc(100% - var(--htu-control-h) - var(--htu-space-2));
    border: 1px solid var(--htu-border); border-radius: var(--htu-radius); overflow: hidden;
    user-select: none; background: var(--htu-white);
}
.htu-login__captcha-img img { display: block; max-width: 100%; height: auto; }
.htu-login__message { margin-block-end: var(--htu-space-4); }
.htu-login__actions { margin-block-start: var(--htu-space-5); }
.htu-login__links { margin-block-start: var(--htu-space-4); text-align: center; }
.htu-login__lang { display: flex; align-items: center; justify-content: center; gap: var(--htu-space-3); }
.htu-login__lang-icon { color: var(--htu-gray-600); }
.htu-login__footer { padding: var(--htu-space-4); text-align: center; font-size: var(--htu-fs-xs); color: var(--htu-text-muted); }

/* Code-behind styleLabels() writes inline float:left/right on Button1 and
   HyperLink1; neutralise it inside the new layout only (documented use of !important). */
.htu-login .htu-btn,
.htu-login .htu-link { float: none !important; }

/* =====================================================================
   Authenticated shell (MainMaster.master) - v1.1, 2026-10-14
   Activated by class "htu-shell" on <body>. Restyles the AdminLTE 2.4
   skin-red shell (header, sidebar, title, notices, footer) only; content
   pages inside ContentPlaceHolder1 are not targeted here.
   Specificity is raised with ".htu-shell.skin-red" so the overrides beat
   the skin file without !important (exceptions are documented inline).
   ===================================================================== */
.htu-shell { --htu-shell-nav: #0B1724; --htu-shell-nav-2: #13212F; --htu-shell-nav-3: #1B2B3A; --htu-shell-nav-text: #C9D3DC; }

/* Full-width layout instead of the boxed 2019 look (class kept for AdminLTE JS) */
.htu-shell.layout-boxed { background: var(--htu-surface-alt); }
.htu-shell.layout-boxed .wrapper { max-width: none; margin: 0; box-shadow: none; }
.htu-shell .wrapper { background-color: var(--htu-shell-nav); border-block-start: 4px solid var(--htu-accent); }

/* Header */
.htu-shell.skin-red .main-header .logo { background-color: var(--htu-white); color: var(--htu-navy-900); border-block-end: 1px solid var(--htu-border); }
.htu-shell.skin-red .main-header .logo:hover { background-color: var(--htu-white); }
.htu-shell .main-header .logo .htu-shell__logo { display: inline-block; max-height: 34px; width: auto; vertical-align: middle; }
.htu-shell .main-header .logo .logo-mini strong { color: var(--htu-accent); font-weight: 800; }
.htu-shell.skin-red .main-header .navbar { background-color: var(--htu-shell-nav); }
.htu-shell.skin-red .main-header .navbar .nav > li > a,
.htu-shell.skin-red .main-header .navbar .sidebar-toggle { color: var(--htu-white); }
.htu-shell.skin-red .main-header .navbar .nav > li > a:hover,
.htu-shell.skin-red .main-header .navbar .nav > li > a:focus,
.htu-shell.skin-red .main-header .navbar .sidebar-toggle:hover { background-color: var(--htu-shell-nav-3); color: var(--htu-white); }
.htu-shell.skin-red .main-header li.user-header { background-color: var(--htu-shell-nav); }
.htu-shell .main-header .navbar .nav > li > a:focus-visible,
.htu-shell .main-header .navbar .sidebar-toggle:focus-visible { outline: 2px solid var(--htu-accent); outline-offset: -2px; }

/* Sidebar */
.htu-shell.skin-red .main-sidebar { background-color: var(--htu-shell-nav); }
.htu-shell.skin-red .sidebar a { color: var(--htu-shell-nav-text); }
.htu-shell.skin-red .sidebar-menu > li > a { border-left: 0; border-right: 0; border-inline-start: 3px solid transparent; }
.htu-shell.skin-red .sidebar-menu > li:hover > a { background: var(--htu-shell-nav-2); color: var(--htu-white); }
.htu-shell.skin-red .sidebar-menu > li.active > a,
.htu-shell.skin-red .sidebar-menu > li.menu-open > a { background: var(--htu-shell-nav-2); color: var(--htu-white); border-inline-start-color: var(--htu-accent); }
.htu-shell.skin-red .sidebar-menu > li > .treeview-menu { background: var(--htu-shell-nav-2); }
.htu-shell.skin-red .sidebar-menu .treeview-menu > li > a { color: #A9B7C3; }
.htu-shell.skin-red .sidebar-menu .treeview-menu > li > a:hover { color: var(--htu-white); }
.htu-shell.skin-red .sidebar-menu > li.header { color: #8193A3; background: #08121C; }
.htu-shell .sidebar a:focus-visible { outline: 2px solid var(--htu-accent); outline-offset: -2px; }

/* Content area + page title */
.htu-shell .content-wrapper { background-color: var(--htu-surface-alt); }
.htu-shell .content-header > .htu-shell__title {
    margin: var(--htu-space-4) var(--htu-space-4) 0;
    font-size: var(--htu-fs-xl); font-weight: 800; line-height: 1.3; color: var(--htu-navy-900);
}

/* Notices (was a callout + layout table with red bold inline styles) */
.htu-shell__notices { clear: both; margin: var(--htu-space-4); }
.htu-shell .content-header::after { content: ""; display: table; clear: both; } /* legacy global h1{float:...!important} in MainMaster */
.htu-shell__notices .htu-alert {
    position: relative; flex-direction: column; gap: var(--htu-space-1);
    padding: var(--htu-space-3) var(--htu-space-4); padding-inline-start: 48px;
    font-size: var(--htu-fs-md); box-shadow: var(--htu-shadow-sm);
}
/* Warning icon (FontAwesome 4.7 is loaded by MainMaster; glyph f071 = exclamation-triangle) */
.htu-shell__notices .htu-alert--warning::before {
    content: "\f071"; font-family: FontAwesome; font-size: 20px; line-height: 1;
    position: absolute; inset-block-start: var(--htu-space-3); inset-inline-start: var(--htu-space-4);
    color: #B26A00;
}
.htu-shell__notices .htu-alert > span { display: block; font-weight: 700; line-height: var(--htu-lh); }
.htu-shell__notices .htu-alert > span:empty { display: none; }
.htu-shell__notices .htu-shell__notices-title { color: var(--htu-warning-fg); font-size: var(--htu-fs-sm); }
/* Hide the box entirely when every notice label is empty or not rendered (progressive: browsers without :has show an empty box, as before) */
.htu-shell__notices:not(:has(.htu-alert > span:not(:empty))) { display: none; }

/* Footer */
.htu-shell .main-footer { background: var(--htu-white); border-block-start: 1px solid var(--htu-border); color: var(--htu-text-muted); font-size: var(--htu-fs-xs); }
.htu-shell .main-footer .info-box { border: 1px solid var(--htu-border); border-radius: var(--htu-radius); box-shadow: none; min-height: 64px; }
/* AdminLTE .bg-* colours are declared with !important, so the override must be too (documented). */
.htu-shell .main-footer .info-box-icon { background: var(--htu-red-050) !important; color: var(--htu-red-700) !important; height: 64px; width: 64px; line-height: 64px; font-size: 26px; border-start-start-radius: var(--htu-radius); border-end-start-radius: var(--htu-radius); }
.htu-shell .main-footer .info-box-content { margin-left: 0; margin-right: 0; margin-inline-start: 64px; }
.htu-shell .main-footer .info-box-number a { color: var(--htu-text); font-weight: 700; font-size: var(--htu-fs-sm); }
.htu-shell .main-footer .info-box-number a:hover { color: var(--htu-primary); }
.htu-shell .main-footer a { color: var(--htu-primary); }

/* ---------- Shell v1.2: page header, breadcrumb, language button ---------- */
.htu-shell .content-header { padding: var(--htu-space-4) var(--htu-space-4) 0; }
/* legacy MainMaster rule h1{float:...!important} must be beaten here (documented !important) */
.htu-shell .content-header > .htu-shell__title { float: none !important; margin: var(--htu-space-1) 0 0; }
.htu-breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: var(--htu-space-2); margin: 0; padding: 0; list-style: none; font-size: var(--htu-fs-sm); color: var(--htu-text-muted); }
.htu-breadcrumb li { display: inline-flex; align-items: center; gap: var(--htu-space-2); }
.htu-breadcrumb li + li::before { content: "/"; color: var(--htu-gray-300); }
.htu-breadcrumb a { color: var(--htu-text-muted); text-decoration: none; }
.htu-breadcrumb a:hover { color: var(--htu-primary); text-decoration: underline; }
.htu-breadcrumb [aria-current="page"] { color: var(--htu-text); font-weight: 700; }

/* Language switch: labelled pill instead of a bare word at the edge of the header */
.htu-shell.skin-red .main-header .navbar .nav > li > a.htu-lang-btn {
    display: inline-flex; align-items: center; gap: 6px;
    margin: 9px 8px; padding: 6px 12px; line-height: 1;
    border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; font-weight: 700;
}
.htu-shell.skin-red .main-header .navbar .nav > li > a.htu-lang-btn:hover { background: var(--htu-accent); border-color: var(--htu-accent); }

/* Gear icon opened AdminLTE's demo skin panel, which this portal does not include (no .control-sidebar element) */
.htu-shell .main-header a[data-toggle="control-sidebar"] { display: none; }

/* Sidebar section label ("Useful links") and current page */
.htu-shell.skin-red .sidebar-menu > li.header { font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: none; }
.htu-shell.skin-red .sidebar-menu .treeview-menu > li.active > a { color: var(--htu-white); font-weight: 700; }
.htu-shell.skin-red .sidebar-menu .treeview-menu > li.active > a > .fa { color: var(--htu-accent); }
/* Sub-menu items were 11-12px (smaller still in the Arabic AdminLTE build) */
.htu-shell.skin-red .sidebar-menu .treeview-menu > li > a { font-size: 13px; line-height: 1.5; padding-block: 6px; }

/* =====================================================================
   Content components v1.4 (first used by BankReport.aspx). Content pages wrap their markup in <div class="htu-content">.
   ===================================================================== */
.htu-content { padding: var(--htu-space-4); text-align: start; font-family: var(--htu-font-latin); color: var(--htu-text); font-size: var(--htu-fs-sm); line-height: var(--htu-lh); }
.htu-content > * + * { margin-block-start: var(--htu-space-4); }
.htu-section { background: var(--htu-surface); border: 1px solid var(--htu-border); border-radius: var(--htu-radius-lg); box-shadow: var(--htu-shadow-sm); padding: var(--htu-space-5); }
.htu-section > * + * { margin-block-start: var(--htu-space-4); }
.htu-section__title { margin: 0; font-size: var(--htu-fs-lg); font-weight: 800; color: var(--htu-navy-900); display: flex; align-items: center; gap: var(--htu-space-2); }
.htu-section__title .fa { color: var(--htu-accent); }

/* Toolbar (filters + actions in one row, wraps on small screens) */
.htu-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--htu-space-3) var(--htu-space-4); }
.htu-toolbar__spacer { flex: 1 1 auto; }
.htu-toolbar .htu-field { margin: 0; min-width: 200px; }

/* Key / value summary grid */
.htu-kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--htu-space-3); margin: 0; }
.htu-kv { display: flex; flex-direction: column; gap: 2px; padding: var(--htu-space-3) var(--htu-space-4); background: var(--htu-surface-alt); border: 1px solid var(--htu-gray-200); border-radius: var(--htu-radius); min-width: 0; }
.htu-kv--wide { grid-column: 1 / -1; }
.htu-kv__label { margin: 0; font-size: var(--htu-fs-xs); font-weight: 700; color: var(--htu-text-muted); }
.htu-kv__value { margin: 0; font-size: var(--htu-fs-md); font-weight: 700; color: var(--htu-text); overflow-wrap: break-word; }
.htu-kv__value:empty::before, .htu-kv__value > span:only-child:empty::before { content: "\2014"; color: var(--htu-gray-300); }
/* hide a field whose server label is not rendered (Visible="False") */
.htu-kv:has(> .htu-kv__label:empty) { display: none; }

/* Highlighted figure (e.g. amount due) */
.htu-stat { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--htu-space-2) var(--htu-space-3); padding: var(--htu-space-4) var(--htu-space-5); border-radius: var(--htu-radius); background: var(--htu-info-bg); border: 1px solid var(--htu-info-bd); } /* neutral: must not look like an error */
.htu-stat__label { font-size: var(--htu-fs-sm); font-weight: 700; color: var(--htu-info-fg); }
.htu-stat__value { font-size: 28px; font-weight: 800; color: var(--htu-ink-900); line-height: 1.1; }
.htu-stat__unit { font-size: var(--htu-fs-sm); font-weight: 700; color: var(--htu-text-muted); }

/* Inline form row (label + input + button) */
.htu-form-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--htu-space-3); }
.htu-form-row .htu-field { margin: 0; flex: 0 1 260px; }

/* Data tables (GridView / Repeater output). Wrapper scrolls instead of the page. */
.htu-table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--htu-border); border-radius: var(--htu-radius); background: var(--htu-surface); }
.htu-table { width: 100%; border-collapse: collapse; margin: 0; font-size: var(--htu-fs-sm); }
.htu-table th { background: var(--htu-surface-alt); color: var(--htu-text); font-weight: 700; text-align: start; white-space: nowrap; padding: var(--htu-space-3) var(--htu-space-4); border-block-end: 2px solid var(--htu-border); }
.htu-table td { padding: var(--htu-space-3) var(--htu-space-4); border-block-end: 1px solid var(--htu-gray-200); text-align: start; vertical-align: middle; color: var(--htu-text); }
.htu-table tr:last-child td { border-block-end: 0; }
.htu-table tbody tr:hover td { background: #FBFAF8; }
.htu-table input[type="submit"], .htu-table input[type="button"] { min-height: 32px; padding: 4px 12px; border-radius: var(--htu-radius-sm); border: 1px solid var(--htu-danger-bd); background: var(--htu-surface); color: var(--htu-danger-fg); font-weight: 700; cursor: pointer; }
.htu-table input[type="submit"]:disabled, .htu-table input[type="button"]:disabled { opacity: .5; cursor: not-allowed; }
.htu-table a { color: var(--htu-primary); font-weight: 700; }
.htu-table a[disabled], .htu-table a:not([href]) { color: var(--htu-gray-300); pointer-events: none; }
.htu-empty { padding: var(--htu-space-5); text-align: center; color: var(--htu-text-muted); }
.htu-table-wrap:not(:has(table)) { display: none; } /* GridView renders nothing when there are no rows */

/* Legacy global rules in MainMaster (td,span {text-align;direction}) are neutralised inside new pages */
.htu-content td, .htu-content span { text-align: inherit; }
/* bower_components/bootstrap.min.css (custom build) sets td,th{direction:rtl} for every language; cells follow the page direction instead */
.htu-content td, .htu-content th, .htu-content span { direction: inherit; }
.htu-content .htu-ltr { direction: ltr; unicode-bidi: isolate; }
.htu-content .htu-table td, .htu-content .htu-table th { text-align: start; }
/* Long button labels wrap instead of overflowing; full-width actions on phones */
.htu-btn { max-width: 100%; white-space: normal; text-align: center; }
@media (max-width: 575.98px) {
    .htu-toolbar > .htu-btn, .htu-form-row > .htu-btn { width: 100%; }
    .htu-toolbar .htu-field, .htu-form-row .htu-field { flex: 1 1 100%; min-width: 0; }
    .htu-section { padding: var(--htu-space-4); }
}

/* =====================================================================
   Dialog pages (v1.5) - first used by AvPlan3.aspx (opened in the
   showModalDialog polyfill from BankReport.aspx). Bootstrap 3.4 is loaded
   by the page (html font-size 10px) - all sizes here are px.
   ===================================================================== */
.htu-dialog { margin: 0; background: var(--htu-surface-alt); font-family: var(--htu-font-latin); }
.htu-dialog:lang(ar), [lang="ar"] .htu-dialog { font-family: var(--htu-font-arabic); }
.htu-dialog__title { margin: 0; font-size: var(--htu-fs-lg); font-weight: 800; line-height: 1.4; color: var(--htu-navy-900); }

/* Plan table: course row / section header row / section rows */
.htu-plan { font-size: var(--htu-fs-sm); }
.htu-plan > thead th { background: var(--htu-shell-nav, #0B1724); color: var(--htu-white); border-block-end: 0; }
.htu-plan tr.htu-plan__course > td { background: var(--htu-surface-alt); font-weight: 800; color: var(--htu-navy-900); border-block-start: 2px solid var(--htu-border); }
.htu-plan tr[id$="trTitle"] > td { background: var(--htu-white); color: var(--htu-text-muted); font-size: var(--htu-fs-xs); font-weight: 700; padding-block: 6px; }
.htu-plan__choose { white-space: nowrap; }
.htu-plan__choose input[type="checkbox"] { width: 18px; height: 18px; margin: 0; margin-inline-start: 8px; vertical-align: middle; accent-color: var(--htu-primary); }
.htu-plan input[id$="btnExpand"] {
    width: 32px; height: 32px; padding: 0; line-height: 30px; text-align: center; font-weight: 800; font-size: 16px;
    border: 1px solid var(--htu-border); border-radius: var(--htu-radius-sm); background: var(--htu-white); color: var(--htu-navy-900);
}
.htu-plan input[id$="btnExpand"]:hover { border-color: var(--htu-accent); color: var(--htu-accent); }
.htu-plan input[id$="btnExpand"]:focus-visible { outline: none; box-shadow: var(--htu-focus); }
/* Code-behind colours the section rows inline: #c0c0c0 = zebra, red = closed section (full).
   Inline styles can only be overridden with !important (documented). */
.htu-plan tr[id$="trTask"][style*="c0c0c0"] > td { background: #F4F3F0; }
.htu-plan tr[id$="trTask"][style*="c0c0c0"] { background-color: transparent !important; }
.htu-plan tr[id$="trTask"][style*="red"] { background-color: transparent !important; }
.htu-plan tr[id$="trTask"][style*="red"] > td { background: var(--htu-danger-bg); color: var(--htu-danger-fg); }
.htu-plan tr[id$="trTask"][style*="red"] > td:first-child { box-shadow: inset 4px 0 0 var(--htu-danger-fg); }
[dir="rtl"] .htu-plan tr[id$="trTask"][style*="red"] > td:first-child { box-shadow: inset -4px 0 0 var(--htu-danger-fg); }
/* Bootstrap 3 .collapse rows: keep table-row display when opened */
.htu-plan tr.collapse.in { display: table-row; }

.htu-plan-legend { display: inline-flex; align-items: center; gap: var(--htu-space-2); font-size: var(--htu-fs-xs); font-weight: 700; color: var(--htu-text-muted); }
.htu-plan-legend__swatch { width: 14px; height: 14px; border-radius: 3px; background: var(--htu-danger-bg); border: 1px solid var(--htu-danger-fg); }
.htu-plan > thead th { white-space: normal; vertical-align: bottom; }
.htu-plan td { padding-block: 8px; }
.htu-plan td:nth-child(3) { min-width: 220px; }
.htu-plan td:nth-child(n+4), .htu-plan > thead th:nth-child(n+4) { text-align: center; }
/* Bootstrap's collapse re-serialises the inline style (#c0c0c0 -> rgb(192, 192, 192), red -> red / rgb(255, 0, 0)) */
.htu-plan tr[id$="trTask"][style*="192, 192, 192"] { background-color: transparent !important; }
.htu-plan tr[id$="trTask"][style*="192, 192, 192"] > td { background: #F4F3F0; }
.htu-plan tr[id$="trTask"][style*="255, 0, 0"] { background-color: transparent !important; }
.htu-plan tr[id$="trTask"][style*="255, 0, 0"] > td { background: var(--htu-danger-bg); color: var(--htu-danger-fg); }
.htu-plan tr[id$="trTask"][style*="255, 0, 0"] > td:first-child { box-shadow: inset 4px 0 0 var(--htu-danger-fg); }
[dir="rtl"] .htu-plan tr[id$="trTask"][style*="255, 0, 0"] > td:first-child { box-shadow: inset -4px 0 0 var(--htu-danger-fg); }

/* =====================================================================
   Legacy uplift v1.6 - applies to EVERY MainMaster content page that has
   not been rebuilt yet (content placeholder section #sec1), without any
   markup change. Rebuilt pages (.htu-content) are excluded.
   Most legacy colours are inline (GridView "Classic Blue" auto-format:
   header #507CD1, rows #EFF3FB, edit/pager #2461BF, selected #D1DDF1,
   list-page header rows rgb(80, 124, 209)); they can only be remapped
   with attribute selectors + !important (documented, visual only).
   ===================================================================== */

/* -- Form controls -- */
.htu-shell #sec1 :is(select, textarea, input[type="text"], input[type="number"], input[type="email"], input[type="tel"], input[type="date"], input[type="password"]):not(.htu-content:not(.htu-legacy) *):not(.htu-input) {
    min-height: 34px; padding: 4px 10px; font-size: 14px; color: var(--htu-text);
    background-color: var(--htu-white); border: 1px solid var(--htu-gray-300); border-radius: var(--htu-radius-sm);
    box-shadow: none; transition: border-color .15s ease, box-shadow .15s ease; max-width: 100%;
}
.htu-shell #sec1 :is(select, textarea, input[type="text"], input[type="number"], input[type="email"], input[type="tel"], input[type="date"], input[type="password"]):not(.htu-content:not(.htu-legacy) *):focus {
    outline: none; border-color: var(--htu-accent); box-shadow: var(--htu-focus);
}
.htu-shell #sec1 :is(select, textarea, input):not(.htu-content:not(.htu-legacy) *):disabled { background-color: var(--htu-surface-alt); color: var(--htu-text-muted); }

/* -- Buttons: plain asp:Button / input buttons and .btn-default only. Buttons that carry their own class (btn-info, page classes like .btnAddNew...) and
      buttons with inline white text are left alone so their label stays readable. -- */
.htu-shell #sec1 :is(input[type="submit"]:not([class]), input[type="submit"][class=""], input[type="button"]:not([class]), input[type="button"][class=""], button.btn-default, a.btn-default, .btn.btn-default):not(.htu-content:not(.htu-legacy) *):not(.htu-btn):not([style*="color:White" i]):not([style*="color: white" i]) {
    min-height: 34px; padding: 6px 16px; font-size: 14px; font-weight: 700; line-height: 1.3;
    background-color: var(--htu-white); border: 1px solid var(--htu-gray-300); border-radius: var(--htu-radius);
    cursor: pointer; transition: background-color .15s ease, border-color .15s ease; white-space: normal; max-width: 100%;
}
.htu-shell #sec1 :is(input[type="submit"]:not([class]), input[type="submit"][class=""], input[type="button"]:not([class]), input[type="button"][class=""], button.btn-default, a.btn-default, .btn.btn-default):not(.htu-content:not(.htu-legacy) *):not(.htu-btn):not([style*="color:White" i]):not([style*="color: white" i]):hover { background-color: var(--htu-surface-alt); border-color: #C3C0BA; }
.htu-shell #sec1 :is(input[type="submit"], input[type="button"], button, a.btn):not(.htu-content:not(.htu-legacy) *):focus-visible { outline: none; box-shadow: var(--htu-focus); }
.htu-shell #sec1 :is(input[type="submit"], input[type="button"]):not(.htu-content:not(.htu-legacy) *):disabled { opacity: .55; cursor: not-allowed; }

/* -- Data tables: GridView "Classic Blue" + list header rows -- */
.htu-shell #sec1 table:not(.htu-content:not(.htu-legacy) *) { border-collapse: collapse; }
.htu-shell #sec1 :is(tr, div)[style*="#507CD1" i]:not(.htu-content:not(.htu-legacy) *),
.htu-shell #sec1 :is(tr, div, th, td)[style*="80, 124, 209"]:not(.htu-content:not(.htu-legacy) *),
.htu-shell #sec1 :is(tr, div, th, td)[style*="#2461BF" i]:not(.htu-content:not(.htu-legacy) *) {
    background-color: var(--htu-shell-nav) !important; color: var(--htu-white) !important;
}
.htu-shell #sec1 :is(tr, div)[style*="#507CD1" i] :is(th, td, a, span):not(.htu-content:not(.htu-legacy) *),
.htu-shell #sec1 :is(tr, div)[style*="80, 124, 209"] :is(th, td, a, span):not(.htu-content:not(.htu-legacy) *) { color: var(--htu-white) !important; }
.htu-shell #sec1 tr[style*="#507CD1" i] > :is(th, td):not(.htu-content:not(.htu-legacy) *),
.htu-shell #sec1 tr[style*="80, 124, 209"] > :is(th, td):not(.htu-content:not(.htu-legacy) *) {
    padding: 10px 12px; font-weight: 700; border-color: rgba(255,255,255,.15) !important; vertical-align: middle;
}
.htu-shell #sec1 tr[style*="#EFF3FB" i]:not(.htu-content:not(.htu-legacy) *) { background-color: var(--htu-white) !important; }
.htu-shell #sec1 tr[style*="#EFF3FB" i] + tr:not([style]):not(.htu-content:not(.htu-legacy) *),
.htu-shell #sec1 tr[style*="background-color:White" i]:not(.htu-content:not(.htu-legacy) *) { background-color: #F7F6F3 !important; }
.htu-shell #sec1 tr[style*="#D1DDF1" i]:not(.htu-content:not(.htu-legacy) *) { background-color: var(--htu-info-bg) !important; color: var(--htu-text) !important; }
.htu-shell #sec1 tr[style*="#EFF3FB" i] > td:not(.htu-content:not(.htu-legacy) *),
.htu-shell #sec1 tr[style*="background-color:White" i] > td:not(.htu-content:not(.htu-legacy) *) {
    padding: 8px 12px; border-color: var(--htu-gray-200) !important; color: var(--htu-text);
}
/* Bootstrap .table inside legacy pages */
.htu-shell #sec1 table.table:not(.htu-content:not(.htu-legacy) *) > tbody > tr > td,
.htu-shell #sec1 table.table:not(.htu-content:not(.htu-legacy) *) > tbody > tr > th { border-color: var(--htu-gray-200); vertical-align: middle; }

/* -- Legacy accent red (#990000 / #CC0000 headers) -> brand -- */
.htu-shell #sec1 :is(tr, div, td, th)[style*="#990000" i][style*="background" i]:not(.htu-content:not(.htu-legacy) *) { background-color: var(--htu-shell-nav) !important; color: var(--htu-white) !important; }

/* -- Wide legacy tables scroll inside the content area instead of the page -- */
.htu-shell #sec1 { overflow-x: auto; }
.htu-shell #sec1 > center, .htu-shell #sec1 > div { max-width: 100%; }

/* =====================================================================
   List pages (v1.7) - batch B1 request lists (AppealRequestList etc.).
   Filters + "new request" action in one toolbar, Repeater output in
   .htu-table. htu-ui.js fills td[data-label] and the empty-state row.
   ===================================================================== */
.htu-sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.htu-list .htu-toolbar .htu-field { min-width: 180px; }
.htu-list .htu-field__label { display: block; }
/* hAddNew is an <a runat> whose text is set server-side (InnerText), so the icon comes from CSS */
.htu-btn--add::before { content: "\f067"; font-family: FontAwesome; font-weight: normal; margin-inline-end: var(--htu-space-2); }
a.htu-btn, a.htu-btn:hover, a.htu-btn:focus { text-decoration: none; }
.htu-btn--primary:focus, .htu-btn--primary:visited { color: var(--htu-white); }
.htu-list .htu-table td, .htu-list .htu-table th { white-space: normal; } /* headers wrap so the list fits without side-scrolling */
.htu-list .htu-table td:first-child, .htu-list .htu-table th:first-child { width: 1%; white-space: nowrap; color: var(--htu-text-muted); }
.htu-list .htu-table td:last-child { white-space: nowrap; }
.htu-table__empty td { padding: var(--htu-space-5); text-align: center !important; color: var(--htu-text-muted); font-weight: 700; }
.htu-table tbody tr.htu-table__empty:hover td { background: transparent; }

/* Rows become cards when the list itself is narrow (phones, or a small window
   next to the sidebar): container query on .htu-list, header text repeated in
   each cell via data-label. Browsers without container queries keep the
   scrolling table. */
.htu-list { container: htu-list / inline-size; }
@container htu-list (max-width: 640px) {
    .htu-table-wrap:has(> .htu-table--stack), .htu-table-wrap:has(> div > .htu-table--stack) { border: 0; background: transparent; overflow: visible; }
    .htu-table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    .htu-table--stack, .htu-table--stack tbody, .htu-table--stack tr, .htu-table--stack td { display: block; width: 100%; }
    .htu-table--stack tr { background: var(--htu-surface); border: 1px solid var(--htu-border); border-radius: var(--htu-radius); box-shadow: var(--htu-shadow-sm); padding: var(--htu-space-2) var(--htu-space-4); margin-block-end: var(--htu-space-3); }
    .htu-table--stack td, .htu-list .htu-table--stack td:first-child { display: flex; justify-content: space-between; align-items: baseline; gap: var(--htu-space-3); width: 100%; padding: var(--htu-space-2) 0; border-block-end: 1px solid var(--htu-gray-200); white-space: normal; color: var(--htu-text); }
    .htu-table--stack tr td:last-child { border-block-end: 0; }
    .htu-table--stack td[data-label]:not([data-label=""])::before { content: attr(data-label); flex: 0 0 40%; font-weight: 700; color: var(--htu-text-muted); }
    .htu-table--stack td > * { text-align: end; }
    .htu-table--stack tbody tr:hover td { background: transparent; }
    .htu-list .htu-table--stack .htu-table__empty td, .htu-table--stack .htu-table__empty td { justify-content: center; }
}

/* =====================================================================
   Request forms (v1.8) - batch B2 (AppealRequest, SectionOpenRequest ...).
   Header (back link + title), read-only facts in .htu-kv-grid, editable
   fields in .htu-fields, actions bar, approval history table.
   ===================================================================== */
.htu-form__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--htu-space-3) var(--htu-space-4); }
.htu-form__title { margin: 0; font-size: var(--htu-fs-lg); font-weight: 800; color: var(--htu-navy-900); line-height: 1.3; }
.htu-form__title:empty, .htu-form__title > span:only-child:empty { display: none; }
.htu-back { display: inline-flex; align-items: center; gap: var(--htu-space-2); min-height: 36px; padding: var(--htu-space-1) var(--htu-space-3); border: 1px solid var(--htu-gray-300); border-radius: var(--htu-radius); color: var(--htu-text); font-weight: 700; text-decoration: none; background: var(--htu-surface); }
.htu-back:hover, .htu-back:focus { color: var(--htu-primary); border-color: #C3C0BA; text-decoration: none; }
.htu-back::before { content: "\f060"; font-family: FontAwesome; font-weight: normal; } /* arrow-left */
[dir="rtl"] .htu-back::before { content: "\f061"; } /* arrow-right points "back" in RTL */

/* Editable fields grid */
.htu-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--htu-space-4); }
.htu-fields > .htu-field { margin: 0; min-width: 0; }
.htu-field--wide { grid-column: 1 / -1; }
.htu-field__label .htu-req, .htu-req { color: var(--htu-danger-fg); font-weight: 700; }
textarea.htu-input { min-height: 120px; resize: vertical; line-height: var(--htu-lh); }
select.htu-input { padding-inline-end: var(--htu-space-6); }
.htu-input[disabled], .htu-input[readonly], .htu-input.aspNetDisabled { background: var(--htu-surface-alt); color: var(--htu-text-muted); cursor: not-allowed; }
.htu-check { display: flex; align-items: flex-start; gap: var(--htu-space-2); font-weight: 700; }
.htu-check input[type="checkbox"] { width: 18px; height: 18px; margin: 3px 0 0; flex: 0 0 auto; accent-color: var(--htu-primary); }

/* File input + selected / uploaded file lists */
.htu-file input[type="file"] { display: block; width: 100%; max-width: 100%; padding: var(--htu-space-3); border: 1px dashed #C3C0BA; border-radius: var(--htu-radius); background: var(--htu-surface-alt); font-size: var(--htu-fs-sm); cursor: pointer; }
.htu-file input[type="file"]:focus-visible { outline: none; box-shadow: var(--htu-focus); }
.htu-file ul { margin: var(--htu-space-2) 0 0; padding-inline-start: var(--htu-space-5); }
.htu-file ul:empty { display: none; }
.htu-file li { margin-block: 2px; overflow-wrap: break-word; }
.htu-file a { color: var(--htu-primary); font-weight: 700; }

/* Static text blocks (conditions, notes) */
.htu-prose > * { margin: 0; }
.htu-prose > * + * { margin-block-start: var(--htu-space-2); }
.htu-prose { color: var(--htu-text); }

/* Action bar */
.htu-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--htu-space-3); padding-block-start: var(--htu-space-4); border-block-start: 1px solid var(--htu-gray-200); }
.htu-actions > .htu-alert { flex: 1 1 260px; margin: 0; }
.htu-actions .htu-btn { min-width: 160px; }
.htu-actions input.htu-btn[disabled] { opacity: .7; }

/* Approval history (Repeater rows kept as <tr> - code-behind casts them) */
.htu-approvals { width: 100%; border-collapse: collapse; font-size: var(--htu-fs-sm); }
.htu-approvals > tbody > tr > td { padding: var(--htu-space-2) var(--htu-space-4); border-block-end: 1px solid var(--htu-gray-200); vertical-align: top; text-align: start; }
.htu-approvals > tbody > tr > td:first-child:not([colspan]) { width: 30%; color: var(--htu-text-muted); font-weight: 700; }
.htu-approvals > tbody > tr > td.info, .htu-approvals > tbody > tr > td.tit { background: var(--htu-info-bg); color: var(--htu-info-fg); font-weight: 800; border-block-start: 2px solid var(--htu-info-bd); }
.htu-approvals > tbody > tr:first-child > td.info, .htu-approvals > tbody > tr:first-child > td.tit { border-block-start: 0; }
.htu-approvals ul { margin: 0; padding-inline-start: var(--htu-space-5); }
.htu-approvals .table { margin: 0; } /* nested legacy tables (course equivalency) */
@media (max-width: 575.98px) {
    .htu-approvals > tbody > tr > td:first-child:not([colspan]) { width: 40%; }
    .htu-actions .htu-btn { width: 100%; }
}
.htu-kv-list { margin: 0; display: grid; gap: var(--htu-space-3); }
.htu-fields > .htu-kv-list { align-self: end; }
.htu-approval-block:not(:has(> *)) { display: none; } /* both server parts hidden */
.htu-approval-block > * + * { margin-block-start: var(--htu-space-3); }
.htu-steps > span { display: block; }
.htu-steps > span:empty { display: none; }
.htu-steps > span:first-child { font-weight: 800; }
.htu-alert a { color: inherit; font-weight: 700; text-decoration: underline; }
.htu-alert > span:empty { display: none; }
.htu-check > span, .htu-check > span > span { display: inline-flex; align-items: flex-start; gap: var(--htu-space-2); }
.htu-check label { margin: 0; font-weight: 700; cursor: pointer; }
.htu-form .text-muted { margin-block-start: var(--htu-space-1); font-size: var(--htu-fs-xs); color: var(--htu-text-muted); text-align: end; }
.htu-form .htu-kv__value { font-weight: 700; }
.htu-form .htu-kv__value > span:only-child:empty::before, .htu-form .htu-kv__value:empty::before { content: "\2014"; color: var(--htu-gray-300); }
@media (max-width: 575.98px) {
    /* short facts two per row on phones; long ones (htu-kv--wide) keep the full row */
    .htu-form .htu-kv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--htu-space-2); }
    .htu-form .htu-kv { padding: var(--htu-space-2) var(--htu-space-3); }
}
.htu-alert.htu-steps { display: block; }
.htu-alert.htu-steps > span + span { margin-block-start: var(--htu-space-1); }
.htu-form .htu-alert:has(> a) { flex-wrap: wrap; align-items: center; }

/* =====================================================================
   Legacy pages, lite rebuild (v1.9) - batches B3-B7. Content wrapped in
   <div class="htu-content htu-legacy"><div class="htu-section">; original
   layout tables kept (Layer A styling still applies inside .htu-legacy);
   GridViews use .htu-table--grid (header row = tr.htu-table__head).
   ===================================================================== */
.htu-legacy { container: htu-list / inline-size; }
.htu-legacy > .htu-section { overflow-x: auto; }
.htu-legacy table:not(.htu-table) { max-width: 100%; }
.htu-legacy .htu-table-wrap { margin-block: var(--htu-space-3); }
.htu-legacy .htu-table-wrap > div { overflow: visible; }
.htu-table--grid { width: 100%; }
.htu-table--grid > tbody > tr:nth-child(even):not(.htu-table__head):not(.htu-pager) > td { background: #FCFBF9; }
.htu-table--grid tr.htu-table__head > th { background: var(--htu-surface-alt); color: var(--htu-text); border-block-end: 2px solid var(--htu-border); }
.htu-table--grid tr.htu-table__head > th a { color: var(--htu-text); }
.htu-table tr.is-selected > td { background: var(--htu-info-bg) !important; color: var(--htu-info-fg); font-weight: 700; }
.htu-table tr.htu-table__foot > td { background: var(--htu-surface-alt); font-weight: 700; border-block-start: 2px solid var(--htu-border); }
.htu-table tr.htu-pager > td { background: var(--htu-surface-alt); text-align: center !important; }
.htu-pager table { margin-inline: auto; border-collapse: separate; border-spacing: 4px 0; }
.htu-pager td { padding: 0 !important; border: 0 !important; background: transparent !important; }
.htu-pager a, .htu-pager span { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; padding: 0 var(--htu-space-2); border-radius: var(--htu-radius-sm); border: 1px solid var(--htu-gray-300); font-weight: 700; text-decoration: none; }
.htu-pager span { background: var(--htu-primary); border-color: var(--htu-primary); color: var(--htu-white); }
.htu-table--grid input[type="submit"]:not(.htu-btn), .htu-table--grid input[type="button"]:not(.htu-btn) { border-color: var(--htu-gray-300); color: var(--htu-text); }
@container htu-list (max-width: 640px) {
    .htu-table--stack tr.htu-table__head { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
    .htu-table--grid > tbody > tr:nth-child(even) > td { background: transparent; }
    .htu-table--stack tr.htu-pager { display: block; border: 0; box-shadow: none; background: transparent; }
    .htu-table--stack tr.htu-pager > td { display: block; }
    .htu-table--stack td:not([data-label]) { display: block; }
    /* legacy fixed pixel widths (Width="736px" on labels, inputs, tables) must not push the card wider than the screen */
    .htu-legacy [style*="width"]:not(td):not(th):not(.htu-table) { max-width: calc(100cqi - 48px) !important; box-sizing: border-box; }
    .htu-legacy table[width], .htu-legacy td[width], .htu-legacy th[width] { width: auto !important; }
    .htu-legacy table:not(.htu-table) { width: 100% !important; }
}

/* Print (v1.9): print/receipt pages (batch B8) and any page printed from the browser - shell hidden, card chrome removed */
@media print {
    .htu-shell .main-header, .htu-shell .main-sidebar, .htu-shell .main-footer, .htu-shell .control-sidebar,
    .htu-shell__notices, .htu-shell .content-header .breadcrumb, .no-print, .htu-back { display: none !important; }
    .htu-shell .content-wrapper, .htu-shell .main-footer { margin: 0 !important; }
    .htu-shell, .htu-shell .wrapper, .htu-shell .content-wrapper { background: #fff !important; }
    .htu-section, .htu-kv, .htu-table-wrap { border: 0 !important; box-shadow: none !important; background: transparent !important; }
    .htu-section { padding: 0 !important; }
    .htu-table-wrap, .htu-legacy > .htu-section { overflow: visible !important; }
    .htu-table th, .htu-table td { border: 1px solid #999 !important; }
    .htu-actions, .htu-toolbar .htu-btn { display: none !important; }
}

/* =====================================================================
   Full rebuilds of high-traffic pages (v2.1): fin_status, PaymentReceiptList,
   SeparateRecpAdd, schedule, marks, Std_Info_Update, regClosePrg
   ===================================================================== */
.htu-kv--accent { background: var(--htu-info-bg); border-color: var(--htu-info-bd); }
.htu-kv--accent .htu-kv__label { color: var(--htu-info-fg); }
.htu-kv--accent .htu-kv__value { font-size: var(--htu-fs-lg); }
@media (min-width: 768px) { .htu-kv--wide-md { grid-column: span 2; } }
.htu-field__label.htu-req-after::after { content: " *"; color: var(--htu-danger-fg); }
.htu-field__error { color: var(--htu-danger-fg) !important; font-weight: 700; font-size: var(--htu-fs-xs); }
.htu-field__hint { display: block; margin-block-start: var(--htu-space-1); font-size: var(--htu-fs-xs); color: var(--htu-text-muted); }
.htu-section__title > span:empty { display: none; }

/* date input + calendar icon (PaymentReceiptList) */
.htu-input-date { display: flex; align-items: center; gap: var(--htu-space-2); }
.htu-input-date .htu-input { flex: 1 1 auto; min-width: 0; }
.htu-input-date__btn { flex: 0 0 auto; width: 28px; height: 28px; padding: 4px; border: 1px solid var(--htu-gray-300); border-radius: var(--htu-radius-sm); background: var(--htu-surface); cursor: pointer; }
.htu-input-date__btn:hover { border-color: var(--htu-accent); }

/* schedule: brand colours for the existing calendar view and its toggle */
.htu-schedule .btn-group { display: inline-flex; border: 1px solid var(--htu-gray-300); border-radius: var(--htu-radius); overflow: hidden; }
.htu-schedule .btn-group > .btn { min-height: 36px; padding: 6px 16px; border: 0; border-radius: 0; font-weight: 700; background: var(--htu-surface); color: var(--htu-text); box-shadow: none; }
.htu-schedule .btn-group > .btn-primary { background: var(--htu-primary); color: var(--htu-white); }
.htu-schedule #schCalScroll { border-color: var(--htu-border); box-shadow: var(--htu-shadow-sm); }
.htu-schedule #schCalHead { background: var(--htu-navy-900); border-bottom-color: var(--htu-accent); }
.htu-schedule .schSub { border-inline-start-color: var(--htu-accent); background: var(--htu-surface-alt); }
.htu-schedule .schKey { color: var(--htu-navy-900); }

/* marks */
.htu-marks__table > tbody > tr > td { padding: var(--htu-space-2) var(--htu-space-3); border-block-end: 1px solid var(--htu-gray-200); }
.htu-marks__table tr.htu-marks__sem > td { background: var(--htu-navy-900); color: var(--htu-white); font-weight: 800; font-size: var(--htu-fs-md); }
.htu-marks__table tr.htu-marks__head > td { background: var(--htu-surface-alt); color: var(--htu-text); font-weight: 700; white-space: nowrap; border-block-end: 2px solid var(--htu-border); }
.htu-marks__table tr[style*="239, 243, 251"] { background-color: #FCFBF9 !important; }
.htu-marks__summary { width: 100%; margin: var(--htu-space-2) 0 var(--htu-space-3); border-collapse: separate; border-spacing: 0; background: var(--htu-info-bg); border: 1px solid var(--htu-info-bd); border-radius: var(--htu-radius); }
.htu-marks__summary td { padding: var(--htu-space-2) var(--htu-space-3); border: 0 !important; }
.htu-marks__summary .htu-marks__k { color: var(--htu-info-fg); font-weight: 700; }
.htu-marks__summary span { font-weight: 800; color: var(--htu-text) !important; }
.htu-marks__totals:not(:has(table)) { display: none; }
.htu-marks__totals .table { margin: 0; }
.htu-marks__totals td[style*="firebrick" i] { color: var(--htu-info-fg) !important; font-weight: 700; }

/* personal information */
.htu-idpic { width: 150px; height: auto; border: 1px solid var(--htu-border); border-radius: var(--htu-radius-sm); }
.htu-form .approveCheck, .htu-form .approveCheck label { font-weight: 700; }
.htu-form .approveCheck input { width: 18px; height: 18px; accent-color: var(--htu-primary); margin-inline-end: var(--htu-space-2); vertical-align: middle; }

/* registration (regClosePrg) */
.htu-reg__fields { grid-template-columns: minmax(160px, 1fr) minmax(220px, 2fr) minmax(110px, .6fr) minmax(110px, .6fr); }
.htu-reg__crsname { display: flex; align-items: center; min-height: var(--htu-control-h); padding: var(--htu-space-2) var(--htu-space-3); border: 1px dashed var(--htu-gray-300); border-radius: var(--htu-radius); background: var(--htu-surface-alt); font-weight: 700; }
.htu-reg__crsname:empty::before { content: "\2014"; color: var(--htu-gray-300); }
.htu-reg__captcha { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--htu-space-3); }
.htu-reg__captcha .htu-field { margin: 0; min-width: 200px; }
.htu-reg__captcha-img img { display: block; border: 1px solid var(--htu-border); border-radius: var(--htu-radius-sm); }
@container htu-list (max-width: 760px) { .htu-reg__fields { grid-template-columns: 1fr 1fr; } .htu-reg__name { grid-column: 1 / -1; } }
@container htu-list (max-width: 420px) { .htu-reg__fields { grid-template-columns: 1fr; } }
/* bower bootstrap.min.css (custom build) sets b, strong { color: #fff } globally - inside new pages bold text keeps its context colour */
.htu-content b, .htu-content strong { color: inherit; }
/* forms can also show their data tables as cards when narrow */
.htu-form { container: htu-list / inline-size; }
.htu-form .htu-stat__value { font-size: var(--htu-fs-lg); }
/* a card whose only content is a grid that rendered no rows */
.htu-section:has(> .htu-table-wrap):not(:has(table)):not(:has(input:not([type="hidden"]), select, textarea, img, .htu-section__title, .htu-kv, .htu-alert:not(:empty))) { display: none; }
.htu-field > .htu-field__error[style*="visibility:hidden"] { display: none; }

/* Main registration page regPrg1 (v2.3) */
.htu-reg__term { display: flex; flex-wrap: wrap; gap: var(--htu-space-3); }
.htu-reg__term-item { display: inline-flex; align-items: baseline; gap: var(--htu-space-2); padding: var(--htu-space-2) var(--htu-space-4); background: var(--htu-surface-alt); border: 1px solid var(--htu-gray-200); border-radius: var(--htu-radius); font-weight: 700; color: var(--htu-text-muted); }
.htu-reg__term-value { color: var(--htu-navy-900); font-size: var(--htu-fs-lg); font-weight: 800; }
.htu-reg__actions .htu-btn { flex: 1 1 180px; }
.htu-reg__hidden { display: contents; }
.htu-reg .htu-table--grid input[type="submit"], .htu-reg .htu-table--grid input[type="button"] { min-height: 32px; padding: 4px 12px; border-radius: var(--htu-radius-sm); border: 1px solid var(--htu-gray-300); background: var(--htu-surface); color: var(--htu-text); font-weight: 700; }
.htu-reg .htu-table--grid input[value="\62D\630\641"], .htu-reg .htu-table--grid input[value="Delete"] { border-color: var(--htu-danger-bd); color: var(--htu-danger-fg); }
/* regPrg1: message card with no message and no balance buttons; action bar whose only button is hidden by code-behind */
.htu-reg .htu-section:has(> .htu-alert:empty):not(:has(input:not([type="hidden"]))) { display: none; }
.htu-actions:has(> input:only-child[style*="display:none"]), .htu-actions:has(> input:only-child[style*="display: none"]) { display: none; }

/* Available-courses dialog AvPlan4 (v2.5) */
.htu-avplan__search { margin-block-end: var(--htu-space-3); }
.htu-avplan__search .htu-field { flex: 1 1 260px; max-width: 420px; }
.htu-plan tr.htu-plan__course { cursor: pointer; }
.htu-plan tr.htu-plan__course:hover > td { background: var(--htu-info-bg); }
.htu-plan [id*="Spn_"] button, .htu-plan .tool-tip button { min-height: 32px; padding: 4px 14px; border: 0; border-radius: var(--htu-radius-sm); font-weight: 700; }
.htu-plan .tool-tip { display: inline-block; }
.htu-plan .tool-tip [disabled] { pointer-events: none; opacity: .75; }
.htu-modal .modal-content { border: 0; border-radius: var(--htu-radius-lg); box-shadow: var(--htu-shadow); overflow: hidden; }
.htu-modal .modal-header { background: var(--htu-navy-900); color: var(--htu-white); border-bottom: 3px solid var(--htu-accent); }
.htu-modal .modal-title { font-weight: 800; }
.htu-modal .modal-header .close { color: var(--htu-white); opacity: 1; text-shadow: none; float: inline-end; }
[dir="rtl"] .htu-modal .modal-header .close { float: left; }
.htu-modal .modal-body > * + * { margin-block-start: var(--htu-space-4); }
.htu-modal .modal-footer { display: flex; justify-content: center; gap: var(--htu-space-3); }
.htu-avplan__captcha { display: flex; justify-content: center; align-items: center; gap: var(--htu-space-3); }
.htu-avplan__captcha img { border: 1px solid var(--htu-border); border-radius: var(--htu-radius-sm); }
.htu-avplan__code { max-width: 240px; margin-inline: auto; text-align: center; }
.htu-avplan__code .htu-input { text-align: center; }
/* AvPlan4 renames trTask to "..._Row_<random>" in code-behind; same zebra / blocked styling as AvPlan3 */
.htu-plan tr[id*="_Row_"][style*="192, 192, 192"], .htu-plan tr[id*="_Row_"][style*="c0c0c0" i] { background-color: transparent !important; }
.htu-plan tr[id*="_Row_"][style*="192, 192, 192"] > td, .htu-plan tr[id*="_Row_"][style*="c0c0c0" i] > td { background: #F4F3F0; }
.htu-plan tr[id*="_Row_"] > td { font-size: var(--htu-fs-sm); }
/* passed courses are coloured LightGreen by code-behind (meant for the old dark-red row): readable green on the light row */
.htu-plan__course span[style*="LightGreen" i] { color: var(--htu-success-fg) !important; }
.htu-plan__course:has(span[style*="LightGreen" i]) > td { background: var(--htu-success-bg); }

/* Home page / internal student profile MainDefault (v2.6) */
.htu-profile__wrap { display: grid; gap: var(--htu-space-4); }
.htu-profile__hero { position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: var(--htu-space-4); border-block-start: 4px solid var(--htu-accent); overflow: hidden; }
.htu-profile__avatar { flex: 0 0 64px; width: 64px; height: 64px; border-radius: 50%; background: var(--htu-primary); color: var(--htu-white); display: flex; align-items: center; justify-content: center; font-size: var(--htu-fs-xl); font-weight: 800; box-shadow: 0 0 0 4px var(--htu-red-050); }
.htu-profile__id { flex: 1 1 220px; min-width: 0; }
.htu-content .htu-profile__name { margin: 0; font-size: var(--htu-fs-xl); font-weight: 800; line-height: 1.3; color: var(--htu-navy-900); overflow-wrap: break-word; }
.htu-content .htu-profile__meta { margin: var(--htu-space-1) 0 0; display: flex; flex-wrap: wrap; gap: var(--htu-space-1) var(--htu-space-4); font-size: var(--htu-fs-sm); color: var(--htu-text-muted); font-variant-numeric: tabular-nums; }
.htu-profile__meta-item { display: inline-flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: break-word; }
.htu-profile__meta-item .fa { color: var(--htu-accent); }
.htu-profile__meta-item:has(> span:empty) { display: none; }
.htu-profile__chip { display: inline-block; padding: 4px 14px; border-radius: 999px; background: var(--htu-success-bg); border: 1px solid var(--htu-success-bd); color: var(--htu-success-fg); font-size: var(--htu-fs-xs); font-weight: 700; white-space: nowrap; }
.htu-profile__chip:has(> .profEmpty), .htu-profile__chip:has(> span:empty) { display: none; }
.htu-profile .htu-kv-grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.htu-profile .htu-section__title { font-size: var(--htu-fs-md); margin-block-end: var(--htu-space-3); }
.htu-profile .htu-section__title .fa { width: 28px; height: 28px; flex: 0 0 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--htu-radius-sm); background: var(--htu-red-050); }
.htu-profile .htu-kv__value { font-variant-numeric: tabular-nums; }
.htu-profile .htu-kv__value .profEmpty { color: var(--htu-gray-300); font-weight: 400; }
.htu-profile .htu-kv--accent .htu-kv__value .profEmpty { color: var(--htu-info-bd); }
.htu-profile .htu-alert { margin: 0; overflow-wrap: break-word; }
@media (max-width: 575px) {
    .htu-profile .htu-kv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--htu-space-2); }
    .htu-profile .htu-kv { padding: var(--htu-space-2) var(--htu-space-3); }
    .htu-profile .htu-kv--wide-md { grid-column: 1 / -1; }
    .htu-profile__avatar { flex-basis: 52px; width: 52px; height: 52px; font-size: var(--htu-fs-lg); }
    .htu-content .htu-profile__name { font-size: var(--htu-fs-lg); }
}
/* announcements: getAnnaouncments() emits AdminLTE chat markup (div.item > i + p.message > a.name > h7.pull-right) */
.htu-announce__list { display: grid; gap: var(--htu-space-2); text-align: start; }
.htu-announce__list .item { display: flex; align-items: flex-start; gap: var(--htu-space-2); margin: 0; padding: var(--htu-space-3) var(--htu-space-4); background: var(--htu-surface-alt); border: 1px solid var(--htu-gray-200); border-radius: var(--htu-radius); transition: border-color .15s ease, background-color .15s ease; }
.htu-announce__list .item:hover { border-color: var(--htu-red-500); background: var(--htu-surface); }
.htu-announce__list .item > .fa { flex: 0 0 auto; width: auto; height: auto; margin: 4px 0 0; color: var(--htu-accent); text-align: center; }
[dir="rtl"] .htu-announce__list .item > .fa-angle-double-right { transform: scaleX(-1); }
.htu-announce__list .item > .message, .htu-announce__list .box > .message { flex: 1 1 auto; min-width: 0; margin: 0; }
.htu-announce__list .message > a, .htu-announce__list .message > a.name { display: block; color: var(--htu-text); font-weight: 700; text-decoration: none; }
.htu-announce__list .message > a:hover, .htu-announce__list .message > a:focus-visible { color: var(--htu-primary); text-decoration: underline; }
.htu-announce__list .message h7, .htu-announce__list .message .pull-right { float: none !important; margin: 0 !important; display: block; color: inherit !important; font-size: var(--htu-fs-sm); line-height: var(--htu-lh); overflow-wrap: break-word; }
.htu-announce__list > .box { margin: var(--htu-space-2) 0 0; padding: 0; border: 0; box-shadow: none; background: transparent; min-height: 0; }
.htu-announce__list > .box > .message:empty { display: none; }
.htu-announce__list > .box > a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 var(--htu-space-4); border: 1px solid var(--htu-primary); border-radius: var(--htu-radius); color: var(--htu-primary); font-weight: 700; text-decoration: none; }
.htu-announce__list > .box > a:hover, .htu-announce__list > .box > a:focus-visible { background: var(--htu-primary); color: var(--htu-white); }
.htu-announce:not(:has(.item)):not(:has(.box)) { display: none; }
@media print {
    .htu-announce { display: none !important; }
    .htu-profile__hero { border-block-start-color: #000 !important; }
    .htu-profile__avatar { box-shadow: none; border: 1px solid #000; color: #000; background: transparent; }
    .htu-profile__sec, .htu-profile .htu-kv { break-inside: avoid; }
}

/* =====================================================================
   v2.7 - Mobile: showModalDialog wrapper + plan dialogs (AvPlan3 / AvPlan4)
   ===================================================================== */
/* ModalDialog/showModalDialog.js wrapper on parent pages (regPrg1, BankReport, fin_status ...):
   backdrop above the AdminLTE header, rounded sheet, large close target. jQuery sets width/height/left/top inline. */
body > .cover { z-index: 65000; background-color: rgba(1, 15, 28, .55); }
body > .dialog { border: 0; border-radius: var(--htu-radius-lg); box-shadow: 0 12px 40px rgba(1, 15, 28, .35); overflow: hidden; padding: 0; box-sizing: border-box; background: var(--htu-surface-alt); }
body > .dialog > br { display: none; }
body > .dialog > iframe { display: block; width: 100%; height: 100%; border: 0; }
body > .dialog > #dialog-close { z-index: 2; top: 8px !important; right: 8px !important; width: 40px; height: 40px; display: flex !important; align-items: center; justify-content: center; border-radius: 50%; background: var(--htu-white); color: var(--htu-navy-900) !important; font-size: 26px !important; line-height: 1; box-shadow: var(--htu-shadow-sm); border: 1px solid var(--htu-border); }
body > .dialog > #dialog-close:hover, body > .dialog > #dialog-close:focus-visible { background: var(--htu-primary); color: var(--htu-white) !important; border-color: var(--htu-primary); }
@media (max-width: 767px) {
    body > .dialog { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; height: 100dvh !important; border-radius: 0; }
    body > .cover #loader { left: 0 !important; width: 100% !important; text-align: center; }
}

/* dialog pages: keep the title clear of the parent's close button (always physical right) */
.htu-dialog .htu-dialog__title { padding-right: 52px; }
[dir="rtl"] .htu-dialog .htu-dialog__title, .htu-dialog[dir="rtl"] .htu-dialog__title { padding-left: 0; }
/* section rows renamed by AvPlan4 code-behind (_Row_): same blocked (red) state as trTask */
.htu-plan tr[id*="_Row_"][style*="255, 0, 0"], .htu-plan tr[id*="_Row_"][style*="red" i] { background-color: transparent !important; }
.htu-plan tr[id*="_Row_"][style*="255, 0, 0"] > td, .htu-plan tr[id*="_Row_"][style*="red" i] > td { background: var(--htu-danger-bg); color: var(--htu-danger-fg); }

@media (max-width: 640px) {
    .htu-dialog .htu-content { padding: var(--htu-space-3); }
    .htu-dialog .htu-dialog__title { font-size: var(--htu-fs-md); min-height: 40px; display: flex; align-items: center; }
    .htu-avplan__search { flex-wrap: nowrap; }
    .htu-avplan__search .htu-field { flex: 1 1 auto; max-width: none; min-width: 0; }
    .htu-avplan__search .htu-input { font-size: 16px; }
    .htu-avplan__search > .htu-btn { flex: 0 0 auto; width: auto; min-height: 44px; }

    /* table -> cards */
    .htu-dialog .htu-table-wrap { overflow: visible; border: 0; border-radius: 0; background: transparent; }

    /* course card */
    .htu-dialog .htu-plan tr.htu-plan__course { display: grid; grid-template-columns: auto repeat(2, minmax(0, 1fr)); gap: 8px 12px; align-items: start; margin-block-start: var(--htu-space-3); padding: var(--htu-space-3); background: var(--htu-surface) !important; border: 1px solid var(--htu-border); border-inline-start: 4px solid var(--htu-accent); border-radius: var(--htu-radius); box-shadow: var(--htu-shadow-sm); }

    /* section card (shown when the course is expanded) */
    .htu-dialog .htu-plan tr.htu-plan__task:not(.collapse), .htu-dialog .htu-plan tr.htu-plan__task.collapse.in { display: grid; }

    /* register modal */
    .htu-modal .modal-dialog { margin: 8px; }
    .htu-modal .modal-body { padding: var(--htu-space-3); }
    .htu-modal .htu-kv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--htu-space-2); }
    .htu-modal .htu-kv { padding: var(--htu-space-2) var(--htu-space-3); }
    .htu-modal .htu-avplan__code { max-width: none; }
    .htu-modal .htu-avplan__code .htu-input { font-size: 16px; }
    .htu-modal .modal-footer { padding: var(--htu-space-3); }
    .htu-modal .modal-footer .htu-btn { flex: 1 1 0; min-height: 44px; }
}

/* =====================================================================
   v2.8 - AvPlan4 / AvPlan3 dialog visual refresh (all widths, phone first)
   ===================================================================== */
.htu-dialog { background: linear-gradient(180deg, #EEF1F4 0, var(--htu-surface-alt) 220px); min-height: 100vh; }
/* header band */
.htu-dialog .htu-content > .htu-dialog__title { position: relative; margin: calc(var(--htu-space-4) * -1) calc(var(--htu-space-4) * -1) var(--htu-space-4); padding: 18px 56px 18px var(--htu-space-5); padding-left: var(--htu-space-5); background: var(--htu-navy-900); color: var(--htu-white); border-block-end: 3px solid var(--htu-accent); font-size: 17px; font-weight: 800; line-height: 1.5; display: flex; align-items: center; gap: 12px; }
.htu-dialog .htu-content > .htu-dialog__title::before { content: "\f02d"; font-family: FontAwesome; font-weight: normal; flex: 0 0 38px; width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .1); color: var(--htu-red-500); font-size: 18px; }
/* the parent's close button sits on the physical right: keep it clear in both directions */
.htu-dialog .htu-content > .htu-dialog__title { padding-right: 56px; }

/* search: one joined pill with an icon */
.htu-avplan__search { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: nowrap; align-items: stretch; gap: 0; margin: 0 0 var(--htu-space-4); padding: 6px; background: var(--htu-surface); border: 1px solid var(--htu-border); border-radius: 999px; box-shadow: 0 6px 18px rgba(1, 15, 28, .08); }
.htu-avplan__search:focus-within { border-color: var(--htu-primary); box-shadow: 0 0 0 3px rgba(200, 32, 43, .15), 0 6px 18px rgba(1, 15, 28, .08); }
.htu-avplan__search .htu-field { position: relative; flex: 1 1 auto; min-width: 0; max-width: none; margin: 0; }
.htu-avplan__search .htu-field::before { content: "\f002"; font-family: FontAwesome; position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--htu-text-muted); font-size: 15px; pointer-events: none; }
.htu-avplan__search .htu-input { height: 44px; min-height: 44px; padding-inline: 40px 12px; border: 0; background: transparent; box-shadow: none !important; font-size: 16px; border-radius: 999px; }
.htu-avplan__search .htu-input:focus { outline: none; }
.htu-avplan__search > .htu-btn { flex: 0 0 auto; width: auto; min-width: 88px; min-height: 44px; padding-inline: 20px; border-radius: 999px; }

/* empty state (no course rows rendered) */
.htu-dialog .htu-table-wrap:not(:has(tr.htu-plan__course)) { border: 0; background: transparent; overflow: visible; }
.htu-dialog .htu-table-wrap:not(:has(tr.htu-plan__course)) > .htu-plan > thead { display: none; }
.htu-dialog .htu-table-wrap:not(:has(tr.htu-plan__course))::after { content: "\f0ce"; display: flex; align-items: center; justify-content: center; width: 72px; height: 72px; margin: 40px auto 12px; order: -1; border-radius: 50%; background: var(--htu-surface); border: 1px dashed var(--htu-border); color: var(--htu-gray-300); font-family: FontAwesome; font-size: 28px; }
.htu-dialog .htu-table-wrap:not(:has(tr.htu-plan__course))::before { content: "No courses to show"; }
:lang(ar) .htu-dialog .htu-table-wrap:not(:has(tr.htu-plan__course))::before, .htu-dialog:lang(ar) .htu-table-wrap:not(:has(tr.htu-plan__course))::before { content: "\644\627  \62A\648\62C\62F  \645\648\627\62F  \644\644\639\631\636"; }
.htu-dialog .htu-table-wrap:not(:has(tr.htu-plan__course)) { display: flex; flex-direction: column; align-items: center; color: var(--htu-text-muted); font-weight: 700; padding-block-end: 32px; }

/* desktop table polish */
.htu-dialog .htu-table-wrap:has(tr.htu-plan__course) { border-radius: var(--htu-radius-lg); box-shadow: var(--htu-shadow-sm); }
.htu-dialog .htu-plan input[id$="btnExpand"] { width: 32px; height: 32px; padding: 0; border-radius: 50%; border: 1px solid var(--htu-border); background: var(--htu-surface); color: var(--htu-primary); font-size: 18px; font-weight: 800; line-height: 1; transition: background-color .15s ease, color .15s ease, transform .2s ease; }
.htu-dialog .htu-plan tr.htu-plan__course:not(.collapsed) input[id$="btnExpand"][value="-"] { background: var(--htu-primary); color: var(--htu-white); border-color: var(--htu-primary); }

@media (max-width: 640px) {
    .htu-dialog .htu-content { padding: var(--htu-space-3); }
    .htu-dialog .htu-content > .htu-dialog__title { margin: calc(var(--htu-space-3) * -1) calc(var(--htu-space-3) * -1) var(--htu-space-3); padding: 14px 56px 14px var(--htu-space-4); padding-left: var(--htu-space-4); font-size: 15px; }
    .htu-dialog .htu-content > .htu-dialog__title::before { flex-basis: 34px; width: 34px; height: 34px; font-size: 16px; }
    .htu-avplan__search { top: 6px; margin-block-end: var(--htu-space-3); }

    /* course card */
    .htu-dialog .htu-plan tr.htu-plan__course { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 10px 8px; padding: 14px; border: 1px solid var(--htu-border); border-inline-start: 0; border-radius: var(--htu-radius-lg); box-shadow: 0 2px 10px rgba(1, 15, 28, .06); position: relative; overflow: hidden; }

    /* section cards */
    .htu-dialog .htu-plan tr.htu-plan__task { position: relative; gap: 10px 12px; margin-block-start: 8px; margin-inline-start: 14px; padding: 14px; border: 1px solid var(--htu-gray-200); border-radius: var(--htu-radius-lg); box-shadow: 0 1px 4px rgba(1, 15, 28, .05); }
}
@media (max-width: 640px) {
    /* section card: two key numbers on top, the rest as compact chips, long values full width */
    .htu-dialog .htu-plan tr.htu-plan__task { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
}

/* =====================================================================
   v2.9 (B14) - schedule calendar + phone agenda, Classes search page,
   dialog empty state from resources
   ===================================================================== */
/* course dialogs: empty-state text now comes from the page (data-empty = LBL_No_courses_available) */
.htu-dialog .htu-table-wrap[data-empty]:not(:has(tr.htu-plan__course))::before, :lang(ar) .htu-dialog .htu-table-wrap[data-empty]:not(:has(tr.htu-plan__course))::before, .htu-dialog:lang(ar) .htu-table-wrap[data-empty]:not(:has(tr.htu-plan__course))::before { content: attr(data-empty); }

/* ---------- schedule.aspx ---------- */
.htu-schedule { container: htu-list / inline-size; }
.htu-schedule__views { display: flex; justify-content: center; margin: 0 0 var(--htu-space-4); }
.htu-schedule .htu-schedule__toggle { display: inline-flex; gap: 4px; padding: 4px; border: 1px solid var(--htu-border); border-radius: 999px; background: var(--htu-surface-alt); overflow: visible; }
.htu-schedule .htu-schedule__toggle > .btn { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 18px; border: 0; border-radius: 999px !important; background: transparent; color: var(--htu-text-muted); font-weight: 700; box-shadow: none; float: none; }
.htu-schedule .htu-schedule__toggle > .btn:hover { color: var(--htu-text); background: var(--htu-surface); }
.htu-schedule .htu-schedule__toggle > .btn-primary, .htu-schedule .htu-schedule__toggle > .btn-primary:hover, .htu-schedule .htu-schedule__toggle > .btn-primary:focus { background: var(--htu-primary); color: var(--htu-white); box-shadow: 0 2px 8px rgba(200, 32, 43, .25); }
.htu-schedule .htu-schedule__toggle > .btn:focus-visible { outline: none; box-shadow: var(--htu-focus); }
.htu-schedule__cal { text-align: start; }

.htu-schedule #schCalScroll { border: 1px solid var(--htu-border); border-radius: var(--htu-radius-lg); box-shadow: var(--htu-shadow-sm); background: var(--htu-surface); overflow-x: auto; }
.htu-schedule #schCal { min-width: 760px; position: relative; text-align: start; }
.htu-schedule #schCalHead { display: grid; position: sticky; top: 0; z-index: 10; background: var(--htu-navy-900); color: var(--htu-white); font-size: 14px; font-weight: 800; border-bottom: 3px solid var(--htu-accent); }
.htu-schedule #schCalHead > div { padding: 12px 4px; text-align: center; border-inline-start: 1px solid rgba(255, 255, 255, .12); }
.htu-schedule #schCalHead > div:first-child { background: rgba(255, 255, 255, .06); font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, .75); }
.htu-schedule #schCalBody { position: relative; }
.htu-schedule #schCalRow { position: relative; }
.htu-schedule .schSlot { height: 52px; box-sizing: border-box; padding: 4px 6px; border-bottom: 1px solid var(--htu-gray-200); border-inline-end: 1px solid var(--htu-border); background: var(--htu-surface-alt); color: var(--htu-text-muted); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; }
.htu-schedule .schDay { position: relative; border-inline-start: 1px solid var(--htu-gray-200); background: repeating-linear-gradient(to bottom, transparent 0 25px, #F4F3F0 25px 26px, transparent 26px 51px, var(--htu-gray-200) 51px 52px); }
.htu-schedule .schEv { position: absolute; box-sizing: border-box; overflow: hidden; padding: 6px 8px; border: 1px solid; border-inline-start-width: 5px; border-radius: var(--htu-radius); font-size: 13px; line-height: 1.4; color: var(--htu-text) !important; font-weight: 500; cursor: pointer; box-shadow: 0 1px 3px rgba(1, 15, 28, .12); transition: box-shadow .15s ease, transform .15s ease; }
.htu-schedule .schEv:hover { box-shadow: 0 6px 16px rgba(1, 15, 28, .18); transform: translateY(-1px); z-index: 6; }
.htu-schedule .schEv b { display: block; font-size: 13px; font-weight: 800; color: var(--htu-navy-900); font-variant-numeric: tabular-nums; }
.htu-schedule .schEv small { display: block; font-size: 12px; color: var(--htu-text-muted); }
.htu-schedule .schEv.schShort small { display: none; }
.htu-schedule .schEv.schShort { font-size: 12px; }
.htu-schedule__count { margin-block-start: var(--htu-space-2); font-size: 12px; color: var(--htu-text-muted); text-align: center; }

/* event details dialog (JS toggles #schCalOverlay display) */
.htu-schedule #schCalOverlay { position: fixed; inset: 0; z-index: 2000; overflow-y: auto; padding: var(--htu-space-4); background: rgba(1, 15, 28, .55); }
.htu-schedule #schCalCard { max-width: 520px; margin: 8vh auto; padding: 0; overflow: hidden; background: var(--htu-surface); border-radius: var(--htu-radius-lg); box-shadow: 0 16px 48px rgba(1, 15, 28, .35); text-align: start; }
.htu-schedule__card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--htu-space-3); padding: 14px 16px; background: var(--htu-navy-900); color: var(--htu-white); border-bottom: 3px solid var(--htu-accent); }
.htu-schedule #schCalTitle { color: var(--htu-white); line-height: 1.4; }
.htu-schedule #schCalClose { flex: 0 0 36px; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: var(--htu-white); font-size: 22px; line-height: 1; cursor: pointer; }
.htu-schedule #schCalClose:hover, .htu-schedule #schCalClose:focus-visible { background: var(--htu-primary); outline: none; }
.htu-schedule #schCalDetails { padding: 14px 16px; font-size: 14px; line-height: 1.7; text-align: start; }
.htu-schedule .schRow { display: flex; gap: 12px; padding: 8px 2px; border-bottom: 1px solid var(--htu-gray-200); }
.htu-schedule .schRow:last-child { border-bottom: 0; }
.htu-schedule .schKey { flex: 0 0 128px; font-weight: 700; color: var(--htu-text-muted); }
.htu-schedule .schVal { flex: 1; min-width: 0; color: var(--htu-text); font-weight: 700; overflow-wrap: break-word; }
.htu-schedule .schSub { margin-block-end: 10px; padding: 10px 12px; background: var(--htu-red-050); border-radius: var(--htu-radius); border-inline-start: 4px solid var(--htu-accent); color: var(--htu-navy-900); font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* agenda (phones) */
.htu-agenda { display: none; }
.htu-agenda__day + .htu-agenda__day { margin-block-start: var(--htu-space-4); }
.htu-content .htu-agenda__day-title { display: flex; align-items: center; justify-content: space-between; margin: 0 0 var(--htu-space-2); padding: 8px 14px; background: var(--htu-navy-900); color: var(--htu-white); border-radius: var(--htu-radius); font-size: 15px; font-weight: 800; }
.htu-agenda__day-count { min-width: 26px; height: 26px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--htu-accent); color: var(--htu-white); font-size: 13px; }
.htu-agenda__item { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 12px; margin-block-end: var(--htu-space-2); padding: 12px; background: var(--htu-surface); border: 1px solid var(--htu-border); border-inline-start-width: 5px; border-radius: var(--htu-radius); box-shadow: var(--htu-shadow-sm); }
.htu-agenda__time { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 2px; padding-block-start: 2px; font-variant-numeric: tabular-nums; }
.htu-agenda__time strong { font-size: 16px; font-weight: 800; color: var(--htu-navy-900); }
.htu-agenda__time span { font-size: 12px; color: var(--htu-text-muted); }
.htu-agenda__time span::before { content: ""; display: block; width: 2px; height: 10px; margin: 0 auto 2px; background: var(--htu-gray-300); }
.htu-agenda__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; }
.htu-agenda__crs { padding: 2px 10px; border-radius: 999px; background: var(--htu-red-050); color: var(--htu-primary); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.htu-agenda__room { font-size: 12px; font-weight: 700; color: var(--htu-text-muted); }
.htu-agenda__room::before { content: "\f041"; font-family: FontAwesome; margin-inline-end: 4px; color: var(--htu-accent); }
.htu-agenda__name { margin-block: 6px 4px; font-size: 15px; font-weight: 800; line-height: 1.4; color: var(--htu-navy-900); overflow-wrap: break-word; }
.htu-agenda__instr { font-size: 13px; color: var(--htu-text); }
.htu-agenda__k { color: var(--htu-text-muted); font-weight: 700; }
.htu-agenda__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 8px; }
.htu-agenda__chip { display: inline-flex; align-items: baseline; gap: 4px; padding: 3px 8px; border-radius: var(--htu-radius-sm); background: var(--htu-surface-alt); font-size: 12px; }
.htu-agenda__chip b { color: var(--htu-text); font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
    .htu-schedule .htu-agenda.is-ready { display: block; }
    .htu-schedule .htu-agenda.is-ready ~ #schCalScroll { display: none; }
    .htu-schedule__views { margin-block-end: var(--htu-space-3); }
    .htu-schedule .htu-schedule__toggle { width: 100%; }
    .htu-schedule .htu-schedule__toggle > .btn { flex: 1 1 0; justify-content: center; padding-inline: 10px; }
    .htu-schedule #schCalCard { margin: 4vh auto; }
    .htu-schedule .schKey { flex-basis: 104px; }
}
@media print {
    .htu-schedule__views, .htu-agenda { display: none !important; }
    .htu-schedule #schCalScroll { display: block !important; overflow: visible; }
    .htu-schedule .schEv { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Classes.aspx ---------- */
.htu-classes > .htu-section:first-child { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: var(--htu-space-4); align-items: end; }
.htu-classes > .htu-section:first-child > .htu-section__title, .htu-classes > .htu-section:first-child > .htu-classes__actions { grid-column: 1 / -1; }
.htu-classes .htu-classes__fields { display: contents; }
.htu-classes .htu-classes__fields .htu-field { margin: 0; min-width: 0; }
.htu-classes .htu-classes__actions { margin: 0; justify-content: flex-start; }
.htu-classes .htu-classes__actions .htu-btn { min-width: 140px; }
.htu-classes .htu-classes__title .htu-classes__title-text { font: inherit; color: inherit; }
.htu-classes .htu-classes__results:not(:has(tbody tr)) { display: none; }
.htu-classes__count { margin-block-end: var(--htu-space-3); font-size: 13px; font-weight: 700; color: var(--htu-text-muted); }
.htu-classes__count > span:not(:empty) { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--htu-info-bg); color: var(--htu-info-fg); }
.htu-classes__table td:nth-child(2), .htu-classes__table td:nth-child(3), .htu-classes__table td:nth-child(4), .htu-classes__table td:nth-child(6) { font-variant-numeric: tabular-nums; text-align: center; }
.htu-classes__table td:nth-child(5) { font-weight: 700; color: var(--htu-navy-900); }
.htu-classes__table td:nth-child(1) { color: var(--htu-text-muted); text-align: center; }
/* code-behind paints even rows rgb(239,243,251): use the brand zebra */
.htu-classes__table tr[style*="239, 243, 251"] { background-color: transparent !important; }
.htu-classes__table tbody tr[style*="239, 243, 251"] > td { background: var(--htu-surface-alt); }
@container htu-list (max-width: 640px) {
    .htu-classes__table tbody tr[style*="239, 243, 251"] > td { background: transparent; }
    .htu-classes__table td:nth-child(1) { display: none !important; }
    .htu-classes__table td:nth-child(5) { order: -1; display: block !important; padding-block: 4px 8px !important; font-size: 16px; }
    .htu-classes__table td:nth-child(5)::before { display: none; }
    .htu-classes__table tr { display: flex !important; flex-direction: column; }
    .htu-classes__table td { text-align: start !important; }
}
@media (max-width: 640px) {
    .htu-classes > .htu-section:first-child { grid-template-columns: minmax(0, 1fr); gap: var(--htu-space-3); }
    .htu-classes .htu-classes__actions .htu-btn { width: 100%; min-height: 44px; }
    .htu-classes .htu-input { font-size: 16px; }
}

/* v3.0 (B14 review): view switch above the calendar/table, compact agenda facts, Classes year/semester side by side on phones */
.htu-schedule > .htu-section:has(#schCalWrap) { display: flex; flex-direction: column; }
.htu-schedule > .htu-section:has(#schCalWrap) > .htu-schedule__views { order: -1; }
.htu-agenda__meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.htu-agenda__chip { flex-direction: column; align-items: flex-start; gap: 0; padding: 6px 8px; }
.htu-agenda__chip .htu-agenda__k { font-size: 11px; font-weight: 700; line-height: 1.3; }
.htu-agenda__chip b { font-size: 14px; }
@media (max-width: 640px) {
    .htu-classes > .htu-section:first-child { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .htu-classes > .htu-section:first-child .htu-field { grid-column: 1 / -1; }
    .htu-classes > .htu-section:first-child [id$="_tr1"] > .htu-field { grid-column: auto; }
}
/* v3.0 (final review): no empty time grid when the semester has no lectures; 16px form fields on phones (iOS zooms into smaller ones) */
.htu-schedule #schCalWrap:has(#schCalEmpty[style*="block"]) #schCalScroll { display: none; }
@media (max-width: 991px) {
    .htu-content input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="image"]):not([type="hidden"]), .htu-content select, .htu-content textarea { font-size: 16px !important; }
}
/* schedule: code-behind already shows lblmsg ("no registration information") - do not repeat the calendar's own empty message */
.htu-schedule .htu-section:has([id$="_lblmsg"]) #schCalEmpty { display: none !important; }
/* phones and tablets: text links get a finger-sized hit area (WCAG 2.5.8: >= 24px, aim 32px) */
@media (max-width: 991px) {
    .htu-content a[href]:not(.htu-btn):not([class*="btn"]) { display: inline-block; padding-block: 6px; }
}
/* legacy tables shown as cards: title rows above the header stay as a plain heading */
@container htu-list (max-width: 640px) {
    .htu-table--stack tr.htu-table__caption { border: 0; box-shadow: none; background: transparent; padding: 0; margin-block-end: var(--htu-space-2); }
    .htu-table--stack tr.htu-table__caption > th, .htu-table--stack tr.htu-table__caption > td { display: block; width: 100%; padding: 0 !important; border: 0 !important; background: transparent !important; color: var(--htu-navy-900) !important; font-weight: 800; text-align: start !important; }
}

/* =====================================================================
   v3.3 (B16) - AvPlan3 / AvPlan4: compact cards, less empty space
   ===================================================================== */
/* desktop table: tighter rows and header */
.htu-dialog .htu-content > .htu-dialog__title { padding-block: 12px; font-size: 16px; }
.htu-dialog .htu-content > .htu-dialog__title::before { flex-basis: 32px; width: 32px; height: 32px; font-size: 15px; border-radius: 8px; }
.htu-avplan__search { margin-block-end: var(--htu-space-3); padding: 4px; }
.htu-avplan__search .htu-input { height: 40px; min-height: 40px; }
.htu-avplan__search > .htu-btn { min-height: 40px; }
.htu-dialog .htu-plan td, .htu-dialog .htu-plan th { padding: 6px 10px; }
.htu-dialog .htu-plan tr.htu-plan__course > td { padding-block: 8px; }

@media (max-width: 640px) {
    .htu-dialog .htu-content { padding: 10px; }
    .htu-dialog .htu-content > .htu-dialog__title { margin: -10px -10px 10px; padding: 10px 52px 10px 12px; font-size: 14px; line-height: 1.4; gap: 10px; }
    .htu-dialog .htu-content > .htu-dialog__title::before { flex-basis: 28px; width: 28px; height: 28px; font-size: 13px; }
    .htu-avplan__search { top: 4px; margin-block-end: 10px; }

    /* course card: [no + name | expand] then one compact facts line */
    .htu-dialog .htu-plan tr.htu-plan__course { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-block-start: 8px; padding: 10px 12px; border-radius: var(--htu-radius); box-shadow: 0 1px 3px rgba(1, 15, 28, .08); }

    /* section card: numbers + facts in one wrapped line, long values on their own line, action last */
    .htu-dialog .htu-plan tr.htu-plan__task { display: none; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; margin-block-start: 6px; margin-inline-start: 12px; padding: 10px 12px; border-radius: var(--htu-radius); box-shadow: none; }
}

/* =====================================================================
   v3.3 (B16) - date picker (CalendarControl.js, loaded by the master on every page)
   ===================================================================== */
body #CalendarControl { background: var(--htu-surface); border: 1px solid var(--htu-border); border-radius: var(--htu-radius-lg); box-shadow: 0 12px 32px rgba(1, 15, 28, .22); overflow: hidden; z-index: 3000; padding: 0; font-family: var(--htu-font-latin); }
body #CalendarControlIFrame { z-index: 2999; border-radius: var(--htu-radius-lg); }
body #CalendarControl table { border: 0; border-collapse: separate; border-spacing: 2px; margin: 0; padding: 6px 8px 8px; font: 13px/1.2 var(--htu-font-latin); background: var(--htu-surface); direction: ltr; }
body #CalendarControl tr.header:first-child { background: transparent; }
body #CalendarControl tr.header:first-child td { padding: 6px 2px 8px; border-bottom: 1px solid var(--htu-gray-200); }
body #CalendarControl .title { color: var(--htu-navy-900); font-weight: 800; font-size: 14px; line-height: 1.3; text-align: center; }
body #CalendarControl .previous, body #CalendarControl .next { font-size: 0; white-space: nowrap; padding: 0; }
body #CalendarControl .previous { text-align: left; }
body #CalendarControl .next { text-align: right; }
body #CalendarControl .previous a, body #CalendarControl .next a { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin: 0 1px; border-radius: 50%; color: var(--htu-navy-900); font-size: 16px; font-weight: 700; text-decoration: none; }
body #CalendarControl .previous a:hover, body #CalendarControl .next a:hover { background: var(--htu-red-050); color: var(--htu-primary); }
body #CalendarControl th { padding: 6px 0 4px; color: var(--htu-text-muted); font-size: 11px; font-weight: 700; text-align: center; background: transparent; }
body #CalendarControl td { padding: 0; text-align: center; background: transparent; }
body #CalendarControl .weekday, body #CalendarControl .weekend, body #CalendarControl .current { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; margin: 0 auto; border: 0; border-radius: 50%; background: transparent; color: var(--htu-text); font-weight: 600; text-decoration: none; font-variant-numeric: tabular-nums; }
body #CalendarControl .weekend { color: var(--htu-text-muted); background: transparent; }
body #CalendarControl .weekday:hover, body #CalendarControl .weekend:hover { background: var(--htu-red-050); color: var(--htu-primary); border: 0; }
body #CalendarControl .current, body #CalendarControl .current:hover { background: var(--htu-primary); color: var(--htu-white); border: 0; font-weight: 800; }
body #CalendarControl tr.header:last-child { background: transparent; }
body #CalendarControl tr.header:last-child th { padding: 8px 0 2px !important; border-top: 1px solid var(--htu-gray-200); color: var(--htu-gray-300); font-size: 13px; }
body #CalendarControl tr.header:last-child th a { display: inline-block; padding: 4px 12px; border-radius: 999px; color: var(--htu-primary); font-weight: 700; text-decoration: none; }
body #CalendarControl tr.header:last-child th a:hover { background: var(--htu-red-050); }
/* the textbox-side calendar icon used by legacy pages */
.htu-content img[src*="calender" i] { width: 24px; height: 24px; padding: 2px; border-radius: var(--htu-radius-sm); cursor: pointer; vertical-align: middle; }

/* =====================================================================
   v3.3 (B16) - sidebar menu
   ===================================================================== */
.htu-shell.skin-red .sidebar { padding-block-end: var(--htu-space-5); }
.htu-shell.skin-red .sidebar-menu > li > a { display: flex; align-items: center; gap: 10px; margin: 2px 8px; padding: 10px 12px; border-inline-start: 0 !important; border-radius: var(--htu-radius); font-size: 14px; font-weight: 600; line-height: 1.35; transition: background-color .15s ease, color .15s ease; }
.htu-shell.skin-red .sidebar-menu > li > a > .fa:first-child, .htu-shell.skin-red .sidebar-menu > li > a > .glyphicon:first-child { flex: 0 0 20px; width: 20px; margin: 0; text-align: center; font-size: 15px; color: #8FA3B5; }
.htu-shell.skin-red .sidebar-menu > li > a > span:not(.pull-right-container):not([class*="pull-"]) { flex: 1 1 auto; min-width: 0; }
.htu-shell.skin-red .sidebar-menu > li > a > [class*="pull-"] { position: static; margin-inline-start: auto; transform: none; }
.htu-shell.skin-red .sidebar-menu > li:hover > a { background: rgba(255, 255, 255, .06); }
.htu-shell.skin-red .sidebar-menu > li.active > a, .htu-shell.skin-red .sidebar-menu > li.menu-open > a { background: rgba(255, 255, 255, .08); color: var(--htu-white); box-shadow: inset 3px 0 0 var(--htu-accent); }
[dir="rtl"] .htu-shell.skin-red .sidebar-menu > li.active > a, [dir="rtl"] .htu-shell.skin-red .sidebar-menu > li.menu-open > a { box-shadow: inset -3px 0 0 var(--htu-accent); }
.htu-shell.skin-red .sidebar-menu > li.active > a > .fa:first-child, .htu-shell.skin-red .sidebar-menu > li.menu-open > a > .fa:first-child, .htu-shell.skin-red .sidebar-menu > li:hover > a > .fa:first-child { color: var(--htu-red-500); }
.htu-shell.skin-red .sidebar-menu > li > .treeview-menu { margin: 0 8px 6px; padding: 4px 0 6px; background: transparent; border-inline-start: 1px solid rgba(255, 255, 255, .10); margin-inline-start: 26px; }
.htu-shell.skin-red .sidebar-menu .treeview-menu > li > a { display: flex; align-items: flex-start; gap: 8px; margin: 1px 0 1px 6px; margin-inline: 6px 0; padding: 7px 10px; border-radius: var(--htu-radius-sm); font-size: 13px; line-height: 1.45; }
.htu-shell.skin-red .sidebar-menu .treeview-menu > li > a > .fa-circle-o { flex: 0 0 6px; width: 6px; height: 6px; margin-block-start: 7px; border-radius: 50%; background: #5B6F82; font-size: 0; }
.htu-shell.skin-red .sidebar-menu .treeview-menu > li > a:hover { background: rgba(255, 255, 255, .06); color: var(--htu-white); }
.htu-shell.skin-red .sidebar-menu .treeview-menu > li > a:hover > .fa-circle-o { background: var(--htu-white); }
.htu-shell.skin-red .sidebar-menu .treeview-menu > li.active > a { background: rgba(232, 52, 63, .16); color: var(--htu-white); }
.htu-shell.skin-red .sidebar-menu .treeview-menu > li.active > a > .fa-circle-o { background: var(--htu-red-500); }
.htu-shell.skin-red .sidebar-menu > li.header { margin: 14px 8px 4px; padding: 6px 12px; background: transparent; color: #7E92A5; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
[dir="rtl"] .htu-shell.skin-red .sidebar-menu > li.header { letter-spacing: 0; font-size: 12px; }
.htu-shell .main-sidebar .sidebar { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; }
.htu-shell.skin-red .sidebar-menu > li > a:focus-visible, .htu-shell.skin-red .sidebar-menu .treeview-menu > li > a:focus-visible { outline: 2px solid var(--htu-red-500); outline-offset: -2px; }

/* =====================================================================
   v3.3 (B17) - Scholar_Info, scholarship progress dialog, list pages (Evaluation, studentDeclarations,
   StudentsSurveys, CompletedOpportunities, MarksSemester), Ch_pass, AvCloseSec
   ===================================================================== */
.htu-section__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--htu-space-3); margin-block-end: var(--htu-space-3); }
.htu-section__head > .htu-section__title { margin: 0; }
.htu-scholar .htu-section + .htu-section, .htu-evlist .htu-section + .htu-section, .htu-evlist .htu-section + div > .htu-section { margin-block-start: var(--htu-space-4); }
.htu-scholar .htu-section__title, .htu-evlist .htu-section__title { font-size: var(--htu-fs-md); margin-block-end: var(--htu-space-3); }
.htu-scholar .htu-section__head > .htu-section__title { margin: 0; }
.htu-scholar__add { white-space: normal; text-align: center; }
.htu-scholar__add[href^="javascript:alert"] { background: var(--htu-surface-alt); color: var(--htu-text-muted); border-color: var(--htu-border); }
/* row action links ("Details", "Start evaluation", "View") as small buttons */
.htu-scholar td > a[id$="hEdit"], .htu-evlist td > a[id$="hEdit"] { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 4px 12px; border: 1px solid var(--htu-primary); border-radius: var(--htu-radius); background: var(--htu-surface); color: var(--htu-primary); font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.htu-scholar td > a[id$="hEdit"]:hover, .htu-evlist td > a[id$="hEdit"]:hover { background: var(--htu-primary); color: var(--htu-white); }
.htu-evlist td > a[id$="hEdit"][disabled], .htu-evlist td > a[id$="hEdit"]:not([href]), .htu-evlist td > a[id$="hEdit"][href="#"] { border-color: var(--htu-border); background: var(--htu-surface-alt); color: var(--htu-text-muted); pointer-events: none; white-space: normal; }
.htu-evlist td > a.btn { box-shadow: none; }
.htu-evlist td:first-child, .htu-evlist th:first-child { width: 48px; text-align: center; color: var(--htu-text-muted); }
.htu-evlist__total { margin-block-end: var(--htu-space-3); max-width: 360px; }
.htu-evlist__term { margin-block-end: var(--htu-space-3); }
.htu-evlist__marks td:nth-child(n+3):not(:nth-child(6)) { text-align: center; font-variant-numeric: tabular-nums; }
.htu-evlist .htu-alert:empty { display: none; }
@container htu-list (max-width: 640px) {
    .htu-evlist .htu-table--stack td:first-child { display: none !important; }
    .htu-scholar .htu-table--stack td > a[id$="hEdit"], .htu-evlist .htu-table--stack td > a[id$="hEdit"] { flex: 1 1 auto; }
}

/* scholarship progress dialog */
.htu-schprog__who { margin-block-end: var(--htu-space-3); }
.htu-schprog__groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--htu-space-3); }
.htu-schprog__group { padding: var(--htu-space-3); }
.htu-schprog__group .htu-kv-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: var(--htu-space-2); }
.htu-schprog__group .htu-kv { padding: var(--htu-space-2) var(--htu-space-3); }
.htu-schprog__group .htu-kv__label { font-size: 12px; line-height: 1.4; }
.htu-schprog__group .htu-kv__value { font-size: 16px; font-variant-numeric: tabular-nums; }
.htu-schprog .htu-dialog__title-text { font: inherit; color: inherit; }
@media (max-width: 640px) {
    .htu-schprog__groups { grid-template-columns: minmax(0, 1fr); }
    .htu-schprog__group .htu-kv-grid, .htu-schprog__who { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* change password (PasswordMaster) */
.htu-chpass__card { max-width: 560px; margin-inline: auto; }
.htu-chpass__fields { grid-template-columns: minmax(0, 1fr); }
.htu-chpass__rules { display: flex; gap: var(--htu-space-2); margin-block: var(--htu-space-3); font-size: 13px; }
.htu-chpass__example { color: var(--htu-text-muted); }
.htu-chpass__status:empty { display: none; }
.htu-chpass .htu-field__error { display: block; }

/* AvCloseSec: section choose button is an <input type=button> coloured by code-behind */
.htu-plan .tool-tip input[type="button"] { min-height: 32px; padding: 4px 14px; border: 0; border-radius: var(--htu-radius-sm); font-weight: 700; color: var(--htu-white); }
.htu-plan .htu-back { font-weight: 700; color: var(--htu-primary); }
.htu-plan tr[id$="trBack"] > td { background: var(--htu-surface-alt) !important; }

/* Crystal Reports viewer page (PrintPage.aspx) */
.htu-report { margin: 0; background: #EEF0F2; font-family: var(--htu-font-latin); }
.htu-report__bar { display: flex; align-items: center; justify-content: space-between; gap: var(--htu-space-3); padding: 10px 16px; background: var(--htu-white); border-bottom: 3px solid var(--htu-accent); box-shadow: var(--htu-shadow-sm); }
.htu-report__logo { height: 33px; width: auto; }
.htu-report__sheet { max-width: 1000px; margin: var(--htu-space-4) auto; padding: var(--htu-space-4); background: var(--htu-white); border-radius: var(--htu-radius-lg); box-shadow: 0 6px 24px rgba(1, 15, 28, .10); overflow-x: auto; }
.htu-report__sheet table { margin-inline: auto; }
@media (max-width: 640px) { .htu-report__sheet { margin: 8px; padding: 8px; border-radius: var(--htu-radius); } }
@media print { .htu-report { background: #fff; } .htu-report__bar { display: none !important; } .htu-report__sheet { margin: 0; padding: 0; box-shadow: none; max-width: none; } }

/* =====================================================================
   v3.4 (B19) - plan dialogs on phones (AvPlan3 / AvPlan4 / AvCloseSec): one fixed, aligned card layout,
   placed by column position (same order as the desktop table). Replaces the v2.7 / v2.8 / v3.3 phone rules.
   Labels come from data-label (htu-ui.js initPlanCards).
   Course card (all three):   [ course no ................ (+) ]
                              [ course name                    ]
                              [ hours | level | rate | (mark)  ]
   Section card AvPlan4 / AvCloseSec (.htu-avplan):
                              [ practical sec | theory sec     ]
                              [ time / room       value        ]
                              [ instructor        value        ]
                              [ hours | capacity | level | rate]
                              [ choose button                  ]
   Section card AvPlan3:      [ room / time       value        ]
                              [ section | hours | level | rate ]
   ===================================================================== */
@media (max-width: 640px) {
    .htu-dialog .htu-plan, .htu-dialog .htu-plan > tbody { display: block; width: 100%; border: 0; }
    .htu-dialog .htu-plan > thead, .htu-dialog .htu-plan tr.htu-plan__title { display: none !important; }
    .htu-dialog .htu-plan tr.htu-plan__course > td, .htu-dialog .htu-plan tr.htu-plan__task > td { min-width: 0 !important; margin: 0; padding: 0 !important; border: 0 !important; background: var(--htu-surface) !important; box-shadow: none !important; text-align: start !important; font-size: 14px; line-height: 1.4; color: var(--htu-text); }

    /* ---------- course card ---------- */
    .htu-dialog .htu-plan tr.htu-plan__course { display: grid !important; grid-template-columns: repeat(12, minmax(0, 1fr)); margin: 10px 0 0; padding: 0; background: var(--htu-surface) !important; border: 1px solid var(--htu-border); border-inline-start: 4px solid var(--htu-accent); border-radius: var(--htu-radius); box-shadow: 0 1px 3px rgba(1, 15, 28, .08); overflow: hidden; cursor: pointer; }
    .htu-dialog .htu-plan tr.htu-plan__course > td:nth-child(1) { grid-column: 10 / 13; grid-row: 1 / 3; display: flex !important; align-items: center; justify-content: center; padding: 8px !important; }
    .htu-dialog .htu-plan tr.htu-plan__course > td:nth-child(2) { grid-column: 1 / 10; grid-row: 1; padding: 12px 12px 2px !important; }
    .htu-dialog .htu-plan tr.htu-plan__course > td:nth-child(2) > span { display: inline-block; padding: 1px 10px; border-radius: 999px; background: var(--htu-red-050); color: var(--htu-primary) !important; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
    .htu-dialog .htu-plan tr.htu-plan__course > td:nth-child(3) { grid-column: 1 / 10; grid-row: 2; padding: 2px 12px 10px !important; font-size: 15px; font-weight: 800; color: var(--htu-navy-900); overflow-wrap: break-word; }
    .htu-dialog .htu-plan tr.htu-plan__course > td:nth-child(n+4) { grid-row: 3; grid-column: span 4; display: flex !important; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px !important; background: var(--htu-surface-alt) !important; border-block-start: 1px solid var(--htu-gray-200) !important; text-align: center !important; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
    .htu-dialog .htu-plan tr.htu-plan__course:has(> td:nth-child(7):not(.htu-plan__blank)) > td:nth-child(n+4) { grid-column: span 3; }
    .htu-dialog .htu-plan tr.htu-plan__course > td.htu-plan__blank:nth-child(n+4) { display: none !important; }
    .htu-dialog .htu-plan tr.htu-plan__course > td:nth-child(n+5) { border-inline-start: 1px solid var(--htu-gray-200) !important; }
    .htu-dialog .htu-plan tr.htu-plan__course > td:nth-child(n+4)::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 600; line-height: 1.3; color: var(--htu-text-muted); }
    .htu-dialog .htu-plan input[id$="btnExpand"] { width: 36px; height: 36px; min-width: 36px; padding: 0; border-radius: 50%; font-size: 20px; line-height: 1; }
    .htu-dialog .htu-plan__course .htu-plan__choose input[type="checkbox"] { width: 22px; height: 22px; margin: 0; }
    .htu-dialog .htu-plan__course:has(span[style*="LightGreen" i]) { border-inline-start-color: var(--htu-success-fg); }
    .htu-dialog .htu-plan__course span[style*="LightGreen" i] { color: var(--htu-success-fg) !important; }

    /* ---------- section card (shared) ---------- */
    .htu-dialog .htu-plan tr.htu-plan__task { display: none !important; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 6px 0 0; margin-inline-start: 12px; padding: 0; background: var(--htu-surface) !important; border: 1px solid var(--htu-gray-200); border-radius: var(--htu-radius); overflow: hidden; }
    .htu-dialog .htu-plan tr.htu-plan__task:not(.collapse), .htu-dialog .htu-plan tr.htu-plan__task.collapse.in { display: grid !important; }
    .htu-dialog .htu-plan tr.htu-plan__task > td::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 600; line-height: 1.3; color: var(--htu-text-muted); }
    .htu-dialog .htu-plan tr.htu-plan__task > td.htu-plan__strip { grid-column: span 1; display: flex !important; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px !important; background: var(--htu-surface-alt) !important; border-block-start: 1px solid var(--htu-gray-200) !important; text-align: center !important; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
    .htu-dialog .htu-plan tr.htu-plan__task > td.htu-plan__row { grid-column: 1 / -1; display: grid !important; grid-template-columns: minmax(96px, 36%) minmax(0, 1fr); align-items: baseline; gap: 8px; padding: 8px 12px !important; border-block-start: 1px solid var(--htu-gray-200) !important; font-weight: 600; overflow-wrap: break-word; }
    .htu-dialog .htu-plan tr.htu-plan__task > td.htu-plan__row::before { font-size: 12px; font-weight: 700; }
    .htu-dialog .htu-plan tr.htu-plan__task > td.htu-plan__act { grid-column: 1 / -1; padding: 10px 12px !important; border-block-start: 1px solid var(--htu-gray-200) !important; }
    .htu-dialog .htu-plan tr.htu-plan__task > td.htu-plan__act::before { content: none; }
    .htu-dialog .htu-plan tr.htu-plan__task > td.htu-plan__act .tool-tip { display: block; }
    .htu-dialog .htu-plan tr.htu-plan__task > td.htu-plan__act button, .htu-dialog .htu-plan tr.htu-plan__task > td.htu-plan__act input[type="button"] { width: 100%; min-height: 42px; border-radius: var(--htu-radius); font-size: 15px; font-weight: 800; }
    .htu-dialog .htu-plan tr.htu-plan__task > td.htu-plan__head { grid-column: span 2; display: flex !important; align-items: baseline; justify-content: space-between; gap: 6px; padding: 10px 12px !important; background: var(--htu-red-050) !important; color: var(--htu-primary); font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
    .htu-dialog .htu-plan tr.htu-plan__task > td.htu-plan__head::before { font-size: 12px; font-weight: 700; color: var(--htu-primary); }
    .htu-dialog .htu-plan tr.htu-plan__task > td.htu-plan__head + td.htu-plan__head { border-inline-start: 1px solid rgba(200, 32, 43, .18) !important; }
    .htu-dialog .htu-plan tr.htu-plan__task > td.htu-plan__strip + td.htu-plan__strip { border-inline-start: 1px solid var(--htu-gray-200) !important; }
    .htu-dialog .htu-plan tr.htu-plan__task > td.htu-plan__hide { display: none !important; }

    /* ---------- placement by column (desktop order kept) ---------- */
    /* AvPlan4 / AvCloseSec: 1 choose, 2 practical, 3 theory, 4 time/room, 5 instructor, 6 hours, 7 capacity, 8 level, 9 rate */
    .htu-avplan .htu-plan tr.htu-plan__task > td:nth-child(1) { order: 5; }
    .htu-avplan .htu-plan tr.htu-plan__task > td:nth-child(2), .htu-avplan .htu-plan tr.htu-plan__task > td:nth-child(3) { order: 1; }
    .htu-avplan .htu-plan tr.htu-plan__task > td:nth-child(4), .htu-avplan .htu-plan tr.htu-plan__task > td:nth-child(5) { order: 2; }
    .htu-avplan .htu-plan tr.htu-plan__task > td:nth-child(n+6) { order: 3; }
    /* AvPlan3: 1 (empty), 2 section, 3 room/time, 4 hours, 5 level, 6 rate */
    .htu-dialog:not(.htu-avplan) .htu-plan tr.htu-plan__task > td:nth-child(3) { order: 1; }
    .htu-dialog:not(.htu-avplan) .htu-plan tr.htu-plan__task > td:nth-child(2), .htu-dialog:not(.htu-avplan) .htu-plan tr.htu-plan__task > td:nth-child(n+4) { order: 2; }

    /* states set by code-behind */
    .htu-dialog .htu-plan tr.htu-plan__task[style*="192, 192, 192"], .htu-dialog .htu-plan tr.htu-plan__task[style*="c0c0c0" i] { opacity: .85; }
    .htu-dialog .htu-plan tr.htu-plan__task[style*="192, 192, 192"] > td, .htu-dialog .htu-plan tr.htu-plan__task[style*="c0c0c0" i] > td { background: #F6F5F2 !important; }
    .htu-dialog .htu-plan tr.htu-plan__task[style*="255, 0, 0"], .htu-dialog .htu-plan tr.htu-plan__task[style*="red" i] { border-color: var(--htu-danger-bd); }
    .htu-dialog .htu-plan tr[id$="trBack"] { display: block; }
    .htu-dialog .htu-plan tr[id$="trBack"] td { display: block; padding: 8px 0 !important; border: 0 !important; background: transparent !important; }
}

/* ==== UI/UX 2026-10-15 B19b: ScholarshipApplication.aspx + AddNewDoc.aspx (attachment dialog) ==== */
.htu-schapp .htu-form__head { justify-content: space-between; margin-block-end: var(--htu-space-3); }
.htu-schapp__date { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--htu-red-050); color: var(--htu-red-800); font-size: var(--htu-fs-sm); font-weight: 700; }
.htu-schapp__date-value { direction: ltr; unicode-bidi: isolate; }
.htu-schapp__note { display: block; margin-block-end: var(--htu-space-4); }
.htu-schapp__note:empty { display: none; }
.htu-schapp .htu-section { margin-block-end: var(--htu-space-4); }
.htu-schapp__title { font: inherit; color: inherit; }
.htu-schapp__subhead { margin-block: var(--htu-space-4) var(--htu-space-2); padding-inline-start: 10px; border-inline-start: 3px solid var(--htu-primary); }
.htu-schapp__subtitle { font-size: var(--htu-fs-md); font-weight: 800; color: var(--htu-navy-900); }
.htu-schapp__text { color: var(--htu-text); line-height: 1.8; overflow-wrap: break-word; background: var(--htu-surface-alt); border: 1px solid var(--htu-border); border-radius: var(--htu-radius); padding: var(--htu-space-3) var(--htu-space-4); }
.htu-schapp__list { margin: 0; padding-inline-start: 1.4em; }
.htu-schapp__list li { margin-block: 4px; }
.htu-schapp__check { display: flex !important; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--htu-border); border-radius: var(--htu-radius); background: var(--htu-surface-alt); }
.htu-schapp__check input[type="checkbox"], .htu-schapp__approve input[type="checkbox"] { width: 20px; height: 20px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--htu-primary); }
.htu-schapp__check-label { margin: 0; font-weight: 700; cursor: pointer; flex: 1 1 auto; line-height: 1.6; }
.htu-schapp__check a { font-weight: 700; white-space: nowrap; }
.htu-schapp__approve { padding: 14px; border: 1px dashed var(--htu-warning-bd); background: var(--htu-warning-bg); border-radius: var(--htu-radius); line-height: 1.7; }
.htu-schapp__approve label { font-weight: 700; }
.htu-schapp__docs .htu-section__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--htu-space-2); }
.htu-schapp__add:empty { display: none; }
.htu-schapp__add::before { content: "\f067"; font-family: FontAwesome; margin-inline-end: 6px; font-weight: normal; }
.htu-schapp__table td img { width: 22px !important; height: 22px !important; }
.htu-schapp__table td a[id$="_aDownload"] { font-weight: 700; overflow-wrap: break-word; }
.htu-schapp__table td a[id$="_lnbDelete"] { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; border-radius: 10px; }
.htu-schapp__table td a[id$="_lnbDelete"]:hover { background: var(--htu-danger-bg); }
.htu-schapp .htu-actions .htu-btn--primary { min-width: 180px; }
.htu-schapp input[id$="_btnGet"] { display: none !important; }
@media (max-width: 640px) {
    .htu-schapp .htu-form__head { flex-direction: column; align-items: stretch; }
    .htu-schapp__date { justify-content: center; }
    .htu-schapp__docs .htu-section__head .htu-btn { width: 100%; justify-content: center; }
    .htu-schapp .htu-actions .htu-btn { width: 100%; }
    .htu-schapp__text { padding: var(--htu-space-3); }
    .htu-schapp__table tbody tr { position: relative; }
    .htu-schapp__table tbody td:last-child { text-align: end !important; }
}

/* attachment dialog */
.htu-adddoc .htu-content > .htu-dialog__title::before { content: "\f0c6"; }
.htu-adddoc .htu-dialog__title-text { font: inherit; color: inherit; }
.htu-adddoc__fields { display: grid; grid-template-columns: 1fr; gap: var(--htu-space-3); }
.htu-adddoc .htu-field { display: flex; flex-direction: column; gap: 6px; }
.htu-adddoc .htu-input { width: 100%; min-height: 44px; font-size: 16px; padding: 8px 12px; border: 1px solid var(--htu-gray-300); border-radius: var(--htu-radius-sm); background: var(--htu-white); }
.htu-adddoc .htu-input:focus { outline: 0; border-color: var(--htu-primary); box-shadow: 0 0 0 3px var(--htu-focus); }
.htu-file-input { padding: 6px !important; cursor: pointer; border-style: dashed !important; background: var(--htu-surface-alt) !important; }
.htu-file-input::file-selector-button { margin-inline-end: 10px; padding: 8px 14px; border: 0; border-radius: var(--htu-radius-sm); background: var(--htu-navy-900); color: var(--htu-white); font: inherit; font-weight: 700; cursor: pointer; }
.htu-adddoc .htu-actions { margin-block: var(--htu-space-4) var(--htu-space-3); }
.htu-adddoc .htu-actions .htu-btn { min-width: 160px; }
.htu-adddoc .htu-alert:empty { display: none; }
.htu-adddoc__rules { margin-block-start: var(--htu-space-4); }
.htu-adddoc__rules .htu-section__title { display: flex; align-items: center; gap: 8px; font-size: var(--htu-fs-md); }
.htu-adddoc__rules-title { font: inherit; }
.htu-adddoc__rules:has(.htu-adddoc__list:empty) { display: none; }
.htu-adddoc__list { margin: 0; padding-inline-start: 1.4em; line-height: 1.8; }
.htu-adddoc__list li { font-weight: 600 !important; margin-block: 4px; }
.htu-adddoc .WordSection1:empty { display: none; }
@media (max-width: 640px) {
    .htu-adddoc .htu-actions .htu-btn { width: 100%; }
}
/* B19b fixes after visual check */
.htu-schapp .htu-back > .fa { display: none; }
.htu-schapp .htu-section:has(> .htu-fields):not(:has(.htu-field)) { display: none; }
.htu-schapp__docs .htu-table-wrap:not(:has(tbody tr)) { display: none; }
/* AddNewDoc: code-behind always sets body direction rtl; follow the page language from <html dir> instead */
html[dir] body.htu-adddoc { direction: inherit !important; }
.htu-adddoc__rules:not(:has(li)) { display: none; }
.htu-schapp .htu-form__head > .htu-back { align-self: flex-start; }
/* ==== UI/UX 2026-10-15 B19d: marks.aspx course cards on phones (labels from htu-ui.js initMarksCards) ==== */
@media (max-width: 640px) {
    .htu-marks .htu-table-wrap { overflow: visible; border: 0; background: transparent; box-shadow: none; }
    .htu-marks__table, .htu-marks__table > tbody { display: block; width: 100%; }
    .htu-marks__table > tbody > tr { display: block; }
    .htu-marks__table > tbody > tr > td { display: block; border: 0; }
    .htu-marks__table tr.htu-marks__head { display: none; }
    .htu-marks__table tr.htu-marks__sem { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; margin-block-start: var(--htu-space-4); padding: 10px 14px; background: var(--htu-navy-900); color: var(--htu-white); border-radius: var(--htu-radius) var(--htu-radius) 0 0; }
    .htu-marks__table tr.htu-marks__sem > td { padding: 0; background: transparent; }
    .htu-marks__table tr.htu-marks__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-block-start: 8px; background: var(--htu-surface); border: 1px solid var(--htu-border); border-inline-start: 4px solid var(--htu-accent); border-radius: var(--htu-radius); overflow: hidden; }
    .htu-marks__table tr.htu-marks__row > td { padding: 0; border: 0 !important; text-align: start; }
    .htu-marks__table tr.htu-marks__row > td:nth-child(1) { grid-column: 1 / -1; padding: 10px 12px 0; }
    .htu-marks__table tr.htu-marks__row > td:nth-child(1)::before { display: none; }
    .htu-marks__table tr.htu-marks__row > td:nth-child(1) { font-size: 12px; font-weight: 800; color: var(--htu-primary); font-variant-numeric: tabular-nums; }
    .htu-marks__table tr.htu-marks__row > td:nth-child(2) { grid-column: 1 / -1; padding: 2px 12px 10px; font-size: 15px; font-weight: 800; color: var(--htu-navy-900); overflow-wrap: break-word; }
    .htu-marks__table tr.htu-marks__row > td:nth-child(n+3) { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; background: var(--htu-surface-alt); border-block-start: 1px solid var(--htu-gray-200) !important; font-weight: 800; text-align: center; }
    .htu-marks__table tr.htu-marks__row > td:nth-child(n+4) { border-inline-start: 1px solid var(--htu-gray-200) !important; }
    .htu-marks__table tr.htu-marks__row > td:nth-child(n+3)::before { content: attr(data-label); font-size: 11px; font-weight: 600; color: var(--htu-text-muted); }
    .htu-marks__table tr.htu-marks__row > td:nth-child(6) { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; gap: 8px; padding: 8px 12px; border-inline-start: 0 !important; }
    .htu-marks__table tr.htu-marks__row > td.htu-marks__blank:nth-child(6) { display: none; }
    .htu-marks__table > tbody > tr[id$="_trResult"] > td { padding: 0; white-space: normal !important; }
    .htu-marks__summary { margin-block-start: 10px; }
    .htu-marks__summary > tbody { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
    .htu-marks__summary > tbody > tr { display: contents; }
    .htu-marks__summary > tbody > tr > td { display: block; padding: 8px 12px; border-block-end: 1px solid var(--htu-info-bd) !important; }
    .htu-marks__summary > tbody > tr > td:not(.htu-marks__k) { text-align: end; font-variant-numeric: tabular-nums; }
    .htu-marks__summary > tbody > tr:last-child > td { border-block-end: 0 !important; }
}
@media (max-width: 640px) { .htu-marks__table tr.htu-marks__row > td:nth-child(2) { unicode-bidi: plaintext; text-align: start; } }
/* ==== UI/UX 2026-10-15 B19f: fixes from the B16-B18 visual pass ==== */
/* list pages hide the "#" column on phones - keep the single cell of the empty-state row */
@media (max-width: 767px) {
    .htu-evlist .htu-table--stack tr.htu-table__empty > td:first-child, .htu-scholar .htu-table--stack tr.htu-table__empty > td:first-child { display: flex !important; }
}
/* header badges: AdminLTE .label is 75% (9px) - keep it readable */
.htu-shell .main-header .navbar .label { font-size: 11px; line-height: 1.3; }
/* PasswordMaster language switch (no htu-lang-btn class there): same pill as MainMaster */
.htu-shell.skin-red .main-header .navbar .nav > li > a#ctl00_lnkLang:not(.htu-lang-btn) {
    display: inline-flex; align-items: center; gap: 6px;
    margin: 9px 8px; padding: 6px 12px; line-height: 1;
    border: 1px solid rgba(255, 255, 255, .35); border-radius: 999px; font-weight: 700;
}
.htu-shell.skin-red .main-header .navbar .nav > li > a#ctl00_lnkLang:not(.htu-lang-btn)::before { content: "\f0ac"; font-family: FontAwesome; font-weight: normal; }
.htu-shell.skin-red .main-header .navbar .nav > li > a#ctl00_lnkLang:not(.htu-lang-btn):hover { background: var(--htu-accent); border-color: var(--htu-accent); }
/* PasswordMaster page header + notes callout */
.htu-shell .content-wrapper > .content-header > h1 { font-weight: 800; color: var(--htu-navy-900); }
.htu-shell .content-wrapper > .pad > .callout.callout-info { border-radius: var(--htu-radius); border-inline-start-width: 4px; padding: 10px 14px; }
.htu-shell .content-wrapper > .pad > .callout.callout-info table tr:not(:first-child):not(:has(span:not(:empty))) { display: none; }
body #CalendarControl td.empty { background: transparent !important; border: 0 !important; }

/* ==== UI/UX 2026-10-15 B20: marks cumulative summary, schedule section pair, registration dialog ==== */
.htu-marks__totals > table, .htu-marks__totals > table > tbody > tr > td { display: block; width: 100%; border: 0; padding: 0; background: transparent !important; }
.htu-marks__totals > table > tbody { display: block; }
.htu-marks__cum { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: var(--htu-space-3); align-items: stretch; }
.htu-marks__gpa { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; padding: var(--htu-space-4); border-radius: var(--htu-radius-lg); background: var(--htu-navy-900); color: var(--htu-white); text-align: center; }
.htu-marks__gpa-label { font-size: var(--htu-fs-sm); font-weight: 700; opacity: .85; }
.htu-marks__gpa-value { font-size: 34px; font-weight: 800; line-height: 1.1; color: var(--htu-white) !important; font-variant-numeric: tabular-nums; }
.htu-marks__cum-grid { margin: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.htu-marks__cum-grid .htu-kv__value { font-size: var(--htu-fs-lg); font-variant-numeric: tabular-nums; }
.htu-marks__cum-grid .htu-kv--wide { grid-column: 1 / -1; }
.htu-marks__warn:has(.htu-kv__value span:empty), .htu-marks__warn:not(:has(.htu-kv__value span)) { display: none; }
.htu-marks__warn .htu-kv__value { color: var(--htu-danger-fg); font-size: var(--htu-fs-md); }
.htu-marks__cum > .htu-alert { grid-column: 1 / -1; margin: 0; }
@media (max-width: 640px) {
    .htu-marks__cum { grid-template-columns: 1fr; }
    .htu-marks__gpa { flex-direction: row; justify-content: space-between; padding: 12px 16px; }
    .htu-marks__gpa-value { font-size: 28px; }
}
.htu-schedule .schEv .schSecs { display: block; font-weight: 700; opacity: .95; }
.htu-schedule .schEv.schShort .schSecs { display: block; font-size: 11px; }
.htu-avplan #courseModal .htu-alert--error { display: block; margin-block-start: var(--htu-space-3); }
.htu-avplan #courseModal .htu-alert--error:empty { display: none; }
.htu-marks__totals > table { float: none !important; margin: 0 !important; }
.htu-marks__totals > table > tbody > tr { display: block; background: transparent !important; }

/* ==== UI/UX 2026-10-15 B21: grading system (marks_system.aspx) legacy tables fill the card ==== */
.htu-legacy .mainDive { float: none !important; width: 100% !important; max-width: 100% !important; margin: 0 !important; }
.htu-legacy .mainDive table { width: 100% !important; max-width: 100% !important; }
.htu-legacy .mainDive td[style*="width"], .htu-legacy .mainDive th[style*="width"] { width: auto !important; }
.htu-legacy .htu-section:has(.mainDive) { overflow-x: auto; }

/* ==== UI/UX 2026-10-18 B22: htuAlert() message dialog (replaces the browser alert() box) ==== */
.htu-alertdlg { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(10, 18, 32, .55); animation: htuAlertIn .15s ease-out; }
.htu-alertdlg__box { width: 100%; max-width: 440px; background: var(--htu-white); border-radius: var(--htu-radius-lg); border-top: 4px solid var(--htu-primary); box-shadow: 0 20px 50px rgba(0, 0, 0, .3); padding: 24px 24px 18px; text-align: center; font-family: inherit; }
.htu-alertdlg__icon { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--htu-warning-bg); color: var(--htu-warning-fg); border: 1px solid var(--htu-warning-bd); }
.htu-alertdlg__icon svg { width: 28px; height: 28px; }
.htu-alertdlg__msg { font-size: 16px; line-height: 1.8; font-weight: 700; color: var(--htu-text); white-space: pre-line; overflow-wrap: break-word; max-height: 50vh; overflow-x: hidden; overflow-y: auto; }
.htu-alertdlg__actions { margin-top: 20px; display: flex; justify-content: center; }
.htu-alertdlg__actions .htu-btn { min-width: 140px; min-height: 44px; justify-content: center; }
@keyframes htuAlertIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .htu-alertdlg { animation: none; } }
@media (max-width: 480px) { .htu-alertdlg__box { padding: 20px 16px 16px; } .htu-alertdlg__actions .htu-btn { width: 100%; } }
