/* AD ASTRA — My Exams master dark-surface palette
   Scope: Admin Control Centre and non-Exam Student Workspace only.
   The live Exam page never receives workspace-dark-theme. */
body.workspace-dark-theme:not(.exam-portal){
  --workspace-page:#01050a;
  --workspace-surface:#02070e;
  --workspace-surface-raised:#050b13;
  --workspace-surface-soft:#08101a;
  --workspace-border:rgba(201,150,26,.38);
  --workspace-border-soft:rgba(201,150,26,.22);
  background:#01050a!important;
  background-image:none!important;
}
body.workspace-dark-theme:not(.exam-portal)::before{
  background:linear-gradient(180deg,#01050a 0%,#02070e 55%,#01050a 100%)!important;
  opacity:1!important;
}
body.workspace-dark-theme:not(.exam-portal) .star-field{opacity:.18!important;}
body.workspace-dark-theme:not(.exam-portal) .app-shell,
body.workspace-dark-theme:not(.exam-portal) .admin-shell,
body.workspace-dark-theme:not(.exam-portal) .student-shell,
body.workspace-dark-theme:not(.exam-portal) .app-main,
body.workspace-dark-theme:not(.exam-portal) main.app-main,
body.workspace-dark-theme:not(.exam-portal) main,
body.workspace-dark-theme:not(.exam-portal) .page,
body.workspace-dark-theme:not(.exam-portal) .content,
body.workspace-dark-theme:not(.exam-portal) .main-content{
  background:transparent!important;
  background-image:none!important;
}

/* Keep navigation dark, without changing active states or typography. */
body.workspace-dark-theme:not(.exam-portal) #navbar,
body.workspace-dark-theme:not(.exam-portal) .app-sidebar,
body.workspace-dark-theme:not(.exam-portal) .mobile-menu{
  background:#02070e!important;
  background-image:none!important;
  border-color:var(--workspace-border-soft)!important;
}

/* Match the almost-black My Exams containers instead of the older blue cards. */
body.workspace-dark-theme:not(.exam-portal) .panel,
body.workspace-dark-theme:not(.exam-portal) .card,
body.workspace-dark-theme:not(.exam-portal) .form-card,
body.workspace-dark-theme:not(.exam-portal) .white-card,
body.workspace-dark-theme:not(.exam-portal) .glass-card,
body.workspace-dark-theme:not(.exam-portal) .dashboard-card,
body.workspace-dark-theme:not(.exam-portal) .dashboard-banner,
body.workspace-dark-theme:not(.exam-portal) .quick-admin-card,
body.workspace-dark-theme:not(.exam-portal) .gateway-card,
body.workspace-dark-theme:not(.exam-portal) .info-card,
body.workspace-dark-theme:not(.exam-portal) .stat-card,
body.workspace-dark-theme:not(.exam-portal) .stats-tile,
body.workspace-dark-theme:not(.exam-portal) .mini-panel,
body.workspace-dark-theme:not(.exam-portal) .main-card,
body.workspace-dark-theme:not(.exam-portal) .side-card,
body.workspace-dark-theme:not(.exam-portal) .result-card,
body.workspace-dark-theme:not(.exam-portal) .summary-card,
body.workspace-dark-theme:not(.exam-portal) .content-card,
body.workspace-dark-theme:not(.exam-portal) .app-card,
body.workspace-dark-theme:not(.exam-portal) .student-card,
body.workspace-dark-theme:not(.exam-portal) .payment-card,
body.workspace-dark-theme:not(.exam-portal) .lesson-card,
body.workspace-dark-theme:not(.exam-portal) .student-overview-card,
body.workspace-dark-theme:not(.exam-portal) .student-summary-card,
body.workspace-dark-theme:not(.exam-portal) .quick-link,
body.workspace-dark-theme:not(.exam-portal) .summary-tile,
body.workspace-dark-theme:not(.exam-portal) .question-review-card,
body.workspace-dark-theme:not(.exam-portal) .question-preview-card,
body.workspace-dark-theme:not(.exam-portal) .editor-card,
body.workspace-dark-theme:not(.exam-portal) .modal-box,
body.workspace-dark-theme:not(.exam-portal) .q-modal-card{
  background:#02070e!important;
  background-image:none!important;
  border-color:var(--workspace-border)!important;
}

/* Nested/subtle regions use the slightly raised My Exams tone. */
body.workspace-dark-theme:not(.exam-portal) .empty,
body.workspace-dark-theme:not(.exam-portal) .alert,
body.workspace-dark-theme:not(.exam-portal) .notice,
body.workspace-dark-theme:not(.exam-portal) .panel-subtle,
body.workspace-dark-theme:not(.exam-portal) .upload-box,
body.workspace-dark-theme:not(.exam-portal) .preview-box,
body.workspace-dark-theme:not(.exam-portal) .preview-panel,
body.workspace-dark-theme:not(.exam-portal) .math-preview,
body.workspace-dark-theme:not(.exam-portal) .math-preview-card{
  background:#080d13!important;
  background-image:none!important;
  border-color:var(--workspace-border-soft)!important;
}

/* Tables retain their existing header colour, but body surfaces match My Exams. */
body.workspace-dark-theme:not(.exam-portal) .table-wrap{
  background:#02070e!important;
  background-image:none!important;
  border-color:var(--workspace-border-soft)!important;
}
body.workspace-dark-theme:not(.exam-portal) table,
body.workspace-dark-theme:not(.exam-portal) .data-table,
body.workspace-dark-theme:not(.exam-portal) .saved-table,
body.workspace-dark-theme:not(.exam-portal) .matrix-table{
  background:transparent!important;
}
body.workspace-dark-theme:not(.exam-portal) .data-table td,
body.workspace-dark-theme:not(.exam-portal) .saved-table td,
body.workspace-dark-theme:not(.exam-portal) .matrix-table td,
body.workspace-dark-theme:not(.exam-portal) table tbody td{
  background:#02070e!important;
}
body.workspace-dark-theme:not(.exam-portal) .data-table tr:nth-child(even) td,
body.workspace-dark-theme:not(.exam-portal) .saved-table tr:nth-child(even) td,
body.workspace-dark-theme:not(.exam-portal) table tbody tr:nth-child(even) td{
  background:#040a12!important;
}
body.workspace-dark-theme:not(.exam-portal) .data-table tr:hover td,
body.workspace-dark-theme:not(.exam-portal) .saved-table tr:hover td,
body.workspace-dark-theme:not(.exam-portal) .table-wrap table tr:hover td{
  background:#091321!important;
}

/* Form surfaces only; dimensions, labels and controls stay unchanged. */
body.workspace-dark-theme:not(.exam-portal) input,
body.workspace-dark-theme:not(.exam-portal) select,
body.workspace-dark-theme:not(.exam-portal) textarea,
body.workspace-dark-theme:not(.exam-portal) math-field,
body.workspace-dark-theme:not(.exam-portal) .form-control,
body.workspace-dark-theme:not(.exam-portal) .form-select,
body.workspace-dark-theme:not(.exam-portal) .premium-input,
body.workspace-dark-theme:not(.exam-portal) .premium-select,
body.workspace-dark-theme:not(.exam-portal) .premium-textarea{
  background-color:#050b13!important;
  background-image:none!important;
}


/* Student Workspace completion: Fees & Dues, Payments, Course Content and Downloads.
   Loaded after all legacy styles so these four sections use the approved My Exams surfaces. */
body.student-portal.workspace-dark-theme:not(.exam-portal) .app-main > .panel,
body.student-portal.workspace-dark-theme:not(.exam-portal) .cards-grid > .info-card,
body.student-portal.workspace-dark-theme:not(.exam-portal) .table-wrap,
body.student-portal.workspace-dark-theme:not(.exam-portal) .data-table tbody td,
body.student-portal.workspace-dark-theme:not(.exam-portal) .info-card .kv,
body.student-portal.workspace-dark-theme:not(.exam-portal) .form-field input,
body.student-portal.workspace-dark-theme:not(.exam-portal) .form-field select,
body.student-portal.workspace-dark-theme:not(.exam-portal) .form-field textarea {
  background:#02070e!important;
  background-image:none!important;
  border-color:rgba(201,150,26,.38)!important;
}
body.student-portal.workspace-dark-theme:not(.exam-portal) .cards-grid > .info-card {
  box-shadow:none!important;
}
body.student-portal.workspace-dark-theme:not(.exam-portal) .info-card .kv {
  border-bottom-color:rgba(201,150,26,.18)!important;
}
body.student-portal.workspace-dark-theme:not(.exam-portal) .data-table tbody tr:nth-child(even) td {
  background:#040a12!important;
}
body.student-portal.workspace-dark-theme:not(.exam-portal) .data-table tbody tr:hover td {
  background:#091321!important;
}


/* Final dark-surface consistency pass: keep approved card colour on hover and
   cover legacy dashboard tile/card class names that still used the old blue. */
body.workspace-dark-theme:not(.exam-portal) :is(
  .card,.panel,.glass-card,.info-card,.feature-card,.dashboard-card,.quick-admin-card,
  .stat-card,.stats-card,.stats-tile,.stat-box,.kpi,.metric-card,.summary-card,.summary-tile,
  .portal-box,.content-card,.app-card,.student-card,.payment-card,.lesson-card,.result-card,
  .main-card,.side-card,.white-card,.form-card,.gateway-card,.mini-panel,.quick-link,
  .student-overview-card,.student-summary-card,.dashboard-banner,.action-card,.service-card,
  .overview-card,.analytics-card,.report-card,.admin-card,.workspace-card,.data-card,
  [class*="metric-card"],[class*="stat-card"],[class*="summary-card"],[class*="dashboard-card"],
  [class*="quick-card"],[class*="overview-card"],[class*="analytics-card"]
){
  background:#02070e!important;
  background-image:none!important;
  border-color:var(--workspace-border)!important;
}
body.workspace-dark-theme:not(.exam-portal) :is(
  .card,.panel,.glass-card,.info-card,.feature-card,.dashboard-card,.quick-admin-card,
  .stat-card,.stats-card,.stats-tile,.stat-box,.kpi,.metric-card,.summary-card,.summary-tile,
  .portal-box,.content-card,.app-card,.student-card,.payment-card,.lesson-card,.result-card,
  .main-card,.side-card,.white-card,.form-card,.gateway-card,.mini-panel,.quick-link,
  .student-overview-card,.student-summary-card,.dashboard-banner,.action-card,.service-card,
  .overview-card,.analytics-card,.report-card,.admin-card,.workspace-card,.data-card,
  [class*="metric-card"],[class*="stat-card"],[class*="summary-card"],[class*="dashboard-card"],
  [class*="quick-card"],[class*="overview-card"],[class*="analytics-card"]
):hover{
  background:#02070e!important;
  background-image:none!important;
}
body.workspace-dark-theme:not(.exam-portal) :is(
  .card,.panel,.glass-card,.info-card,.feature-card,.dashboard-card,.quick-admin-card,
  .stat-card,.stats-card,.stats-tile,.stat-box,.kpi,.metric-card,.summary-card,.summary-tile,
  .portal-box,.content-card,.app-card,.student-card,.payment-card,.lesson-card,.result-card,
  .main-card,.side-card,.white-card,.form-card,.gateway-card,.mini-panel,.quick-link,
  .student-overview-card,.student-summary-card,.dashboard-banner,.action-card,.service-card,
  .overview-card,.analytics-card,.report-card,.admin-card,.workspace-card,.data-card
)::before,
body.workspace-dark-theme:not(.exam-portal) :is(
  .card,.panel,.glass-card,.info-card,.feature-card,.dashboard-card,.quick-admin-card,
  .stat-card,.stats-card,.stats-tile,.stat-box,.kpi,.metric-card,.summary-card,.summary-tile,
  .portal-box,.content-card,.app-card,.student-card,.payment-card,.lesson-card,.result-card,
  .main-card,.side-card,.white-card,.form-card,.gateway-card,.mini-panel,.quick-link,
  .student-overview-card,.student-summary-card,.dashboard-banner,.action-card,.service-card,
  .overview-card,.analytics-card,.report-card,.admin-card,.workspace-card,.data-card
)::after{
  background-color:transparent!important;
}

/* Final remaining-surface completion: all portal dashboard/form/report cards use the
   approved near-black My Exams surface, including structures whose legacy class
   names do not contain "card". The active Exam page remains excluded. */
body.workspace-dark-theme:not(.exam-portal) :is(
  .stat-grid > *, .stats-strip > *, .admin-quick-grid > *, .cards-grid > *,
  .analytics-quad-grid > *, .grid-2 > *, .grid-3 > *, .grid-4 > *,
  .question-premium-panel, .question-bank-shell, .reset-link-card,
  .fee-card, .ledger-card, .incident-card, .action-panel, .report-panel,
  .question-bank-shell .form-card, .question-bank-shell .q-span-12,
  .question-bank-shell .q-span-8, .question-bank-shell .q-span-5,
  .question-bank-shell .q-span-4, .question-bank-shell .q-span-3
){
  background:#02070e!important;
  background-image:none!important;
  border-color:var(--workspace-border)!important;
}
body.workspace-dark-theme:not(.exam-portal) :is(
  .stat-grid > *, .stats-strip > *, .admin-quick-grid > *, .cards-grid > *,
  .analytics-quad-grid > *, .grid-2 > *, .grid-3 > *, .grid-4 > *,
  .question-premium-panel, .question-bank-shell, .reset-link-card,
  .fee-card, .ledger-card, .incident-card, .action-panel, .report-panel
):hover{
  background:#02070e!important;
  background-image:none!important;
}
body.workspace-dark-theme:not(.exam-portal) .question-bank-shell .form-card,
body.workspace-dark-theme:not(.exam-portal) .question-bank-shell .form-card:hover{
  background:#02070e!important;
  background-image:none!important;
  box-shadow:none!important;
}


/* FINAL LIVE PROCTOR SURFACE + TIMELINE CHIP HOVER FIX
   Scope is intentionally limited to the last remaining proctor cards and
   Grouped/Live Stream view controls. */
body.admin-portal.workspace-dark-theme:not(.exam-portal) .ai-proctor-insights > .ai-insight-card,
body.admin-portal.workspace-dark-theme:not(.exam-portal) .ai-proctor-insights > .ai-insight-card:hover,
body.admin-portal.workspace-dark-theme:not(.exam-portal) .ai-proctor-insights > .panel.ai-insight-card,
body.admin-portal.workspace-dark-theme:not(.exam-portal) .ai-proctor-insights > .panel.ai-insight-card:hover{
  background:#02070e!important;
  background-color:#02070e!important;
  background-image:none!important;
  border-color:rgba(201,150,26,.38)!important;
  box-shadow:none!important;
}
body.admin-portal.workspace-dark-theme:not(.exam-portal) .ai-proctor-insights .ai-insight-card .empty{
  background:#080d13!important;
  background-image:none!important;
}

/* Timeline view buttons: retain selected-state meaning and add the same
   premium lift/glow feedback used by other portal controls. */
body.admin-portal.workspace-dark-theme:not(.exam-portal) .ai-proctor-toolbar .proctor-filter-chips .proctor-chip{
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease!important;
}
body.admin-portal.workspace-dark-theme:not(.exam-portal) .ai-proctor-toolbar .proctor-filter-chips .proctor-chip:not(.active):hover,
body.admin-portal.workspace-dark-theme:not(.exam-portal) .ai-proctor-toolbar .proctor-filter-chips .proctor-chip:not(.active):focus-visible{
  transform:translateY(-2px)!important;
  background:rgba(240,192,64,.16)!important;
  border-color:rgba(255,212,77,.82)!important;
  color:#fff3c4!important;
  -webkit-text-fill-color:#fff3c4!important;
  box-shadow:0 10px 24px rgba(216,165,28,.18)!important;
  outline:none!important;
}
body.admin-portal.workspace-dark-theme:not(.exam-portal) .ai-proctor-toolbar .proctor-filter-chips .proctor-chip.active:hover,
body.admin-portal.workspace-dark-theme:not(.exam-portal) .ai-proctor-toolbar .proctor-filter-chips .proctor-chip.active:focus-visible{
  transform:translateY(-2px)!important;
  filter:brightness(1.06)!important;
  box-shadow:0 12px 26px rgba(240,192,64,.28)!important;
  outline:none!important;
}


/* FINAL TRANSITION + OVERLAY DARK PAINT
   Prevents the legacy blue surface from flashing while portal pages change. */
html:has(body.workspace-dark-theme),
html:has(body.exam-portal){background:#01050a!important;background-image:none!important;}
body.workspace-dark-theme,
body.workspace-dark-theme::before{
  background-color:#01050a!important;
  background-image:none!important;
}
body.workspace-dark-theme .page-loader,
body.workspace-dark-theme .loading-overlay,
body.workspace-dark-theme .import-overlay,
body.workspace-dark-theme .astra-import-overlay,
body.workspace-dark-theme .fullscreen-gate,
body.workspace-dark-theme .completion-overlay{
  background-color:rgba(1,5,10,.94)!important;
  background-image:none!important;
}
body.workspace-dark-theme .loader-card,
body.workspace-dark-theme .loading-card,
body.workspace-dark-theme .astra-import-card,
body.workspace-dark-theme .completion-card,
body.workspace-dark-theme .fullscreen-card{
  background:#02070e!important;
  background-image:none!important;
}


/* ADMIN LOGIN EXACT SURFACE FIX */
body.admin-login-page.workspace-dark-theme .login-showcase > .login-side-card,
body.admin-login-page.workspace-dark-theme .login-showcase > .panel.login-side-card,
body.admin-login-page.workspace-dark-theme .login-feature-list,
body.admin-login-page.workspace-dark-theme .login-feature-item{
  background:#02070e!important;
  background-color:#02070e!important;
  background-image:none!important;
}


/* ================================================================
   AD ASTRA DEFINITIVE UNIFORM MOBILE PORTAL GUTTERS — 2026-07-29
   Regular Student and Admin pages only. One outer page gutter and one
   consistent card inset; no cumulative padding from nested wrappers.
   ================================================================ */
@media (max-width:700px){
  body.portal-theme.workspace-dark-theme:not(.exam-portal){
    --aa-portal-mobile-gutter:8px;
    --aa-portal-mobile-card-inset:12px;
  }

  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-shell,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .admin-shell,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .student-shell{
    width:100%!important;
    max-width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
    padding-left:0!important;
    padding-right:0!important;
    box-sizing:border-box!important;
  }

  body.portal-theme.workspace-dark-theme:not(.exam-portal) main.app-main,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main{
    width:100%!important;
    max-width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
    padding-left:var(--aa-portal-mobile-gutter)!important;
    padding-right:var(--aa-portal-mobile-gutter)!important;
    box-sizing:border-box!important;
    overflow-x:hidden!important;
  }

  /* Prevent secondary wrappers from adding another left/right gutter. */
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main > .page-shell,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main > .dashboard-shell,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main > .question-bank-shell,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main > .math-authoring-shell,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main > .math-author-shell,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main > .container,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main > .container-fluid,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main > .content-wrapper,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main > .page-content,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main > .content-wrap,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main > section,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main > form{
    width:100%!important;
    max-width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
    padding-left:0!important;
    padding-right:0!important;
    box-sizing:border-box!important;
  }

  /* Cards align to the same content edges on Admin and Student pages. */
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main .panel,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main .card,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main .form-card,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main .content-card,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main .glass-card,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main .dashboard-card,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main .dashboard-banner,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main .quick-admin-card,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main .mini-panel,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main .stats-tile,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main .main-card,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main .side-card,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main .white-card,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main .result-card,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main .course-card,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main .student-overview-card,
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main .student-summary-card{
    width:100%!important;
    max-width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
    padding-left:var(--aa-portal-mobile-card-inset)!important;
    padding-right:var(--aa-portal-mobile-card-inset)!important;
    box-sizing:border-box!important;
  }

  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-main .table-wrap{
    width:100%!important;
    max-width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
    box-sizing:border-box!important;
  }
}
/* === END DEFINITIVE UNIFORM MOBILE PORTAL GUTTERS === */

/* AD ASTRA native dropdown first-frame stabilisation.
   Preserve the existing theme and browser selection colour; only prepaint popup rows dark. */
select option, select optgroup {
  background-color:#081223!important;
  color:#f7e8b8!important;
}


/* AD ASTRA REMAINING SIDEBAR CARD GEOMETRY — 2026-08-20
   Scope is ONLY the collapsed Control Center / My Workspace card on
   non-Exam portal pages. Match its mobile edges to the app-main card gutter,
   make the collapsed card more compact on Mobile/Tablet, and proportion the
   heading without changing menu contents or desktop geometry. */
@media (max-width:700px){
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-shell.admin-shell > .app-sidebar{
    width:calc(100% - (2 * var(--aa-portal-mobile-gutter, 8px)))!important;
    max-width:calc(100% - (2 * var(--aa-portal-mobile-gutter, 8px)))!important;
    margin-left:var(--aa-portal-mobile-gutter, 8px)!important;
    margin-right:var(--aa-portal-mobile-gutter, 8px)!important;
    padding:10px 14px!important;
    min-height:0!important;
    height:auto!important;
    box-sizing:border-box!important;
  }
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-shell.admin-shell > .app-sidebar > .sidebar-head-row{
    min-height:38px!important;
    height:auto!important;
    margin:0!important;
  }
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-shell.admin-shell > .app-sidebar .sidebar-title{
    font-size:1.52rem!important;
    line-height:1.08!important;
    margin:0!important;
  }
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-shell.admin-shell > .app-sidebar .sidebar-menu-toggle{
    width:38px!important;
    height:34px!important;
    min-width:38px!important;
    min-height:34px!important;
  }
}
@media (min-width:701px) and (max-width:1366px){
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-shell.admin-shell > .app-sidebar{
    padding-top:13px!important;
    padding-bottom:13px!important;
    min-height:0!important;
    height:auto!important;
    box-sizing:border-box!important;
  }
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-shell.admin-shell > .app-sidebar > .sidebar-head-row{
    min-height:40px!important;
    height:auto!important;
    margin:0!important;
  }
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-shell.admin-shell > .app-sidebar .sidebar-title{
    font-size:1.50rem!important;
    line-height:1.08!important;
    margin:0!important;
  }
}
/* End AD ASTRA remaining sidebar card geometry. */
\n\n/* AD ASTRA FINAL REMAINING CARD PROPORTION FIX — 2026-08-20 */
/* Tablet: the app-shell already contributes the first 8px page inset and
   app-main contributes a second 8px inset to the cards below. Give the
   collapsed workspace card that same second inset, without touching its
   desktop geometry or any menu behaviour. */
@media (min-width:701px) and (max-width:1180px){
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-shell.admin-shell > .app-sidebar{
    width:calc(100% - 16px)!important;
    max-width:calc(100% - 16px)!important;
    margin-left:8px!important;
    margin-right:8px!important;
    box-sizing:border-box!important;
  }
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-shell.admin-shell > .app-sidebar .sidebar-title{
    font-size:1.72rem!important;
    line-height:1.08!important;
  }
}
@media (max-width:700px){
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-shell.admin-shell > .app-sidebar .sidebar-title{
    font-size:1.68rem!important;
    line-height:1.08!important;
  }
}
/* End AD ASTRA final remaining card proportion fix. */

/* AD ASTRA TABLET WORKSPACE CARD FINAL ALIGNMENT — 2026-08-20
   Tablet only: match Control Center / My Workspace card edges to the primary
   cards below and increase title size slightly. No mobile/desktop changes. */
@media (min-width:701px) and (max-width:1180px){
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-shell.admin-shell > .app-sidebar{
    width:calc(100% - 32px)!important;
    max-width:calc(100% - 32px)!important;
    margin-left:16px!important;
    margin-right:16px!important;
    box-sizing:border-box!important;
  }
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-shell.admin-shell > .app-sidebar .sidebar-title{
    font-size:1.84rem!important;
    line-height:1.08!important;
  }
}
/* End tablet workspace card final alignment. */


/* AD ASTRA PRECISE TABLET WORKSPACE CARD ALIGNMENT — 2026-08-20
   Tablet only. The primary content cards begin 6px inside the app-shell edge at
   this breakpoint, so use the same inset for Control Center / My Workspace. */
@media (min-width:701px) and (max-width:1180px){
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-shell.admin-shell > .app-sidebar{
    width:calc(100% - 12px)!important;
    max-width:calc(100% - 12px)!important;
    margin-left:6px!important;
    margin-right:6px!important;
    box-sizing:border-box!important;
  }
  body.portal-theme.workspace-dark-theme:not(.exam-portal) .app-shell.admin-shell > .app-sidebar .sidebar-title{
    font-size:2rem!important;
    line-height:1.08!important;
  }
}
/* End precise tablet workspace card alignment. */

/* Mobile interaction reliability: allow scrolling to remain native while taps on controls resolve promptly. */
@media (hover:none), (pointer:coarse){
  body.workspace-dark-theme a,
  body.workspace-dark-theme button,
  body.workspace-dark-theme input[type="button"],
  body.workspace-dark-theme input[type="submit"],
  body.workspace-dark-theme select{
    touch-action:manipulation;
  }
}
