/* Shared screen design tokens. Official letters and print styles stay independent. */
@media screen {
 :root {
  --ui-primary:#2563eb;--ui-primary-hover:#1d4ed8;--ui-primary-soft:#edf4ff;
  --ui-sidebar:#14283f;--ui-heading:#172f4a;--ui-text:#334155;--ui-muted:#64748b;
  --ui-bg:#f4f6fa;--ui-surface:#fff;--ui-soft:#f7f9fc;--ui-border:#d9e2ee;
  --ui-success:#166534;--ui-success-soft:#f0f9f3;--ui-danger:#b91c1c;--ui-danger-soft:#fff5f5;
  --ui-warning:#92400e;--ui-warning-soft:#fffbeb;--ui-focus:#93c5fd;
  --gov-bg:var(--ui-bg);--gov-primary:var(--ui-primary);--gov-sidebar:var(--ui-sidebar);--gov-accent:var(--ui-primary);
  --gov-text:var(--ui-text);--gov-muted:var(--ui-muted);--gov-border:var(--ui-border);
  --form-text:var(--ui-text);--form-border:var(--ui-border);--form-primary:var(--ui-primary);
 }
 body.app-shell,body.portal-page{background:var(--ui-bg);color:var(--ui-text);font-family:Mukta,"Segoe UI",sans-serif;font-size:16px;line-height:1.6}
 body.app-shell .sidebar{background:var(--ui-sidebar);box-shadow:none;border-right:1px solid #ffffff0a}
 body.app-shell .sidebar .brand{display:flex;align-items:center;gap:8px;box-sizing:border-box;width:100%;height:60px;min-height:60px;margin:0;padding:0 8px;border:1px solid rgba(255,255,255,.18);border-radius:18px;background:linear-gradient(135deg,#c62828 0%,#e53935 100%);color:#fff;box-shadow:0 18px 32px rgba(105,18,18,.28);backdrop-filter:blur(10px)}
 body.app-shell .sidebar .brand-mark{display:inline-flex;align-items:center;justify-content:center;flex:0 0 50px;width:50px;height:50px;padding:2px;border:0;border-radius:8px;background:linear-gradient(135deg,rgba(255,255,255,.98) 0%,rgba(225,238,247,.96) 100%);box-shadow:0 10px 22px rgba(5,17,31,.24);overflow:visible}
 body.app-shell .sidebar .brand-mark img{display:block;width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain;object-position:center;transform:none}
 body.app-shell .sidebar .ioms-brand-text{display:flex;flex-direction:column;min-width:0}
 body.app-shell .sidebar .ioms-brand-title{font-family:"Inter","Segoe UI",Arial,sans-serif;color:#fff;font-size:18px;font-weight:800;letter-spacing:.2px;line-height:1.2}
 body.app-shell .sidebar .ioms-brand-subtitle{color:#fff;font-size:10px;font-weight:800;line-height:1.5;white-space:nowrap}
 @media(min-width:1001px){body.app-shell.sidebar-collapsed .sidebar .brand{padding:0 4px;justify-content:center;border-radius:12px}body.app-shell.sidebar-collapsed .sidebar .ioms-brand-text{display:none}}
 body.app-shell .sidebar nav{margin-top:12px}
 body.app-shell .sidebar nav a,body.app-shell .sidebar nav summary{color:#c9d5e5}
 body.app-shell .sidebar nav a:hover,body.app-shell .sidebar nav summary:hover{background:#ffffff0a;color:#fff}
 body.app-shell .sidebar nav a.active{background:#2563eb28;color:#fff;border-left:0;box-shadow:inset 3px 0 #7eb2ff}
 body.app-shell .sidebar nav .nav-icon,body.app-shell .sidebar nav .sifaris-nav-items a>.icon,body.app-shell .sidebar nav .nav-children a>.icon{color:#98adc5}
 body.app-shell .sidebar nav details>summary>.nav-icon{background:#ffffff07}
 body.app-shell .sidebar nav a.active .nav-icon,body.app-shell .sidebar nav a:hover .nav-icon{color:#b6d4ff}
 body.app-shell .sidebar .version{border-color:#ffffff12;color:#b0c0d4}
 body.app-shell .main-content{color:var(--ui-text)}
 body.app-shell .main-content h1:not(:where(.cke *,.letterhead-page *,.letterhead-custom-page *,.template-letter-preview *,.recommendation-letter *,.letter-preview *,.letter-body *,.planning-document *,.revenue-receipt *)),
 body.portal-page .portal-heading h1{font-size:26px;font-weight:700;line-height:1.45;text-decoration:none;color:var(--ui-heading);letter-spacing:0}
 body.app-shell .page-heading p,body.app-shell .panel-heading p,body.portal-page .portal-heading p{color:var(--ui-muted);font-size:15px;line-height:1.65}
 body.app-shell :is(.panel,.settings-card,.reference-card,.module-panel),body.portal-page .panel{border:1px solid var(--ui-border);border-radius:12px;box-shadow:0 2px 9px #14283f05;background:var(--ui-surface)}
 body.app-shell .panel-heading,body.portal-page .panel-heading{border-color:var(--ui-border)}
 body.app-shell .main-content .panel-heading h3{font-size:20px;color:var(--ui-heading)}
 body.app-shell .panel-body,body.portal-page .panel-body{color:var(--ui-text)}
 body.app-shell :is(.module-hero,.citizen-hero){color:var(--ui-text);background:#e8edf3;border:1px solid var(--ui-border);box-shadow:none;border-radius:12px}
 body.app-shell .welcome-banner{background:var(--ui-heading);box-shadow:none;border-radius:12px}
 body.app-shell :is(.module-hero,.citizen-hero) h1{color:var(--ui-heading)}
 body.app-shell .welcome-banner h1{color:#fff}
 body.app-shell :is(.module-hero,.citizen-hero) p{color:var(--ui-muted)}
 body.app-shell .welcome-banner p{color:#d6e2f0}
 body.app-shell .module-hero .module-eyebrow{color:var(--ui-muted)}
 body.app-shell :is(.module-stats article,.citizen-stat-card,.stat-card){background:#fff;border:1px solid var(--ui-border);border-top:3px solid var(--ui-primary);box-shadow:0 2px 8px #14283f05}
 body.app-shell :is(.module-stat-icon,.citizen-stat-icon,.settings-icon){background:var(--ui-primary-soft);color:var(--ui-primary);border-color:#d8e6fa}
 body.app-shell :is(.module-stats strong,.citizen-stat-value,.stat-card strong){color:var(--ui-heading)}
 body.app-shell :is(.module-chart .module-bar-track span,.citizen-bar-track>div,.citizen-ward-track>div){background:var(--ui-primary)}
 body.app-shell :is(.module-launcher a,.settings-card,.reference-card){color:var(--ui-heading)}
 body.app-shell :is(.module-launcher a,.settings-card,.reference-card):hover{border-color:#b9cee9;background:#fcfdff;box-shadow:0 5px 16px #14283f0a}
 body.app-shell .module-launcher a:hover{transform:translateY(-2px)}
 body.app-shell :is(.module-launcher a,.settings-card,.reference-card)>.icon{color:var(--ui-primary)}
 body.app-shell :is(.module-filters,.helper-box,.scope-note,.citizen-profile-flow,.planning-repeat-row,.letter-palette,.letter-field-inspector),body.portal-page .helper-box{background:var(--ui-soft);border-color:var(--ui-border);color:var(--ui-text);border-radius:10px}
 body.app-shell .main-content .section-title,body.portal-page .section-title{color:var(--ui-heading);border-bottom:1px solid var(--ui-border);padding-bottom:10px;font-size:18px;font-weight:600}
 body.app-shell .field label,body.portal-page .field label{color:var(--ui-text);font-size:15px;font-weight:500;line-height:1.6}
 body.app-shell .field small,body.portal-page .field small{color:var(--ui-muted);font-size:13px}
 body.app-shell .field :is(input,select,textarea):not(:where(.cke *,[contenteditable] *,.letterhead-page *,.template-letter-preview *,.letter-body *)),
 body.portal-page .field :is(input,select,textarea),
 body.app-shell :is(.filter-bar,.module-filters,.citizen-filters,.planning-filters) :is(input,select){
  border:1px solid var(--ui-border)!important;border-radius:8px;background:var(--ui-surface)!important;
  color:var(--ui-text)!important;font-size:16px;line-height:1.5;min-height:42px;height:auto;
  padding:8px 11px;box-shadow:none;transition:border-color .15s,box-shadow .15s;
 }
 body.app-shell .field :is(input[type=checkbox],input[type=radio]),body.portal-page .field :is(input[type=checkbox],input[type=radio]){
  width:auto;min-height:0;height:auto;padding:0;accent-color:var(--ui-primary)
 }
 body.app-shell input[type=checkbox],body.app-shell input[type=radio],body.portal-page input[type=checkbox],body.portal-page input[type=radio]{accent-color:var(--ui-primary)}
 body.app-shell .field textarea,body.portal-page .field textarea{min-height:112px}
 body.app-shell .field :is(input,select,textarea):focus,body.portal-page .field :is(input,select,textarea):focus{
  border-color:var(--ui-primary)!important;outline:none;box-shadow:0 0 0 3px #2563eb18
 }
 body.app-shell .field :is(input,textarea)[readonly],body.portal-page .field :is(input,textarea)[readonly]{background:var(--ui-soft)!important;color:#52657c!important}
 body.app-shell .field :is(input,select,textarea):disabled,body.portal-page .field :is(input,select,textarea):disabled{background:#eef2f7!important;color:#64748b!important;cursor:not-allowed}
 body.app-shell .field :is(input,select,textarea)[aria-invalid=true],body.portal-page .field :is(input,select,textarea)[aria-invalid=true]{border-color:var(--ui-danger)!important}
 body.app-shell .field .field-error,body.portal-page .field .field-error{color:var(--ui-danger)!important}
 body.app-shell :is(.btn,.calendar-trigger,.letter-palette-item,a,summary):focus-visible,body.portal-page :is(.btn,.calendar-trigger,a,summary):focus-visible{outline:3px solid var(--ui-focus);outline-offset:3px}
 body.app-shell .calendar-trigger,body.portal-page .calendar-trigger{background:var(--ui-primary-soft);border-color:#ccdef7;color:var(--ui-primary);border-radius:7px}
 body.app-shell .date-picker-dialog .is-selected,body.portal-page .date-picker-dialog .is-selected{background:var(--ui-primary);color:#fff}
 body.app-shell .date-picker-day:hover,body.portal-page .date-picker-day:hover{background:var(--ui-primary-soft)}
 body.app-shell .date-picker-dialog .is-today,body.portal-page .date-picker-dialog .is-today{box-shadow:inset 0 0 0 1px var(--ui-primary)}
 body.app-shell .date-picker-dialog,body.app-shell .selection-field-dialog,body.portal-page .date-picker-dialog{border:1px solid var(--ui-border);border-radius:12px;box-shadow:0 20px 64px #14283f26;color:var(--ui-text)}
 body.app-shell :is(.date-picker-dialog,.selection-field-dialog)::backdrop,body.portal-page .date-picker-dialog::backdrop{background:#10223566}
 body.app-shell :is(.module-actions a,.letter-palette-item){background:#fff;color:var(--ui-text);border-color:var(--ui-border)}
 body.app-shell :is(.module-actions a,.letter-palette-item):hover{background:var(--ui-primary-soft);color:var(--ui-primary);border-color:#b9cee9}
 body.app-shell .letter-palette-item.is-selected,body.app-shell .letter-used-field.is-selected .letter-palette-item{background:var(--ui-primary-soft);border-color:#8cb1e7}
 body.app-shell :is(.module-filters,.citizen-profile-flow,.citizen-duplicates){border-color:var(--ui-border)}
 body.app-shell .planning-settings-nav{background:#edf1f7;border:1px solid var(--ui-border)}
 body.app-shell .planning-settings-nav-heading{background:#e2e9f2;color:var(--ui-heading)}
 body.app-shell .planning-settings-nav nav a.is-active{background:#fff;color:var(--ui-primary);box-shadow:inset 3px 0 var(--ui-primary)}
 body.app-shell :is(.alert.success,.alert-success){background:var(--ui-success-soft);border:1px solid #cce6d5;color:var(--ui-success)}
 body.app-shell :is(.alert.error,.alert-error,.alert-danger){background:var(--ui-danger-soft);border:1px solid #f1d2d2;color:var(--ui-danger)}
 body.app-shell :is(.status,.pill){border-radius:6px;font-size:13px;font-weight:500}
 body.app-shell :is(.status.pending,.status.reviewing){background:var(--ui-warning-soft);color:var(--ui-warning)}
 body.app-shell :is(.status.approved,.status.completed){background:var(--ui-success-soft);color:var(--ui-success)}
 body.app-shell :is(.status.rejected,.status.cancelled){background:var(--ui-danger-soft);color:var(--ui-danger)}
 body.app-shell .detail-grid dd,body.app-shell .request-details,body.app-shell .attachment-link{color:var(--ui-text)}
 body.app-shell .muted,body.app-shell .detail-grid dt,body.app-shell .pagination,body.portal-page .muted{color:var(--ui-muted)}
 body.app-shell .app-footer{background:transparent;color:var(--ui-muted);border-top:1px solid var(--ui-border);font-size:13px;padding:18px 28px;gap:12px;flex-wrap:wrap}
 body.portal-page .portal-header{border-color:var(--ui-border);background:#fff}
 body.portal-page .portal-header .brand{color:var(--ui-heading)}
 body.portal-page .portal-heading{color:var(--ui-text)}
 body.portal-page .portal-stepper{color:var(--ui-muted)}
 body.portal-page .portal-stepper .selected,body.portal-page .portal-stepper span{color:var(--ui-primary)}
 body.portal-page .portal-stepper .selected b{background:var(--ui-primary-soft);border-color:#c9dcf8}
 body.portal-page .portal-footer{border-color:var(--ui-border);color:var(--ui-muted)}
 body.portal-page .tracking-code,body.portal-page .tracking-icon{background:var(--ui-primary-soft);color:var(--ui-primary)}
 body.app-shell :is(.main-content,.navigation-search-dialog) table:not(:where(.cke *,[contenteditable] *,.letterhead-page *,.letterhead-custom-page *,.template-letter-preview *,.recommendation-letter *,.letter-preview *,.letter-body *,.planning-document *,.revenue-receipt *,.register-print *))> :is(thead,tbody,tfoot)>tr> :is(th,td){
  border-color:#d4dfeb;color:var(--ui-text);font-size:15px;padding:12px 14px
 }
 body.app-shell :is(.main-content,.navigation-search-dialog) table:not(:where(.cke *,[contenteditable] *,.letterhead-page *,.letterhead-custom-page *,.template-letter-preview *,.recommendation-letter *,.letter-preview *,.letter-body *,.planning-document *,.revenue-receipt *,.register-print *))>thead>tr>th{
  background:#e8eef6;color:var(--ui-heading);font-weight:700;border-color:#cdd9e8
 }
 body.app-shell :is(.main-content,.navigation-search-dialog) table:not(:where(.cke *,[contenteditable] *,.letterhead-page *,.letterhead-custom-page *,.template-letter-preview *,.recommendation-letter *,.letter-preview *,.letter-body *,.planning-document *,.revenue-receipt *,.register-print *))>tbody>tr:nth-child(even){background:#f8fafc}
 body.app-shell :is(.main-content,.navigation-search-dialog) table:not(:where(.cke *,[contenteditable] *,.letterhead-page *,.letterhead-custom-page *,.template-letter-preview *,.recommendation-letter *,.letter-preview *,.letter-body *,.planning-document *,.revenue-receipt *,.register-print *))>tbody>tr:hover{background:#f0f5fc}
 body.app-shell .table-wrap{border-radius:9px}
 @media(max-width:760px){body.app-shell .main-content h1:not(:where(.cke *,.letterhead-page *,.template-letter-preview *,.letter-body *,.planning-document *,.revenue-receipt *)){font-size:23px}body.app-shell .app-footer{padding:16px}}
 @media(prefers-reduced-motion:reduce){body.app-shell *,body.portal-page *{transition:none!important;animation:none!important;scroll-behavior:auto!important}}
}

/* IOMS heritage screen tokens. Legal previews and print layouts are excluded. */
@media screen {
 body.app-shell {
  --paper-page:#f5eedf;--paper-card:#fffcf5;--paper-sunken:#f1e9d6;
  --paper-border:#e2d5ba;--paper-border-strong:#cdbf9f;
  --chrome-bg:#2f4f66;--chrome-bg-hover:#ffffff14;--chrome-bg-active:#ffffff24;
  --chrome-text:#fff;--chrome-text-muted:#d8e2e8;--chrome-border:#ffffff2e;
  --primary:#315a70;--primary-hover:#284b5e;--accent:#8c3030;--accent-soft:#f2d9d3;--highlight:#f3d9a8;
  --text:#2b2118;--text-muted:#5e503d;--placeholder:#76675a;
  --success:#2e6b4f;--warning:#9a5b00;--danger:#8c3030;--info:#315a70;
  --radius-sm:6px;--radius-md:8px;--radius-lg:14px;
  --shadow-card:0 1px 3px #3c280a14;--shadow-pop:0 8px 24px #3c280a1f;
  --s1:4px;--s2:8px;--s3:12px;--s4:16px;--s5:24px;--s6:32px;--s7:48px;
  --control-h:44px;--focus-ring:0 0 0 3px #315a7059;
  --ui-primary:var(--primary);--ui-primary-hover:var(--primary-hover);--ui-primary-soft:#e7eef1;
  --ui-sidebar:var(--chrome-bg);--ui-heading:var(--text);--ui-text:#49392d;--ui-muted:var(--text-muted);
  --ui-bg:var(--paper-page);--ui-surface:var(--paper-card);--ui-soft:var(--paper-sunken);
  --ui-border:var(--paper-border);--ui-focus:#8cabbc;
 }

 /* Shared application surfaces only: never target letter-page/letter-body descendants here. */
 body.app-shell .main-content {background:var(--paper-page);color:var(--ui-text)}
 body.app-shell :is(.panel,.settings-card,.reference-card,.module-panel,.sifaris-record-card) {
  background:var(--paper-card);border-color:var(--paper-border);border-radius:var(--radius-lg);box-shadow:var(--shadow-card)
 }
 body.app-shell :is(.module-filters,.helper-box,.scope-note,.citizen-profile-flow,.planning-repeat-row) {
  background:var(--paper-sunken);border-color:var(--paper-border)
 }
 body.app-shell .field :is(input,select,textarea):not(:where(.cke *,[contenteditable] *,.letterhead-page *,.template-letter-preview *,.recommendation-preview *,.letter-page *,.letter-body *)) {
  min-height:var(--control-h);border-color:var(--paper-border-strong)!important;border-radius:var(--radius-md);background:var(--paper-card)!important;color:var(--ui-text)!important
 }
 body.app-shell .field :is(input,select,textarea):not(:where(.cke *,[contenteditable] *,.letterhead-page *,.template-letter-preview *,.recommendation-preview *,.letter-page *,.letter-body *)):focus {
  border-color:var(--primary)!important;box-shadow:var(--focus-ring)
 }
 body.app-shell .field :is(input,textarea)[readonly]:not(:where(.letter-page *,.letter-body *)) {background:var(--paper-sunken)!important;color:var(--text-muted)!important}
 body.app-shell .main-content table:not(:where(.cke *,[contenteditable] *,.letterhead-page *,.template-letter-preview *,.recommendation-preview *,.letter-page *,.letter-body *))>thead>tr>th {
  background:var(--paper-sunken);border-color:var(--paper-border-strong);color:var(--text)
 }
}
@media screen {
 body.login.gov-ui{background:var(--ui-bg);color:var(--ui-text);font-family:Mukta,"Segoe UI",sans-serif}
 body.login.gov-ui .gov-login-app{background:#fff;border:1px solid var(--ui-border);box-shadow:0 12px 40px #14283f0c}
 body.login.gov-ui .gov-login-showcase{background:var(--ui-soft)}
 body.login.gov-ui .gov-login-showcase::before,body.login.gov-ui .gov-login-showcase::after,
 body.login.gov-ui .gov-login-access__backdrop,body.login.gov-ui .gov-login-quote-card__art,
 body.login.gov-ui .public-portal-card::before,body.login.gov-ui .public-portal-card::after,
 body.login.gov-ui .gov-login-stats-bar__wave{display:none}
 body.login.gov-ui .gov-login-access{background:#fff}
 body.login.gov-ui .gov-login-brand--premium{background:#fff;border:1px solid var(--ui-border);border-radius:14px;box-shadow:none;backdrop-filter:none}
 body.login.gov-ui .gov-login-brand__logo-shell{box-shadow:none;border-color:var(--ui-border);background:#fff}
 body.login.gov-ui .gov-login-brand__title,body.login.gov-ui .gov-login-brand__title span,
 body.login.gov-ui .gov-login-brand__tagline-primary,body.login.gov-ui .gov-login-brand__tagline-secondary{color:var(--ui-heading)}
 body.login.gov-ui .gov-login-brand__eyebrow{color:var(--ui-muted);letter-spacing:.6px}
 body.login.gov-ui .gov-login-brand__divider{color:var(--ui-muted)}
 body.login.gov-ui .gov-login-brand__divider::before,body.login.gov-ui .gov-login-brand__divider::after{background:var(--ui-border)}
 body.login.gov-ui .gov-login-brand__tagline{font-weight:500;color:var(--ui-muted)}
 body.login.gov-ui .public-portal-card{background:var(--ui-heading);border:1px solid var(--ui-heading);border-radius:14px;box-shadow:none}
 body.login.gov-ui .public-portal-card__title-large{color:#fff;font-size:23px;line-height:1.5}
 body.login.gov-ui .public-portal-card__eyebrow,body.login.gov-ui .public-portal-card__choose{color:#d8e5f4}
 body.login.gov-ui .public-portal-card__highlight{background:#ffffff0d;border-color:#ffffff24;color:#e3edf8}
 body.login.gov-ui .public-portal-card__head>.icon{width:30px;height:30px;color:#c6dcfb;flex-shrink:0}
 body.login.gov-ui .public-portal-card__link{background:#fff;color:var(--ui-heading);border:1px solid #dae4f0;box-shadow:none;border-radius:9px;text-align:left;min-height:74px}
 body.login.gov-ui .public-portal-card__link:hover{background:#edf4ff;box-shadow:none;transform:translateY(-1px)}
 body.login.gov-ui .public-portal-card__action-copy span{color:var(--ui-muted)}
 body.login.gov-ui .public-portal-card__link>.icon{width:22px;height:22px;flex-shrink:0;color:var(--ui-primary);background:transparent}
 body.login.gov-ui .public-portal-card__link>.public-portal-card__arrow{margin-left:auto;width:18px;height:18px}
 body.login.gov-ui .gov-login-quote-card{background:#fff;border:1px solid var(--ui-border);border-radius:12px;min-height:110px}
 body.login.gov-ui .gov-login-quote-card h2,body.login.gov-ui .gov-login-quote-card__highlight{color:var(--ui-heading);font-weight:600}
 body.login.gov-ui .gov-login-quote-card__mark{color:var(--ui-primary)}
 body.login.gov-ui .gov-login-stats-bar{background:#eaf0f8;color:var(--ui-heading);padding-top:24px}
 body.login.gov-ui .gov-login-stat,body.login.gov-ui .gov-login-stat strong{color:var(--ui-heading)}
 body.login.gov-ui .gov-login-stat span:not(.gov-login-stat__icon){color:var(--ui-muted)}
 body.login.gov-ui .gov-login-stat__icon{background:#fff;color:var(--ui-primary);border:1px solid var(--ui-border)}
 body.login.gov-ui .gov-login-card{background:#fff;border:1px solid var(--ui-border);border-radius:14px;box-shadow:0 4px 20px #14283f08;backdrop-filter:none}
 body.login.gov-ui .gov-login-card__crest img{box-shadow:none;background:#fff}
 body.login.gov-ui .gov-login-card__heading h3{color:var(--ui-heading);font-weight:700;font-size:24px}
 body.login.gov-ui .gov-login-card__heading p{color:var(--ui-muted);font-weight:400;font-size:15px}
 body.login.gov-ui .gov-login-field .form-control{background:#fff;border:1px solid var(--ui-border);border-radius:8px;box-shadow:none;min-height:46px}
 body.login.gov-ui .gov-login-field .form-control:focus{border-color:var(--ui-primary);box-shadow:0 0 0 3px #2563eb18}
 body.login.gov-ui .gov-login-field__icon,body.login.gov-ui .gov-login-password-toggle{color:var(--ui-muted)}
 body.login.gov-ui .gov-login-submit__button{background:var(--ui-primary);border-color:var(--ui-primary);box-shadow:none;border-radius:8px;min-height:46px;font-size:16px}
 body.login.gov-ui .gov-login-submit__button:hover{background:var(--ui-primary-hover);border-color:var(--ui-primary-hover)}
 body.login.gov-ui .gov-login-submit__button-icon{background:transparent;border-color:#ffffff33}
 body.login.gov-ui .gov-login-forgot{color:var(--ui-primary)}
 body.login.gov-ui .gov-login-footerbar{background:#fff;color:var(--ui-muted);border-top:1px solid var(--ui-border)}
 body.login.gov-ui .gov-login-footerbar a,body.login.gov-ui .gov-login-footerbar__left{color:var(--ui-muted)}
 body.login.gov-ui .icon{width:20px;height:20px;vertical-align:middle;flex-shrink:0}
 body.login.gov-ui .gov-login-brand__divider .icon,body.login.gov-ui .gov-login-brand__tagline .icon{width:15px;height:15px}
 body.login.gov-ui .gov-login-quote-card__mark .icon{width:30px;height:30px}
 body.login.gov-ui .gov-login-stat__icon .icon{width:24px;height:24px}
 body.login.gov-ui .public-portal-card__highlight .icon{width:15px;height:15px;margin-right:4px}
 body.login.gov-ui .gov-login-submit__button:focus-visible,body.login.gov-ui a:focus-visible,body.login.gov-ui button:focus-visible{outline:3px solid var(--ui-focus);outline-offset:3px}
 body.login.gov-ui input[type=checkbox]{accent-color:var(--ui-primary)}
 body.login.gov-ui .gov-login-help-message{color:var(--ui-text);background:var(--ui-soft);border-color:var(--ui-border)}
 @media(prefers-reduced-motion:reduce){body.login.gov-ui *,body.login.gov-ui *::before,body.login.gov-ui *::after{animation:none!important;transition:none!important}}
}
@media screen {
 body.login.gov-ui .gov-login-brand--premium::before,body.login.gov-ui .gov-login-brand--premium::after{display:none}
 body.login.gov-ui .gov-login-brand__copy h1{font-size:27px;font-weight:700;line-height:1.4;white-space:normal;word-spacing:0;letter-spacing:0;text-shadow:none;color:var(--ui-heading)}
 body.login.gov-ui .gov-login-brand__copy h1 span{color:var(--ui-heading)}
 body.login.gov-ui .gov-login-brand__copy p{font-weight:500;color:var(--ui-muted)}
 body.login.gov-ui .gov-login-brand__eyebrow{background:var(--ui-soft);border-color:var(--ui-border);font-weight:600}
 body.login.gov-ui .gov-login-brand__logo-shell img{filter:none}
 body.login.gov-ui .gov-login-form .gov-login-submit__button{background:var(--ui-primary);border:1px solid var(--ui-primary);padding:8px 14px;align-items:center;gap:8px;border-radius:8px;color:#fff}
 body.login.gov-ui .gov-login-form .gov-login-submit__button:hover{background:var(--ui-primary-hover);border-color:var(--ui-primary-hover)}
 body.login.gov-ui .gov-login-form .gov-login-submit__button-icon{width:22px;background:transparent;color:inherit}
 body.login.gov-ui .gov-login-form .gov-login-submit__button-text{background:transparent;color:inherit;font-weight:600}
 body.login.gov-ui .gov-login-form .gov-login-submit__button:hover :is(.gov-login-submit__button-icon,.gov-login-submit__button-text){background:transparent}
 body.login.gov-ui .gov-login-form .gov-login-submit__button[aria-busy=true]>span{visibility:hidden}
 body.login.gov-ui .gov-login-footerbar__right a,body.login.gov-ui .gov-login-footerbar__right a:hover,body.login.gov-ui .gov-login-footerbar__right a:focus{color:var(--ui-muted)!important}
 @media(max-width:600px){body.login.gov-ui .gov-login-brand__copy h1{font-size:23px}}
}
@media screen {
 body.app-shell .rrcms-topbar [data-navigation-toggle].btn{border:1px solid #ffffff66;background:#ffffff08;color:#f8fafc}
 body.app-shell .rrcms-topbar [data-navigation-toggle].btn:hover{background:#ffffff16;color:#fff;border-color:#ffffff99}
 body.app-shell .sidebar nav details:not([open])>summary>.sifaris-nav-chevron{transform:rotate(0)}
 body.portal-page .portal-main>section>h1{font-size:26px;font-weight:700;line-height:1.5;color:var(--ui-heading);text-decoration:none}
}
@media screen {
 body.portal-page .alert.success{background:var(--ui-success-soft);color:var(--ui-success);border:1px solid #cce6d5}
 body.portal-page .alert.error,body.login.gov-ui .alert-danger{background:var(--ui-danger-soft);color:var(--ui-danger);border:1px solid #f1d2d2}
 @media(max-width:1199px){
  body.login.gov-ui .gov-login-grid{display:flex;flex-direction:column;min-height:0}
  body.login.gov-ui .gov-login-access{order:0;min-height:0;padding:28px 20px}
  body.login.gov-ui .gov-login-showcase{order:1;padding:24px 20px}
  body.login.gov-ui .gov-login-card{max-width:480px;min-height:0;margin:0 auto;padding:26px 22px}
 }
 @media(max-width:600px){body.login.gov-ui .gov-login-stats-bar{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:0;padding:22px 12px}}
}
@media screen {
 body.app-shell :is(.settings-card p,.help-panel p,.stat-caption,.stat-label,.quick-links small,.ward-summary small,.activity-list small,.activity-list time,.settings-search){color:var(--ui-muted)}
 body.app-shell :is(.quick-links>a>.icon,.reference-card .icon,.portal-card>.icon,.ward-summary>a,.text-link){color:var(--ui-primary)}
 body.app-shell :is(.settings-card h3,.reference-card h3){color:var(--ui-heading)}
 body.app-shell .status{background:var(--ui-soft);color:var(--ui-muted)}
 body.app-shell .status-submitted{background:var(--ui-primary-soft);color:var(--ui-primary)}
 body.app-shell :is(.status-reviewing,.status-needs_info){background:var(--ui-warning-soft);color:var(--ui-warning)}
 body.app-shell :is(.status-approved,.status-completed){background:var(--ui-success-soft);color:var(--ui-success)}
 body.app-shell :is(.status-rejected,.status-cancelled){background:var(--ui-danger-soft);color:var(--ui-danger)}
 body.portal-page .portal-header .brand small{color:var(--ui-muted)}
 body.portal-page .panel-heading h3{text-decoration:none;color:var(--ui-heading);font-size:23px;font-weight:600}
}

/* Keep the application chrome visible while only the workspace content scrolls. */
@media screen {
 html:has(body.app-shell),body.app-shell{height:100%;overflow:hidden}
 body.app-shell .workspace{height:100vh;height:100dvh;min-height:0;overflow:hidden}
 body.app-shell .rrcms-topbar,body.app-shell .app-footer{flex:0 0 auto}
 body.app-shell .main-content{
  flex:1 1 auto;
  min-height:0;
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior-y:contain;
  scrollbar-gutter:stable;
 }
}

@media screen {
 body.app-shell .rrcms-topbar{background:var(--ui-sidebar);border-bottom:1px solid #ffffff16;box-shadow:none;min-height:68px;padding:10px 20px;box-sizing:border-box}
 body.app-shell .rrcms-topbar .topbar-left{border-color:#ffffff24}
 body.app-shell .rrcms-topbar .navigation-context strong{color:#fff;font-size:23px;font-weight:750;line-height:1.25}
 body.app-shell .rrcms-topbar .navigation-context small{color:#fff;font-size:14px;font-weight:600;line-height:1.3;white-space:nowrap}
 body.app-shell .rrcms-topbar .navigation-actions{font-size:16px;font-weight:600;border-color:#ffffff24}
 body.app-shell .rrcms-topbar .navigation-date{color:#d4e2f1;font-size:14px;font-weight:600}
 body.app-shell .rrcms-topbar .navigation-dropdown summary,body.app-shell .rrcms-topbar .navigation-search-button{background:#ffffff08;border-color:#ffffff2b;color:#f1f5f9;font-size:16px;font-weight:600}
 body.app-shell .rrcms-topbar .navigation-dropdown summary:hover,body.app-shell .rrcms-topbar .navigation-dropdown[open] summary,body.app-shell .rrcms-topbar .navigation-search-button:hover{background:#ffffff14;border-color:#ffffff55;color:#fff}
 body.app-shell .rrcms-topbar .navigation-account .avatar{background:#ffffff12;color:#d5e6ff}
 body.app-shell .rrcms-topbar .navigation-module-search{background:#ffffff08;border-color:#ffffff2b}
 body.app-shell .rrcms-topbar .navigation-module-search input{font-size:16px;font-weight:600;color:#f1f5f9}
 body.app-shell .rrcms-topbar .navigation-module-search input::placeholder{color:#d4e2f1;opacity:1}
 body.app-shell .rrcms-topbar .navigation-module-search .icon-button{color:#d4e2f1;background:transparent}
 body.app-shell .rrcms-topbar .navigation-module-search .icon-button:hover{background:#ffffff14;color:#fff}
 @media(max-width:768px){body.app-shell .rrcms-topbar .navigation-context strong{font-size:19px}body.app-shell .rrcms-topbar :is(.navigation-dropdown summary,.navigation-search-button,.navigation-module-search input){font-size:15px}body.app-shell .rrcms-topbar .navigation-context small{font-size:13px}}
}
@media screen {body.app-shell :is(.module-hero,.citizen-hero) h1>.icon{color:var(--ui-primary)}}

@media screen {body.app-shell .rrcms-topbar .navigation-module-search{flex-basis:235px;width:235px}body.app-shell .rrcms-topbar .navigation-context{max-width:none;gap:2px;flex-shrink:1;flex-direction:column;align-items:flex-start;text-align:left}@media(max-width:768px){body.app-shell .rrcms-topbar .navigation-module-search{flex:1 1 235px;width:auto}}}
@media screen {
 body.app-shell .rrcms-topbar .navigation-date{min-height:40px;padding:8px 11px;border:1px solid #ffffff2b;border-radius:8px;background:#ffffff08;box-sizing:border-box}
}

@media screen and (max-width:768px){body.app-shell .rrcms-topbar .navigation-context{gap:2px;flex-direction:column;align-items:flex-start}body.app-shell .rrcms-topbar .navigation-context strong{font-size:21px}}

@media screen {body.app-shell .module-hero.workspace-welcome{background:#d1d5db;border-color:#bfc6cf}}

/* Compact recommendation entry forms; independent of letter/editor content. */
@media screen {
 body.app-shell :is(.recommendation-form,#template-document-form) .form-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:16px 18px;align-items:start}
 body.app-shell :is(.recommendation-form,#template-document-form) .form-grid>div{grid-column:span 4;min-width:0}
 body.app-shell :is(.recommendation-form,#template-document-form) .form-grid>[data-input-size="short"]{grid-column:span 2}
 body.app-shell :is(.recommendation-form,#template-document-form) .form-grid>[data-input-size="address"]{grid-column:span 6}
 body.app-shell :is(.recommendation-form,#template-document-form) .form-grid>.field-full,
 body.app-shell :is(.recommendation-form,#template-document-form) .form-grid>[data-input-size="long"]{grid-column:1/-1}
 body.app-shell :is(.recommendation-form,#template-document-form) .form-grid .field{display:flex;flex-direction:column;align-items:stretch;gap:5px;min-width:0}
 body.app-shell :is(.recommendation-form,#template-document-form) .form-grid .field>label{font-size:15px;line-height:1.4}
 body.app-shell :is(.recommendation-form,#template-document-form) .form-grid .field small{margin:0}
 body.app-shell :is(.recommendation-form,#template-document-form) .form-grid>[data-input-size="short"] :is(input:not([type=checkbox]):not([type=radio]),select){max-width:150px}
 body.app-shell :is(.recommendation-form,#template-document-form) .form-grid>.field:has(>select[name="ward_id"]),
 body.app-shell :is(.recommendation-form,#template-document-form) .form-grid>.field:has(>input[name="chalani_no"]){grid-column:span 2}
 body.app-shell #template-document-form [data-input-size="address"] textarea{min-height:78px;height:78px}
 body.app-shell :is(.recommendation-form,#template-document-form) .section-title{margin-top:22px;margin-bottom:12px}
 @media(max-width:1100px){
  body.app-shell :is(.recommendation-form,#template-document-form) .form-grid>div{grid-column:span 6}
  body.app-shell :is(.recommendation-form,#template-document-form) .form-grid>[data-input-size="short"]{grid-column:span 3}
 }
 @media(max-width:600px){
  body.app-shell :is(.recommendation-form,#template-document-form) .form-grid{grid-template-columns:minmax(0,1fr);gap:14px}
  body.app-shell :is(.recommendation-form,#template-document-form) .form-grid>div{grid-column:1/-1!important}
 }
}

@media screen and (min-width:1101px){
 body.app-shell .recommendation-form .recommendation-meta-form{grid-template-columns:minmax(190px,1fr) minmax(330px,1.6fr) minmax(150px,.75fr) minmax(190px,1fr);gap:16px 18px;align-items:start}
 body.app-shell .recommendation-form .recommendation-meta-form>.field,
 body.app-shell .recommendation-form .recommendation-meta-form>.recommendation-date-field{grid-column:auto;display:flex;flex-direction:column;align-items:stretch;gap:5px;min-width:0}
}

@media screen {
 body.app-shell .citizen-form-prefill{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 16px;align-items:end;background:#f1f5f9;border:1px solid #d6e0ec;border-radius:8px;padding:16px;margin:0 0 22px}
 body.app-shell .citizen-form-prefill>h3{grid-column:1/-1;margin:0;padding:0;border:0;font-size:17px;font-weight:600;line-height:1.5}
 body.app-shell .citizen-form-prefill>h3 small{font-size:14px;font-weight:400;color:#64748b}
 body.app-shell .citizen-form-prefill>[data-citizen-picker]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 12px;margin:0;min-width:0}
 body.app-shell .citizen-form-prefill>[data-citizen-picker]>:is(label,small){grid-column:1/-1}
 body.app-shell .citizen-form-prefill>:is(p,small){grid-column:1/-1;margin:0;color:#64748b}
 body.app-shell .citizen-form-prefill>.btn{align-self:center}
 @media(max-width:760px){body.app-shell .citizen-form-prefill{grid-template-columns:minmax(0,1fr)}body.app-shell .citizen-form-prefill>[data-citizen-picker]{grid-template-columns:minmax(0,1fr)}}
}

@media screen {body.app-shell .revenue-bill-option{margin-top:22px;padding:14px 0 0;border-top:1px solid #d6e0ec}body.app-shell .revenue-bill-option label{display:flex;align-items:center;gap:8px;font-size:15px;line-height:1.5}}

/* Shared paginator: independent of Tailwind utilities and editor SVG controls. */
.workspace-pagination{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:16px 0;font-size:14px;line-height:1.5;color:#475569}
.workspace-pagination-controls{display:flex;align-items:center;flex-wrap:wrap;gap:6px}
.workspace-pagination .workspace-page-control{display:inline-flex;align-items:center;justify-content:center;min-width:34px;min-height:36px;padding:6px 11px;border:1px solid #cbd5e1;border-radius:7px;background:#fff;color:#334155;font-weight:500}
.workspace-pagination a.workspace-page-control:hover{background:#eff6ff;border-color:#93c5fd;color:#1d4ed8}
.workspace-pagination a.workspace-page-control:focus-visible{outline:3px solid #93c5fd;outline-offset:2px}
.workspace-pagination .workspace-page-control.is-current{background:#2563eb;border-color:#2563eb;color:#fff}
.workspace-pagination .workspace-page-control[aria-disabled=true]{background:#f1f5f9;color:#64748b;opacity:.7}
.workspace-pagination .workspace-page-ellipsis{padding:4px}
@media(max-width:600px){.workspace-pagination{align-items:flex-start;flex-direction:column}.workspace-pagination-controls{gap:4px}}
@media print{.workspace-pagination{display:none!important}}

/* One consistent service banner colour across module workspaces. */
@media screen{
body.app-shell :is(.module-hero,.citizen-hero,.welcome-banner),
body.app-shell .module-hero.workspace-welcome{background:linear-gradient(115deg,#102b4c,#1c4773);color:#fff;border:1px solid #315476;box-shadow:0 6px 20px #1837510d}
body.app-shell :is(.module-hero,.citizen-hero,.welcome-banner) :is(h1,h2,h3){color:#fff}
body.app-shell :is(.module-hero,.citizen-hero,.welcome-banner) p,
body.app-shell .module-hero .module-eyebrow{color:#d9e6f4}
body.app-shell :is(.module-hero,.citizen-hero) h1>.icon{color:#c4def7}
body.app-shell .welcome-banner .banner-tag{color:#e4effb;background:#ffffff12;border-color:#ffffff30}
body.app-shell :is(.module-hero,.citizen-hero) .btn-secondary{background:#fff;color:#1e3a5f;border-color:#fff}
}

/* Nepali heritage paper: screen surfaces only; document and print styling stay independent. */
@media screen {
 :root {
  --heritage-ivory:#F5EBD6;--heritage-aged:#E8D6B5;--heritage-ink:#49392D;
  --heritage-seal:#8C3030;--heritage-blue:#315A70;
  --ui-paper-color:var(--heritage-ivory);--ui-paper-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%22384%22%20height%3D%22384%22%3E%3Cfilter%20id%3D%22grain%22%3E%3CfeTurbulence%20type%3D%22fractalNoise%22%20baseFrequency%3D%220.48%22%20numOctaves%3D%223%22%20seed%3D%2217%22%20stitchTiles%3D%22stitch%22/%3E%3CfeColorMatrix%20type%3D%22saturate%22%20values%3D%220%22/%3E%3C/filter%3E%3Crect%20width%3D%22100%25%22%20height%3D%22100%25%22%20opacity%3D%220.055%22%20filter%3D%22url%28%23grain%29%22/%3E%3C/svg%3E"),radial-gradient(ellipse at 12% 8%,#ffffff24,transparent 70%),radial-gradient(ellipse at 85% 90%,#a6854f06,transparent 70%);
 }
 body.app-shell {
  --ui-heading:var(--heritage-ink);--ui-text:var(--heritage-ink);--ui-muted:#6b5948;
  --ui-primary:var(--heritage-blue);--ui-primary-hover:#25485b;--ui-primary-soft:#e5e9e4;
  --ui-soft:#efe2ca;--ui-border:#c9b99e;--ui-focus:var(--heritage-blue);
  --button-primary:var(--heritage-blue);--button-primary-hover:#25485b;--button-focus:var(--heritage-blue);
  --form-text:var(--heritage-ink);--form-border:#b7a387;--form-primary:var(--heritage-blue);
 }
 body.app-shell :is(.sidebar,.rrcms-topbar,.navigation-dropdown-menu),
 body.app-shell .main-content :is(.panel,.settings-card,.reference-card,.module-panel,.module-stats article,.citizen-stat-card,.stat-card,.module-launcher a,.module-filters,.helper-box,.scope-note,.citizen-profile-flow,.planning-repeat-row,.letter-palette,.letter-field-inspector,.module-hero,.citizen-hero,.executive-hero,.executive-stats article,.executive-chart) {
  background-color:var(--heritage-ivory);background-image:var(--ui-paper-image);
  background-blend-mode:multiply,normal,normal;background-size:384px 384px,100% 100%,100% 100%;
 }
 body.app-shell .main-content :is(.panel,.module-panel,.settings-card,.reference-card,.module-stats article,.citizen-stat-card,.stat-card,.module-launcher a) {
  border-color:var(--ui-border);border-radius:8px;
  box-shadow:0 2px 6px #49392d08,inset 0 1px 0 #fff8;
 }
 body.app-shell .main-content :is(.module-hero,.citizen-hero,.welcome-banner,.executive-hero,.module-panel,.module-stats article,.stat-card,.panel) :is(h1,h2,h3,h4,p,strong,label,.module-eyebrow),
 body.app-shell .main-content :is(.module-hero,.citizen-hero) h1>.icon { color:var(--heritage-ink); }
 body.app-shell .main-content :is(.module-hero,.citizen-hero,.executive-hero,.module-panel,.module-stats article,.stat-card,.panel) :is(small,.module-note) { color:var(--ui-muted); }
 body.app-shell .main-content .module-workspace { gap:18px;color:var(--heritage-ink); }
 body.app-shell .main-content .module-hero { padding:22px 24px;border:1px solid #bca787;border-radius:8px;box-shadow:0 2px 6px #49392d07;gap:18px; }
 body.app-shell .main-content .module-hero h1 { font-size:25px;line-height:1.5;gap:10px;margin:5px 0;letter-spacing:0; }
 body.app-shell .main-content .module-hero h1>.icon { width:25px;height:25px;color:var(--heritage-blue); }
 body.app-shell .main-content .module-hero :is(p,.module-eyebrow) { color:var(--ui-muted); }
 body.app-shell .main-content :is(.module-hero,.citizen-hero) .btn-secondary { background:#f9f2e4;color:var(--heritage-blue);border-color:#a7b5b4; }
 body.app-shell .main-content .module-stats { gap:16px; }
 body.app-shell .main-content .module-stats article { min-height:162px;padding:18px 20px;border-top:2px solid #b7a080; }
 body.app-shell .main-content .module-stat-heading { min-height:42px; }
 body.app-shell .main-content .module-stats p { font-size:17px;font-weight:600;line-height:1.6; }
 body.app-shell .main-content .module-stats strong { font-size:38px;font-weight:700;line-height:1.2;margin:12px 0 8px;font-variant-numeric:tabular-nums;color:var(--heritage-ink); }
 body.app-shell .main-content .module-stats .module-stat-value-wide { font-size:29px; }
 body.app-shell .main-content .module-stats small { font-size:13px; }
 body.app-shell .main-content .module-panel { padding:20px 22px; }
 body.app-shell .main-content .module-panel h2 { font-size:19px;line-height:1.6;margin-bottom:16px; }
 body.app-shell .main-content :is(.module-stat-icon,.citizen-stat-icon,.settings-icon) { background:#e5e9e4;color:var(--heritage-blue);border-color:#bac6c4;border-radius:7px; }
 body.app-shell .main-content .module-stat-icon { width:38px;height:38px; }
 body.app-shell .main-content .module-stat-icon .icon { width:22px;height:22px; }
 body.app-shell .main-content .module-filters { gap:12px;padding:16px;border-color:var(--ui-border);border-radius:7px; }
 body.app-shell .main-content .module-filters label { color:var(--heritage-ink);font-size:14px; }
 body.app-shell .main-content :is(.module-chart,.executive-chart) :is(svg,canvas) { background-color:transparent; }
 body.app-shell .main-content .module-bar-track { background:#e6dbc6;border-radius:3px; }
 body.app-shell .main-content .module-bar-track span { background:var(--heritage-blue);border-radius:3px 3px 0 0; }
 body.app-shell .main-content .module-chart-column :is(b,small) { color:var(--heritage-ink); }
 body.app-shell .main-content .module-distribution progress { accent-color:var(--heritage-blue); }
 body.app-shell .main-content .module-distribution progress::-webkit-progress-bar { background:#e6dbc6;border-radius:3px; }
 body.app-shell .main-content .module-distribution progress::-webkit-progress-value { background:var(--heritage-blue);border-radius:3px; }
 body.app-shell .main-content :is(.module-actions a,.module-group-row,.module-distribution) { border-color:#d4c5ab;color:var(--heritage-ink); }
 body.app-shell .main-content :is(.module-actions a,.module-panel-title>a) { color:var(--heritage-blue); }
 body.app-shell .main-content .module-actions a:hover { background:#e8d6b54d;color:var(--heritage-blue); }
 body.app-shell .main-content .module-workspace table>thead>tr>th { background:#e8d6b580;color:var(--heritage-ink);border-color:#c9b99e; }
 body.app-shell .main-content .module-workspace table>tbody>tr:nth-child(even) { background:#e8d6b524; }
 body.app-shell .main-content .module-workspace table>tbody>tr:hover { background:#e8d6b54d; }
 body.app-shell .main-content .module-workspace table> :is(thead,tbody)>tr> :is(th,td) { border-color:#d2c3aa; }
 body.app-shell .main-content :is(.module-launcher a,.settings-card,.reference-card):hover { background-color:#f0e4cd;border-color:#a89170;box-shadow:0 3px 8px #49392d0c; }
 body.app-shell .sidebar { background-color:var(--heritage-aged);border-right:1px solid #b9a382;box-shadow:inset -1px 0 0 #fff5,3px 0 9px #49392d0b; }
 body.app-shell .sidebar .brand { background:#ffffff1f;border:1px solid #baa485;border-radius:9px;box-shadow:inset 0 1px 0 #fff6;backdrop-filter:none;color:var(--heritage-ink); }
 body.app-shell .sidebar .brand :is(.ioms-brand-title,.ioms-brand-subtitle) { color:var(--heritage-ink); }
 body.app-shell .sidebar .brand-mark { background:#f9f2e4;border:1px solid #c7b697;box-shadow:none; }
 body.app-shell .sidebar nav { margin-top:16px; }
 body.app-shell .sidebar nav :is(a,summary,.nav-text,.nav-icon,.icon,.sifaris-nav-chevron),
 body.app-shell .sidebar .version { color:var(--heritage-ink); }
 body.app-shell .sidebar nav :is(a,summary) { border-radius:5px; }
 body.app-shell .sidebar nav :is(a,summary):hover { background:#49392d0b;color:var(--heritage-ink); }
 body.app-shell .sidebar nav a.active { background:#8c303012;color:var(--heritage-seal);box-shadow:inset 3px 0 var(--heritage-seal);font-weight:600; }
 body.app-shell .sidebar nav a.active :is(.nav-text,.nav-icon,.icon) { color:var(--heritage-seal); }
 body.app-shell .sidebar nav a:hover :is(.nav-icon,.icon) { color:var(--heritage-blue); }
 body.app-shell .sidebar nav details>summary>.nav-icon { background:#49392d08; }
 body.app-shell .sidebar nav :is(.sifaris-nav-items,.nav-children) { border-left-color:#baa788; }
 body.app-shell .sidebar .version { border-color:#c4b08d;color:var(--ui-muted); }
 body.app-shell .rrcms-topbar { background-color:var(--heritage-aged);border-bottom:1px solid #b9a382;box-shadow:inset 0 1px 0 #fff6,0 2px 7px #49392d0c; }
 body.app-shell .rrcms-topbar :is(.topbar-left,.navigation-actions) { border-color:#c4b08d; }
 body.app-shell .rrcms-topbar :is(.navigation-context strong,.navigation-context small,.navigation-date,.navigation-account .avatar,.navigation-dropdown-menu,.icon),
 body.app-shell .rrcms-topbar .navigation-module-search input { color:var(--heritage-ink); }
 body.app-shell .rrcms-topbar .navigation-context strong { font-size:21px;line-height:1.4; }
 body.app-shell .rrcms-topbar .navigation-context small { font-size:12px;font-weight:500;color:var(--ui-muted); }
 body.app-shell .rrcms-topbar .navigation-date { font-size:13px;font-weight:500; }
 body.app-shell .rrcms-topbar [data-navigation-toggle].btn,
 body.app-shell .rrcms-topbar .navigation-dropdown summary,
 body.app-shell .rrcms-topbar .navigation-search-button,
 body.app-shell .rrcms-topbar .navigation-module-search { background:#fff8;border-color:#bca98c;color:var(--heritage-ink);border-radius:6px;box-shadow:inset 0 1px 0 #fff9,0 1px 2px #49392d06; }
 body.app-shell .rrcms-topbar .navigation-dropdown summary,
 body.app-shell .rrcms-topbar .navigation-search-button { font-size:14px;line-height:1.5; }
 body.app-shell .rrcms-topbar [data-navigation-toggle].btn:hover,
 body.app-shell .rrcms-topbar .navigation-dropdown summary:hover,
 body.app-shell .rrcms-topbar .navigation-dropdown[open] summary,
 body.app-shell .rrcms-topbar .navigation-search-button:hover,
 body.app-shell .rrcms-topbar .navigation-module-search .icon-button:hover { background:#f5ebd6;border-color:#a38c6b;color:var(--heritage-blue); }
 body.app-shell .rrcms-topbar .navigation-module-search input::placeholder { color:#6b5948; }
 body.app-shell .rrcms-topbar .navigation-module-search .icon-button { color:var(--heritage-blue);background:transparent; }
 body.app-shell .rrcms-topbar .navigation-account .avatar { background:#49392d0b;color:var(--heritage-ink); }
 body.app-shell .rrcms-topbar .navigation-dropdown-menu :is(a,button,.icon) { color:var(--heritage-ink); }
 body.app-shell .rrcms-topbar .navigation-dropdown-menu small { color:var(--ui-muted); }
 body.app-shell .rrcms-topbar .navigation-dropdown-menu :is(a:hover,button:hover,[aria-checked=true]) { background:#8c30300b;color:var(--heritage-seal); }
 body.app-shell .rrcms-topbar .navigation-account button[aria-label=Logout] { color:var(--heritage-seal); }
 body.app-shell :is(.sidebar,.rrcms-topbar) :is(a,summary,button,input):focus-visible { outline:2px solid var(--heritage-blue);outline-offset:2px; }
 body.app-shell .main-content .workspace-pagination .workspace-page-control.is-current { background:var(--heritage-seal);border-color:var(--heritage-seal);color:#fff; }
 body.app-shell .main-content .workspace-pagination a.workspace-page-control:hover { background:#e8d6b566;border-color:#a78e6b;color:var(--heritage-blue); }
 body.app-shell .executive-hero :is(h1,.executive-hero-identity strong) { color:var(--heritage-ink); }
 body.app-shell .executive-hero :is(.executive-hero-description,.executive-hero-identity div>span,.executive-hero-context>span) { color:var(--ui-muted); }
 @media(max-width:1000px) {
  body.app-shell .main-content .module-hero { align-items:flex-start;flex-wrap:wrap;padding:18px; }
  body.app-shell .main-content .module-panel { padding:17px; }
  body.app-shell .rrcms-topbar .navigation-context strong { font-size:18px; }
 }
 @media(max-width:600px) {
  body.app-shell .main-content .module-stats { gap:12px; }
  body.app-shell .main-content .module-stats article { min-height:144px;padding:14px; }
  body.app-shell .main-content .module-stats strong { font-size:32px; }
  body.app-shell .main-content .module-stats .module-stat-value-wide { font-size:24px; }
  body.app-shell .main-content .module-hero h1 { font-size:22px; }
  body.app-shell .main-content .module-chart-column small { font-size:10px; }
  body.app-shell .main-content .module-chart { gap:4px; }
 }
 @media(prefers-reduced-motion:reduce) { body.app-shell .module-launcher a { transition:none;transform:none; } }
}

/* Reference dashboard: compact archival index and clean record cards. */
@media screen {
 body.app-shell {--ui-heading:#30271f;--ui-text:#49392d;--ui-muted:#6b5948;--ui-border:#e4d2b2}
 body.app-shell .sidebar {background-color:#ece0c6;box-shadow:1px 0 0 #d5c29e;padding:22px 14px}
 body.app-shell .sidebar .brand {background:transparent;border:0;box-shadow:none;border-radius:0;padding:4px 8px 20px}
 body.app-shell .brand-mark {background:#315a70;color:#fff;border-radius:10px;box-shadow:none}
 body.app-shell .sidebar nav a,body.app-shell .sidebar nav summary {font-size:15px;border-radius:8px;padding:10px 12px}
 body.app-shell .sidebar nav a.active,body.app-shell .sidebar nav a[aria-current=page] {background:#315a70;color:#fff;box-shadow:inset 3px 0 #8c3030}
 body.app-shell .sidebar nav a.active svg {color:inherit}
 body.app-shell .rrcms-topbar {background:#fffcf5;background-image:none;min-height:70px;padding:12px 24px;box-shadow:0 1px 3px #49392d09}
 body.app-shell .main-content {padding:28px 32px}
 body.app-shell .module-hero {background:transparent;background-image:none;border:0;box-shadow:none;padding:0;margin-bottom:2px}
 body.app-shell .module-hero h1 {font-size:32px;margin:0;gap:10px}
 body.app-shell .module-hero h1 svg {display:none}
 body.app-shell .module-stats article,body.app-shell .module-panel,body.app-shell .module-filter {background:#fffcf5;background-image:none;border:1px solid #e4d2b2;border-radius:14px;box-shadow:0 1px 3px #49392d0c}
 body.app-shell .module-stats strong {text-align:left;font-size:42px;color:#30271f;margin:8px 0}
 body.app-shell .module-stats article>small {text-align:left}
 body.app-shell .module-stats p {font-size:15px}
 body.app-shell .module-stat-heading {min-height:40px}
 body.app-shell .module-stat-icon {background:#dce7ed;color:#315a70;border:0;border-radius:10px;width:40px;height:40px}
 body.app-shell .module-stats article:nth-child(3) .module-stat-icon {background:#f4d9a2;color:#86601e}
 body.app-shell .module-stats article:nth-child(4) .module-stat-icon {background:#f2d9d3;color:#8c3030}
 .sifaris-record-workspace {display:grid;grid-template-columns:minmax(0,1.6fr) minmax(310px,1fr);gap:24px;align-items:start}
 .sifaris-record-fields {min-width:0;display:grid;gap:18px}
 .sifaris-section-workspace {padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important}
 .sifaris-section-workspace .sifaris-entry-source,.sifaris-section-workspace .sifaris-entry-card,.sifaris-section-workspace .sifaris-assistant-panel,.sifaris-section-workspace .sifaris-letter-entry,.sifaris-record-card {background:#fffcf5!important;background-image:none!important;border:1px solid #e4d2b2;border-radius:14px;padding:22px!important;box-shadow:0 1px 3px #49392d0c;margin:0}
 .sifaris-section-workspace .sifaris-entry-source:has(.sifaris-record-card) {display:grid;gap:18px;background:transparent!important;border:0;padding:0!important;box-shadow:none}
 .sifaris-section-workspace .form-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
 .sifaris-section-workspace .field {min-width:0;margin:0}
 .sifaris-section-workspace .field label {font-size:14px;color:#49392d}
 .sifaris-section-workspace input:not([type=checkbox]):not([type=radio]),.sifaris-section-workspace select,.sifaris-section-workspace textarea {max-width:100%;min-width:0;border:1px solid #cfbb98;border-radius:8px;background:#fff;color:#30271f;font-size:16px;box-shadow:none}
 .sifaris-section-workspace input[readonly] {background:#f0e8d5!important}
 .sifaris-section-workspace .form-actions {margin:0;display:flex;flex-wrap:wrap;justify-content:flex-end;padding:0;background:transparent;position:sticky;top:0;z-index:5}
 .sifaris-record-steps {display:flex;gap:10px;margin:18px 0 24px;flex-wrap:wrap}
 .sifaris-record-steps button {border-radius:24px}
 .sifaris-record-steps button:first-child {background:#315a70;color:#fff}
 .sifaris-record-preview {position:sticky;top:20px;min-width:0}
 .sifaris-record-preview h2 {font-size:18px;margin:0 0 12px}
 .sifaris-record-paper {background:#fff;border:1px solid #e4d2b2;border-radius:4px;box-shadow:0 5px 18px #49392d12;padding:28px;min-height:540px;font:15px/1.8 Georgia,Kalimati,serif;color:#241f1b;overflow-wrap:anywhere}
 .sifaris-record-paper .sifaris-letter-entry-content {font:inherit;padding:0;background:none;border:0;min-width:0}
 .sifaris-record-letterhead {text-align:center;border-bottom:1px solid #315a70;padding:0 0 16px;margin-bottom:18px}
 .sifaris-record-letterhead strong {color:#315a70;font:700 22px Mukta,Kalimati,sans-serif}
 .sifaris-record-paper table {width:100%;border-collapse:collapse;font-size:11px;table-layout:auto}
 .sifaris-record-paper td,.sifaris-record-paper th {border:1px solid #b7ab99;padding:4px}
 .sifaris-record-paper footer {text-align:right;border-top:1px solid #b7ab99;margin:32px 0 0;padding-top:8px}
 .sifaris-record-placeholder {background:#f4d9a2;border-radius:3px;padding:0 3px}
 .sifaris-record-note {font-size:13px;color:#6b5948;margin-top:10px}
 .sifaris-section-workspace .table-wrap {max-width:100%;overflow:auto}
 @media(max-width:1100px){.sifaris-record-workspace{grid-template-columns:minmax(0,1fr)}.sifaris-record-preview{position:static}.sifaris-record-paper{max-width:700px;margin:auto}}
 @media(max-width:600px){body.app-shell .main-content{padding:18px 14px}.sifaris-section-workspace .form-grid{grid-template-columns:minmax(0,1fr)}.sifaris-record-paper{padding:20px}.sifaris-section-workspace .sifaris-entry-source,.sifaris-record-card{padding:16px!important}}
}
@media print {.sifaris-record-preview,.sifaris-record-steps{display:none!important}}
@media screen {
 body.app-shell .sifaris-record-host {background:transparent!important;background-image:none!important;box-shadow:none!important;border:0!important;padding:0!important}
 body.app-shell .sifaris-section-workspace .form-grid {grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body.app-shell .sifaris-section-workspace .sifaris-entry-source {display:grid;gap:18px;background:transparent!important;border:0;padding:0!important;box-shadow:none}
 .sifaris-record-card h3 {font-size:20px;margin:0 0 16px}
 @media(max-width:600px){body.app-shell .sifaris-section-workspace .form-grid{grid-template-columns:minmax(0,1fr)!important}}
}
@media screen {
 body.app-shell {--ui-bg:#f5eedf;background-color:var(--ui-bg)}
 body.app-shell .sifaris-section-workspace .sifaris-entry-card .sifaris-entry-card {padding:0!important;border:0;box-shadow:none}
 .sifaris-record-paper [contenteditable] {outline:none}
}
@media screen {
 body.app-shell .brand-mark img {display:none}
 body.app-shell .brand-mark::after {content:'';display:block;width:22px;height:26px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 28'%3E%3Cpath d='M5 2h9l5 5v19H5zM14 2v6h5M8 12h8M8 16h8M8 20h6' fill='none' stroke='black' stroke-width='1.8'/%3E%3C/svg%3E") center/contain no-repeat}
 body.app-shell .sifaris-section-workspace .form-actions {background:#f5eedf;padding:6px 0}
}
@media screen {
 body.app-shell .sidebar .brand-mark {background:#315a70;color:#fff;border:0;box-shadow:none}
 body.app-shell .sidebar .brand-mark img {display:none}
 body.app-shell .sifaris-section-workspace .form-grid>div {grid-column:auto!important}
 body.app-shell .sifaris-section-workspace .form-grid>.field-full,body.app-shell .sifaris-section-workspace .form-grid>[data-input-size=long] {grid-column:1/-1!important}
 body.app-shell .sifaris-section-workspace .form-grid :is(input,select,textarea) {width:100%;max-width:100%}
 body.app-shell .sifaris-record-letterhead strong {color:#315a70}
 .sifaris-section-workspace .sifaris-record-steps {margin:0 0 4px}
}

/* Fill in the letter itself; keep the adjacent preview in place. */
@media screen and (min-width:1101px) and (min-height:601px) {
 .sifaris-record-workspace {height:calc(100dvh - var(--sifaris-workspace-top,230px) - 18px);min-height:280px;align-items:stretch;overflow:hidden}
 .sifaris-record-fields {height:100%;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior-y:contain;align-content:start;padding-right:8px;scrollbar-gutter:stable}
 .sifaris-record-preview {position:relative;top:auto;height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden}
 .sifaris-record-preview h2,.sifaris-record-note {flex-shrink:0}
 .sifaris-record-paper {min-height:0;flex:1;overflow:auto;overscroll-behavior:contain}
}
@media screen {
 .sifaris-section-workspace .sifaris-letter-entry-content .sifaris-inline-field {display:inline-block;vertical-align:baseline;width:190px!important;max-width:100%;min-height:34px;padding:3px 8px}
 .sifaris-section-workspace .sifaris-letter-entry-content .sifaris-inline-date {width:70px!important}
 .sifaris-section-workspace .sifaris-letter-entry-content {line-height:2.4}
 .sifaris-record-paper .sifaris-letter-entry-content {line-height:1.8}
}

@media screen {
 .sifaris-tabbed-workspace .sifaris-record-workspace {display:block;height:auto;min-height:0;overflow:visible}
 .sifaris-tabbed-workspace .sifaris-record-fields {display:grid;height:auto;max-height:none;overflow:visible;padding:0;scrollbar-gutter:auto}
 .sifaris-tabbed-workspace [role=tabpanel][hidden] {display:none!important}
 .sifaris-tabbed-workspace .sifaris-record-preview {position:static;display:block;height:auto;overflow:visible}
 .sifaris-record-tabs {display:flex;gap:6px;background:#e8dcc4;padding:5px;border-radius:12px;align-self:flex-start;margin-bottom:6px}
 .sifaris-record-tabs button {border:0;background:transparent;color:#594936;padding:11px 24px;font:700 17px Mukta,sans-serif;cursor:pointer;border-radius:8px}
 .sifaris-record-tabs button[aria-selected=true] {background:#315a70;color:#fff;box-shadow:0 2px 4px #49392d20}
 .sifaris-record-tabs button:focus-visible {outline:2px solid #315a70;outline-offset:3px}
 .sifaris-tabbed-workspace .sifaris-record-fields>.form-actions {position:static;display:flex;gap:12px;justify-content:flex-end;align-items:center;border:0;background:transparent!important;padding:8px 0 0;border-radius:0;margin:0}
 .sifaris-tabbed-workspace .sifaris-record-fields>.form-actions .btn {min-height:46px;padding:10px 22px;border-radius:9px;font-weight:700;font-size:16px;line-height:1.5}
 .sifaris-tabbed-workspace .sifaris-record-fields>.form-actions .btn-outline {border:1px solid #315a70;background:#fffdf8;color:#315a70}
 .sifaris-tabbed-workspace .sifaris-record-fields>.form-actions .btn-primary {background:#315a70;border:1px solid #315a70;color:white;box-shadow:0 2px 4px #315a7020}
 .sifaris-print-frame {display:block;width:100%;height:calc(100dvh - 250px);min-height:520px;border:1px solid #d3c0a0;border-radius:10px;background:#eef1f6}
 @media(max-width:600px){.sifaris-record-tabs{align-self:stretch}.sifaris-record-tabs button{flex:1;padding:10px}.sifaris-tabbed-workspace .sifaris-record-fields>.form-actions{flex-direction:column;align-items:stretch!important}.sifaris-tabbed-workspace .sifaris-record-fields>.form-actions .btn{width:100%}}
}
@media screen {
 body.app-shell .sifaris-tabbed-workspace .sifaris-record-fields>.form-actions .btn-outline {background:#fffdf8;border-color:#315a70;color:#315a70}
 body.app-shell .sifaris-tabbed-workspace .sifaris-record-fields>.form-actions .btn-primary {background:#315a70;border-color:#315a70;color:#fff}
}

/* Top navigation follows the compact dashboard reference. */
@media screen {
 body.app-shell .rrcms-topbar {
  min-height:70px;height:70px;padding:0 16px 0 32px;gap:18px;flex-wrap:nowrap;
  background:#fffdf8;background-image:none;border-bottom:1px solid #dfcfb1;
  box-shadow:0 1px 3px #49392d0a;font-family:Mukta,"Segoe UI",sans-serif;
 }
 body.app-shell .rrcms-topbar .topbar-left {
  flex:0 1 260px;min-width:225px;gap:14px;padding-right:20px;border-right:1px solid #ded0b8;
 }
 body.app-shell .rrcms-topbar [data-navigation-toggle].btn {
  width:44px;min-width:44px;height:44px;min-height:44px;padding:10px;
  background:#fffaf0;border:1px solid #d8c5a3;border-radius:10px;color:#49392d;box-shadow:none;
 }
 body.app-shell .rrcms-topbar [data-navigation-toggle] .icon {width:21px;height:21px;stroke-width:1.8}
 body.app-shell .rrcms-topbar .navigation-context {gap:0;line-height:1.2}
 body.app-shell .rrcms-topbar .navigation-context strong {
  color:#315a70;font-size:22px;font-weight:700;line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
 }
 body.app-shell .rrcms-topbar .navigation-context small {color:#49392d;font-size:11px;font-weight:400;line-height:1.25;white-space:nowrap}
 body.app-shell .rrcms-topbar .navigation-actions {display:flex;flex:0 1 auto;min-width:0;gap:16px;flex-wrap:nowrap;margin-left:auto;justify-content:flex-end;font-family:Mukta,"Segoe UI",sans-serif}
 body.app-shell .rrcms-topbar .navigation-global-search {
  order:1;display:flex;align-items:center;gap:8px;flex:0 1 198px;min-width:150px;max-width:234px;height:44px;
  padding:0 10px 0 14px;border:1px solid #ddcbaa;border-radius:10px;background:#f9f1e2;color:#746653;
  font:400 14px/1.2 Mukta,"Segoe UI",sans-serif;text-align:left;box-shadow:none;
 }
 body.app-shell .rrcms-topbar .navigation-global-search>.icon {width:18px;height:18px;color:#49392d;stroke-width:1.8}
 body.app-shell .rrcms-topbar .navigation-global-search>span {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 body.app-shell .rrcms-topbar .navigation-global-search kbd {
  margin-left:auto;padding:3px 7px;border:1px solid #d2bd98;border-radius:6px;background:#fffaf1;color:#675744;
  font:500 11px/1.25 Mukta,"Segoe UI",sans-serif;box-shadow:0 1px 1px #49392d0b;white-space:nowrap;
 }
 body.app-shell .rrcms-topbar .navigation-global-search:hover {border-color:#b99d73;background:#f6ead5;color:#49392d}
 body.app-shell .rrcms-topbar .navigation-module-search {
  order:2;display:flex;flex:0 1 190px;min-width:160px;max-width:220px;height:40px;padding:4px 11px;
  border:1px solid #ddcbaa;border-radius:10px;background:#fffaf1;color:#49392d;box-shadow:none;
 }
 body.app-shell .rrcms-topbar .navigation-module-search>.icon {width:17px;height:17px;flex:0 0 auto;color:#315a70}
 body.app-shell .rrcms-topbar .navigation-module-search input {font-size:13px;font-weight:500;color:#49392d}
 body.app-shell .rrcms-topbar .navigation-module-search .icon-button {color:#315a70;background:#e5edf1}
 body.app-shell .rrcms-topbar .navigation-language {order:3;flex:0 0 auto}
 body.app-shell .rrcms-topbar .navigation-settings {order:4;flex:0 0 auto}
 body.app-shell .rrcms-topbar :is(.navigation-language,.navigation-settings)>summary {
  min-height:44px;height:44px;padding:5px 11px;border:1px solid #ddcbaa;border-radius:10px;background:#fffaf1;color:#49392d;
  font:600 14px/1.2 Mukta,"Segoe UI",sans-serif;box-shadow:none;
 }
 body.app-shell .rrcms-topbar .navigation-language>summary>.icon {width:18px;height:18px;color:#315a70}
 body.app-shell .rrcms-topbar .navigation-settings>summary>.icon {width:18px;height:18px;color:#315a70}
 body.app-shell .rrcms-topbar .navigation-account {order:5;flex:0 0 auto}
 body.app-shell .rrcms-topbar .navigation-account>summary {
  min-height:44px;height:44px;padding:3px 12px 3px 5px;gap:9px;border:1px solid #ddcbaa;border-radius:24px;
  background:#fffaf1;color:#49392d;font:600 14px/1.2 Mukta,"Segoe UI",sans-serif;box-shadow:none;
 }
 body.app-shell .rrcms-topbar .navigation-account .avatar {
  display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:#315a70;color:#fff;
  font:600 13px/1 Mukta,"Segoe UI",sans-serif;
 }
 body.app-shell .rrcms-topbar .navigation-account .navigation-chevron {font-size:12px;color:#49392d}
 body.app-shell .rrcms-topbar .navigation-account .navigation-dropdown-menu {min-width:270px;background:#fffdf8;border-color:#d8c5a3}
 body.app-shell .rrcms-topbar .navigation-menu-label {
  margin:5px 8px 2px;padding:8px 4px 5px;border-top:1px solid #eadfc9;color:#7a6954;
  font:700 11px/1.3 Mukta,"Segoe UI",sans-serif;letter-spacing:.04em;text-transform:uppercase;
 }
 @media(max-width:1280px) {
  body.app-shell .rrcms-topbar {padding:0 14px 0 20px;gap:12px}
  body.app-shell .rrcms-topbar .topbar-left {flex-basis:230px;min-width:205px;padding-right:12px}
  body.app-shell .rrcms-topbar .navigation-context strong {font-size:19px}
  body.app-shell .rrcms-topbar .navigation-context small {font-size:10px}
  body.app-shell .rrcms-topbar .navigation-actions {width:auto;padding-top:0;border-top:0;gap:10px}
  body.app-shell .rrcms-topbar .navigation-global-search {min-width:150px}
  body.app-shell .rrcms-topbar .navigation-global-search kbd {display:none}
  body.app-shell .rrcms-topbar .navigation-module-search {min-width:170px}
 }
 @media(max-width:1000px) {
  body.app-shell .rrcms-topbar {height:auto;min-height:66px;padding:10px 16px;flex-wrap:wrap}
  body.app-shell .rrcms-topbar .topbar-left {flex:1 1 calc(100% - 60px);border-right:0;padding-right:0}
  body.app-shell .rrcms-topbar .navigation-actions {flex:1 1 100%;display:grid;grid-template-columns:minmax(0,.6fr) minmax(0,1fr) auto auto auto;gap:8px}
  body.app-shell .rrcms-topbar .navigation-global-search {grid-column:1;max-width:none;min-width:0;width:100%}
  body.app-shell .rrcms-topbar .navigation-module-search {grid-column:2;max-width:none;min-width:0;width:100%}
  body.app-shell .rrcms-topbar .navigation-language {grid-column:3}
  body.app-shell .rrcms-topbar .navigation-settings {grid-column:4}
  body.app-shell .rrcms-topbar .navigation-account {grid-column:5}
 }
 @media(max-width:600px) {
  body.app-shell .rrcms-topbar .navigation-context strong {font-size:18px}
  body.app-shell .rrcms-topbar .navigation-context small {display:none}
  body.app-shell .rrcms-topbar .navigation-actions {grid-template-columns:minmax(0,1fr) auto auto}
  body.app-shell .rrcms-topbar .navigation-language {grid-column:1;grid-row:2;justify-self:start}
  body.app-shell .rrcms-topbar .navigation-settings {grid-column:2;grid-row:2}
  body.app-shell .rrcms-topbar .navigation-account {grid-column:3;grid-row:2}
  body.app-shell .rrcms-topbar .navigation-global-search {grid-column:1/-1;grid-row:3;max-width:none}
  body.app-shell .rrcms-topbar .navigation-module-search {grid-column:1/-1;grid-row:4;max-width:none}
  body.app-shell .rrcms-topbar .navigation-settings>summary>span:not(.navigation-chevron) {display:none}
  body.app-shell .rrcms-topbar .navigation-account>summary>span:nth-child(2) {max-width:72px}
 }
}

/* Restore the familiar red IOMS identity block while keeping the archival sidebar. */
@media screen {
 body.app-shell .sidebar .brand {background:#b52f2f;border:1px solid #c94a43;border-radius:18px;padding:12px 14px;box-shadow:inset 0 1px 0 #ffffff38,0 5px 14px #6e201b22;color:#fff}
 body.app-shell .sidebar .brand :is(strong,small,.ioms-brand-title,.ioms-brand-subtitle) {color:#fff}
 body.app-shell .sidebar .brand-mark {background:#fff;color:#b52f2f;border:0}
 @media(min-width:1001px){body.sidebar-collapsed.app-shell .sidebar .brand{padding:8px;border-radius:12px}}
}

/* Dark blue application navigation requested for stronger contrast. */
@media screen {
 body.app-shell .sidebar,
 body.app-shell .rrcms-topbar {
  background:#2f4f66;
  background-image:none;
  border-color:#42667d;
  color:#fff;
 }
 body.app-shell .sidebar {box-shadow:1px 0 0 #213c50,4px 0 14px #1f35431f}
 body.app-shell .rrcms-topbar {box-shadow:0 2px 8px #1f354326}
 body.app-shell .rrcms-topbar .topbar-left {border-right-color:#ffffff38}
 body.app-shell .rrcms-topbar .navigation-context strong,
 body.app-shell .rrcms-topbar .navigation-context small,
 body.app-shell .rrcms-topbar :is(.navigation-language,.navigation-settings,.navigation-account)>summary,
 body.app-shell .rrcms-topbar :is(.navigation-language,.navigation-settings)>summary>.icon,
 body.app-shell .rrcms-topbar .navigation-account .navigation-chevron,
 body.app-shell .rrcms-topbar .navigation-module-search>.icon,
 body.app-shell .rrcms-topbar .navigation-module-search .icon-button,
 body.app-shell .rrcms-topbar .navigation-global-search>.icon {
  color:#fff!important;
 }
 body.app-shell .rrcms-topbar [data-navigation-toggle].btn,
 body.app-shell .rrcms-topbar .navigation-global-search,
 body.app-shell .rrcms-topbar .navigation-module-search,
 body.app-shell .rrcms-topbar :is(.navigation-language,.navigation-settings,.navigation-account)>summary {
  background:#ffffff12;
  border-color:#ffffff45;
  color:#fff;
  box-shadow:inset 0 1px 0 #ffffff10;
 }
 body.app-shell .rrcms-topbar .navigation-global-search:hover,
 body.app-shell .rrcms-topbar .navigation-module-search:focus-within,
 body.app-shell .rrcms-topbar .navigation-dropdown[open]>summary,
 body.app-shell .rrcms-topbar .navigation-dropdown>summary:hover,
 body.app-shell .rrcms-topbar [data-navigation-toggle].btn:hover {
  background:#ffffff20;
  border-color:#ffffff70;
  color:#fff;
 }
 body.app-shell .rrcms-topbar .navigation-global-search kbd {
  background:#ffffff17;
  border-color:#ffffff4d;
  color:#fff;
 }
 body.app-shell .rrcms-topbar .navigation-module-search input,
 body.app-shell .rrcms-topbar .navigation-module-search input::placeholder {color:#fff;opacity:1}
 body.app-shell .rrcms-topbar .navigation-module-search .icon-button {background:#ffffff17}
 body.app-shell .rrcms-topbar .navigation-account .avatar {width:22px;height:22px;background:transparent;color:#fff}
 body.app-shell .rrcms-topbar .navigation-account .avatar .icon {width:19px;height:19px;color:#fff;stroke:#fff}
 body.app-shell .sidebar nav :is(a,summary),
 body.app-shell .sidebar nav :is(a,summary) .icon,
 body.app-shell .sidebar .sidebar-bottom {color:#fff}
 body.app-shell .sidebar nav :is(a,summary,.nav-text,.nav-icon,.icon,.sifaris-nav-chevron),
 body.app-shell .sidebar .version {color:#fff}
 body.app-shell .sidebar nav :is(a:hover,summary:hover) {background:#ffffff14;color:#fff}
 body.app-shell .sidebar nav a.active,
 body.app-shell .sidebar nav a[aria-current=page] {background:#ffffff20;color:#fff;box-shadow:inset 3px 0 #fff}

/* Shared navigation grid and location trail. Keep this screen-only so document output is untouched. */
@media screen {
 body.app-shell .sidebar nav>a,
 body.app-shell .sidebar nav>details>summary,
 body.app-shell .sidebar nav>.module-flat-menu>a,
 body.app-shell .sidebar nav>.module-flat-menu>details>summary {
  display:grid;
  grid-template-columns:20px minmax(0,1fr) 16px;
  column-gap:12px;
  align-items:center;
  min-height:52px;
  height:52px;
  padding:5px 12px;
  box-sizing:border-box;
 }
 body.app-shell .sidebar nav .nav-icon,
 body.app-shell .sidebar nav>a>.icon,
 body.app-shell .sidebar nav>details>summary>.icon,
 body.app-shell .sidebar nav>.module-flat-menu>a>.icon {
  width:20px;
  height:20px;
  min-width:20px;
  display:grid;
  place-items:center;
  margin:0;
 }
 body.app-shell .sidebar nav .nav-icon>.icon,
 body.app-shell .sidebar nav>a>.icon,
 body.app-shell .sidebar nav>details>summary>.icon,
 body.app-shell .sidebar nav>.module-flat-menu>a>.icon {
  width:20px;
  height:20px;
  stroke-width:1.7;
 }
 body.app-shell .sidebar nav>a :is(.nav-text,span:not(.nav-icon):not(.nav-dot)),
 body.app-shell .sidebar nav>details>summary>span:not(.nav-icon),
 body.app-shell .sidebar nav>.module-flat-menu>a>span,
 body.app-shell .sidebar nav>.module-flat-menu>details>summary>span:not(.nav-icon) {
  min-width:0;
  line-height:1.3;
  white-space:normal;
  overflow:hidden;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
 }
 body.app-shell .sidebar nav :is(.sifaris-nav-chevron,.nav-dot) {grid-column:3;margin:0;justify-self:center;}
 body.app-shell .sidebar nav .sifaris-nav-items :is(a,summary),
 body.app-shell .sidebar nav .nav-children :is(a,summary) {min-height:38px;}
 body.app-shell .sidebar nav .sifaris-nav-items :is(a,summary)>span,
 body.app-shell .sidebar nav .nav-children :is(a,summary)>span {white-space:normal;line-height:1.3;}
 body.app-shell .workspace-breadcrumb {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:0;
  margin:0 0 14px;
  color:#6f6252;
  font-size:13px;
  line-height:1.5;
 }
 body.app-shell .workspace-breadcrumb>* {display:inline-flex;align-items:center;min-width:0;}
 body.app-shell .workspace-breadcrumb>*+*::before {content:'›';padding:0 8px;color:#9b8a72;font-weight:400;}
 body.app-shell .workspace-breadcrumb a {color:#315a70;}
 body.app-shell .workspace-breadcrumb a:hover {text-decoration:underline;}
 body.app-shell .workspace-breadcrumb a>.icon {width:15px;height:15px;margin-right:5px;}
 body.app-shell .workspace-breadcrumb-current {color:#49392d;font-weight:600;}
 @media(max-width:640px) {
  body.app-shell .workspace-breadcrumb {font-size:12px;margin-bottom:11px;}
  body.app-shell .workspace-breadcrumb-parent:not(:last-of-type) {display:none;}
  body.app-shell .workspace-breadcrumb-parent:last-of-type::before {content:'› … ›';}
 }
}
 body.app-shell .rrcms-topbar [data-navigation-toggle].btn .icon {
  color:#fff!important;
  stroke:#fff!important;
 }
 body.app-shell .sidebar .brand-mark {
  background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(225,238,247,.96));
  color:#fff;
 }
 body.app-shell .sidebar .brand-mark img {display:block;width:100%;height:100%;object-fit:contain}
 body.app-shell .sidebar .brand-mark::after {display:none!important;content:none!important}
}

/* Minor identity entry: keep fiscal year, issue date and dispatch number on one row. */
@media screen and (min-width:1101px) {
 body.app-shell .sifaris-section-workspace .form-grid.minor-identity-meta-grid {
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
 }
 body.app-shell .sifaris-section-workspace .form-grid.minor-identity-meta-grid.minor-identity-meta-grid-with-ward {
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
 }
}

/* Official sidebar emblem and readable wordmark. Login retains its original logo. */
body.app-shell .sidebar .brand.ioms-logo-plate{display:flex;align-items:center;justify-content:center;width:calc(100% + 28px);margin:0 -14px;background:transparent;background-image:none;border:0;border-bottom:1px solid rgba(255,255,255,.12);border-radius:0;padding:0 14px;height:75px;min-height:75px;box-shadow:none}
body.app-shell .sidebar .brand.ioms-logo-plate>img{display:block;width:52px;max-width:100%;height:auto;object-fit:contain;flex:none;filter:none}
body.app-shell .sidebar:has(.ioms-logo-plate){padding-top:0}
@media(min-width:1001px){body.sidebar-collapsed.app-shell .sidebar .brand.ioms-logo-plate{padding:0 6px;border-radius:0}body.sidebar-collapsed.app-shell .sidebar .brand.ioms-logo-plate>img{width:46px}}

body.app-shell .sidebar .brand.ioms-logo-plate{gap:12px}

@media(min-width:1001px){body.sidebar-collapsed.app-shell .sidebar .brand.ioms-logo-plate{gap:0}}
