:root {
  --brand: #004741;
  --brand-2: #0a5c53;
  --brand-3: #133f3b;
  --accent: #8f1825;
  --sand: #f0ede4;
  --surface: #ffffff;
  --surface-2: #f7f8f5;
  --surface-3: #eaf1ee;
  --text: #17211f;
  --muted: #65736f;
  --line: #dce5e1;
  --success: #13795b;
  --warning: #a66b00;
  --danger: #b3261e;
  --shadow: 0 16px 42px rgba(10, 49, 44, .09);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --sidebar-width: 278px;
  --font: "Segoe UI", Tahoma, Arial, sans-serif;
}

html[data-theme="dark"] {
  --surface: #13201e;
  --surface-2: #0d1715;
  --surface-3: #1b2d29;
  --text: #edf5f1;
  --muted: #a9bbb5;
  --line: #2d4540;
  --sand: #0b1412;
  --shadow: 0 16px 42px rgba(0, 0, 0, .25);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); background: var(--sand); color: var(--text); line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.body-copy { white-space: pre-line; color: var(--text); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar-overlay { display: none; }
.sidebar { position: sticky; inset-block-start: 0; height: 100vh; display: flex; flex-direction: column; background: linear-gradient(160deg, #003f3a, #012c29 70%, #001f1d); color: #fff; overflow: hidden; z-index: 50; }
.sidebar::before { content: ""; position: absolute; width: 340px; height: 340px; border-radius: 50%; background: rgba(255,255,255,.04); inset: -160px auto auto -120px; }
.sidebar-brand { height: 105px; padding: 25px 24px 16px; display: flex; align-items: center; justify-content: space-between; position: relative; }
.sidebar-logo { width: 215px; max-height: 68px; object-fit: contain; object-position: center; }
.sidebar-close { display: none !important; color: #fff !important; }
.sidebar-context { padding: 0 25px 18px; display: grid; gap: 2px; position: relative; }
.sidebar-context strong { font-size: 15px; }
.context-kicker { color: #a9d2c9; font-size: 11px; letter-spacing: 2px; }
.sidebar-nav { padding: 6px 15px; display: grid; gap: 5px; overflow-y: auto; position: relative; }
.nav-item { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-radius: 13px; color: rgba(255,255,255,.78); transition: .2s ease; border: 0; background: transparent; width: 100%; text-align: start; }
.nav-item:hover, .nav-item.active { color: #fff; background: rgba(255,255,255,.11); transform: translateX(-2px); }
[dir="ltr"] .nav-item:hover, [dir="ltr"] .nav-item.active { transform: translateX(2px); }
.nav-item.active { box-shadow: inset 3px 0 0 #d7ece6; }
.nav-icon { width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 auto; }
.nav-icon .ui-icon { width: 20px; height: 20px; }
.sidebar-footer { margin-top: auto; padding: 16px; border-top: 1px solid rgba(255,255,255,.12); display: grid; gap: 10px; position: relative; }
.user-mini, .topbar-user, .user-cell { display: flex; align-items: center; gap: 11px; min-width: 0; }
.user-mini strong, .topbar-user strong, .user-cell strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-mini small, .topbar-user small, .user-cell small { display: block; color: rgba(255,255,255,.62); font-size: 11px; }
.user-cell small { color: var(--muted); }
.avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.14); color: #fff; font-weight: 700; flex: 0 0 auto; }

.app-main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar { height: 82px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; background: color-mix(in srgb, var(--surface) 92%, transparent); border-bottom: 1px solid var(--line); position: sticky; inset-block-start: 0; z-index: 40; backdrop-filter: blur(16px); }
.topbar-start, .topbar-actions { display: flex; align-items: center; gap: 14px; }
.topbar-title { margin: 0; font-size: 20px; line-height: 1.2; }
.page-kicker { font-size: 10px; color: var(--brand-2); font-weight: 800; letter-spacing: 2px; }
.topbar-user small { color: var(--muted); }
.topbar .avatar { background: var(--brand); }
.icon-button, .quiet-button { min-width: 40px; height: 40px; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 12px; display: grid; place-items: center; transition: .2s; }
.icon-button:hover, .quiet-button:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.ui-icon { width: 1.25em; height: 1.25em; display: block; overflow: visible; }
.icon-button .ui-icon { width: 19px; height: 19px; }
.quiet-button { padding: 0 13px; font-weight: 700; }
.mobile-menu { display: none; }
.page-content { padding: 30px; flex: 1; max-width: 1700px; width: 100%; margin: 0 auto; }
.app-footer { padding: 18px 30px; display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }

.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-header-title-wrap { display: flex; align-items: center; gap: 15px; min-width: 0; }
.page-header-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: 0 0 auto; color: var(--brand); background: color-mix(in srgb, var(--brand) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--brand) 17%, var(--line)); box-shadow: 0 8px 20px rgba(0,71,65,.07); }
.page-header-icon .ui-icon { width: 25px; height: 25px; }
.page-header h1 { margin: 4px 0 6px; font-size: clamp(25px, 3vw, 38px); line-height: 1.2; }
.page-header p { margin: 0; color: var(--muted); max-width: 720px; }
.page-actions, .right-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.right-actions { justify-content: flex-end; margin-bottom: 14px; }
.eyebrow { color: var(--brand-2); font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; font-weight: 800; }
.eyebrow.light { color: #b9ddd4; }

.button { min-height: 42px; border-radius: 12px; border: 1px solid transparent; padding: 9px 17px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; transition: .2s ease; white-space: nowrap; }
.button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(0,71,65,.12); }
.button.primary { background: var(--brand); color: #fff; }
.button.secondary { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); background: var(--surface-3); }
.button.ghost { color: var(--text); border-color: var(--line); background: var(--surface); }
.button.warning { background: #fff3d8; color: #805200; border-color: #ebd18f; }
.button.danger { background: #fbe9e7; color: var(--danger); border-color: #efc0bb; }
.button.light { background: #fff; color: var(--brand); }
.button.outline-light { border-color: rgba(255,255,255,.5); color: #fff; background: transparent; }
.button.tiny { min-height: 32px; padding: 5px 10px; font-size: 12px; border-color: var(--line); background: var(--surface); color: var(--brand); }
.button.full { width: 100%; }
.text-link { color: var(--brand-2); font-weight: 700; }

.flash { padding: 14px 16px; border-radius: 14px; margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.flash-success { border-inline-start: 4px solid var(--success); }
.flash-error { border-inline-start: 4px solid var(--danger); }
.flash-warning { border-inline-start: 4px solid var(--warning); }
.flash small { display: block; color: var(--muted); margin-top: 3px; }
.flash-close { border: 0; background: transparent; color: var(--muted); font-size: 22px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.compact-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.metric-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 19px; min-height: 125px; display: flex; flex-direction: column; justify-content: center; box-shadow: 0 6px 20px rgba(0,48,43,.04); position: relative; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.metric-card:hover { transform: translateY(-2px); box-shadow: 0 13px 30px rgba(0,48,43,.09); border-color: color-mix(in srgb, var(--brand) 22%, var(--line)); }
.metric-card > span:not(.metric-card-icon), .metric-card small { color: var(--muted); position: relative; z-index: 1; padding-inline-end: 58px; }
.metric-card strong { font-size: clamp(22px, 2.5vw, 31px); margin: 3px 0; color: var(--text); position: relative; z-index: 1; padding-inline-end: 58px; }
.metric-card-icon { position: absolute !important; inset-block-start: 16px; inset-inline-end: 16px; width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; color: var(--brand) !important; background: color-mix(in srgb, var(--brand) 8%, var(--surface-3)); border: 1px solid color-mix(in srgb, var(--brand) 12%, transparent); z-index: 2; }
.metric-card-icon .ui-icon { width: 23px; height: 23px; }
.metric-card.accent { background: linear-gradient(145deg, var(--brand), #01352f); color: #fff; border-color: transparent; }
.metric-card.accent strong, .metric-card.accent > span:not(.metric-card-icon), .metric-card.accent small { color: #fff; }
.metric-card.accent .metric-card-icon { color: #fff !important; background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.18); }
.metric-card.success { border-top: 3px solid var(--success); }
.metric-card.success .metric-card-icon { color: var(--success) !important; }
.metric-card.warning { border-top: 3px solid var(--warning); }
.metric-card.warning .metric-card-icon { color: var(--warning) !important; }
.metric-card.danger { border-top: 3px solid var(--danger); }
.metric-card.danger .metric-card-icon { color: var(--danger) !important; }

.content-grid { display: grid; gap: 20px; align-items: start; }
.content-grid.two-thirds { grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr); }
.stack-sections { display: grid; gap: 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-xl); padding: 22px; box-shadow: 0 8px 25px rgba(0,48,43,.045); min-width: 0; }
.panel-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; margin-bottom: 18px; }
.panel-heading { display: flex; align-items: center; gap: 11px; }
.panel-heading-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--brand); background: var(--surface-3); flex: 0 0 auto; }
.panel-heading-icon .ui-icon { width: 19px; height: 19px; }
.panel-header h3 { margin: 3px 0 0; font-size: 19px; }
.table-panel { padding: 0; overflow: hidden; }
.table-wrap { overflow-x: auto; }
.wide-table { max-height: 68vh; }
.data-table { width: 100%; border-collapse: collapse; min-width: 850px; }
.data-table th { text-align: start; padding: 14px 16px; background: var(--surface-2); color: var(--muted); font-size: 12px; font-weight: 800; position: sticky; top: 0; z-index: 1; }
.data-table td { padding: 14px 16px; border-top: 1px solid var(--line); vertical-align: middle; font-size: 13px; }
.data-table tbody tr:hover { background: color-mix(in srgb, var(--surface-3) 42%, transparent); }
.data-table .row-alert { background: #fff9ef; }
.table-sub { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.compact-table { min-width: 650px; }
.compact-table td, .compact-table th { padding: 11px 12px; }
.table-progress { width: 120px; }
.progress-track { height: 8px; background: var(--surface-3); border-radius: 999px; overflow: hidden; margin-top: 5px; }
.progress-track span, .progress-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), #38a287); }
.progress-meta { display: flex; justify-content: space-between; gap: 8px; align-items: center; }

.status-pill { display: inline-flex; align-items: center; min-height: 27px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; color: var(--brand); background: var(--surface-3); white-space: nowrap; }
.status-active, .status-approved, .status-paid, .status-completed, .status-approved-internal, .financial-normal { color: #0b6b4f; background: #dff4eb; }
.status-delayed, .status-rejected, .status-suspended, .severity-critical, .financial-critical { color: #9d211b; background: #fbe4e1; }
.status-at-risk, .status-returned, .status-under-review, .status-submitted, .severity-high, .financial-attention { color: #865900; background: #fff0c7; }
.status-data-completion, .status-draft, .status-not-started, .status-open, .status-in-progress { color: #385866; background: #e5f0f4; }
.status-forwarded-sector, .status-forwarded-executive, .status-forwarded-both { color: #4f3e96; background: #ece8ff; }
.severity-low { color: #3b6760; background: #e9f2ef; }
.severity-medium { color: #875e00; background: #fff1ca; }
.light-pill { color: #fff; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3); }
.danger-text { color: var(--danger) !important; }

.filter-bar { display: grid; grid-template-columns: repeat(4,minmax(150px,1fr)) auto auto; gap: 10px; align-items: end; padding: 15px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); margin-bottom: 17px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field > span { font-size: 12px; font-weight: 800; color: var(--text); }
.field small { color: var(--muted); font-size: 11px; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 11px; padding: 11px 12px; outline: none; transition: .2s; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,71,65,.1); }
.field.compact input, .field.compact select { min-height: 42px; }
.form-panel { display: grid; gap: 26px; }
.form-section { display: grid; gap: 18px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.form-section:last-of-type { border-bottom: 0; }
.section-heading { display: flex; align-items: center; gap: 12px; }
.section-heading > span { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-3); color: var(--brand); font-weight: 800; }
.section-heading h3 { margin: 0; }
.section-heading p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.form-grid { display: grid; gap: 14px; }
.form-grid.two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.form-grid.three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.stack-form { display: grid; gap: 15px; }
.small-gap { gap: 10px; }
.narrow-form { max-width: 720px; }
.segmented-control { display: flex; gap: 8px; flex-wrap: wrap; }
.segmented-control label input { position: absolute; opacity: 0; pointer-events: none; }
.segmented-control label span { display: block; padding: 9px 15px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.segmented-control label input:checked + span { background: var(--brand); color: #fff; border-color: var(--brand); }
.form-check { display: flex; align-items: center; gap: 8px; padding-bottom: 9px; }
.form-check-input { width: 17px; height: 17px; accent-color: var(--brand); }
.form-check-label { font-size: 13px; font-weight: 700; }
.calculated-card { background: linear-gradient(145deg, var(--brand), #083e39); color: #fff; border-radius: 14px; padding: 14px; display: flex; flex-direction: column; justify-content: center; }
.calculated-card span, .calculated-card small { color: #cde4dd; }
.calculated-card strong { font-size: 25px; }
.inline-form { border-top: 1px solid var(--line); margin-top: 15px; padding-top: 13px; }
.inline-form summary { cursor: pointer; color: var(--brand); font-weight: 800; margin-bottom: 13px; }
.decision-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
.full-span { grid-column: 1/-1; }

.project-hero { background: linear-gradient(140deg, #004741, #073b37 60%, #0d5b51); color: #fff; border-radius: 26px; padding: 30px; display: flex; justify-content: space-between; align-items: center; gap: 25px; margin-bottom: 18px; position: relative; overflow: hidden; }
.project-hero::after { content: ""; position: absolute; width: 300px; height: 300px; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; inset: -130px auto auto -80px; }
.project-hero-copy, .project-score, .claim-net { position: relative; z-index: 1; }
.project-hero h1 { font-size: clamp(27px,4vw,43px); margin: 10px 0 6px; }
.project-hero p { margin: 0; color: #c9e1db; }
.hero-meta, .hero-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.hero-meta > span:not(.status-pill) { font-size: 12px; color: #c9e1db; }
.hero-actions { margin-top: 20px; }
.project-score { text-align: center; min-width: 160px; }
.score-ring { --score: 0; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(#fff calc(var(--score)*1%), rgba(255,255,255,.18) 0); position: relative; margin: auto; }
.score-ring::after { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: var(--brand); }
.score-ring span { z-index: 1; font-size: 27px; font-weight: 800; }
.project-score small { display: block; margin-top: 8px; color: #c9e1db; }
.claim-net { text-align: end; min-width: 250px; }
.claim-net span, .claim-net small { display: block; color: #c9e1db; }
.claim-net strong { display: block; font-size: clamp(26px,3vw,40px); margin: 4px 0; }

.detail-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin: 0; }
.detail-grid > div { padding: 14px; background: var(--surface-2); border-radius: 13px; border: 1px solid var(--line); }
.detail-grid dt { color: var(--muted); font-size: 11px; }
.detail-grid dd { margin: 5px 0 0; font-weight: 700; }
.detail-grid dd small { display: block; color: var(--muted); font-weight: 400; }
.note-box { padding: 14px 16px; border-radius: 13px; background: var(--surface-3); border-inline-start: 4px solid var(--brand); }
.note-box p { margin: 5px 0 0; color: var(--muted); white-space: pre-line; }

.project-list, .simple-list, .notification-list, .attachment-list { display: grid; }
.project-row, .simple-row, .notification-item, .attachment-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.project-row:first-child, .simple-row:first-child, .notification-item:first-child, .attachment-row:first-child { border-top: 0; }
.project-row:hover, a.simple-row:hover, .notification-item:hover { background: color-mix(in srgb, var(--surface-3) 35%, transparent); padding-inline: 9px; border-radius: 12px; }
.project-row-main, .simple-row > div { min-width: 0; display: grid; gap: 2px; }
.project-row-main small, .simple-row small { color: var(--muted); }
.project-code { color: var(--brand); font-size: 11px; font-weight: 800; }
.progress-block { width: 210px; flex: 0 0 auto; }
.simple-row.static:hover { background: transparent; padding-inline: 0; }
.notification-item { justify-content: flex-start; color: var(--text); width: 100%; text-align: start; border: 0; border-top: 1px solid var(--line); background: transparent; }
.notification-item.unread { background: color-mix(in srgb, var(--surface-3) 55%, transparent); }
.notification-item > div { flex: 1; }
.notification-item p { margin: 3px 0; color: var(--muted); }
.notification-item small { color: var(--muted); }
.notification-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); flex: 0 0 auto; }
.notification-item.unread .notification-dot { background: var(--brand); box-shadow: 0 0 0 5px rgba(0,71,65,.1); }
.notification-form { margin: 0; }
.attachment-row { justify-content: flex-start; }
.attachment-row > div:nth-child(2) { flex: 1; min-width: 0; }
.attachment-row strong { word-break: break-word; }
.attachment-row small { display: block; color: var(--muted); }
.file-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-3); color: var(--brand); }

.attachment-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.dropzone { border: 1px dashed color-mix(in srgb, var(--brand) 45%, var(--line)); border-radius: 14px; min-height: 92px; padding: 14px; display: flex; align-items: center; gap: 12px; background: var(--surface-2); cursor: pointer; }
.dropzone input { position: absolute; opacity: 0; pointer-events: none; }
.dropzone strong, .dropzone small { display: block; }
.dropzone small { color: var(--muted); }
.dropzone-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--brand); color: #fff; font-size: 22px; }
.upload-feedback { grid-column: 1/-1; font-size: 12px; color: var(--muted); }

.timeline { display: grid; gap: 0; }
.timeline-item { display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding-bottom: 18px; position: relative; }
.timeline-item > span { width: 11px; height: 11px; border-radius: 50%; background: var(--brand); margin-top: 5px; position: relative; z-index: 1; }
.timeline-item:not(:last-child)::before { content: ""; position: absolute; width: 1px; background: var(--line); inset: 16px 5px 0 auto; }
[dir="ltr"] .timeline-item:not(:last-child)::before { inset: 16px auto 0 5px; }
.timeline-item p { margin: 3px 0; color: var(--muted); }
.timeline-item small { color: var(--muted); }
.empty-state { padding: 30px; color: var(--muted); text-align: center; display: grid; place-items: center; gap: 9px; }
.empty-state-icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-3); color: var(--brand); }
.empty-state-icon .ui-icon { width: 22px; height: 22px; }

.report-catalog { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.report-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 16px; transition: .25s; }
.report-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); }
.report-card.featured { background: linear-gradient(145deg, var(--brand), #073b37); color: #fff; grid-column: 1/-1; }
.report-card h3 { margin: 4px 0; }
.report-card p { margin: 0; color: var(--muted); }
.report-card.featured p { color: #c9e1db; }
.report-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-3); color: var(--brand); }
.report-icon .ui-icon { width: 27px; height: 27px; }
.report-card.featured .report-icon { background: rgba(255,255,255,.13); color: #fff; }
.arrow { width: 30px; height: 30px; display: grid; place-items: center; color: var(--brand); }
.arrow .ui-icon { width: 20px; height: 20px; }
[dir="rtl"] .arrow .ui-icon { transform: rotate(180deg); }
.report-card.featured .arrow { color: #fff; }

.report-page { background: var(--surface); border-radius: 25px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.report-cover { min-height: 260px; padding: 36px; background: linear-gradient(145deg, #003f3a, #011f1d); color: #fff; display: grid; grid-template-columns: 240px 1fr auto; align-items: center; gap: 30px; position: relative; overflow: hidden; }
.report-cover::after { content: ""; position: absolute; width: 390px; height: 390px; border-radius: 50%; border: 1px solid rgba(255,255,255,.15); inset: -170px auto auto -100px; }
.report-cover img { width: 230px; position: relative; z-index: 1; }
.report-cover h1 { font-size: clamp(28px,4vw,46px); margin: 7px 0; position: relative; z-index: 1; }
.report-cover p { color: #c9e1db; margin: 0; position: relative; z-index: 1; }
.report-meta { display: grid; gap: 3px; min-width: 160px; position: relative; z-index: 1; }
.report-meta span { color: #a9d2c9; font-size: 11px; }
.report-meta strong { margin-bottom: 9px; }
.report-body { padding: 28px; }
.report-actions { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 18px; }
.report-summary-grid, .report-facts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 20px; }
.report-summary-grid > div, .report-facts > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.report-summary-grid span, .report-facts span { display: block; color: var(--muted); font-size: 11px; }
.report-summary-grid strong, .report-facts strong { font-size: 18px; }
.report-table { min-width: 1100px; }
.mini-cover { min-height: 190px; grid-template-columns: 200px 1fr auto; border-radius: 24px 24px 0 0; }
.report-document { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; margin-bottom: 20px; box-shadow: var(--shadow); }
.report-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.report-columns.three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.report-section { border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.report-section h3 { color: var(--brand); margin: 0 0 8px; font-size: 15px; }
.report-section p { margin: 0; white-space: pre-line; }

.auth-body { min-height: 100vh; background: var(--sand); }
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(450px,1.15fr) minmax(420px,.85fr); }
.auth-brand-panel { background: linear-gradient(145deg,#004741,#012c29); color:#fff; padding: 55px; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; }
.auth-brand-logo { width: min(500px,85%); position: relative; z-index: 2; }
.auth-brand-copy { max-width: 650px; position: relative; z-index: 2; }
.auth-brand-copy h1 { font-size: clamp(40px,6vw,76px); line-height: 1.05; margin: 15px 0; }
.auth-brand-copy p { font-size: 18px; color: #c9e1db; max-width: 600px; }
.auth-orb { position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.13); }
.auth-orb-one { width: 500px; height: 500px; inset: -180px -180px auto auto; }
.auth-orb-two { width: 280px; height: 280px; inset: auto auto -100px -80px; background: rgba(255,255,255,.025); }
.auth-form-panel { display: grid; place-items: center; padding: 35px; }
.auth-form-wrap { width: min(470px,100%); }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 34px; box-shadow: var(--shadow); }
.auth-card h2 { font-size: 32px; margin: 5px 0; }
.auth-card > p { margin-top: 0; }
.auth-mobile-logo { display: none; width: 230px; margin: 0 auto 25px; }

.inline-actions { display: flex; gap: 6px; }
.error-page { min-height: 60vh; display: grid; place-items: center; align-content: center; text-align: center; gap: 10px; }
.error-code { font-size: clamp(80px,15vw,180px); line-height: .8; color: var(--brand); font-weight: 900; opacity: .15; }
.error-page h1 { margin: 0; }
.error-page p { color: var(--muted); }
.error-page pre { max-width: 700px; overflow: auto; text-align: left; background: var(--surface); padding: 15px; border-radius: 12px; }
.financial-row-critical { box-shadow: inset 4px 0 0 var(--danger); }
.financial-row-attention { box-shadow: inset 4px 0 0 var(--warning); }
.financial-row-normal { box-shadow: inset 4px 0 0 var(--success); }

@media (max-width: 1200px) {
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .form-grid.three { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filter-bar { grid-template-columns: repeat(2,minmax(180px,1fr)) auto auto; }
  .report-cover { grid-template-columns: 180px 1fr; }
  .report-meta { grid-column: 1/-1; grid-template-columns: repeat(4,auto); }
}

@media (max-width: 940px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: min(320px,88vw); transform: translateX(-105%); transition: .25s; }
  [dir="rtl"] .sidebar { inset: 0 0 0 auto; transform: translateX(105%); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-overlay { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 45; opacity: 0; pointer-events: none; transition: .25s; }
  body.sidebar-open .sidebar-overlay { opacity: 1; pointer-events: auto; }
  .sidebar-close, .mobile-menu { display: grid !important; }
  .content-grid.two-thirds { grid-template-columns: 1fr; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand-panel { display: none; }
  .auth-mobile-logo { display: block; }
  .report-catalog { grid-template-columns: 1fr; }
  .report-card.featured { grid-column: auto; }
  .topbar-user div { display: none; }
}

@media (max-width: 680px) {
  .page-content { padding: 20px 14px; }
  .topbar { padding: 0 14px; height: 72px; }
  .topbar-title { font-size: 16px; max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .page-header { align-items: flex-start; flex-direction: column; }
  .metric-grid, .compact-grid { grid-template-columns: 1fr; }
  .form-grid.two, .form-grid.three, .detail-grid, .report-columns, .report-columns.three, .report-summary-grid, .report-facts { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr; }
  .project-hero { flex-direction: column; align-items: flex-start; padding: 23px; }
  .project-score { align-self: center; }
  .claim-net { text-align: start; min-width: 0; }
  .progress-block { width: 120px; }
  .attachment-form { grid-template-columns: 1fr; }
  .report-cover, .mini-cover { grid-template-columns: 1fr; padding: 24px; text-align: center; }
  .report-cover img { margin: auto; }
  .report-meta { grid-template-columns: 1fr; }
  .report-body { padding: 14px; }
  .auth-form-panel { padding: 22px 14px; }
  .auth-card { padding: 24px; }
  .app-footer { flex-direction: column; gap: 4px; }
}

@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff !important; color: #111 !important; }
  .sidebar, .topbar, .app-footer, .no-print, .flash { display: none !important; }
  .app-shell, .app-main { display: block; }
  .page-content { padding: 0; max-width: none; }
  .report-page, .report-document { border: 0; box-shadow: none; border-radius: 0; }
  .report-cover { min-height: 160px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .data-table th { position: static; }
  .table-wrap { overflow: visible; }
  .report-table { min-width: 0; font-size: 9px; }
  .report-table td, .report-table th { padding: 6px; }
  .status-pill { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

.viz-callout { margin: 16px 0; padding: 14px 16px; border: 1px solid rgba(0,71,65,.22); border-radius: 14px; background: var(--brand-soft); color: var(--text); }
.inline-actions select { min-width: 120px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--text); }
.check-list { margin: 0; padding-inline-start: 22px; display: grid; gap: 10px; color: var(--text); }
.check-list li::marker { color: var(--brand); }

/* V1.0.6: resilient dashboard diagnostics */
.system-notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--border, #d9e3df);
  border-radius: 14px;
  background: #fff;
  line-height: 1.7;
}
.system-notice strong { white-space: nowrap; color: #004741; }
.system-notice.warning { border-color: #e5cf91; background: #fffaf0; }
.system-notice.warning strong { color: #7a5800; }
@media (max-width: 720px) {
  .system-notice { flex-direction: column; }
  .system-notice strong { white-space: normal; }
}


/* ESCC V1.2.17 — project workforce identity table */
.workforce-table-wrap { margin-top: 2px; }
.workforce-table { min-width: 760px; }
.workforce-table th, .workforce-table td { white-space: nowrap; }
.workforce-table td:first-child strong { font-weight: 800; }
.workforce-table td[dir="ltr"], .workforce-table th[dir="ltr"] { text-align: left; }

/* ESCC V1.0.7 — complete Arabic / English interface support */
html[dir="ltr"] body { text-align: left; }
html[dir="rtl"] body { text-align: right; }
[dir="ltr"] .app-shell { grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
[dir="rtl"] .app-shell { grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
[dir="ltr"] .nav-item.active { box-shadow: inset 3px 0 0 #d7ece6; }
[dir="rtl"] .nav-item.active { box-shadow: inset -3px 0 0 #d7ece6; }
[dir="ltr"] .project-hero::after { inset: -130px -80px auto auto; }
[dir="rtl"] .project-hero::after { inset: -130px auto auto -80px; }
[dir="ltr"] .claim-net { text-align: end; }
[dir="ltr"] input, [dir="ltr"] textarea, [dir="ltr"] select { text-align: left; }
[dir="rtl"] input, [dir="rtl"] textarea, [dir="rtl"] select { text-align: right; }
[dir="ltr"] input[type="email"], [dir="ltr"] input[type="url"], [dir="ltr"] input[type="number"],
[dir="rtl"] input[type="email"], [dir="rtl"] input[type="url"], [dir="rtl"] input[type="number"] { direction: ltr; }
.auth-language-switch { position: fixed; inset-block-start: 18px; inset-inline-end: 18px; z-index: 100; min-width: 48px; height: 42px; padding: 0 13px; border: 1px solid rgba(255,255,255,.34); border-radius: 12px; display: grid; place-items: center; background: rgba(0,71,65,.88); color: #fff; font-weight: 800; box-shadow: 0 8px 24px rgba(0,44,40,.18); backdrop-filter: blur(12px); }
.auth-language-switch:hover { background: #004741; transform: translateY(-1px); }
@media (max-width: 900px) { .auth-language-switch { inset-block-start: 12px; inset-inline-end: 12px; } }

/* ESCC V1.0.11 - password visibility, OTP and email diagnostics */
.password-input-wrap { position: relative; display: block; width: 100%; }
.password-input-wrap > input { padding-inline-end: 48px !important; }
.password-toggle-button {
  position: absolute;
  inset-inline-end: 7px;
  inset-block-start: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  transition: .18s ease;
  z-index: 2;
}
.password-toggle-button:hover,
.password-toggle-button:focus-visible { background: var(--surface-3); color: var(--brand); outline: none; }
.password-toggle-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.password-generator-button { width: fit-content; min-width: 190px; }
.otp-input {
  text-align: center;
  font-size: 28px !important;
  font-weight: 800;
  letter-spacing: 10px;
  direction: ltr;
  font-variant-numeric: tabular-nums;
}
.otp-resend-form { margin-top: 12px; }
.email-diagnostic { border-inline-start: 4px solid var(--brand); }
.email-diagnostic.is-error { border-inline-start-color: var(--danger); }
.email-error-text { direction: ltr; text-align: left; unicode-bidi: plaintext; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; color: var(--danger); }
@media (max-width: 640px) {
  .otp-input { font-size: 24px !important; letter-spacing: 7px; }
  .password-generator-button { width: 100%; }
}


/* ESCC V1.1.1 — semantic icon system and resilient interface */
.notice-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; color: var(--warning); background: color-mix(in srgb, var(--warning) 12%, var(--surface)); }
.notice-icon .ui-icon { width: 18px; height: 18px; }
.system-notice > div { display: grid; gap: 2px; }
.system-notice > div span { color: var(--muted); }
.file-icon .ui-icon, .dropzone-icon .ui-icon { width: 20px; height: 20px; }
.error-icon { width: 54px; height: 54px; border-radius: 17px; display: grid; place-items: center; color: var(--brand); background: var(--surface-3); }
.error-icon .ui-icon { width: 27px; height: 27px; }
.error-diagnostic { direction: ltr; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--muted); }
@media (max-width:680px) { .page-header-title-wrap { align-items: flex-start; } .page-header-icon { width: 44px; height: 44px; border-radius: 14px; } .metric-card > span:not(.metric-card-icon), .metric-card small, .metric-card strong { padding-inline-end: 52px; } }

/* ESCC V1.1.1: grouped financial inputs and automatic project schedule */
.field input[data-money-input] {
  direction: ltr;
  text-align: start;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}
[dir="rtl"] .field input[data-money-input] { text-align: right; }
[dir="ltr"] .field input[data-money-input] { text-align: left; }
.calculated-date-field input[readonly] {
  background: color-mix(in srgb, var(--brand) 5%, var(--surface));
  border-style: dashed;
  color: var(--brand-dark, var(--brand));
  font-weight: 800;
  cursor: not-allowed;
}


/* V1.1.3 Accounts Officer claim workflow */
.claim-attachment-section { margin: 22px 0; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface-2); }
.claim-file-dropzone { min-height: 132px; }
.compact-attachments { margin-top: 14px; }
.bordered-form { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.claim-progress-panel { margin-bottom: 22px; }
.claim-stage-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 12px; }
.claim-stage { display: grid; gap: 7px; justify-items: center; text-align: center; padding: 16px 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-2); color: var(--muted); }
.claim-stage > span { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--surface-3); color: var(--brand); }
.claim-stage > span .ui-icon { width: 22px; height: 22px; }
.claim-stage.complete { border-color: rgba(0,113,99,.35); background: rgba(0,113,99,.07); color: var(--text); }
.claim-stage.complete > span { background: var(--brand); color: #fff; }
.claim-stage small { min-height: 18px; }
.detail-list { display: grid; gap: 12px; margin: 0; }
.detail-list > div { display: grid; grid-template-columns: 105px 1fr; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.detail-list dt { color: var(--muted); }
.detail-list dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.status-received { background: #e8f5f1; color: #006b5d; }
.status-raised { background: #e8f0f8; color: #245d8c; }
.status-returned { background: #fff4dc; color: #8b5a00; }
.status-partially-paid { background: #edf7ed; color: #287233; }
@media (max-width: 980px) { .claim-stage-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 580px) { .claim-stage-grid { grid-template-columns: 1fr; } .detail-list > div { grid-template-columns: 1fr; } }

/* V1.1.6 administrative lifecycle controls */
.button.tiny.danger { background: #fbe9e7; color: var(--danger); border-color: #efc0bb; }
.button.outline-danger-light { border-color: rgba(255,210,206,.7); color: #fff; background: rgba(179,38,30,.16); }
.button.outline-danger-light:hover { background: rgba(179,38,30,.28); box-shadow: 0 8px 18px rgba(0,0,0,.12); }
.button:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.danger-zone { border-color: #efc0bb; box-shadow: 0 10px 30px rgba(179,38,30,.06); }
.danger-note { background: #fff5f4; border-inline-start-color: var(--danger); }
.danger-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-bottom: 18px; }
.danger-summary > div { padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); display: grid; gap: 4px; }
.danger-summary span { color: var(--muted); font-size: 11px; }
.danger-summary strong { font-size: 17px; color: var(--text); overflow-wrap: anywhere; }
@media(max-width:700px){.danger-summary{grid-template-columns:1fr 1fr}}
@media(max-width:480px){.danger-summary{grid-template-columns:1fr}}

/* ESCC V1.2.0 — premium project portfolio cards + interactive Saudi project map */
:root {
  --map-fill-start: #e7f0ec;
  --map-fill-end: #c9ddd6;
  --map-coast: #2f756d;
}
html[data-theme="dark"] {
  --map-fill-start: #1d3430;
  --map-fill-end: #142824;
  --map-coast: #6ca79f;
}

.location-form-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border-radius: 13px;
  background: color-mix(in srgb, var(--brand) 5%, var(--surface));
  border: 1px dashed color-mix(in srgb, var(--brand) 24%, var(--line));
  color: var(--muted);
  font-size: 12px;
}
.location-form-note .ui-icon { width: 19px; height: 19px; color: var(--brand); flex: 0 0 auto; margin-top: 1px; }

.project-card-section { display: grid; gap: 15px; }
.project-card-section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.project-card-section-head h3 { margin: 2px 0 0; font-size: 22px; }
.project-view-note { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.project-view-note .ui-icon { width: 17px; height: 17px; color: var(--brand); }
.project-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.project-card {
  --card-accent: var(--brand);
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 440px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--card-accent) 16%, var(--line));
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% -6%, color-mix(in srgb, var(--card-accent) 9%, transparent) 0 22%, transparent 23%),
    var(--surface);
  box-shadow: 0 14px 34px rgba(10,49,44,.07);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.project-card:hover { transform: translateY(-4px); box-shadow: 0 22px 48px rgba(10,49,44,.12); border-color: color-mix(in srgb, var(--card-accent) 32%, var(--line)); }
.project-card-active { --card-accent: #087966; }
.project-card-at_risk { --card-accent: #b67b08; }
.project-card-delayed { --card-accent: #b3261e; }
.project-card-suspended { --card-accent: #7d4c42; }
.project-card-completed { --card-accent: #2d7d5b; }
.project-card-data_completion { --card-accent: #55717d; }
.project-card-archived { --card-accent: #65736f; }
.project-card-accent { height: 5px; background: linear-gradient(90deg, var(--card-accent), color-mix(in srgb, var(--card-accent) 45%, transparent)); }
.project-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 19px 20px 8px; }
.project-card-identity { min-width: 0; }
.project-card-code { display: inline-flex; margin-bottom: 7px; padding: 4px 8px; border-radius: 999px; background: color-mix(in srgb, var(--card-accent) 8%, var(--surface-2)); color: var(--card-accent); font-size: 10px; font-weight: 900; letter-spacing: .06em; direction: ltr; }
.project-card h3 { margin: 0; font-size: 18px; line-height: 1.45; }
.project-card h3 a:hover { color: var(--brand); }
.project-card-identity p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.project-card-progress-row { display: grid; grid-template-columns: 76px 1fr; gap: 15px; align-items: center; padding: 12px 20px 16px; }
.project-card-ring { --project-progress: 0; width: 72px; height: 72px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--card-accent) calc(var(--project-progress) * 1%), color-mix(in srgb, var(--card-accent) 10%, var(--line)) 0); position: relative; }
.project-card-ring::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; background: var(--surface); }
.project-card-ring span { position: relative; z-index: 1; font-size: 15px; font-weight: 900; color: var(--card-accent); font-variant-numeric: tabular-nums; }
.project-card-progress-copy { min-width: 0; display: grid; gap: 5px; }
.project-card-progress-copy > span { color: var(--muted); font-size: 10px; }
.project-card-progress-copy strong { font-size: 18px; }
.project-card-progress-copy .progress-track i { background: var(--card-accent); }
.project-card-meta { margin: 0 20px; padding: 14px 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 12px; border-block: 1px solid var(--line); }
.project-card-meta > div { min-width: 0; }
.project-card-meta dt { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.project-card-meta dt .ui-icon { width: 14px; height: 14px; color: var(--brand); }
.project-card-meta dd { margin: 5px 0 0; font-size: 12px; font-weight: 750; overflow-wrap: anywhere; }
.project-card-meta dd small { display: block; color: var(--muted); font-weight: 400; }
.project-card-finance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 15px 20px; }
.project-card-finance > div { min-width: 0; padding: 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.project-card-finance span { display: block; color: var(--muted); font-size: 9px; }
.project-card-finance strong { display: block; margin-top: 3px; font-size: 12px; overflow-wrap: anywhere; }
.project-card-actions { margin-top: auto; display: flex; gap: 7px; align-items: center; padding: 4px 20px 20px; }
.project-card-actions .button { min-height: 36px; }
.project-card-open { flex: 1; justify-content: center; }
.project-card-open .ui-icon { width: 15px; height: 15px; }
.project-empty-card { min-height: 230px; }

/* Interactive project map */
.project-map-panel { margin: 20px 0; padding: 0; overflow: hidden; }
.project-map-header { padding: 20px 22px 12px; margin: 0; align-items: flex-start; }
.panel-description { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.map-summary-chips { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.map-summary-chips > span { display: inline-flex; align-items: center; gap: 5px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: 10px; }
.map-summary-chips strong { color: var(--brand); font-size: 13px; }
.map-summary-chips .warning strong { color: var(--warning); }
.map-summary-chips .activity { border-color: color-mix(in srgb, #c91d36 28%, var(--line)); background: color-mix(in srgb, #c91d36 7%, var(--surface)); color: color-mix(in srgb, #c91d36 74%, var(--text)); box-shadow: 0 8px 22px rgba(201,29,54,.08); }
.map-summary-chips .activity strong { color: #c91d36; }
.map-summary-chips .activity b { color: var(--text); }
.project-map-toolbar { display: flex; align-items: center; gap: 8px; padding: 0 22px 14px; overflow-x: auto; scrollbar-width: thin; }
.map-filter { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-weight: 750; font-size: 11px; transition: .18s ease; }
.map-filter span { min-width: 20px; height: 20px; display: grid; place-items: center; border-radius: 999px; background: var(--surface-3); color: var(--brand); font-size: 9px; }
.map-filter:hover, .map-filter.is-active { border-color: var(--brand); color: #fff; background: var(--brand); box-shadow: 0 8px 20px rgba(0,71,65,.14); }
.map-filter.is-active span { background: rgba(255,255,255,.16); color: #fff; }
.project-map-stage { position: relative; min-height: 570px; overflow: hidden; border-top: 1px solid var(--line); background:
  radial-gradient(circle at 15% 18%, rgba(0,71,65,.055), transparent 30%),
  radial-gradient(circle at 86% 76%, rgba(143,24,37,.035), transparent 27%),
  linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 72%, var(--surface)), var(--surface)); }
.project-map-stage::before { content: ""; position: absolute; inset: 0; opacity: .32; pointer-events: none; background-image: radial-gradient(circle, color-mix(in srgb, var(--brand) 18%, transparent) 1px, transparent 1px); background-size: 24px 24px; mask-image: linear-gradient(to bottom, #000, transparent 82%); }
.project-map-svg { position: relative; z-index: 1; width: 100%; height: 570px; display: block; overflow: visible; }
.project-map-regional-base { pointer-events: none; filter: drop-shadow(0 14px 18px rgba(7,48,43,.12)); }
.project-map-stop-start { stop-color: var(--map-fill-start); }
.project-map-stop-end { stop-color: var(--map-fill-end); }
.project-map-country-shape { fill: url(#projectMapFill); stroke: var(--map-coast); stroke-width: 2.25; vector-effect: non-scaling-stroke; }
.project-map-region-label { fill: color-mix(in srgb, var(--brand) 82%, var(--muted)); font-family: inherit; font-size: 12px; font-weight: 800; opacity: .68; paint-order: stroke; stroke: color-mix(in srgb, var(--surface) 92%, transparent); stroke-width: 4px; stroke-linejoin: round; pointer-events: none; user-select: none; }
.project-map-marker { cursor: pointer; outline: none; }
.project-map-marker-outer { fill: var(--surface); stroke-width: 4; transition: r .16s ease, filter .16s ease; }
.project-map-marker-inner { stroke: #fff; stroke-width: 1.8; }
.project-map-marker-pulse { opacity: .12; transform-origin: center; animation: projectMapPulse 2.4s ease-out infinite; }
.project-map-marker:hover .project-map-marker-outer, .project-map-marker:focus .project-map-marker-outer { r: 13; filter: drop-shadow(0 5px 8px rgba(0,0,0,.18)); }
.map-marker-active .project-map-marker-outer { stroke: #0b806c; }
.map-marker-active .project-map-marker-inner, .map-marker-active .project-map-marker-pulse { fill: #0b806c; }
.map-marker-attention .project-map-marker-outer { stroke: #c58509; }
.map-marker-attention .project-map-marker-inner, .map-marker-attention .project-map-marker-pulse { fill: #c58509; }
.map-marker-completed .project-map-marker-outer { stroke: #477a61; }
.map-marker-completed .project-map-marker-inner, .map-marker-completed .project-map-marker-pulse { fill: #477a61; }
.map-marker-neutral .project-map-marker-outer { stroke: #60757e; }
.map-marker-neutral .project-map-marker-inner, .map-marker-neutral .project-map-marker-pulse { fill: #60757e; }
.map-marker-nationwide .project-map-marker-outer { stroke-dasharray: 3 2; stroke-width: 4.5; }
.map-marker-nationwide .project-map-marker-pulse { animation-duration: 1.9s; opacity: .18; }
.project-map-marker-alert-pulse { fill: none; stroke: #d22643; stroke-width: 2.5; opacity: 0; pointer-events: none; }
.map-marker-has-updates { filter: drop-shadow(0 0 7px rgba(210,38,67,.5)); }
.map-marker-has-updates .project-map-marker-alert-pulse { animation: projectMapAlertPulse 1.35s ease-out infinite; }
.map-marker-has-updates .project-map-marker-outer { stroke: #d22643; stroke-width: 4.5; }
.map-marker-has-updates .project-map-marker-inner { fill: #d22643; }
.project-map-update-badge circle { fill: #d22643; stroke: #fff; stroke-width: 2; filter: drop-shadow(0 3px 6px rgba(90,8,22,.28)); }
.project-map-update-badge text { fill: #fff; font-family: inherit; font-size: 8px; font-weight: 900; pointer-events: none; }
.project-map-marker-project-label { pointer-events: none; opacity: .92; }
.project-map-marker-project-label rect { fill: color-mix(in srgb, var(--surface) 92%, transparent); stroke: color-mix(in srgb, var(--brand) 24%, var(--line)); stroke-width: 1; }
.project-map-marker-project-label text { fill: var(--brand); font-family: inherit; font-size: 8px; font-weight: 900; direction: ltr; }
@keyframes projectMapAlertPulse { 0% { r: 12; opacity: .88; stroke-width: 3; } 75%,100% { r: 31; opacity: 0; stroke-width: 1; } }
@keyframes projectMapPulse { 0% { r: 10; opacity: .25; } 75%,100% { r: 24; opacity: 0; } }
.project-map-popup { position: absolute; z-index: 5; inset-block-start: 26px; inset-inline-end: 26px; width: min(350px, calc(100% - 52px)); padding: 18px; border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line)); border-radius: 18px; background: color-mix(in srgb, var(--surface) 94%, transparent); box-shadow: 0 22px 55px rgba(7,48,43,.18); backdrop-filter: blur(14px); }
.map-popup-close { position: absolute; inset-block-start: 10px; inset-inline-end: 11px; width: 28px; height: 28px; border: 0; border-radius: 9px; background: var(--surface-3); color: var(--muted); font-size: 20px; line-height: 1; }
.map-popup-code { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: var(--surface-3); color: var(--brand); font-size: 10px; font-weight: 900; direction: ltr; }
.project-map-popup h4 { margin: 10px 0 3px; padding-inline-end: 28px; font-size: 18px; line-height: 1.45; }
.project-map-popup > p { margin: 0 0 12px; color: var(--muted); font-size: 11px; }
.map-popup-meta { display: grid; gap: 5px; padding: 11px 0; border-block: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.map-popup-progress { display: grid; gap: 7px; padding: 13px 0; }
.map-popup-progress > div:first-child { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--muted); }
.map-popup-progress strong { color: var(--text); font-size: 15px; }
.map-popup-updates { display: grid; gap: 8px; margin: 0 0 13px; padding: 11px; border: 1px solid color-mix(in srgb, #d22643 22%, var(--line)); border-radius: 12px; background: color-mix(in srgb, #d22643 5%, var(--surface)); }
.map-popup-updates-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #a91831; font-size: 10px; }
.map-popup-updates-head > span { min-width: 28px; padding: 3px 7px; border-radius: 999px; background: #d22643; color: #fff; text-align: center; font-size: 9px; font-weight: 900; }
.map-popup-update-list { display: grid; gap: 6px; }
.map-popup-update-item { display: grid; gap: 2px; padding: 8px 9px; border-radius: 9px; background: color-mix(in srgb, var(--surface) 88%, transparent); border: 1px solid color-mix(in srgb, #d22643 12%, var(--line)); transition: .15s ease; }
.map-popup-update-item:hover { border-color: color-mix(in srgb, #d22643 32%, var(--line)); transform: translateY(-1px); }
.map-popup-update-item strong { color: var(--text); font-size: 10px; }
.map-popup-update-item small { color: var(--muted); font-size: 8px; }
.map-popup-footer { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.project-map-legend { position: absolute; z-index: 3; inset-inline-start: 20px; inset-block-end: 18px; display: flex; gap: 11px; flex-wrap: wrap; max-width: calc(100% - 40px); padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(9px); color: var(--muted); font-size: 9px; }
.project-map-legend > span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.map-legend-dot { width: 8px; height: 8px; border-radius: 50%; background: #60757e; }
.map-legend-dot.active { background: #0b806c; }
.map-legend-dot.attention { background: #c58509; }
.map-legend-dot.completed { background: #477a61; }
.map-legend-dot.nationwide { background: transparent; border: 2px dashed var(--brand); }
.project-map-empty { position: absolute; z-index: 4; inset: 0; display: grid; place-items: center; align-content: center; gap: 5px; text-align: center; pointer-events: none; }
.project-map-empty > span { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.project-map-empty .ui-icon { width: 25px; height: 25px; }
.project-map-empty small { color: var(--muted); }

.dashboard-project-cards { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.dashboard-project-card { display: grid; gap: 7px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-2); transition: .18s ease; }
.dashboard-project-card:hover { border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); background: color-mix(in srgb, var(--surface-3) 55%, var(--surface)); transform: translateY(-2px); }
.dashboard-project-card-top { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.dashboard-project-card > strong { line-height: 1.4; font-size: 13px; }
.dashboard-project-card > small { color: var(--muted); font-size: 10px; }
.dashboard-project-progress { display: grid; gap: 5px; margin-top: 3px; }
.dashboard-project-progress > span { color: var(--muted); font-size: 9px; }
.dashboard-project-progress b { color: var(--brand); font-size: 11px; }

@media (max-width: 1280px) {
  .project-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .project-map-stage, .project-map-svg { min-height: 500px; height: 500px; }
  .map-summary-chips { justify-content: flex-start; }
  .project-map-header { flex-direction: column; gap: 10px; }
}
@media (max-width: 760px) {
  .project-map-region-label { font-size: 10px; }
  .project-card-grid { grid-template-columns: 1fr; }
  .project-card { min-height: 0; }
  .project-card-meta { grid-template-columns: 1fr 1fr; }
  .project-card-finance { grid-template-columns: 1fr; }
  .project-card-actions { flex-wrap: wrap; }
  .project-card-open { flex-basis: 100%; }
  .project-map-stage, .project-map-svg { min-height: 440px; height: 440px; }
  .project-map-popup { inset-block-start: 14px; inset-inline-end: 14px; width: calc(100% - 28px); }
  .project-map-legend { inset-inline-start: 12px; inset-block-end: 10px; max-width: calc(100% - 24px); }
  .dashboard-project-cards { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .project-card-section-head { align-items: flex-start; flex-direction: column; }
  .project-card-head { padding-inline: 15px; }
  .project-card-progress-row, .project-card-finance { padding-inline: 15px; }
  .project-card-meta { margin-inline: 15px; grid-template-columns: 1fr; }
  .project-card-actions { padding-inline: 15px; }
  .project-map-header, .project-map-toolbar { padding-inline: 14px; }
  .project-map-stage, .project-map-svg { min-height: 385px; height: 385px; }
  .project-map-legend { display: none; }
}

/* V1.2.5 — preserve the weekly report while a secure session is refreshed. */
.weekly-draft-feedback:not([hidden]) {
  margin: 0 0 16px;
  padding: 12px 16px;
  border: 1px solid #b9d8cf;
  border-radius: 12px;
  background: #edf7f3;
  color: #004741;
  line-height: 1.7;
  font-size: .92rem;
}

/* V1.2.18 workforce/vehicle inline lifecycle controls */
.inline-actions { display:flex; align-items:center; justify-content:flex-end; gap:.45rem; flex-wrap:wrap; }
.inline-edit-form { min-width:260px; max-width:360px; margin-top:.7rem; padding:1rem; background:var(--surface, #fff); border:1px solid var(--border, #d9e3e1); border-radius:14px; box-shadow:0 12px 30px rgba(0,0,0,.08); }
.inline-actions details { position:relative; }

/* V1.2.20 — premium employee edit modal */
.premium-modal { position:fixed; inset:0; z-index:1200; display:grid; place-items:center; padding:22px; visibility:hidden; opacity:0; pointer-events:none; transition:opacity .22s ease, visibility .22s ease; }
.premium-modal.is-open { visibility:visible; opacity:1; pointer-events:auto; }
.premium-modal-backdrop { position:absolute; inset:0; background:rgba(0,39,35,.52); backdrop-filter:blur(8px); }
.premium-modal-dialog { position:relative; width:min(720px,100%); max-height:min(88vh,760px); overflow:auto; border:1px solid rgba(255,255,255,.72); border-radius:26px; background:linear-gradient(145deg,#fff 0%,#f7faf8 72%,#edf5f1 100%); box-shadow:0 35px 90px rgba(0,34,30,.32),0 8px 30px rgba(0,34,30,.14); transform:translateY(18px) scale(.985); transition:transform .25s cubic-bezier(.2,.8,.2,1); direction:rtl; }
.premium-modal.is-open .premium-modal-dialog { transform:translateY(0) scale(1); }
.premium-modal-dialog::-webkit-scrollbar { width:8px; }
.premium-modal-dialog::-webkit-scrollbar-thumb { background:#bfd3ce; border-radius:999px; }
.premium-modal-glow { position:absolute; inset:-90px auto auto -90px; width:230px; height:230px; border-radius:50%; background:radial-gradient(circle,rgba(0,71,65,.16),transparent 68%); pointer-events:none; }
.premium-modal-header { position:relative; display:flex; align-items:flex-start; justify-content:space-between; gap:18px; padding:28px 30px 20px; }
.premium-modal-heading { display:flex; align-items:center; gap:15px; }
.premium-modal-heading .eyebrow { color:#087466; font-size:10px; font-weight:900; letter-spacing:.04em; }
.premium-modal-heading h3 { margin:4px 0 3px; color:#07302b; font-size:23px; line-height:1.35; }
.premium-modal-heading p { margin:0; color:#70807d; font-size:11px; }
.premium-modal-icon { width:52px; height:52px; flex:0 0 52px; display:grid; place-items:center; border-radius:17px; background:linear-gradient(145deg,#dfeee9,#f8fbfa); color:#00675e; border:1px solid #c8ddd7; box-shadow:inset 0 1px rgba(255,255,255,.9),0 8px 20px rgba(0,71,65,.08); }
.premium-modal-icon .ui-icon { width:24px; height:24px; }
.premium-modal-close { width:38px; height:38px; flex:0 0 38px; display:grid; place-items:center; border:1px solid #d7e3df; border-radius:12px; background:rgba(255,255,255,.72); color:#60716e; font-size:25px; line-height:1; cursor:pointer; transition:.16s ease; }
.premium-modal-close:hover { color:#07302b; border-color:#9fc0b8; background:#fff; transform:rotate(3deg); }
.premium-modal-profile { margin:0 30px 20px; display:flex; align-items:center; gap:13px; padding:13px 15px; border:1px solid #d8e5e1; border-radius:17px; background:rgba(255,255,255,.72); box-shadow:0 8px 24px rgba(0,50,45,.05); }
.premium-avatar { width:44px; height:44px; flex:0 0 44px; display:grid; place-items:center; border-radius:14px; background:#004741; color:#fff; font-size:17px; font-weight:900; box-shadow:0 7px 16px rgba(0,71,65,.18); }
.premium-modal-profile > div { display:grid; gap:3px; min-width:0; }
.premium-modal-profile strong { color:#163d38; font-size:14px; }
.premium-modal-profile small { color:#82918e; font-size:10px; }
.premium-modal-profile small b { color:#49635f; }
.premium-edit-badge { margin-inline-start:auto; padding:6px 10px; border:1px solid #c6ddd7; border-radius:999px; background:#edf7f3; color:#087466; font-size:9px; font-weight:900; white-space:nowrap; }
.premium-modal-form { padding:0 30px 26px; }
.premium-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:15px; }
.premium-field { display:grid; gap:7px; }
.premium-field > span { color:#49625e; font-size:10px; font-weight:800; }
.premium-field input { min-height:46px; border:1px solid #d5e2df; border-radius:13px; background:#fff; color:#183d38; padding:0 13px; box-shadow:0 2px 8px rgba(0,50,45,.025); transition:.16s ease; }
.premium-field input:focus { outline:none; border-color:#66a69b; box-shadow:0 0 0 4px rgba(0,71,65,.08),0 6px 18px rgba(0,50,45,.05); }
.premium-field-wide { grid-column:1 / -1; }
.premium-modal-footer { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-top:24px; padding-top:18px; border-top:1px solid #dde8e5; }
.premium-modal-hint { color:#84928f; font-size:10px; }
.premium-modal-actions { display:flex; align-items:center; gap:9px; }
.premium-modal-actions .button { min-width:105px; justify-content:center; }
.premium-save-button { box-shadow:0 9px 20px rgba(0,71,65,.16); }
.premium-modal-open { overflow:hidden; }
@media (max-width:640px) {
  .premium-modal { padding:10px; }
  .premium-modal-dialog { max-height:94vh; border-radius:21px; }
  .premium-modal-header { padding:21px 18px 16px; }
  .premium-modal-heading h3 { font-size:19px; }
  .premium-modal-heading p { font-size:10px; }
  .premium-modal-icon { width:44px; height:44px; flex-basis:44px; border-radius:14px; }
  .premium-modal-profile { margin-inline:18px; }
  .premium-modal-form { padding-inline:18px; }
  .premium-form-grid { grid-template-columns:1fr; }
  .premium-field-wide { grid-column:auto; }
  .premium-modal-footer { align-items:stretch; flex-direction:column; }
  .premium-modal-actions { justify-content:flex-end; }
  .premium-edit-badge { display:none; }
}
