:root {
  --navy: #0b2f3a;
  --teal: #0f6b78;
  --teal-dark: #0c5661;
  --mint: #dff3f1;
  --gold: #d9a441;
  --ink: #17212b;
  --muted: #64748b;
  --line: #dce4e8;
  --surface: #ffffff;
  --canvas: #f4f7f8;
  --danger: #b42318;
  --warning: #a15c00;
  --success: #157347;
  --radius: 14px;
  --shadow: 0 12px 35px rgba(11, 47, 58, .08);
}
* { box-sizing: border-box; }
html { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--canvas); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; overflow-wrap: anywhere; }
img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
input[type="hidden"] { display: none !important; }
a { color: var(--teal); text-decoration: none; }
a:hover { color: var(--teal-dark); }
button, .button { cursor: pointer; }
button:disabled, .button:disabled { cursor: not-allowed; opacity: .55; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid rgba(15,107,120,.35); outline-offset: 2px; }
[hidden] { display: none !important; }
.app-shell { padding-left: 276px; padding-top: 72px; transition: padding .2s ease; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 276px; height: 100vh; height: 100dvh; background: linear-gradient(180deg, var(--navy), #092630); color: #fff; z-index: 40; display: flex; flex-direction: column; transition: transform .2s ease; }
.brand { min-height: 108px; padding: 13px 14px; display: flex; align-items: center; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand-logo-link { width: 100%; min-height: 78px; padding: 8px 10px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: #f8fcfc; border: 1px solid rgba(255,255,255,.22); }
.brand-logo-link:hover { background: #fff; }
.brand-logo { display: block; width: 100%; height: auto; max-height: 70px; object-fit: contain; }
.sidebar-hide-button { position: relative; flex: 0 0 auto; width: calc(100% - 28px); min-height: 40px; margin: 10px 14px 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 7px 12px; border: 1px solid rgba(169,205,210,.2); border-radius: 11px; background: rgba(255,255,255,.055); color: #d9e9eb; box-shadow: inset 0 1px 0 rgba(255,255,255,.035); font-size: .74rem; font-weight: 800; line-height: 1.2; letter-spacing: .015em; white-space: nowrap; transition: background-color .16s ease, border-color .16s ease, color .16s ease, box-shadow .16s ease, transform .16s ease; }
.sidebar-hide-button:hover { background: rgba(255,255,255,.095); border-color: rgba(99,214,201,.35); color: #fff; box-shadow: 0 7px 18px rgba(0,0,0,.10), inset 0 1px 0 rgba(255,255,255,.05); transform: translateY(-1px); }
.sidebar-hide-button:active { transform: translateY(0); }
.sidebar-hide-icon { width: 22px; height: 22px; flex: 0 0 22px; display: inline-grid; place-items: center; border-radius: 7px; background: rgba(99,214,201,.12); color: #8fe3da; font-size: 1.2rem; font-weight: 700; line-height: 1; transform: translateX(-1px); }
.sidebar-hide-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
html[dir="rtl"] .sidebar-hide-icon { transform: rotate(180deg) translateX(-1px); }
.sidebar nav { padding: 18px 14px; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.sidebar nav a { color: #d8e6e9; display: flex; align-items: center; min-height: 44px; padding: 10px 13px; margin-bottom: 4px; border-radius: 10px; font-size: .9rem; font-weight: 650; }
.sidebar nav a:hover, .sidebar nav a.active { color: #fff; background: rgba(255,255,255,.11); }
.sidebar nav a.active { box-shadow: inset 3px 0 0 #63d6c9; }
.sidebar nav a.nav-emphasis { color: #092f36; background: #85ded4; margin-block: 8px 14px; }
.nav-label { padding: 17px 13px 7px; color: #7fa5ad; font-size: .67rem; font-weight: 800; text-transform: uppercase; letter-spacing: .13em; }
.accordion-nav { display: grid; align-content: start; gap: 7px; }
.nav-section { border: 1px solid transparent; border-radius: 11px; overflow: hidden; }
.nav-section:has(a.active) { border-color: rgba(99,214,201,.2); background: rgba(255,255,255,.035); }
.nav-section-toggle { width: 100%; min-height: 42px; padding: 9px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 0; border-radius: 9px; background: transparent; color: #90b1b7; font-size: .69rem; font-weight: 850; letter-spacing: .09em; text-align: start; text-transform: uppercase; }
.nav-section-toggle:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-chevron { font-size: .9rem; transition: transform .18s ease; }
.nav-section-toggle[aria-expanded="true"] .nav-chevron { transform: rotate(90deg); }
.nav-section-panel { display: grid; padding: 2px 6px 7px; }
.nav-section-panel[hidden] { display: none; }
.sidebar nav .nav-section-panel a { min-height: 40px; padding-inline: 12px; font-size: .84rem; }
.sidebar-footer { padding: 16px; border-top: 1px solid rgba(255,255,255,.1); min-width: 0; }
.user-chip { display: flex; gap: 10px; align-items: center; width: 100%; max-width: 100%; min-width: 0; overflow: hidden; }
.user-chip-link { box-sizing: border-box; width: 100%; max-width: 100%; min-width: 0; margin: 0; padding: 10px; overflow: hidden; border-radius: 11px; color: #fff; cursor: pointer; transition: background-color .16s ease, box-shadow .16s ease; }
.user-chip-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.user-chip-link:focus-visible { color: #fff; background: rgba(255,255,255,.09); outline: 3px solid rgba(99,214,201,.45); outline-offset: 2px; }
.user-chip .avatar { width: 38px; height: 38px; border-radius: 50%; background: #dff3f1; color: var(--navy); display: grid; place-items: center; font-weight: 800; flex: 0 0 38px; }
.user-chip-meta { display: block; flex: 1 1 0; width: 0; min-width: 0; max-width: 100%; overflow: hidden; text-align: start; }
.user-chip strong { display: -webkit-box; width: 100%; max-width: 100%; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; white-space: normal; overflow-wrap: anywhere; word-break: break-word; font-size: .82rem; line-height: 1.25; }
.user-chip small { display: block; width: 100%; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #9ebbc1; font-size: .7rem; line-height: 1.25; margin-top: 3px; }
.sidebar-actions { display: flex; justify-content: space-between; margin-top: 12px; }
.sidebar-actions a, .link-button { color: #a9c5ca; background: none; border: 0; padding: 0; font-size: .75rem; }
/* v1.17.1 - contain long sidebar account names safely. */
.sidebar-footer { overflow: hidden; }
.sidebar-actions { gap: 12px; min-width: 0; }
.sidebar-actions > * { min-width: 0; }
.sidebar-actions a, .sidebar-actions .link-button { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar { height: 72px; position: fixed; inset: 0 0 auto 276px; z-index: 30; background: rgba(255,255,255,.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 28px; gap: 14px; transition: inset .2s ease; }
.topbar > div { min-width: 0; }
.topbar strong, .topbar small { display: block; }
.topbar strong { font-size: .98rem; }
.topbar small { color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-button { display: none; place-items: center; width: 44px; height: 44px; flex: none; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--navy); font-size: 1.4rem; }
.menu-button:hover { border-color: var(--line); background: #f2f7f8; }
.notification-link { margin-left: auto; min-height: 44px; display: inline-flex; align-items: center; font-size: .82rem; font-weight: 700; color: var(--ink); }
.notification-count { margin-left: 6px; min-width: 20px; height: 20px; border-radius: 10px; padding: 0 6px; background: var(--danger); color: #fff; display: inline-grid; place-items: center; font-size: .69rem; }
.language-switcher { margin: 0; }
.topbar .language-switcher { margin-inline-start: auto; }
.topbar .notification-link { margin-left: 0; }
.language-button { min-height: 36px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--teal-dark); font-size: .78rem; font-weight: 800; white-space: nowrap; }
.language-button:hover { border-color: var(--teal); background: #f1fbfa; }
.public-language-switcher { position: fixed; inset-block-start: max(14px, env(safe-area-inset-top)); inset-inline-end: max(14px, env(safe-area-inset-right)); z-index: 50; }
.main-content { width: 100%; max-width: 1680px; margin-inline: auto; padding: 28px; min-height: calc(100vh - 72px); min-height: calc(100dvh - 72px); }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.page-header h1 { margin: 0; color: var(--navy); font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -.035em; }
.page-header p { color: var(--muted); margin: 6px 0 0; max-width: 780px; line-height: 1.5; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 9px 15px; border: 1px solid transparent; border-radius: 9px; font-weight: 750; font-size: .84rem; }
.button.primary { background: var(--teal); color: #fff; }
.button.primary:hover { background: var(--teal-dark); color: #fff; }
.button.secondary { border-color: var(--line); background: #fff; color: var(--ink); }
.button.danger { background: var(--danger); color: #fff; }
.button.warning { background: #fef1d8; color: #7b4600; border-color: #f4d29a; }
.button.small { min-height: 32px; padding: 6px 10px; font-size: .75rem; }
body.confirmation-open { overflow: hidden; }
.confirmation-backdrop { position: fixed; inset: 0; z-index: 250; display: grid; place-items: center; padding: 24px; background: rgba(4, 20, 27, .62); backdrop-filter: blur(5px); }
.confirmation-dialog { width: min(520px, 100%); max-height: min(86vh, 720px); overflow-y: auto; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; padding: 24px; border: 1px solid rgba(180,35,24,.18); border-radius: 18px; background: #fff; box-shadow: 0 28px 80px rgba(3, 22, 29, .28); animation: confirmation-pop .16s ease-out; }
.confirmation-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: #fee2e2; color: var(--danger); font-size: 1.35rem; font-weight: 900; border: 1px solid #fecaca; }
.confirmation-copy { min-width: 0; }
.confirmation-copy h2 { margin: 1px 0 4px; color: var(--navy); font-size: 1.14rem; letter-spacing: -.02em; }
.confirmation-caution { margin: 0 0 12px; color: var(--muted); font-size: .79rem; line-height: 1.45; }
.confirmation-message { margin: 0; color: var(--ink); font-size: .94rem; font-weight: 650; line-height: 1.55; }
.confirmation-type { margin-top: 16px; padding: 14px; border: 1px solid #f0d5d2; border-radius: 12px; background: #fff8f7; }
.confirmation-type-label { display: block; margin-bottom: 6px; color: #6f2722; font-size: .76rem; font-weight: 750; }
.confirmation-expected { display: inline-block; max-width: 100%; margin-bottom: 9px; padding: 4px 7px; border-radius: 6px; background: #f9e7e5; color: #7f1d1d; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .82rem; font-weight: 800; overflow-wrap: anywhere; }
.confirmation-type input { width: 100%; margin-top: 0; border-color: #e7b8b3; background: #fff; }
.confirmation-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 9px; padding-top: 4px; }
.confirmation-actions .button { min-width: 112px; }
@keyframes confirmation-pop { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }


/* v1.26.0 - global required-field summary modal (originated in v1.17.9 for OVR only) */
body.required-summary-open { overflow: hidden; }
.required-summary-backdrop { position: fixed; inset: 0; z-index: 255; display: grid; place-items: center; padding: 24px; background: rgba(4, 20, 27, .64); backdrop-filter: blur(5px); }
.required-summary-dialog { width: min(620px, 100%); max-height: min(88vh, 780px); overflow-y: auto; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; padding: 24px; border: 1px solid rgba(194, 111, 16, .24); border-radius: 18px; background: #fff; box-shadow: 0 28px 80px rgba(3, 22, 29, .3); animation: confirmation-pop .16s ease-out; }
.required-summary-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: #fff4dc; color: #9a5a12; border: 1px solid #f0cf91; font-size: 1.35rem; font-weight: 900; }
.required-summary-copy { min-width: 0; }
.required-summary-copy h2 { margin: 1px 0 5px; color: var(--navy); font-size: 1.18rem; letter-spacing: -.02em; }
.required-summary-intro { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.55; }
.required-summary-count { display: inline-flex; margin-top: 13px; padding: 5px 9px; border-radius: 999px; background: #fff5e4; color: #835012; font-size: .72rem; font-weight: 850; }
.required-summary-list { margin: 14px 0 0; padding: 0; display: grid; gap: 8px; list-style: none; counter-reset: missing-fields; }
.required-summary-list > li { counter-increment: missing-fields; position: relative; min-width: 0; padding: 10px 12px 10px 42px; border: 1px solid #eadcc3; border-radius: 11px; background: #fffdf8; }
.required-summary-list > li::before { content: counter(missing-fields); position: absolute; left: 11px; top: 10px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: #f4e4c6; color: #794a13; font-size: .68rem; font-weight: 900; }
.required-summary-list strong { display: block; color: var(--navy); font-size: .82rem; line-height: 1.4; overflow-wrap: anywhere; }
.required-summary-section { display: block; margin-top: 3px; color: var(--teal-dark); font-size: .67rem; font-weight: 750; }
.required-summary-list small { display: block; margin-top: 4px; color: var(--muted); font-size: .7rem; line-height: 1.45; }
.required-summary-other { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--line); }
.required-summary-other h3 { margin: 0 0 4px; color: var(--navy); font-size: .9rem; }
.required-summary-other > p { margin: 0; color: var(--muted); font-size: .74rem; line-height: 1.45; }
.required-summary-other .required-summary-list { margin-top: 10px; }
.required-summary-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; padding-top: 4px; }
.required-summary-actions .button { min-width: 190px; }
.required-field-missing,
.required-field-invalid { position: relative; border-radius: 9px; outline: 2px solid rgba(194, 111, 16, .34); outline-offset: 4px; }
.required-field-missing input:not([type="radio"]):not([type="checkbox"]),
.required-field-missing select,
.required-field-missing textarea { border-color: #c56e0b !important; box-shadow: 0 0 0 3px rgba(197,110,11,.08) !important; }
.required-field-invalid { outline-color: rgba(180,35,24,.26); }
.required-field-invalid input:not([type="radio"]):not([type="checkbox"]),
.required-field-invalid select,
.required-field-invalid textarea { border-color: #b42318 !important; box-shadow: 0 0 0 3px rgba(180,35,24,.07) !important; }
.required-summary-hint { margin: 9px 0 0; color: var(--teal-dark); font-size: .7rem; font-weight: 700; line-height: 1.45; }
.required-summary-field-link { width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; display: flex; align-items: center; justify-content: space-between; gap: 14px; text-align: start; cursor: pointer; font: inherit; }
.required-summary-field-link:hover strong, .required-summary-field-link:focus-visible strong { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 2px; }
.required-summary-field-link:focus-visible { outline: 3px solid rgba(15,107,120,.18); outline-offset: 5px; border-radius: 7px; }
.required-summary-field-copy { min-width: 0; display: block; }
.required-summary-field-state { flex: none; padding: 4px 8px; border-radius: 999px; background: #fff0dc; color: #8a5311; font-size: .64rem; font-weight: 850; white-space: nowrap; }
html[dir="rtl"] .required-summary-list > li { padding: 10px 42px 10px 12px; }
html[dir="rtl"] .required-summary-list > li::before { left: auto; right: 11px; }
@media (max-width: 640px) {
  .required-summary-backdrop { padding: 14px; }
  .required-summary-dialog { grid-template-columns: 42px minmax(0,1fr); gap: 12px; padding: 18px; border-radius: 15px; max-height: 91vh; }
  .required-summary-icon { width: 40px; height: 40px; font-size: 1.1rem; }
  .required-summary-actions .button { width: 100%; min-width: 0; }
}
.card { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; }
.card-header { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-header h2, .card-header h3 { margin: 0; color: var(--navy); font-size: 1rem; }
.card-header p { margin: 3px 0 0; color: var(--muted); font-size: .78rem; }
.card-body { padding: 20px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 15px; margin-bottom: 22px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; width: 70px; height: 70px; border-radius: 50%; right: -22px; top: -22px; background: var(--mint); }
.stat-card span { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-size: .68rem; font-weight: 800; }
.stat-card strong { display: block; color: var(--navy); margin-top: 8px; font-size: 1.9rem; letter-spacing: -.05em; }
.two-column { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .8fr); gap: 18px; align-items: start; }
.three-column { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; border-radius: 0 0 var(--radius) var(--radius); scrollbar-width: thin; }
table.data-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.data-table th { background: #f7fafb; color: #52616d; text-align: left; padding: 11px 14px; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { min-width: 0; padding: 13px 14px; border-bottom: 1px solid #edf1f3; vertical-align: middle; overflow-wrap: anywhere; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tr:hover td { background: #fbfdfd; }
.data-table .primary-cell { font-weight: 750; color: var(--navy); white-space: nowrap; }
.status, .risk-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 9px; background: #e8eff1; color: #36515a; font-size: .7rem; font-weight: 800; white-space: nowrap; }
.status.success-status { background: #dcfce7; color: #166534; }
.status.danger-status { background: #fee2e2; color: #991b1b; }
.status.warning-status { background: #fef3c7; color: #92400e; }
.risk-badge.gray { background: #e5e7eb; color: #374151; }
.risk-badge.green { background: #dcfce7; color: #166534; }
.risk-badge.yellow { background: #fef9c3; color: #854d0e; }
.risk-badge.red { background: #fee2e2; color: #991b1b; }
.empty-state { padding: 46px 22px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--navy); font-size: 1rem; margin-bottom: 5px; }
.filter-bar { display: grid; grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(140px, .38fr)) auto; gap: 10px; align-items: end; padding: 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 16px; }
.filter-bar.compact-filter { grid-template-columns: minmax(220px,1fr) auto; }
.filter-bar.report-filter { grid-template-columns: 1fr 1fr auto; }
.advanced-search { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 7px 24px rgba(11,47,58,.05); }
.advanced-search > summary { min-height: 48px; padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; color: var(--navy); background: #f8fbfb; cursor: pointer; font-size: .83rem; font-weight: 850; list-style: none; }
.advanced-search > summary::-webkit-details-marker { display: none; }
.advanced-search > summary::after { content: "+"; font-size: 1.15rem; }
.advanced-search[open] > summary { border-bottom: 1px solid var(--line); }
.advanced-search[open] > summary::after { content: "−"; }
.advanced-search.destructive-search { margin-top: 14px; border-color: #fecaca; }
.advanced-search.destructive-search > summary { color: #991b1b; background: #fff7f7; }
.advanced-filter { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 13px; align-items: end; padding: 16px; }
.filter-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; }
.table-actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.table-actions form { margin: 0; }
label { display: block; color: #344550; font-size: .78rem; font-weight: 750; }
label.required { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 3px; }
label.required::after, .required-label-marker::after { content: "*"; order: 1; flex: none; color: var(--danger); font-weight: 900; line-height: 1; margin-inline-start: 1px; }
label.required > input, label.required > select, label.required > textarea, label.required > .time-24h-control, label.required > .datetime-24h-control { order: 2; flex: 1 0 100%; }
label.required > small, label.required > .form-note, label.required > .help-text, label.required > .conditional-required-note { order: 3; flex: 1 0 100%; }
.required-label-marker { display: inline-flex; align-items: baseline; gap: 3px; }
input[type="text"], input[type="search"], input[type="email"], input[type="url"], input[type="password"], input[type="date"], input[type="time"], input[type="datetime-local"], input[type="number"], select, textarea {
  width: 100%; min-width: 0; min-height: 42px; margin-top: 6px; padding: 9px 11px; border: 1px solid #cbd6da; border-radius: 8px; color: var(--ink); background: #fff; outline: none;
}
input[type="file"] { width: 100%; max-width: 100%; margin-top: 7px; }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15,107,120,.13); }
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); gap: 16px; }
.record-form { width: min(980px, 100%); margin-inline: auto; }
.record-form textarea { min-height: 120px; }
.record-form fieldset { min-width: 0; margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 10px; }
.record-form legend { padding-inline: 6px; color: var(--navy); font-size: .82rem; font-weight: 850; }
.permission-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(250px,1fr)); gap: 9px; }
.section-gap { margin-top: 22px; }
.settings-stack { display: grid; gap: 22px; }
.card-header-split { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.card-header p { margin: 4px 0 0; color: var(--muted); font-size: .8rem; }
.switch { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; margin: 0; white-space: nowrap; }
.switch input { width: 18px; height: 18px; }
.provider-choice { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.provider-choice label { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin: 0; background: #fbfdfd; }
.provider-choice input { width: auto; margin-top: 4px; }
.provider-choice span, .check-row span { display: grid; gap: 3px; }
.provider-choice small, .check-row small { color: var(--muted); font-weight: 500; }
.provider-panel { border: 1px solid var(--line); border-radius: 10px; padding: 16px; background: #fbfdfd; }
.action-row { display: flex; flex-wrap: wrap; gap: 10px; }
.sticky-actions { justify-content: flex-end; }
.check-row { display: flex; flex-direction: row; gap: 10px; align-items: flex-start; margin-bottom: 18px; }
.check-row input { width: 18px; height: 18px; margin-top: 2px; }
.link-code { display: grid; gap: 5px; border: 1px dashed var(--teal); border-radius: 10px; padding: 14px; margin: 14px 0; background: #effbfa; }
.link-code strong { font: 800 1.35rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; color: var(--navy); }
.muted { color: var(--muted); }
code { background: #edf3f4; padding: 2px 5px; border-radius: 5px; overflow-wrap: anywhere; }
.span-12 { grid-column: span 12; }.span-9 { grid-column: span 9; }.span-8 { grid-column: span 8; }.span-6 { grid-column: span 6; }.span-5 { grid-column: span 5; }.span-4 { grid-column: span 4; }.span-3 { grid-column: span 3; }.span-2 { grid-column: span 2; }
.form-section { padding: 20px; border-bottom: 1px solid var(--line); }
.form-section:last-child { border-bottom: 0; }
.section-heading { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 18px; }
.section-number { width: 30px; height: 30px; border-radius: 9px; background: var(--mint); color: var(--teal-dark); display: grid; place-items: center; font-weight: 850; flex: none; }
.section-heading h2 { margin: 0; font-size: 1rem; color: var(--navy); }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: .78rem; }
.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; margin-top: 8px; }
.choice { display: flex; gap: 9px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fbfdfd; font-weight: 600; font-size: .78rem; }
.choice:hover { border-color: #9bc8ce; background: #f2fbfa; }
.choice input { margin-top: 2px; accent-color: var(--teal); }
.form-note, .confidential-note { padding: 12px 14px; border-radius: 9px; font-size: .78rem; line-height: 1.5; }
.form-note { background: #f5f8fa; color: #52616d; border: 1px solid var(--line); }
.confidential-note { background: #eefaf8; color: #22555b; border-left: 4px solid #3ab7aa; }
.note-gap { margin-bottom: 16px; }
.note-gap-sm { margin-top: 8px; }
.compact-textarea { min-height: 80px; }
.compact-empty { padding: 25px 8px; }
.user-editor { min-width: min(300px, 100%); margin: 0; }
.user-status-form { margin-top: 8px; }
.user-acl-link { margin-top: 8px; }
.acl-table td:first-child strong, .acl-table td:first-child small { display: block; }
.acl-table td:first-child small { margin-top: 3px; color: var(--muted); font-size: .66rem; }
.acl-table td:first-child { min-width: 230px; }
.acl-table td:not(:first-child) { width: auto; min-width: 145px; }
.acl-table select { min-width: 150px; max-width: 100%; margin-top: 0; }
.acl-help { display: block; margin-top: 6px; max-width: 220px; color: var(--muted); font-size: .68rem; line-height: 1.35; }
.acl-group-row td { width: auto !important; padding-block: 9px; background: #edf4f5 !important; color: var(--navy); font-size: .69rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.acl-check { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fbfdfd; white-space: nowrap; }
.acl-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--teal); }
.acl-user-summary .card-body { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.acl-user-summary .card-body > div { padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8fbfb; }
.acl-user-summary span, .acl-user-summary strong, .acl-user-summary small { display: block; }
.acl-user-summary span { color: var(--muted); font-size: .65rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.acl-user-summary strong { margin-top: 5px; color: var(--navy); }
.acl-user-summary small { margin-top: 3px; color: var(--muted); }
.acl-reset-form { display: flex; justify-content: flex-end; margin-top: 10px; }
.choice-gap { margin-block: 10px; }
.stack-gap { margin-top: 14px; }
.error-card { max-width: 720px; margin: 8vh auto; }
.form-actions { position: sticky; bottom: 0; display: flex; gap: 10px; justify-content: flex-end; padding: 15px 20px; background: rgba(255,255,255,.97); border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); z-index: 5; }
.flash-stack { position: fixed; top: 84px; right: 22px; z-index: 100; width: min(430px, calc(100vw - 30px)); }
.flash { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 13px 15px; margin-bottom: 8px; border-radius: 10px; color: #fff; box-shadow: 0 8px 28px rgba(0,0,0,.16); font-size: .83rem; }
.flash.success { background: var(--success); }.flash.danger { background: var(--danger); }.flash.warning { background: var(--warning); }.flash.info { background: var(--teal); }
.flash button { background: none; border: 0; color: inherit; font-size: 1.2rem; }
.detail-hero { background: linear-gradient(120deg, var(--navy), var(--teal)); color: #fff; border-radius: 16px; padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow); }
.detail-hero-top { display: flex; justify-content: space-between; gap: 15px; }
.detail-hero h1 { margin: 4px 0 5px; font-size: clamp(1.4rem, 3vw, 2rem); }
.detail-hero p { margin: 0; color: #c8e0e4; }
.detail-hero .status { background: rgba(255,255,255,.16); color: #fff; align-self: flex-start; }
.detail-metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; margin-top: 20px; }
.detail-metrics div { background: rgba(255,255,255,.09); padding: 10px 12px; border-radius: 9px; }
.detail-metrics span, .detail-metrics strong { display: block; }
.detail-metrics span { color: #b9d4d9; font-size: .65rem; text-transform: uppercase; letter-spacing: .07em; }
.detail-metrics strong { margin-top: 4px; font-size: .83rem; }
.definition-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 18px; }
.definition-grid div { padding: 11px 0; border-bottom: 1px solid #edf1f3; }
.definition-grid dt { color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 800; }
.definition-grid dd { margin: 4px 0 0; line-height: 1.45; font-size: .84rem; }
.narrative { white-space: pre-wrap; line-height: 1.65; color: #33434d; font-size: .88rem; }
.workflow { position: relative; padding-left: 22px; }
.workflow::before { content: ""; position: absolute; left: 6px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.workflow-item { position: relative; padding: 0 0 18px 14px; }
.workflow-item::before { content: ""; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border: 3px solid #fff; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 2px var(--teal); }
.workflow-item strong { font-size: .82rem; color: var(--navy); }.workflow-item small { display: block; color: var(--muted); margin-top: 3px; }.workflow-item p { margin: 6px 0 0; font-size: .78rem; line-height: 1.5; }
/* v1.16.2 - professional workflow history timeline */
.workflow-history-card { overflow: hidden; }
.workflow-history-header { align-items: flex-start; gap: 14px; }
.workflow-history-count { flex: none; }
.workflow-history-body { background: linear-gradient(180deg, #fbfdfd 0%, #ffffff 100%); }
.workflow-history { position: relative; padding-inline-start: 34px; }
.workflow-history::before { content: ""; position: absolute; inset-inline-start: 16px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(180deg, #b6d9dc 0%, #d9e8ea 100%); }
.workflow-history-item { position: relative; padding: 0 0 16px 18px; }
.workflow-history-item:last-child { padding-bottom: 0; }
.workflow-history-marker { position: absolute; inset-inline-start: -2px; top: 10px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #fff; border: 2px solid #b7dadd; box-shadow: 0 8px 18px rgba(11,47,58,.08); color: var(--teal-dark); font-size: .86rem; font-weight: 900; z-index: 1; }
.workflow-history-item.is-latest .workflow-history-marker { border-color: #8ecfbf; background: #f3fbf7; color: #1f6b55; }
.workflow-history-panel { min-width: 0; padding: 16px 18px; border: 1px solid #d9e8ea; border-radius: 16px; background: #fff; box-shadow: 0 10px 26px rgba(11,47,58,.05); }
.workflow-history-item.is-latest .workflow-history-panel { border-color: #b9decb; background: linear-gradient(180deg, #ffffff 0%, #f7fcf9 100%); box-shadow: 0 12px 28px rgba(20,93,72,.09); }
.workflow-history-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.workflow-history-heading { min-width: 0; }
.workflow-history-heading h3 { margin: 8px 0 0; color: var(--navy); font-size: .98rem; line-height: 1.35; }
.workflow-history-badge { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; font-size: .68rem; font-weight: 850; letter-spacing: .02em; text-transform: uppercase; }
.workflow-history-badge.is-submitted { background: #e9f6f8; color: #166478; }
.workflow-history-badge.is-manager { background: #eef3fe; color: #355fc6; }
.workflow-history-badge.is-qps { background: #f4ecff; color: #7645c7; }
.workflow-history-badge.is-rca { background: #fff0e1; color: #9a5a12; }
.workflow-history-badge.is-action { background: #ecfaf4; color: #237a58; }
.workflow-history-badge.is-closed { background: #e8f7ee; color: #256f48; }
.workflow-history-badge.is-draft, .workflow-history-badge.is-generic { background: #edf2f4; color: #52616d; }
.workflow-history-latest { display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 999px; background: #eaf8f1; color: #1f6b55; font-size: .68rem; font-weight: 850; white-space: nowrap; }
.workflow-history-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; color: var(--muted); font-size: .79rem; }
.workflow-history-date, .workflow-history-actor { display: inline-flex; align-items: center; }
.workflow-history-separator { color: #b1c3c7; }
.workflow-history-note { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: #f8fbfb; color: #3c5260; font-size: .82rem; line-height: 1.6; border: 1px solid #e4eef0; }
.workflow-history-note.is-empty { font-style: italic; color: #697985; }
html[dir="rtl"] .workflow-history { padding-inline-start: 0; padding-inline-end: 34px; }
html[dir="rtl"] .workflow-history::before { inset-inline-start: auto; inset-inline-end: 16px; }
html[dir="rtl"] .workflow-history-item { padding: 0 18px 16px 0; }
html[dir="rtl"] .workflow-history-marker { inset-inline-start: auto; inset-inline-end: -2px; }
@media (max-width: 760px) {
  .workflow-history { padding-inline-start: 28px; }
  .workflow-history::before { inset-inline-start: 12px; }
  .workflow-history-item { padding-left: 12px; }
  .workflow-history-marker { width: 30px; height: 30px; inset-inline-start: -3px; top: 12px; font-size: .76rem; }
  .workflow-history-panel { padding: 14px; border-radius: 14px; }
  .workflow-history-top { flex-direction: column; align-items: stretch; }
  .workflow-history-latest { align-self: flex-start; }
  html[dir="rtl"] .workflow-history { padding-inline-start: 0; padding-inline-end: 28px; }
  html[dir="rtl"] .workflow-history::before { inset-inline-end: 12px; }
  html[dir="rtl"] .workflow-history-item { padding-right: 12px; padding-left: 0; }
  html[dir="rtl"] .workflow-history-marker { inset-inline-end: -3px; }
}
details.workflow-panel { border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 12px; overflow: hidden; }
details.workflow-panel summary { list-style: none; cursor: pointer; padding: 15px 18px; font-weight: 800; color: var(--navy); background: #f7fafb; }
details.workflow-panel summary::-webkit-details-marker { display: none; }
details.workflow-panel[open] summary { border-bottom: 1px solid var(--line); }
details.workflow-panel .panel-body { padding: 18px; }
.progress-track { display: flex; gap: 3px; margin: 14px 0; overflow: hidden; border-radius: 7px; }
.progress-track span { height: 8px; flex: 1; background: #dfe7e9; }.progress-track span.done, .progress-track span.complete { background: #3ab7aa; }.progress-track span.current { background: var(--gold); }.progress-track span.skipped { background: repeating-linear-gradient(135deg,#abc0c5 0 4px,#dfe7e9 4px 8px); }
.guided-workflow { overflow: hidden; }
.guided-workflow-header .status { flex: none; }
.workflow-steps { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.workflow-step { min-width: 0; min-height: 152px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: #f8fafb; }
.workflow-step.current { border-color: var(--gold); background: #fffaf0; box-shadow: 0 0 0 2px rgba(217,164,65,.14); }
.workflow-step.complete { border-color: #a7d8cd; background: #f1fbf8; }
.workflow-step.skipped { border-style: dashed; background: #f7f9fa; }
.workflow-step-marker { width: 28px; height: 28px; margin-bottom: 10px; border-radius: 50%; display: grid; place-items: center; background: #e4ecee; color: #52616d; font-size: .72rem; font-weight: 850; }
.workflow-step.current .workflow-step-marker { background: var(--gold); color: #422d00; }
.workflow-step.complete .workflow-step-marker { background: var(--success); color: #fff; }
.workflow-step strong, .workflow-step small { display: block; }
.workflow-step strong { color: var(--navy); font-size: .78rem; line-height: 1.35; }
.workflow-step small { margin-top: 4px; color: var(--teal-dark); font-size: .65rem; font-weight: 750; }
.workflow-step p { margin: 7px 0 0; color: var(--muted); font-size: .68rem; line-height: 1.45; }
.workflow-condition { display: inline-flex; margin-top: 7px; padding: 3px 6px; border-radius: 999px; background: #e8eff1; color: #52616d; font-size: .58rem; font-weight: 800; }
.next-action-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 16px; padding: 18px; border: 1px solid #9bc8ce; border-inline-start: 5px solid var(--teal); border-radius: 12px; background: #f1fbfa; }
.next-action-card.overdue { border-color: #efc9a2; border-inline-start-color: var(--warning); background: #fff9ef; }
.next-action-card.complete { border-color: #a7d8cd; border-inline-start-color: var(--success); background: #f3fcf7; }
.next-action-copy { min-width: 0; }
.next-action-kicker { color: var(--teal-dark); font-size: .65rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.next-action-card h3 { margin: 5px 0 4px; color: var(--navy); font-size: 1rem; }
.next-action-card p { margin: 0; color: #40515b; font-size: .78rem; line-height: 1.5; }
.next-action-meta { display: flex; flex-wrap: wrap; gap: 7px 16px; margin-top: 9px; color: var(--muted); font-size: .69rem; }
.overdue-text { color: var(--danger); font-weight: 800; }
.workflow-waiting { flex: none; }
.workflow-create-guide .card-body { padding-top: 16px; }
.workflow-create-steps { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.workflow-create-steps li { min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafb; }
.workflow-create-steps li.current { border-color: var(--gold); background: #fffaf0; }
.workflow-create-steps span { width: 24px; height: 24px; margin-bottom: 7px; display: grid; place-items: center; border-radius: 50%; background: #e4ecee; color: #52616d; font-size: .66rem; font-weight: 850; }
.workflow-create-steps li.current span { background: var(--gold); color: #422d00; }
.workflow-create-steps strong { display: block; color: var(--navy); font-size: .7rem; line-height: 1.4; }
.workflow-create-note { margin: 14px 0 0; padding: 12px 14px; border-radius: 9px; background: #f1fbfa; color: #34515a; font-size: .78rem; line-height: 1.55; }
.guided-task-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.guided-task-card { min-width: 0; padding: 15px; border: 1px solid var(--line); border-inline-start: 4px solid var(--teal); border-radius: 11px; background: #fbfdfd; }
.guided-task-card.overdue { border-inline-start-color: var(--warning); background: #fffaf2; }
.guided-task-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .64rem; font-weight: 800; }
.guided-task-card h3 { margin: 10px 0 5px; font-size: .9rem; }
.guided-task-card > strong { display: block; color: var(--navy); font-size: .78rem; }
.guided-task-card > p { min-height: 42px; margin: 5px 0 0; color: var(--muted); font-size: .7rem; line-height: 1.5; }
.guided-task-card .button { margin-top: 12px; }
#ovr-report-form, #manager-review, #qps-review, #rca-investigation, #corrective-actions, #qps-final-review, #closure-feedback { scroll-margin-top: 92px; }
.action-card { border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 10px; padding: 14px; margin-bottom: 10px; content-visibility: auto; contain-intrinsic-size: auto 120px; }
.action-card.complete { border-left-color: var(--success); background: #fbfffc; }
.action-card .meta { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: .7rem; margin-top: 7px; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 15px; border-top: 1px solid var(--line); }
.pagination-pages { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.pagination-page { min-width: 34px; min-height: 34px; padding: 6px 9px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: .75rem; font-weight: 800; }
.pagination-page.active { border-color: var(--teal); background: var(--teal); color: #fff; }
.button.disabled { pointer-events: none; opacity: .48; }
.notification-summary { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 16px; }
.notification-summary a { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font-size: .8rem; font-weight: 750; }
.notification-summary a strong { min-width: 23px; padding: 2px 7px; border-radius: 999px; background: #e8eff1; color: #36515a; text-align: center; font-size: .7rem; }
.notification-summary a.active { border-color: var(--navy); background: var(--navy); color: #fff; }
.notification-summary a.active strong { background: rgba(255,255,255,.16); color: #fff; }
.notification-list { display: grid; gap: 11px; }
.notification-card { display: grid; grid-template-columns: 6px minmax(0,1fr) auto; gap: 15px; align-items: stretch; padding: 15px; border: 1px solid var(--line); border-radius: 11px; background: #fff; content-visibility: auto; contain-intrinsic-size: auto 130px; }
.notification-card.is-read { background: #fafcfc; }
.notification-indicator { width: 6px; border-radius: 999px; background: #cbd5e1; }
.notification-card.is-unread .notification-indicator { background: var(--teal); box-shadow: 0 0 0 3px rgba(15,107,120,.1); }
.notification-content { min-width: 0; }
.notification-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.notification-title-row strong { color: var(--navy); font-size: .88rem; }
.notification-content p { margin: 7px 0; color: #40515b; font-size: .82rem; line-height: 1.55; overflow-wrap: anywhere; }
.notification-card.is-read .notification-content p { color: var(--muted); }
.notification-content .meta { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 14px; color: var(--muted); font-size: .7rem; }
.notification-content .meta a { font-weight: 750; }
.notification-actions { display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 7px; }
.notification-actions form, .notification-actions .button { width: 100%; }
.notification-delete { border-color: #f0c3be; background: #fff; color: var(--danger); }
.notification-delete:hover { border-color: var(--danger); background: #fff5f4; }
.chart-list { display: grid; gap: 12px; }
.chart-row { display: grid; grid-template-columns: minmax(120px, .8fr) minmax(120px, 2fr) 38px; align-items: center; gap: 10px; font-size: .78rem; }
.bar-track { height: 10px; border-radius: 8px; background: #edf2f3; overflow: hidden; }.bar { height: 100%; border-radius: inherit; background: var(--teal); min-width: 3px; }
.auth-shell { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); background: linear-gradient(145deg, #082c36 0 52%, #e8f4f3 52% 100%); }
.auth-shell > main { width: 100%; min-width: 0; display: grid; place-items: center; }
.login-card { width: min(1040px, 100%); min-height: 630px; margin-inline: auto; display: grid; grid-template-columns: 1.05fr .95fr; background: #fff; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 70px rgba(0,0,0,.2); }
.login-visual { padding: 52px; color: #fff; background: linear-gradient(150deg, rgba(9,52,63,.95), rgba(12,105,116,.9)); display: flex; flex-direction: column; justify-content: space-between; }
.login-visual h1 { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.04; margin: 20px 0; letter-spacing: -.05em; }
.login-visual p { max-width: 500px; line-height: 1.7; color: #c8e0e4; }
.login-pill { display: inline-flex; align-self: flex-start; background: rgba(255,255,255,.12); padding: 7px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.login-form { min-width: 0; padding: 52px; display: flex; flex-direction: column; justify-content: center; }
.login-brand-logo { display: block; width: 100%; max-width: 430px; height: 130px; margin: 0 0 22px; background: url("images/al-wattan-electronic-ovr-logo.webp") left center / contain no-repeat; }
.login-form h2 { margin: 0; color: var(--navy); font-size: 1.8rem; }.login-form > p { color: var(--muted); margin: 7px 0 25px; }
.login-form label { margin-bottom: 16px; }.login-form .button { width: 100%; margin-top: 8px; }
.check-line { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); }.check-line input { accent-color: var(--teal); }
.form-help-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.form-help-row .check-line { margin: 0; }
.form-help-row .login-remember { flex: 0 1 auto; gap: 7px; font-size: .70rem; line-height: 1.2; white-space: nowrap; }
.form-help-row .login-remember input { flex: 0 0 auto; margin: 0; }
.form-help-row .login-remember span { display: inline-block; white-space: nowrap; }
.form-help-row > a { font-size: .77rem; font-weight: 750; white-space: nowrap; }
.login-footer { color: var(--muted); font-size: .7rem; margin-top: 30px; line-height: 1.5; }
.recovery-card { width: min(560px,100%); margin-inline: auto; padding: 36px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 24px 65px rgba(4,37,47,.2); }
.recovery-brand { width: 100%; height: 112px; margin-bottom: 20px; background: url("images/al-wattan-electronic-ovr-logo.webp") left center / contain no-repeat; }
.recovery-card h1 { margin: 14px 0 8px; color: var(--navy); font-size: 1.7rem; letter-spacing: -.03em; }
.recovery-card > p { margin: 0 0 22px; color: var(--muted); line-height: 1.6; font-size: .9rem; }
.recovery-card form label { margin-bottom: 16px; }
.recovery-card form .button { width: 100%; }
.recovery-note { margin-top: 18px; padding: 12px 14px; border-radius: 9px; color: #52616d; background: #f5f8fa; border: 1px solid var(--line); font-size: .76rem; line-height: 1.5; }
.back-link { display: inline-block; margin-top: 18px; font-size: .8rem; font-weight: 750; }
.translation-endpoints { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.endpoint-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #f9fcfc; }
.endpoint-card h3 { margin: 10px 0 4px; color: var(--navy); font-size: 1rem; }
.endpoint-card > p { margin: 0 0 16px; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.endpoint-card label + label { margin-top: 13px; }
.translation-safety { padding: 14px 16px; border: 1px solid #a8d8d2; border-inline-start: 4px solid var(--teal); border-radius: 10px; background: #f0fbf9; color: #34515a; font-size: .8rem; line-height: 1.55; }
.override-list { display: grid; gap: 14px; margin-bottom: 18px; }
.override-editor { min-width: 0; display: grid; grid-template-columns: minmax(220px,.9fr) minmax(300px,1.35fr); gap: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow); }
.override-source, .override-fields { min-width: 0; display: grid; align-content: start; gap: 12px; }
.override-source textarea { color: #40515b; background: #f5f8fa; resize: vertical; }
.default-translation { min-height: 42px; margin-top: 6px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; background: #f5f8fa; color: #40515b; font-weight: 500; line-height: 1.45; }
.override-fields textarea { resize: vertical; }
.override-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.override-actions .action-row { justify-content: flex-end; }
.app-footer { display: flex; justify-content: space-between; gap: 15px; color: #87949d; font-size: .68rem; margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); }
.app-footer .footer-credit { color: inherit; text-decoration: none; font-weight: 700; transition: color .18s ease, text-decoration-color .18s ease; }
.app-footer .footer-credit:hover, .app-footer .footer-credit:focus-visible { color: var(--teal-dark); text-decoration: underline; text-underline-offset: 3px; }
.sidebar-backdrop { display: none; }
html[dir="rtl"] { font-family: Tahoma, Arial, "Segoe UI", sans-serif; }
html[dir="rtl"] .app-shell { padding-left: 0; padding-right: 276px; }
html[dir="rtl"] .sidebar { inset: 0 0 0 auto; }
html[dir="rtl"] .topbar { inset: 0 276px auto 0; }
html[dir="rtl"] .sidebar nav a.active { box-shadow: inset -3px 0 0 #63d6c9; }
html[dir="rtl"] .data-table th { text-align: right; }
html[dir="rtl"] .notification-count { margin-left: 0; margin-right: 6px; }
html[dir="rtl"] .flash-stack { right: auto; left: 22px; }
html[dir="rtl"] .confidential-note { border-left: 1px solid var(--line); border-right: 4px solid #3ab7aa; }
html[dir="rtl"] .workflow { padding-left: 0; padding-right: 22px; }
html[dir="rtl"] .workflow::before { left: auto; right: 6px; }
html[dir="rtl"] .workflow-item { padding: 0 14px 18px 0; }
html[dir="rtl"] .workflow-item::before { left: auto; right: -20px; }
html[dir="rtl"] .action-card { border-left: 1px solid var(--line); border-right: 4px solid var(--teal); }
html[dir="rtl"] .action-card.complete { border-right-color: var(--success); }
html[dir="rtl"] .login-brand-logo, html[dir="rtl"] .recovery-brand { background-position: right center; }
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .two-column { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr 1fr; }
  .filter-bar .button { width: 100%; }
  .workflow-steps, .workflow-create-steps { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .guided-task-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 1080px) {
  .app-shell { padding-left: 0; }
  .sidebar { width: min(320px, 88vw); transform: translateX(-105%); transition: transform .22s ease; box-shadow: 18px 0 45px rgba(1,17,22,.22); }
  .topbar { left: 0; padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right)); }.menu-button { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; }
  .nav-open { overflow: hidden; }
  .nav-open .sidebar { transform: translateX(0); }
  .nav-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(1,17,22,.55); backdrop-filter: blur(2px); }
  .main-content { padding: 22px 18px; }
  html[dir="rtl"] .app-shell { padding-right: 0; }
  html[dir="rtl"] .sidebar { transform: translateX(105%); box-shadow: -18px 0 45px rgba(1,17,22,.22); }
  html[dir="rtl"] .topbar { right: 0; }
  html[dir="rtl"] .nav-open .sidebar { transform: translateX(0); }
}
@media (max-width: 820px) {
  .login-card { grid-template-columns: 1fr; min-height: auto; }.login-visual { padding: 34px; min-height: 300px; }.login-form { padding: 34px; }.login-brand-logo { max-width: 430px; }
  .translation-endpoints, .override-editor { grid-template-columns: 1fr; }
  .override-actions { grid-column: 1; align-items: stretch; flex-direction: column; }
  .override-actions .action-row { justify-content: flex-start; }
  .form-grid { grid-template-columns: 1fr; }.span-12,.span-9,.span-8,.span-6,.span-5,.span-4,.span-3,.span-2 { grid-column: 1; }
  .provider-choice { grid-template-columns: 1fr; }.card-header-split { align-items: flex-start; flex-direction: column; }
  .detail-metrics { grid-template-columns: repeat(2,1fr); }
  .three-column { grid-template-columns: 1fr; }
  .notification-card { grid-template-columns: 6px minmax(0,1fr); }.notification-actions { grid-column: 2; flex-direction: row; justify-content: flex-start; }.notification-actions form { width: auto; }
  .workflow-steps, .workflow-create-steps { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .workflow-step { min-height: 0; }
  .acl-user-summary .card-body { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .table-wrap.responsive-table-wrap { overflow: visible; padding: 12px; }
  .responsive-table, .responsive-table tbody { display: block; width: 100%; }
  .responsive-table thead { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .responsive-table tbody { display: grid; gap: 12px; }
  .responsive-table tr { display: block; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: 0 5px 16px rgba(11,47,58,.05); overflow: hidden; }
  .responsive-table td { display: grid; grid-template-columns: minmax(110px, .36fr) minmax(0,1fr); align-items: start; gap: 14px; width: 100%; padding: 11px 13px; border-bottom: 1px solid #edf1f3; }
  .responsive-table td:last-child { border-bottom: 0; }
  .responsive-table td::before { content: attr(data-label); color: var(--muted); font-size: .67rem; line-height: 1.4; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
  .responsive-table .table-action-cell, .responsive-table .table-full-cell { display: block; }
  .responsive-table .table-action-cell::before, .responsive-table .table-full-cell::before { display: none; }
  .responsive-table .table-action-cell .button { width: 100%; }
  .responsive-table td details.workflow-panel { width: 100%; min-width: 0 !important; }
  .responsive-table td details.workflow-panel .panel-body { max-height: none; }
  .responsive-table .acl-group-row td { display: block; padding: 10px 12px; }
  .responsive-table .acl-group-row td::before { display: none; }
}
@media (max-width: 560px) {
  .stats-grid, .choice-grid, .definition-grid, .filter-bar { grid-template-columns: 1fr; }
  .page-header, .detail-hero-top { flex-direction: column; }.page-actions { justify-content: flex-start; width: 100%; }.page-actions .button { flex: 1; }
  .detail-metrics { grid-template-columns: 1fr; }
  .form-section, .card-body { padding: 16px; }.form-actions { flex-direction: column; }.form-actions .button { width: 100%; }
  .topbar { gap: 8px; height: 66px; }.app-shell { padding-top: 66px; }.topbar-context small { display: none; }.topbar-context strong { font-size: .88rem; }.notification-link { margin-left: auto; }.notification-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }.notification-count { margin-left: 0; }
  .main-content { padding: 16px max(12px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); min-height: calc(100dvh - 66px); }
  .login-visual, .login-form { padding: 24px; }.login-visual { min-height: auto; }.login-visual h1 { margin-block: 10px; font-size: 2rem; }.login-visual p, .login-visual .confidential-note { display: none; }.login-brand-logo { height: 100px; margin-bottom: 18px; }
  .form-help-row { align-items: flex-start; flex-direction: column; }.recovery-card { padding: 25px; }.recovery-brand { height: 90px; }
  .notification-title-row { align-items: flex-start; flex-direction: column; gap: 7px; }.notification-actions { flex-direction: column; }.notification-actions form { width: 100%; }.notification-actions .button { width: 100%; }
  .pagination { align-items: flex-start; flex-direction: column; }.pagination .page-actions { width: 100%; }
  .app-footer { flex-direction: column; }
  .responsive-table td { grid-template-columns: minmax(86px, .38fr) minmax(0,1fr); gap: 10px; }
  .filter-bar.compact-filter, .filter-bar.report-filter { grid-template-columns: 1fr; }
  .filter-bar .button { width: 100%; }
  .card-header { align-items: flex-start; flex-direction: column; }
  .override-actions .action-row { align-items: stretch; flex-direction: column; }.override-actions .button { width: 100%; }
  .chart-row { grid-template-columns: minmax(90px,.8fr) minmax(80px,2fr) 30px; gap: 7px; }
  .topbar .language-button { min-height: 34px; padding-inline: 8px; }
  .workflow-steps, .workflow-create-steps, .guided-task-grid { grid-template-columns: 1fr; }
  .workflow-step { display: grid; grid-template-columns: 32px minmax(0,1fr); gap: 10px; min-height: 0; }
  .workflow-step-marker { margin: 0; }
  .next-action-card { align-items: stretch; flex-direction: column; }.next-action-card .button, .workflow-waiting { width: 100%; }
  .workflow-create-steps li { display: grid; grid-template-columns: 26px minmax(0,1fr); gap: 9px; align-items: center; }.workflow-create-steps span { margin: 0; }
}
@media (max-width: 560px) {
  .confirmation-backdrop { padding: 14px; align-items: center; }
  .confirmation-dialog { grid-template-columns: 42px minmax(0,1fr); gap: 12px; padding: 18px; border-radius: 15px; max-height: 90vh; }
  .confirmation-icon { width: 40px; height: 40px; font-size: 1.1rem; }
  .confirmation-actions { flex-direction: column-reverse; }
  .confirmation-actions .button { width: 100%; }
}
@media (max-width: 380px) {
  .main-content { padding-inline: 9px; }
  .card-body, .form-section { padding: 14px; }
  .responsive-table td { display: block; }.responsive-table td::before { display: block; margin-bottom: 5px; }
  .button { width: 100%; }
  .recovery-card { padding: 20px; }.recovery-card h1 { font-size: 1.45rem; }
}
@media (pointer: coarse) {
  .button, .sidebar nav a, .sidebar-actions a, .link-button, summary { min-height: 44px; }
  input[type="checkbox"], input[type="radio"] { min-width: 20px; min-height: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media print {
  .sidebar,.topbar,.page-actions,.form-actions,.app-footer,.flash-stack,.confirmation-backdrop,.required-summary-backdrop { display: none !important; }
  .app-shell { padding: 0; }.main-content { padding: 0; }.card,.detail-hero { box-shadow: none; break-inside: avoid; }
}

/* v1.11.1 - explicit Required / Not Required Field ACL controls */
.acl-required-enabled { white-space: nowrap; }
.acl-required-guide { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.acl-required-guide > div { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: 0 4px 14px rgba(11,47,58,.04); }
.acl-required-guide > div > span:last-child { color: var(--muted); font-size: .82rem; line-height: 1.45; }
.acl-required-choice { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; min-width: 250px; margin: 0; padding: 0; border: 0; }
.acl-required-option { position: relative; display: block; cursor: pointer; }
.acl-required-option input { position: absolute; opacity: 0; pointer-events: none; }
.acl-required-option span { display: flex; align-items: center; justify-content: center; min-height: 38px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: .72rem; font-weight: 800; text-align: center; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.acl-required-option input:focus-visible + span { outline: 3px solid rgba(15,113,145,.22); outline-offset: 2px; }
.acl-required-option.optional-option input:checked + span { border-color: #8a9aa0; background: #f4f7f8; color: #33454c; box-shadow: inset 0 0 0 1px #8a9aa0; }
.acl-required-option.required-option input:checked + span { border-color: #b7791f; background: #fff8e6; color: #7a4a00; box-shadow: inset 0 0 0 1px #b7791f; }
.acl-required-choice:disabled { opacity: .48; }
.acl-required-choice:disabled .acl-required-option { cursor: not-allowed; }
.acl-requirement-state { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.acl-help { display: block; margin-top: 5px; color: var(--muted); font-size: .69rem; line-height: 1.4; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
@media (max-width: 980px) {
  .acl-required-guide { grid-template-columns: 1fr; }
  .acl-required-choice { min-width: 0; width: 100%; }
}
@media (max-width: 560px) {
  .acl-required-choice { grid-template-columns: 1fr; }
  .acl-required-guide > div { align-items: flex-start; flex-direction: column; }
}
html[dir="rtl"] .acl-requirement-state { align-items: flex-end; text-align: right; }

/* v1.12.0 - granular New OVR / Edit Draft Field ACL */
.acl-inherited-note { display: block; margin-top: 5px; color: var(--muted); font-size: .66rem; font-weight: 700; }
#ovr-report-form input[readonly],
#ovr-report-form textarea[readonly],
#ovr-report-form select:disabled,
#ovr-report-form input:disabled { background: #f3f6f7; color: #596a70; cursor: not-allowed; }
#ovr-report-form .required-choice-group > [data-classification-group] > label.required { margin-bottom: 7px; }
#ovr-report-form [aria-readonly="true"] { border-color: #cbd5d9; }
html[dir="rtl"] .acl-inherited-note { text-align: right; }

/* v1.13.0 - preview-first XLSX User Import */
.import-step-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.import-step { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 12px; align-items: start; padding: 16px; }
.import-step > span { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 900; }
.import-step strong { display: block; color: var(--navy); margin-bottom: 5px; }
.import-step small { display: block; color: var(--muted); line-height: 1.5; }
.import-reference-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; padding: 16px; background: #f7fafb; border-top: 1px solid var(--line); }
.import-reference-grid section { min-width: 0; }
.import-reference-grid h3 { margin: 0 0 9px; color: var(--navy); }
.import-reference-grid .span-reference { grid-column: 1 / -1; }
.import-summary-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.import-preview-table td { vertical-align: top; }
.import-error-list { margin: 7px 0 0; padding-inline-start: 18px; color: #991b1b; font-size: .78rem; line-height: 1.45; }
.import-confirm-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid var(--line); }
.import-confirm-panel p { margin: 5px 0 0; color: var(--muted); line-height: 1.45; }
.import-confirm-panel form { flex: none; }
.compact-table th, .compact-table td { padding-block: 8px; }
@media (max-width: 980px) {
  .import-step-grid { grid-template-columns: 1fr; }
  .import-reference-grid { grid-template-columns: 1fr; }
  .import-reference-grid .span-reference { grid-column: 1; }
}
@media (max-width: 700px) {
  .import-confirm-panel { align-items: stretch; flex-direction: column; }
  .import-confirm-panel form, .import-confirm-panel .button { width: 100%; }
}
html[dir="rtl"] .import-error-list { padding-inline-start: 0; padding-inline-end: 18px; }


/* v1.14.0 - workflow step responsibility assignment */
.workflow-assignment-scope .compact-form { align-items: end; }
.assignment-scope-badge { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px; min-height: 64px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: #f7fafb; }
.assignment-scope-badge small { color: var(--muted); }
.workflow-assignment-grid { display: grid; gap: 16px; }
.workflow-assignment-card { overflow: visible; }
.workflow-assignment-card .card-header > div { position: relative; padding-inline-start: 42px; }
.workflow-step-number { position: absolute; inset-inline-start: 0; top: 0; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 900; }
.assignment-effective { padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: #f7fafb; color: var(--muted); }
.assignment-effective strong { color: var(--navy); }
.sticky-form-actions { position: sticky; bottom: 12px; z-index: 5; display: flex; justify-content: flex-end; margin-top: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.95); box-shadow: 0 10px 30px rgba(1,17,22,.12); backdrop-filter: blur(8px); }
.workflow-owner-configured { display: inline-flex; align-items: center; gap: 6px; margin-top: 5px; color: var(--navy); font-weight: 800; }
@media (max-width: 820px) { .sticky-form-actions .button { width: 100%; } }
html[dir="rtl"] .assignment-scope-badge { align-items: flex-end; text-align: right; }

/* v1.15.0 conditional Other detail field */
.other-detail-input { background: #fff; color: #111; }
[data-classification-other][hidden], [data-action-assignment-user][hidden], [data-action-assignment-role][hidden] { display: none !important; }

/* v1.15.1 - aligned profile-locked Branch / Reporting Department fields */
#ovr-report-form .profile-locked-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-self: start;
}
#ovr-report-form .profile-locked-label {
  display: inline-flex;
  align-items: baseline;
  align-self: flex-start;
  gap: 3px;
  margin: 0;
  color: #344550;
  font-size: .78rem;
  font-weight: 750;
}
#ovr-report-form .profile-locked-label.required::after {
  content: "*";
  color: var(--danger);
}
#ovr-report-form .profile-locked-field > input[type="text"] {
  width: 100%;
  margin-top: 6px;
}
#ovr-report-form .profile-lock-note {
  display: block;
  margin-top: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.45;
}
#ovr-report-form .profile-lock-note::before {
  content: "🔒";
  margin-inline-end: 5px;
  font-size: .72rem;
}
html[dir="rtl"] #ovr-report-form .profile-locked-label {
  align-self: flex-end;
}
html[dir="rtl"] #ovr-report-form .profile-lock-note {
  text-align: right;
}

/* v1.18.1 - applicability gate for Other Involved Departments */
#ovr-report-form .other-involved-question {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 12px 20px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbfb;
}
#ovr-report-form .other-involved-question-copy { min-width: 0; }
#ovr-report-form .other-involved-question-label {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  margin: 0;
  color: var(--navy);
  font-size: .82rem;
  font-weight: 850;
}
#ovr-report-form .other-involved-question-label.required-indicator::after {
  content: "*";
  color: var(--danger);
}
#ovr-report-form .other-involved-question-label[data-conditional-required-active="1"]:not(.required-indicator)::after {
  content: "*";
  color: var(--danger);
}
#ovr-report-form .other-involved-question-copy small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: .72rem;
  line-height: 1.45;
}
#ovr-report-form .other-involved-choice-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(90px,1fr));
  gap: 8px;
}
#ovr-report-form .other-involved-choice-grid .choice {
  min-width: 90px;
  margin: 0;
  padding: 10px 14px;
  justify-content: center;
}
#ovr-report-form .other-involved-required-note {
  grid-column: 1 / -1;
  margin: 0;
}
#ovr-report-form .other-involved-panel[hidden] { display: none !important; }
#ovr-report-form .other-involved-panel {
  padding: 14px;
  border: 1px solid #c9e0e2;
  border-radius: 12px;
  background: #fbfefe;
}
@media (max-width: 760px) {
  #ovr-report-form .other-involved-question { grid-template-columns: 1fr; }
  #ovr-report-form .other-involved-choice-grid { width: 100%; }
  #ovr-report-form .other-involved-choice-grid .choice { width: 100%; }
}

/* v1.15.2 - dual-list Other Involved Departments selector */
#ovr-report-form .department-transfer-field {
  min-width: 0;
}
#ovr-report-form .department-transfer-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}
#ovr-report-form .department-transfer-heading > small {
  max-width: 620px;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: end;
}
#ovr-report-form .department-transfer-label {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  margin: 0;
  color: #344550;
  font-size: .78rem;
  font-weight: 800;
}
#ovr-report-form .department-transfer-label.required-indicator::after {
  content: "*";
  color: var(--danger);
}
#ovr-report-form .department-transfer {
  direction: ltr;
  display: grid;
  grid-template-columns: minmax(0,1fr) 62px minmax(0,1fr);
  gap: 12px;
  align-items: stretch;
}
#ovr-report-form .department-transfer-panel {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbfb;
}
#ovr-report-form .department-transfer-panel.selected-panel {
  border-color: #acd3d6;
  background: #f3fbfa;
}
#ovr-report-form .department-transfer-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
  padding: 0 2px 7px;
  color: var(--navy);
  font-size: .76rem;
  font-weight: 850;
}
#ovr-report-form .department-transfer-count {
  display: inline-grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  padding-inline: 7px;
  border-radius: 999px;
  background: #e4eef0;
  color: #36545d;
  font-size: .68rem;
  font-weight: 900;
}
#ovr-report-form .selected-panel .department-transfer-count {
  background: #d9f1ee;
  color: var(--teal-dark);
}
#ovr-report-form .department-transfer-panel select {
  width: 100%;
  min-height: 210px;
  margin-top: 0;
  padding: 5px;
  border-radius: 9px;
  background: #fff;
  line-height: 1.45;
}
#ovr-report-form .department-transfer-panel select option {
  min-height: 30px;
  padding: 6px 8px;
  border-radius: 5px;
}
#ovr-report-form .department-transfer-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 10px;
}
#ovr-report-form .department-transfer-button {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 44px;
  padding: 8px;
  border: 1px solid #9fc4c8;
  border-radius: 10px;
  background: #fff;
  color: var(--teal-dark);
  box-shadow: 0 3px 10px rgba(11,47,58,.06);
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
}
#ovr-report-form .department-transfer-button:hover:not(:disabled) {
  border-color: var(--teal);
  background: #eef9f8;
  color: var(--teal);
}
#ovr-report-form .department-transfer-note {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: .7rem;
  font-weight: 600;
  line-height: 1.4;
}
html[dir="rtl"] #ovr-report-form .department-transfer-heading > small,
html[dir="rtl"] #ovr-report-form .department-transfer-note {
  text-align: right;
}
html[dir="rtl"] #ovr-report-form .department-transfer-panel {
  direction: rtl;
  text-align: right;
}
@media (max-width: 760px) {
  #ovr-report-form .department-transfer-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
  #ovr-report-form .department-transfer-heading > small {
    max-width: none;
    text-align: start;
  }
  #ovr-report-form .department-transfer {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  #ovr-report-form .department-transfer-actions {
    flex-direction: row;
    justify-content: center;
  }
  #ovr-report-form .department-transfer-button {
    width: 54px;
    min-height: 42px;
  }
  #ovr-report-form .department-transfer-button span {
    display: inline-block;
    transform: rotate(90deg);
  }
  #ovr-report-form .department-transfer-panel select {
    min-height: 165px;
  }
}

/* v1.15.3 - What Is Being Reported responsive layout */
#ovr-report-form .report-type-field > label:first-child {
  margin-bottom: 8px;
}
#ovr-report-form .report-type-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
#ovr-report-form .report-type-choice {
  min-height: 46px;
  align-items: center;
  margin: 0;
  padding: 11px 13px;
}
#ovr-report-form .report-type-choice input {
  flex: none;
  margin: 0;
}
#ovr-report-form .report-type-choice span {
  min-width: 0;
  line-height: 1.3;
}
#ovr-report-form .report-assessment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
#ovr-report-form .report-assessment-field {
  min-width: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-self: stretch;
}
#ovr-report-form .report-assessment-label {
  display: block;
  margin-bottom: 0;
  color: #344550;
  font-size: .78rem;
  font-weight: 750;
}
#ovr-report-form .report-assessment-choice {
  min-height: 42px;
  align-items: center;
  margin: 6px 0 0;
  padding: 9px 11px;
}
#ovr-report-form .report-assessment-choice input {
  flex: none;
  margin: 0;
}
#ovr-report-form .report-assessment-field select {
  margin-top: 6px;
  width: 100%;
}
#ovr-report-form .report-assessment-field > .conditional-required-note {
  margin-top: 6px;
}
#ovr-report-form .medication-harm-field {
  align-self: start;
}
#ovr-report-form .injury-detail-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f8fbfb;
}
#ovr-report-form .injury-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
#ovr-report-form .injury-detail-grid label {
  min-width: 0;
}
html[dir="rtl"] #ovr-report-form .report-type-choice,
html[dir="rtl"] #ovr-report-form .report-assessment-choice {
  text-align: right;
}
@media (max-width: 1180px) {
  #ovr-report-form .report-type-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #ovr-report-form .report-assessment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  #ovr-report-form .report-type-grid,
  #ovr-report-form .report-assessment-grid,
  #ovr-report-form .injury-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* v1.15.5 user avatar manager and consistent avatar rendering. */
.avatar img, .user-table-avatar img, .avatar-preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.user-chip .avatar { overflow: hidden; border: 1px solid rgba(255,255,255,.18); }
.account-avatar-card { overflow: hidden; }
.avatar-manager { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 24px; align-items: center; }
.avatar-preview { overflow: hidden; border-radius: 50%; display: grid; place-items: center; background: #dff3f1; color: var(--navy); font-weight: 850; border: 1px solid #c7e5e2; box-shadow: 0 8px 24px rgba(11,47,58,.08); }
.avatar-preview-large { width: 120px; height: 120px; font-size: 2.2rem; }
.avatar-manager-controls { min-width: 0; display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; }
.avatar-upload-form { min-width: min(100%, 440px); flex: 1 1 420px; }
.avatar-upload-form label { display: block; margin: 0; }
.avatar-upload-form input[type="file"] { width: 100%; margin-top: 7px; padding: 9px; border: 1px dashed #a9c8cc; border-radius: 10px; background: #f8fbfb; }
.avatar-upload-form .button { margin-top: 10px; }
.field-help { margin: 7px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.45; }
.user-table-identity { min-width: 210px; max-width: 420px; display: flex; align-items: center; gap: 10px; }
.user-table-avatar { width: 38px; height: 38px; flex: 0 0 38px; overflow: hidden; border-radius: 50%; display: grid; place-items: center; background: #dff3f1; color: var(--navy); border: 1px solid #c7e5e2; font-size: .78rem; font-weight: 850; }
.user-table-meta { min-width: 0; display: block; }
.user-table-meta strong, .user-table-meta small { display: block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-table-meta strong { color: var(--navy); }
.user-table-meta small { margin-top: 2px; font-weight: 500; color: var(--muted); }
@media (max-width: 640px) {
  .avatar-manager { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .avatar-manager-controls { width: 100%; justify-content: center; text-align: start; }
  .avatar-upload-form { min-width: 0; width: 100%; flex-basis: 100%; }
}

/* v1.15.6 - user-controlled desktop sidebar visibility. */
@media (min-width: 1081px) {
  body.sidebar-hidden.app-shell { padding-left: 0; }
  body.sidebar-hidden .sidebar { transform: translateX(-105%); pointer-events: none; }
  body.sidebar-hidden .topbar { left: 0; }
  body.sidebar-hidden .menu-button { display: inline-grid; }
  html[dir="rtl"] body.sidebar-hidden.app-shell { padding-right: 0; }
  html[dir="rtl"] body.sidebar-hidden .sidebar { transform: translateX(105%); }
  html[dir="rtl"] body.sidebar-hidden .topbar { right: 0; }
}
@media (max-width: 1080px) {
  .sidebar-hide-button { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .app-shell, .sidebar, .topbar { transition: none; }
}


/* v1.15.8 - compact My Account Telegram bot QR identity. */
.account-channel-grid { grid-template-columns: minmax(300px, .72fr) minmax(0, 1.28fr); }
.telegram-setup-card { min-width: 0; overflow: hidden; }
.telegram-setup-header { gap: 16px; }
.telegram-setup-header p { margin-top: 4px; max-width: 620px; }
.telegram-status-wrap { flex: none; }
.telegram-connection-status { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent); }
.telegram-setup-body { display: grid; grid-template-columns: minmax(140px, 180px) minmax(0, 1fr); gap: 22px; align-items: start; }
.telegram-qr-panel { min-width: 0; text-align: center; }
.telegram-qr-image { display: block; width: auto; max-width: 180px; max-height: 205px; height: auto; margin: 0 auto; object-fit: contain; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(11,47,58,.08); }
.telegram-scan-hint { margin: 9px auto 0; max-width: 220px; color: var(--muted); font-size: .71rem; line-height: 1.45; }
.telegram-setup-content { min-width: 0; display: grid; align-content: start; gap: 14px; }
.telegram-bot-identity { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid #c9e3e1; border-radius: 11px; background: #f5fbfa; }
.telegram-bot-identity > div { min-width: 0; }
.telegram-bot-identity small, .telegram-bot-identity strong { display: block; }
.telegram-bot-identity small { color: var(--muted); font-size: .69rem; font-weight: 700; }
.telegram-bot-identity strong { margin-top: 2px; color: var(--navy); font-size: 1rem; overflow-wrap: anywhere; }
.telegram-action-row, .telegram-code-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.telegram-status-panel { padding: 13px 14px; border: 1px solid #b9ddd8; border-inline-start: 4px solid var(--success); border-radius: 10px; background: #f2faf8; }
.telegram-status-panel > strong { color: var(--navy); }
.telegram-status-panel p { margin: 5px 0 0; color: #4c626a; font-size: .78rem; line-height: 1.5; }
.telegram-setup-steps { padding: 13px 15px; border: 1px solid var(--line); border-radius: 11px; background: #f8fbfb; }
.telegram-setup-steps h3 { margin: 0 0 7px; color: var(--navy); font-size: .84rem; }
.telegram-setup-steps ol { margin: 0; padding-inline-start: 21px; color: #465c65; font-size: .76rem; line-height: 1.65; }
.telegram-link-code { align-items: flex-start; }
.telegram-link-code > code { display: block; width: 100%; margin-top: 5px; padding: 8px 10px; border: 1px dashed #a7c9cc; border-radius: 8px; background: #fff; color: var(--navy); overflow-wrap: anywhere; }
.telegram-code-actions { margin-top: 9px; }
.button.compact { min-height: 34px; padding: 7px 10px; font-size: .72rem; }
.button.copy-success { border-color: #9acfc5; background: #edf9f6; color: var(--success); }
html[dir="rtl"] .telegram-setup-steps ol { padding-inline-start: 0; padding-inline-end: 21px; }
@media (max-width: 1260px) {
  .account-channel-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .telegram-setup-body { grid-template-columns: 1fr; }
  .telegram-qr-image { max-width: 200px; max-height: 227px; }
  .telegram-bot-identity { align-items: stretch; flex-direction: column; }
  .telegram-bot-identity .button { width: 100%; }
  .telegram-action-row .button { flex: 1 1 100%; width: 100%; }
}

/* v1.15.9 - ACL-controlled submitted OVR record lock/edit/delete controls. */
.record-state-badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}
.status.record-locked {
  background: rgba(71, 85, 105, .12);
  border-color: rgba(71, 85, 105, .28);
  color: #334155;
}
.status.record-protected {
  background: rgba(14, 116, 144, .10);
  border-color: rgba(14, 116, 144, .24);
  color: #0f5f72;
}
.status.record-unlocked {
  background: rgba(217, 119, 6, .12);
  border-color: rgba(217, 119, 6, .28);
  color: #92400e;
}
.administrative-record-controls {
  border: 1px solid rgba(217, 119, 6, .24);
}
.administrative-record-controls .card-header {
  align-items: center;
}
.record-control-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}
.record-control-form textarea,
.danger-zone-body textarea {
  min-height: 86px;
}
.record-unlocked-warning {
  border: 1px solid rgba(217, 119, 6, .28);
  background: rgba(251, 191, 36, .10);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.record-control-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.record-control-actions form { margin: 0; }
.danger-zone-details {
  margin-top: 16px;
  border: 1px solid rgba(220, 38, 38, .28);
  border-radius: 12px;
  overflow: hidden;
}
.danger-zone-details > summary {
  cursor: pointer;
  font-weight: 700;
  color: #991b1b;
  padding: 12px 14px;
  background: rgba(254, 226, 226, .55);
}
.danger-zone-body {
  padding: 14px;
}
.administrative-edit-note {
  border-color: rgba(217, 119, 6, .28);
  background: rgba(251, 191, 36, .08);
}
@media (max-width: 720px) {
  .record-state-badges { justify-content: flex-start; }
  .record-control-actions { flex-direction: column; }
  .record-control-actions .button,
  .record-control-actions form,
  .record-control-actions form .button { width: 100%; }
}

/* v1.16.0 - professional secure multi-file OVR evidence uploader. */
.evidence-card { overflow: hidden; }
.evidence-card-header { align-items: center; gap: 16px; }
.evidence-heading { display: flex; align-items: center; gap: 12px; min-width: 0; }
.evidence-heading-icon { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 11px; background: #eaf7f5; color: var(--teal); border: 1px solid #c9e6e2; }
.evidence-heading-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.evidence-count { flex: none; padding: 6px 9px; border-radius: 999px; background: #eef5f6; color: var(--navy); border: 1px solid var(--line); font-size: .68rem; font-weight: 800; }
.evidence-header-badges { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.evidence-lock-badge { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 6px 9px; border-radius: 999px; border: 1px solid #f2c98d; background: #fff8e8; color: #8a4b08; font-size: .68rem; font-weight: 850; }
.evidence-card-body { display: grid; gap: 18px; }
.evidence-list { display: grid; gap: 9px; }
.evidence-file-card { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fbfdfd; transition: border-color .18s ease, box-shadow .18s ease; }
.evidence-file-card:hover { border-color: #a8cfd1; box-shadow: 0 5px 16px rgba(11,47,58,.06); }
.evidence-file-icon, .evidence-queue-icon { display: grid; place-items: center; border-radius: 9px; font-size: .59rem; font-weight: 900; letter-spacing: .03em; }
.evidence-file-icon { width: 44px; height: 44px; }
.evidence-file-icon.is-pdf, .evidence-queue-icon.is-pdf { color: #9f1239; background: #fff1f2; border: 1px solid #fecdd3; }
.evidence-file-icon.is-image, .evidence-queue-icon.is-image { color: #0f766e; background: #ecfdf5; border: 1px solid #a7f3d0; }
.evidence-file-info { min-width: 0; }
.evidence-file-name { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--navy); font-size: .82rem; font-weight: 800; }
.evidence-file-meta { display: flex; flex-wrap: wrap; gap: 5px 12px; margin-top: 5px; color: var(--muted); font-size: .68rem; }
.evidence-file-meta span { min-width: 0; }
.evidence-file-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.evidence-file-actions form { margin: 0; }
.evidence-empty { display: flex; align-items: center; gap: 12px; padding: 15px; border: 1px dashed #bdcfd2; border-radius: 11px; background: #f8fbfb; }
.evidence-empty-icon { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 50%; background: #e7f5f3; color: var(--teal); font-size: 1.25rem; font-weight: 500; }
.evidence-empty strong { display: block; color: var(--navy); font-size: .81rem; }
.evidence-empty p { margin: 3px 0 0; color: var(--muted); font-size: .73rem; line-height: 1.45; }
.evidence-empty.is-locked { border-color: #dfd5c3; background: #fffaf2; }
.evidence-empty.is-locked .evidence-empty-icon { border: 1px solid #efd09c; background: #fff; color: #8a4b08; font-size: .9rem; }
.evidence-lock-notice { display: flex; align-items: flex-start; gap: 12px; padding: 15px 16px; border: 1px solid #efd4a7; border-radius: 12px; background: linear-gradient(180deg,#fffaf0 0%,#fff7e7 100%); color: #5f4423; }
.evidence-lock-notice-icon { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 10px; border: 1px solid #efd09c; background: #fff; font-size: 1rem; }
.evidence-lock-notice strong { display: block; color: #704313; font-size: .82rem; }
.evidence-lock-notice p { margin: 4px 0 0; color: #7a6346; font-size: .72rem; line-height: 1.5; }
.evidence-upload-form { display: grid; gap: 14px; padding: 16px; border: 1px solid #c7dcde; border-radius: 13px; background: linear-gradient(180deg,#fbfefe 0%,#f5faf9 100%); }
.evidence-upload-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.evidence-upload-heading h3 { margin: 0; color: var(--navy); font-size: .9rem; }
.evidence-upload-heading p { margin: 4px 0 0; max-width: 760px; color: var(--muted); font-size: .73rem; line-height: 1.5; }
.evidence-security-badge { flex: none; padding: 6px 9px; border: 1px solid #b7ded7; border-radius: 999px; background: #edf9f6; color: #16675e; font-size: .65rem; font-weight: 800; }
.evidence-upload-actions { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: stretch; }
.evidence-file-input { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.evidence-dropzone { min-width: 0; min-height: 92px; margin: 0; display: flex; align-items: center; gap: 13px; padding: 15px 17px; border: 2px dashed #a9c9cc; border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.evidence-dropzone:hover, .evidence-dropzone:focus-visible, .evidence-dropzone.is-dragging { border-color: var(--teal); background: #f3fbfa; box-shadow: 0 0 0 3px rgba(15,107,120,.09); outline: none; }
.evidence-drop-icon { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 11px; background: var(--navy); color: #fff; font-size: 1.2rem; font-weight: 800; }
.evidence-drop-copy { min-width: 0; display: grid; gap: 3px; }
.evidence-drop-copy strong { color: var(--navy); font-size: .8rem; }
.evidence-drop-copy small { color: var(--muted); font-size: .7rem; font-weight: 600; }
.evidence-camera-zone { width: min(240px, 28vw); min-width: 190px; padding: 12px; border: 1px solid #c9dddf; border-radius: 12px; background: #fff; text-align: center; }
.evidence-camera-zone .button { width: 100%; min-height: 42px; }
.evidence-camera-zone small { display: block; margin-top: 7px; color: var(--muted); font-size: .66rem; line-height: 1.35; }
.evidence-camera-button span { margin-inline-end: 5px; }
.evidence-selection { display: grid; gap: 9px; padding: 12px; border: 1px solid #bcd8da; border-radius: 11px; background: #fff; }
.evidence-selection-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.evidence-selection-head strong { color: var(--navy); font-size: .78rem; }
.evidence-selection-head span { color: var(--muted); font-size: .68rem; font-weight: 800; }
.evidence-selection-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; margin: 0; padding: 0; list-style: none; }
.evidence-selection-list li { min-width: 0; display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid #e0e9ea; border-radius: 9px; background: #f9fbfb; }
.evidence-queue-icon { width: 34px; height: 34px; flex: 0 0 34px; }
.evidence-queue-copy { min-width: 0; display: block; }
.evidence-queue-copy strong, .evidence-queue-copy small { display: block; min-width: 0; }
.evidence-queue-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #344650; font-size: .7rem; }
.evidence-queue-copy small { margin-top: 2px; color: var(--muted); font-size: .64rem; }
.evidence-selection > .button { justify-self: start; }
.evidence-upload-message { padding: 9px 11px; border-radius: 8px; background: #eef8f7; color: #215e58; font-size: .72rem; }
.evidence-upload-message.is-error { border: 1px solid #fecaca; background: #fff1f2; color: #9f1239; }
.evidence-upload-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.evidence-storage-note { max-width: 680px; color: var(--muted); font-size: .69rem; line-height: 1.45; }
.evidence-storage-note strong { color: #40545c; }
.evidence-upload-footer .button { flex: none; min-width: 145px; }
html[dir="rtl"] .evidence-file-actions { justify-content: flex-start; }
@media (max-width: 820px) {
  .evidence-file-card { grid-template-columns: 40px minmax(0,1fr); }
  .evidence-file-icon { width: 40px; height: 40px; }
  .evidence-file-actions { grid-column: 1 / -1; justify-content: flex-start; padding-inline-start: 52px; }
  .evidence-upload-actions { grid-template-columns: 1fr; }
  .evidence-camera-zone { width: 100%; min-width: 0; }
  .evidence-selection-list { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .evidence-card-header, .evidence-upload-heading, .evidence-upload-footer { align-items: stretch; flex-direction: column; }
  .evidence-header-badges { justify-content: flex-start; }
  .evidence-count, .evidence-security-badge, .evidence-lock-badge { align-self: flex-start; }
  .evidence-file-actions { padding-inline-start: 0; }
  .evidence-file-actions .button, .evidence-file-actions form, .evidence-file-actions form .button { flex: 1 1 auto; }
  .evidence-upload-form { padding: 13px; }
  .evidence-dropzone { min-height: 88px; padding: 13px; }
  .evidence-drop-icon { width: 38px; height: 38px; flex-basis: 38px; }
  .evidence-upload-footer .button { width: 100%; }
}

/* v1.17.2 - multi-user / multi-role workflow responsibility assignment */
.workflow-assignment-mode-row { align-items: end; margin-bottom: 14px; }
.workflow-assignee-summary { min-height: 58px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: #f8fbfb; }
.workflow-assignee-summary small { color: var(--muted); }
.workflow-assignee-count { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; background: #e8f5f4; color: var(--teal-dark); font-size: .72rem; font-weight: 850; white-space: nowrap; }
.workflow-step1-note { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 10px 12px; align-items: start; margin-bottom: 15px; padding: 12px 14px; border: 1px solid #bfe1dd; border-radius: 12px; background: #f3fbfa; color: #36545c; font-size: .78rem; line-height: 1.5; }
.workflow-step1-note strong { color: var(--navy); white-space: nowrap; }
.workflow-step1-note code { padding: 1px 5px; border-radius: 5px; background: #e5f0f1; color: var(--navy); font-size: .73rem; }
.workflow-principal-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-bottom: 14px; }
.workflow-principal-grid[hidden] { display: none !important; }
.workflow-principal-picker { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.workflow-principal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 14px 10px; border-bottom: 1px solid var(--line); background: #f8fbfb; }
.workflow-principal-heading h3 { margin: 0; color: var(--navy); font-size: .86rem; }
.workflow-principal-heading p { margin: 3px 0 0; color: var(--muted); font-size: .7rem; line-height: 1.4; }
.workflow-principal-search { display: block; padding: 10px 12px; margin: 0; border-bottom: 1px solid var(--line); background: #fff; }
.workflow-principal-search input { width: 100%; min-height: 36px; padding: 7px 10px; font-size: .76rem; }
.workflow-principal-list { max-height: 270px; overflow: auto; overscroll-behavior: contain; padding: 6px; }
.workflow-principal-option { display: grid; grid-template-columns: 22px minmax(0,1fr); gap: 8px; align-items: start; margin: 0; padding: 9px 8px; border-radius: 9px; cursor: pointer; }
.workflow-principal-option:hover { background: #f2f8f8; }
.workflow-principal-option:has(input:checked) { background: #edf8f5; box-shadow: inset 0 0 0 1px #b9ddd2; }
.workflow-principal-option input { margin: 2px 0 0; }
.workflow-principal-option span { min-width: 0; }
.workflow-principal-option strong, .workflow-principal-option small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workflow-principal-option strong { color: var(--navy); font-size: .76rem; }
.workflow-principal-option small { margin-top: 2px; color: var(--muted); font-size: .66rem; font-weight: 600; }
.workflow-principal-option[hidden] { display: none !important; }
.workflow-principal-empty { padding: 16px; color: var(--muted); text-align: center; font-size: .76rem; }
html[dir="rtl"] .workflow-assignee-summary { justify-content: flex-start; }
@media (max-width: 900px) {
  .workflow-principal-grid { grid-template-columns: 1fr; }
  .workflow-assignee-summary { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .workflow-step1-note { grid-template-columns: 1fr; }
  .workflow-step1-note strong { white-space: normal; }
  .workflow-assignee-summary { align-items: flex-start; flex-direction: column; }
  .workflow-principal-list { max-height: 230px; }
}


/* v1.17.3 - professional Workflow Responsibility page */
.workflow-page-header { margin-bottom: 18px; }
.workflow-page-header > div:first-child { max-width: 880px; }
.workflow-page-kicker { display: inline-flex; margin-bottom: 7px; color: var(--teal-dark); font-size: .66rem; font-weight: 900; letter-spacing: .08em; }
.workflow-page-header h1 { margin-bottom: 6px; }
.workflow-page-header p { max-width: 820px; line-height: 1.55; }
.workflow-scope-card { overflow: visible; }
.workflow-scope-grid { display: grid; grid-template-columns: minmax(300px, 1.05fr) minmax(300px, .95fr); gap: 18px; align-items: stretch; }
.workflow-scope-select { margin: 0; align-self: center; }
.workflow-scope-select select { margin-top: 7px; }
.workflow-scope-select > small { display: block; margin-top: 7px; color: var(--muted); font-size: .7rem; line-height: 1.45; }
.workflow-scope-preview { min-width: 0; display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid #d5e5e7; border-radius: 13px; background: linear-gradient(135deg,#f8fcfc 0%,#f2f8f8 100%); }
.workflow-scope-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--navy); color: #fff; font-weight: 900; box-shadow: 0 6px 16px rgba(11,47,58,.12); }
.workflow-scope-preview div { min-width: 0; }
.workflow-scope-preview small, .workflow-scope-preview strong { display: block; }
.workflow-scope-preview small { color: var(--muted); font-size: .65rem; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.workflow-scope-preview strong { margin-top: 3px; color: var(--navy); font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workflow-scope-preview p { margin: 5px 0 0; color: var(--muted); font-size: .7rem; line-height: 1.4; }
.workflow-alert { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 12px; align-items: start; padding: 14px 16px; border-radius: 13px; border: 1px solid var(--line); }
.workflow-alert-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; font-weight: 950; }
.workflow-alert strong { display: block; color: var(--navy); font-size: .8rem; }
.workflow-alert p { margin: 4px 0 0; color: #52636c; font-size: .74rem; line-height: 1.55; }
.workflow-alert code { padding: 1px 5px; border-radius: 5px; background: rgba(255,255,255,.65); color: var(--navy); }
.workflow-alert-security { border-color: #bfe1d5; background: #f3fbf7; }
.workflow-alert-security .workflow-alert-icon { background: #dff4ea; color: #216b4c; }
.workflow-alert-warning { border-color: #ecd8a6; background: #fffaf0; }
.workflow-alert-warning .workflow-alert-icon { background: #f8e9bc; color: #80580c; }
.workflow-editor-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; padding: 4px 2px; }
.workflow-editor-toolbar strong, .workflow-editor-toolbar small { display: block; }
.workflow-editor-toolbar strong { color: var(--navy); font-size: .9rem; }
.workflow-editor-toolbar small { margin-top: 3px; color: var(--muted); font-size: .7rem; }
.workflow-editor-toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; flex: none; }
.workflow-assignment-grid { gap: 12px; }
details.workflow-assignment-accordion { overflow: hidden; border: 1px solid #d9e5e7; border-radius: 15px; background: #fff; box-shadow: 0 6px 18px rgba(11,47,58,.04); transition: border-color .16s ease, box-shadow .16s ease; }
details.workflow-assignment-accordion[open] { border-color: #b9d8dc; box-shadow: 0 10px 26px rgba(11,47,58,.08); }
.workflow-assignment-summary { position: relative; display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 14px; align-items: center; min-height: 82px; padding: 14px 16px; cursor: pointer; list-style: none; background: linear-gradient(180deg,#fff 0%,#fbfdfd 100%); }
.workflow-assignment-summary::-webkit-details-marker { display: none; }
.workflow-assignment-summary::marker { display: none; content: ""; }
details.workflow-assignment-accordion[open] > .workflow-assignment-summary { border-bottom: 1px solid #dde9ea; background: #f8fbfb; }
.workflow-assignment-summary:hover { background: #f7fbfb; }
.workflow-assignment-summary:focus-visible { outline: 3px solid rgba(24,146,149,.20); outline-offset: -3px; }
.workflow-assignment-summary .workflow-step-number { position: static; inset: auto; width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 5px 12px rgba(11,47,58,.12); }
.workflow-assignment-summary-copy { min-width: 0; }
.workflow-assignment-title-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; min-width: 0; }
.workflow-assignment-title-row h2 { margin: 0; color: var(--navy); font-size: .94rem; line-height: 1.3; }
.workflow-assignment-summary-copy > p { margin: 4px 0 0; max-width: 760px; color: var(--muted); font-size: .7rem; line-height: 1.4; }
.workflow-config-badge { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 999px; background: #edf2f4; color: #61717a; font-size: .59rem; font-weight: 850; text-transform: uppercase; letter-spacing: .025em; }
.workflow-config-badge.is-configured { background: #e6f6f0; color: #277154; }
.workflow-config-badge.is-inherited { background: #fff4df; color: #8a5c14; }
.workflow-summary-effective { margin-top: 6px; color: #465d67; font-size: .67rem; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workflow-summary-effective strong { color: var(--teal-dark); }
.workflow-assignment-summary-meta { display: grid; grid-template-columns: auto auto 22px; gap: 7px; align-items: center; justify-items: end; }
.workflow-permission-badge { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size: .62rem; }
.workflow-assignment-summary .workflow-assignee-count { background: #eef6f7; color: #46636b; }
.workflow-summary-chevron { display: grid; place-items: center; width: 22px; height: 22px; color: var(--muted); font-size: 1rem; transform: rotate(0deg); transition: transform .16s ease; }
details.workflow-assignment-accordion[open] .workflow-summary-chevron { transform: rotate(180deg); }
.workflow-assignment-editor { padding: 18px; background: #fff; }
.workflow-assignment-mode-panel { display: grid; grid-template-columns: minmax(260px,.8fr) minmax(320px,1.2fr); gap: 16px; align-items: end; margin-bottom: 16px; }
.workflow-assignment-mode-panel > label { margin: 0; }
.workflow-assignment-mode-panel select { margin-top: 6px; }
.workflow-assignee-summary { min-height: 58px; justify-content: space-between; padding: 10px 13px; background: #f7fafb; }
.workflow-assignee-summary > div { min-width: 0; }
.workflow-assignee-summary strong, .workflow-assignee-summary small { display: block; }
.workflow-assignee-summary strong { color: var(--navy); font-size: .78rem; }
.workflow-assignee-summary small { margin-top: 2px; font-size: .66rem; }
.workflow-mode-hint { flex: none; display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #edf3f4; color: #586b73; font-size: .62rem; font-weight: 800; white-space: nowrap; }
.workflow-step1-note { grid-template-columns: 34px minmax(0,1fr); align-items: start; }
.workflow-step1-note > div { min-width: 0; }
.workflow-step1-note strong, .workflow-step1-note span { display: block; }
.workflow-step1-note strong { margin-bottom: 3px; white-space: normal; }
.workflow-step1-icon { display: grid !important; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #dff3f1; color: var(--teal-dark); font-size: 1rem; font-weight: 900; }
.workflow-principal-grid { gap: 14px; margin-bottom: 16px; }
.workflow-principal-picker { border-radius: 12px; border-color: #d9e6e8; box-shadow: 0 4px 12px rgba(11,47,58,.025); }
.workflow-principal-heading { min-height: 64px; align-items: center; }
.workflow-principal-heading h3 { font-size: .82rem; }
.workflow-principal-list { max-height: 240px; scrollbar-gutter: stable; }
.workflow-principal-option { min-height: 48px; align-items: center; }
.workflow-principal-option input { margin-top: 0; }
.assignment-effective { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 10px; align-items: center; padding: 11px 13px; background: #f7fbfb; }
.assignment-effective-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #e6f2f2; color: var(--teal-dark); font-weight: 900; }
.assignment-effective > div { min-width: 0; }
.assignment-effective strong, .assignment-effective span { display: block; }
.assignment-effective strong { margin-bottom: 2px; font-size: .72rem; }
.assignment-effective span { color: var(--muted); font-size: .7rem; line-height: 1.4; }
.workflow-save-bar { align-items: center; justify-content: space-between; gap: 16px; }
.workflow-save-bar > div { min-width: 0; }
.workflow-save-bar strong, .workflow-save-bar small { display: block; }
.workflow-save-bar strong { color: var(--navy); font-size: .78rem; }
.workflow-save-bar small { margin-top: 2px; color: var(--muted); font-size: .66rem; }
.workflow-save-bar .button { flex: none; min-width: 190px; }
html[dir="rtl"] .workflow-assignment-summary-meta { justify-items: start; }
html[dir="rtl"] .workflow-summary-effective { text-align: right; }
@media (max-width: 1020px) {
  .workflow-scope-grid { grid-template-columns: 1fr; }
  .workflow-assignment-summary { grid-template-columns: 38px minmax(0,1fr); }
  .workflow-assignment-summary-meta { grid-column: 2; grid-template-columns: repeat(3,auto); justify-content: start; justify-items: start; }
  .workflow-assignment-mode-panel { grid-template-columns: 1fr; align-items: stretch; }
  .workflow-assignee-summary { justify-content: space-between; }
}
@media (max-width: 720px) {
  .workflow-editor-toolbar { align-items: stretch; flex-direction: column; }
  .workflow-editor-toolbar-actions { width: 100%; }
  .workflow-editor-toolbar-actions .button { flex: 1 1 0; }
  .workflow-assignment-summary { grid-template-columns: 34px minmax(0,1fr); gap: 10px; min-height: 0; padding: 13px; }
  .workflow-assignment-summary .workflow-step-number { width: 30px; height: 30px; }
  .workflow-assignment-summary-copy > p { display: none; }
  .workflow-summary-effective { white-space: normal; }
  .workflow-assignment-summary-meta { gap: 5px; }
  .workflow-permission-badge { max-width: 145px; }
  .workflow-assignment-editor { padding: 14px; }
  .workflow-principal-grid { grid-template-columns: 1fr; }
  .workflow-principal-list { max-height: 210px; }
  .workflow-save-bar { align-items: stretch; flex-direction: column; bottom: 8px; }
  .workflow-save-bar .button { width: 100%; min-width: 0; }
}
@media (max-width: 500px) {
  .workflow-assignment-summary-meta { grid-template-columns: 1fr auto; width: 100%; }
  .workflow-permission-badge { display: none; }
  .workflow-summary-chevron { grid-column: 2; grid-row: 1; }
  .workflow-assignee-count { justify-self: start; }
  .workflow-scope-preview { grid-template-columns: 36px minmax(0,1fr); padding: 12px; }
  .workflow-scope-icon { width: 34px; height: 34px; }
  .workflow-alert { grid-template-columns: 32px minmax(0,1fr); padding: 12px; }
  .workflow-alert-icon { width: 30px; height: 30px; }
}

/* v1.17.4 bilingual user identity */
.user-table-arabic-name { display: block; margin-top: 2px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--teal-dark); font-size: .78rem; font-weight: 700; text-align: start; }
html[dir="rtl"] .user-table-arabic-name { text-align: right; }

/* v1.17.5 - All-Branch Department administration */
.department-scope-choice { align-self: end; padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; background: #f8fbfb; }
.department-scope-choice .choice { margin: 0; font-weight: 800; color: var(--navy); }
.department-scope-choice .field-help { display: block; margin-top: 7px; }

/* v1.18.0 - system-level Conditional Required Field Rules */
.conditional-rules-page-header > div:first-child { max-width: 920px; }
.conditional-rules-guide { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
.conditional-rules-guide > div { min-width: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #f8fbfb; }
.conditional-rules-guide strong, .conditional-rules-guide span { display: block; }
.conditional-rules-guide strong { color: var(--navy); font-size: .8rem; }
.conditional-rules-guide span { margin-top: 4px; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.conditional-rule-editor { overflow: visible; }
.conditional-rule-grid { display: grid; grid-template-columns: repeat(12,minmax(0,1fr)); gap: 16px; }
.conditional-targets-block { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdfd; }
.conditional-targets-heading { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; }
.conditional-targets-heading strong { color: var(--navy); font-size: .86rem; }
.conditional-targets-heading p { margin: 4px 0 0; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.conditional-target-groups { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 14px; }
.conditional-target-group { min-width: 0; margin: 0; padding: 12px; border: 1px solid #dbe7e9; border-radius: 10px; background: #fff; }
.conditional-target-group legend { padding-inline: 6px; color: var(--teal-dark); font-size: .72rem; font-weight: 850; }
.conditional-target-options { display: grid; gap: 7px; }
.conditional-target-option { min-width: 0; display: flex; align-items: flex-start; gap: 9px; padding: 9px 10px; border: 1px solid #e2ebed; border-radius: 9px; background: #fbfdfd; cursor: pointer; }
.conditional-target-option:hover { border-color: #b8d7da; background: #f5fbfb; }
.conditional-target-option input { flex: none; margin-top: 2px; }
.conditional-target-option span { min-width: 0; }
.conditional-target-option strong, .conditional-target-option small { display: block; overflow-wrap: anywhere; }
.conditional-target-option strong { color: var(--navy); font-size: .76rem; }
.conditional-target-option small { margin-top: 2px; color: var(--muted); font-size: .62rem; }
.conditional-rule-active { padding: 12px 14px; border: 1px solid #cfe3df; border-radius: 10px; background: #f3fbf8; }
.conditional-rule-list { display: grid; gap: 12px; }
.conditional-rule-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.conditional-rule-card.is-disabled { background: #f7f9fa; opacity: .78; }
.conditional-rule-card-main { min-width: 0; }
.conditional-rule-card-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.conditional-rule-card-title h3 { margin: 0; color: var(--navy); font-size: .9rem; }
.conditional-rule-flow { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 12px; align-items: center; margin-top: 12px; }
.conditional-rule-flow > div { min-width: 0; padding: 11px 12px; border: 1px solid #e1ebed; border-radius: 10px; background: #f9fcfc; }
.conditional-rule-flow span, .conditional-rule-flow strong, .conditional-rule-flow small { display: block; }
.conditional-rule-flow > div > span { color: var(--teal-dark); font-size: .6rem; font-weight: 900; letter-spacing: .08em; }
.conditional-rule-flow strong { margin-top: 3px; color: var(--navy); font-size: .78rem; }
.conditional-rule-flow small { margin-top: 2px; color: var(--muted); font-size: .68rem; line-height: 1.4; overflow-wrap: anywhere; }
.conditional-rule-arrow { color: var(--teal); font-size: 1.25rem; font-weight: 900; }
.conditional-rule-target-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.conditional-rule-target-chips span { padding: 4px 8px; border-radius: 999px; background: #eaf6f5; color: #315c62; font-size: .64rem; font-weight: 750; }
.conditional-rule-card-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.conditional-rule-card-actions form { margin: 0; }
#ovr-report-form [data-conditional-required-active="1"] { position: relative; }
#ovr-report-form label[data-conditional-required-active="1"] { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 3px; }
#ovr-report-form label[data-conditional-required-active="1"]:not(.required)::after { content: "*"; order: 1; flex: none; color: var(--danger); }
#ovr-report-form label[data-conditional-required-active="1"] > input,
#ovr-report-form label[data-conditional-required-active="1"] > select,
#ovr-report-form label[data-conditional-required-active="1"] > textarea { order: 2; flex: 1 0 100%; }
#ovr-report-form .conditional-required-note { order: 3; flex: 1 0 100%; display: block; width: 100%; margin-top: 5px; color: #8a5410; font-size: .66rem; font-weight: 700; }
#ovr-report-form .department-transfer-label[data-conditional-required-active="1"]:not(.required-indicator)::after { content: "*"; margin-inline-start: 3px; color: var(--danger); }
@media (max-width: 900px) {
  .conditional-rules-guide, .conditional-target-groups { grid-template-columns: 1fr; }
  .conditional-rule-card { grid-template-columns: 1fr; align-items: stretch; }
  .conditional-rule-card-actions { justify-content: flex-start; }
}
@media (max-width: 640px) {
  .conditional-rule-grid { grid-template-columns: 1fr; }
  .conditional-rule-grid .span-12, .conditional-rule-grid .span-6 { grid-column: 1; }
  .conditional-targets-heading { flex-direction: column; }
  .conditional-rule-flow { grid-template-columns: 1fr; }
  .conditional-rule-arrow { transform: rotate(90deg); justify-self: center; }
  .conditional-rule-card-actions .button { width: 100%; }
  .conditional-rule-card-actions form { width: 100%; }
}
html[dir="rtl"] .conditional-rule-arrow { transform: scaleX(-1); }
@media (max-width: 640px) { html[dir="rtl"] .conditional-rule-arrow { transform: rotate(-90deg); } }

/* v1.18.2 bilingual Branch/Department master-data display */
.bilingual-arabic-line { display: block; margin-top: 3px; color: var(--teal-dark); font-size: .78rem; font-weight: 650; text-align: start; }
html[dir="rtl"] .bilingual-arabic-line { text-align: right; }

/* v1.18.4 - branch list name/address line separation */
.branch-table-identity { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.branch-table-name { display: block; max-width: 100%; color: var(--navy); line-height: 1.35; }
.branch-table-address { display: block; max-width: 100%; color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; }
html[dir="rtl"] .branch-table-identity { align-items: flex-end; text-align: right; }
html[dir="ltr"] .branch-table-identity { align-items: flex-start; text-align: left; }

/* v1.18.7 / v1.21.1 Department Leadership & Coverage */
.leadership-page-header > div:first-child { max-width: 920px; }
.leadership-routing-card { border-inline-start: 4px solid var(--teal); }
.leadership-save-inline { align-items: end; justify-content: flex-end; }

/* Dedicated field wrappers keep labels, required markers, controls and help
   text aligned without inheriting the generic required-label flex ordering. */
.leadership-assignment-form { align-items: start; column-gap: 18px; row-gap: 18px; }
.leadership-assignment-form .leadership-field { min-width: 0; margin: 0; align-self: start; }
.leadership-assignment-form .leadership-field-label {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  min-height: 19px;
  margin: 0;
  color: #344550;
  font-size: .78rem;
  font-weight: 750;
  line-height: 1.45;
}
.leadership-assignment-form .leadership-field-label.required-indicator::after {
  content: "*";
  color: var(--danger);
  font-weight: 850;
}
.leadership-assignment-form .leadership-field > input,
.leadership-assignment-form .leadership-field > select,
.leadership-assignment-form .leadership-field > textarea { margin-top: 6px; }
.leadership-assignment-form .leadership-field > .field-help { display: block; margin: 7px 0 0; min-height: 0; }
.leadership-manager-field { grid-column: span 6; }
.leadership-type-field { grid-column: span 3; }
.leadership-priority-field { grid-column: span 3; }
.leadership-effective-from,
.leadership-effective-until { grid-column: span 6; }
.leadership-shift-start,
.leadership-shift-end { grid-column: span 3; }
.leadership-weekdays-field { grid-column: span 6; }
.leadership-notes-field,
.leadership-active-field,
.leadership-form-actions { grid-column: 1 / -1; }
.leadership-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(62px, 1fr));
  gap: 7px;
  margin-top: 6px;
}
.leadership-weekdays .choice {
  min-width: 0;
  min-height: 42px;
  margin: 0;
  padding: 9px 10px;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.leadership-weekdays .choice input { flex: none; margin: 0; }
.leadership-weekdays .choice span { line-height: 1; }
.leadership-active-field { padding-top: 1px; }
.leadership-active-choice { width: fit-content; min-width: 190px; margin: 0; align-items: center; }
.leadership-active-choice input { flex: none; margin: 0; }
.leadership-form-actions { padding-top: 2px; }
.table-subline { display: block; margin-top: 4px; color: var(--muted); line-height: 1.35; }
.manager-claim-card { border-inline-start: 5px solid var(--teal); background: #fbfefe; }
html[dir="rtl"] .leadership-assignment-form .leadership-field-label { text-align: right; }
@media (max-width: 1180px) {
  .leadership-weekdays { grid-template-columns: repeat(4, minmax(62px, 1fr)); }
}
@media (max-width: 980px) {
  .leadership-manager-field { grid-column: 1 / -1; }
  .leadership-type-field,
  .leadership-priority-field,
  .leadership-effective-from,
  .leadership-effective-until,
  .leadership-shift-start,
  .leadership-shift-end { grid-column: span 6; }
  .leadership-weekdays-field { grid-column: 1 / -1; }
  .leadership-weekdays { grid-template-columns: repeat(7, minmax(58px, 1fr)); }
}
@media (max-width: 820px) {
  .leadership-assignment-form .leadership-field,
  .leadership-active-field,
  .leadership-form-actions { grid-column: 1; }
  .leadership-weekdays { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .leadership-save-inline .button { width: 100%; }
}
@media (max-width: 520px) {
  .leadership-weekdays { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .leadership-active-choice { width: 100%; min-width: 0; }
  .leadership-form-actions .button { width: 100%; }
}

/* v1.20.0 - Automated Backup Center */
.backup-page-header > div:first-child { max-width: 900px; }
.backup-status-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.backup-status-card { display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 13px; align-items: center; padding: 16px; }
.backup-status-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #eaf6f5; color: var(--teal-dark); font-size: 1.15rem; font-weight: 900; }
.backup-status-card small, .backup-status-card strong, .backup-status-card span { display: block; }
.backup-status-card small { color: var(--muted); font-size: .62rem; font-weight: 850; text-transform: uppercase; letter-spacing: .07em; }
.backup-status-card strong { margin-top: 3px; color: var(--navy); font-size: .9rem; }
.backup-status-card span { margin-top: 3px; color: var(--muted); font-size: .68rem; line-height: 1.4; }
.backup-security-panel { display: grid; grid-template-columns: minmax(260px,.8fr) minmax(300px,1.2fr); gap: 14px; padding: 16px; border: 1px solid #cfe1e3; border-radius: 13px; background: #f7fbfb; }
.backup-security-panel > .choice:last-child { grid-column: 1 / -1; }
.backup-security-panel .choice { margin: 0; padding: 12px; border: 1px solid #dbe7e9; border-radius: 10px; background: #fff; align-items: flex-start; }
.backup-security-panel .choice span strong, .backup-security-panel .choice span small { display: block; }
.backup-security-panel .choice span small { margin-top: 4px; color: var(--muted); font-size: .68rem; font-weight: 500; line-height: 1.45; }
.backup-destination-stack { display: grid; gap: 10px; }
.backup-destination { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.backup-destination[open] { border-color: #bcd9dc; box-shadow: 0 7px 20px rgba(11,47,58,.05); }
.backup-destination summary { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 15px 16px; cursor: pointer; list-style: none; background: #fbfdfd; }
.backup-destination summary::-webkit-details-marker { display: none; }
.backup-destination summary > span:first-child { min-width: 0; }
.backup-destination summary strong, .backup-destination summary small { display: block; }
.backup-destination summary strong { color: var(--navy); font-size: .85rem; }
.backup-destination summary small { margin-top: 3px; color: var(--muted); font-size: .68rem; line-height: 1.4; }
.backup-destination-body { padding: 16px; border-top: 1px solid var(--line); }
.backup-inline-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.switch-inline { display: flex !important; align-items: center; gap: 8px; min-height: 42px; padding: 10px 12px; border: 1px solid #dbe7e9; border-radius: 10px; background: #f9fcfc; color: var(--navy); font-weight: 800; }
.switch-inline input { width: auto; margin: 0; }
.status-pill.success { background: #eaf7ef; color: #27623f; }
.status-pill.warning { background: #fff4df; color: #87520c; }
.status-pill.danger { background: #fdebec; color: #9c2931; }
.backup-cron-grid { display: grid; gap: 12px; }
.backup-cron-grid > div { min-width: 0; display: grid; gap: 6px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: #f8fbfb; }
.backup-cron-grid small { color: var(--teal-dark); font-size: .65rem; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; }
.backup-cron-grid code { display: block; overflow-x: auto; padding: 10px; border-radius: 8px; background: #102f38; color: #eefafa; font-size: .72rem; white-space: nowrap; }
.backup-history-table { min-width: 1100px; }
.backup-error { max-width: 260px; color: var(--danger); white-space: normal; overflow-wrap: anywhere; }
.backup-destination-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.backup-destination-chips span { padding: 4px 7px; border-radius: 999px; font-size: .61rem; font-weight: 850; }
.backup-destination-chips .ok { background: #e9f7ef; color: #21613b; }
.backup-destination-chips .fail { background: #fdebec; color: #9d2932; }
.backup-checksum { font-size: .66rem; }
.backup-row-actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; min-width: 220px; }
.backup-delete-form { display: flex; gap: 5px; align-items: center; margin: 0; }
.backup-delete-form input { width: 128px; min-width: 0; padding: 7px 8px; font-size: .64rem; }
@media (max-width: 900px) {
  .backup-status-grid { grid-template-columns: 1fr; }
  .backup-security-panel { grid-template-columns: 1fr; }
  .backup-security-panel > .choice:last-child { grid-column: 1; }
}
@media (max-width: 640px) {
  .backup-page-header form, .backup-page-header .button { width: 100%; }
  .backup-destination summary { align-items: flex-start; }
  .backup-inline-actions { align-items: stretch; }
  .backup-inline-actions .button { width: 100%; }
}
.backup-notification-options { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.backup-notification-options .choice { margin: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfd; align-items: flex-start; }
.backup-notification-options .choice span strong, .backup-notification-options .choice span small { display: block; }
.backup-notification-options .choice span small { margin-top: 3px; color: var(--muted); font-size: .66rem; font-weight: 500; line-height: 1.4; }
@media (max-width: 700px) { .backup-notification-options { grid-template-columns: 1fr; } }


/* v1.22.1 - Backup Center provider form polish */
.backup-provider-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px 16px;
  align-items: start;
}
.backup-col-12 { grid-column: span 12; }
.backup-col-9 { grid-column: span 9; }
.backup-col-7 { grid-column: span 7; }
.backup-col-6 { grid-column: span 6; }
.backup-col-4 { grid-column: span 4; }
.backup-col-3 { grid-column: span 3; }
.backup-col-2 { grid-column: span 2; }
.backup-field,
.backup-enable-card,
.backup-provider-grid > * { min-width: 0; }
.backup-field {
  display: flex;
  flex-direction: column;
  margin: 0;
  color: #2f414b;
  font-size: .79rem;
  font-weight: 800;
}
.backup-field-label {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 10px;
  min-height: 20px;
  color: var(--navy);
}
.backup-field-label small {
  color: var(--muted);
  font-size: .66rem;
  font-weight: 650;
  line-height: 1.35;
}
.backup-field > input,
.backup-field > select,
.backup-field > textarea {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  margin-top: 7px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff;
}
.backup-field > input::placeholder { color: #82939a; opacity: .86; }
.backup-field-help {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: .67rem;
  font-weight: 550;
  line-height: 1.45;
}
.backup-enable-card {
  display: flex !important;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  min-height: 84px;
  margin: 0;
  padding: 14px 15px;
  border: 1px solid #d7e5e7;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfefe 0%, #f7fbfb 100%);
  color: var(--navy);
  cursor: pointer;
}
.backup-enable-card:hover { border-color: #a8cfd4; background: #f5fbfb; }
.backup-enable-card input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--teal);
}
.backup-enable-card span { min-width: 0; display: grid; gap: 3px; }
.backup-enable-card strong { color: var(--navy); font-size: .8rem; }
.backup-enable-card small { color: var(--muted); font-size: .66rem; font-weight: 550; line-height: 1.4; }
.backup-destination-body.backup-provider-grid {
  padding: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fcfefe 100%);
}
.backup-destination summary {
  min-height: 72px;
  padding: 16px 20px;
}
.backup-destination summary strong { font-size: .9rem; }
.backup-destination summary small { max-width: 920px; font-size: .7rem; }
.backup-destination summary .status-pill { flex: none; }
.backup-connection-note {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 13px 14px;
}
.backup-connection-note code {
  display: block;
  width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  background: #edf4f5;
  color: #24424a;
  font-size: .7rem;
  font-weight: 650;
  overflow-x: auto;
  white-space: nowrap;
}
.backup-inline-actions {
  padding-top: 14px;
  border-top: 1px solid #e5eeee;
}
.backup-inline-actions .button { min-width: 150px; }

@media (max-width: 1100px) {
  .backup-col-9, .backup-col-7, .backup-col-6, .backup-col-5, .backup-col-4, .backup-col-3 { grid-column: span 6; }
  .backup-col-2 { grid-column: span 3; }
  .backup-enable-card { min-height: 80px; }
}
@media (max-width: 820px) {
  .backup-provider-grid { grid-template-columns: 1fr; gap: 14px; }
  .backup-col-12, .backup-col-9, .backup-col-7, .backup-col-6, .backup-col-5, .backup-col-4, .backup-col-3, .backup-col-2 { grid-column: 1 !important; }
  .backup-enable-card { min-height: 0; }
  .backup-destination-body.backup-provider-grid { padding: 16px; }
  .backup-inline-actions .button { flex: 1 1 180px; }
}
@media (max-width: 520px) {
  .backup-destination summary { min-height: 0; padding: 14px; flex-direction: column; align-items: flex-start; }
  .backup-destination summary .status-pill { align-self: flex-start; }
  .backup-destination-body.backup-provider-grid { padding: 14px; }
  .backup-field-label { display: block; }
  .backup-field-label small { display: block; margin-top: 3px; }
  .backup-inline-actions { display: grid; grid-template-columns: 1fr; }
  .backup-inline-actions .button { width: 100%; min-width: 0; }
}
html[dir="rtl"] .backup-field,
html[dir="rtl"] .backup-field-label,
html[dir="rtl"] .backup-enable-card { text-align: right; }
html[dir="rtl"] .backup-connection-note code { direction: ltr; text-align: left; }

/* v1.21.0 - Advanced Notification Rules Center */
.notification-rule-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.notification-rule-stat { padding:18px 20px; display:grid; gap:4px; }
.notification-rule-stat small { color:var(--muted); font-weight:700; text-transform:uppercase; letter-spacing:.04em; }
.notification-rule-stat strong { color:var(--navy); font-size:1.65rem; line-height:1.1; }
.notification-rule-stat span { color:var(--muted); font-size:.78rem; }
.notification-rule-filter { align-items:end; }
.notification-rule-table td:first-child { min-width:290px; }
.channels-cell { min-width: 180px; }
.channel-badge-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.status-pill { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 30px; padding: 5px 11px; border-radius: 999px; border: 1px solid #d9e3e8; background: #f7fafb; color: #35505a; font-size: .74rem; font-weight: 750; line-height: 1.2; white-space: nowrap; vertical-align: middle; }
.channel-pill { background: #eef6f8; border-color: #d8eaef; color: #1f5e6f; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.notification-rule-table td.channels-cell, .data-table td.channels-cell { white-space: normal; }
.table-subtext { display:block; margin-top:4px; color:var(--muted); line-height:1.45; }
.notification-recipient-summary { display:block; max-width:310px; line-height:1.45; color:#405760; }
.notification-severity { font-weight:800; letter-spacing:.025em; }
.notification-severity.severity-info { background:#edf5f7; color:#345861; }
.notification-severity.severity-notice { background:#eef4fb; color:#31577a; }
.notification-severity.severity-warning { background:#fff7e8; color:#7f5a13; }
.notification-severity.severity-critical { background:#fff0f0; color:#8d2f2f; }
.notification-title-badges { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.notification-channel-panel { border:1px solid var(--line); border-radius:12px; padding:14px 16px; background:#f8fbfb; }
.notification-channel-panel > strong { display:block; margin-bottom:9px; color:var(--navy); }
.notification-channel-choices { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.notification-channel-choices.compact { display:flex; flex-wrap:wrap; gap:16px; padding-top:8px; }
.notification-channel-choices.compact label { display:flex; align-items:center; gap:6px; font-size:.8rem; font-weight:700; }
.notification-recipient-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.notification-recipient-grid .choice { margin:0; padding:12px; border:1px solid var(--line); border-radius:10px; background:#fbfdfd; align-items:flex-start; }
.section-gap-sm { margin-top:14px; }
.notification-escalation-stack { display:grid; gap:12px; }
.notification-escalation-level { border:1px solid var(--line); border-radius:12px; background:#fbfdfd; overflow:hidden; }
.notification-escalation-level > summary { list-style:none; cursor:pointer; display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 16px; background:#f5f9f9; }
.notification-escalation-level > summary::-webkit-details-marker { display:none; }
.notification-escalation-level > summary span > strong, .notification-escalation-level > summary span > small { display:block; }
.notification-escalation-level > summary span > small { margin-top:3px; color:var(--muted); font-size:.74rem; }
.notification-escalation-body { padding:16px; border-top:1px solid var(--line); }
.notification-escalation-recipient-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px 14px; padding:12px; border:1px solid var(--line); border-radius:10px; background:#fff; }
.notification-escalation-recipient-grid label { display:flex; gap:7px; align-items:flex-start; font-size:.77rem; font-weight:650; color:#405760; }
.notification-rule-editor select[multiple] { min-height:142px; }

@media (max-width: 1000px) {
  .notification-rule-stats { grid-template-columns:1fr; }
  .notification-recipient-grid, .notification-escalation-recipient-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .notification-channel-choices, .notification-recipient-grid, .notification-escalation-recipient-grid { grid-template-columns:1fr; }
  .notification-escalation-level > summary { align-items:flex-start; flex-direction:column; }
  .notification-title-badges { justify-content:flex-start; }
}

/* v1.22.0 - application-wide responsive compatibility layer.
   This layer intentionally comes last so it can normalize older page-specific
   minimum widths without changing workflow semantics or server-side templates. */
:root {
  --app-sidebar-width: 276px;
  --app-topbar-height: 72px;
  --app-content-gutter: clamp(14px, 2vw, 28px);
  --app-safe-top: env(safe-area-inset-top, 0px);
  --app-safe-right: env(safe-area-inset-right, 0px);
  --app-safe-bottom: env(safe-area-inset-bottom, 0px);
  --app-safe-left: env(safe-area-inset-left, 0px);
}

html, body { max-width: 100%; }
body { overflow-x: hidden; }
main, section, article, aside, header, footer, nav, form, fieldset, details { min-width: 0; }
pre, code, samp, kbd { max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
pre { overflow-x: auto; white-space: pre-wrap; }
iframe, embed, object { max-width: 100%; }

/* Safe-area aware application chrome (notches, rounded displays, mobile PWAs). */
.app-shell { padding-top: calc(var(--app-topbar-height) + var(--app-safe-top)); }
.sidebar {
  width: var(--app-sidebar-width);
  padding-top: var(--app-safe-top);
  padding-bottom: var(--app-safe-bottom);
}
.topbar {
  height: calc(var(--app-topbar-height) + var(--app-safe-top));
  padding-top: var(--app-safe-top);
  padding-inline: max(18px, var(--app-safe-left)) max(18px, var(--app-safe-right));
}
.main-content {
  padding: var(--app-content-gutter) max(var(--app-content-gutter), var(--app-safe-right)) max(var(--app-content-gutter), var(--app-safe-bottom)) max(var(--app-content-gutter), var(--app-safe-left));
  min-height: calc(100vh - var(--app-topbar-height) - var(--app-safe-top));
  min-height: calc(100dvh - var(--app-topbar-height) - var(--app-safe-top));
}

/* Top bar must remain usable at browser zoom, on tablets, and on 320px phones. */
.topbar-context { flex: 1 1 auto; min-width: 0; }
.topbar-context strong,
.topbar-context small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .language-switcher,
.notification-link { flex: 0 0 auto; }
.notification-link { gap: 6px; white-space: nowrap; }
.notification-icon {
  display: none;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  color: var(--teal-dark);
  font-size: 0;
}
.notification-icon::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Let all common flex/grid children actually shrink instead of forcing horizontal overflow. */
.page-header > *, .page-actions > *, .card-header > *, .card-body > *,
.form-grid > *, .two-column > *, .three-column > *, .stats-grid > *,
.filter-bar > *, .advanced-filter > *, .action-row > *, .form-actions > *,
.detail-hero-top > *, .detail-metrics > *, .notification-card > *,
.workflow-steps > *, .workflow-create-steps > *, .guided-task-grid > *,
.provider-choice > *, .permission-grid > *, .backup-status-grid > *,
.notification-rule-stats > *, .notification-recipient-grid > *,
.notification-escalation-recipient-grid > * { min-width: 0; }

/* Long identifiers, translated labels and user-entered content should wrap safely. */
.card-header h2, .card-header h3, .page-header h1, .page-header p,
.data-table td, .data-table th, .button, .status, .risk-badge,
.form-note, .confidential-note, .choice, .table-subtext,
.notification-recipient-summary, .workflow-step strong, .workflow-step p,
.guided-task-card, .assignment-effective { overflow-wrap: anywhere; }

/* Inputs should never exceed their parent in Safari/iOS or Chromium Android. */
input, select, textarea, button { max-width: 100%; }
input[type="date"], input[type="time"], input[type="datetime-local"] { min-width: 0; }
select[multiple] { max-width: 100%; }
.form-actions, .page-actions, .action-row, .filter-actions, .table-actions { row-gap: 8px; }

/* Responsive overlays and dialogs use the visual viewport when available. */
.confirmation-backdrop, .required-summary-backdrop {
  padding: max(14px, var(--app-safe-top)) max(14px, var(--app-safe-right)) max(14px, var(--app-safe-bottom)) max(14px, var(--app-safe-left));
}
.confirmation-dialog { max-height: min(86vh, 720px); max-height: min(86dvh, 720px); }
.required-summary-dialog { max-height: min(88vh, 780px); max-height: min(88dvh, 780px); }
.flash-stack {
  top: calc(var(--app-topbar-height) + var(--app-safe-top) + 12px);
  right: max(14px, var(--app-safe-right));
  width: min(430px, calc(100vw - max(28px, var(--app-safe-left)) - max(28px, var(--app-safe-right))));
}
html[dir="rtl"] .flash-stack { left: max(14px, var(--app-safe-left)); right: auto; }
.sticky-form-actions, .sticky-actions { bottom: max(12px, var(--app-safe-bottom)); }

/* Medium desktop / large tablet: preserve density without cramped four-column content. */
@media (max-width: 1280px) {
  .main-content { max-width: 100%; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .permission-grid { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
  .advanced-filter { grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); }
}

/* Sidebar becomes an off-canvas drawer. This also makes 200% browser zoom usable. */
@media (max-width: 1080px) {
  :root { --app-topbar-height: 68px; }
  .app-shell { padding-left: 0; padding-right: 0; }
  .sidebar {
    width: min(320px, calc(100vw - max(42px, var(--app-safe-right))));
    max-width: 92vw;
  }
  .topbar { inset-inline: 0; padding-inline: max(14px, var(--app-safe-left)) max(14px, var(--app-safe-right)); }
  .main-content { padding-inline: max(16px, var(--app-safe-left)) max(16px, var(--app-safe-right)); }
  .sidebar-backdrop { touch-action: none; }
}

/* Tablet / compact layouts. */
@media (max-width: 980px) {
  .two-column, .three-column, .translation-endpoints,
  .account-channel-grid, .workflow-scope-grid, .workflow-assignment-mode-panel,
  .backup-security-panel { grid-template-columns: 1fr !important; }

  /* All data tables are converted to stacked cards by app.js below this breakpoint.
     Remove page-specific desktop minimum widths that would otherwise still overflow. */
  .responsive-table,
  .backup-history-table,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td,
  .responsive-table th { min-width: 0 !important; max-width: 100% !important; width: 100% !important; }
  .responsive-table td:first-child,
  .acl-table td:first-child,
  .acl-table td:not(:first-child),
  .notification-rule-table td:first-child,
  .user-table-identity,
  .backup-row-actions { min-width: 0 !important; max-width: 100% !important; }
  .responsive-table select, .acl-table select { min-width: 0; width: 100%; }
  .responsive-table .table-actions,
  .responsive-table .backup-row-actions,
  .responsive-table .action-row { width: 100%; }
  .responsive-table .table-actions .button,
  .responsive-table .backup-row-actions .button { flex: 1 1 160px; }
  .backup-delete-form { flex: 1 1 100%; flex-wrap: wrap; }
  .backup-delete-form input { flex: 1 1 180px; width: auto; }

  .notification-rule-table .notification-recipient-summary,
  .backup-error { max-width: none; }
  .workflow-permission-badge { max-width: 100%; white-space: normal; }
}

@media (max-width: 820px) {
  .form-grid { grid-template-columns: 1fr; }
  .span-12, .span-9, .span-8, .span-6, .span-5, .span-4, .span-3, .span-2 { grid-column: 1 !important; }
  .filter-bar, .filter-bar.compact-filter, .filter-bar.report-filter { grid-template-columns: 1fr; }
  .filter-bar .button, .filter-actions .button { width: 100%; }
  .provider-choice, .choice-grid { grid-template-columns: 1fr; }
  .card-header-split { align-items: flex-start; flex-direction: column; }
  .page-header { align-items: stretch; }
  .page-actions { justify-content: flex-start; }
  .page-actions form { max-width: 100%; }
  .notification-card { grid-template-columns: 6px minmax(0, 1fr); }
  .notification-actions { grid-column: 2; }
}

/* Phones. */
@media (max-width: 640px) {
  :root {
    --app-topbar-height: 62px;
    --app-content-gutter: 13px;
  }
  .topbar { gap: 7px; }
  .menu-button { width: 42px; height: 42px; }
  .topbar-context strong { font-size: .86rem; }
  .topbar-context small { display: none; }
  .topbar .language-button { min-width: 0; min-height: 38px; padding-inline: 8px; }
  .notification-link { min-width: 40px; min-height: 40px; justify-content: center; }
  .notification-icon { display: inline-grid; }
  .notification-text { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; }
  .notification-count { margin-inline-start: -4px; }

  .main-content { padding-top: 15px; }
  .page-header { flex-direction: column; gap: 12px; margin-bottom: 16px; }
  .page-header h1 { font-size: clamp(1.3rem, 7vw, 1.7rem); }
  .page-actions { width: 100%; display: grid; grid-template-columns: 1fr; }
  .page-actions > *, .page-actions form, .page-actions .button { width: 100%; }
  .card { margin-bottom: 14px; border-radius: 12px; }
  .card-header { padding: 15px; }
  .card-body, .form-section { padding: 15px; }
  .stats-grid, .detail-metrics, .guided-task-grid,
  .notification-rule-stats { grid-template-columns: 1fr !important; gap: 10px; }
  .stat-card { padding: 16px; }
  .stat-card strong { font-size: 1.65rem; }

  .form-actions, .action-row, .filter-actions { align-items: stretch; flex-direction: column; }
  .form-actions .button, .action-row .button, .filter-actions .button,
  .sticky-form-actions .button { width: 100%; }
  .sticky-form-actions { position: static; padding: 0; border: 0; background: transparent; box-shadow: none; backdrop-filter: none; }

  .responsive-table-wrap { padding: 9px !important; }
  .responsive-table tbody { gap: 9px; }
  .responsive-table td { grid-template-columns: minmax(82px, .36fr) minmax(0, 1fr); gap: 9px; padding: 10px 11px; }
  .responsive-table td::before { font-size: .62rem; }
  .responsive-table .table-action-cell .button,
  .responsive-table .table-actions .button,
  .responsive-table .backup-row-actions .button { width: 100%; flex-basis: 100%; }

  .workflow-history { padding-inline-start: 25px; }
  html[dir="rtl"] .workflow-history { padding-inline-start: 0; padding-inline-end: 25px; }
  .workflow-history-panel { padding: 12px; }
  .next-action-card { padding: 14px; }
  .notification-channel-choices,
  .notification-recipient-grid,
  .notification-escalation-recipient-grid,
  .backup-notification-options { grid-template-columns: 1fr !important; }

  .confirmation-dialog, .required-summary-dialog { width: 100%; }
  .app-footer { gap: 8px; margin-top: 22px; text-align: center; align-items: center; }
}

/* Very narrow phones / split-screen windows / foldable cover displays. */
@media (max-width: 420px) {
  :root { --app-content-gutter: 10px; }
  .topbar { padding-inline: max(8px, var(--app-safe-left)) max(8px, var(--app-safe-right)); gap: 5px; }
  .menu-button { width: 38px; height: 38px; font-size: 1.2rem; }
  .topbar .language-button { min-height: 36px; padding: 5px 7px; font-size: .7rem; }
  .notification-link { min-width: 36px; min-height: 36px; }
  .notification-count { min-width: 18px; height: 18px; padding-inline: 5px; font-size: .62rem; }
  .card-header, .card-body, .form-section { padding-inline: 12px; }
  .button { white-space: normal; text-align: center; }
  .responsive-table td { display: block; }
  .responsive-table td::before { display: block; margin-bottom: 5px; }
  .pagination-pages { justify-content: flex-start; }
  .chart-row { grid-template-columns: 1fr 34px; }
  .chart-row > span:first-child { grid-column: 1 / -1; }
  .confirmation-dialog, .required-summary-dialog { display: block; padding: 16px; }
  .confirmation-icon, .required-summary-icon { margin-bottom: 10px; }
}

@media (max-width: 340px) {
  .topbar-context { display: none; }
  .topbar .language-switcher { margin-inline-start: auto; }
  .main-content { padding-inline: max(8px, var(--app-safe-left)) max(8px, var(--app-safe-right)); }
}

/* Short landscape phones/tablets: reclaim vertical room while keeping navigation reachable. */
@media (max-width: 1080px) and (max-height: 560px) and (orientation: landscape) {
  :root { --app-topbar-height: 56px; }
  .brand { min-height: 68px; padding: 7px 10px; }
  .brand-logo-link { min-height: 52px; padding: 5px 8px; }
  .brand-logo { max-height: 46px; }
  .sidebar nav { padding-block: 8px; }
  .sidebar-footer { padding-block: 8px; }
  .topbar-context small { display: none; }
  .main-content { padding-top: 10px; }
  .confirmation-dialog, .required-summary-dialog { max-height: 94dvh; }
}

/* Coarse-pointer devices: comfortable hit targets without inflating desktop mouse UI. */
@media (pointer: coarse) {
  .nav-section-toggle, .language-button, .notification-link,
  .pagination-page, .choice { min-height: 44px; }
  .table-actions .button, .page-actions .button { min-height: 44px; }
}

/* Avoid hover-only visual dependencies on touchscreens. */
@media (hover: none) {
  .sidebar nav a:hover, .choice:hover, .button:hover, a:hover { -webkit-tap-highlight-color: transparent; }
}

/* Preserve useful print output at any screen size. */
@media print {
  html, body { overflow: visible; max-width: none; }
  .main-content { max-width: none; min-height: 0; padding: 0; }
  .responsive-table, .responsive-table tbody { display: table; width: 100% !important; }
  .responsive-table thead { position: static; width: auto; height: auto; margin: 0; clip: auto; overflow: visible; white-space: normal; display: table-header-group; }
  .responsive-table tbody { display: table-row-group; }
  .responsive-table tr { display: table-row; border: 0; box-shadow: none; }
  .responsive-table td { display: table-cell; width: auto !important; padding: 8px; }
  .responsive-table td::before { display: none !important; }
}


@media (max-width: 980px) {
  .channel-badge-list { gap: 6px; }
  .channels-cell { min-width: 0; }
  .status-pill { min-height: 28px; padding: 5px 10px; font-size: .72rem; }
}

/* ========================================================================== 
   v1.23.0 — Professional Healthcare Enterprise Visual Design System
   Global presentation layer. Functional behavior remains unchanged.
   ========================================================================== */
:root {
  --navy: #0a3440;
  --navy-deep: #072932;
  --navy-soft: #153f4a;
  --teal: #0f7a7d;
  --teal-dark: #0b6168;
  --teal-bright: #2aa8a0;
  --mint: #e4f5f2;
  --mint-soft: #f2faf8;
  --gold: #d6a33f;
  --ink: #17232d;
  --ink-soft: #3e505b;
  --muted: #6b7d88;
  --line: #dbe6e8;
  --line-strong: #cadadd;
  --surface: #ffffff;
  --surface-soft: #f8fbfb;
  --surface-muted: #f2f6f7;
  --canvas: #f1f6f7;
  --danger: #b4382e;
  --warning: #a7650b;
  --success: #247653;
  --info: #216d88;
  --radius-sm: 9px;
  --radius-md: 13px;
  --radius: 16px;
  --radius-lg: 20px;
  --shadow-xs: 0 2px 8px rgba(7,41,50,.035);
  --shadow-sm: 0 7px 22px rgba(7,41,50,.055);
  --shadow: 0 14px 38px rgba(7,41,50,.075);
  --shadow-lg: 0 24px 65px rgba(7,41,50,.13);
  --focus-ring: 0 0 0 4px rgba(15,122,125,.14);
}

html { background: #eaf1f2; }
body.app-shell {
  color: var(--ink);
  background:
    radial-gradient(circle at 88% 3%, rgba(42,168,160,.055), transparent 31rem),
    radial-gradient(circle at 4% 86%, rgba(10,52,64,.035), transparent 36rem),
    var(--canvas);
}

/* Shell and navigation */
.sidebar {
  background:
    radial-gradient(circle at 15% 4%, rgba(66,190,180,.11), transparent 18rem),
    linear-gradient(180deg, #082f3a 0%, #092a34 57%, #071f27 100%);
  border-inline-end: 1px solid rgba(255,255,255,.055);
  box-shadow: 12px 0 36px rgba(4,27,34,.13);
}
.brand { min-height: 112px; padding: 14px 15px; border-bottom-color: rgba(255,255,255,.085); }
.brand-logo-link {
  min-height: 80px;
  padding: 9px 12px;
  border-color: rgba(255,255,255,.55);
  border-radius: 15px;
  background: linear-gradient(180deg,#ffffff 0%,#f5fbfb 100%);
  box-shadow: 0 10px 28px rgba(0,0,0,.14), inset 0 0 0 1px rgba(255,255,255,.8);
}
.sidebar nav { padding: 18px 13px 20px; }
.accordion-nav { gap: 9px; }
.nav-section { border-radius: 13px; transition: background .18s ease, border-color .18s ease; }
.nav-section:has(a.active) { border-color: rgba(95,215,204,.19); background: rgba(255,255,255,.045); }
.nav-section-toggle {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #91b7bd;
  font-size: .68rem;
  letter-spacing: .105em;
}
.nav-section-toggle:hover { background: rgba(255,255,255,.065); }
.sidebar nav .nav-section-panel a {
  position: relative;
  min-height: 42px;
  margin: 2px 0;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #d5e5e8;
  transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}
.sidebar nav .nav-section-panel a:hover {
  color: #fff;
  background: rgba(255,255,255,.075);
  border-color: rgba(255,255,255,.045);
  transform: translateX(2px);
}
html[dir="rtl"] .sidebar nav .nav-section-panel a:hover { transform: translateX(-2px); }
.sidebar nav .nav-section-panel a.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(61,184,176,.22), rgba(255,255,255,.08));
  border-color: rgba(94,215,204,.2);
  box-shadow: inset 3px 0 0 #68d8cc, 0 7px 20px rgba(0,0,0,.08);
}
html[dir="rtl"] .sidebar nav .nav-section-panel a.active {
  background: linear-gradient(270deg, rgba(61,184,176,.22), rgba(255,255,255,.08));
  box-shadow: inset -3px 0 0 #68d8cc, 0 7px 20px rgba(0,0,0,.08);
}
.sidebar-footer { padding: 15px; background: rgba(0,0,0,.055); border-top-color: rgba(255,255,255,.085); }
.user-chip-link { border: 1px solid transparent; border-radius: 13px; }
.user-chip-link:hover { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.07); }
.user-chip .avatar { box-shadow: 0 0 0 2px rgba(255,255,255,.11); }
.sidebar-hide-button { border-color: rgba(169,205,210,.2); border-radius: 11px; box-shadow: inset 0 1px 0 rgba(255,255,255,.035); }

.topbar {
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(18px) saturate(135%);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  border-bottom-color: rgba(202,218,221,.88);
  box-shadow: 0 6px 24px rgba(7,41,50,.035);
}
.topbar-context strong, .topbar > div > strong { color: var(--navy); font-weight: 800; letter-spacing: -.01em; }
.topbar small { color: #738690; }
.language-button, .notification-link, .menu-button {
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.language-button { min-height: 40px; padding: 7px 13px; border-color: #d6e2e4; border-radius: 11px; box-shadow: var(--shadow-xs); }
.language-button:hover { border-color: #aad1d1; background: #f3fbfa; box-shadow: 0 5px 15px rgba(15,122,125,.07); }
.notification-link { padding: 7px 10px; border-radius: 11px; }
.notification-link:hover { color: var(--teal-dark); background: #f0f8f8; }
.notification-count { box-shadow: 0 0 0 2px #fff; }
.menu-button:hover { background: #f1f8f8; border-color: #d5e3e5; }

/* Page rhythm and headers */
.main-content { max-width: 1740px; padding: 32px; }
.page-header { align-items: center; gap: 22px; margin-bottom: 24px; padding: 3px 2px 1px; }
.page-header > div:first-child { min-width: 0; }
.page-header h1 {
  color: var(--navy);
  font-size: clamp(1.55rem, 2.7vw, 2.15rem);
  font-weight: 830;
  line-height: 1.15;
  letter-spacing: -.038em;
}
.page-header p { margin-top: 7px; color: #687d88; line-height: 1.58; font-size: .88rem; }
.page-actions { gap: 10px; }
.section-gap { margin-top: 24px; }

/* Buttons */
.button {
  min-height: 42px;
  padding: 9px 16px;
  border-radius: 10px;
  font-weight: 780;
  letter-spacing: -.005em;
  box-shadow: none;
  transition: transform .14s ease, box-shadow .14s ease, background .14s ease, border-color .14s ease, color .14s ease;
}
.button:not(:disabled):hover { transform: translateY(-1px); }
.button.primary {
  background: linear-gradient(180deg, #13858a 0%, #0f7479 100%);
  border-color: #0d7074;
  box-shadow: 0 7px 18px rgba(15,116,121,.18);
}
.button.primary:hover { background: linear-gradient(180deg, #0f777c 0%, #0b6269 100%); box-shadow: 0 10px 24px rgba(15,116,121,.22); }
.button.secondary { border-color: #d2dfe2; background: linear-gradient(180deg,#fff 0%,#fafcfc 100%); color: #2a3e49; box-shadow: var(--shadow-xs); }
.button.secondary:hover { border-color: #b7ced2; background: #f5fafa; color: var(--navy); box-shadow: 0 6px 16px rgba(7,41,50,.06); }
.button.warning { background: #fff6e6; border-color: #efd39f; color: #87530a; }
.button.danger { background: linear-gradient(180deg,#c7483d,#ae342b); border-color: #a92e26; box-shadow: 0 7px 18px rgba(180,56,46,.16); }
.button.small { min-height: 34px; border-radius: 9px; }

/* Cards and panels */
.card {
  border-color: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: rgba(255,255,255,.985);
}
.card-header {
  min-height: 68px;
  padding: 18px 20px;
  border-bottom-color: #e2ebed;
  background: linear-gradient(180deg,#ffffff 0%,#fbfdfd 100%);
  border-radius: var(--radius) var(--radius) 0 0;
}
.card-header h2, .card-header h3 { color: var(--navy); font-size: 1.02rem; font-weight: 820; letter-spacing: -.015em; }
.card-header p { color: #73858f; line-height: 1.45; }
.card-body { padding: 21px; }
.card > .card-body:last-child { border-radius: 0 0 var(--radius) var(--radius); }

.stats-grid { gap: 16px; margin-bottom: 24px; }
.stat-card {
  min-height: 126px;
  padding: 21px 22px;
  border-color: #dbe7e8;
  border-radius: 16px;
  background: linear-gradient(145deg,#ffffff 0%,#f9fcfc 100%);
  box-shadow: var(--shadow-sm);
  isolation: isolate;
  transition: transform .17s ease, box-shadow .17s ease, border-color .17s ease;
}
.stat-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(180deg,var(--teal-bright),var(--teal)); border-radius: 16px 0 0 16px; }
html[dir="rtl"] .stat-card::before { inset: 0 0 0 auto; border-radius: 0 16px 16px 0; }
.stat-card::after { width: 92px; height: 92px; right: -28px; top: -34px; background: radial-gradient(circle, rgba(42,168,160,.13), rgba(42,168,160,.025) 70%, transparent 71%); z-index: -1; }
.stat-card:hover { transform: translateY(-2px); border-color: #c9dddf; box-shadow: 0 15px 32px rgba(7,41,50,.085); }
.stat-card span { color: #6f828b; letter-spacing: .075em; }
.stat-card strong { margin-top: 9px; color: var(--navy); font-size: 2rem; font-weight: 850; }

/* Forms and controls */
label { color: #314651; font-size: .79rem; font-weight: 780; line-height: 1.35; }
input[type="text"], input[type="search"], input[type="email"], input[type="url"], input[type="password"], input[type="date"], input[type="time"], input[type="datetime-local"], input[type="number"], select, textarea {
  min-height: 46px;
  margin-top: 7px;
  padding: 10px 12px;
  border: 1px solid #cbdadd;
  border-radius: 10px;
  color: #20313a;
  background: #fff;
  box-shadow: inset 0 1px 1px rgba(7,41,50,.018);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input::placeholder, textarea::placeholder { color: #8c9ba3; opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: #b4cdd1; }
input:focus, select:focus, textarea:focus { border-color: #4ea7a7; box-shadow: var(--focus-ring); background: #fff; }
input:disabled, select:disabled, textarea:disabled, input[readonly], textarea[readonly] { background: #f3f7f8; color: #61747d; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--teal); }
textarea { min-height: 118px; }
.form-grid { gap: 18px; }
.record-form { width: min(1080px,100%); }
.record-form fieldset { padding: 18px; border-color: #d9e5e7; border-radius: 13px; background: #fcfefe; }
.record-form legend { color: var(--navy); font-size: .84rem; }
.form-section { padding: 22px; border-bottom-color: #e4edef; }
.form-section:nth-child(even) { background: rgba(248,251,251,.52); }
.section-heading { margin-bottom: 19px; }
.section-number { width: 32px; height: 32px; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(15,122,125,.08); }
.section-heading h2 { font-size: 1.02rem; font-weight: 820; }
.section-heading p { color: #74868f; line-height: 1.5; }
.choice, .provider-choice label {
  border-color: #dbe6e8;
  border-radius: 11px;
  background: #fbfdfd;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.choice:hover, .provider-choice label:hover { border-color: #a8d0d1; background: #f3fbfa; box-shadow: 0 5px 14px rgba(15,122,125,.045); }
.provider-panel { border-color: #dbe6e8; border-radius: 13px; background: linear-gradient(180deg,#fbfdfd,#f8fbfb); }
.form-note, .confidential-note { border-radius: 11px; line-height: 1.55; }
.form-note { background: #f6f9fa; border-color: #dfe9eb; color: #586c76; }
.confidential-note { background: #f0faf8; border-color: #c9e6de; }

/* Tables */
.table-wrap { background: #fff; scrollbar-color: #bdced2 transparent; }
table.data-table { font-size: .82rem; }
.data-table th {
  padding: 12px 14px;
  background: #f4f8f9;
  color: #566b75;
  border-bottom-color: #d8e5e7;
  font-size: .66rem;
  font-weight: 850;
  letter-spacing: .075em;
}
.data-table td { padding: 14px; border-bottom-color: #e9f0f1; color: #344952; line-height: 1.48; }
.data-table tbody tr { transition: background .13s ease, box-shadow .13s ease; }
.data-table tbody tr:hover td { background: #f8fbfb; }
.data-table .primary-cell { color: var(--navy); font-weight: 800; }
.table-subtext { color: #72858e; }
.table-actions { gap: 8px; }
.status, .risk-badge, .status-pill {
  min-height: 27px;
  border: 1px solid rgba(84,111,122,.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45);
}
.status { background: #edf3f4; color: #3f5963; }

/* Filters and search */
.filter-bar, .advanced-search {
  border-color: #d9e5e7;
  border-radius: 14px;
  box-shadow: var(--shadow-xs);
}
.filter-bar { padding: 15px; background: rgba(255,255,255,.92); }
.advanced-search > summary { min-height: 50px; padding: 13px 17px; background: linear-gradient(180deg,#fafdfd,#f5f9f9); color: var(--navy); }
.advanced-filter { padding: 17px; gap: 14px; }

/* Detail pages and workflow */
.detail-hero {
  position: relative;
  overflow: hidden;
  padding: 25px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 19px;
  background:
    radial-gradient(circle at 91% 12%, rgba(255,255,255,.105), transparent 15rem),
    linear-gradient(125deg, #092f3b 0%, #0d626c 72%, #107b7c 100%);
  box-shadow: 0 20px 48px rgba(7,41,50,.15);
}
.detail-hero::after { content: ""; position: absolute; width: 230px; height: 230px; border-radius: 50%; inset: auto -95px -120px auto; border: 38px solid rgba(255,255,255,.035); pointer-events: none; }
.detail-hero p { color: #d1e4e7; }
.detail-metrics { gap: 11px; }
.detail-metrics div { padding: 11px 13px; border: 1px solid rgba(255,255,255,.1); border-radius: 11px; background: rgba(255,255,255,.09); backdrop-filter: blur(5px); }
.details.workflow-panel, details.workflow-panel { border-radius: 14px; border-color: #dbe6e8; box-shadow: var(--shadow-xs); }
details.workflow-panel summary { padding: 16px 18px; background: linear-gradient(180deg,#fafcfc,#f5f9f9); }
.workflow-step { border-color: #dce7e9; border-radius: 13px; background: #f8fbfb; }
.workflow-step.current { border-color: #ddbd75; background: #fffaf0; box-shadow: 0 0 0 3px rgba(214,163,63,.10); }
.workflow-step.complete { border-color: #a9d5c8; background: #f2fbf7; }
.workflow-history-panel { border-radius: 15px; box-shadow: 0 9px 25px rgba(7,41,50,.045); }
.guided-task-card, .action-card, .next-action-card { border-radius: 13px; box-shadow: var(--shadow-xs); }
.guided-task-card { padding: 16px; background: linear-gradient(180deg,#fff,#fbfdfd); transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.guided-task-card:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(7,41,50,.065); border-color: #cadddf; }
.action-card { background: #fff; }

/* Notifications */
.notification-card {
  border-color: #dbe6e8;
  border-radius: 14px;
  box-shadow: var(--shadow-xs);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.notification-card:hover { transform: translateY(-1px); border-color: #c9dddf; box-shadow: 0 10px 24px rgba(7,41,50,.06); }
.notification-card.is-unread { background: linear-gradient(180deg,#fff,#fbfefe); }
.notification-indicator { width: 5px; }

/* Admin / workflow editors */
.workflow-scope-preview, .workflow-alert, details.workflow-assignment-accordion,
.notification-channel-panel, .notification-escalation-level, .endpoint-card,
.override-editor {
  border-color: #d8e5e7;
  box-shadow: var(--shadow-xs);
}
.workflow-scope-preview { background: linear-gradient(135deg,#fbfefe,#f3f9f9); }
details.workflow-assignment-accordion { border-radius: 15px; }
.notification-channel-panel, .notification-escalation-level { border-radius: 13px; }
.notification-rule-stat { border-radius: 15px; background: linear-gradient(145deg,#fff,#f8fbfb); }
.channel-badge-list { gap: 7px 8px; }
.channel-pill { border-color: #cce3e5; background: #eef8f8; color: #23636b; }

/* Backup Center destination panels */
.backup-destination {
  border-color: #d7e5e7 !important;
  border-radius: 16px !important;
  box-shadow: var(--shadow-xs);
  background: #fff;
}
.backup-destination > summary { background: linear-gradient(180deg,#ffffff,#f9fcfc) !important; }
.backup-destination[open] { box-shadow: 0 12px 30px rgba(7,41,50,.065); }
.backup-destination[open] > summary { border-bottom-color: #dce8e9 !important; }
.backup-provider-body, .backup-destination-body { background: #fff; }

/* Empty states */
.empty-state { padding: 48px 24px; color: #758790; }
.empty-state::before { content: ""; display: block; width: 38px; height: 4px; margin: 0 auto 14px; border-radius: 999px; background: linear-gradient(90deg,#badbd7,#68bdb6); }
.empty-state strong { color: var(--navy); font-weight: 820; }

/* Dialogs and flashes */
.confirmation-backdrop, .required-summary-backdrop { background: rgba(4,24,31,.66); backdrop-filter: blur(8px); }
.confirmation-dialog, .required-summary-dialog { border-radius: 20px; box-shadow: 0 32px 85px rgba(3,22,29,.31); }
.flash-stack { top: 88px; }
.flash { border-radius: 12px; box-shadow: 0 12px 32px rgba(7,41,50,.17); border: 1px solid rgba(255,255,255,.12); }

/* Authentication */
.auth-shell {
  background:
    radial-gradient(circle at 12% 12%, rgba(77,192,183,.19), transparent 24rem),
    radial-gradient(circle at 88% 82%, rgba(255,255,255,.42), transparent 25rem),
    linear-gradient(145deg, #072b35 0 51%, #eaf4f3 51% 100%);
}
.login-card {
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 24px;
  box-shadow: 0 35px 90px rgba(4,30,37,.24);
}
.login-visual {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 95% 5%, rgba(255,255,255,.11), transparent 16rem),
    linear-gradient(155deg, #082f3b 0%, #0d606b 100%);
}
.login-visual::after { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; border: 56px solid rgba(255,255,255,.035); right: -160px; bottom: -180px; pointer-events: none; }
.login-form { background: linear-gradient(180deg,#fff,#fbfdfd); }
.login-form h2 { color: var(--navy); font-weight: 840; letter-spacing: -.03em; }
.recovery-card { border-color: #dbe6e8; box-shadow: 0 26px 75px rgba(4,37,47,.18); }

/* Footer */
.app-footer { margin-top: 34px; padding: 19px 2px 2px; border-top-color: #dce7e9; color: #82939b; }

/* Scrollbars on capable browsers */
@supports selector(::-webkit-scrollbar) {
  .sidebar nav::-webkit-scrollbar, .table-wrap::-webkit-scrollbar, textarea::-webkit-scrollbar { width: 9px; height: 9px; }
  .sidebar nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.16); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
  .table-wrap::-webkit-scrollbar-thumb, textarea::-webkit-scrollbar-thumb { background: #c6d6d9; border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }
  .table-wrap::-webkit-scrollbar-track { background: #f4f8f9; }
}

/* Responsive polish */
@media (max-width: 1080px) {
  .sidebar { box-shadow: 20px 0 55px rgba(2,22,28,.25); }
  html[dir="rtl"] .sidebar { box-shadow: -20px 0 55px rgba(2,22,28,.25); }
  .main-content { padding: 26px 20px; }
}
@media (max-width: 820px) {
  .page-header { align-items: stretch; margin-bottom: 20px; }
  .card-header { min-height: 0; }
  .main-content { padding: 22px 16px; }
  .stat-card { min-height: 112px; }
  .login-card { border-radius: 20px; }
}
@media (max-width: 640px) {
  .main-content { padding: 18px 12px; }
  .page-header h1 { font-size: 1.5rem; }
  .page-header p { font-size: .82rem; }
  .card { border-radius: 14px; margin-bottom: 14px; }
  .card-header, .card-body, .form-section { padding: 16px; }
  .button { min-height: 44px; }
  .stats-grid { gap: 10px; }
  .stat-card { padding: 17px; border-radius: 14px; }
  input[type="text"], input[type="search"], input[type="email"], input[type="url"], input[type="password"], input[type="date"], input[type="time"], input[type="datetime-local"], input[type="number"], select, textarea { min-height: 46px; }
}

/* Never animate motion-sensitive users. */
@media (prefers-reduced-motion: reduce) {
  .button, .stat-card, .guided-task-card, .notification-card,
  .sidebar nav .nav-section-panel a { transition: none !important; transform: none !important; }
}

/* Print stays clean and clinical. */
@media print {
  body.app-shell { background: #fff !important; }
  .card, .stat-card, .detail-hero, .workflow-history-panel { box-shadow: none !important; }
  .card, .stat-card { border-color: #d8d8d8 !important; }
}


/* v1.23.1 - sidebar navigation reachability and short-screen polish. */
.sidebar {
  overflow: hidden;
}
.sidebar .brand {
  flex: 0 0 auto;
}
.sidebar nav.accordion-nav {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  scroll-padding-block: 14px 22px;
  padding-bottom: 28px;
}
.sidebar-footer {
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
}
.sidebar nav.accordion-nav::-webkit-scrollbar { width: 10px; }
.sidebar nav.accordion-nav::-webkit-scrollbar-track { background: rgba(255,255,255,.035); border-radius: 999px; }
.sidebar nav.accordion-nav::-webkit-scrollbar-thumb {
  background: rgba(160,205,211,.38);
  border: 2px solid transparent;
  background-clip: padding-box;
  border-radius: 999px;
}
.sidebar nav.accordion-nav::-webkit-scrollbar-thumb:hover { background: rgba(185,225,229,.62); background-clip: padding-box; }
.sidebar nav.accordion-nav { scrollbar-color: rgba(160,205,211,.42) rgba(255,255,255,.035); scrollbar-width: thin; }

/* Make the lower edge visually communicate that more navigation may exist. */
.sidebar::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 10px;
  pointer-events: none;
  background: linear-gradient(to bottom, transparent, rgba(2,21,27,.16));
  z-index: 1;
}

/* Compact the chrome on shorter laptop/browser windows so more menu entries fit
   before scrolling is needed, while preserving comfortable click targets. */
@media (min-width: 641px) and (max-height: 820px) {
  .brand { min-height: 94px; padding: 10px 13px; }
  .brand-logo-link { min-height: 66px; padding: 7px 10px; }
  .brand-logo { max-height: 58px; }
  .sidebar-hide-button { min-height: 36px; margin: 7px 11px 0; width: calc(100% - 22px); padding-block: 6px; }
  .sidebar nav.accordion-nav { padding: 12px 11px 22px; gap: 6px; }
  .nav-section-toggle { min-height: 40px; padding-block: 8px; }
  .sidebar nav .nav-section-panel a { min-height: 38px; padding-block: 8px; margin-block: 1px; }
  .sidebar-footer { padding: 11px 13px; }
  .user-chip-link { padding: 7px; }
  .user-chip .avatar { width: 34px; height: 34px; flex-basis: 34px; }
  .sidebar-actions { margin-top: 8px; }
}

@media (min-width: 641px) and (max-height: 690px) {
  .brand { min-height: 78px; padding: 7px 11px; }
  .brand-logo-link { min-height: 56px; padding: 5px 8px; border-radius: 12px; }
  .brand-logo { max-height: 48px; }
  .sidebar-hide-button { min-height: 34px; margin: 6px 10px 0; width: calc(100% - 20px); padding-block: 5px; font-size: .7rem; }
  .sidebar nav.accordion-nav { padding: 8px 10px 18px; gap: 4px; }
  .nav-section-toggle { min-height: 37px; padding: 7px 10px; }
  .sidebar nav .nav-section-panel a { min-height: 36px; padding: 7px 10px; font-size: .8rem; }
  .sidebar-footer { padding: 8px 11px; }
  .user-chip-link { padding: 5px; }
  .user-chip .avatar { width: 30px; height: 30px; flex-basis: 30px; }
  .user-chip strong { font-size: .77rem; -webkit-line-clamp: 1; line-clamp: 1; }
  .user-chip small { font-size: .65rem; }
  .sidebar-actions { margin-top: 6px; }
}

/* Off-canvas/mobile drawers always keep the navigation independently scrollable. */
@media (max-width: 1080px) {
  .sidebar { max-height: 100dvh; }
  .sidebar nav.accordion-nav { padding-bottom: max(28px, calc(18px + var(--app-safe-bottom))); }
}

@media (max-width: 380px) {
  .form-help-row .login-remember { font-size: .64rem; gap: 6px; }
}

/* v1.24.0 — Access Security Center, Cloudflare Turnstile, and optional MFA */
.turnstile-panel {
  width: 100%;
  max-width: 430px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdfd 0%, #f5f9fa 100%);
  overflow: hidden;
}
.turnstile-panel .cf-turnstile { width: 100%; min-width: 0; }
.auth-turnstile { margin: 2px 0 4px; max-width: 100%; }
.turnstile-submit-section {
  margin: 18px 20px 0;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  align-items: center;
  gap: 18px;
  border: 1px solid #cfe3e8;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fbfb 0%, #eef7f8 100%);
}
.turnstile-submit-section strong { display: block; color: var(--navy); }
.turnstile-submit-section p { margin: 5px 0 0; color: var(--muted); font-size: .78rem; line-height: 1.5; }
.security-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.security-stat { padding: 18px 20px; display: grid; gap: 4px; }
.security-stat small { color: var(--muted); font-weight: 800; text-transform: uppercase; letter-spacing: .045em; }
.security-stat strong { color: var(--navy); font-size: 1.45rem; line-height: 1.15; }
.security-stat span { color: var(--muted); font-size: .76rem; }
.security-choice-grid { margin-top: 10px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.security-choice-grid .choice { margin: 0; padding: 14px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; background: #fbfdfd; }
.security-choice-grid .choice span strong, .security-choice-grid .choice span small { display: block; }
.security-choice-grid .choice span small { margin-top: 4px; color: var(--muted); font-weight: 500; font-size: .7rem; line-height: 1.45; }
.security-field-heading { color: var(--navy); }
.security-inline-switch { min-height: 50px; }
.security-test-form { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.mfa-challenge-card { max-width: 570px; }
.mfa-code-input { letter-spacing: .16em; font-variant-numeric: tabular-nums; font-weight: 800; }
.mfa-setup-grid { display: grid; grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); gap: 28px; align-items: center; }
.mfa-qr-panel { display: grid; justify-items: center; gap: 8px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #f8fbfb; text-align: center; }
.mfa-qr-image { width: min(240px, 100%); height: auto; border-radius: 10px; background: #fff; padding: 8px; border: 1px solid #e3ecef; }
.mfa-qr-panel small { color: var(--muted); line-height: 1.45; }
.mfa-manual-panel h3 { margin-top: 0; color: var(--navy); }
.mfa-secret { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px; border: 1px dashed #b8cdd3; border-radius: 10px; background: #fff; }
.mfa-secret code { flex: 1 1 250px; overflow-wrap: anywhere; font-size: .82rem; }
.mfa-account-card .card-body { display: grid; gap: 16px; }
.security-status-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; border: 1px solid #d8e8eb; border-radius: 12px; background: #f8fbfb; }
.security-status-row p { margin: 4px 0 0; color: var(--muted); font-size: .76rem; line-height: 1.5; }
.security-shield { flex: 0 0 42px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: #e7f5ef; color: #246548; font-weight: 900; font-size: 1.1rem; }
.security-shield.inactive { background: #edf4f6; color: #56727b; }
.mfa-account-actions { align-items: stretch; }
.security-action-form { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdfd; }
.security-action-form h3 { margin: 0 0 4px; color: var(--navy); font-size: .9rem; }
.security-action-form > p { margin: 0 0 12px; color: var(--muted); font-size: .73rem; }
.security-action-form.danger-zone { border-color: #efd5cd; background: #fffafa; }
.mfa-recovery-panel { padding: 16px; border: 1px solid #e6d7a4; border-radius: 12px; background: #fffaf0; }
.mfa-recovery-panel p { margin: 4px 0 12px; color: #715c26; font-size: .75rem; }
.mfa-recovery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 12px; margin-bottom: 12px; }
.mfa-recovery-grid code { display: block; padding: 8px 10px; border: 1px solid #eadfac; border-radius: 8px; background: #fff; text-align: center; font-weight: 800; letter-spacing: .06em; }
.user-security-card .form-note { margin-bottom: 12px; }

@media (max-width: 980px) {
  .turnstile-submit-section { grid-template-columns: 1fr; }
  .security-stat-grid, .security-choice-grid { grid-template-columns: 1fr; }
  .mfa-setup-grid { grid-template-columns: 1fr; }
  .mfa-qr-panel { max-width: 380px; width: 100%; margin-inline: auto; }
}
@media (max-width: 640px) {
  .turnstile-submit-section { margin-inline: 12px; padding: 14px; }
  .turnstile-panel { padding: 8px; }
  .mfa-recovery-grid { grid-template-columns: 1fr; }
  .security-status-row { align-items: flex-start; }
  .mfa-secret .button { width: 100%; }
}

/* v1.25.0 — Multi-channel MFA: Authenticator App, Email Code, Telegram Code */
.mfa-login-methods { display: grid; gap: 12px; margin: 18px 0; }
.mfa-method-panel { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(180deg,#ffffff 0%,#f9fbfc 100%); }
.mfa-method-panel.selected { border-color: #9fcbd4; box-shadow: 0 0 0 3px rgba(15,107,120,.08); }
.mfa-method-heading { display: flex; gap: 12px; align-items: flex-start; }
.mfa-method-heading > div { min-width: 0; }
.mfa-method-heading strong, .mfa-method-heading small { display: block; }
.mfa-method-heading strong { color: var(--navy); }
.mfa-method-heading small { margin-top: 3px; color: var(--muted); font-size: .72rem; line-height: 1.45; }
.mfa-method-icon { flex: 0 0 36px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: #eaf4f6; color: #1f6271; font-weight: 900; }
.mfa-inline-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: end; }
.mfa-inline-form label { margin: 0; }
.mfa-inline-form .button { min-height: 46px; }
.mfa-send-form { margin: 0; }
.recovery-method-panel { background: #fffdf7; border-color: #e7dcc0; }
.recovery-method-panel .mfa-method-icon { background: #fff4d9; color: #7b5a16; }
.mfa-method-management-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.mfa-method-card { min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: #fbfdfd; }
.mfa-method-card.enabled { border-color: #c7e2d5; background: linear-gradient(180deg,#fbfffd 0%,#f3faf6 100%); }
.mfa-method-card-head { display: flex; gap: 11px; align-items: flex-start; }
.mfa-method-card-head > div { min-width: 0; }
.mfa-method-card-head strong, .mfa-method-card-head small { display: block; }
.mfa-method-card-head strong { color: var(--navy); }
.mfa-method-card-head small { margin-top: 4px; color: var(--muted); font-size: .7rem; line-height: 1.45; }
.mfa-method-card-foot { display: flex; align-items: center; justify-content: flex-start; min-height: 34px; }
.mfa-channel-setup-card { max-width: 1050px; }
.mfa-channel-setup-body { display: grid; gap: 16px; }
.mfa-admin-method-grid .choice { min-height: 118px; }

@media (max-width: 980px) {
  .mfa-method-management-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .mfa-inline-form { grid-template-columns: 1fr; }
  .mfa-inline-form .button, .mfa-send-form .button { width: 100%; }
  .mfa-method-panel { padding: 14px; }
}

/* v1.25.1 — resilient Authenticator App enrollment fallback */
.mfa-qr-fallback { width: 180px; max-width: 100%; aspect-ratio: 1; display: grid; place-items: center; border: 1px dashed #a9c3cb; border-radius: 16px; background: repeating-linear-gradient(45deg,#f4f9fa,#f4f9fa 10px,#eaf3f5 10px,#eaf3f5 20px); color: #55727b; font-size: 1.1rem; font-weight: 850; letter-spacing: .08em; }

/* v1.25.3 — QPS review progressive disclosure and conditional assignment */
.qps-decision-state,
.qps-conditional-panel {
  margin: 10px 0 16px;
  border-radius: 14px;
}
.qps-decision-state {
  display: grid;
  gap: 4px;
  padding: 13px 15px;
  border: 1px solid #cfe4d7;
  background: linear-gradient(180deg,#fbfffd 0%,#f3faf6 100%);
}
.qps-decision-state strong { color: #265f45; }
.qps-decision-state span { color: #557069; font-size: .75rem; line-height: 1.5; }
.qps-conditional-panel {
  padding: 15px;
  border: 1px solid #cfdfe4;
  background: linear-gradient(180deg,#fbfdfe 0%,#f6fafb 100%);
}
.qps-conditional-heading { display: grid; gap: 4px; margin-bottom: 12px; }
.qps-conditional-heading strong { color: var(--navy); }
.qps-conditional-heading span { color: var(--muted); font-size: .74rem; line-height: 1.5; }
.qps-assignment-panel { margin-top: 8px; }
.qps-assignment-panel > label { margin: 0; }
.qps-conditional-panel[hidden], .qps-decision-state[hidden] { display: none !important; }

@media (max-width: 640px) {
  .qps-conditional-panel { padding: 13px; }
  .qps-decision-state { padding: 12px 13px; }
}


/* v1.25.5 — explicit 24-hour time controls -------------------------------- */
.time-24h-control,
.datetime-24h-control {
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 8px;
}
.time-24h-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
.datetime-24h-control { display: grid; grid-template-columns: minmax(145px, 1.15fr) minmax(96px, .72fr) auto; }
.time-24h-control .time-24h-input,
.datetime-24h-control .datetime-24h-date,
.datetime-24h-control .datetime-24h-time {
  width: 100%;
  min-width: 0;
  margin: 0;
}
.time-24h-input,
.datetime-24h-time {
  font-variant-numeric: tabular-nums;
  letter-spacing: .035em;
}
.time-24h-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid #d6e5e9;
  border-radius: 999px;
  background: #eef7f8;
  color: #286372;
  font-size: .66rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}
html[dir="rtl"] .time-24h-input,
html[dir="rtl"] .datetime-24h-date,
html[dir="rtl"] .datetime-24h-time { direction: ltr; text-align: left; }
@media (max-width: 420px) {
  .datetime-24h-control { grid-template-columns: minmax(0, 1fr) minmax(90px, .72fr) auto; gap: 6px; }
  .time-24h-badge { padding-inline: 6px; font-size: .61rem; }
}

/* v1.25.7 - Secure Attachments inherit incident access at every workflow stage. */
.evidence-access-note { margin-bottom: 14px; border-color: #cfe4e7; background: #f4fafb; color: #35545d; }
.evidence-access-note strong { color: var(--navy); }


/* v1.25.8 - Secure Attachment upload follows OVR lock/closed state. */
.evidence-upload-locked { display:flex; align-items:flex-start; gap:10px; margin-top:16px; padding:14px 16px; border:1px solid #dbe4e8; border-radius:12px; background:#f7fafb; color:#52636d; }
.evidence-upload-locked strong { color:var(--navy); }
.evidence-upload-locked span { min-width:0; }
@media (max-width:640px) { .evidence-upload-locked { flex-direction:column; gap:4px; } }

/* v1.25.9 — QPS Department Action & Feedback decision panels */
.qps-final-decision-panel {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdfd;
}
.qps-final-decision-panel[hidden] { display: none !important; }
.qps-final-decision-panel > .form-note { margin-bottom: 14px; }
.qps-final-decision-panel textarea { min-height: 118px; }
@media (max-width: 640px) {
  .qps-final-decision-panel { padding: 13px; }
}

/* v1.26.4 — Professional New OVR form and radio-card controls */
#ovr-report-form {
  border-color: #d7e4e6;
  box-shadow: 0 14px 36px rgba(7, 41, 50, .075);
  overflow: hidden;
}
#ovr-report-form .form-section {
  padding: 26px 24px;
}
#ovr-report-form .form-section:nth-child(even) {
  background: linear-gradient(180deg, rgba(248,252,252,.72), rgba(252,254,254,.42));
}
#ovr-report-form .section-heading {
  gap: 14px;
  margin-bottom: 22px;
}
#ovr-report-form .section-number {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  color: #0d6268;
  background: linear-gradient(145deg,#e7f7f5,#d9efed);
  box-shadow: inset 0 0 0 1px rgba(15,122,125,.10), 0 4px 10px rgba(15,122,125,.06);
}
#ovr-report-form .section-heading h2 {
  font-size: 1.08rem;
  letter-spacing: -.015em;
}
#ovr-report-form .section-heading p {
  max-width: 820px;
  margin-top: 5px;
  font-size: .79rem;
}
#ovr-report-form .form-grid {
  gap: 20px 18px;
}
#ovr-report-form .ovr-choice-field {
  padding: 16px;
  border: 1px solid #dce8ea;
  border-radius: 14px;
  background: linear-gradient(180deg,#fcfefe 0%,#f8fbfb 100%);
}
#ovr-report-form .ovr-choice-label {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  margin: 0 0 10px;
  color: var(--navy);
  font-size: .82rem;
  font-weight: 850;
}
#ovr-report-form .ovr-radio-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 0;
}
#ovr-report-form .ovr-radio-choice {
  position: relative;
  min-height: 52px;
  margin: 0;
  padding: 12px 14px;
  align-items: center;
  gap: 11px;
  border: 1px solid #d7e4e6;
  border-radius: 12px;
  background: #fff;
  color: #334b55;
  font-size: .79rem;
  font-weight: 750;
  line-height: 1.35;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 2px 6px rgba(7,41,50,.025);
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}
#ovr-report-form .ovr-radio-choice:hover {
  border-color: #9fcacc;
  background: #f7fcfb;
  box-shadow: 0 6px 16px rgba(15,122,125,.065);
  transform: translateY(-1px);
}
#ovr-report-form .ovr-radio-choice input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  display: grid;
  place-content: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  margin: 0;
  border: 2px solid #9ab4ba;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 2px #fff;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
#ovr-report-form .ovr-radio-choice input[type="radio"]::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
  transform: scale(0);
  transition: transform .14s ease;
}
#ovr-report-form .ovr-radio-choice input[type="radio"]:checked {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15,122,125,.10);
}
#ovr-report-form .ovr-radio-choice input[type="radio"]:checked::before {
  transform: scale(1);
}
#ovr-report-form .ovr-radio-choice:has(input[type="radio"]:checked) {
  border-color: #69b7b7;
  background: linear-gradient(180deg,#f1fbfa 0%,#eaf8f6 100%);
  color: #174f58;
  box-shadow: 0 0 0 1px rgba(15,122,125,.08), 0 7px 18px rgba(15,122,125,.07);
}
#ovr-report-form .ovr-radio-choice:has(input[type="radio"]:focus-visible) {
  border-color: #4ea7a7;
  box-shadow: var(--focus-ring);
}
#ovr-report-form .ovr-radio-choice:has(input[type="radio"]:disabled) {
  cursor: not-allowed;
  transform: none;
  color: #75878f;
  border-color: #e1e9eb;
  background: #f4f7f8;
  box-shadow: none;
}
#ovr-report-form .ovr-radio-choice span {
  min-width: 0;
  display: block;
}
#ovr-report-form .other-involved-question {
  border-color: #dce8ea;
  background: linear-gradient(180deg,#fcfefe,#f8fbfb);
  box-shadow: 0 3px 10px rgba(7,41,50,.025);
}
#ovr-report-form .other-involved-choice-grid {
  gap: 10px;
}
#ovr-report-form .other-involved-choice-grid .ovr-radio-choice {
  min-width: 104px;
  min-height: 46px;
  padding: 10px 14px;
  justify-content: flex-start;
}
#ovr-report-form .report-type-field > .ovr-choice-label:first-child {
  margin-bottom: 10px;
}
#ovr-report-form .report-type-grid {
  gap: 10px;
}
#ovr-report-form .report-type-choice {
  min-height: 54px;
}
#ovr-report-form .choice-grid:not(.ovr-radio-grid) .choice {
  min-height: 44px;
  align-items: center;
  padding: 10px 12px;
}
#ovr-report-form .choice-grid:not(.ovr-radio-grid) .choice input[type="checkbox"] {
  flex: 0 0 auto;
  margin: 0;
}
#ovr-report-form .injury-detail-panel,
#ovr-report-form .other-involved-panel {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.55);
}
#ovr-report-form .form-actions {
  padding: 17px 22px;
  background: rgba(255,255,255,.985);
  box-shadow: 0 -8px 22px rgba(7,41,50,.04);
}
html[dir="rtl"] #ovr-report-form .ovr-radio-choice {
  text-align: right;
}
@media (max-width: 760px) {
  #ovr-report-form .form-section { padding: 20px 16px; }
  #ovr-report-form .ovr-choice-field { padding: 13px; }
  #ovr-report-form .ovr-radio-grid,
  #ovr-report-form .report-type-grid { grid-template-columns: 1fr; }
  #ovr-report-form .ovr-radio-choice { min-height: 48px; }
  #ovr-report-form .other-involved-choice-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #ovr-report-form .other-involved-choice-grid .ovr-radio-choice { min-width: 0; width: 100%; }
}
@media (max-width: 380px) {
  #ovr-report-form .other-involved-choice-grid { grid-template-columns: 1fr; }
}

/* v1.26.5 - optional Person Involved applicability section */
#ovr-report-form .person-involved-question {
  border-color: #d7e7e9;
  background: linear-gradient(180deg,#fcfefe 0%,#f7fbfb 100%);
}
#ovr-report-form .person-involved-question.is-active {
  border-color: #9fcfd0;
  box-shadow: 0 0 0 3px rgba(15,122,125,.055);
}
#ovr-report-form .person-involved-panel {
  padding: 16px;
  border-color: #c9e0e2;
  background: linear-gradient(180deg,#ffffff 0%,#fbfefe 100%);
}
#ovr-report-form .person-involved-panel[hidden] { display: none !important; }
#ovr-report-form .person-involved-fields { gap: 16px; }
#ovr-report-form .person-involved-fields > .ovr-choice-field { margin-bottom: 2px; }
#ovr-report-form .ovr-choice-label.required::after {
  content: "*";
  color: var(--danger);
  margin-inline-start: 3px;
}
@media (max-width: 760px) {
  #ovr-report-form .person-involved-panel { padding: 13px; }
}

/* v1.26.6 - keep Branch and Reporting Department / Clinic aligned in Stage 1. */
#ovr-report-form .incident-routing-field {
  align-self: start;
  display: flex;
  min-width: 0;
  flex-direction: column;
}
#ovr-report-form .incident-routing-label {
  min-height: 19px;
  margin: 0;
  line-height: 1.35;
}
#ovr-report-form .incident-routing-field > select,
#ovr-report-form .incident-routing-field > input[type="text"] {
  width: 100%;
  margin-top: 6px;
}
#ovr-report-form .incident-routing-field > .field-help,
#ovr-report-form .incident-routing-field > .profile-lock-note {
  margin-top: 7px;
}
html[dir="rtl"] #ovr-report-form .incident-routing-label {
  text-align: right;
}

/* v1.26.8 — dashboard deadline row */
.dashboard-overdue-section { width: 100%; }
.dashboard-overdue-section .card-body { padding-top: 18px; padding-bottom: 18px; }
.dashboard-overdue-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.dashboard-overdue-empty { padding: 22px 12px; min-height: 0; }
.dashboard-overdue-empty p { max-width: 720px; margin-inline: auto; }
.dashboard-recent-section { width: 100%; }
@media (max-width: 1100px) { .dashboard-overdue-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .dashboard-overdue-grid { grid-template-columns: 1fr; } .dashboard-overdue-empty { padding: 18px 8px; } }

/* v1.27.0 — guarded production Go-Live OVR Reset Center */
.go-live-reset-stats { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:10px; }
.go-live-reset-stats > div { min-width:0; padding:14px 15px; border:1px solid var(--line); border-radius:12px; background:#f8fbfb; display:grid; gap:4px; }
.go-live-reset-stats small { color:var(--muted); font-size:.7rem; font-weight:750; text-transform:uppercase; letter-spacing:.035em; }
.go-live-reset-stats strong { color:var(--navy); font-size:1.4rem; line-height:1.1; }
.go-live-preserve-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.go-live-preserve-grid > div { padding:15px 16px; border:1px solid var(--line); border-radius:12px; background:#fff; }
.go-live-preserve-grid strong { color:var(--navy); }
.go-live-preserve-grid p { margin:6px 0 0; color:var(--muted); line-height:1.55; }
.go-live-confirm-stack { display:grid; gap:13px; max-width:920px; }
.go-live-confirm-choice { margin:0; padding:13px 14px; border:1px solid var(--line); border-radius:12px; background:#fbfdfd; align-items:flex-start; }
.go-live-confirm-choice span strong, .go-live-confirm-choice span small { display:block; }
.go-live-confirm-choice span small { margin-top:4px; color:var(--muted); line-height:1.45; }
.danger-zone-card { border-color:#efc7c7; }
.danger-zone-card > .card-header { background:#fff7f7; }
@media (max-width:1100px) { .go-live-reset-stats { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media (max-width:700px) { .go-live-reset-stats, .go-live-preserve-grid { grid-template-columns:1fr; } }


/* v1.27.1 — professional Go-Live Reset confirmation experience */
.go-live-danger-zone { overflow:hidden; border:1px solid #eabbb6; box-shadow:0 16px 38px rgba(111,35,28,.08); }
.go-live-danger-zone > .card-header.go-live-danger-header { padding:22px 28px; background:linear-gradient(180deg,#fffafa 0%,#fff6f5 100%); border-bottom:1px solid #efd5d2; }
.go-live-danger-header h2 { margin:5px 0 3px; }
.go-live-danger-header p { margin:0; }
.go-live-danger-kicker { display:inline-flex; align-items:center; gap:7px; color:#a8382f; font-size:.72rem; font-weight:850; letter-spacing:.045em; text-transform:uppercase; }
.go-live-danger-kicker > span { display:inline-grid; place-items:center; width:20px; height:20px; border-radius:999px; background:#fbe7e5; color:#a8382f; font-size:.75rem; }
.go-live-reset-form { width:100%; max-width:none; margin:0; padding:26px 28px 28px; }
.go-live-reset-form-inner { width:min(1120px,100%); margin-inline:auto; display:grid; gap:20px; }
.go-live-safety-section, .go-live-authorization-section { padding:18px; border:1px solid #dce7e9; border-radius:15px; background:#fbfdfd; }
.go-live-authorization-section { border-color:#ead7d4; background:#fffdfd; }
.go-live-section-heading { display:flex; align-items:flex-start; gap:12px; margin-bottom:14px; }
.go-live-section-heading h3 { margin:0; color:var(--navy); font-size:.96rem; }
.go-live-section-heading p { margin:3px 0 0; color:var(--muted); font-size:.76rem; line-height:1.5; }
.go-live-section-icon { display:inline-grid; place-items:center; flex:0 0 32px; width:32px; height:32px; border-radius:10px; background:#e8f6f4; color:#0b7776; font-weight:900; }
.go-live-section-icon.danger { background:#fbe9e6; color:#ae342b; }
.go-live-confirm-stack { display:grid; gap:10px; max-width:none; }
.go-live-confirm-choice,
.go-live-confirm-choice.required { position:relative; display:grid; grid-template-columns:26px minmax(0,1fr); gap:13px; align-items:flex-start; margin:0; padding:15px 16px; border:1px solid #d7e4e6; border-radius:13px; background:#fff; cursor:pointer; transition:border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease; }
.go-live-confirm-choice:hover { border-color:#a9cfd1; background:#f8fcfc; box-shadow:0 7px 18px rgba(15,122,125,.055); }
.go-live-confirm-choice:focus-within { border-color:#5eafb2; box-shadow:0 0 0 3px rgba(15,122,125,.12); }
.go-live-confirm-choice.required::after { display:none !important; }
.go-live-check-control { position:relative; display:grid; place-items:center; width:24px; height:24px; margin-top:1px; }
.go-live-check-control input { position:absolute; inset:0; width:24px; height:24px; margin:0; opacity:0; cursor:pointer; }
.go-live-checkmark { display:grid; place-items:center; width:22px; height:22px; border:2px solid #a9bcc2; border-radius:7px; background:#fff; transition:all .16s ease; }
.go-live-check-control input:checked + .go-live-checkmark { border-color:var(--teal); background:var(--teal); box-shadow:0 4px 10px rgba(15,122,125,.18); }
.go-live-check-control input:checked + .go-live-checkmark::after { content:"✓"; color:#fff; font-size:.85rem; font-weight:950; line-height:1; }
.go-live-check-control input:focus-visible + .go-live-checkmark { outline:3px solid rgba(15,122,125,.18); outline-offset:2px; }
.go-live-choice-copy { min-width:0; display:block; }
.go-live-choice-title { display:inline; color:#2d4650; font-size:.86rem; font-weight:820; line-height:1.45; }
.go-live-choice-copy small { display:block; margin-top:4px; color:var(--muted); font-size:.73rem; font-weight:560; line-height:1.5; }
.go-live-manual-required { color:var(--danger); font-weight:950; margin-inline-start:2px; }
.go-live-authorization-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.go-live-critical-field { min-width:0; padding:14px; border:1px solid #e2e8ea; border-radius:12px; background:#fff; }
.go-live-critical-field.required { display:flex; }
.go-live-critical-field .go-live-field-title { color:#304952; font-weight:820; }
.go-live-critical-field > input { min-height:50px; margin-top:9px; border-color:#cbdcdf; background:#fff; }
.go-live-critical-field > input:focus { border-color:#71b9bb; box-shadow:0 0 0 3px rgba(15,122,125,.11); }
.go-live-critical-field > small { margin-top:7px; color:var(--muted); font-size:.7rem; line-height:1.45; }
.go-live-critical-field code { white-space:normal; overflow-wrap:anywhere; }
.go-live-final-warning { display:flex; align-items:flex-start; gap:12px; padding:14px 16px; border:1px solid #edc7c2; border-radius:12px; background:#fff8f7; color:#714039; }
.go-live-final-warning-icon { display:inline-grid; place-items:center; flex:0 0 28px; width:28px; height:28px; border-radius:9px; background:#f9dfdc; color:#a8372d; font-weight:950; }
.go-live-final-warning strong { color:#8d3028; }
.go-live-final-warning p { margin:4px 0 0; color:#80605c; font-size:.74rem; line-height:1.5; }
.go-live-reset-actions { display:flex; align-items:center; justify-content:flex-end; gap:10px; padding-top:2px; }
.go-live-reset-actions .button { min-height:46px; }
.go-live-reset-button { min-width:300px; justify-content:center; gap:8px; }
.go-live-reset-button > span { display:inline-grid; place-items:center; width:20px; height:20px; border-radius:999px; background:rgba(255,255,255,.18); }
html[dir="rtl"] .go-live-section-heading, html[dir="rtl"] .go-live-final-warning { text-align:right; }
@media (max-width:820px) {
  .go-live-danger-zone > .card-header.go-live-danger-header, .go-live-reset-form { padding:18px; }
  .go-live-authorization-grid { grid-template-columns:1fr; }
  .go-live-reset-actions { align-items:stretch; flex-direction:column-reverse; }
  .go-live-reset-actions .button, .go-live-reset-button { width:100%; min-width:0; }
}
@media (max-width:480px) {
  .go-live-safety-section, .go-live-authorization-section { padding:14px; }
  .go-live-confirm-choice, .go-live-confirm-choice.required { padding:13px; gap:10px; }
  .go-live-choice-title { font-size:.82rem; }
}

/* v1.28.0 — optional per-user specific Manager / Department Head routing override. */
.user-manager-override-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
  gap: 18px 24px;
  padding: 18px 20px;
  border: 1px solid #cfe1e5;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fcfc 0%, #f3f8f9 100%);
  box-shadow: inset 4px 0 0 rgba(18, 120, 132, .24);
}
.user-manager-override-copy, .user-manager-override-control { min-width: 0; }
.user-manager-override-title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.user-manager-override-title-row strong { color: var(--navy); font-size: .96rem; }
.user-manager-override-copy p { margin: 0; color: #536a74; font-size: .8rem; line-height: 1.55; max-width: 760px; }
.user-manager-override-control > label { display: block; margin-bottom: 7px; color: #304752; font-weight: 780; font-size: .78rem; }
.user-manager-override-control select { width: 100%; }
.user-manager-routing-priority {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding-top: 13px;
  border-top: 1px solid #d8e6e9;
  color: #49616a;
  font-size: .74rem;
}
.user-manager-routing-priority > strong { color: var(--navy); margin-inline-end: 3px; }
.user-manager-routing-priority > span { display: inline-flex; align-items: center; gap: 5px; }
.user-manager-routing-priority b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 999px; background: #e2f2f3; color: #0b6d78; font-size: .68rem; }
.user-specific-manager-summary { margin-top: 8px; padding-top: 7px; border-top: 1px dashed #d8e3e7; color: #365761; font-size: .7rem; line-height: 1.4; }
.user-specific-manager-summary.muted { color: var(--muted); }
html[dir="rtl"] .user-manager-override-card { box-shadow: inset -4px 0 0 rgba(18, 120, 132, .24); }
@media (max-width: 900px) {
  .user-manager-override-card { grid-template-columns: 1fr; }
  .user-manager-routing-priority { grid-column: 1; }
}
@media (max-width: 520px) {
  .user-manager-override-card { padding: 15px; gap: 14px; }
  .user-manager-routing-priority { align-items: flex-start; flex-direction: column; }
}

/* v1.29.0 — Telegram Center */
.page-eyebrow {
  display: inline-block;
  margin-bottom: 6px;
  color: var(--teal, #0f7a7d);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .11em;
  text-transform: uppercase;
}
.page-header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.integration-page-header, .telegram-page-header { align-items: flex-end; }
.compact-test-card { max-width: 760px; }
.inline-test-form { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: end; }
.inline-test-form label { margin: 0; }

.telegram-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0,1.45fr) minmax(300px,.55fr);
  gap: 24px;
  align-items: center;
  min-height: 190px;
  padding: 28px;
  border: 1px solid #c8dcdf;
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 12%, rgba(255,255,255,.16), transparent 27%),
    linear-gradient(135deg, #0b3c49 0%, #0d5661 52%, #11737a 100%);
  box-shadow: 0 18px 45px rgba(10,52,64,.14);
  color: #fff;
}
.telegram-hero::after {
  content: "";
  position: absolute;
  width: 250px;
  height: 250px;
  right: -92px;
  bottom: -155px;
  border: 42px solid rgba(255,255,255,.06);
  border-radius: 50%;
  pointer-events: none;
}
.telegram-hero.is-partial { background: linear-gradient(135deg, #163f4b 0%, #42606a 100%); }
.telegram-hero.is-offline { background: linear-gradient(135deg, #394b52 0%, #60747a 100%); }
.telegram-hero-main { position: relative; z-index: 1; display: grid; grid-template-columns: 62px minmax(0,1fr); gap: 18px; align-items: center; }
.telegram-mark {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 18px;
  background: rgba(255,255,255,.12);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
  font-size: 1.7rem;
  transform: rotate(-18deg);
}
.telegram-kicker { display: block; margin-bottom: 5px; color: #bfe6e7; font-size: .68rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.telegram-hero h2 { margin: 0; color: #fff; font-size: clamp(1.25rem,2vw,1.8rem); }
.telegram-hero p { max-width: 720px; margin: 8px 0 0; color: #d9eff0; line-height: 1.55; }
.telegram-readiness { position: relative; z-index: 1; display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; padding: 17px; border: 1px solid rgba(255,255,255,.18); border-radius: 14px; background: rgba(2,27,33,.22); backdrop-filter: blur(6px); }
.telegram-readiness-score { min-width: 74px; padding-right: 14px; border-right: 1px solid rgba(255,255,255,.15); }
.telegram-readiness-score strong { display: block; font-size: 1.4rem; line-height: 1; }
.telegram-readiness-score span { display: block; margin-top: 5px; color: #cde5e6; font-size: .62rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.telegram-readiness-list { display: grid; gap: 7px; }
.telegram-readiness-list span { display: flex; align-items: center; gap: 8px; color: #d6e8e9; font-size: .73rem; font-weight: 750; }
.telegram-readiness-list i { width: 9px; height: 9px; border: 2px solid rgba(255,255,255,.55); border-radius: 50%; }
.telegram-readiness-list span.ok i { border-color: #c7f6d7; background: #8ce3aa; box-shadow: 0 0 0 3px rgba(140,227,170,.12); }

.telegram-metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; margin-top: 16px; }
.telegram-metric-card { min-width: 0; padding: 17px 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 7px 20px rgba(19,54,63,.055); }
.telegram-metric-label { display: block; color: var(--muted); font-size: .63rem; font-weight: 900; letter-spacing: .075em; text-transform: uppercase; }
.telegram-metric-card strong { display: block; margin-top: 5px; color: var(--navy); font-size: 1.55rem; line-height: 1.15; }
.telegram-metric-card small { display: block; margin-top: 4px; color: var(--muted); line-height: 1.4; }

.telegram-health-card { border-color: #bdd9d9; }
.telegram-health-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.telegram-health-grid > div { min-width: 0; padding: 14px; border: 1px solid #dce9ea; border-radius: 12px; background: #f8fbfb; }
.telegram-health-grid span { display: block; color: var(--muted); font-size: .62rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.telegram-health-grid strong { display: block; margin-top: 4px; color: var(--navy); }
.telegram-health-grid small { display: block; overflow-wrap: anywhere; margin-top: 5px; color: var(--muted); line-height: 1.4; }

.telegram-main-grid { display: grid; grid-template-columns: minmax(0,1.45fr) minmax(320px,.55fr); gap: 18px; align-items: start; }
.telegram-side-stack { display: grid; gap: 18px; }
.telegram-enable-row { margin-bottom: 2px; }
.telegram-enable-choice { align-items: flex-start; padding: 14px 15px; border-radius: 12px; background: #f7fbfb; }
.telegram-enable-choice input { flex: 0 0 auto; }
.telegram-endpoint-box { display: grid; gap: 5px; padding: 13px 14px; border: 1px solid #d9e6e7; border-radius: 11px; background: #f7fafb; }
.telegram-endpoint-box span { color: var(--muted); font-size: .63rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.telegram-endpoint-box code { overflow-wrap: anywhere; color: var(--navy); font-weight: 750; }
.telegram-endpoint-box small { color: var(--muted); line-height: 1.45; }
.telegram-config-actions { margin-top: 2px; }

.telegram-operation-list { display: grid; gap: 9px; }
.telegram-operation-list form { margin: 0; }
.telegram-operation-button {
  width: 100%;
  display: grid;
  grid-template-columns: 36px minmax(0,1fr);
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid #d6e4e5;
  border-radius: 11px;
  background: #fff;
  color: var(--navy);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.telegram-operation-button:hover { border-color: #a6cecf; background: #f6fbfb; box-shadow: 0 6px 15px rgba(12,93,98,.06); transform: translateY(-1px); }
.telegram-operation-button:focus-visible { outline: 3px solid rgba(15,122,125,.18); outline-offset: 2px; }
.telegram-operation-button.danger { border-color: #ead3d3; }
.telegram-operation-button.danger:hover { border-color: #d9aaaa; background: #fff8f8; }
.telegram-op-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: #eaf6f6; color: #0b6b70; font-size: 1rem; font-weight: 900; }
.telegram-operation-button.danger .telegram-op-icon { background: #fbeeee; color: #9c3c3c; }
.telegram-operation-button strong, .telegram-operation-button small { display: block; }
.telegram-operation-button strong { font-size: .78rem; }
.telegram-operation-button small { margin-top: 2px; color: var(--muted); font-size: .66rem; line-height: 1.35; font-weight: 550; }

.telegram-test-form { display: grid; gap: 11px; }
.telegram-test-form label { margin: 0; }
.telegram-or { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .64rem; font-weight: 850; text-transform: uppercase; letter-spacing: .07em; }
.telegram-or::before, .telegram-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.telegram-linked-table-wrap, .telegram-delivery-table-wrap { border-top: 1px solid #dce7ea; }
.telegram-linked-table, .telegram-delivery-table { min-width: 100%; }
.telegram-linked-table td, .telegram-delivery-table td { vertical-align: top; }
.telegram-linked-table thead th, .telegram-delivery-table thead th { white-space: nowrap; }
.telegram-linked-table td strong, .telegram-linked-table td small,
.telegram-delivery-table td strong, .telegram-delivery-table td small { display: block; }
.telegram-linked-table td small, .telegram-delivery-table td small { margin-top: 3px; color: var(--muted); font-size: .68rem; line-height: 1.45; }
.telegram-linked-table code, .telegram-delivery-table code { white-space: nowrap; }
.telegram-linked-table form, .telegram-delivery-table form { margin: 0; }
.telegram-person-cell { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.telegram-person-avatar { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 12px; background: linear-gradient(135deg,#e8f6f6,#d5ebeb); color: #0b6b70; font-size: .8rem; font-weight: 900; box-shadow: inset 0 0 0 1px #c8dfe0; }
.telegram-person-cell strong, .telegram-scope-cell strong, .telegram-purpose-cell strong, .telegram-result-cell strong, .telegram-time-cell strong { color: var(--navy); }
.telegram-person-cell > div, .telegram-scope-cell, .telegram-chat-cell, .telegram-status-cell, .telegram-purpose-cell, .telegram-result-cell, .telegram-time-cell { min-width: 0; }
.telegram-scope-cell strong { font-size: .78rem; }
.telegram-chat-pill { display: inline-flex; align-items: center; min-height: 31px; padding: 5px 10px; border-radius: 999px; border: 1px solid #d8e6e8; background: #f6fbfb; color: #21424e; font-size: .74rem; font-weight: 850; letter-spacing: .04em; }
.telegram-chat-cell small { margin-top: 6px; }
.telegram-status-cell .status { margin-bottom: 2px; }
.telegram-table-actions { justify-content: flex-end; }
.telegram-time-cell strong { font-size: .76rem; }
.telegram-time-cell small { font-variant-numeric: tabular-nums; }
.telegram-purpose-cell strong, .telegram-result-cell strong { font-size: .77rem; line-height: 1.42; }
.telegram-result-cell small, .telegram-purpose-cell small { overflow-wrap: anywhere; }
.telegram-directory-table tbody tr:hover, .telegram-delivery-table tbody tr:hover { background: #fbfefe; }
.telegram-linked-card .status, .telegram-delivery-card .status { vertical-align: top; }
.card-footer-note { padding: 10px 16px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .7rem; }
.telegram-empty-state { min-height: 115px; }

.telegram-command-guide { display: grid; grid-template-columns: minmax(260px,.75fr) minmax(0,1.25fr); gap: 24px; align-items: start; padding: 22px; border: 1px solid #d5e5e6; border-radius: 16px; background: linear-gradient(135deg,#f8fbfb,#f1f8f8); }
.telegram-command-copy h2 { margin: 0; color: var(--navy); }
.telegram-command-copy p { margin: 8px 0 0; color: var(--muted); line-height: 1.55; }
.telegram-command-grid { display: grid; grid-template-columns: minmax(150px,.5fr) minmax(0,1fr); gap: 7px 12px; align-items: center; }
.telegram-command-grid code { padding: 7px 9px; border: 1px solid #d7e6e7; border-radius: 8px; background: #fff; color: #075e64; font-weight: 800; }
.telegram-command-grid span { color: var(--muted); font-size: .72rem; }

[dir="rtl"] .telegram-operation-button { text-align: right; }
[dir="rtl"] .telegram-readiness-score { padding-right: 0; padding-left: 14px; border-right: 0; border-left: 1px solid rgba(255,255,255,.15); }
[dir="rtl"] .telegram-hero::after { right: auto; left: -92px; }
[dir="rtl"] .telegram-mark { transform: rotate(198deg); }
[dir="rtl"] .telegram-table-actions { justify-content: flex-start; }

@media (max-width: 980px) {
  .telegram-person-avatar { width: 34px; height: 34px; flex-basis: 34px; border-radius: 11px; }
  .telegram-linked-table td, .telegram-delivery-table td { padding-top: 12px; padding-bottom: 12px; }
}

@media (max-width: 1180px) {
  .telegram-hero { grid-template-columns: 1fr; }
  .telegram-metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .telegram-main-grid { grid-template-columns: 1fr; }
  .telegram-health-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .telegram-side-stack { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .integration-page-header, .telegram-page-header { align-items: flex-start; }
  .page-header-actions { width: 100%; justify-content: stretch; }
  .page-header-actions .button { flex: 1 1 auto; text-align: center; }
  .telegram-hero { padding: 20px; border-radius: 14px; }
  .telegram-hero-main { grid-template-columns: 46px minmax(0,1fr); gap: 13px; }
  .telegram-mark { width: 46px; height: 46px; border-radius: 13px; font-size: 1.2rem; }
  .telegram-readiness { grid-template-columns: 1fr; }
  .telegram-readiness-score { padding: 0 0 12px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.15); }
  [dir="rtl"] .telegram-readiness-score { padding: 0 0 12px; border-left: 0; border-bottom: 1px solid rgba(255,255,255,.15); }
  .telegram-metric-grid, .telegram-health-grid, .telegram-side-stack { grid-template-columns: 1fr; }
  .inline-test-form { grid-template-columns: 1fr; }
  .telegram-command-guide { grid-template-columns: 1fr; padding: 18px; }
  .telegram-command-grid { grid-template-columns: 1fr; }
  .telegram-command-grid span { margin-bottom: 4px; padding-inline: 3px; }
}
