/* ============================================================
   ad bonum CRM – Design System
   Brand: Navy #102035 · Gold #C9A66E · Warm White #F5F0E8
   Fonts: Playfair Display (headings) · Inter (UI)
   ============================================================ */

:root {
  --navy:   #102035;
  --gold:   #C9A66E;
  --bg:     #F5F0E8;
  --card:   #FDFAF5;
  --white:  #FFFFFF;
  --text:   #1A1A1A;
  --muted:  #6B6B6B;
  --border: rgba(201,166,110,0.25);
  --border-strong: rgba(201,166,110,0.5);
  --danger:   #C0392B;
  --success:  #1A7A4A;
  --warning:  #B07D2A;
  --info:     #1A5276;
  --mahnung1: #C96A1A;
  --mahnung2: #C0392B;
  --sidebar-w: 240px;
  --radius: 4px;
  --shadow: 0 1px 4px rgba(16,32,53,0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold); }

h1,h2,h3,h4 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.15;
}

/* ============ LAYOUT ============ */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--navy);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 28px 24px 20px;
  border-bottom: 1px solid rgba(201,166,110,0.2);
}

.sidebar-logo img { height: 40px; width: auto; }

.sidebar-nav { flex: 1; padding: 12px 0; }

.nav-section {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(201,166,110,0.6);
  padding: 16px 24px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 24px;
  color: rgba(255,255,255,0.7);
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.15s;
  border-left: 2px solid transparent;
}

.nav-item:hover {
  color: var(--white);
  background: rgba(255,255,255,0.05);
}

.nav-item.active {
  color: var(--gold);
  border-left-color: var(--gold);
  background: rgba(201,166,110,0.08);
}

.nav-item svg { opacity: 0.8; flex-shrink: 0; }
.nav-item.active svg { opacity: 1; }

.sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(201,166,110,0.15);
  font-size: 11px;
  color: rgba(255,255,255,0.3);
}

.sidebar-footer a {
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  font-weight: 500;
}
.sidebar-footer a:hover { color: var(--gold); }

.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}

.topbar-title {
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
}

.topbar-actions { display: flex; align-items: center; gap: 12px; }

.content { padding: 28px 32px; flex: 1; }

/* ============ CARDS ============ */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-family: 'Playfair Display', serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
}

.card-body { padding: 20px; }

/* ============ KPI CARDS ============ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.kpi-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.kpi-value {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
}

.kpi-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}

.kpi-card.kpi--warning .kpi-value { color: var(--warning); }
.kpi-card.kpi--danger  .kpi-value { color: var(--danger); }

/* ============ TABLES ============ */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

thead th {
  text-align: left;
  padding: 8px 14px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid var(--border);
  background: rgba(201,166,110,0.05);
  white-space: nowrap;
}

tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(201,166,110,0.1);
  vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }

tbody tr:hover { background: rgba(201,166,110,0.03); }

.td-right { text-align: right; }
.td-center { text-align: center; }

/* ============ FORMS ============ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }

.form-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

.form-control {
  background: var(--white);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: var(--text);
  transition: border-color 0.15s;
  width: 100%;
}

.form-control:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201,166,110,0.15);
}

textarea.form-control { resize: vertical; min-height: 90px; }

select.form-control { cursor: pointer; }

.form-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn--primary {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn--primary:hover { background: #1a3352; color: var(--white); }

.btn--gold {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}
.btn--gold:hover { background: #b8955d; color: var(--white); }

.btn--outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--border-strong);
}
.btn--outline:hover { border-color: var(--gold); color: var(--gold); }

.btn--danger {
  background: var(--danger);
  color: var(--white);
  border-color: var(--danger);
}
.btn--danger:hover { background: #a93226; color: var(--white); }

.btn--sm { padding: 5px 12px; font-size: 11.5px; }
.btn--full { width: 100%; justify-content: center; }

.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ============ BADGES ============ */
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.badge--success  { background: rgba(26,122,74,0.12);   color: var(--success); }
.badge--warning  { background: rgba(176,125,42,0.12);  color: var(--warning); }
.badge--danger   { background: rgba(192,57,43,0.12);   color: var(--danger); }
.badge--info     { background: rgba(26,82,118,0.12);   color: var(--info); }
.badge--primary  { background: rgba(16,32,53,0.1);     color: var(--navy); }
.badge--muted    { background: rgba(107,107,107,0.12); color: var(--muted); }
.badge--gold     { background: rgba(201,166,110,0.15); color: #8a6a30; }
.badge--mahnung1 { background: rgba(201,106,26,0.12);  color: var(--mahnung1); }
.badge--mahnung2 { background: rgba(192,57,43,0.12);   color: var(--mahnung2); }

/* ============ ALERTS ============ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13.5px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert--success { background: rgba(26,122,74,0.1);  color: var(--success); border-color: rgba(26,122,74,0.25); }
.alert--danger  { background: rgba(192,57,43,0.1);  color: var(--danger);  border-color: rgba(192,57,43,0.25); }
.alert--warning { background: rgba(176,125,42,0.1); color: var(--warning); border-color: rgba(176,125,42,0.25); }
.alert--info    { background: rgba(26,82,118,0.1);  color: var(--info);    border-color: rgba(26,82,118,0.25); }

/* ============ PIPELINE ============ */
.pipeline {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.pipeline-col {
  flex: 0 0 220px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.pipeline-col-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pipeline-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 13px;
  transition: box-shadow 0.15s;
}
.pipeline-card:hover { box-shadow: var(--shadow); }

.pipeline-card-name { font-weight: 600; color: var(--navy); margin-bottom: 2px; }
.pipeline-card-sub  { font-size: 11px; color: var(--muted); }

/* ============ GOLD RULE ============ */
.gold-rule {
  height: 2px;
  background: var(--gold);
  border: none;
  margin: 20px 0;
  opacity: 0.5;
}

/* ============ SECTION HEADER ============ */
.section-label {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 4px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.page-header h1 { font-size: 28px; }

/* ============ TABS ============ */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.tab-item {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
}
.tab-item:hover { color: var(--navy); }
.tab-item.active { color: var(--gold); border-bottom-color: var(--gold); }

/* ============ ITEMS TABLE (invoice) ============ */
.items-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }

.items-table th {
  text-align: left;
  padding: 6px 10px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid var(--border);
  background: rgba(201,166,110,0.05);
}

.items-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(201,166,110,0.1);
  vertical-align: middle;
}

.items-table tfoot td {
  padding: 6px 10px;
  border: none;
}

.items-table tfoot .total-row td {
  font-weight: 700;
  color: var(--navy);
  border-top: 2px solid var(--gold);
  padding-top: 10px;
}

/* ============ NOTES / ACTIVITY ============ */
.note-list { display: flex; flex-direction: column; gap: 10px; }

.note-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 13.5px;
}

.note-meta {
  font-size: 10.5px;
  color: var(--muted);
  margin-bottom: 4px;
}

/* ============ LOGIN PAGE ============ */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--navy);
}

.login-wrap {
  width: 100%;
  max-width: 380px;
  padding: 20px;
  text-align: center;
}

.login-logo { margin-bottom: 28px; }

.login-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
  text-align: left;
}

.login-title {
  font-size: 24px;
  margin-bottom: 20px;
  text-align: center;
}

.login-footer {
  margin-top: 20px;
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.08em;
}

/* ============ UTILITIES ============ */
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: 4px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }

.text-muted  { color: var(--muted); }
.text-gold   { color: var(--gold); }
.text-navy   { color: var(--navy); }
.text-danger { color: var(--danger); }
.text-right  { text-align: right; }
.text-sm     { font-size: 12px; }

.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-end { display: flex; justify-content: flex-end; gap: 8px; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}
.empty-state p { font-size: 13.5px; margin-top: 8px; }

/* ============ CHART CONTAINER ============ */
.chart-wrap {
  position: relative;
  height: 260px;
}

/* ============ TOTALS BOX ============ */
.totals-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  min-width: 260px;
}

.totals-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 13.5px;
  border-bottom: 1px solid rgba(201,166,110,0.1);
}
.totals-row:last-child {
  border-bottom: none;
  border-top: 2px solid var(--gold);
  margin-top: 4px;
  padding-top: 8px;
  font-weight: 700;
  font-size: 15px;
  color: var(--navy);
}

/* ============ SEARCH / FILTER ============ */
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.filter-bar .form-control {
  max-width: 220px;
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(201,166,110,0.4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ============ EXTENDED STYLES (v2) ============ */

/* Buttons extended */
.btn--navy    { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn--navy:hover { background: #1a3352; color: var(--white); }
.btn--success { background: var(--success); color: var(--white); border-color: var(--success); }
.btn--success:hover { background: #155e38; color: var(--white); }
.btn--warning { background: var(--warning); color: var(--white); border-color: var(--warning); }
.btn--warning:hover { background: #8c6020; color: var(--white); }
.btn--xs { padding: 3px 8px; font-size: 11px; gap: 3px; }

/* Page header variants */
.page-header__left  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-header__right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Card header/body (alternate naming) */
.card__header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card__body { padding: 20px; }

/* Grid helpers */
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: 1fr 1fr; }
.grid--3 { grid-template-columns: 1fr 1fr 1fr; }

@media (max-width: 900px) {
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
}

/* Form helpers */
.form-group--full { grid-column: 1 / -1; }
.form-control--sm { padding: 5px 8px; font-size: 12.5px; }
.form-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; align-items: center; }
.required { color: var(--danger); }

/* Table extras */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table thead th {
  text-align: left;
  padding: 8px 14px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid var(--border);
  background: rgba(201,166,110,0.05);
  white-space: nowrap;
}
.table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid rgba(201,166,110,0.1);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: rgba(201,166,110,0.03); }
.table tfoot td {
  padding: 10px 14px;
  border-top: 2px solid var(--border-strong);
  background: rgba(201,166,110,0.05);
}
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text--muted { color: var(--muted); }
.text--danger{ color: var(--danger); }

/* Actions cell */
.actions { display: flex; gap: 4px; align-items: center; flex-wrap: nowrap; }

/* Filter bar label */
.filter-bar__label { font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; }

/* Stat cards */
.stats-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  min-width: 130px;
  box-shadow: var(--shadow);
}
.stat-card__value {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
}
.stat-card__label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 4px;
}

/* Tabs (alternate .tab / .tab--active naming) */
.tab {
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
  text-decoration: none;
}
.tab:hover { color: var(--navy); }
.tab--active { color: var(--gold) !important; border-bottom-color: var(--gold); }

/* DL description list */
.dl { display: grid; grid-template-columns: 120px 1fr; gap: 6px 16px; font-size: 13.5px; }
.dl dt { font-weight: 600; color: var(--muted); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; padding-top: 2px; }
.dl dd { color: var(--text); }

/* Note items */
.note-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin-bottom: 10px;
}
.note-item__text { font-size: 13.5px; line-height: 1.6; }
.note-item__meta { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* Contact list */
.contact-list { display: flex; flex-direction: column; gap: 10px; }
.contact-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.contact-item__info { flex: 1; font-size: 13.5px; line-height: 1.6; }

/* KANBAN */
.kanban {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
  align-items: flex-start;
}
.kanban-col {
  flex: 0 0 220px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-height: 200px;
}
.kanban-col--info    { border-top: 3px solid var(--info); }
.kanban-col--primary { border-top: 3px solid var(--navy); }
.kanban-col--muted   { border-top: 3px solid var(--muted); }
.kanban-col--success { border-top: 3px solid var(--success); }
.kanban-col--danger  { border-top: 3px solid var(--danger); }

.kanban-col__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.kanban-col__title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}
.kanban-col__count {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  color: var(--muted);
}
.kanban-col__body { padding: 10px; }

.kanban-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin-bottom: 8px;
  cursor: grab;
  transition: box-shadow 0.15s;
  font-size: 13px;
}
.kanban-card:hover, .kanban-card.dragging { box-shadow: 0 3px 12px rgba(16,32,53,0.14); }
.kanban-card__firm   { font-weight: 600; color: var(--navy); margin-bottom: 2px; }
.kanban-card__person { color: var(--muted); font-size: 12px; }
.kanban-card__email  { font-size: 11.5px; margin-top: 2px; }
.kanban-card__source { margin-top: 2px; }
.kanban-card__actions { display: flex; gap: 4px; margin-top: 8px; flex-wrap: wrap; }

.kanban-empty { padding: 16px; text-align: center; font-size: 12px; color: var(--muted); }
.drag-over { background: rgba(201,166,110,0.08); }

/* Invoice preview */
.invoice-preview { font-size: 13.5px; line-height: 1.7; }
.inv-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.inv-company-address { font-size: 11.5px; color: var(--muted); text-align: right; line-height: 1.7; }
.inv-body { }
.inv-recipient { margin-bottom: 20px; line-height: 1.8; }
.inv-date { text-align: right; margin-bottom: 16px; }
.inv-rule { border: none; border-top: 1px solid var(--navy); margin-bottom: 16px; }
.inv-rule--gold { border-top: 2px solid var(--gold); }
.inv-title { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 800; color: var(--navy); margin-bottom: 12px; }
.inv-salutation { margin-bottom: 12px; }
.inv-fliesstext { white-space: pre-wrap; line-height: 1.8; margin-bottom: 20px; }
.inv-signature { margin: 16px 0; line-height: 1.7; }
.inv-section-title { font-family: 'Playfair Display', serif; font-size: 14px; font-weight: 800; color: var(--navy); margin: 20px 0 12px; }
.inv-items-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.inv-items-table thead tr { background: var(--navy); color: white; }
.inv-items-table th { padding: 7px 10px; text-align: left; font-size: 10px; font-weight: 600; letter-spacing: 0.1em; }
.inv-items-table tbody td { padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.inv-items-table tbody tr:nth-child(even) { background: var(--bg); }
.inv-totals { margin-top: 12px; margin-left: auto; width: 55%; }
.inv-total-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13.5px; }
.inv-total-row--total { border-top: 2px solid var(--gold); margin-top: 4px; padding-top: 6px; font-weight: 700; font-size: 15px; color: var(--navy); }
.inv-footer { margin-top: 24px; }
.inv-footer-text { text-align: center; font-size: 11px; color: var(--muted); letter-spacing: 0.12em; margin-top: 6px; }

/* Invoice form totals */
.invoice-totals { padding: 16px 20px; border-top: 1px solid var(--border); background: rgba(201,166,110,0.03); }
.invoice-total-row { display: flex; justify-content: flex-end; gap: 32px; padding: 3px 0; font-size: 13.5px; }
.invoice-total-row--total { border-top: 2px solid var(--gold); margin-top: 6px; padding-top: 8px; font-weight: 700; font-size: 15px; color: var(--navy); }

/* Modal */
.modal {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
}
.modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(16,32,53,0.5);
  backdrop-filter: blur(2px);
}
.modal-box {
  position: relative; z-index: 1;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
  width: 100%; max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-header h3 { font-family: 'Playfair Display', serif; font-size: 16px; color: var(--navy); }
.modal-close { background: none; border: none; cursor: pointer; font-size: 18px; color: var(--muted); padding: 0 4px; }
.modal-close:hover { color: var(--danger); }
.modal-box form { padding: 20px; }

/* Alert extended */
.alert--error { background: rgba(192,57,43,0.1); color: var(--danger); border: 1px solid rgba(192,57,43,0.25); padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; font-size: 13.5px; }

/* code */
code { font-family: 'Menlo', 'Consolas', monospace; font-size: 12px; background: rgba(16,32,53,0.06); padding: 2px 6px; border-radius: 3px; color: var(--navy); }

