:root {
  --navy: #17324d; --navy-2: #244662; --teal: #0f766e; --teal-light: #dcefeb;
  --ink: #17212b; --muted: #667784; --line: #d8e1e7; --surface: #ffffff;
  --canvas: #f3f6f7; --warm: #d99a2b; --danger: #ad3b3b; --shadow: 0 18px 50px rgba(22, 44, 61, .13);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink); background: var(--canvas); font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { min-width: 1080px; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
.hidden { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.eyebrow { margin: 0 0 7px; color: var(--teal); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(520px, 1.05fr) minmax(500px, .95fr); background: var(--surface); }
.login-panel { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: clamp(42px, 7vw, 100px); }
.brand-mark { width: 58px; height: 58px; display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 5px; padding: 10px; background: var(--navy); border-radius: 4px; margin-bottom: 25px; }
.brand-mark span { display: block; background: white; border-radius: 1px 1px 0 0; }
.brand-mark span:nth-child(1) { height: 45%; } .brand-mark span:nth-child(2) { height: 80%; background: #52a79d; } .brand-mark span:nth-child(3) { height: 62%; }
.brand-mark.small { width: 38px; height: 38px; padding: 7px; gap: 3px; margin: 0; }
.login-panel h1 { margin: 0; color: var(--navy); font-family: Georgia, "Times New Roman", serif; font-size: clamp(44px, 4.5vw, 64px); line-height: 1.03; letter-spacing: -.035em; font-weight: 500; }
.login-copy { margin: 18px 0 25px; color: var(--muted); font-size: 17px; }
.login-visual { position: relative; display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg, #123049, #0e5b5b); }
.login-visual::before, .login-visual::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; width: 540px; height: 540px; }
.login-visual::after { width: 360px; height: 360px; }
.scale-illustration { position: relative; z-index: 1; width: 360px; height: 330px; }
.scale-display { position: absolute; left: 90px; top: 80px; width: 180px; padding: 18px; background: #10212c; border: 8px solid #dbe4e8; color: #8fe3bd; font: 38px/1 "SFMono-Regular", Consolas, monospace; text-align: right; box-shadow: var(--shadow); }
.scale-display::after { content: "kg"; font-size: 11px; margin-left: 5px; }
.scale-platform { position: absolute; left: 35px; top: 183px; width: 290px; height: 28px; background: linear-gradient(#e7edef, #aebdc4); transform: perspective(300px) rotateX(25deg); }
.scale-base { position: absolute; left: 75px; top: 215px; width: 210px; height: 55px; border-bottom: 12px solid #81949d; border-left: 25px solid transparent; border-right: 25px solid transparent; }
.button { border: 0; border-radius: 4px; padding: 12px 18px; font-weight: 750; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.button-primary { background: var(--teal); color: white; box-shadow: 0 7px 20px rgba(15, 118, 110, .2); }
.button-primary:hover { background: #0b665f; }.button-secondary { background: #e9eff2; color: var(--navy); }.button-danger { background: #f7e7e7; color: var(--danger); }
.button:disabled { cursor: not-allowed; opacity: .52; box-shadow: none; }
.button-wide { min-width: 280px; }.text-button { border: 0; background: none; color: var(--muted); padding: 6px 0; text-align: left; }
.dev-login { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; width: 430px; }.dev-login p { margin: 0 0 8px; color: var(--muted); font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.dev-users { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }.dev-users button { border: 1px solid var(--line); background: white; padding: 9px; border-radius: 4px; color: var(--navy); text-align: left; }
.form-error { color: var(--danger); background: #fbefef; padding: 12px; border-radius: 4px; }
.form-error-inline { margin: 0 0 14px; border: 1px solid #edcccc; }
.field-error-inline { color: var(--danger); font-size: 12px; font-weight: 650; margin: 6px 0 0; }
[aria-invalid="true"] { border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(173,59,59,.12); }
.app-shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 236px; display: flex; flex-direction: column; background: var(--navy); color: white; padding: 26px 18px; }
.brand { width: 100%; border: 0; background: transparent; color: inherit; display: flex; align-items: center; gap: 12px; padding: 0 8px 34px; text-align: left; cursor: pointer; }.brand strong,.brand small { display: block; }.brand strong { font-family: Georgia, serif; font-size: 18px; font-weight: 500; }.brand small { color: #9eb0bd; font-size: 11px; margin-top: 3px; }
.nav { display: flex; flex-direction: column; gap: 5px; }.nav-item { width: 100%; border: 0; border-radius: 4px; padding: 11px 12px; background: transparent; color: #b9c7d0; display: flex; align-items: center; gap: 11px; text-align: left; font-weight: 650; }
.nav-item svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }.nav-item:hover,.nav-item.active { color: white; background: rgba(255,255,255,.09); }.nav-item.active { box-shadow: inset 3px 0 var(--warm); }
.sidebar-footer { margin-top: auto; }.user-card { display: flex; align-items: center; gap: 10px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 19px; margin-top: 15px; }.user-card strong,.user-card small { display: block; }.user-card strong { font-size: 13px; }.user-card small { color: #9eb0bd; font-size: 11px; margin-top: 3px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--teal); color: white; font-weight: 800; }
.sidebar .text-button { color: #9eb0bd; margin-left: 44px; font-size: 11px; }
.main { grid-column: 2; min-width: 0; }.topbar { height: 98px; display: flex; align-items: center; justify-content: space-between; padding: 20px 34px; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar h2 { margin: 0; font-family: Georgia, serif; color: var(--navy); font-size: 27px; font-weight: 500; }.top-actions { display: flex; align-items: end; gap: 12px; }.year-control { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 10px; text-transform: uppercase; font-weight: 750; letter-spacing: .07em; }.year-control select { min-width: 95px; padding: 10px; border: 1px solid var(--line); border-radius: 4px; background: white; color: var(--ink); }.view-controls { display: flex; margin-bottom: 16px; }
.view { padding: 28px 34px 50px; }.loading { padding: 80px; color: var(--muted); text-align: center; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 19px 20px; box-shadow: 0 3px 10px rgba(22,44,61,.04); }
.kpi small { color: var(--muted); font-weight: 750; text-transform: uppercase; letter-spacing: .08em; font-size: 10px; }.kpi strong { display: block; color: var(--navy); font-family: Georgia, serif; font-size: 28px; font-weight: 500; margin-top: 11px; }.kpi em { display: block; color: var(--teal); font-size: 11px; font-style: normal; margin-top: 5px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(500px, 1.35fr) minmax(360px, .65fr); gap: 20px; }.panel { background: white; border: 1px solid var(--line); border-radius: 6px; padding: 21px; box-shadow: 0 3px 10px rgba(22,44,61,.04); }.panel-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }.panel-header h3 { margin: 0; font-family: Georgia, serif; color: var(--navy); font-size: 19px; font-weight: 500; }.panel-header small { color: var(--muted); }
.chart { width: 100%; height: 270px; display: block; }.quarter-row { display: grid; grid-template-columns: 42px 1fr 1fr; gap: 8px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 13px; }.quarter-row strong { color: var(--navy); }.quarter-row span { text-align: right; }.quarter-row small { color: var(--muted); text-align: right; }
.toolbar { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 16px; }.toolbar input,.toolbar select { height: 43px; border: 1px solid var(--line); border-radius: 4px; background: white; padding: 10px 12px; font-size: 16px; font-weight: 400; letter-spacing: normal; text-transform: none; }.toolbar input { min-width: 330px; }.toolbar .spacer { flex: 1; }
.table-wrap { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 6px; }.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }.data-table th { padding: 12px 13px; background: #eaf0f3; color: var(--navy); text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }.data-table td { padding: 12px 13px; border-top: 1px solid #e6ecef; vertical-align: top; }.data-table tbody tr { cursor: pointer; }.data-table tbody tr:hover { background: #f4f9f8; }.money { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }.muted { color: var(--muted); }.project-title { color: var(--navy); font-weight: 750; }.project-code { font-family: "SFMono-Regular", Consolas, monospace; color: var(--muted); font-size: 11px; }
.badge { display: inline-flex; border-radius: 999px; padding: 4px 8px; background: #e8eef1; color: var(--navy); font-size: 10px; font-weight: 800; white-space: nowrap; }.badge.completed { background: #dff0eb; color: #0b655d; }.badge.invoiced { background: #e5edf6; color: #315a82; }.badge.in_progress { background: #fff0d6; color: #865b0b; }.badge.suspended { background: #f5e3e3; color: #8d3232; }
.empty { padding: 50px; text-align: center; color: var(--muted); }
.modal { width: min(1180px, calc(100vw - 70px)); max-height: calc(100vh - 50px); border: 0; border-radius: 7px; padding: 0; box-shadow: var(--shadow); }.modal::backdrop { background: rgba(16, 33, 46, .62); }.modal-small { width: 620px; }.modal-invoice { width: min(900px, calc(100vw - 70px)); }.modal-head { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; background: white; border-bottom: 1px solid var(--line); }.modal-head h3 { margin: 0; color: var(--navy); font: 500 23px Georgia, serif; }.icon-button { border: 0; background: #edf2f4; color: var(--navy); width: 34px; height: 34px; border-radius: 50%; font-size: 19px; }.modal-body { padding: 23px 24px 30px; background: #f7f9fa; }.modal-foot { position: sticky; bottom: 0; display: flex; justify-content: space-between; gap: 10px; padding: 15px 24px; border-top: 1px solid var(--line); background: white; }.modal-foot .right { display: flex; gap: 9px; }
.form-section { background: white; border: 1px solid var(--line); border-radius: 5px; padding: 19px; margin-bottom: 14px; }.form-section h4 { margin: 0 0 16px; color: var(--navy); font: 500 17px Georgia, serif; }.form-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }.field.span-2 { grid-column: span 2; }.field.span-3 { grid-column: span 3; }.field.span-4 { grid-column: span 4; }.field label,.repeat-label { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; }.field input,.field select,.field textarea { width: 100%; border: 1px solid var(--line); border-radius: 4px; padding: 10px; color: var(--ink); background: white; }.field input[readonly] { background: #eef2f4; color: var(--muted); cursor: default; }.field textarea { min-height: 85px; resize: vertical; }.field input:focus,.field select:focus,.field textarea:focus { outline: 2px solid rgba(15,118,110,.2); border-color: var(--teal); }
.repeat-list { display: flex; flex-direction: column; gap: 9px; }.repeat-row { display: grid; gap: 8px; align-items: end; padding: 10px; background: #f5f8f9; border-radius: 4px; }.repeat-row input,.repeat-row select { width: 100%; border: 1px solid var(--line); background: white; border-radius: 4px; padding: 8px; }.remove-row { width: 34px; height: 34px; border: 0; background: #f4e5e5; color: var(--danger); border-radius: 4px; }.add-row { border: 1px dashed #9eb4bf; background: transparent; color: var(--teal); padding: 9px 12px; border-radius: 4px; margin-top: 10px; font-weight: 750; }
.repeat-row.cost-row { grid-template-columns: 1.2fr 1fr 2fr 34px; }
.section-help { margin: -8px 0 16px; color: var(--muted); font-size: 12px; }
.invoice-page-help { margin: 0 0 14px; }
.readonly-field { min-height: 40px; display: flex; align-items: center; padding: 10px; border: 1px solid #e2e8eb; border-radius: 4px; background: #f3f6f7; color: var(--navy); }
.client-action .button { min-height: 40px; width: 100%; }
.project-date-control { display: grid; grid-template-columns: minmax(150px,1fr) auto; gap: 8px; }.project-date-control input[readonly] { background: #eef2f4; color: var(--muted); cursor: default; }.project-date-control input.unlocked { background: #fffdf5; border-color: var(--warm); }.project-date-control .button { padding: 8px 11px; white-space: nowrap; }.field-help { color: var(--muted); font-size: 10px; line-height: 1.4; }
.expected-project-help { margin: 0 0 16px; }.source-project-card,.recurrence-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 16px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 5px; background: #f4f8f9; }.source-project-card span,.source-project-card small,.source-project-card strong,.recurrence-card span,.recurrence-card small,.recurrence-card strong { display: block; }.source-project-card small { margin-bottom: 4px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }.source-project-card strong,.recurrence-card strong { color: var(--navy); font-size: 12px; }.recurrence-card { border-color: #bcd8d4; background: #eef8f6; }.recurrence-card small { margin-top: 4px; color: var(--muted); font-size: 11px; }.source-project-card .button,.recurrence-card .button { flex: 0 0 auto; }
.david-costs { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.empty.compact { padding: 20px; }
.overview-count { min-width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--teal-light); color: var(--teal); font: 500 20px Georgia, serif; }
.overview-sections { display: flex; flex-direction: column; gap: 20px; }
.checkbox-field { display: inline-flex; align-items: center; gap: 9px; margin-bottom: 16px; color: var(--navy); font-weight: 700; }
.checkbox-field input { width: 18px; height: 18px; accent-color: var(--teal); }
.invoice-empty { padding: 4px 0; }.invoice-actions { display: flex; justify-content: flex-start; margin-top: 16px; }.invoice-checkbox-field .checkbox-field { min-height: 40px; margin: 0; padding: 0 10px; border: 1px solid var(--line); border-radius: 4px; background: #f8fafb; }
.attachment-save-help { margin-bottom: 0; }.attachment-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px; }.attachment-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: #f8fafb; }.attachment-row a { min-width: 0; flex: 1; color: var(--navy); text-decoration: none; }.attachment-row a:hover strong { text-decoration: underline; }.attachment-row strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }.attachment-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }.attachment-delete { border: 0; background: transparent; color: var(--danger); font-size: 11px; font-weight: 750; }.attachment-dropzone { min-height: 168px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 24px; border: 2px dashed #9bb7c3; border-radius: 8px; background: linear-gradient(145deg,#f8fbfb,#eef6f5); color: var(--muted); text-align: center; cursor: pointer; transition: border-color .16s,background .16s,transform .16s,box-shadow .16s; }.attachment-dropzone:hover,.attachment-dropzone:focus-visible { outline: 0; border-color: var(--teal); background: #edf8f6; box-shadow: 0 0 0 4px rgba(15,118,110,.08); }.attachment-dropzone.drag-over { border-style: solid; border-color: var(--teal); background: var(--teal-light); transform: scale(1.008); box-shadow: 0 10px 28px rgba(15,118,110,.14); }.attachment-dropzone.uploading { cursor: wait; opacity: .72; }.attachment-drop-icon { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 3px; border-radius: 50%; background: white; color: var(--teal); box-shadow: 0 4px 14px rgba(22,44,61,.1); }.attachment-drop-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }.attachment-dropzone strong { color: var(--navy); font-size: 15px; }.attachment-dropzone > span:not(.attachment-drop-icon) { font-size: 12px; }.attachment-dropzone small { margin-top: 5px; color: #7c8e98; font-size: 10px; }
.access-panel { max-width: 850px; }.access-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 18px; padding: 16px 0; border-top: 1px solid var(--line); }.access-row strong,.access-row small { display: block; }.access-row small { color: var(--muted); margin-top: 4px; }
.settlement-summary { grid-template-columns: repeat(2,1fr); }.settlement-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 20px; }.section-heading-action { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }.form-section .section-heading-action h4 { margin: 0; }.section-heading-action .button { padding: 8px 11px; font-size: 11px; }.settlement-projects { display: flex; flex-direction: column; gap: 8px; max-height: 350px; overflow: auto; border: 1px solid var(--line); border-radius: 4px; padding: 8px; }.settlement-project-option { display: grid; grid-template-columns: 24px minmax(260px,1fr) auto; align-items: center; gap: 10px; padding: 10px; border-radius: 4px; background: #f5f8f9; }.settlement-project-option input { width: 17px; height: 17px; accent-color: var(--teal); }.settlement-project-option small { display: block; color: var(--muted); margin-top: 3px; }.settlement-project-option strong:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }.data-table tbody tr.no-row-action { cursor: default; }.invoice-project-list { color: var(--muted); font-size: 11px; line-height: 1.45; max-width: 440px; }.settlement-note { margin: 0 0 12px; color: var(--muted); font-size: 12px; }
.financial-strip { display: grid; grid-template-columns: repeat(3,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 5px; overflow: hidden; margin-bottom: 14px; }.financial-strip div { background: white; padding: 16px; }.financial-strip small { color: var(--muted); text-transform: uppercase; font-size: 9px; font-weight: 800; }.financial-strip strong { display: block; color: var(--navy); font: 500 22px Georgia, serif; margin-top: 6px; }.financial-strip .positive strong { color: var(--teal); }.financial-strip .negative strong { color: var(--danger); }
.detail-list { display: grid; grid-template-columns: 170px 1fr; gap: 11px; }.detail-list dt { color: var(--muted); font-size: 11px; text-transform: uppercase; font-weight: 750; }.detail-list dd { margin: 0; white-space: pre-wrap; }.source-note { color: var(--muted); font-size: 11px; margin-top: 18px; }
.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; max-width: 420px; padding: 13px 17px; background: var(--navy); color: white; border-radius: 4px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(8px); transition: .18s; }.toast.show { opacity: 1; transform: none; }.toast.error { background: var(--danger); }
@media (max-width: 1250px) { .kpi-grid { grid-template-columns: repeat(2,1fr); }.dashboard-grid { grid-template-columns: 1fr; }.form-grid { grid-template-columns: repeat(2,1fr); }.field.span-3,.field.span-4 { grid-column: span 2; } }
