@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garant:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --bg:          #FDFBF8;
  --bg-alt:      #F7F3EE;
  --rose:        #C9907A;
  --rose-dark:   #A8705C;
  --rose-light:  #E8C4B4;
  --champagne:   #D4B896;
  --champ-light: #EDE0CC;
  --silver:      #B8BCC4;
  --silver-light:#E8EAEC;
  --charcoal:    #2C2C2C;
  --mid:         #5A5A5A;
  --subtle:      #8A8A8A;
  --white:       #FFFFFF;
  --green:       #2E7D32;
  --green-bg:    #F0FAF2;
  --red:         #C62828;
  --red-bg:      #FFF3F3;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--charcoal);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Cormorant Garant', serif;
  font-weight: 600;
  line-height: 1.2;
  color: var(--charcoal);
}
h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.4rem; }
h4 { font-size: 1rem; font-weight: 600; }

p { color: var(--mid); }
a { color: var(--rose); text-decoration: none; transition: color 0.2s; }

.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rose);
  display: block;
  margin-bottom: 0.5rem;
}

/* ---- NAV ---- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253,251,248,0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--champ-light);
  box-shadow: 0 2px 16px rgba(44,44,44,0.06);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav-logo {
  font-family: 'Cormorant Garant', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--charcoal);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.nav-logo img { height: 44px; width: auto; display: block; }
.nav-logo .accent { color: var(--rose); }
.nav-right { display: flex; align-items: center; gap: 1rem; }
.nav-back {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--mid);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-back:hover { color: var(--rose); }

/* ---- BUTTONS ---- */
.btn {
  display: inline-block;
  padding: 0.7rem 1.8rem;
  border-radius: 2px;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-decoration: none;
}
.btn-primary {
  background: var(--rose);
  color: var(--white);
  border: 1px solid var(--rose);
}
.btn-primary:hover { background: var(--rose-dark); border-color: var(--rose-dark); color: var(--white); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-outline {
  background: transparent;
  color: var(--rose);
  border: 1px solid var(--rose);
}
.btn-outline:hover { background: var(--rose); color: var(--white); }
.btn-ghost {
  background: transparent;
  color: var(--subtle);
  border: 1px solid var(--silver-light);
  padding: 0.5rem 1rem;
  font-size: 0.72rem;
}
.btn-ghost:hover { color: var(--charcoal); border-color: var(--silver); }
.btn-sm { padding: 0.45rem 1rem; font-size: 0.7rem; }

/* ---- HERO ---- */
.page-hero {
  background: linear-gradient(135deg, #FDFBF8 60%, #F3EBE4 100%);
  padding: 3rem 2rem 2.5rem;
  border-bottom: 1px solid var(--champ-light);
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,184,150,0.2) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero-inner { max-width: 1200px; margin: 0 auto; }
.page-hero h1 { margin-bottom: 0.75rem; }
.page-hero p { font-size: 1rem; max-width: 560px; color: var(--mid); margin-bottom: 0; }

/* ---- BUSINESS INFO CARD ---- */
.biz-info-bar {
  background: var(--white);
  border-bottom: 1px solid var(--champ-light);
  padding: 1.25rem 2rem;
}
.biz-info-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 0.75rem;
  align-items: end;
}
.biz-field label {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--subtle);
  margin-bottom: 0.3rem;
}
.biz-field input {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--champ-light);
  border-radius: 2px;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  color: var(--charcoal);
  background: var(--bg);
  outline: none;
  transition: border-color 0.2s;
}
.biz-field input:focus { border-color: var(--rose); background: var(--white); }

/* ---- SUMMARY BAR ---- */
.summary-bar {
  background: var(--champ-light);
  padding: 1.25rem 2rem;
  border-bottom: 1px solid rgba(212,184,150,0.4);
}
.summary-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}
.stat-item { }
.stat-label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0.2rem;
}
.stat-value {
  font-family: 'Cormorant Garant', serif;
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1;
  color: var(--charcoal);
}
.stat-value.positive { color: var(--green); }
.stat-value.negative { color: var(--red); }

/* ---- MAIN CONTENT ---- */
.tool-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem 4rem;
}

/* ---- TABS ---- */
.tab-nav {
  display: flex;
  border-bottom: 2px solid var(--champ-light);
  margin-bottom: 2rem;
  gap: 0;
}
.tab-btn {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 0.85rem 1.6rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.tab-btn:hover { color: var(--rose); }
.tab-btn.active { color: var(--rose); border-bottom-color: var(--rose); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---- BUDGET ---- */
.budget-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.budget-section-card {
  background: var(--white);
  border: 1px solid var(--champ-light);
  border-radius: 4px;
  overflow: hidden;
}
.budget-section-head {
  padding: 1rem 1.25rem;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--champ-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.budget-section-head h3 {
  font-size: 0.88rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
}
.budget-rows { padding: 0.5rem 0; }
.budget-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.5rem;
  align-items: center;
  padding: 0.4rem 1rem;
  border-bottom: 1px solid var(--bg-alt);
  transition: background 0.15s;
}
.budget-row:hover { background: var(--bg); }
.budget-row:last-child { border-bottom: none; }
.budget-label {
  border: none;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  color: var(--charcoal);
  outline: none;
  width: 100%;
  padding: 0.2rem 0;
}
.budget-label:focus { color: var(--rose); }
.budget-amount-wrap {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  background: var(--bg);
  border: 1px solid var(--silver-light);
  border-radius: 2px;
  padding: 0.25rem 0.5rem;
  transition: border-color 0.15s;
}
.budget-amount-wrap:focus-within { border-color: var(--rose); }
.dollar-sign { font-size: 0.8rem; color: var(--subtle); }
.per-month   { font-size: 0.7rem; color: var(--subtle); white-space: nowrap; }
.budget-amount {
  border: none;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--charcoal);
  width: 90px;
  text-align: right;
  outline: none;
}
.budget-amount::-webkit-outer-spin-button,
.budget-amount::-webkit-inner-spin-button { -webkit-appearance: none; }
.btn-del {
  background: none;
  border: none;
  color: var(--silver);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem 0.3rem;
  border-radius: 2px;
  transition: color 0.15s, background 0.15s;
}
.btn-del:hover { color: var(--red); background: var(--red-bg); }
.budget-add-row {
  padding: 0.6rem 1rem;
  border-top: 1px dashed var(--champ-light);
}
.btn-add {
  background: none;
  border: none;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rose);
  cursor: pointer;
  padding: 0.3rem 0;
  font-family: 'Inter', sans-serif;
  transition: color 0.2s;
}
.btn-add:hover { color: var(--rose-dark); }
.budget-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.25rem;
  background: var(--bg-alt);
  border-top: 2px solid var(--champ-light);
}
.budget-total-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
}
.budget-total-amount {
  font-family: 'Cormorant Garant', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--charcoal);
}
.net-summary {
  background: var(--white);
  border: 1px solid var(--champ-light);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.net-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
}
.net-value {
  font-family: 'Cormorant Garant', serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--charcoal);
}
.net-value.positive { color: var(--green); }
.net-value.negative { color: var(--red); }
.net-sub { font-size: 0.78rem; color: var(--subtle); margin-top: 0.2rem; }

/* ---- CASH FLOW ---- */
.cf-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  background: var(--white);
  border: 1px solid var(--champ-light);
  border-radius: 4px;
  padding: 1rem 1.25rem;
}
.cf-controls label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
  white-space: nowrap;
}
.cf-controls input {
  border: 1px solid var(--champ-light);
  border-radius: 2px;
  padding: 0.5rem 0.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--charcoal);
  width: 160px;
  outline: none;
}
.cf-controls input:focus { border-color: var(--rose); }
.cf-note {
  font-size: 0.78rem;
  color: var(--subtle);
  font-style: italic;
}
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: var(--white);
  border: 1px solid var(--champ-light);
  border-radius: 4px;
  overflow: hidden;
}
thead tr {
  background: var(--bg-alt);
  border-bottom: 2px solid var(--champ-light);
}
th {
  padding: 0.8rem 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  text-align: left;
  white-space: nowrap;
}
td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--bg-alt);
  color: var(--charcoal);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #FDFAF7; }
.cf-month { font-weight: 500; white-space: nowrap; color: var(--mid); font-size: 0.82rem; }
.cf-input {
  border: 1px solid transparent;
  background: var(--bg);
  border-radius: 2px;
  padding: 0.3rem 0.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  color: var(--charcoal);
  width: 110px;
  text-align: right;
  outline: none;
  transition: border-color 0.15s;
}
.cf-input::-webkit-outer-spin-button,
.cf-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.cf-input:focus { border-color: var(--rose); background: var(--white); }
.cf-calc { font-weight: 500; text-align: right; white-space: nowrap; }
.cf-calc.positive { color: var(--green); }
.cf-calc.negative { color: var(--red); }

/* ---- P&L ---- */
.pl-section-head {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rose);
  background: var(--bg-alt);
}
.pl-section-head td { padding: 0.7rem 1rem; }
.pl-total-row { background: var(--bg-alt); border-top: 2px solid var(--champ-light) !important; }
.pl-total-row td { font-weight: 600; }
.pl-net-row { background: var(--charcoal) !important; }
.pl-net-row td { color: var(--white) !important; font-weight: 600; border-bottom: none !important; }
.pl-num { text-align: right; white-space: nowrap; }
.pl-num.positive { color: var(--green); }
.pl-num.negative { color: var(--red); }
.pl-num.bold { font-weight: 600; font-size: 1rem; }

/* ---- BREAK-EVEN ---- */
.be-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.be-card {
  background: var(--white);
  border: 1px solid var(--champ-light);
  border-radius: 4px;
  padding: 1.5rem;
}
.be-card h3 { font-size: 1.1rem; margin-bottom: 1.25rem; }
.be-field { margin-bottom: 1.25rem; }
.be-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0.4rem;
}
.be-field .field-sub {
  font-size: 0.7rem;
  color: var(--subtle);
  font-style: italic;
  margin-top: 0.2rem;
}
.input-money {
  display: flex;
  align-items: center;
  border: 1px solid var(--champ-light);
  border-radius: 2px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.input-money:focus-within { border-color: var(--rose); }
.input-money .prefix {
  padding: 0.6rem 0.75rem;
  background: var(--bg-alt);
  color: var(--subtle);
  font-size: 0.88rem;
  border-right: 1px solid var(--champ-light);
  flex-shrink: 0;
}
.input-money input {
  border: none;
  padding: 0.6rem 0.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--charcoal);
  outline: none;
  width: 100%;
  background: var(--white);
}
.input-money input::-webkit-outer-spin-button,
.input-money input::-webkit-inner-spin-button { -webkit-appearance: none; }
.be-result-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--bg-alt);
}
.be-result-row:last-of-type { border-bottom: none; }
.be-result-label { font-size: 0.82rem; color: var(--mid); }
.be-result-value {
  font-family: 'Cormorant Garant', serif;
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--charcoal);
}
.be-result-value.highlight { color: var(--rose); }
.be-bar-wrap { margin-top: 1.25rem; display: none; }
.be-bar-track {
  height: 10px;
  background: var(--silver-light);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.be-bar {
  height: 100%;
  border-radius: 5px;
  background: var(--champagne);
  transition: width 0.4s ease;
}
.be-bar-label { font-size: 0.78rem; color: var(--subtle); }

/* ---- SAVE SECTION ---- */
.save-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--champ-light);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.save-section p { margin: 0; font-size: 0.88rem; color: var(--subtle); }
.save-status {
  display: none;
  font-size: 0.88rem;
  padding: 0.6rem 1rem;
  border-radius: 3px;
  font-weight: 500;
}
.save-status.success { background: var(--green-bg); color: var(--green); border: 1px solid #B4DFB9; }
.save-status.error   { background: var(--red-bg);   color: var(--red);   border: 1px solid #FFB4B4; }

/* ---- MODAL ---- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(44,44,44,0.55);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.modal-box {
  background: var(--white);
  border-radius: 6px;
  padding: 2rem;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(44,44,44,0.2);
}
.modal-box h3 { margin-bottom: 0.5rem; }
.modal-box p { font-size: 0.88rem; color: var(--subtle); margin-bottom: 1.5rem; }
.modal-field { margin-bottom: 1rem; }
.modal-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0.35rem;
}
.modal-field input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--champ-light);
  border-radius: 2px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--charcoal);
  outline: none;
}
.modal-field input:focus { border-color: var(--rose); }
.modal-actions { display: flex; gap: 0.75rem; margin-top: 1.5rem; }

/* ---- FOOTER ---- */
.site-footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.6);
  padding: 2rem;
  text-align: center;
  font-size: 0.82rem;
  border-top: 1px solid var(--champ-light);
}
.site-footer a { color: var(--rose-light); }

/* ---- UTILITY ---- */
.positive { color: var(--green); }
.negative { color: var(--red); }
.text-subtle { color: var(--subtle); font-size: 0.82rem; }

/* ---- MOBILE ---- */
@media (max-width: 900px) {
  .biz-info-inner { grid-template-columns: 1fr 1fr; }
  .biz-info-inner .biz-save-col { grid-column: 1 / -1; }
  .budget-grid { grid-template-columns: 1fr; }
  .be-grid { grid-template-columns: 1fr; }
  .summary-bar-inner { grid-template-columns: repeat(2, 1fr); }
  .nav-back { display: none; }
}
@media (max-width: 600px) {
  .page-hero { padding: 2rem 1.25rem; }
  .tool-wrap { padding: 1.5rem 1.25rem 3rem; }
  .biz-info-bar { padding: 1rem 1.25rem; }
  .biz-info-inner { grid-template-columns: 1fr; }
  .summary-bar { padding: 1rem 1.25rem; }
  .tab-btn { padding: 0.7rem 0.9rem; font-size: 0.7rem; }
  .save-section { flex-direction: column; align-items: flex-start; }
  .cf-input { width: 90px; }
}

/* ============================================
   PLATFORM NAV (multi-page tool navigation)
   ============================================ */
.tool-nav-links {
  display: flex;
  list-style: none;
  gap: 0;
  align-items: center;
  flex: 1;
  justify-content: center;
  margin: 0 1rem;
}
.tool-nav-link {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--mid);
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  border-radius: 3px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.tool-nav-link:hover { color: var(--rose); background: rgba(212,184,150,0.1); }
.tool-nav-link.active { color: var(--rose); background: rgba(212,184,150,0.15); }

/* ============================================
   DASHBOARD CARDS
   ============================================ */
.tool-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.tool-card {
  background: var(--white);
  border: 1px solid var(--champ-light);
  border-radius: 4px;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-decoration: none;
  transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
}
.tool-card:hover {
  box-shadow: 0 8px 28px rgba(201,144,122,0.14);
  transform: translateY(-3px);
  border-color: var(--rose-light);
}
.tool-card-cta-card {
  background: var(--rose);
  border-color: var(--rose);
}
.tool-card-cta-card .tool-card-title,
.tool-card-cta-card .tool-card-desc { color: rgba(255,255,255,0.9); }
.tool-card-icon { font-size: 1.8rem; }
.tool-card-title {
  font-family: 'Cormorant Garant', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-top: 0.25rem;
}
.tool-card-desc { font-size: 0.85rem; color: var(--mid); line-height: 1.6; flex: 1; }
.tool-card-cta {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rose);
  margin-top: 0.75rem;
}

/* ============================================
   INVOICE STYLES
   ============================================ */
.inv-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.inv-summary-bar {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}
.inv-stat { display: flex; flex-direction: column; gap: 0.2rem; }
.inv-stat-label { font-size: 0.7rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--subtle); }
.inv-stat-val { font-family: 'Cormorant Garant', serif; font-size: 1.5rem; font-weight: 600; color: var(--charcoal); }

.status-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 2px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.badge-draft   { background: var(--silver-light); color: var(--mid); }
.badge-sent    { background: #EBF3FF; color: #1A56DB; }
.badge-paid    { background: var(--green-bg); color: var(--green); }
.badge-overdue { background: var(--red-bg); color: var(--red); }

.btn-xs {
  padding: 0.25rem 0.6rem;
  font-size: 0.68rem;
  border-radius: 2px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}
.btn-xs.btn-outline { background: transparent; color: var(--rose); border: 1px solid var(--rose); }
.btn-xs.btn-outline:hover { background: var(--rose); color: white; }
.btn-xs.btn-ghost { background: transparent; color: var(--mid); border: 1px solid var(--silver-light); }
.btn-xs.btn-ghost:hover { border-color: var(--silver); color: var(--charcoal); }
.btn-xs.btn-success { background: var(--green); color: white; border: 1px solid var(--green); }

/* Invoice paper */
.invoice-paper {
  background: var(--white);
  border: 1px solid var(--champ-light);
  border-radius: 4px;
  padding: 2.5rem;
  margin-bottom: 1.5rem;
}
.inv-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  gap: 2rem;
}
.inv-logo-name {
  font-family: 'Cormorant Garant', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 0.4rem;
}
.inv-from-details { font-size: 0.82rem; color: var(--mid); line-height: 1.7; }
.inv-title-word {
  font-family: 'Cormorant Garant', serif;
  font-size: 2.2rem;
  font-weight: 300;
  letter-spacing: 0.15em;
  color: var(--rose);
  text-align: right;
  margin-bottom: 0.75rem;
}
.inv-meta-grid {
  display: grid;
  grid-template-columns: auto auto;
  gap: 0.2rem 1rem;
  text-align: right;
  font-size: 0.82rem;
}
.inv-meta-label { color: var(--subtle); }
.inv-meta-val { color: var(--charcoal); font-weight: 500; }

.inv-bill-to { margin-bottom: 1.75rem; }
.inv-bill-label { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--rose); margin-bottom: 0.4rem; }
.inv-bill-name { font-size: 1rem; font-weight: 600; color: var(--charcoal); margin-bottom: 0.3rem; }
.inv-bill-details { font-size: 0.82rem; color: var(--mid); line-height: 1.7; }

.inv-items-table { margin-top: 0.5rem; }
.inv-items-table thead tr { background: var(--bg-alt); }

.inv-totals {
  margin-top: 1rem;
  margin-left: auto;
  width: 280px;
}
.inv-totals-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--bg-alt);
  font-size: 0.88rem;
  color: var(--mid);
}
.inv-totals-total {
  font-weight: 700;
  font-size: 1rem;
  color: var(--charcoal);
  border-bottom: 2px solid var(--champ-light);
  border-top: 2px solid var(--champ-light);
  padding: 0.6rem 0;
}
.inv-notes-area {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--champ-light);
  font-size: 0.82rem;
  color: var(--mid);
  white-space: pre-wrap;
}

/* Invoice form */
.invoice-edit-form { border-top: 1px solid var(--champ-light); padding-top: 1.5rem; }
.inv-form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.form-group-sm { margin-bottom: 0.85rem; }
.form-group-sm label {
  display: block;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--subtle);
  margin-bottom: 0.3rem;
}
.form-group-sm input,
.form-group-sm select {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--champ-light);
  border-radius: 2px;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  color: var(--charcoal);
  background: var(--bg);
  outline: none;
  transition: border-color 0.2s;
}
.form-group-sm input:focus,
.form-group-sm select:focus { border-color: var(--rose); background: var(--white); }

/* ============================================
   TAX STYLES
   ============================================ */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
}
.comparison-table th {
  background: var(--bg-alt);
  padding: 0.7rem 1rem;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  border-bottom: 2px solid var(--champ-light);
}
.comparison-table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--bg-alt);
  color: var(--charcoal);
}
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table tbody tr:hover { background: var(--bg); }
.ct-highlight { background: var(--champ-light) !important; }
.ct-highlight td { font-weight: 600; }

.key-dates-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.key-date-card {
  background: var(--white);
  border: 1px solid var(--champ-light);
  border-radius: 4px;
  padding: 1.25rem;
  border-left: 4px solid var(--champagne);
}
.key-date-card.kd-urgent { border-left-color: var(--red); }
.key-date-card.kd-soon   { border-left-color: #E08A2A; }
.key-date-card.kd-ok     { border-left-color: var(--green); }
.key-date-card.kd-past   { opacity: 0.55; }
.kd-type { font-size: 0.65rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.3rem; }
.kd-date { font-family: 'Cormorant Garant', serif; font-size: 1.15rem; font-weight: 600; color: var(--charcoal); margin-bottom: 0.4rem; }
.kd-label { font-size: 0.82rem; color: var(--mid); line-height: 1.5; margin-bottom: 0.5rem; }
.kd-urgency { font-size: 0.72rem; font-weight: 600; color: var(--subtle); }
.key-date-card.kd-urgent .kd-urgency { color: var(--red); }
.key-date-card.kd-soon   .kd-urgency { color: #E08A2A; }
.key-date-card.kd-ok     .kd-urgency { color: var(--green); }

.key-date-mini {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--bg-alt);
  color: var(--mid);
}
.key-date-mini strong { color: var(--charcoal); }

/* Deduction rows */
.ded-row, .ded-simple-row {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--bg-alt);
}
.ded-label { font-size: 0.82rem; font-weight: 500; color: var(--charcoal); }
.ded-simple-row label { font-size: 0.82rem; font-weight: 500; color: var(--charcoal); }
.ded-inputs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--subtle);
}
.ded-inputs input {
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--champ-light);
  border-radius: 2px;
  font-size: 0.82rem;
  width: 120px;
  outline: none;
}
.ded-inputs input:focus { border-color: var(--rose); }
.ded-result {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--rose);
}

/* ============================================
   FORMATION STYLES
   ============================================ */
.formation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.formation-steps {
  list-style: none;
  counter-reset: steps;
  padding: 0;
}
.formation-steps li {
  counter-increment: steps;
  padding: 0.9rem 0 0.9rem 3rem;
  border-bottom: 1px solid var(--bg-alt);
  position: relative;
  font-size: 0.88rem;
}
.formation-steps li:last-child { border-bottom: none; }
.formation-steps li::before {
  content: counter(steps);
  position: absolute;
  left: 0;
  top: 0.9rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--champ-light);
  color: var(--rose);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
}
.formation-steps li strong { display: block; color: var(--charcoal); margin-bottom: 0.25rem; }
.formation-steps li p { margin: 0; color: var(--mid); font-size: 0.82rem; line-height: 1.5; }

.quiz-step {
  background: var(--white);
  border: 1px solid var(--champ-light);
  border-radius: 4px;
  padding: 2rem;
  max-width: 600px;
}
.quiz-step-num { font-size: 0.72rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--rose); margin-bottom: 0.5rem; }
.quiz-question { font-family: 'Cormorant Garant', serif; font-size: 1.4rem; font-weight: 600; color: var(--charcoal); margin-bottom: 1.25rem; line-height: 1.3; }
.quiz-options { display: flex; flex-direction: column; gap: 0.6rem; }
.quiz-opt {
  background: var(--bg);
  border: 1px solid var(--champ-light);
  border-radius: 3px;
  padding: 0.75rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--charcoal);
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}
.quiz-opt:hover { border-color: var(--rose); background: var(--white); color: var(--rose); }

/* ============================================
   PAYROLL STYLES
   ============================================ */
.payroll-note {
  font-size: 0.78rem;
  color: var(--subtle);
  line-height: 1.6;
  margin-top: 0.5rem;
  font-style: italic;
}

/* ============================================
   RESPONSIVE ADDITIONS
   ============================================ */
@media (max-width: 900px) {
  .tool-nav-links { display: none; justify-content: flex-start; flex-direction: column; position: absolute; top: 65px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--champ-light); padding: 1rem 2rem; gap: 0.25rem; z-index: 99; }
  .tool-nav-links.open { display: flex; }
  .nav-inner { position: relative; }
  .tool-cards-grid { grid-template-columns: 1fr 1fr; }
  .key-dates-grid { grid-template-columns: 1fr 1fr; }
  .formation-grid { grid-template-columns: 1fr; }
  .inv-form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .tool-cards-grid { grid-template-columns: 1fr; }
  .key-dates-grid { grid-template-columns: 1fr; }
  .inv-summary-bar { gap: 1rem; }
  .inv-header-row { flex-direction: column; }
  .inv-totals { width: 100%; }
}
