:root {
  color-scheme: dark;
  font-family: "Segoe UI", Arial, sans-serif;
  --bg: #353535;
  --bg-2: #2f2f2f;
  --panel: #1a2d41;
  --panel-2: #10263b;
  --panel-3: #223b55;
  --border: #828282;
  --border-soft: #4f5a63;
  --text: #ffffff;
  --muted: #9aa7b0;
  --accent: #c4b19f;
  --thead: #5a4b40;
  --thead-text: #ffe4c6;
  --row-odd: #19314a;
  --row-even: #10263b;
  --row-hover: #223b55;
  --button-text: #1a2d41;
  --chart-grid: #4f5a63;
  background: var(--bg);
  color: var(--text);
}

html.light {
  color-scheme: light;
  --bg: #f3f5f8;
  --bg-2: #ffffff;
  --panel: #ffffff;
  --panel-2: #eef3f8;
  --panel-3: #e4edf6;
  --border: #c9d3df;
  --border-soft: #dbe3ec;
  --text: #172333;
  --muted: #617086;
  --accent: #9b8068;
  --thead: #d8c8b8;
  --thead-text: #172333;
  --row-odd: #ffffff;
  --row-even: #eef4fa;
  --row-hover: #e2edf7;
  --button-text: #10263b;
  --chart-grid: #dbe3ec;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body { min-width: 320px; margin: 0; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #c4b19f; outline-offset: 2px; }

.page-shell, .dashboard { min-height: 100vh; }
.brand { display: flex; align-items: center; min-width: 0; }
.brand-logo { display: block; width: 180px; height: auto; }

.login-view {
  display: grid;
  min-height: 100vh;
  place-content: center;
  gap: 28px;
  padding: 32px 24px;
  background: var(--panel);
}

.login-view .brand { justify-content: center; }
.login-form {
  display: grid;
  width: min(100%, 380px);
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 26px; font-weight: 600; letter-spacing: 0; }
h2 { margin-bottom: 0; font-size: 18px; font-weight: 600; letter-spacing: 0; }
.eyebrow { margin-bottom: 0; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: 0; }
.muted { color: var(--muted); }
label { display: grid; gap: 7px; color: var(--text); font-size: 14px; }
input, select {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--muted);
  border-radius: 4px;
  background: var(--panel-2);
  color: var(--text);
}
button {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--accent);
  border-radius: 4px;
  background: var(--accent);
  color: var(--button-text);
  font-weight: 700;
}
button:hover { background: var(--bg-2); }
#download-backup-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--app-line-strong);
  border-radius: 6px;
  background: linear-gradient(145deg, #d8c5b3, #b59d87);
  color: #13263b;
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.14), inset 0 1px rgba(255, 255, 255, 0.35);
  font: inherit;
  font-weight: 650;
  letter-spacing: 0;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}
#download-backup-link:hover {
  border-color: #e1d0c0;
  background: linear-gradient(145deg, #e3d1c0, #c2aa94);
  color: #0f2135;
  transform: translateY(-1px);
}
#download-backup-link:active { transform: translateY(0); box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.12); }
#download-backup-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--app-bronze) 78%, white);
  outline-offset: 2px;
}
#download-backup-link svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  stroke-width: 1.9;
}
.button-secondary { min-height: 32px; padding: 5px 10px; background: transparent; color: var(--accent); }
.button-secondary:hover { background: var(--panel); color: var(--text); }
.error { min-height: 18px; margin-bottom: 0; color: #ffffff; font-size: 14px; }

.topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  padding: 10px 32px;
  border-bottom: 1px solid #828282;
  background: #1a2d41;
}
.topbar .brand-logo { width: 124px; }
.account { display: flex; align-items: center; gap: 14px; color: #9aa7b0; }
.account button { min-height: 32px; background: transparent; color: #c4b19f; }
.alerts-button { position: relative; min-width: 38px; padding: 4px 8px; font-size: 18px; }
.alerts-button span { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 2px 5px; border-radius: 999px; background: #c4b19f; color: #0e2233; font-size: 11px; font-weight: 800; line-height: 16px; }
.theme-btn { width: 38px; min-width: 38px; height: 38px; padding: 0; display: inline-grid; place-items: center; border-color: var(--border); background: var(--panel-2); color: var(--accent); }
.theme-btn svg { width: 17px; height: 17px; }
.theme-btn .ic-moon { display: none; }
html.light .theme-btn .ic-sun { display: none; }
html.light .theme-btn .ic-moon { display: block; }
.alerts-panel { position: absolute; top: 64px; right: 32px; z-index: 20; width: min(420px, calc(100vw - 40px)); padding: 14px; border: 1px solid #828282; border-radius: 6px; background: #1a2d41; box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28); }
.alerts-panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; color: #ffffff; }
.alerts-list { display: grid; gap: 8px; }
.alert-item { width: 100%; min-height: 38px; justify-content: flex-start; border-color: #828282; background: #353535; color: #ffffff; text-align: left; }

.view-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 10px 32px 0;
  border-bottom: 1px solid #828282;
  background: #1a2d41;
}
.view-tab { min-height: 38px; border-color: transparent; border-bottom: 0; border-radius: 4px 4px 0 0; background: transparent; color: #9aa7b0; white-space: nowrap; }
.view-tab:hover, .view-tab.is-active { background: #353535; color: #ffffff; }

.dashboard-content { max-width: 1840px; margin: 0 auto; padding: 28px 22px; }
.view-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.view-heading h1 { margin-top: 8px; }
.view-heading .muted { margin-bottom: 0; }
.view-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.status-message { min-height: 20px; margin-bottom: 0; color: #c4b19f; font-size: 14px; text-align: right; }

.dashboard-filters { align-items: end; }
.dashboard-filters button { min-height: 34px; }
.dashboard-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 30px; }
.kpi { display: grid; min-height: 102px; gap: 8px; padding: 16px; border-left: 3px solid #9aa7b0; background: #1a2d41; }
.kpi span { color: #9aa7b0; font-size: 13px; }
.kpi strong { color: #ffffff; font-size: 28px; font-weight: 600; }
.kpi-pending { border-left-color: #c4b19f; background: #353535; }
.kpi-pending strong { color: #c4b19f; }
.dashboard-mode-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.dashboard-mode { min-height: 34px; padding: 6px 12px; border-color: #828282; background: #1a2d41; color: #9aa7b0; }
.dashboard-mode:hover, .dashboard-mode.is-active { border-color: #c4b19f; background: #353535; color: #ffffff; }
.dashboard-insights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 28px; }
.insight-card { min-width: 0; padding: 18px; border: 1px solid #828282; border-radius: 6px; background: #1a2d41; }
.insight-card h2 { margin-bottom: 14px; color: #c4b19f; font-size: 13px; text-transform: uppercase; }
.insight-row { display: grid; gap: 6px; padding: 9px 0; border-top: 1px solid #4f5a63; }
.insight-row-main { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.insight-row-main strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.insight-row-main span { color: #ffffff; font-weight: 800; white-space: nowrap; }
.insight-row small { color: #9aa7b0; }
.insight-bar { height: 7px; overflow: hidden; border-radius: 999px; background: #353535; }
.insight-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #c4b19f, #9aa7b0); }
.dashboard-activity { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.activity-list { min-width: 0; }
.activity-list h2 { margin-bottom: 14px; }
.recent-list { border-top: 1px solid #828282; }
.recent-row { display: grid; grid-template-columns: 100px minmax(0, 1fr) 110px; gap: 12px; align-items: center; min-height: 48px; border-bottom: 1px solid #828282; color: #9aa7b0; font-size: 13px; }
.recent-row strong { min-width: 0; overflow: hidden; color: #ffffff; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.recent-row span:last-child { text-align: right; }

.consultation-filters { display: grid; grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(120px, 1fr)) auto; gap: 14px; align-items: end; margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid #828282; }
.filter-actions { display: flex; gap: 8px; }
.filter-actions button { min-height: 40px; }
.project-results { display: grid; gap: 18px; }
.project-card { border: 1px solid #828282; border-radius: 6px; background: #1a2d41; }
.project-card > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid #828282; }
.project-card h2 { margin-bottom: 5px; }
.project-card header p { margin-bottom: 0; }
.project-card > header > span { color: #c4b19f; font-size: 13px; font-weight: 700; }
.project-phase-table-wrap { padding: 20px; overflow-x: auto; }
.consultation-table-wrap { max-height: calc(100vh - 260px); padding: 0; border: 1px solid #828282; }
.project-phase-table { min-width: 1100px; }
.consultation-table th { position: sticky; top: 0; z-index: 4; }
.phase-timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0; padding: 20px; }
.phase-card { display: grid; grid-template-columns: auto 1fr 1fr; gap: 12px 16px; min-height: 104px; padding: 0 18px; border-left: 2px solid #c4b19f; }
.phase-card:first-child { padding-left: 0; border-left: 0; }
.phase-name { grid-column: 1 / -1; color: #c4b19f; font-size: 15px; font-weight: 700; }
.phase-point, .phase-hours { display: grid; gap: 4px; }
.phase-point span, .phase-hours span { color: #9aa7b0; font-size: 12px; }
.phase-point strong, .phase-hours strong { color: #ffffff; font-size: 14px; }
.phase-hours { grid-column: 3; }

.entry-layout { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 24px; align-items: start; }
.hours-report-layout { display: grid; grid-template-columns: minmax(0, 1fr); }
.entry-form, .entries-panel { border: 1px solid #828282; border-radius: 6px; background: #1a2d41; }
.entry-form { display: grid; gap: 18px; padding: 22px; }
.entries-panel { min-width: 0; padding: 20px; }
.form-title-row, .table-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid label:nth-child(2), .form-grid label:nth-child(3), .form-field-wide { grid-column: 1 / -1; }
#time-entry-form .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
#time-entry-form .form-grid label { grid-column: auto; }
#time-entry-form .form-grid label:nth-of-type(1) { grid-column: 1 / -1; }
#time-entry-form .form-grid label:nth-of-type(2) { grid-column: 1 / 3; }
.table-header { align-items: flex-start; margin-bottom: 18px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; }
.filters label { width: 150px; font-size: 12px; }
.filters input { min-height: 34px; }
.table-wrap { max-height: calc(100vh - 300px); overflow: auto; border: 1px solid #828282; }
table { width: 100%; min-width: 850px; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
th, td { padding: 11px 12px; border-bottom: 1px solid #828282; text-align: left; vertical-align: top; }
th { position: sticky; top: 0; z-index: 3; background: #5a4b40; color: #ffe4c6; font-size: 12px; font-weight: 800; white-space: nowrap; }
td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
td:nth-child(3), td:nth-child(4) { min-width: 180px; }
th:last-child, td:last-child { position: sticky; right: 0; z-index: 2; min-width: 150px; width: 150px; overflow: visible; background: #1a2d41; box-shadow: -1px 0 0 #828282; }
th:last-child { z-index: 5; background: #5a4b40; }
tbody tr:nth-child(odd) td { background: #19314a; }
tbody tr:nth-child(even) td { background: #10263b; }
tbody tr:nth-child(odd) td:last-child { background: #19314a; }
tbody tr:nth-child(even) td:last-child { background: #10263b; }
tbody tr:hover td { background: #223b55; }
tbody tr:hover td:last-child { background: #223b55; }
tr:last-child td { border-bottom: 0; }
.column-resizer { position: absolute; top: 0; right: -3px; z-index: 1; width: 7px; height: 100%; cursor: col-resize; touch-action: none; }
.column-resizer::after { content: ""; position: absolute; top: 22%; right: 3px; width: 1px; height: 56%; background: #828282; }
.column-resizer:hover::after, .is-resizing-column .column-resizer::after { background: #c4b19f; }
.is-resizing-column { cursor: col-resize; user-select: none; }
.table-action { min-height: 28px; margin-right: 4px; padding: 4px 6px; border-color: #9aa7b0; background: transparent; color: #ffffff; font-size: 12px; white-space: nowrap; }
.table-action:last-child { margin-right: 0; }
.table-action:hover { background: #353535; }
.table-action.danger { border-color: #828282; color: #c4b19f; }
.status-badge { display: inline-flex; min-width: 104px; align-items: center; justify-content: center; gap: 6px; padding: 4px 8px; border: 1px solid #9aa7b0; border-radius: 4px; color: #ffffff; font-size: 12px; font-weight: 800; }
.status-button { min-height: 30px; background: transparent; cursor: pointer; }
.status-button:hover { background: #353535; }
.status-icon { display: inline-grid; width: 18px; height: 18px; flex: 0 0 18px; place-items: center; border-radius: 50%; font-size: 13px; line-height: 1; font-weight: 900; }
.status-menu { position: fixed; z-index: 80; display: grid; gap: 6px; min-width: 132px; padding: 8px; border: 1px solid #828282; border-radius: 5px; background: #1a2d41; box-shadow: 0 12px 28px rgba(0, 0, 0, 0.36); }
.status-menu button { min-height: 30px; padding: 5px 9px; background: #353535; color: #ffffff; text-align: left; }
.status-menu button:hover { background: #4a4039; }
.status-badge.approved { border-color: #55b878; color: #bdf3cf; }
.status-badge.approved .status-icon { background: #55b878; color: #10263b; }
.status-badge.pending { border-color: #d8973c; color: #ffd99c; }
.status-badge.pending .status-icon { background: #d8973c; color: #10263b; }
.status-badge.rejected { border-color: #d85c5c; color: #ffc1c1; }
.status-badge.rejected .status-icon { background: #d85c5c; color: #10263b; }
.delivery-pendency td { color: #ffffff; }
.hours-table { min-width: 1540px; }
.hours-table th:nth-child(1), .hours-table td:nth-child(1) { width: 104px; }
.hours-table th:nth-child(2), .hours-table td:nth-child(2) { width: 122px; }
.hours-table th:nth-child(3), .hours-table td:nth-child(3) { width: 230px; }
.hours-table th:nth-child(4), .hours-table td:nth-child(4) { width: 180px; }
.hours-table th:nth-child(5), .hours-table td:nth-child(5) { width: 78px; }
.hours-table th:nth-child(6), .hours-table td:nth-child(6) { width: 78px; }
.hours-table th:nth-child(7), .hours-table td:nth-child(7) { width: 154px; }
.hours-table th:nth-child(8), .hours-table td:nth-child(8) { width: 72px; }
.hours-table th:nth-child(9), .hours-table td:nth-child(9),
.hours-table th:nth-child(10), .hours-table td:nth-child(10) { width: 96px; }
.hours-table th:nth-child(11), .hours-table td:nth-child(11) { width: 86px; }
.hours-table th:nth-child(12), .hours-table td:nth-child(12) { width: 88px; }

.deliveries-table { min-width: 1680px; }
.deliveries-table th:nth-child(1), .deliveries-table td:nth-child(1) { width: 132px; }
.deliveries-table th:nth-child(2), .deliveries-table td:nth-child(2) { width: 104px; }
.deliveries-table th:nth-child(3), .deliveries-table td:nth-child(3) { width: 124px; }
.deliveries-table th:nth-child(4), .deliveries-table td:nth-child(4) { width: 230px; }
.deliveries-table th:nth-child(5), .deliveries-table td:nth-child(5) { width: 180px; }
.deliveries-table th:nth-child(6), .deliveries-table td:nth-child(6) { width: 82px; }
.deliveries-table th:nth-child(7), .deliveries-table td:nth-child(7) { width: 86px; }
.deliveries-table th:nth-child(8), .deliveries-table td:nth-child(8) { width: 72px; }
.deliveries-table th:nth-child(9), .deliveries-table td:nth-child(9),
.deliveries-table th:nth-child(10), .deliveries-table td:nth-child(10),
.deliveries-table th:nth-child(11), .deliveries-table td:nth-child(11) { width: 98px; }
.deliveries-table th:nth-child(12), .deliveries-table td:nth-child(12) { width: 190px; }
.deliveries-table th:nth-child(13), .deliveries-table td:nth-child(13) { width: 88px; }
.consultation-table th:nth-child(1), .consultation-table td:nth-child(1) { width: 260px; }
.consultation-table th:nth-child(2), .consultation-table td:nth-child(2) { width: 190px; }
.consultation-table th:nth-child(3), .consultation-table td:nth-child(3) { width: 90px; }
.consultation-table th:nth-child(4), .consultation-table td:nth-child(4),
.consultation-table th:nth-child(5), .consultation-table td:nth-child(5),
.consultation-table th:nth-child(6), .consultation-table td:nth-child(6) { width: 120px; }
.consultation-table th:nth-child(7), .consultation-table td:nth-child(7) { width: 95px; }
.admin-layout { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); }
.backup-panel { margin-top: 22px; }
.backup-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.backup-form .active-toggle { align-self: end; }
.backup-actions { display: flex; gap: 10px; align-items: end; }
.backup-status { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 18px 0 0; }
.backup-status div { padding: 12px; border: 1px solid #828282; border-radius: 5px; background: #10263b; }
.backup-status dt { margin-bottom: 5px; color: #c4b19f; font-size: 12px; font-weight: 800; }
.backup-status dd { margin: 0; color: #ffffff; font-size: 13px; overflow-wrap: anywhere; }
.users-table { min-width: 920px; }
.users-table th:nth-child(1), .users-table td:nth-child(1) { width: 180px; }
.users-table th:nth-child(2), .users-table td:nth-child(2) { width: 260px; }
.users-table th:nth-child(3), .users-table td:nth-child(3) { width: 150px; }
.users-table th:nth-child(4), .users-table td:nth-child(4) { width: 120px; }
.users-table th:last-child, .users-table td:last-child { width: 230px; min-width: 230px; }
.users-table td:nth-child(3), .users-table td:nth-child(4) { min-width: auto; }
.requests-layout { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 24px; align-items: start; }
.entry-form textarea { width: 100%; min-height: 120px; padding: 10px; border: 1px solid #828282; border-radius: 4px; background: #1a2d41; color: #ffffff; resize: vertical; }
.recipient-field { display: grid; gap: 9px; color: #ffffff; font-size: 14px; }
.recipient-dropzone {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  min-height: 82px;
  padding: 10px;
  border: 1px dashed #c4b19f;
  border-radius: 5px;
  background: #10263b;
}
.recipient-dropzone.is-drag-over { border-style: solid; background: #223b55; }
.recipient-placeholder { color: #9aa7b0; font-size: 13px; }
.recipient-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.person-token, .recipient-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  border: 1px solid #9aa7b0;
  border-radius: 999px;
  background: #223b55;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}
.person-token { padding: 4px 10px 4px 5px; cursor: grab; }
.person-token:hover { border-color: #c4b19f; background: #2d4660; }
.recipient-chip { padding: 4px 5px; border-color: #c4b19f; background: #353535; }
.recipient-avatar {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: #c4b19f;
  color: #10263b;
  font-size: 11px;
  font-weight: 800;
}
.recipient-chip button {
  min-height: 22px;
  width: 22px;
  padding: 0;
  border-color: transparent;
  border-radius: 50%;
  background: transparent;
  color: #c4b19f;
}
.recipient-chip button:hover { background: #4a4039; color: #ffffff; }
.requests-list { display: grid; gap: 14px; }
.request-card { border: 1px solid #828282; border-radius: 6px; background: #1a2d41; }
.request-card > header { display: flex; justify-content: space-between; gap: 14px; padding: 16px; border-bottom: 1px solid #828282; }
.request-card h2 { margin-bottom: 4px; font-size: 18px; }
.request-card > header span { color: #c4b19f; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.request-messages { display: grid; gap: 10px; padding: 16px; }
.request-message { max-width: 78%; padding: 10px 12px; border: 1px solid #828282; border-radius: 6px; background: #353535; }
.request-message.is-own { justify-self: end; border-color: #c4b19f; }
.request-message strong { display: block; margin-bottom: 4px; color: #c4b19f; font-size: 12px; }
.request-message p { margin-bottom: 0; white-space: pre-wrap; }
.request-reply-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 0 16px 16px; }
.request-reply-form input { min-height: 38px; }
.active-toggle { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.active-toggle input { width: 18px; min-height: 18px; }
.password-reset-dialog, .time-entry-dialog { padding: 0; border: 1px solid #828282; border-radius: 6px; background: #1a2d41; color: #ffffff; }
.password-reset-dialog { width: min(100% - 32px, 420px); }
.time-entry-dialog { width: min(100% - 32px, 760px); }
.password-reset-dialog::backdrop, .time-entry-dialog::backdrop { background: rgba(53, 53, 53, 0.78); }
.password-reset-dialog .entry-form, .time-entry-dialog .entry-form { border: 0; }
.empty-state { margin: 16px 0 0; color: #9aa7b0; }

.dashboard-chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 28px; }
.dashboard-chart-grid.single { grid-template-columns: minmax(0, 1fr); }
.dashboard-chart-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.chart-card { min-width: 0; padding: 16px 18px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel); }
.chart-card-title { margin-bottom: 14px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: 0; text-transform: uppercase; }
.chart-wrap { position: relative; width: 100%; height: 220px; }
.chart-wrap.h160 { height: 160px; }
.chart-wrap.h200 { height: 200px; }
.chart-wrap.h260 { height: 260px; }
.chart-wrap.h300 { height: 300px; }
.chart-wrap canvas { display: block; width: 100%; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 12px; margin-top: 12px; color: var(--muted); font-size: 12px; }
.leg-item { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.leg-dot { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 999px; }
.dashboard-list { display: grid; gap: 9px; }
.dash-row { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(120px, 2fr) 76px; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border-soft); }
.dash-row strong, .dash-row span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-row strong { color: var(--text); }
.dash-row small { color: var(--muted); text-align: right; }
.dash-track { height: 7px; overflow: hidden; border-radius: 999px; background: var(--bg); }
.dash-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--muted)); }
.team-bar-card { min-width: 0; padding: 16px 18px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel); }
.tbrow { display: grid; grid-template-columns: 112px minmax(0, 1fr) 72px 48px; gap: 10px; align-items: center; min-height: 34px; }
.tb-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.tb-track { height: 18px; overflow: hidden; border-radius: 999px; background: var(--bg); }
.tb-fill { height: 100%; padding-right: 7px; border-radius: inherit; color: #ffffff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: right; }
.tb-val { font-weight: 800; text-align: right; }
.tb-pct { color: var(--muted); font-size: 12px; text-align: right; }
.dashboard-empty { color: var(--muted); }

html.light .login-view,
html.light .topbar,
html.light .view-tabs,
html.light .entry-form,
html.light .entries-panel,
html.light .project-card,
html.light .request-card,
html.light .alerts-panel { background: var(--panel); }
html.light .login-form,
html.light .kpi-pending,
html.light .request-message,
html.light .alert-item { background: var(--bg-2); }
html.light .kpi,
html.light .backup-status div,
html.light .recipient-dropzone,
html.light .status-menu,
html.light .recipient-chip { background: var(--panel-2); }
html.light .view-tab:hover,
html.light .view-tab.is-active,
html.light .dashboard-mode:hover,
html.light .dashboard-mode.is-active { background: var(--bg); color: var(--text); }
html.light th { background: var(--thead); color: var(--thead-text); }
html.light tbody tr:nth-child(odd) td,
html.light tbody tr:nth-child(odd) td:last-child { background: var(--row-odd); }
html.light tbody tr:nth-child(even) td,
html.light tbody tr:nth-child(even) td:last-child { background: var(--row-even); }
html.light tbody tr:hover td,
html.light tbody tr:hover td:last-child { background: var(--row-hover); }
html.light th:last-child { background: var(--thead); }
html.light td:last-child { background: var(--row-odd); }
html.light .table-action,
html.light .recent-row strong,
html.light .kpi strong,
html.light .phase-point strong,
html.light .phase-hours strong,
html.light .backup-status dd { color: var(--text); }

body, .topbar, .view-tabs, .entry-form, .entries-panel, .table-wrap, th, td,
.project-card, .request-card, .alerts-panel, .consultation-filters, .recent-list,
.recent-row, .backup-status div { border-color: var(--border); }
.topbar, .view-tabs, .entry-form, .entries-panel, .project-card, .request-card, .alerts-panel { background: var(--panel); }
.view-tab, .account, .recent-row, .kpi span, .phase-point span, .phase-hours span, .empty-state { color: var(--muted); }
.kpi { background: var(--panel); border-left-color: var(--muted); }
.kpi strong, .recent-row strong, .insight-row-main span { color: var(--text); }
.kpi-pending { background: var(--bg); border-left-color: var(--accent); }
.kpi-pending strong, .status-message, .project-card > header > span { color: var(--accent); }
.dashboard-mode { border-color: var(--border); background: var(--panel); color: var(--muted); }
.dashboard-mode:hover, .dashboard-mode.is-active { border-color: var(--accent); background: var(--bg); color: var(--text); }
.table-wrap { background: var(--panel); }
th { background: var(--thead); color: var(--thead-text); }
tbody tr:nth-child(odd) td, tbody tr:nth-child(odd) td:last-child { background: var(--row-odd); }
tbody tr:nth-child(even) td, tbody tr:nth-child(even) td:last-child { background: var(--row-even); }
tbody tr:hover td, tbody tr:hover td:last-child { background: var(--row-hover); }
th:last-child { background: var(--thead); }
td:last-child { background: var(--row-odd); box-shadow: -1px 0 0 var(--border); }

@media (max-width: 980px) {
  .dashboard-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-activity { grid-template-columns: 1fr; }
  .dashboard-chart-grid, .dashboard-chart-grid.three { grid-template-columns: 1fr; }
  .consultation-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-actions { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .login-view { place-content: start center; padding-top: 72px; }
  .topbar { padding: 10px 18px; }
  .topbar .brand-logo { width: 104px; }
  .view-tabs { padding: 10px 18px 0; }
  .dashboard-content { padding: 28px 18px; }
  .view-heading, .form-title-row, .table-header, .view-actions { align-items: flex-start; flex-direction: column; }
  .status-message { text-align: left; }
  .entry-layout, .admin-layout, .requests-layout { grid-template-columns: 1fr; }
  .form-grid, .dashboard-kpis, .consultation-filters { grid-template-columns: 1fr; }
  .form-grid label:nth-child(2), .form-grid label:nth-child(3), .form-field-wide, .filter-actions { grid-column: auto; }
  .filters { width: 100%; }
  .filters label { flex: 1 1 100%; width: auto; }
  .filter-actions { width: 100%; }
  .filter-actions button { flex: 1; }
  .phase-timeline { gap: 18px; padding: 18px; }
  .phase-card, .phase-card:first-child { padding-left: 16px; border-left: 2px solid #c4b19f; }
  .recent-row { grid-template-columns: 80px minmax(0, 1fr); }
  .recent-row span:last-child { grid-column: 2; text-align: left; }
}

/* Dashboard analitico inspirado no relatorio Equipe Fabio.html */
.fabim-report-shell {
  --report-bg: #0b1020;
  --report-surface: #11182a;
  --report-surface-2: #151f35;
  --report-line: #263451;
  --report-text: #f7f9ff;
  --report-muted: #8491b5;
  --report-muted-2: #aab4cf;
  --report-blue: #4f8ef7;
  --report-teal: #2dd4bf;
  --report-purple: #a78bfa;
  --report-pink: #f472b6;
  --report-orange: #fb923c;
  --report-green: #4ade80;
  --report-yellow: #fbbf24;
  --report-red: #f87171;
  margin: -28px -22px;
  color: var(--report-text);
  background: linear-gradient(155deg, #0b1020 0%, #10172a 48%, #0b1020 100%);
}

html.light .fabim-report-shell {
  --report-bg: #f3f6fc;
  --report-surface: #ffffff;
  --report-surface-2: #eef3fb;
  --report-line: #d5deef;
  --report-text: #18213a;
  --report-muted: #6f7b9b;
  --report-muted-2: #4f5f82;
  background: linear-gradient(155deg, #f5f8fd 0%, #edf3fb 48%, #f8faff 100%);
}

.report-dashboard { min-height: calc(100vh - 166px); }
.report-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(500px, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 70px;
  padding: 12px 28px;
  border-top: 3px solid transparent;
  border-bottom: 1px solid var(--report-line);
  border-image: linear-gradient(90deg, #7f1d34, #d84b68, var(--report-blue), var(--report-teal)) 1;
  background: color-mix(in srgb, var(--report-bg) 88%, transparent);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .18);
  backdrop-filter: blur(18px) saturate(130%);
}
.report-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.report-title img { display: block; width: 104px; height: auto; }
.report-title strong { color: var(--report-muted-2); font-size: 15px; font-weight: 600; white-space: nowrap; }
.report-title-separator { width: 1px; height: 28px; background: var(--report-line); }

.report-nav {
  display: grid;
  grid-template-columns: repeat(6, minmax(74px, 1fr));
  gap: 3px;
  max-width: 680px;
  margin: 0 auto;
  padding: 4px;
  border: 1px solid var(--report-line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--report-surface) 78%, transparent);
}
.report-nav button {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--report-muted);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  transition: color .2s, border-color .2s, background .2s, box-shadow .2s, transform .2s;
}
.report-nav button:hover { color: var(--report-text); transform: translateY(-1px); }
.report-nav button.is-active {
  border-color: color-mix(in srgb, var(--report-blue) 46%, var(--report-line));
  color: #ffffff;
  background: linear-gradient(135deg, rgba(79, 142, 247, .28), rgba(45, 212, 191, .13));
  box-shadow: 0 0 18px rgba(79, 142, 247, .18), inset 0 1px rgba(255, 255, 255, .08);
}
html.light .report-nav button.is-active { color: #17233d; }

.report-period { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.report-period-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid var(--report-line);
  border-radius: 6px;
  color: var(--report-muted-2);
  background: var(--report-surface);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.report-period-live {
  border-color: rgba(74, 222, 128, .38);
  color: var(--report-green);
  box-shadow: 0 0 14px rgba(74, 222, 128, .1);
}
.report-period-control { display: flex; align-items: end; gap: 5px; }
.report-period-control label { gap: 2px; color: var(--report-muted); font-size: 9px; }
.report-period-control input { width: 112px; min-height: 30px; padding: 4px 6px; border-color: var(--report-line); background: var(--report-surface); color: var(--report-text); font-size: 10px; }
.report-period-control button { min-height: 30px; padding: 5px 10px; border-radius: 6px; font-size: 10px; }

.report-tab-content { width: min(100%, 1420px); margin: 0 auto; padding: 24px 28px 46px; }
.report-tab { animation: report-rise .45s cubic-bezier(.22, 1, .36, 1) both; }
.report-loading, .report-empty { display: grid; min-height: 140px; place-items: center; color: var(--report-muted); font-size: 13px; }
@keyframes report-rise { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: translateY(0); } }

.report-hero, .report-week-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;
  padding: 22px;
  border: 1px solid var(--report-line);
  border-radius: 8px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--report-surface) 88%, #7f1d34), var(--report-surface) 54%, color-mix(in srgb, var(--report-surface) 90%, var(--report-blue)));
  box-shadow: 0 18px 42px rgba(0, 0, 0, .16), inset 0 1px rgba(255, 255, 255, .04);
}
.report-hero::before, .report-week-hero::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, #d94060, var(--report-purple), var(--report-blue));
  box-shadow: 0 0 16px rgba(216, 64, 96, .45);
}
.report-hero-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.report-hero h1, .report-week-hero h1 { margin: 0 0 5px; color: var(--report-text); font-size: 25px; font-weight: 800; }
.report-hero p, .report-week-hero p { margin: 0; color: var(--report-muted); }
.report-eyebrow { margin: 0 0 7px; color: #e8a0ad; font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.report-logo-mark { display: grid; place-items: center; width: 58px; height: 58px; border: 1px solid rgba(216, 64, 96, .35); border-radius: 8px; background: linear-gradient(145deg, rgba(127, 29, 52, .35), rgba(79, 142, 247, .12)); color: #f5bcc6; font-size: 13px; font-weight: 900; box-shadow: 0 0 25px rgba(216, 64, 96, .13); }

.report-kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.report-kpi-grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.report-kpi {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--report-line);
  border-radius: 8px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--report-surface) 96%, var(--kpi-color, var(--report-blue))), var(--report-surface));
  box-shadow: 0 12px 28px rgba(0, 0, 0, .13), inset 0 1px rgba(255, 255, 255, .035);
}
.report-kpi::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, transparent, var(--kpi-color, var(--report-blue)), transparent); box-shadow: 0 0 12px var(--kpi-color, var(--report-blue)); opacity: .8; }
.report-kpi-icon { display: grid; width: 34px; height: 34px; margin-bottom: 12px; place-items: center; border: 1px solid color-mix(in srgb, var(--kpi-color, var(--report-blue)) 35%, var(--report-line)); border-radius: 7px; color: var(--kpi-color, var(--report-blue)); background: color-mix(in srgb, var(--kpi-color, var(--report-blue)) 12%, transparent); }
.report-kpi strong { display: block; overflow: hidden; color: var(--kpi-color, var(--report-blue)); font-size: 27px; line-height: 1.05; text-overflow: ellipsis; white-space: nowrap; }
.report-kpi span { display: block; margin-top: 5px; color: var(--report-muted); font-size: 11px; }
.report-kpi small { display: inline-flex; margin-top: 8px; padding: 3px 7px; border-radius: 4px; color: var(--report-muted-2); background: rgba(255, 255, 255, .035); font-size: 9px; }

.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; margin-bottom: 14px; }
.report-grid.single { grid-template-columns: minmax(0, 1fr); }
.report-chart-card, .report-panel, .report-person-card, .report-client-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--report-line);
  border-radius: 8px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--report-surface) 96%, var(--card-tint, var(--report-blue))), var(--report-surface));
  box-shadow: 0 16px 34px rgba(0, 0, 0, .14), inset 0 1px rgba(255, 255, 255, .035);
}
.report-chart-card:hover, .report-person-card:hover, .report-client-card:hover { border-color: color-mix(in srgb, var(--card-tint, var(--report-blue)) 45%, var(--report-line)); }
.report-chart-title { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; color: var(--report-muted-2); font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.report-chart-title::before { content: ""; width: 4px; height: 14px; border-radius: 2px; background: linear-gradient(180deg, var(--card-tint, var(--report-blue)), var(--report-teal)); box-shadow: 0 0 10px var(--card-tint, var(--report-blue)); }
.report-chart-wrap { position: relative; width: 100%; height: 220px; }
.report-chart-wrap.h160 { height: 160px; }
.report-chart-wrap.h200 { height: 200px; }
.report-chart-wrap.h260 { height: 260px; }
.report-chart-wrap.h300 { height: 300px; }
.report-chart-wrap canvas { display: block; width: 100% !important; height: 100% !important; }
.report-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px 12px; margin-top: 12px; }
.report-legend-item { display: inline-flex; align-items: center; gap: 5px; color: var(--report-muted); font-size: 10px; }
.report-legend-item strong { color: var(--report-text); }
.report-legend-dot { width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 8px currentColor; }

.report-week-number { color: var(--report-blue); font-size: 42px; font-weight: 900; line-height: 1; text-shadow: 0 0 24px rgba(79, 142, 247, .28); }
.report-week-meta { display: flex; align-items: center; gap: 18px; }
.report-week-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.report-chip, .report-person-chip, .report-phase-chip { display: inline-flex; align-items: center; min-height: 24px; gap: 5px; padding: 3px 8px; border: 1px solid var(--report-line); border-radius: 5px; color: var(--report-muted-2); background: color-mix(in srgb, var(--chip-color, var(--report-blue)) 10%, transparent); font-size: 9px; font-weight: 700; }
.report-load-list, .report-ranking { display: grid; gap: 10px; }
.report-load-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 62px 42px; align-items: center; gap: 10px; }
.report-load-name { overflow: hidden; color: var(--row-color, var(--report-blue)); font-size: 11px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.report-load-track, .report-rank-track, .report-month-track { height: 9px; overflow: hidden; border-radius: 5px; background: color-mix(in srgb, var(--report-line) 58%, transparent); }
.report-load-fill, .report-rank-fill, .report-month-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--row-color, var(--report-blue)) 60%, transparent), var(--row-color, var(--report-blue))); box-shadow: 0 0 12px color-mix(in srgb, var(--row-color, var(--report-blue)) 45%, transparent); }
.report-load-value { color: var(--row-color, var(--report-blue)); font-size: 11px; font-weight: 800; text-align: right; }
.report-load-pct { color: var(--report-muted); font-size: 9px; text-align: right; }

.report-section-title { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 22px 0 10px; }
.report-section-title h2 { color: var(--report-text); font-size: 17px; }
.report-section-title span { color: var(--report-muted); font-size: 10px; }
.report-project-list, .report-client-list, .report-delivery-weeks { display: grid; gap: 9px; }
.report-project-item { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 90px; align-items: center; gap: 12px; padding: 13px 15px; border: 1px solid var(--report-line); border-radius: 7px; background: linear-gradient(100deg, var(--report-surface), color-mix(in srgb, var(--report-surface) 94%, var(--row-color, var(--report-blue)))); transition: transform .2s, border-color .2s; }
.report-project-item:hover { transform: translateX(3px); border-color: color-mix(in srgb, var(--row-color, var(--report-blue)) 46%, var(--report-line)); }
.report-rank-number { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid color-mix(in srgb, var(--row-color) 40%, var(--report-line)); border-radius: 6px; color: var(--row-color); background: color-mix(in srgb, var(--row-color) 12%, transparent); font-size: 11px; font-weight: 900; }
.report-project-name, .report-client-name { overflow: hidden; color: var(--report-text); font-size: 12px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.report-project-meta, .report-client-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 5px; color: var(--report-muted); font-size: 9px; }
.report-project-hours, .report-client-hours { color: var(--row-color, var(--report-blue)); font-size: 15px; font-weight: 900; text-align: right; }
.report-new-tag { padding: 2px 5px; border: 1px solid rgba(74, 222, 128, .35); border-radius: 4px; color: var(--report-green); background: rgba(74, 222, 128, .08); font-size: 8px; }

.report-person-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.report-person-card { --card-tint: var(--person-color, var(--report-blue)); }
.report-person-header { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.report-avatar { display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid color-mix(in srgb, var(--person-color) 42%, var(--report-line)); border-radius: 8px; color: var(--person-color); background: linear-gradient(145deg, color-mix(in srgb, var(--person-color) 20%, transparent), transparent); box-shadow: 0 0 18px color-mix(in srgb, var(--person-color) 16%, transparent); font-size: 14px; font-weight: 900; }
.report-person-name { color: var(--report-text); font-size: 16px; font-weight: 800; }
.report-person-sub { margin-top: 3px; color: var(--report-muted); font-size: 9px; }
.report-person-total { color: var(--person-color); font-size: 22px; font-weight: 900; text-align: right; }
.report-person-total small { display: block; margin-top: 2px; color: var(--report-muted); font-size: 8px; font-weight: 600; }
.report-months { display: grid; grid-template-columns: repeat(auto-fit, minmax(52px, 1fr)); gap: 6px; margin-top: 17px; }
.report-month { min-width: 0; padding: 7px; border: 1px solid var(--report-line); border-radius: 5px; background: color-mix(in srgb, var(--report-surface-2) 82%, transparent); }
.report-month span { display: block; overflow: hidden; color: var(--report-muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.report-month strong { display: block; margin: 4px 0 5px; color: var(--person-color, var(--row-color, var(--report-blue))); font-size: 10px; }
.report-divider { height: 1px; margin: 16px 0; background: linear-gradient(90deg, transparent, var(--report-line), transparent); }
.report-mini-title { margin-bottom: 8px; color: var(--report-muted); font-size: 9px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; }
.report-phase-list { display: flex; flex-wrap: wrap; gap: 6px; }
.report-top-projects { display: grid; gap: 7px; }
.report-rank-row { display: grid; grid-template-columns: minmax(100px, 1.1fr) minmax(80px, 1fr) 48px; align-items: center; gap: 8px; }
.report-rank-row span { overflow: hidden; color: var(--report-muted-2); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.report-rank-row strong { color: var(--person-color, var(--row-color, var(--report-blue))); font-size: 9px; text-align: right; }

.report-client-card { --card-tint: var(--row-color, var(--report-blue)); }
.report-client-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.report-client-progress { height: 5px; margin: 12px 0; overflow: hidden; border-radius: 3px; background: var(--report-line); }
.report-client-progress span { display: block; height: 100%; background: linear-gradient(90deg, color-mix(in srgb, var(--row-color) 55%, transparent), var(--row-color)); box-shadow: 0 0 12px var(--row-color); }

.report-delivery-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-bottom: 14px; }
.report-delivery-summary .report-kpi { padding: 15px; text-align: center; }
.report-delivery-summary .report-kpi strong { font-size: 23px; }
.report-delivery-week { overflow: hidden; border: 1px solid var(--report-line); border-radius: 8px; background: var(--report-surface); box-shadow: 0 14px 30px rgba(0, 0, 0, .12); }
.report-delivery-week-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--report-line); background: linear-gradient(90deg, color-mix(in srgb, var(--report-surface-2) 90%, #7f1d34), var(--report-surface-2)); }
.report-delivery-week-header strong { color: var(--report-text); font-size: 12px; }
.report-delivery-week-header span { color: var(--report-muted); font-size: 9px; }
.report-delivery-list { display: grid; }
.report-delivery-row { display: grid; grid-template-columns: 88px 105px minmax(180px, 1.4fr) minmax(120px, 1fr) 72px 72px 60px 105px; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px; border-bottom: 1px solid color-mix(in srgb, var(--report-line) 65%, transparent); color: var(--report-muted-2); font-size: 9px; }
.report-delivery-row:nth-child(even) { background: color-mix(in srgb, var(--report-surface-2) 55%, transparent); }
.report-delivery-row:last-child { border-bottom: 0; }
.report-delivery-row strong { overflow: hidden; color: var(--report-text); text-overflow: ellipsis; white-space: nowrap; }
.report-status { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-width: 92px; min-height: 25px; padding: 3px 7px; border: 1px solid currentColor; border-radius: 5px; font-weight: 800; }
.report-status.aprovado { color: var(--report-green); background: rgba(74, 222, 128, .08); }
.report-status.pendente { color: var(--report-yellow); background: rgba(251, 191, 36, .08); }
.report-status.reprovado { color: var(--report-red); background: rgba(248, 113, 113, .08); }

@media (max-width: 1320px) {
  .report-topbar { grid-template-columns: auto 1fr; }
  .report-period { grid-column: 1 / -1; justify-content: center; }
  .report-delivery-row { grid-template-columns: 84px 95px minmax(170px, 1.4fr) minmax(110px, 1fr) 62px 62px 54px 100px; }
}

@media (max-width: 980px) {
  .report-topbar { position: static; display: flex; flex-wrap: wrap; padding: 14px 18px; }
  .report-title { flex: 1; }
  .report-nav { order: 3; width: 100%; max-width: none; overflow-x: auto; grid-template-columns: repeat(6, minmax(92px, 1fr)); }
  .report-period { order: 4; width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .report-tab-content { padding: 20px 18px 38px; }
  .report-grid, .report-person-grid { grid-template-columns: 1fr; }
  .report-kpi-grid.five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .report-delivery-week { overflow-x: auto; }
  .report-delivery-list { min-width: 880px; }
}

@media (max-width: 680px) {
  .fabim-report-shell { margin: -28px -18px; }
  .report-title img { width: 88px; }
  .report-title-separator, .report-title strong { display: none; }
  .report-period-badge { display: none; }
  .report-period-control { width: 100%; }
  .report-period-control label { flex: 1; }
  .report-period-control input { width: 100%; }
  .report-hero-row, .report-client-top { align-items: flex-start; flex-direction: column; }
  .report-kpi-grid, .report-kpi-grid.five, .report-delivery-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .report-load-row { grid-template-columns: 78px minmax(0, 1fr) 48px; }
  .report-load-pct { display: none; }
  .report-project-item { grid-template-columns: 34px minmax(0, 1fr) 70px; }
  .report-project-item .report-phase-chip { display: none; }
  .report-person-header { grid-template-columns: 42px minmax(0, 1fr); }
  .report-person-total { grid-column: 2; text-align: left; }
}
