:root {
  font-family: "Segoe UI", "Noto Sans Arabic", Tahoma, sans-serif;
  color: #172b37;
  background: #f3f6f7;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --navy: #102b3b;
  --navy-2: #183d50;
  --teal: #087f78;
  --teal-light: #e4f4f1;
  --line: #e3e9eb;
  --muted: #71808a;
  --white: #fff;
  --amber: #a85d08;
  --red: #a63d37;
  --shadow: 0 8px 24px rgba(17, 43, 59, .055);
  --control-height: 38px;
  --control-radius: 7px;
  --field-gap: 6px;
  --form-gap: 14px;
  --checkbox-size: 16px;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 3px solid #48bcb2; outline-offset: 2px; }
.demo-banner { background: #fff3dc; color: #714109; padding: 8px 20px; text-align: center; font-size: 12px; font-weight: 700; letter-spacing: .035em; border-bottom: 1px solid #f0dfbf; }
.app-shell { display: flex; min-height: calc(100vh - 36px); }
.sidebar { width: 248px; background: var(--navy); color: #e9f0f2; padding: 22px 14px 18px; flex: 0 0 248px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 24px; border-bottom: 1px solid rgba(255,255,255,.12); }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; background: #0a8078; border-radius: 11px; font-size: 18px; font-weight: 700; }
.brand-name { font-size: 16px; font-weight: 700; line-height: 1.15; }
.brand-sub { color: #9db0b8; font-size: 10px; margin-top: 4px; letter-spacing: .08em; text-transform: uppercase; }
.nav-section { margin: 22px 10px 8px; text-transform: uppercase; color: #8fa4ae; font-size: 10px; font-weight: 700; letter-spacing: .11em; }
.nav-list { display: grid; gap: 3px; }
.nav-item { width: 100%; border: 0; background: transparent; color: #bfccd1; padding: 10px 11px; border-radius: 8px; display: flex; align-items: center; gap: 11px; text-align: start; font-size: 13px; transition: .15s; }
.nav-item:hover { background: rgba(255,255,255,.08); color: white; }
.nav-item.active { background: #1c4958; color: white; font-weight: 600; box-shadow: inset 3px 0 #46b7aa; }
.nav-icon { width: 18px; text-align: center; font-size: 15px; opacity: .92; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid rgba(255,255,255,.12); padding: 15px 9px 0; color: #9db0b8; font-size: 11px; line-height: 1.6; }
.backend-note { background: rgba(255,255,255,.08); padding: 10px; border-radius: 8px; margin-top: 12px; color: #d5e0e3; }
.main-area { min-width: 0; flex: 1; }
.topbar { height: 68px; padding: 0 30px; background: white; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.crumb { color: var(--muted); font-size: 12px; }
.site-label { font-size: 13px; color: #314550; font-weight: 600; }
.select-compact { min-height: var(--control-height); border: 1px solid var(--line); color: #334852; border-radius: var(--control-radius); padding: 8px 10px; background: #fff; font-size: 12px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #dff1ed; color: #126f69; font-weight: 700; font-size: 12px; }
.mobile-menu { display: none; border: 0; background: none; font-size: 20px; color: var(--navy); }
.page { max-width: 1500px; margin: auto; padding: 28px 30px 44px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 23px; }
.eyebrow { color: var(--teal); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; margin-bottom: 7px; }
h1 { color: var(--navy); font-size: 25px; letter-spacing: -.035em; margin: 0; line-height: 1.25; }
.subtitle { color: var(--muted); margin: 7px 0 0; font-size: 13px; line-height: 1.55; max-width: 690px; }
.heading-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.button { border: 1px solid transparent; border-radius: var(--control-radius); padding: 9px 13px; background: #fff; color: #344852; font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: var(--control-height); }
.button:hover { filter: brightness(.97); }
.button.primary { background: var(--teal); color: white; }
.button.primary:hover { background: #066c67; }
.button.outline { border-color: #d9e2e5; }
.button.danger { color: var(--red); border-color: #ecd0cd; background: #fff; }
.button.small { min-height: 29px; padding: 6px 9px; font-size: 11px; }
.button:disabled { opacity: .55; cursor: not-allowed; }
.grid { display: grid; gap: 16px; }
.stats-grid { grid-template-columns: repeat(4, minmax(0,1fr)); margin-bottom: 19px; }
.stat-card, .card { background: white; border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow); }
.card { min-width: 0; }
.stat-card { padding: 17px 18px; min-height: 112px; }

.stat-card-action {
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.stat-card-action:hover {
  transform: translateY(-1px);
  border-color: #9fc8c4;
  box-shadow: 0 8px 20px rgba(23, 59, 72, .10);
}

.stat-card-action:focus-visible {
  outline: 3px solid rgba(8, 127, 120, .28);
  outline-offset: 2px;
}

.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; }
.stat-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: var(--teal); background: var(--teal-light); font-size: 14px; }
.stat-value { color: var(--navy); font-size: 27px; font-weight: 700; letter-spacing: -.04em; margin-top: 9px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.device-date { display: inline-flex; flex-direction: column; gap: 2px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--teal-light); font-size: 13px; color: var(--navy); }
.device-date-label { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.task-days { gap: 14px; }
.task-day-today { border-color: #9fc8c4; box-shadow: 0 6px 18px rgba(23, 59, 72, .10); }
.archived-tasks { margin-top: 16px; }
.archived-tasks .card { background: #f6f7f7; border-style: dashed; }
.task-archived { opacity: .78; background: #f6f7f7; }
.task-archived td:first-child { border-inline-start: 3px solid #b9c3c6; }
.action-menu { display: inline-block; }
.action-menu-list { position: fixed; z-index: 60; min-width: 220px; max-width: calc(100vw - 16px); padding: 6px; background: white; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 28px rgba(23, 59, 72, .16); display: flex; flex-direction: column; gap: 2px; }
.action-menu-list[hidden] { display: none; }
.action-menu-item { border: 0; background: none; text-align: start; padding: 9px 10px; border-radius: 7px; font: inherit; font-size: 13px; color: var(--navy); cursor: pointer; min-height: 36px; }
.action-menu-item:hover, .action-menu-item:focus-visible { background: var(--teal-light); outline: none; }
.action-menu-item:focus-visible { box-shadow: inset 0 0 0 2px rgba(8, 127, 120, .35); }
.request-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 18px; margin: 0 0 16px; }
.request-field dt { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 3px; }
.request-field dd { margin: 0; color: var(--navy); font-size: 13px; overflow-wrap: anywhere; }
.request-query { margin: 0; padding: 12px 14px; background: #f6f9f9; border: 1px solid var(--line); border-radius: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.request-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.request-timeline li { padding: 10px 12px; border: 1px solid var(--line); border-inline-start: 3px solid var(--teal); border-radius: 8px; background: white; }
.request-event-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 13px; }
.request-event-message { margin: 6px 0 0; font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.request-toolbar { flex-wrap: wrap; margin: 14px 0; }
.request-form { display: flex; flex-direction: column; gap: 12px; max-width: 640px; }
.request-form textarea { width: 100%; box-sizing: border-box; }
@media(max-width:720px) { .request-fields { grid-template-columns: 1fr; } .request-form { max-width: none; } .action-menu-list { min-width: 200px; } }
.stat-foot { margin-top: 2px; color: var(--muted); font-size: 10px; }
.dashboard-grid { grid-template-columns: minmax(0,1.4fr) minmax(300px,.9fr); align-items: stretch; }
.card { padding: 18px; }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.card-title { margin: 0; color: var(--navy); font-size: 14px; font-weight: 700; }
.card-description { color: var(--muted); font-size: 11px; margin-top: 5px; line-height: 1.5; }
.text-link { border: 0; background: none; color: var(--teal); font-size: 11px; font-weight: 700; padding: 3px; }
.list { display: grid; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid #edf0f1; }
.list-row:first-child { border-top: 0; }
.list-main { min-width: 0; }
.list-title { color: #263e49; font-size: 12px; font-weight: 600; }
.list-meta { color: var(--muted); font-size: 10px; margin-top: 4px; line-height: 1.45; }
.task-history-json { max-width: 100%; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 10px; color: var(--muted); }
.status { display: inline-flex; align-items: center; border-radius: 99px; padding: 4px 8px; font-size: 10px; font-weight: 700; white-space: nowrap; background: #eef2f3; color: #5c6b72; }
.status.green { background: #e6f4ef; color: #22735d; }
.status.amber { background: #fff2dc; color: #9b5a0e; }
.status.red { background: #fae9e7; color: #a6423c; }
.status.blue { background: #e8eff8; color: #3d658e; }
.table-wrap { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; min-width: 640px; }
th { background: #f7f9fa; color: #6a7980; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; text-align: left; padding: 11px 12px; white-space: nowrap; }
td { padding: 12px; border-top: 1px solid #edf0f1; color: #334852; font-size: 11px; vertical-align: middle; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.period-presets, .report-export-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.row-actions { white-space: nowrap; }
.status-chart { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfd; }
.status-chart figcaption { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.status-chart-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.status-chart-row { display: grid; grid-template-columns: minmax(96px, 140px) 1fr minmax(84px, auto); gap: 10px; align-items: center; }
.status-chart-track { height: 18px; border-radius: 4px; background: #e9eff1; box-shadow: inset 0 2px 3px rgba(23, 59, 72, .18); overflow: hidden; }
.status-chart-bar { display: block; height: 100%; border-radius: 4px; box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .18), inset 0 4px 0 rgba(255, 255, 255, .28); }
.status-chart-closed { background: #2e7d4f; }
.status-chart-open { background: repeating-linear-gradient(45deg, #b7791f 0 6px, #d69e2e 6px 12px); }
.status-chart-under-action { background: repeating-linear-gradient(-45deg, #9b2c2c 0 3px, #c53030 3px 9px); }
.status-chart-value { font-variant-numeric: tabular-nums; font-weight: 600; }
.report-print-list { display: none; }
@media(max-width:720px) { .status-chart-row { grid-template-columns: 1fr; gap: 4px; } }
@media print {
  body.printing-report-list > *:not(#report-print-list) { display: none !important; }
  body.printing-report-list .report-print-list { display: block; font-size: 10px; }
  .report-print-list table { width: 100%; border-collapse: collapse; }
  .report-print-list th, .report-print-list td { border: 1px solid #c9d3d6; padding: 3px 5px; text-align: start; }
  .status-chart-bar { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
.filters .select-compact { min-width: 130px; }
.empty-state { text-align: center; color: var(--muted); padding: 35px 16px; font-size: 12px; }
.empty-icon { font-size: 25px; color: #a8b7bc; margin-bottom: 7px; }
.activity-groups { display: grid; grid-template-columns: minmax(0,1fr); gap: 16px; }
.schedule-grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 7px; }
.day-cell { border: 1px solid #e6ebed; border-radius: 7px; min-height: 75px; padding: 8px; background: #fafcfc; }
.day-number { font-size: 11px; font-weight: 700; color: #475a63; }
.day-activity { margin-top: 7px; color: #176c66; font-size: 9px; line-height: 1.35; }
.day-empty { margin-top: 7px; color: #a2adb1; font-size: 9px; }
.weekday-cell { min-height: 61px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--form-gap); }
.field { display: grid; gap: var(--field-gap); min-width: 0; }
.field.full { grid-column: 1/-1; }
.field label { color: #40545d; font-size: 11px; font-weight: 600; }
.field input:not([type="checkbox"]), .field select, .field textarea { width: 100%; min-height: var(--control-height); border: 1px solid #dce4e6; border-radius: var(--control-radius); padding: 9px 10px; color: #2d424b; background: #fff; font-size: 12px; }
.field textarea { resize: vertical; min-height: 83px; }
.field .help { color: var(--muted); font-weight: 400; font-size: 10px; line-height: 1.4; }
.section-block { border-top: 1px solid var(--line); padding-top: 17px; margin-top: 18px; }
.section-block:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.section-title { color: var(--navy); font-size: 13px; font-weight: 700; margin-bottom: 13px; }
.inline-row { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.map-preview { position: relative; min-height: 240px; overflow: hidden; border-radius: 9px; border: 1px solid #dce7e3; background: linear-gradient(145deg,#e7f1eb,#d6e8df 54%,#edf0dd); }
.map-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map-caption { position: absolute; bottom: 10px; left: 12px; background: rgba(255,255,255,.9); border: 1px solid #dde6e4; border-radius: 6px; padding: 6px 9px; font-size: 10px; color: #4d6064; }
.marker { cursor: pointer; }
.location-details { display: flex; gap: 12px; flex-wrap: wrap; color: #53656b; font-size: 10px; margin-top: 10px; }
.notice { padding: 10px 12px; border-radius: 7px; font-size: 11px; line-height: 1.5; background: #f1f6f7; color: #4e616a; border: 1px solid #e2eaec; }
.notice.warning { background: #fff6e8; border-color: #f1e2c5; color: #78501b; }
.notice.success { background: #eaf6f1; border-color: #d6ebe2; color: #286b56; }
.assistant-thread { display: grid; gap: 12px; max-width: 820px; }
.message { border-radius: 10px; padding: 13px 15px; max-width: 90%; font-size: 12px; line-height: 1.6; }
.message.user { background: #e6f2f1; color: #214c4b; margin-inline-start: auto; }
.message.bot { background: white; border: 1px solid var(--line); color: #354c56; }
.citation { background: #f7f9f9; border-inline-start: 3px solid var(--teal); padding: 8px 10px; margin-top: 9px; font-size: 10px; }
.message-composer { display: flex; gap: 8px; margin-top: 14px; max-width: 820px; }
.message-composer input { flex: 1; border: 1px solid #dce4e6; border-radius: 7px; padding: 10px; min-width: 0; font-size: 12px; }
.pill-row { display: flex; gap: 7px; flex-wrap: wrap; }
.pill { border-radius: 99px; padding: 6px 9px; background: #f2f5f6; color: #5b6a71; font-size: 10px; }
.day-box { display: inline-flex; flex-direction: column; align-items: center; min-width: 74px; padding: 6px 8px; border-radius: 8px; border: 1px solid transparent; text-align: center; }
.day-box strong { font-size: 20px; line-height: 1.1; }
.day-box span { font-size: 9px; }
.day-green { background: #c8efd4; border-color: #2e9b57; color: #0f4d27; }
.day-yellow { background: #fff0a8; border-color: #c9a400; color: #5c4a00; }
.day-red { background: #f7c1c1; border-color: #c0392b; color: #7a1010; }
.day-grey { background: #e5e9ea; border-color: #9aa7ab; color: #3d4a4f; }
.source-label { color: #9a5a0a; font-size: 10px; font-weight: 700; }
.priority-tiles { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }
.priority-tile { padding: 11px; background: #f8fafb; border: 1px solid var(--line); border-radius: 8px; }
.priority-num { font-weight: 700; font-size: 18px; color: var(--navy); }
.priority-label { font-size: 9px; color: var(--muted); margin-top: 3px; }
.admin-user-management { min-width: 0; max-width: 100%; }
.admin-user-form { margin-bottom: 0; }
.admin-site-field[hidden] { display: none; }
.admin-site-field .notice { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.admin-site-field .notice span { min-width: 0; overflow-wrap: anywhere; }
.admin-checkbox-group { align-content: start; gap: 10px; }
.admin-checkbox-label { display: inline-flex; align-items: center; gap: 8px; width: fit-content; min-height: 22px; cursor: pointer; }
.admin-checkbox { appearance: auto; accent-color: var(--teal); width: var(--checkbox-size); height: var(--checkbox-size); min-height: var(--checkbox-size); margin: 0; flex: 0 0 var(--checkbox-size); }
.admin-user-actions { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; }
.admin-user-actions .button { width: auto; }
.admin-user-form .card-description.full { grid-column: 1 / -1; margin: 0; }
.admin-user-filters { display: grid; grid-template-columns: minmax(180px,1.6fr) repeat(2,minmax(135px,1fr)) auto; align-items: end; gap: 10px; margin-bottom: 14px; }
.admin-user-filters input, .admin-user-filters select { width: 100%; min-width: 0; height: var(--control-height); border: 1px solid #dce4e6; border-radius: var(--control-radius); padding: 8px 10px; color: #2d424b; background: #fff; font-size: 12px; }
.admin-user-filters .button { min-width: 88px; }
.admin-users-table-wrap { overscroll-behavior-inline: contain; }
.admin-users-table { min-width: 900px; }
.admin-user-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.admin-card-gap { height: var(--form-gap); }
.login-view { min-height: 100vh; display: grid; place-items: center; padding: 18px; background: linear-gradient(140deg,#edf3f2,#f7f8f7); }
.login-card { width: min(440px,100%); background: white; padding: 30px; border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 14px; }
.login-card .brand { padding: 0 0 20px; border: 0; color: var(--navy); }
.login-card .brand-sub { color: #788991; }
.login-card h1 { font-size: 23px; margin-top: 10px; }
.login-card .field { margin-top: 15px; }
.login-footer { text-align: center; font-size: 10px; color: var(--muted); margin-top: 15px; }
.password-control { display: flex; gap: 8px; align-items: stretch; }
.password-control input { flex: 1 1 auto; min-width: 0; }
.password-control .button { flex: 0 0 auto; }
.recovery-language { display: flex; justify-content: flex-end; }
.toast { position: fixed; bottom: 20px; inset-inline-end: 22px; background: #183d50; color: white; box-shadow: var(--shadow); padding: 12px 16px; border-radius: 8px; font-size: 12px; z-index: 20; animation: appear .2s ease-out; }
@keyframes appear { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
[dir="rtl"] { font-family: "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif; }
[dir="rtl"] th { text-align: right; }
[dir="rtl"] .nav-item.active { box-shadow: inset -3px 0 #46b7aa; }
[dir="rtl"] .map-caption { left: auto; right: 12px; }
[dir="rtl"] .crumb { direction: rtl; }
@media(max-width:1050px) { .sidebar { width: 220px; flex-basis: 220px; } .page { padding: 23px 20px 35px; } .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .dashboard-grid { grid-template-columns: 1fr; } }
@media(max-width:720px) {
  .app-shell { display: block; }
  .sidebar { display: none; position: fixed; z-index: 10; inset: 36px auto 0 0; width: 264px; overflow-y: auto; box-shadow: 8px 0 30px rgba(0,0,0,.17); }
  [dir="rtl"] .sidebar { inset: 36px 0 0 auto; }
  .sidebar.open { display: flex; }
  .topbar { padding: 0 14px; height: 60px; }
  .mobile-menu { display: block; }
  .site-label, .crumb { display: none; }
  .page { padding: 20px 14px 30px; }
  .page-heading { display: block; }
  .heading-actions { margin-top: 14px; }
  .stats-grid { gap: 9px; }
  .stat-card { padding: 13px; min-height: 100px; }
  .stat-value { font-size: 23px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: auto; }
  .schedule-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .priority-tiles { grid-template-columns: repeat(2,1fr); }
  .card { padding: 14px; }
  h1 { font-size: 22px; }
  .admin-user-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-user-filters input { grid-column: 1 / -1; }
  .admin-user-filters .button { width: 100%; }
  .admin-user-pagination { justify-content: center; }
}
@media(max-width:420px) {
  .admin-user-filters { grid-template-columns: minmax(0,1fr); }
  .admin-user-filters input { grid-column: auto; }
  .admin-user-pagination { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; }
  .admin-user-pagination span { grid-column: 1 / -1; grid-row: 1; text-align: center; }
}
.readonly-value { padding: 9px 11px; border: 1px solid var(--line, #d8dee6); border-radius: 8px; background: #f3f5f8; font-weight: 600; min-height: 38px; }
/* Employees Profile */
.avatar[data-page] { cursor: pointer; overflow: hidden; }
.avatar[data-page]:focus-visible { outline: 2px solid #126f69; outline-offset: 2px; }
.emp-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; flex: 0 0 auto; }
.emp-avatar-fallback { background: #dff1ed; color: #126f69; font-weight: 700; font-size: 12px; }
.emp-avatar-lg { width: 72px; height: 72px; font-size: 22px; }
.emp-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.emp-filters { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(130px, 1fr)) auto; gap: 10px; align-items: end; margin-bottom: 14px; }
.emp-filter-actions { display: flex; flex-direction: row; gap: 8px; }
.emp-table th, .emp-table td { white-space: nowrap; }
.emp-table td:nth-child(7) { white-space: normal; overflow-wrap: anywhere; min-width: 160px; }
.emp-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.emp-detail-grid h3 { font-size: 13px; margin: 0 0 8px; }
.emp-dl { margin: 0; display: grid; gap: 6px; }
.emp-row { display: grid; grid-template-columns: minmax(110px, 40%) 1fr; gap: 8px; font-size: 13px; }
.emp-row dt { color: #5b6770; }
.emp-row dd { margin: 0; overflow-wrap: anywhere; }
.emp-actions { margin-top: 16px; flex-wrap: wrap; }
.field.missing input { border-color: #d9a400; background: #fffbe6; }
.notice.full { grid-column: 1 / -1; }
@media(max-width:1050px) { .emp-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media(max-width:720px) {
  .emp-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .emp-filters .field:first-child, .emp-filter-actions { grid-column: 1 / -1; }
  .emp-filter-actions .button { flex: 1; }
  .emp-row { grid-template-columns: 1fr; gap: 2px; }
  .emp-actions .button { flex: 1 1 auto; }
}
@media(max-width:420px) { .emp-filters { grid-template-columns: minmax(0, 1fr); } }
/* Notifications: header bell, dropdown and page */
.nf-wrap { position: relative; }
.nf-bell { position: relative; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: #334852; display: grid; place-items: center; cursor: pointer; padding: 0; }
.nf-bell:hover { background: var(--teal-light); }
.nf-bell:focus-visible, .nf-main:focus-visible, .nf-read:focus-visible { outline: 2px solid #126f69; outline-offset: 2px; }
.nf-badge { position: absolute; top: -5px; inset-inline-end: -5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; line-height: 18px; text-align: center; box-sizing: border-box; }
.nf-panel { position: absolute; top: calc(100% + 10px); inset-inline-end: 0; width: 380px; max-width: calc(100vw - 16px); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 36px rgba(17, 43, 59, .18); z-index: 60; display: flex; flex-direction: column; }
.nf-panel-head, .nf-panel-foot { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.nf-panel-head { border-bottom: 1px solid var(--line); }
.nf-panel-head .text-link { margin-inline-start: auto; }
.nf-panel-foot { border-top: 1px solid var(--line); justify-content: space-between; }
.nf-panel-body { max-height: min(60vh, 420px); overflow-y: auto; }
.nf-status { font-size: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 9px; padding: 1px 7px; }
.nf-status.live { color: #126f69; border-color: #b9ddd8; background: var(--teal-light); }
.nf-list { list-style: none; margin: 0; padding: 0; }
.nf-item { display: flex; align-items: flex-start; border-bottom: 1px solid var(--line); }
.nf-item:last-child { border-bottom: 0; }
.nf-item.unread { background: #f4faf9; }
.nf-main { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: flex-start; text-align: start; border: 0; background: none; padding: 11px 8px 11px 14px; cursor: pointer; font: inherit; color: inherit; }
.nf-dot { flex: 0 0 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: transparent; }
.nf-item.unread .nf-dot { background: var(--teal); }
.nf-item.unread.sev-warning .nf-dot { background: var(--amber); }
.nf-item.unread.sev-error .nf-dot, .nf-item.unread.sev-critical .nf-dot { background: var(--red); }
.nf-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.nf-title { font-size: 12px; font-weight: 700; color: #1b3340; overflow-wrap: anywhere; }
.nf-msg { font-size: 12px; color: #4a5b65; overflow-wrap: anywhere; }
.nf-meta { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 10.5px; color: var(--muted); }
.nf-chip { border: 1px solid var(--line); border-radius: 9px; padding: 0 7px; font-size: 10px; background: #fff; }
.nf-link { color: var(--teal); font-weight: 700; }
.nf-read { flex: 0 0 auto; margin: 8px 10px 0; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: #126f69; cursor: pointer; font-size: 12px; padding: 0; }
.nf-state { padding: 26px 16px; text-align: center; font-size: 12px; color: var(--muted); }
.nf-error { color: var(--red); }
.nf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nf-filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) auto; gap: 10px; align-items: end; margin-bottom: 14px; }
.nf-filters label { display: flex; flex-direction: column; gap: var(--field-gap); font-size: 11px; color: var(--muted); min-width: 0; }
.nf-filters select, .nf-filters input { min-height: var(--control-height); border: 1px solid var(--line); border-radius: var(--control-radius); padding: 6px 8px; font-size: 12px; min-width: 0; background: #fff; }
.nf-list-page { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.nf-pager { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 14px; font-size: 12px; color: var(--muted); }
.nf-prefs-card summary { cursor: pointer; font-weight: 700; font-size: 13px; }
.nf-prefs { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; max-width: 460px; }
.nf-check { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.nf-check input { width: var(--checkbox-size); height: var(--checkbox-size); }
.nf-disabled { color: var(--muted); }
.nf-kinds { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.nf-kinds legend { font-size: 11px; color: var(--muted); padding: 0 4px; }
.nf-note { font-size: 11px; color: var(--muted); margin: 0; }
.nf-pref-actions { display: flex; align-items: center; gap: 10px; }
.nf-saved { font-size: 12px; color: #126f69; }
@media(max-width:1050px) { .nf-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media(max-width:720px) {
  .nf-wrap { position: static; }
  .nf-panel { position: fixed; top: 76px; inset-inline: 8px; width: auto; max-width: none; }
  .nf-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media(max-width:420px) { .nf-filters { grid-template-columns: minmax(0, 1fr); } }
@media print { .demo-banner, .sidebar, .topbar, .heading-actions, .button { display: none !important; } .app-shell { display: block; } .page { padding: 0; } .card { box-shadow: none; break-inside: avoid; } body { background: white; } }
@page { size: A4 portrait; margin: 6mm; }
@media print {
  .page:has(#report-form) .page-heading { margin-bottom: 4px; }
  .page:has(#report-form) .page-heading p { display: none; }
  .page:has(#report-form) .page-heading h1 { font-size: 15px; margin: 0; }
  .page:has(#report-form) .notice,
  .page:has(#report-form) .card-description,
  .page:has(#report-form) .field .help,
  .page:has(#report-form) .card:has(#files),
  .page:has(#report-form) .card:has(#file-list),
  .page:has(#report-form) .card:has(.list-row) { display: none; }
  .page:has(#report-form) [data-report-status] .list-meta { display: none; }
  #report-form fieldset { display: block; }
  #report-form > fieldset > div[style*="height"] { height: 3px !important; }
  #report-form .card { padding: 4px 6px; border: 1px solid #c9d3d6; border-radius: 3px; break-inside: avoid; }
  #report-form .card-header { margin-bottom: 3px; }
  #report-form .card-title { font-size: 10.5px; }
  #report-form .form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px 8px; }
  #report-form .field { gap: 1px; }
  #report-form .field label { font-size: 8.5px; line-height: 1.15; }
  #report-form .field input:not([type="checkbox"]),
  #report-form .field select,
  #report-form .field textarea { min-height: 0; height: 18px; padding: 1px 4px; font-size: 9.5px; border-radius: 2px; appearance: none; }
  #report-form .field textarea { height: 28px; }
  #report-form #event-entries .form-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Mandatory dashboard-reference refinement — CSS only; selectors are retained. */
:root {
  --navy:#102d3b; --navy-2:#173f57; --teal:#0a9f98; --teal-strong:#087b73;
  --teal-light:#e0f8f3; --canvas:#f1f5f6; --line:#dce5e8; --muted:#637987;
  --ink:#1c2024; --white:#fff; --amber:#a85d08; --red:#b83a3a;
  --shadow:0 8px 24px rgba(15,43,59,.06); --shadow-raised:0 14px 32px rgba(15,43,59,.11);
  --control-height:44px; --control-radius:10px; --focus-ring:0 0 0 3px rgba(10,159,152,.28);
}
body { color:var(--ink); background:var(--canvas); line-height:1.55; }
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible { outline:0; box-shadow:var(--focus-ring); }
.demo-banner { padding:9px 20px; background:#fff4df; color:#754200; border-color:#f1d9a8; }
.sidebar { background:linear-gradient(165deg,#079e98 0%,#167eaf 46%,#1763b0 100%); padding:24px 16px 20px; }
.brand { padding-inline:8px; }
.brand-mark { width:44px; height:44px; overflow:hidden; border:2px solid rgba(255,255,255,.76); border-radius:50%; background:#fff; color:var(--navy); }
.brand-mark img { display:block; width:74px; height:74px; max-width:none; object-fit:contain; }
.brand-name { font-size:17px; }.brand-sub,.nav-section,.sidebar-bottom { color:rgba(255,255,255,.74); }
.nav-item { min-height:42px; border-radius:10px; color:rgba(255,255,255,.9); }.nav-item:hover { background:rgba(6,64,92,.20); }
.nav-item.active { background:rgba(6,64,92,.34); box-shadow:inset 3px 0 #fff; }.backend-note { border:1px solid rgba(255,255,255,.14); border-radius:10px; background:rgba(6,64,92,.20); }
.topbar { min-height:70px; height:auto; padding-inline:30px; background:rgba(255,255,255,.96); }.select-compact,.nf-bell { min-height:42px; border-color:#cfdce1; border-radius:10px; }
.avatar,.emp-avatar-fallback { background:var(--teal-light); color:var(--teal-strong); }.page { padding:30px 32px 48px; }.page-heading { margin-bottom:25px; }
.eyebrow { color:var(--teal-strong); } h1,.card-title,.section-title,.request-field dd { color:var(--navy); }
h1 { font-size:clamp(26px,2.1vw,34px); line-height:1.18; letter-spacing:-.025em; }.subtitle { color:var(--muted); font-size:14px; }
.button { min-height:var(--control-height); padding:9px 14px; border-radius:10px; transition:background .15s ease,border-color .15s ease,box-shadow .15s ease,transform .15s ease; }
.button.primary { background:var(--teal-strong); }.button.primary:hover { background:#066c67; transform:translateY(-1px); box-shadow:0 6px 14px rgba(8,123,115,.2); }
.button.outline { border-color:#c9d7dc; background:#fff; }.button.danger { border-color:#f0c8c4; background:#fff7f6; }
.stat-card,.card,.login-card { border-color:var(--line); border-radius:14px; box-shadow:var(--shadow); }.stat-card { min-height:118px; padding:18px; }
.stat-card-action:hover { border-color:#8fcfc7; box-shadow:var(--shadow-raised); }.stat-top,.stat-foot,.card-description,.list-meta,.help { color:var(--muted); }
.stat-icon { width:34px; height:34px; border-radius:10px; background:var(--teal-light); color:var(--teal-strong); }.stat-value,.priority-num { color:var(--navy); font-size:29px; }.card { padding:20px; }.card-header { margin-bottom:16px; }
.list-row { border-color:#e7edef; }.text-link,.nf-link { color:var(--teal-strong); }.status { padding:5px 9px; }
.status.green { background:#e8f6ef; color:#167a55; }.status.amber { background:#fff4df; color:#965600; }.status.red { background:#fdecec; color:#b83a3a; }.status.blue { background:#eaf5fc; color:#176ca2; }
.table-wrap,.nf-list-page { border-color:var(--line); border-radius:10px; }th { padding:12px; background:#f4f8f9; color:#506873; }td { padding:13px 12px; border-color:#e9eff1; color:#344f5b; }
.filters .select-compact,.admin-user-filters input,.admin-user-filters select,.nf-filters select,.nf-filters input,.field input:not([type="checkbox"]),.field select,.field textarea,.message-composer input { border-color:#c9d7dc; border-radius:10px; background:#fff; }
.field input:not([type="checkbox"]),.field select { min-height:44px; padding:10px 11px; }.field textarea { padding:11px; }.field label { color:#36515e; font-weight:700; }
.notice { border-color:#dce7e9; border-radius:10px; background:#f2f8f8; color:#405a64; }.notice.warning { background:#fff4df; border-color:#f2dca9; color:#875000; }.notice.success { background:#e8f6ef; border-color:#c7e6d6; color:#167a55; }
.empty-state { padding:42px 18px; color:var(--muted); }.empty-icon { color:var(--teal); }.action-menu-list,.nf-panel { border-color:var(--line); border-radius:12px; box-shadow:var(--shadow-raised); }.action-menu-item:hover,.action-menu-item:focus-visible { background:var(--teal-light); }.toast { border-radius:10px; background:var(--navy); box-shadow:var(--shadow-raised); }
.map-preview { border-color:#cfe2de; border-radius:12px; }.day-cell { border-color:#dce6e9; border-radius:10px; background:#fbfdfd; }.day-activity { color:var(--teal-strong); }.priority-tile { border-color:var(--line); border-radius:10px; background:#fbfdfd; }
.message { border-radius:12px; }.message.user { background:var(--teal-light); color:#214c4b; }.message.bot { border-color:var(--line); }.citation,.request-timeline li { border-inline-start-color:var(--teal); }
.status-chart { border-color:var(--line); border-radius:12px; background:#fbfdfd; }.status-chart-track { background:#e9eff1; }.status-chart-closed { background:var(--teal-strong); }.status-chart-open { background:repeating-linear-gradient(45deg,#e2a027 0 6px,#ffb43a 6px 12px); }.status-chart-under-action { background:repeating-linear-gradient(-45deg,#b83a3a 0 3px,#e15757 3px 9px); }
.login-view { background:linear-gradient(140deg,#edf6f5,#f7f9fa); }.login-card { padding:32px; }.nf-bell:hover { background:var(--teal-light); }.nf-item.unread { background:#f1fbf9; }.nf-item.unread .nf-dot { background:var(--teal); }.nf-status.live { color:var(--teal-strong); border-color:#b9ddd8; background:var(--teal-light); }
[dir="rtl"] .nav-item.active { box-shadow:inset -3px 0 #fff; }[dir="rtl"] th,[dir="rtl"] td { text-align:right; }[dir="rtl"] .status-chart-row { direction:rtl; }
@media(max-width:1050px) { .sidebar { width:224px; flex-basis:224px; }.page { padding:24px 22px 38px; } }
@media(max-width:720px) { .sidebar { inset:36px auto 0 0; width:min(280px,calc(100vw - 42px)); }[dir="rtl"] .sidebar { inset:36px 0 0 auto; }.topbar { min-height:60px; padding-inline:14px; }.page { padding:20px 14px 32px; }.card { padding:15px; }.stat-card { min-height:106px; }.button { min-height:44px; }.table-wrap { overscroll-behavior-inline:contain; } }
@media(max-width:420px) { .heading-actions .button { flex:1 1 auto; }.stat-value { font-size:24px; } }
/* Modern solid status chart bars */
.status-chart-bar {
  box-shadow: none;
}

.status-chart-closed {
  background: #087b73;
}

.status-chart-open {
  background: #e2a027;
}

.status-chart-under-action {
  background: #c94a4a;
}

/* Single custom library-status dropdown pilot.
   The native select remains in the DOM for existing filters and tests. */
.custom-select {
  position: relative;
  display: inline-block;
  min-width: 205px;
}

.custom-select-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

.custom-select-trigger {
  width: 100%;
  min-height: var(--control-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 12px;
  border: 1px solid #c9d7dc;
  border-radius: 10px;
  background: #fff;
  color: #344852;
  font: inherit;
  font-size: 12px;
  text-align: start;
  cursor: pointer;
}

.custom-select-trigger:hover,
.custom-select.is-open .custom-select-trigger {
  border-color: #69bcb5;
  box-shadow: 0 0 0 3px rgba(10, 159, 152, .14);
}

.custom-select-chevron {
  color: var(--teal-strong);
  font-size: 18px;
  line-height: 1;
  transform: translateY(-2px);
  transition: transform .15s ease;
}

.custom-select.is-open .custom-select-chevron {
  transform: rotate(180deg) translateY(2px);
}

.custom-select-menu {
  position: absolute;
  z-index: 70;
  inset-inline: 0;
  top: calc(100% + 7px);
  display: grid;
  gap: 3px;
  padding: 6px;
  border: 1px solid #d7e3e6;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 43, 59, .16);
}

.custom-select-menu[hidden] {
  display: none;
}

.custom-select-option {
  min-height: 38px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #344852;
  font: inherit;
  font-size: 12px;
  text-align: start;
  cursor: pointer;
}

.custom-select-option:hover,
.custom-select-option:focus-visible,
.custom-select-option[aria-selected="true"] {
  outline: none;
  background: var(--teal-light);
  color: var(--teal-strong);
}

@media (max-width: 720px) {
  .custom-select {
    min-width: min(100%, 260px);
    flex: 1 1 220px;
  }
}

/* Report History filter system.
   The native date inputs and selects remain in the DOM so existing state,
   filters, accessibility hooks, and browser automation continue to work. */
.report-history-filters {
  align-items: end;
  gap: 10px;
  padding: 14px;
  margin: 0 0 16px;
  border: 1px solid #dfe9eb;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdfd 0%, #f6faf9 100%);
}

.report-date-filter {
  display: grid;
  flex: 1 1 185px;
  min-width: 170px;
  gap: 6px;
  color: #42606a;
  font-size: 11px;
  font-weight: 700;
}

.report-date-control {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
}

.report-date-input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 42px 9px 12px;
  border: 1px solid #c9d7dc;
  border-radius: 10px;
  background: #fff;
  color: #233f4a;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.report-date-input:hover {
  border-color: #89c5bf;
  background: #fcffff;
}

.report-date-input:focus {
  border-color: #3baaa2;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(8, 127, 120, .14);
  outline: none;
}

.report-date-input.is-invalid {
  border-color: #c94a4a;
  background: #fff9f8;
  box-shadow: 0 0 0 3px rgba(201, 74, 74, .12);
}

.report-date-trigger {
  position: absolute;
  inset-inline-end: 5px;
  top: 5px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--teal-strong);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.report-date-trigger:hover,
.report-date-filter.is-open .report-date-trigger {
  background: var(--teal-light);
}

.report-date-trigger:focus-visible {
  outline: 2px solid #48bcb2;
  outline-offset: 1px;
}

.report-date-calendar-icon {
  display: block;
  transform: translateY(-1px);
  font-size: 19px;
}

.report-date-popover {
  position: absolute;
  inset-inline-start: 0;
  top: calc(100% + 8px);
  z-index: 90;
  width: min(294px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid #cddde0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(15, 43, 59, .18);
}

.report-date-popover[hidden] {
  display: none;
}

.report-date-filter.is-open {
  position: relative;
  z-index: 91;
}

.report-date-calendar {
  display: grid;
  gap: 8px;
}

.report-date-calendar-head {
  display: grid;
  grid-template-columns: 34px 1fr 34px;
  gap: 8px;
  align-items: center;
  color: var(--navy);
  text-align: center;
  font-size: 13px;
  text-transform: capitalize;
}

.report-date-nav,
.report-date-action {
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--teal-strong);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.report-date-nav {
  font-size: 24px;
  line-height: 1;
}

.report-date-nav:hover,
.report-date-nav:focus-visible,
.report-date-action:hover,
.report-date-action:focus-visible {
  background: var(--teal-light);
  outline: none;
}

.report-date-weekdays,
.report-date-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
  direction: ltr;
}

.report-date-weekday {
  padding: 5px 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.report-date-empty,
.report-date-day {
  min-height: 34px;
}

.report-date-day {
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #294551;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.report-date-day:hover,
.report-date-day:focus-visible {
  border-color: #8bcac4;
  background: #eef9f7;
  outline: none;
}

.report-date-day.is-selected {
  border-color: var(--teal-strong);
  background: var(--teal-strong);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 4px 9px rgba(8, 123, 115, .2);
}

.report-date-day.is-today:not(.is-selected) {
  border-color: #9bc7c3;
  background: #e9f7f4;
  color: var(--teal-strong);
  font-weight: 700;
}

.report-date-day.is-disabled,
.report-date-day:disabled {
  color: #b8c3c5;
  cursor: not-allowed;
  opacity: .58;
}

.report-date-day.is-disabled:hover,
.report-date-day:disabled:hover {
  border-color: transparent;
  background: transparent;
}

.report-date-calendar-foot {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 5px;
  border-top: 1px solid #edf2f2;
}

.report-date-action {
  padding: 5px 9px;
  font-size: 11px;
}

@media (max-width: 720px) {
  .report-date-popover {
    width: min(300px, calc(100vw - 44px));
  }
}

/* Keep a consistent visual affordance when browser-specific date controls
   are encountered elsewhere in the application. */
input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: .72;
  filter: invert(35%) sepia(33%) saturate(720%) hue-rotate(125deg);
}

.report-filter-select {
  flex: 1 1 195px;
  min-width: 180px;
}

.report-filter-select .custom-select-trigger {
  min-height: 42px;
  border-radius: 10px;
}

.report-filter-select.is-open {
  z-index: 75;
}

.report-filter-select .custom-select-menu {
  max-height: min(320px, 48vh);
  overflow-y: auto;
}

.report-filter-select .custom-select-option {
  min-height: 40px;
  padding: 9px 11px;
}

/* Rig History Documents: reuses the report filter controls; labels mirror .report-date-filter. */
.rig-docs-field {
  display: grid;
  flex: 1 1 195px;
  min-width: 180px;
  gap: 6px;
  color: #42606a;
  font-size: 11px;
  font-weight: 700;
}

.rig-docs-field .report-filter-select {
  min-width: 0;
  width: 100%;
}

.rig-docs-form-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
}

.rig-docs-group th {
  background: #f1f7f6;
  color: #24525a;
  text-align: start;
}

[dir="rtl"] .report-date-input {
  direction: ltr;
  text-align: right;
  padding-inline: 12px 36px;
}

[dir="rtl"] .report-date-popover {
  inset-inline-start: auto;
  inset-inline-end: 0;
}

@media (max-width: 1050px) {
  .report-date-filter,
  .report-filter-select {
    flex-basis: calc(33.333% - 10px);
  }
}

@media (max-width: 720px) {
  .report-history-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    padding: 12px;
  }

  .report-date-filter,
  .report-filter-select {
    min-width: 0;
    width: 100%;
  }

  .report-filter-select {
    display: block;
  }

  .report-filter-select .custom-select-trigger {
    min-height: 44px;
  }
}

@media (max-width: 440px) {
  .report-history-filters {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Shared dropdown/date treatment for every rendered application surface.
   Native controls remain available to forms, filters, and automation. */
.global-custom-select {
  width: 100%;
  min-width: 0;
}

.global-custom-select .custom-select-trigger {
  min-width: 0;
}

.field > .global-custom-select,
.field .global-custom-select,
.admin-user-filters > .global-custom-select,
.emp-filters > .global-custom-select,
.nf-filters > label > .global-custom-select {
  width: 100%;
}

.filters > .global-custom-select {
  flex: 1 1 190px;
  min-width: 160px;
}

.topbar .global-custom-select {
  width: auto;
  min-width: 105px;
}

.table-wrap .global-custom-select {
  min-width: 150px;
}

.global-custom-select.is-open,
.custom-date-field.is-open {
  z-index: 85;
}

.custom-date-field {
  min-width: 0;
}

.custom-date-field .report-date-input {
  width: 100%;
}

.custom-date-field .report-date-input::-webkit-calendar-picker-indicator {
  opacity: 0;
  pointer-events: none;
}

.custom-date-field.is-open .report-date-trigger {
  background: var(--teal-light);
}

.field input[type="datetime-local"],
input[type="datetime-local"] {
  min-height: 42px;
  border: 1px solid #c9d7dc;
  border-radius: 10px;
  padding: 9px 12px;
  background: #fff;
  color: #233f4a;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.field input[type="datetime-local"]:focus,
input[type="datetime-local"]:focus {
  border-color: #3baaa2;
  box-shadow: 0 0 0 3px rgba(8, 127, 120, .14);
  outline: none;
}

.field > .custom-date-field,
.field .custom-date-field,
.nf-filters > label > .custom-date-field {
  width: 100%;
}

@media (max-width: 720px) {
  .filters > .global-custom-select {
    min-width: 0;
    flex-basis: 100%;
  }

  .topbar .global-custom-select {
    min-width: 100px;
  }
}

@media print {
  .global-custom-select > .custom-select-trigger,
  .global-custom-select > .custom-select-menu {
    display: none !important;
  }

  .global-custom-select > .custom-select-native {
    position: static;
    inset: auto;
    width: 100%;
    height: auto;
    opacity: 1;
    pointer-events: auto;
  }
}

.ai-risk-badge { display: inline-flex; align-items: center; gap: 5px; border: 1px dashed #6b7a80; border-radius: 99px; padding: 3px 8px; font-size: 10px; font-weight: 700; white-space: nowrap; background: #f4f6f7; color: #3f4d53; }
.ai-risk-marker { font-size: 12px; line-height: 1; }
.ai-risk-panel { display: grid; gap: 8px; }
.ai-risk-panel p { margin: 0; }

/* NWD-HSE-COM-F04 Safety Meeting Report */
.smr-hidden { display: none !important; }
.smr-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.smr-time { display: flex; align-items: center; gap: 6px; min-width: 0; }
.smr-time > .global-custom-select, .field .smr-time > .global-custom-select { flex: 1 1 0; width: auto; min-width: 64px; }
.smr-time-sep { font-weight: 700; color: var(--muted); }
.smr-attendance table { min-width: 0; }
.smr-attendance td { vertical-align: middle; }
.smr-attendance input { width: 100%; min-height: 38px; border: 1px solid #c9d7dc; border-radius: 8px; padding: 6px 8px; font-size: 12px; background: #fff; }
.smr-attendance.missing { outline: 2px solid #d9a400; border-radius: 10px; }
.smr-row-no { width: 36px; color: var(--muted); font-weight: 700; }
.smr-row-action { width: 52px; text-align: end; }
.smr-attendance-actions, .smr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.smr-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; margin: 10px 0 0; }
.smr-detail-item { min-width: 0; }
.smr-detail-item dt { color: #36515e; font-size: 11px; font-weight: 700; }
.smr-detail-item dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.smr-feedback { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.smr-request { display: grid; gap: 8px; }
.smr-request textarea { width: 100%; border: 1px solid #c9d7dc; border-radius: 10px; padding: 10px; font: inherit; }
.smr-task-link-row { margin-top: 8px; }
.smr-audit summary { cursor: pointer; font-weight: 700; }
.smr-photo-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.smr-photo-pick { cursor: pointer; }
.smr-photo-pick.disabled { opacity: .5; pointer-events: none; }
.smr-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 180px), 1fr)); gap: 12px; }
.smr-photo { margin: 0; display: flex; flex-direction: column; gap: 6px; min-width: 0; border: 1px solid #dce7e9; border-radius: 10px; padding: 8px; background: #fff; }
.smr-photo img, .smr-photo-canvas { display: block; width: 100%; height: 160px; object-fit: contain; background: #f2f6f7; border-radius: 8px; }
.smr-photo-canvas { height: auto; aspect-ratio: 4 / 3; object-fit: contain; }
.smr-photos[data-smr-photo-protected="true"] .smr-photo-canvas { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.smr-photo-placeholder { display: grid; place-items: center; height: 160px; font-size: 36px; color: var(--muted); background: #f2f6f7; border-radius: 8px; }
.smr-photo figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; }
.smr-photo-name { flex: 1 1 100%; overflow-wrap: anywhere; font-weight: 700; }
@media (max-width: 720px) {
  .smr-detail-grid { grid-template-columns: 1fr; }
  .smr-attendance thead { display: none; }
  .smr-attendance table, .smr-attendance tbody, .smr-attendance tr, .smr-attendance td { display: block; width: 100%; }
  .smr-attendance tr { position: relative; border: 1px solid #dce7e9; border-radius: 10px; padding: 8px 10px 4px; margin-bottom: 10px; }
  .smr-attendance td { border: 0; padding: 4px 0; }
  .smr-attendance td[data-label]::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 700; color: #36515e; margin-bottom: 2px; }
  .smr-row-no, .smr-row-action { width: auto; }
  .smr-row-action { position: absolute; top: 6px; inset-inline-end: 8px; }
  .smr-actions .button { flex: 1 1 auto; }
}
@media print {
  .page:has(.smr-print) > .card:not(.smr-print .card), .smr-audit { display: none !important; }
  .smr-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); font-size: 10px; }
  .smr-print .table-wrap { overflow: visible; }
  .smr-photos, .smr-photo { display: none !important; }
  .smr-print th, .smr-print td { border: 1px solid #c9d3d6; padding: 3px 5px; }
  .dhr-no-print { display: none !important; }
}
