/* --------------------------------------------------------------------------
   🌲 SECTORALMARKETING ENTERPRISE FOREST EMERALD DESIGN SYSTEM v13.0
   B2B Outreach, Deliverability, Trust & Growth Identity
   Inspired by Brevo, ActiveCampaign, Wise & High-Trust B2B Enterprise
   -------------------------------------------------------------------------- */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* --- FOREST EMERALD & MINERAL CORPORATE PALETTE --- */
  --bg-primary: #F4F7F4;        /* Warm Mineral Sage Off-White */
  --bg-surface: #FFFFFF;        /* Pure Crisp White Surface */
  --bg-surface-hover: #EBF2EC;  /* Soft Emerald Tint Hover */
  --bg-surface-active: #D8E6DA; /* Active Element Tint */
  --bg-glass: rgba(255, 255, 255, 0.94);

  --border-color: #E0E8E1;      /* Soft Sage Border */
  --border-subtle: #EEF4EF;     /* Subtlest Divider */
  --border-hover: #BCD4BF;      /* Crisp Emerald Border Hover */

  --text-primary: #0A2118;      /* Deep Forest Pine / Midnight */
  --text-secondary: #3B5247;    /* Slate Pine Body */
  --text-muted: #5E786B;        /* Muted Pine Caption */
  --text-inverse: #FFFFFF;

  --brand-primary: #047857;     /* Enterprise Forest Emerald */
  --brand-primary-hover: #065F46;
  --brand-dark: #022C22;        /* Deep Obsidian Pine */
  --brand-accent: #059669;      /* Bright Growth Mint */
  
  --accent-emerald: #059669;    /* Deliverability Emerald */
  --accent-emerald-bg: #E6F4EA;
  --accent-blue: #0284C7;
  --accent-blue-bg: #F0F9FF;
  --accent-amber: #D97706;
  --accent-amber-bg: #FEF3C7;
  --accent-rose: #E11D48;
  --accent-rose-bg: #FFE4E6;

  /* --- TYPOGRAPHY SCALE --- */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* --- 8PT GRID SPACING --- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* --- RADIUS TOKENS (SQUIRCLE) --- */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  /* --- SHADOWS --- */
  --shadow-sm: 0 1px 3px 0 rgba(10, 33, 24, 0.04), 0 1px 2px -1px rgba(10, 33, 24, 0.03);
  --shadow-md: 0 4px 14px -2px rgba(10, 33, 24, 0.07), 0 2px 6px -1px rgba(10, 33, 24, 0.03);
  --shadow-lg: 0 12px 32px -4px rgba(10, 33, 24, 0.09), 0 4px 12px -2px rgba(10, 33, 24, 0.03);

  --transition-fast: 120ms ease;
  --transition-normal: 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- DARK MODE OPTION (DEEP OBSIDIAN PINE) --- */
[data-theme="dark"] {
  --bg-primary: #021B14;
  --bg-surface: #06261C;
  --bg-surface-hover: #0D3628;
  --bg-surface-active: #144736;
  --bg-glass: rgba(6, 38, 28, 0.9);

  --border-color: #144736;
  --border-subtle: #092E22;
  --border-hover: #1E5E49;

  --text-primary: #F0FDF4;
  --text-secondary: #A7F3D0;
  --text-muted: #6EE7B7;
  --text-inverse: #021B14;

  --brand-primary: #10B981;
  --brand-primary-hover: #059669;
}

/* --- BASE RESET --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- HEADER & NAVIGATION --- */
.saas-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.brand-symbol {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #047857 0%, #022C22 100%);
  color: #FFFFFF;
  border-radius: var(--radius-xs);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(4, 120, 87, 0.3);
}

.workspace-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.cmd-search-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px 12px;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  width: 240px;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.cmd-search-btn:hover {
  border-color: var(--border-hover);
  color: var(--text-secondary);
}

.cmd-kbd {
  margin-left: auto;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1px 5px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}

/* --- SIDEBAR --- */
.saas-sidebar {
  position: fixed;
  top: 56px; left: 0; bottom: 0;
  width: 230px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 90;
  /* More menu items than the window is tall must scroll, not be cut off. */
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Without this the flex column squeezes its children to fit instead of overflowing. */
.saas-sidebar > * {
  flex-shrink: 0;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 18px 0 8px 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: all var(--transition-fast);
  margin-bottom: 2px;
}

.nav-item i, .nav-item svg {
  font-size: 14px;
  width: 18px;
  text-align: center;
  color: var(--text-muted);
}

.nav-item:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-emerald-bg);
  color: var(--brand-primary);
  font-weight: 600;
}

.nav-item.active i {
  color: var(--brand-primary);
}

.sidebar-quota-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
}

.quota-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.quota-progress {
  height: 5px;
  background: var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 8px;
}

.quota-bar {
  height: 100%;
  background: var(--brand-primary);
  border-radius: var(--radius-full);
}

/* --- MAIN WORKSPACE --- */
.saas-main-container {
  margin-left: 230px;
  margin-top: 56px;
  padding: 28px;
  min-height: calc(100vh - 56px);
  background: var(--bg-primary);
}

/* --- CARDS & STATS --- */
.saas-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
}

.stat-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}

.stat-sub {
  font-size: 12px;
  color: var(--text-secondary);
}

/* --- BUTTON SYSTEM --- */
.btn-saas {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-primary-saas {
  background: var(--brand-primary);
  color: #FFFFFF;
  border-color: var(--brand-primary);
  box-shadow: 0 2px 8px rgba(4, 120, 87, 0.25);
}

.btn-primary-saas:hover {
  background: var(--brand-primary-hover);
  border-color: var(--brand-primary-hover);
}

.btn-secondary-saas {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-secondary-saas:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-hover);
}

/* --- DATA TABLES --- */
.table-responsive-saas {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  box-shadow: var(--shadow-sm);
}

.saas-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.saas-table th {
  background: var(--bg-primary);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
}

.saas-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.saas-table tr:hover td {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}

.status-pill.success {
  background: var(--accent-emerald-bg);
  color: var(--accent-emerald);
}

.status-pill.warning {
  background: var(--accent-amber-bg);
  color: var(--accent-amber);
}

/* --- FOREST LANDING PAGE STYLES --- */
.landing-body {
  background: #F4F7F4;
  color: #0A2118;
}

.landing-hero {
  padding: 120px 20px 80px;
  text-align: center;
  max-width: 960px;
  margin: 0 auto;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: #E6F4EA;
  border: 1px solid #A7F3D0;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: #047857;
  margin-bottom: 24px;
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #0A2118;
  margin-bottom: 20px;
}

.hero-subtitle {
  font-size: 18px;
  color: #3B5247;
  max-width: 680px;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 56px;
}

.hero-table-preview {
  background: #FFFFFF;
  border: 1px solid #E0E8E1;
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-lg);
  text-align: left;
}

.grid-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1140px;
  margin: 0 auto;
  padding: 80px 20px;
}

.feature-box {
  background: #FFFFFF;
  border: 1px solid #E0E8E1;
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
}

.feature-box:hover {
  border-color: #BCD4BF;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-box h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #0A2118;
}

.feature-box p {
  font-size: 14px;
  color: #3B5247;
  line-height: 1.6;
}

/* --- COMMAND PALETTE OVERLAY --- */
.cmd-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 33, 24, 0.35);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 100px;
}

.cmd-overlay.open {
  display: flex;
}

.cmd-modal {
  width: 100%;
  max-width: 560px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.cmd-input-wrap {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
}

.cmd-input-wrap input {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  font-family: var(--font-sans);
}

/* ==========================================================================
   SAAS COMPONENT SYSTEM (Forms, Grid, Cards, Buttons, Utilities)
   Ensures seamless, premium appearance across all pages and legacy forms
   ========================================================================== */

/* --- GRID SYSTEM --- */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -10px;
  margin-right: -10px;
}

[class*="col-"] {
  width: 100%;
  padding-left: 10px;
  padding-right: 10px;
  box-sizing: border-box;
}

.col-12 { width: 100%; flex: 0 0 100%; }
.col-6 { width: 50%; flex: 0 0 50%; }
.col-4 { width: 33.333333%; flex: 0 0 33.333333%; }
.col-3 { width: 25%; flex: 0 0 25%; }

@media (min-width: 768px) {
  .col-md-1  { width: 8.333333%;  flex: 0 0 8.333333%; }
  .col-md-2  { width: 16.666667%; flex: 0 0 16.666667%; }
  .col-md-3  { width: 25%;        flex: 0 0 25%; }
  .col-md-4  { width: 33.333333%; flex: 0 0 33.333333%; }
  .col-md-5  { width: 41.666667%; flex: 0 0 41.666667%; }
  .col-md-6  { width: 50%;        flex: 0 0 50%; }
  .col-md-7  { width: 58.333333%; flex: 0 0 58.333333%; }
  .col-md-8  { width: 66.666667%; flex: 0 0 66.666667%; }
  .col-md-9  { width: 75%;        flex: 0 0 75%; }
  .col-md-10 { width: 83.333333%; flex: 0 0 83.333333%; }
  .col-md-11 { width: 91.666667%; flex: 0 0 91.666667%; }
  .col-md-12 { width: 100%;       flex: 0 0 100%; }

  .offset-md-1 { margin-left: 8.333333%; }
  .offset-md-2 { margin-left: 16.666667%; }
  .offset-md-3 { margin-left: 25%; }
}

@media (min-width: 992px) {
  .col-lg-3 { width: 25%; flex: 0 0 25%; }
  .col-lg-4 { width: 33.333333%; flex: 0 0 33.333333%; }
  .col-lg-6 { width: 50%; flex: 0 0 50%; }
  .col-lg-8 { width: 66.666667%; flex: 0 0 66.666667%; }
}

/* --- FORMS SYSTEM --- */
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.form-control,
.form-select {
  display: block;
  width: 100%;
  padding: 9px 13px;
  font-size: 13px;
  font-family: var(--font-sans);
  color: var(--text-primary);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  outline: none;
  box-sizing: border-box;
  line-height: 1.5;
}

.form-control::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.14);
}

.form-control[disabled],
.form-select[disabled],
.form-control:disabled,
.form-select:disabled {
  background-color: var(--bg-primary);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.7;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%235E786B' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 10px;
  padding-right: 32px;
  cursor: pointer;
}

.form-text {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 5px;
}

.input-group {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.input-group > .form-control,
.input-group > .form-select {
  position: relative;
  flex: 1 1 auto;
  width: 1%;
  min-width: 0;
}

.input-group > :not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-group > :not(:first-child) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  margin-left: -1px;
}

.input-group-text {
  display: flex;
  align-items: center;
  padding: 9px 13px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

/* --- CARDS & PANELS --- */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 20px;
  transition: all var(--transition-fast);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: 14px 20px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header.bg-white {
  background: var(--bg-surface) !important;
}

.card-header.bg-primary {
  background: var(--brand-primary) !important;
  color: #FFFFFF !important;
  border-bottom: none;
}

.card-header.bg-info {
  background: var(--accent-blue) !important;
  color: #FFFFFF !important;
  border-bottom: none;
}

.card-body {
  padding: 20px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.card-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.card-footer {
  padding: 12px 20px;
  background: var(--bg-primary);
  border-top: 1px solid var(--border-color);
}

/* --- BUTTON SYSTEM EXTENSION --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-sans);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1.4;
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--brand-primary);
  color: #FFFFFF;
  border-color: var(--brand-primary);
  box-shadow: 0 2px 8px rgba(4, 120, 87, 0.25);
}

.btn-primary:hover {
  background: var(--brand-primary-hover);
  border-color: var(--brand-primary-hover);
  color: #FFFFFF;
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.btn-success {
  background: #059669;
  color: #FFFFFF;
  border-color: #059669;
}

.btn-success:hover {
  background: #047857;
  border-color: #047857;
  color: #FFFFFF;
}

.btn-danger {
  background: #DC2626;
  color: #FFFFFF;
  border-color: #DC2626;
}

.btn-danger:hover {
  background: #B91C1C;
  border-color: #B91C1C;
  color: #FFFFFF;
}

.btn-warning {
  background: #D97706;
  color: #FFFFFF;
  border-color: #D97706;
}

.btn-warning:hover {
  background: #B45309;
  border-color: #B45309;
  color: #FFFFFF;
}

.btn-info {
  background: #0284C7;
  color: #FFFFFF;
  border-color: #0284C7;
}

.btn-info:hover {
  background: #0369A1;
  border-color: #0369A1;
  color: #FFFFFF;
}

.btn-outline-primary {
  background: transparent;
  color: var(--brand-primary);
  border-color: var(--brand-primary);
}

.btn-outline-primary:hover {
  background: var(--brand-primary);
  color: #FFFFFF;
}

.btn-outline-secondary {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border-color);
}

.btn-outline-secondary:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.btn-outline-success {
  background: transparent;
  color: #059669;
  border-color: #059669;
}

.btn-outline-success:hover {
  background: #059669;
  color: #FFFFFF;
}

.btn-outline-danger {
  background: transparent;
  color: #DC2626;
  border-color: #DC2626;
}

.btn-outline-danger:hover {
  background: #DC2626;
  color: #FFFFFF;
}

.btn-outline-warning {
  background: transparent;
  color: #D97706;
  border-color: #D97706;
}

.btn-outline-warning:hover {
  background: #D97706;
  color: #FFFFFF;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 11px;
  border-radius: var(--radius-xs);
}

.btn-lg {
  padding: 12px 24px;
  font-size: 15px;
  border-radius: var(--radius-md);
}

.btn-group {
  display: inline-flex;
}

.btn-group > .btn:not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.btn-group > .btn:not(:first-child) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  margin-left: -1px;
}

/* --- BADGES & STATUS --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.bg-primary { background-color: var(--brand-primary) !important; color: #FFFFFF !important; }
.bg-secondary { background-color: var(--text-muted) !important; color: #FFFFFF !important; }
.bg-success { background-color: #059669 !important; color: #FFFFFF !important; }
.bg-danger { background-color: #DC2626 !important; color: #FFFFFF !important; }
.bg-warning { background-color: #D97706 !important; color: #FFFFFF !important; }
.bg-info { background-color: #0284C7 !important; color: #FFFFFF !important; }
.bg-light { background-color: var(--bg-primary) !important; color: var(--text-primary) !important; border: 1px solid var(--border-color); }

/* --- ALERTS & NOTIFICATIONS --- */
.alert {
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-primary {
  background: var(--accent-emerald-bg);
  border: 1px solid #A7F3D0;
  color: var(--brand-primary);
}

.alert-info {
  background: #F0F9FF;
  border: 1px solid #BAE6FD;
  color: #0369A1;
}

.alert-success {
  background: #E6F4EA;
  border: 1px solid #A7F3D0;
  color: #047857;
}

.alert-danger {
  background: #FEE2E2;
  border: 1px solid #FECACA;
  color: #991B1B;
}

.alert-warning {
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  color: #92400E;
}

/* --- PROGRESS BARS --- */
.progress {
  display: flex;
  height: 8px;
  overflow: hidden;
  font-size: 10px;
  background-color: var(--border-color);
  border-radius: var(--radius-full);
}

.progress-bar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  background-color: var(--brand-primary);
  transition: width 0.4s ease;
}

.progress-bar-striped {
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
  background-size: 1rem 1rem;
}

.progress-bar-animated {
  animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
  0% { background-position-x: 1rem; }
}

/* --- TABLES --- */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th, .table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}

.table th {
  color: var(--text-primary);
  font-weight: 600;
  width: 25%;
}

.table-sm th, .table-sm td {
  padding: 8px 12px;
}

/* --- SPACING & FLEX UTILITIES --- */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 4px !important; }
.mb-2 { margin-bottom: 8px !important; }
.mb-3 { margin-bottom: 16px !important; }
.mb-4 { margin-bottom: 24px !important; }
.mt-1 { margin-top: 4px !important; }
.mt-2 { margin-top: 8px !important; }
.mt-3 { margin-top: 16px !important; }
.mt-4 { margin-top: 24px !important; }
.me-1 { margin-right: 4px !important; }
.me-2 { margin-right: 8px !important; }
.me-3 { margin-right: 16px !important; }
.ms-1 { margin-left: 4px !important; }
.ms-2 { margin-left: 8px !important; }
.ms-3 { margin-left: 16px !important; }

.py-1 { padding-top: 4px !important; padding-bottom: 4px !important; }
.py-2 { padding-top: 8px !important; padding-bottom: 8px !important; }
.py-3 { padding-top: 16px !important; padding-bottom: 16px !important; }

.d-flex { display: flex !important; }
.d-none { display: none !important; }
.d-block { display: block !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-center { justify-content: center !important; }
.align-items-center { align-items: center !important; }
.flex-wrap { flex-wrap: wrap !important; }
.gap-1 { gap: 4px !important; }
.gap-2 { gap: 8px !important; }
.gap-3 { gap: 16px !important; }
.w-100 { width: 100% !important; }

.text-primary { color: var(--brand-primary) !important; }
.text-danger { color: #DC2626 !important; }
.text-success { color: #059669 !important; }
.text-warning { color: #D97706 !important; }
.text-muted { color: var(--text-muted) !important; }
.text-white { color: #FFFFFF !important; }
.small { font-size: 11px !important; }

/* --- SUMMERNOTE OVERRIDES FOR CLEAN SAAS THEME --- */
.note-editor.note-air, .note-editor.note-frame {
  border: 1px solid var(--border-color) !important;
  border-radius: var(--radius-sm) !important;
  background: var(--bg-surface) !important;
  font-family: var(--font-sans) !important;
}

.note-editor .note-toolbar {
  background: var(--bg-primary) !important;
  border-bottom: 1px solid var(--border-color) !important;
  padding: 6px 8px !important;
}

.note-editor .note-btn {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border-color) !important;
  color: var(--text-primary) !important;
  font-size: 11px !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
}

.note-editor .note-btn:hover {
  background: var(--bg-surface-hover) !important;
  border-color: var(--border-hover) !important;
}

.note-editor .note-editable {
  background: var(--bg-surface) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-sans) !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
  padding: 16px !important;
}
