html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  min-height: 100vh;
  background: #f7f3f1;
  color: #172033;
}

/* Sprint 9.3 — Daily project analysis */
.daily-analysis .erp-report-header p{margin:.35rem 0 0;color:var(--muted-color,#667085)}
.daily-analysis-date{display:flex;align-items:end;gap:.65rem;margin:1rem 0;padding:.75rem 1rem;background:#f7f9fc;border:1px solid #dfe5ee;border-radius:.65rem}
.daily-analysis-date label{font-size:.78rem;font-weight:700}.daily-analysis-date label input{margin-top:.25rem}
.daily-analysis-date>span{margin-left:auto;align-self:center;color:#667085;font-size:.78rem}
.daily-analysis-kpis{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:.65rem;margin:1rem 0}
.daily-analysis-kpis>a,.daily-analysis-kpis>.daily-mail-report{min-height:8rem;padding:.85rem;border:1px solid #dfe5ee;border-top:4px solid #60718a;border-radius:.65rem;background:#fff;display:flex;flex-direction:column;text-decoration:none;color:inherit}
.daily-analysis-kpis>a:hover,.daily-analysis-kpis>a.is-selected{border-color:#9b3f2d;border-top-color:#9b3f2d;background:#fff7f3;box-shadow:0 .3rem 1rem #5c2c1d18}.daily-analysis-kpis>a.is-critical{border-top-color:#c9362b;background:#fff8f7}
.daily-mail-report.is-disabled{opacity:.58;cursor:not-allowed}
.daily-analysis-kpis span{font-size:.76rem;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:#526173}
.daily-analysis-kpis strong{font-size:2rem;line-height:1.15;margin:.35rem 0;color:#172033}
.daily-analysis-kpis small{margin-top:auto;color:#667085;overflow-wrap:anywhere}
.daily-analysis-rules{margin:0 0 1rem;padding:.65rem .85rem;border-left:4px solid #4477aa;background:#f4f8fc;color:#3b4a5e;font-size:.82rem}
.daily-analysis-table td{vertical-align:top}.daily-analysis-table td:nth-child(2){min-width:18rem}.daily-analysis-table td:nth-child(2)>span,.daily-analysis-table td:nth-child(2)>small,.daily-analysis-table td:nth-child(6)>small{display:block;margin-top:.2rem}
.daily-analysis-table tr.daily-critical td{background:#fff4f2}.daily-analysis-table tr.daily-completed td{background:#f1fbf6}
.daily-action-list{display:flex;flex-direction:column;gap:.25rem}.daily-action-list span{font-weight:700;color:#27364a}
.daily-badge{display:block;width:max-content;max-width:100%;margin-top:.35rem;padding:.2rem .45rem;border-radius:999px;background:#e9eef5;color:#3a4a60;font-size:.7rem;font-weight:800;white-space:normal}
.daily-badge.is-danger{background:#f9d9d6;color:#91251d}.daily-badge.is-done{background:#d6f2e5;color:#116343}.daily-badge.is-waiting{background:#fff0c7;color:#7a5700}
.daily-project-number{color:#9b3f2d;text-decoration:underline;cursor:pointer}
@media(max-width:1200px){.daily-analysis-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){.daily-analysis-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.daily-analysis-date{align-items:stretch;flex-wrap:wrap}.daily-analysis-date>span{width:100%;margin-left:0}}
.mail-history-table td:last-child{min-width:24rem;white-space:normal}.mail-report-markdown{margin-top:1rem;padding:1.5rem;border:1px solid #dfe5ee;border-radius:.65rem;background:#fff}.mail-report-markdown pre{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;line-height:1.55;color:#27364a}
.activity-kpis{grid-template-columns:repeat(3,minmax(0,1fr));max-width:42rem}.activity-action-list{margin:0;padding-left:1.2rem;min-width:30rem}.activity-action-list li{display:grid;grid-template-columns:3.5rem 8rem 1fr;gap:.4rem;padding:.3rem 0;border-bottom:1px solid #edf0f4;font-size:.76rem}.activity-action-list li span{overflow-wrap:anywhere}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

:root {
  --cse-terracotta-dark: #6f3f36;
  --cse-terracotta: #a85f50;
  --cse-terracotta-light: #f3e2dd;
  --cse-border: #e7d8d4;
  --cse-muted: #74635f;
}

.app-container { max-width: 1440px; padding-left: 1.5rem; padding-right: 1.5rem; }
.app-header { background: var(--cse-terracotta-dark); box-shadow: 0 2px 12px rgb(88 47 39 / 14%); }
.app-header .navbar { min-height: 68px; padding: .6rem 0; }
.navbar-brand { display: flex; align-items: center; gap: .55rem; font-size: 1.2rem; font-weight: 700; }
.brand-mark { display: grid; place-items: center; width: 2.45rem; height: 2.45rem; border-radius: 1mm; background: var(--cse-terracotta); color: white; font-size: .82rem; letter-spacing: .04em; }
.app-header .nav-link { position: relative; color: #eadbd7; font-weight: 500; border-radius: 1mm; padding: .65rem .8rem !important; }
.app-header .nav-link:hover, .app-header .nav-link:focus, .app-header .nav-link.active { color: white; background: rgb(255 255 255 / 9%); }
.app-back-link { width:100%; text-align:left; text-decoration:none; }
.app-header .nav-link.active::after { content: ""; position: absolute; left: .8rem; right: .8rem; bottom: .3rem; height: 2px; border-radius: 1mm; background: #e7b8ab; }
.user-navigation { gap: .25rem; }
.user-name { color: white !important; }
.logout-link { border: 0; }
.app-main { min-height: calc(100vh - 126px); padding: 2rem 0 3rem; }
.app-footer { min-height: 58px; display: flex; align-items: center; border-top: 1px solid var(--cse-border); color: var(--cse-muted); background: white; }

.page-header { margin-bottom: 2rem; padding: 2rem; overflow: hidden; border-radius: 1mm; color: white; background: linear-gradient(125deg, #75443a 0%, #9e594a 68%, #bd7767 100%); box-shadow: 0 14px 34px rgb(111 63 54 / 18%); }
.page-header h1 { margin: .3rem 0 .55rem; font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; }
.page-header p { margin: 0; color: #f8eae6; font-size: 1.05rem; }
.page-eyebrow { color: #efc8be; font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.25rem; }
.section-heading h2 { margin: 0 0 .2rem; font-size: 1.4rem; font-weight: 700; }
.section-heading p { margin: 0; color: var(--cse-muted); }
.module-count { min-width: 2rem; padding: .25rem .6rem; border-radius: 1mm; color: #84483c; background: var(--cse-terracotta-light); font-weight: 700; text-align: center; }
.module-card { display: flex; min-height: 260px; height: 100%; flex-direction: column; padding: 1.5rem; border: 1px solid var(--cse-border); border-radius: 1mm; color: inherit; background: white; box-shadow: 0 5px 18px rgb(88 47 39 / 5%); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.module-card:hover, .module-card:focus { color: inherit; border-color: #ca9284; box-shadow: 0 14px 30px rgb(168 95 80 / 13%); transform: translateY(-3px); }
.module-icon { display: grid; place-items: center; width: 3rem; height: 3rem; margin-bottom: 1.25rem; border-radius: 1mm; color: #84483c; background: #f8ece8; font-size: 1.2rem; font-weight: 800; }
.module-title { margin-bottom: .5rem; font-size: 1.15rem; font-weight: 700; }
.module-description { flex: 1; color: var(--cse-muted); line-height: 1.55; }
.module-link { margin-top: 1.2rem; color: #934f42; font-weight: 700; }
.empty-state { padding: 3rem 1.5rem; border: 1px dashed #cfb8b2; border-radius: 1mm; background: white; text-align: center; }
.empty-state h3 { font-size: 1.15rem; }
.empty-state p { margin-bottom: 0; color: var(--cse-muted); }
.development-page { max-width: 760px; margin: 2rem auto; padding: 3rem 2rem; border: 1px solid var(--cse-border); border-radius: 1mm; background: white; box-shadow: 0 8px 25px rgb(88 47 39 / 6%); text-align: center; }
.development-page .module-icon { margin: 0 auto 1.25rem; }
.development-page p { color: var(--cse-muted); }
.btn-primary { --bs-btn-bg: #9b5547; --bs-btn-border-color: #9b5547; --bs-btn-hover-bg: #80453a; --bs-btn-hover-border-color: #80453a; --bs-btn-active-bg: #6f3f36; --bs-btn-active-border-color: #6f3f36; --bs-btn-focus-shadow-rgb: 168, 95, 80; border-radius: 1mm; }

@media (max-width: 991.98px) {
  .app-header .navbar-collapse { padding: .75rem 0 .35rem; }
  .app-header .nav-link.active::after { display: none; }
  .user-navigation { align-items: stretch !important; border-top: 1px solid rgb(255 255 255 / 12%); margin-top: .5rem; padding-top: .5rem; }
}

@media (max-width: 575.98px) {
  .app-container { padding-left: 1rem; padding-right: 1rem; }
  .app-main { padding-top: 1rem; }
  .page-header { padding: 1.5rem; }
}

.schedule-workspace { position:relative; left:50%; width:calc(100vw - 2rem); transform:translateX(-50%); }
.schedule-header { margin-bottom:.65rem; }
.schedule-toolbar { display:flex; justify-content:space-between; align-items:center; gap:1rem; flex-wrap:wrap; padding:.7rem; border:1px solid #cbb9b3; background:#eee8e5; }
.schedule-week-navigation,.schedule-date-picker,.schedule-actions,.schedule-action-group,.schedule-save-bar { display:flex; align-items:center; gap:.55rem; }
.schedule-week-navigation strong { color:#4d403c; font-size:.86rem; text-transform:uppercase; }
.schedule-status { color:var(--cse-muted); font-size:.76rem; }
.schedule-date-picker label { color:#4d403c; font-size:.72rem; font-weight:700; }
.schedule-date-picker input { min-width:145px; border-radius:0; }
.schedule-toolbar .btn,.schedule-actions .btn { border-radius:0; }
.schedule-actions { justify-content:space-between; flex-wrap:wrap; padding:.55rem .7rem; border:1px solid #d8cbc7; border-top:0; background:#fff; }
.schedule-action-group { flex-wrap:wrap; }
.schedule-table-card { overflow:hidden; border:1px solid #b9a6a0; border-top:0; background:#fff; }
.schedule-table { width:100%; min-width:1150px; border-collapse:separate; border-spacing:0; }
.schedule-table th,.schedule-table td { padding:.45rem; border-right:1px solid #e7cccc; border-bottom:1px solid #e7cccc; vertical-align:top; }
.schedule-table thead th { position:sticky; top:0; z-index:3; color:#fff; background:#8f3028; text-align:center; }.schedule-table thead small { display:block; font-weight:400; opacity:.85; }
.schedule-table th:first-child { position:sticky; left:0; z-index:2; min-width:145px; background:#fff7f5; }.schedule-table thead th:first-child { z-index:4; background:#8f3028; }
.schedule-table td { min-width:190px; }.vehicle-row td { background:#e3f2e3; vertical-align:middle; }.people-row td { background:#fff4cf; }.schedule-task-list { display:grid; gap:.4rem; }.schedule-task-list.published .free-task { display:none; }.schedule-task-row { padding:.45rem; border:1px solid #e2d5d1; border-radius:1mm; background:#fff; }.erp-task { border-left:3px solid #9b5547; }.erp-project-label { display:grid; margin-bottom:.35rem; line-height:1.25; }.erp-project-label span { overflow-wrap:anywhere; }.erp-project-label span:last-child { color:var(--cse-muted); }.task-text { resize:vertical; }.task-actions { display:flex; justify-content:flex-end; }.task-actions .btn { padding:.15rem .3rem; }.cell-actions { display:grid; grid-template-columns:1fr 1fr; gap:.35rem; margin-top:.45rem; }.btn-schedule-action { min-height:2rem; padding:.25rem .35rem; border-radius:0; font-size:.72rem; line-height:1.15; }.add-project { border-color:#925044; color:#743b32; background:#f8e8e3; }.add-free-task { border-color:#bd796b; color:#884d42; background:#fff5f2; }.btn-schedule-action:hover,.btn-schedule-action:focus { border-color:#743b32; color:#fff; background:#9b5547; }.schedule-save-bar { justify-content:flex-end; padding:.7rem; border:1px solid #d8cbc7; border-top:0; background:#fff; }.schedule-save-bar span { color:var(--cse-muted); font-size:.78rem; }.erp-project-dialog { max-width:min(1200px,calc(100vw - 2rem)); }.erp-project-results { max-height:26rem; overflow-y:auto; }.erp-status-badge { display:block; margin-top:.3rem; font-size:.78rem; font-weight:400; }.erp-status-print { color:#b42318; }.erp-status-finishing { color:#c65d08; }.erp-status-velingrad { color:#1769aa; }.print-meta { display:none; }
.project-preview-panel { width:min(760px,96vw)!important; }.project-preview-panel .offcanvas-body { padding:0 1.25rem 1.25rem; }.project-preview-header { display:flex; justify-content:space-between; gap:1rem; padding:.4rem 0 1rem; border-bottom:1px solid #e3d3cf; }.project-preview-header h2 { margin:.15rem 0; font-size:1.25rem; }.project-preview-header p { margin:0; color:var(--cse-muted); }.project-preview-tabs { display:flex; gap:.25rem; overflow-x:auto; margin:1rem 0; border-bottom:1px solid #d9c4be; }.project-preview-tabs button { padding:.55rem .75rem; border:0; border-bottom:3px solid transparent; color:#6f443c; background:transparent; white-space:nowrap; }.project-preview-tabs button.active { border-bottom-color:#914c40; font-weight:700; }.project-preview-pane { display:none; }.project-preview-pane.active { display:block; }.project-preview-grid { display:grid; grid-template-columns:minmax(130px,.7fr) minmax(0,1.7fr); margin:0; border-top:1px solid #eadedb; }.project-preview-grid dt,.project-preview-grid dd { margin:0; padding:.55rem .4rem; border-bottom:1px solid #eadedb; }.project-preview-grid dt { color:var(--cse-muted); font-weight:600; }.project-preview-grid dd { overflow-wrap:anywhere; }.project-preview-comments { display:grid; gap:.65rem; }.project-preview-comments article { padding:.7rem; border-left:3px solid #b96d5e; background:#fff8f6; }.project-preview-comments time,.project-preview-comments strong { display:block; }.project-preview-comments time { color:var(--cse-muted); font-size:.78rem; }.project-preview-comments p { margin:.35rem 0 0; white-space:pre-wrap; }.project-preview-footer { position:sticky; bottom:-1.25rem; display:flex; justify-content:flex-end; margin-top:1rem; padding:1rem 0 1.25rem; border-top:1px solid #e3d3cf; background:#fff; }
@media (max-width:575.98px) { .schedule-workspace { width:calc(100vw - 1rem); }.schedule-toolbar,.schedule-actions { align-items:stretch; flex-direction:column; }.schedule-week-navigation { justify-content:space-between; }.schedule-date-picker input { flex:1; }.schedule-action-group { width:100%; }.schedule-action-group:last-child { justify-content:flex-end; }.project-preview-grid { grid-template-columns:1fr; }.project-preview-grid dt { padding-bottom:.1rem; border-bottom:0; }.project-preview-grid dd { padding-top:.1rem; } }
@media print { @page { size: landscape; margin: 8mm; } .app-header,.app-footer { display:none!important; }.app-main { padding:0 }.schedule-table { min-width:0; font-size:9px }.schedule-table th,.schedule-table td { padding:3px }.schedule-table th:first-child { position:static }.schedule-task-row { border:0; border-bottom:1px solid #ddd; padding:2px 0 }.task-text { min-height:0; border:0; padding:0; resize:none; font-size:9px; background:transparent }.task-actions { display:none }.print-meta { display:block; margin-top:5px; font-size:8px }.text-muted.d-print-none { display:none!important; } }

.statistics-hero { display:flex; justify-content:space-between; align-items:center; gap:1.5rem; margin-bottom:1.5rem; padding:1.6rem 2rem; border-radius:1rem; color:#fff; background:linear-gradient(135deg,#6f3f36,#b55d4d); box-shadow:0 12px 30px rgb(111 63 54 / 16%); }
.statistics-hero h1 { margin:.15rem 0; font-weight:800; }.statistics-hero p { margin:0; color:#f8eae6; }.statistics-hero-compact { margin-bottom:1rem; }
.statistics-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; }
.statistics-section-card { display:flex; min-height:190px; flex-direction:column; gap:.65rem; padding:1.25rem; border:1px solid var(--cse-border); border-radius:.5rem; color:inherit; background:#f3efed; text-decoration:none; }
.statistics-section-card.is-active { background:#fff; box-shadow:0 7px 20px rgb(88 47 39 / 7%); transition:transform .18s ease,box-shadow .18s ease; }.statistics-section-card.is-active:hover { color:inherit; box-shadow:0 12px 28px rgb(88 47 39 / 13%); transform:translateY(-2px); }
.statistics-section-card strong { font-size:1.08rem; }.statistics-section-card > span:not(.statistics-section-state):not(.module-link) { color:var(--cse-muted); }.statistics-section-card .module-link { margin-top:auto; }
.statistics-section-state { align-self:flex-start; padding:.18rem .5rem; border-radius:999px; color:#6f3f36; background:#eadbd7; font-size:.72rem; font-weight:700; text-transform:uppercase; }
.statistics-section-card:not(.is-active) .statistics-section-state { color:#655d5a; background:#dfdad7; }
.statistics-breadcrumb { display:flex; gap:.5rem; margin-bottom:.75rem; color:var(--cse-muted); }.statistics-breadcrumb a { color:#87483c; }
.statistics-filter-card,.statistics-table-card { margin-bottom:1rem; padding:1.25rem; border:1px solid var(--cse-border); border-radius:.5rem; background:#fff; }
.statistics-filter-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1rem; }.statistics-filter-grid label { display:grid; gap:.35rem; font-weight:600; }
.statistics-table-heading { align-items:center; }.statistics-safe-badge { padding:.35rem .7rem; border-radius:999px; color:#3d6250; background:#e3f1e9; font-size:.78rem; font-weight:700; }
@media (max-width:991.98px) { .statistics-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.statistics-filter-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:575.98px) { .statistics-hero { align-items:flex-start; flex-direction:column; padding:1.35rem; }.statistics-grid,.statistics-filter-grid { grid-template-columns:1fr; } }

.erp-report-wide { position:relative; left:50%; width:calc(100vw - 2rem); transform:translateX(-50%); }
.erp-report-header { display:flex; justify-content:space-between; align-items:end; gap:1rem; margin-bottom:.65rem; padding:.85rem 1rem; border-left:5px solid #8f3028; color:#fff; background:#6f3f36; }
.erp-report-header h1 { margin:.1rem 0 0; font-size:1.35rem; font-weight:800; }.erp-report-period { font-size:.86rem; font-weight:700; }.erp-report-header-actions { display:flex; align-items:center; gap:.8rem; }
.erp-filter-bar { display:flex; align-items:end; gap:.55rem; flex-wrap:wrap; padding:.7rem; border:1px solid #cbb9b3; background:#eee8e5; }
.erp-filter-bar label { display:grid; gap:.2rem; color:#4d403c; font-size:.72rem; font-weight:700; }.erp-filter-bar input { min-width:145px; border-radius:0; }.erp-filter-bar .erp-customer-filter,.erp-filter-bar .erp-contact-filter { flex:1; min-width:210px; }.erp-filter-bar .btn { min-height:31px; border-radius:0; }
.erp-filter-bar select { min-width:125px; border-radius:0; }.erp-filter-bar .erp-checkbox-filter { display:flex; align-items:center; align-self:end; gap:.4rem; min-height:31px; padding:0 .45rem; border:1px solid #c8b8b2; background:#fff; white-space:nowrap; }.erp-filter-bar .erp-checkbox-filter input { min-width:0; }
.erp-filter-shortcuts,.erp-filter-actions { display:flex; align-items:end; gap:.4rem; }.erp-filter-actions { margin-left:auto; }
.erp-report-meta { display:flex; justify-content:space-between; align-items:center; gap:1rem; padding:.45rem .65rem; border:1px solid #d8cbc7; border-top:0; color:#5d514d; background:#fff; font-size:.78rem; }
.invoice-status-legend { display:flex; gap:1rem; flex-wrap:wrap; }.invoice-status-legend > span { display:flex; align-items:center; gap:.3rem; }
.erp-invoice-table-wrap { max-height:calc(100vh - 290px); min-height:320px; overflow:auto; border:1px solid #b9a6a0; border-top:0; background:#fff; }
.erp-invoice-table { width:100%; min-width:1740px; border-collapse:separate; border-spacing:0; font-size:.78rem; line-height:1.25; }
.erp-invoice-table th,.erp-invoice-table td { padding:.38rem .45rem; border-right:1px solid #dbcac5; border-bottom:1px solid #e3d7d3; vertical-align:middle; }
.erp-invoice-table thead th { position:sticky; top:0; z-index:3; color:#fff; background:#8f3028; font-weight:700; white-space:nowrap; }
.erp-invoice-table thead th a { display:flex; justify-content:space-between; align-items:center; gap:.35rem; color:#fff; text-decoration:none; }.erp-invoice-table thead th a:hover,.erp-invoice-table thead th a:focus { color:#fff3ce; }.erp-invoice-table thead th a span { color:#f0c9bf; font-size:.72rem; }
.erp-invoice-table tbody tr:nth-child(even) td { background:#faf6f4; }.erp-invoice-table tbody tr:hover td { background:#fff1cc; }
.erp-invoice-table tbody tr.credit-note-row td { background:#f8c7d8; }.erp-invoice-table tbody tr.debit-note-row td { background:#f4e3c7; }.erp-invoice-table tbody tr.credit-note-row:hover td,.erp-invoice-table tbody tr.debit-note-row:hover td { filter:brightness(.97); }
.erp-invoice-table td.overdue-date { color:#fff; background:#e22626!important; font-weight:800; }
.erp-invoice-table tfoot th { position:sticky; bottom:0; z-index:3; color:#342925; background:#ead9d4; border-top:2px solid #8f3028; }
.erp-invoice-table .amount { text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }.erp-invoice-table .nowrap { white-space:nowrap; }.erp-invoice-table .has-balance { color:#a1271d; font-weight:700; }
.invoice-number { color:#6f3028; font-weight:700; white-space:nowrap; }.invoice-number > a { color:#174ea6; text-decoration:underline; text-underline-offset:2px; }.invoice-number > a:hover,.invoice-number > a:focus { color:#0b3274; }.invoice-number small { margin-left:.25rem; padding:.08rem .25rem; color:#fff; background:#946056; font-size:.58rem; }
.invoice-state-column { width:112px; text-align:center; }.invoice-states { display:flex; justify-content:center; gap:.3rem; white-space:nowrap; }
.invoice-state { display:inline-grid; place-items:center; width:1.45rem; height:1.45rem; border:1px solid #c8bbb7; color:#aaa19e; background:#f1eeed; font-size:.85rem; font-weight:800; line-height:1; }
.invoice-state.active.is-paid,.invoice-status-legend .is-paid { border-color:#4d8062; color:#fff; background:#4d8062; }.invoice-state.active.is-email,.invoice-status-legend .is-email { border-color:#3972a5; color:#fff; background:#3972a5; }.invoice-state.active.is-print,.invoice-status-legend .is-print { border-color:#6b5d58; color:#fff; background:#6b5d58; }
.erp-empty-row { height:180px; color:var(--cse-muted); text-align:center; }
.report-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1px; margin-top:1rem; border:1px solid #cbb9b3; background:#cbb9b3; }
.report-summary.report-summary-compact { grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); }
.report-summary > div { display:grid; gap:.35rem; padding:1rem 1.2rem; background:#fff; }.report-summary span { color:#6b5d58; font-size:.78rem; font-weight:700; }.report-summary strong { color:#6f3028; font-size:1.35rem; font-variant-numeric:tabular-nums; }
.erp-projects-link { display:inline-flex; align-items:center; justify-content:center; width:2rem; height:2rem; margin-left:.35rem; border:1px solid #a65d50; border-radius:50%; color:#7b4036; background:#fff7f4; font-size:1.1rem; line-height:1; text-decoration:none; vertical-align:middle; }
.erp-projects-link:hover,.erp-projects-link:focus { color:#fff; background:#8a4b40; outline:2px solid rgba(138,75,64,.22); outline-offset:2px; }
.module-tabs{display:flex;align-items:flex-end;gap:.25rem;margin:-.2rem 0 .65rem;overflow-x:auto;border-bottom:2px solid #8a4b40}.module-tabs a,.module-tabs span{display:inline-flex;flex:0 0 auto;padding:.55rem 1rem;border:1px solid #cbb9b3;border-bottom:0;color:#6f3f36;background:#f5eeeb;font-size:.78rem;font-weight:800;line-height:1.2;white-space:nowrap;text-decoration:none;text-transform:uppercase}.module-tabs a:hover,.module-tabs a:focus{color:#6f3f36;background:#eadbd6}.module-tabs a.active,.module-tabs span.active{color:#fff;background:#7b4036;border-color:#7b4036}
.comparison-customer-picker { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:.55rem; width:100%; flex:0 0 100%; }.comparison-customer-card { display:grid; gap:.45rem; padding:.55rem; border:1px solid #cbb9b3; background:#f8f4f2; }.comparison-customer-card > strong { color:#7b4036; font-size:.72rem; text-transform:uppercase; }.report-empty-state { margin-top:1rem; padding:2rem; border:1px dashed #bca9a2; color:#6b5d58; background:#fff; text-align:center; }.customer-comparison-table th:first-child,.customer-comparison-table td:first-child { min-width:220px; }.customer-comparison-chart .monthly-chart-group { min-width:150px; max-width:260px; }
.ranking-filter > label:nth-of-type(2),.ranking-filter > label:nth-of-type(3) { display:none; }
.customer-ranking { margin-top:1rem; padding:1rem; border:1px solid #cbb9b3; background:#fff; }.customer-ranking header { display:flex; justify-content:space-between; align-items:end; gap:1rem; margin-bottom:1rem; }.customer-ranking h2 { margin:0; color:#6f3028; font-size:1.15rem; }.customer-ranking p { margin:.2rem 0 0; color:#6b5d58; font-size:.8rem; }.customer-ranking header > span { color:#6b5d58; font-size:.75rem; font-weight:700; }.customer-ranking ol { display:grid; gap:.55rem; margin:0; padding:0; list-style:none; }.customer-ranking li { display:grid; grid-template-columns:minmax(160px,25%) minmax(180px,1fr) minmax(155px,auto); align-items:center; gap:.8rem; min-height:2rem; }.customer-ranking-name { overflow:hidden; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }.customer-ranking-track { height:1.35rem; overflow:hidden; background:#f1e8e5; }.customer-ranking-track i { display:block; min-width:3px; height:100%; background:#8f3028; }.customer-ranking li:nth-child(2) .customer-ranking-track i { background:#c55440; }.customer-ranking li:nth-child(3) .customer-ranking-track i { background:#df8d28; }.customer-ranking li strong { text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
.report-month-table-wrap { margin-top:1rem; overflow:auto; border:1px solid #cbb9b3; }.report-month-table { width:100%; border-collapse:collapse; background:#fff; font-size:.82rem; }.report-month-table th,.report-month-table td { padding:.55rem .7rem; border-bottom:1px solid #eadfdb; text-align:right; font-variant-numeric:tabular-nums; }.report-month-table th:first-child,.report-month-table td:first-child { text-align:left; }.report-month-table thead { color:#fff; background:#6f3f36; }.report-month-table tbody tr:nth-child(even) { background:#faf6f4; }
.report-project-table-wrap { max-height:70vh; overflow:auto; border:1px solid #b9aaa5; background:#fff; }.report-project-table { min-width:2100px; width:100%; border-collapse:collapse; font-size:.72rem; }.report-project-table th { position:sticky; top:0; z-index:1; padding:.4rem .45rem; color:#fff; background:#6f3f36; white-space:nowrap; }.report-project-table td { padding:.35rem .45rem; border-right:1px solid #d8ceca; border-bottom:1px solid #d8ceca; vertical-align:top; }.report-project-table tbody tr:nth-child(even) { background:#f6f4fb; }.report-project-table td:nth-child(6) { text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }.report-project-table td:nth-child(n+10) { white-space:nowrap; }
.report-project-table th a { display:block; width:100%; color:#fff; line-height:1.25; text-align:center; text-decoration:none; white-space:nowrap; }.report-project-table th a:hover,.report-project-table th a:focus { color:#ffe7df; text-decoration:underline; }.report-project-table tfoot td { position:sticky; bottom:0; padding:.65rem; color:#183f48; background:#d8f7f8; border-top:2px solid #75b9c0; }.report-project-table tfoot td:first-child { text-align:center; font-size:.9rem; }.report-project-table tfoot .project-totals div { display:grid; gap:.25rem; text-align:right; font-size:.78rem; }
.project-filter-bar { display:grid; align-items:stretch; gap:.55rem; }.project-filter-row { display:grid; grid-template-columns:max-content max-content; align-items:end; justify-content:start; column-gap:24px; width:100%; }.project-filter-group { display:flex; align-items:end; justify-content:flex-start; gap:.55rem; }.project-filter-group-separated { margin-left:0; }.project-filter-group label { flex:0 0 150px; min-width:0; }.project-filter-group:first-child label:nth-child(2) { flex-basis:190px; }.project-filter-group .project-description-filter { flex-basis:260px; }.project-filter-group input,.project-filter-group select { width:100%; min-width:0; }.project-filter-actions { display:flex; justify-content:flex-start; gap:.55rem; width:100%; }.project-catalogue-table { min-width:2050px; }.project-catalogue-table td:nth-child(6) { text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }.project-catalogue-table td:nth-child(n+7) { white-space:nowrap; }.project-status-text { display:block; min-width:7rem; padding:.18rem .35rem; border-radius:.15rem; background:#eee7df; text-align:center; font-weight:700; }
.project-payment-status { display:block; min-width:5.5rem; padding:.18rem .35rem; color:#fff; text-align:center; font-weight:800; }.project-payment-status.is-unpaid { background:#cf3347; }.project-payment-status.is-paid { background:#55a851; }.project-payment-status.is-advance { background:#dc8b1f; }
.project-invoice-links { display:flex; flex-wrap:wrap; gap:.25rem; }.project-invoice-links a + a::before { margin-right:.25rem; color:#776965; content:","; }
@media (max-width:1279.98px) { .project-filter-row { grid-template-columns:max-content; row-gap:.55rem; }.project-filter-group-separated { margin-left:0; } }
@media (max-width:767.98px) { .project-filter-row,.project-filter-group { display:grid; grid-template-columns:1fr; width:100%; }.project-filter-group label,.project-filter-group:first-child label:nth-child(2),.project-filter-group .project-description-filter { width:100%; }.project-filter-actions { flex-wrap:wrap; } }
.monthly-chart { margin-top:1rem; padding:1rem; border:1px solid #cbb9b3; background:#fff; }.monthly-chart-legend { display:flex; justify-content:flex-end; gap:1rem; margin-bottom:.75rem; font-size:.75rem; font-weight:700; }.monthly-chart-legend span::before { display:inline-block; width:.75rem; height:.75rem; margin-right:.3rem; content:""; vertical-align:-.08rem; background:currentColor; }.monthly-chart .revenue { color:#8f4d42; }.monthly-chart .expense { color:#596875; }.monthly-chart .profit { color:#5d7a68; }
.monthly-chart-plot { display:flex; align-items:stretch; gap:.8rem; height:250px; padding:.5rem .5rem 0; border-bottom:1px solid #b9aaa5; overflow-x:auto; }.monthly-chart-group { display:grid; grid-template-rows:1fr auto; min-width:90px; flex:1; gap:.45rem; text-align:center; color:#675b57; font-size:.72rem; }.monthly-bars { display:flex; align-items:end; justify-content:center; gap:.22rem; min-height:200px; }.monthly-bars i { display:block; width:22%; min-width:12px; max-width:28px; border-radius:3px 3px 0 0; background:currentColor; opacity:.9; }
.monthly-chart h2,.amount-band-chart h2 { margin:0 0 .75rem; color:#6f3f36; font-size:1rem; }.amount-band-chart { margin-top:1rem; padding:1rem; border:1px solid #cbb9b3; background:#fff; }.amount-band-matrix-wrap { overflow-x:auto; }.amount-band-matrix { width:100%; min-width:700px; border-collapse:separate; border-spacing:2px; font-size:.7rem; }.amount-band-matrix th,.amount-band-matrix td { min-width:58px; height:2.1rem; padding:.3rem; text-align:center; }.amount-band-matrix thead th { color:#fff; background:#6f3f36; white-space:nowrap; }.amount-band-matrix thead button { width:100%; padding:.2rem; border:0; color:inherit; background:transparent; font:inherit; font-weight:700; cursor:pointer; white-space:nowrap; }.amount-band-matrix thead button:hover,.amount-band-matrix thead button:focus { color:#ffe7df; text-decoration:underline; }.amount-band-matrix thead button span { display:inline-block; min-width:.75rem; }.amount-band-matrix tbody th { position:sticky; left:0; z-index:1; min-width:110px; color:#5f514d; background:#f6efec; text-align:left; white-space:nowrap; }.amount-band-matrix tbody th i { display:inline-block; width:.65rem; height:.65rem; margin-right:.35rem; border-radius:2px; }.amount-band-matrix td { position:relative; overflow:hidden; color:#3f302c; background:#f4f0ee; font-variant-numeric:tabular-nums; }.amount-band-matrix td span { position:absolute; inset:0; }.amount-band-matrix td strong,.amount-band-matrix td b,.amount-band-matrix td small { position:relative; z-index:1; }.amount-band-matrix td strong { color:#fff; text-shadow:0 1px 2px rgba(0,0,0,.55); }.amount-band-matrix td:last-child { color:#6f3028; background:#eadbd6; }
.amount-band-project-link { display:block; padding:.3rem .4rem; border:1px solid #cbb9b3; border-radius:3px; color:#6f3028; background:#fff; text-decoration:none; }.amount-band-project-link:hover,.amount-band-project-link:focus { color:#fff; background:#8a4b40; }
@media (max-width:767.98px) { .report-summary { grid-template-columns:1fr 1fr; } }
@media (max-width:767.98px) { .erp-report-wide { width:calc(100vw - 1rem); }.erp-report-header { align-items:flex-start; flex-direction:column; }.erp-report-header-actions { align-items:flex-start; flex-direction:column; }.erp-report-meta { align-items:flex-start; flex-direction:column; }.erp-filter-actions { width:100%; justify-content:flex-end; margin-left:0; }.erp-invoice-table-wrap { max-height:none; }.invoice-status-legend { gap:.55rem; } }
@media (max-width:767.98px) { .comparison-customer-picker { grid-template-columns:1fr; } }
@media (max-width:767.98px) { .customer-ranking header { align-items:flex-start; flex-direction:column; }.customer-ranking li { grid-template-columns:minmax(100px,1fr) minmax(100px,2fr); }.customer-ranking li strong { grid-column:1/-1; text-align:right; } }
.monthly-report-filter { align-items:end; }.monthly-client-report { margin-top:1rem; }.monthly-client-report > header { display:flex; justify-content:space-between; align-items:end; gap:1rem; padding:.8rem 1rem; color:#fff; background:#6f3f36; }.monthly-client-report h2 { margin:0; font-size:1.1rem; }.monthly-client-report p { margin:.2rem 0 0; font-size:.75rem; }.monthly-report-table-wrap { max-height:68vh; overflow:auto; border:1px solid #b9aaa5; background:#fff; }.monthly-report-table { min-width:1900px; width:100%; border-collapse:collapse; font-size:.73rem; }.monthly-report-table th { position:sticky; top:0; z-index:1; padding:.45rem; color:#fff; background:#6f3f36; white-space:nowrap; }.monthly-report-table td { padding:.4rem .45rem; border-right:1px solid #d8ceca; border-bottom:1px solid #d8ceca; vertical-align:top; }.monthly-report-table tbody tr:nth-child(even) { background:#f6f4fb; }.monthly-report-table td:nth-child(4) { min-width:360px; }.monthly-report-table td:nth-child(n+5) { text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }.monthly-report-table td:nth-child(9),.monthly-report-table td:nth-child(10),.monthly-report-table td:nth-child(14) { text-align:left; }.monthly-report-totals { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1px; border:1px solid #cbb9b3; background:#cbb9b3; }.monthly-report-totals div { display:grid; gap:.25rem; padding:.8rem 1rem; background:#fff; }.monthly-report-totals span { color:#6b5d58; font-size:.75rem; font-weight:700; }.monthly-report-totals strong { color:#6f3028; font-size:1rem; font-variant-numeric:tabular-nums; }
@media (max-width:767.98px) { .monthly-client-report > header { align-items:flex-start; flex-direction:column; }.monthly-report-totals { grid-template-columns:1fr 1fr; } }
.base-directory-filter{display:flex;align-items:end;gap:.65rem}.base-directory-filter label{min-width:min(34rem,70vw);font-size:.72rem;font-weight:700;text-transform:uppercase}.base-directory-table-wrap{overflow:auto;max-height:65vh;border:1px solid #d8cbc7;background:#fff}.base-directory-table{width:100%;table-layout:fixed;border-collapse:collapse;font-size:.78rem}.base-directory-table th{position:sticky;top:0;z-index:1;padding:0;text-align:left;white-space:nowrap;background:#6f3f36;color:#fff}.base-directory-table th a{display:flex;align-items:center;justify-content:space-between;gap:.4rem;width:100%;padding:.5rem .6rem;color:#fff;text-decoration:none}.base-directory-table th a:hover,.base-directory-table th a:focus{background:#593229;color:#fff}.base-directory-table th:nth-child(1){width:25%}.base-directory-table th:nth-child(2){width:18%}.base-directory-table th:nth-child(3){width:17%}.base-directory-table th:nth-child(4),.base-directory-table th:nth-child(5){width:13%}.base-directory-table th:nth-child(6){width:14%}.sort-indicator{min-width:.8rem;text-align:right}.base-directory-table td{padding:.4rem .55rem;border-bottom:1px solid #eadfdb;vertical-align:top;overflow-wrap:anywhere}.base-directory-table tbody tr:nth-child(even){background:#faf7f5}.base-directory-table tbody tr:hover{background:#f1e5e1}.base-directory-name{font-weight:700}.base-directory-table td:last-child{min-width:0}.base-dossier-tabs{margin-bottom:1rem}.base-dossier-content{min-width:0}.base-dossier-fields{display:grid;grid-template-columns:13rem minmax(12rem,35rem);gap:.35rem .7rem;padding:1rem;border:1px solid #d8cbc7;background:#fff}.base-dossier-fields dt{font-size:.76rem;color:#66534d}.base-dossier-fields dd{margin:0;font-weight:600}
.project-clickable-row{cursor:pointer}.project-clickable-row:focus{outline:2px solid #6f3f36;outline-offset:-2px}.project-clickable-row:hover{background:#f1e5e1!important}
.project-timeline .project-system-comment,.project-timeline .project-system-comment time{color:#c62828}.project-timeline .project-system-comment{border-left-color:#c62828;background:#fff6f5}
.project-variant{margin-top:1rem;border:1px solid #d8cbc7}.project-variant>header{display:flex;justify-content:space-between;gap:1rem;padding:.55rem .75rem;background:#ddd3cf}.project-variant>header span{color:#6f3f36;font-size:.75rem;font-weight:800}.project-variant>.project-dossier-grid{padding:.8rem}.project-structure{margin:.2rem .8rem .8rem;padding:.75rem;border-left:4px solid #8a554a;background:#faf7f5}.project-structure h3{margin:0 0 .6rem;color:#6f3f36}.project-structure dl{grid-template-columns:8rem minmax(0,1fr)}.project-section-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem}.project-section-heading h2{margin:0}.project-finance-table{margin-top:1rem}.project-document-service{display:flex;align-items:center;justify-content:space-between;gap:2rem;min-height:12rem;padding:2rem;border:1px solid #d8cbc7;background:#fff}.project-document-service h2{margin:.3rem 0;color:#6f3f36}.project-document-service p{margin:0;color:#725f59}@media(max-width:700px){.project-document-service{align-items:flex-start;flex-direction:column;min-height:0}}
.project-dossier{max-width:1600px}.project-dossier-header{display:flex;justify-content:space-between;align-items:flex-end;gap:1rem;padding:1rem 1.2rem;color:#fff;background:linear-gradient(120deg,#6f3f36,#8a554a)}.project-dossier-header h1{margin:.15rem 0;font-size:1.55rem}.project-dossier-header p{margin:0;color:#f3e8e4}.project-dossier-header>div:last-child{display:grid;justify-items:end;gap:.4rem}.project-dossier-status{padding:.3rem .65rem;border-radius:999px;background:#fff;color:#6f3f36;font-size:.78rem;font-weight:800}.project-back-link{display:block;margin-bottom:.65rem;color:#fff}.project-dossier-tabs{display:flex;overflow:auto;white-space:nowrap;margin:0;border:1px solid #d8cbc7;border-top:0}.project-dossier-content{padding:1rem;background:#f7f3f1}.project-dossier-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.project-card{min-width:0;padding:1rem;border:1px solid #d8cbc7;background:#fff}.project-card-wide{margin-top:1rem}.project-card h2{margin:0 0 .85rem;color:#6f3f36;font-size:1.05rem}.project-card h3{font-size:.86rem}.project-card dl,.project-summary-list{display:grid;grid-template-columns:minmax(9rem,13rem) minmax(0,1fr);gap:.45rem .8rem;margin:0}.project-card dt{color:#725f59;font-size:.75rem}.project-card dd{margin:0;font-weight:600;overflow-wrap:anywhere}.project-long-text{max-width:90rem;margin:0;white-space:pre-wrap}.project-timeline{display:grid;gap:.65rem}.project-timeline article{display:grid;grid-template-columns:9rem 10rem minmax(0,1fr);gap:.5rem;padding:.65rem;border-left:3px solid #8a554a;background:#faf7f5}.project-timeline time{color:#725f59;font-size:.72rem}.project-timeline p,.project-timeline pre{grid-column:3;margin:0;white-space:pre-wrap;font:inherit}.project-timeline article>span{font-size:.75rem;color:#725f59}.project-table-wrap{overflow:auto}.project-table-wrap table{width:100%;border-collapse:collapse;font-size:.78rem}.project-table-wrap th{padding:.5rem;background:#6f3f36;color:#fff;text-align:left;white-space:nowrap}.project-table-wrap td{padding:.5rem;border-bottom:1px solid #eadfdb;vertical-align:top}.project-chip-list{display:flex;flex-wrap:wrap;gap:.4rem;margin-bottom:1rem}.project-chip-list span{padding:.3rem .6rem;border-radius:999px;background:#eadfdb;font-weight:700}.project-split-text{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.project-split-text>div{padding:.8rem;background:#faf7f5}.project-readonly-note,.empty-state{color:#725f59;font-size:.8rem}@media(max-width:800px){.project-dossier-header{align-items:flex-start;flex-direction:column}.project-dossier-header>div:last-child{justify-items:start}.project-dossier-grid,.project-split-text{grid-template-columns:1fr}.project-timeline article{grid-template-columns:1fr}.project-timeline p,.project-timeline pre{grid-column:1}.project-card dl,.project-summary-list{grid-template-columns:1fr}.project-card dd{margin-bottom:.35rem}}
.invoice-dossier{max-width:1500px}.invoice-dossier-header{display:flex;align-items:flex-end;justify-content:space-between;gap:1rem;padding:1rem 1.2rem;color:#fff;background:linear-gradient(120deg,#6f3f36,#8a554a)}.invoice-dossier-header a{display:block;margin-bottom:.55rem;color:#fff}.invoice-dossier-header h1{margin:.15rem 0;font-size:1.5rem}.invoice-dossier-header p{margin:0;color:#f3e8e4}.invoice-dossier-header>div:last-child{display:grid;justify-items:end;gap:.35rem}.invoice-dossier-header>div:last-child strong{padding:.3rem .65rem;border-radius:999px;background:#fff;color:#6f3f36}.invoice-dossier-body{display:grid;gap:.75rem;padding:1rem;background:#f7f3f1}.invoice-dossier-card{padding:1rem;border:1px solid #d8cbc7;background:#fff}.invoice-dossier-card h2,.invoice-dossier-strip h2{margin:0 0 .75rem;color:#6f3f36;font-size:1rem}.invoice-dossier-summary dl{display:grid;grid-template-columns:10rem minmax(0,1fr) 10rem minmax(0,1fr);gap:.4rem .7rem;margin:0}.invoice-dossier-summary dt{color:#725f59;font-size:.75rem}.invoice-dossier-summary dd{margin:0;font-weight:600}.invoice-flags{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:1rem}.invoice-flags span{padding:.3rem .55rem;border:1px solid #d8cbc7;color:#8c7c76;background:#f7f3f1;font-size:.75rem}.invoice-flags span:before{content:'○';margin-right:.3rem}.invoice-flags span.active{border-color:#4f7e46;color:#2f6128;background:#edf7eb;font-weight:700}.invoice-flags span.active:before{content:'✓'}.invoice-dossier-strip{display:flex;align-items:center;gap:.7rem;padding:.55rem .8rem;background:#ddd3cf}.invoice-dossier-strip h2{margin:0 auto 0 0}.invoice-totals{display:grid;grid-template-columns:minmax(11rem,1fr) auto;gap:.35rem .8rem;max-width:30rem;margin:1rem 0 0 auto}.invoice-totals dt{text-align:right}.invoice-totals dd{margin:0;text-align:right;font-weight:800;font-variant-numeric:tabular-nums}.invoice-dossier .amount{text-align:right;white-space:nowrap}@media(max-width:800px){.invoice-dossier-header{align-items:flex-start;flex-direction:column}.invoice-dossier-header>div:last-child{justify-items:start}.invoice-dossier-summary dl{grid-template-columns:1fr}.invoice-dossier-summary dd{margin-bottom:.35rem}}
