/* ============================================================
   IT'S THAT WEBSITE GUY — CRM Design Tokens
   Brand: Dark navy + electric purple + gold
   ============================================================ */
:root {
  --navy:          #0A0F1E;   /* page background — matches logo bg */
  --navy-mid:      #0D1B3E;   /* sidebar, dark panels */
  --navy-light:    #162040;   /* cards, elevated surfaces */
  --purple:        #5B4FD9;   /* primary accent — "It's That" script color */
  --purple-light:  #7B6FE8;   /* hover, highlights */
  --purple-dark:   #3D37B0;   /* pressed states */
  --gold:          #F5C518;   /* "GUY" text color — CTA accents */
  --gold-muted:    #C9A010;   /* gold hover/pressed */
  --white:         #FFFFFF;   /* "WEBSITE" bold text */
  --off-white:     #EDF0FA;   /* body text, readable on dark */
  --muted:         #8892B0;   /* secondary text, labels */
  --line:          #1E2D54;   /* borders, dividers */
  --success:       #27A06B;   /* launched, paid, active */
  --warning:       #F5A623;   /* staging, overdue */
  --danger:        #E05050;   /* cancelled, void */
  --info:          #3B9FD9;   /* sent, inquiry */

  --radius:        6px;
  --radius-lg:     12px;
  --shadow:        0 2px 12px rgba(0,0,0,0.4);
  --shadow-lg:     0 4px 24px rgba(0,0,0,0.6);

  --sidebar-width: 240px;
  --topbar-height: 60px;
}

/* ============ RESET & BASE ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--navy);
  color: var(--off-white);
  min-height: 100vh;
  line-height: 1.6;
}

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

img { max-width: 100%; }

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

.sidebar {
  width: var(--sidebar-width);
  background: var(--navy-mid);
  border-right: 1px solid var(--line);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

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

.topbar {
  height: var(--topbar-height);
  background: var(--navy-light);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 50;
}

.page-content {
  padding: 2rem 1.5rem;
  flex: 1;
}

/* ============ SIDEBAR BRAND ============ */
.sidebar-brand {
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--purple);
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
}

.sidebar-brand-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
}

.sidebar-brand-sub {
  font-size: 0.65rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============ SIDEBAR NAV ============ */
.sidebar-nav {
  padding: 1rem 0;
  flex: 1;
}

.nav-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 0.75rem 1rem 0.25rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  color: var(--muted);
  font-size: 0.875rem;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}

.nav-link:hover {
  color: var(--off-white);
  background: rgba(91, 79, 217, 0.1);
  border-left-color: var(--purple);
}

.nav-link.active {
  color: var(--white);
  background: rgba(91, 79, 217, 0.15);
  border-left-color: var(--purple);
}

.nav-link .icon {
  width: 18px;
  text-align: center;
  font-size: 1rem;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  color: var(--muted);
}

/* ============ TOPBAR ============ */
.topbar-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--white);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar-user {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ============ CARDS ============ */
.card {
  background: var(--navy-light);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
}

/* ============ STAT CARDS ============ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--navy-light);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--purple);
}

.stat-card.gold::before { background: var(--gold); }
.stat-card.success::before { background: var(--success); }
.stat-card.info::before { background: var(--info); }

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.4rem;
}

.stat-sub {
  font-size: 0.8rem;
  color: var(--purple-light);
  margin-top: 0.25rem;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--line);
  transition: background 0.1s;
}

tbody tr:hover {
  background: rgba(91, 79, 217, 0.06);
}

tbody td {
  padding: 0.875rem 1rem;
  color: var(--off-white);
  vertical-align: middle;
}

tbody td a {
  color: var(--off-white);
  font-weight: 500;
}

tbody td a:hover { color: var(--gold); }

/* ============ BADGES ============ */
.badge {
  display: inline-block;
  padding: 0.2em 0.65em;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.badge-lead        { background: rgba(59,159,217,0.15); color: var(--info); }
.badge-active      { background: rgba(39,160,107,0.15); color: var(--success); }
.badge-care-plan   { background: rgba(91,79,217,0.2);   color: var(--purple-light); }
.badge-completed   { background: rgba(39,160,107,0.1);  color: var(--muted); }
.badge-inactive    { background: rgba(128,128,128,0.1); color: var(--muted); }

.badge-inquiry       { background: rgba(59,159,217,0.15); color: var(--info); }
.badge-proposal-sent { background: rgba(245,198,24,0.15); color: var(--gold); }
.badge-in-progress   { background: rgba(91,79,217,0.2);   color: var(--purple-light); }
.badge-staging-review{ background: rgba(245,166,35,0.15); color: var(--warning); }
.badge-launched      { background: rgba(39,160,107,0.15); color: var(--success); }
.badge-on-hold       { background: rgba(128,128,128,0.15); color: var(--muted); }
.badge-cancelled     { background: rgba(224,80,80,0.15);  color: var(--danger); }

.badge-draft    { background: rgba(128,128,128,0.15); color: var(--muted); }
.badge-sent     { background: rgba(59,159,217,0.15);  color: var(--info); }
.badge-paid     { background: rgba(39,160,107,0.15);  color: var(--success); }
.badge-signed   { background: rgba(39,160,107,0.15);  color: var(--success); }
.badge-overdue  { background: rgba(224,80,80,0.15);   color: var(--danger); }
.badge-void     { background: rgba(128,128,128,0.1);  color: var(--muted); }
.badge-paused   { background: rgba(245,166,35,0.15);  color: var(--warning); }
.badge-new      { background: rgba(245,198,24,0.15);  color: var(--gold); }
.badge-contacted{ background: rgba(59,159,217,0.15);  color: var(--info); }
.badge-converted{ background: rgba(39,160,107,0.15);  color: var(--success); }
.badge-archived { background: rgba(128,128,128,0.1);  color: var(--muted); }

.badge-starter  { background: rgba(59,159,217,0.15);  color: var(--info); }
.badge-standard { background: rgba(91,79,217,0.2);    color: var(--purple-light); }
.badge-custom   { background: rgba(245,198,24,0.15);  color: var(--gold); }

.badge-paying-client  { background: rgba(39,160,107,0.15); color: var(--success); }
.badge-free-gift-new  { background: rgba(59,159,217,0.15); color: var(--info); }
.badge-free-gift-built{ background: rgba(91,79,217,0.2);   color: var(--purple-light); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  text-decoration: none;
  line-height: 1.4;
}

.btn-primary {
  background: var(--purple);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--purple-light);
  color: var(--white);
}

.btn-gold {
  background: var(--gold);
  color: var(--navy);
}
.btn-gold:hover {
  background: var(--gold-muted);
  color: var(--navy);
}

.btn-outline {
  background: transparent;
  color: var(--off-white);
  border: 1px solid var(--line);
}
.btn-outline:hover {
  border-color: var(--purple);
  color: var(--purple-light);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
}
.btn-danger:hover {
  opacity: 0.85;
  color: var(--white);
}

.btn-sm {
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
}

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

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

.form-full { grid-column: 1 / -1; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="url"],
input[type="password"],
select,
textarea {
  background: var(--navy-mid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--off-white);
  padding: 0.6rem 0.85rem;
  font-size: 0.875rem;
  font-family: inherit;
  width: 100%;
  transition: border-color 0.15s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(91, 79, 217, 0.15);
}

select option { background: var(--navy-mid); color: var(--off-white); }
textarea { resize: vertical; min-height: 100px; }

.checkbox-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--purple);
}

.checkbox-group label {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.875rem;
  color: var(--off-white);
  cursor: pointer;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  margin-top: 1rem;
}

/* ============ PAGE HEADER ============ */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.page-header-left h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
}

.page-header-left p {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.page-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

/* ============ FILTER BAR ============ */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.filter-bar a {
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--line);
  transition: all 0.15s;
}

.filter-bar a:hover,
.filter-bar a.active {
  background: var(--purple);
  color: var(--white);
  border-color: var(--purple);
}

.search-form {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.search-form input {
  width: 200px;
  padding: 0.35rem 0.75rem;
}

/* ============ ALERTS ============ */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  margin-bottom: 1rem;
  border-left: 4px solid;
}

.alert-error { background: rgba(224,80,80,0.1); border-color: var(--danger); color: #ff9999; }
.alert-success { background: rgba(39,160,107,0.1); border-color: var(--success); color: #80ffba; }
.alert-info { background: rgba(59,159,217,0.1); border-color: var(--info); color: #80d4ff; }

/* ============ DETAIL GRID ============ */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.detail-section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.detail-row {
  display: flex;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.detail-row .label {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-width: 130px;
  padding-top: 2px;
}

.detail-row .value {
  color: var(--off-white);
  flex: 1;
}

/* ============ SECTION DIVIDER ============ */
.section-divider {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 1.5rem 0 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}

/* ============ MINI TABLE ============ */
.mini-table { margin-top: 0.5rem; }
.mini-table table { font-size: 0.82rem; }
.mini-table thead th { padding: 0.5rem 0.75rem; }
.mini-table tbody td { padding: 0.6rem 0.75rem; }

/* ============ EMPTY STATE ============ */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
}

.empty-state .icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.empty-state p { font-size: 0.875rem; }

/* ============ LOGIN PAGE ============ */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  background-image: radial-gradient(ellipse at 50% 0%, rgba(91,79,217,0.15) 0%, transparent 70%);
}

.login-card {
  background: var(--navy-light);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}

.login-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.login-logo img {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px solid var(--purple);
}

.login-logo h1 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--white);
  margin-top: 0.75rem;
}

.login-logo p {
  font-size: 0.75rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.2rem;
}

/* ============ CONTRACT PRINT ============ */
@media print {
  .sidebar, .topbar, .page-actions, .btn, .form-actions { display: none !important; }
  .main-content { margin-left: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; }
  body { background: white; color: black; }
  .contract-print-body { font-family: Georgia, serif; color: #111; line-height: 1.7; }
  .contract-print-body h1, .contract-print-body h2 { color: #000; }
  .contract-section { margin-bottom: 1.5rem; page-break-inside: avoid; }
}

.contract-preview {
  background: white;
  color: #111;
  border-radius: var(--radius-lg);
  padding: 2rem;
  font-family: Georgia, 'Times New Roman', serif;
  line-height: 1.7;
  max-width: 800px;
}

.contract-preview h1 {
  font-size: 1.3rem;
  text-align: center;
  color: #000;
  margin-bottom: 0.25rem;
}

.contract-preview .contract-subtitle {
  text-align: center;
  color: #444;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.contract-preview h2 {
  font-size: 1rem;
  font-weight: bold;
  color: #111;
  margin: 1.5rem 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #ccc;
  padding-bottom: 0.25rem;
}

.contract-preview p { margin-bottom: 0.75rem; color: #222; font-size: 0.9rem; }
.contract-preview ul { margin: 0.5rem 0 0.75rem 1.5rem; color: #222; font-size: 0.9rem; }
.contract-preview li { margin-bottom: 0.35rem; }

.contract-sig-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid #111;
}

.sig-line {
  border-bottom: 1px solid #555;
  margin: 2rem 0 0.25rem;
  height: 1px;
}

.sig-label { font-size: 0.8rem; color: #555; }

/* ============ MRR HIGHLIGHT ============ */
.mrr-highlight {
  background: linear-gradient(135deg, rgba(91,79,217,0.2), rgba(245,198,24,0.1));
  border: 1px solid var(--purple);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.mrr-highlight .mrr-value {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--gold);
}

.mrr-highlight .mrr-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ============ PUBLIC FORM ============ */
.public-page {
  min-height: 100vh;
  background: var(--navy);
  background-image: radial-gradient(ellipse at 50% 0%, rgba(91,79,217,0.12) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1rem;
}

.public-card {
  background: var(--navy-light);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 100%;
  max-width: 600px;
  box-shadow: var(--shadow-lg);
}

.public-header {
  text-align: center;
  margin-bottom: 2rem;
}

.public-header img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--purple);
  margin-bottom: 1rem;
}

.public-header h1 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--white);
}

.public-header p {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 0.4rem;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .main-content { margin-left: 0; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .contract-sig-block { grid-template-columns: 1fr; }
}

/* ============================================================
   INVOICE STYLES
   ============================================================ */
.invoice-total-field {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold);
}

.line-items-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.line-item-row {
  display: grid;
  grid-template-columns: 1fr 80px 100px 110px 36px;
  gap: 0.5rem;
  align-items: end;
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
}

.line-item-row .form-group { margin: 0; }
.li-remove { align-self: flex-end; margin-bottom: 0; }

.invoice-totals {
  border-top: 1px solid var(--border);
  margin-top: 1rem;
  padding-top: 0.75rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.4rem;
  width: 100%;
}

.invoice-total-row {
  display: flex;
  gap: 2rem;
  justify-content: flex-end;
  color: var(--text-secondary);
  font-size: 0.9rem;
  min-width: 240px;
}

.invoice-total-row span:last-child {
  min-width: 80px;
  text-align: right;
}

.invoice-total-final {
  color: var(--white);
  font-size: 1.1rem;
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
  margin-top: 0.25rem;
}

/* ============================================================
   STATUS BANNER
   ============================================================ */
.status-banner {
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  border: 1px solid var(--border);
}
.status-banner.status-paid     { background: rgba(16,185,129,0.12); color: var(--success); border-color: rgba(16,185,129,0.3); }
.status-banner.status-overdue  { background: rgba(239,68,68,0.12); color: var(--danger);  border-color: rgba(239,68,68,0.3); }
.status-banner.status-sent     { background: rgba(59,130,246,0.12); color: #60a5fa;        border-color: rgba(59,130,246,0.3); }
.status-banner.status-draft    { background: rgba(245,197,24,0.08); color: var(--gold);    border-color: rgba(245,197,24,0.2); }
.status-banner.status-void     { background: var(--navy-light); color: var(--text-muted); }

/* ============================================================
   CARE PLAN DETAIL - MRR HIGHLIGHT CARD
   ============================================================ */
.mrr-highlight-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: linear-gradient(135deg, var(--navy-light), rgba(91,79,217,0.15));
  border: 1px solid var(--purple);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.mrr-icon { font-size: 2rem; }

.mrr-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.mrr-amount {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gold);
}

.mrr-amount span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}

.mrr-status-pill {
  margin-left: auto;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.mrr-status-pill.status-active   { background: rgba(16,185,129,0.2); color: var(--success); }
.mrr-status-pill.status-paused   { background: rgba(245,197,24,0.15); color: var(--gold); }
.mrr-status-pill.status-cancelled{ background: rgba(239,68,68,0.15); color: var(--danger); }

/* ============================================================
   DANGER ZONE
   ============================================================ */
.danger-zone {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 8px;
  background: rgba(239,68,68,0.04);
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* ============================================================
   DETAIL HELPERS
   ============================================================ */
.detail-section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  margin-top: 0;
}

.text-success { color: var(--success); }
.text-muted   { color: var(--text-muted); }

/* ============================================================
   ALERT
   ============================================================ */
.alert {
  padding: 0.85rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.alert-danger {
  background: rgba(239,68,68,0.12);
  border: 1px solid rgba(239,68,68,0.3);
  color: var(--danger);
}

/* ============================================================
   ADDITIONAL BADGE COLORS
   ============================================================ */
.badge-info    { background: rgba(59,130,246,0.15); color: #60a5fa; }
.badge-neutral { background: var(--navy-light); color: var(--text-muted); border: 1px solid var(--border); }

/* ============================================================
   INVOICE PRINT ROUTE — Invoice detail page print support
   ============================================================ */
@media print {
  .sidebar, .topbar, .page-header .action-group, .danger-zone { display: none !important; }
  .app-layout { display: block; }
  .main-content { margin: 0; padding: 0; }
  .page-content { padding: 0; }
  body { background: white; color: black; }
}

/* ============================================================
   CLICKABLE ROWS & ROW ACTIONS
   ============================================================ */
.clickable-row:hover {
  background: rgba(91, 79, 217, 0.08) !important;
}

.row-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: nowrap;
}

.row-actions form {
  margin: 0;
  padding: 0;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  white-space: nowrap;
}

.btn-danger:hover {
  background: rgba(239, 68, 68, 0.3);
  color: #fff;
}
