/* Component Styles - Reusable UI components */
/* This file contains styles for buttons, cards, forms, and other UI components */

/* Import base styles */
@import url('./base.css');

/* Sidebar Navigation */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  width: 255px;
  border-right: 1px solid rgba(226, 232, 240, 0.6);
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 24px 24px 1px 24px;
  height: 89px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  box-sizing: border-box;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  text-decoration: none;
}

.sidebar-logo-icon {
  width: 32px;
  height: 32px;
  /*background: #6366f1;*/
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.sidebar-logo-text {
  display: flex;
  flex-direction: column;
  height: 40px;
}

.sidebar-logo-title {
  font-family: 'Arimo', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: #334155;
  height: 24px;
}

.sidebar-logo-subtitle {
  font-family: 'Arimo', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  color: rgba(51, 65, 85, 0.6);
  height: 16px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  height: 48px;
  color: #334155;
  text-decoration: none;
  transition: all 0.2s ease;
  border-radius: 8px;
  font-family: 'Arimo', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  position: relative;
}

.sidebar-nav-item:hover {
  background-color: #e2e8f0;
  color: var(--color-text-primary);
}

.sidebar-nav-item.active {
  background-color: #6366f1;
  color: white;
}

.sidebar-nav-item.active .sidebar-nav-icon-img {
  filter: brightness(0) invert(1) !important;
}

.sidebar-nav-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.sidebar-nav-icon-img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  filter: brightness(0) saturate(100%) invert(27%) sepia(8%) saturate(1084%) hue-rotate(182deg) brightness(95%) contrast(87%);
}

.sidebar-nav-icon-svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #334155;
}

.sidebar-nav-item.active .sidebar-nav-icon-svg {
  color: white;
}

.sidebar-chevron {
  width: 16px;
  height: 16px;
  margin-left: auto;
  transition: transform 0.2s ease;
}

.sidebar-footer {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid rgba(226, 232, 240, 0.6);
  box-sizing: border-box;
  position: relative;
}

/* Account toggle needs higher stacking context */
.sidebar-account-toggle {
  position: relative;
  z-index: 10;
}
#accountSubmenu {
    position: absolute;
    bottom: 60px;       /* adjust so it sits above Account toggle */
    left: 40px;
    width: 80%;
    background: white;
    z-index: 1000;
    border-top: 1px solid #e5e7eb;
}


.main-content {
  margin-left: 255px;
  min-height: 100vh;
  padding: var(--spacing-xl);
  width: calc(100vw - 255px);
}

/* Layout adjustments for sidebar */
.app-layout {
  display: flex;
}

/* Metric Cards - Figma Design */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  position: relative;
  overflow: hidden;
}

.metric-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--spacing-md);
}

.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

.metric-icon.purple {
  background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
}

.metric-icon.blue {
  background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
}

.metric-icon.green {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
}

.metric-icon.yellow {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
}

.metric-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-xs);
  font-weight: var(--font-weight-medium);
}

.metric-value {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-xs);
}

.metric-change {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.metric-change.positive {
  color: #10B981;
}

.metric-change.negative {
  color: #EF4444;
}

.metric-change.neutral {
  color: var(--color-text-secondary);
}

/* Charts Section - Figma Design */
.charts-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.chart-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  /*padding: var(--spacing-lg);*/
  padding: 16px;
  border-radius: 12px;

}

.chart-header {
  margin-bottom: var(--spacing-lg);
}

.chart-title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-xs);
}

.chart-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.chart-container {
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  /*border: 1px solid var(--border);*/
  border-radius: var(--radius-md);
  color: var(--muted-foreground);
  margin-top: 15px;
}

.chart-placeholder {
  text-align: center;
}

.chart-placeholder i {
  font-size: 48px;
  margin-bottom: var(--spacing-sm);
  opacity: 0.5;
}

/* Revenue Streams Legend */
.revenue-legend {
  margin-top: var(--spacing-md);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xs);
}

.legend-color {
  width: 12px;
  height: 12px;
  border-radius: 2px;
}

.legend-color.cyan { background-color: #06B6D4; }
.legend-color.orange { background-color: #F97316; }
.legend-color.green { background-color: #10B981; }
.legend-color.blue { background-color: #3B82F6; }

.legend-label {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  padding-left: 5px;
  flex: 1;
}

.legend-percentage {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  margin-left: 8px;
}

/* Settings Subsections */
.sidebar-nav-sub {
  font-size: 14px;
  padding: 0 16px;
  height: 40px;
  margin-left: 20px;
}

.sidebar-subsections {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* Account menu in footer should drop UP */
.sidebar-footer .sidebar-subsections {
  position: absolute;
  bottom: 100%;
  left: 0;
  right: 0;
  margin-bottom: 4px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
  z-index: 20;
}

/* Settings Page Styles */
.settings-container {
  display: flex;
  gap: var(--spacing-xl);
  max-width: 1200px;
  margin: 0 auto;
}

.settings-sidebar {
  width: 200px;
  flex-shrink: 0;
}

.settings-nav {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
}

.settings-nav-item {
  display: block;
  padding: var(--spacing-sm) var(--spacing-md);
  color: var(--color-text-secondary);
  text-decoration: none;
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-xs);
  transition: all var(--transition-normal);
}

.settings-nav-item:hover {
  background-color: var(--color-secondary);
  color: var(--color-text-primary);
}

.settings-nav-item.active {
  background-color: var(--color-primary);
  color: white;
}

.settings-content {
  flex: 1;
}

.settings-section {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-xl);
  margin-bottom: var(--spacing-lg);
}

.settings-section h2 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-md);
}

.settings-section h3 {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
  margin-bottom: var(--spacing-sm);
}

/* Connection Status Cards */
.connection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-xl);
}

.connection-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  position: relative;
}

.connection-header {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-md);
}

.connection-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
}

.connection-icon.stripe {
  background: linear-gradient(135deg, #635BFF 0%, #4F46E5 100%);
}

.connection-icon.quickbooks {
  background: linear-gradient(135deg, #0077C5 0%, #005A9F 100%);
}

.connection-status {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
}

.connection-status.connected {
  color: var(--color-success);
}

.connection-status.disconnected {
  color: var(--color-error);
}

.connection-actions {
  margin-top: var(--spacing-md);
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.connection-details {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin-bottom: var(--spacing-md);
}

.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 500;
  color: var(--color-text);
}

.form-control {
  width: 100%;
  padding: var(--spacing-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 14px;
}

.form-text {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: var(--spacing-xs);
}

/* Figma Metric Card - Exact Design Match */
.figma-metric-card {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  width: 100%;
  height: 100%;
  position: relative;
}

.figma-card-content {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 16px;
  height: 100%;
  border-radius: inherit;
}

.figma-icon-container {
  flex: 1 1 auto;
  min-height: 80px;
  position: relative;
  border-radius: 12px;
}

.figma-icon-wrapper {
  padding: 16px 16px 16px 16px;
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
}

.figma-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  width: 48px;
  border-radius: 12px;
  position: relative;
}

.figma-icon.purple-icon {
  background: #8b5cf6;
  color: white;
}

.figma-icon.blue-icon {
  background: #3b82f6;
  color: white;
}

.figma-icon.green-icon {
  background: #10b981;
  color: white;
}

.figma-icon.yellow-icon {
  background: #f59e0b;
  color: white;
}

.figma-icon i {
  font-size: 24px;
}

.figma-metrics-content {
  height: 76px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
}

.figma-metric-label {
  font-family: 'Arimo', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: #64748b;
  height: 20px;
  display: flex;
  align-items: flex-start;
}

.figma-metric-value {
  font-family: 'Arimo', sans-serif;
  font-weight: 400;
  font-size: 24px;
  line-height: 32px;
  color: #1a1a1a;
  height: 32px;
  display: flex;
  align-items: flex-start;
}

.figma-metric-change {
  font-family: 'Arimo', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  height: 16px;
  display: flex;
  align-items: flex-start;
}

.figma-metric-change.positive {
  color: #00a63e;
}

.figma-metric-change.negative {
  color: #dc2626;
}

.figma-metric-change.neutral {
  color: #64748b;
}

/* Button Components */
.btn {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
}

.btn:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.btn-primary {
  background-color: var(--brand-color, #635bff) !important;
  color: white !important;
  border-color: var(--brand-color, #635bff) !important;
}

.btn-primary:hover {
  background-color: #4f46e5 !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--color-text-primary);
}

.btn-secondary:hover {
  background-color: var(--color-border);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

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

.btn-sm {
  padding: var(--spacing-xs) var(--spacing-md);
  font-size: var(--font-size-xs);
}

.btn-lg {
  padding: var(--spacing-md) var(--spacing-xl);
  font-size: var(--font-size-base);
}

/* Card Components */
.card {
  background-color: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow var(--transition-normal);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: var(--spacing-lg);
  border-bottom: 1px solid var(--color-border);
  background-color: var(--color-secondary);
}

.card-body {
  padding: var(--spacing-lg);
}

.card-footer {
  padding: var(--spacing-lg);
  border-top: 1px solid var(--color-border);
  background-color: var(--color-secondary);
}

/* Form Components */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-weight: var(--font-weight-medium);
  color: var(--color-text-primary);
}

.form-input {
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: var(--font-size-base);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-background);
  transition: border-color var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input::placeholder {
  color: var(--color-text-secondary);
}

/* Navigation Components */
.navbar {
  background-color: var(--color-secondary);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar-brand {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  font-size: var(--font-size-xl);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.nav-link {
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-medium);
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--color-primary);
  background-color: rgba(99, 102, 241, 0.1);
}

/* Alert Components */
.alert {
  padding: var(--spacing-md);
  border-radius: var(--radius-md);
  margin-bottom: var(--spacing-lg);
  border-left: 4px solid;
}

.alert-success {
  background-color: rgba(16, 185, 129, 0.1);
  border-left-color: var(--color-success);
  color: #065f46;
}

.alert-warning {
  background-color: rgba(245, 158, 11, 0.1);
  border-left-color: var(--color-warning);
  color: #92400e;
}

.alert-error {
  background-color: rgba(239, 68, 68, 0.1);
  border-left-color: var(--color-error);
  color: #991b1b;
}

/* Badge Components */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--spacing-xs) var(--spacing-sm);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-sm);
}

.badge-primary {
  background-color: var(--color-primary);
  color: white;
}

.badge-secondary {
  background-color: var(--color-secondary);
  color: var(--color-text-primary);
}

.badge-success {
  background-color: var(--color-success);
  color: white;
}

.badge-warning {
  background-color: var(--color-warning);
  color: white;
}

.badge-error {
  background-color: var(--color-error);
  color: white;
}

/* Stripe Dashboard Specific Styles */
.stripe-nav {
  background: var(--primary) !important;
  border: none;
  box-shadow: var(--shadow-sm);
}

.stripe-nav .navbar-brand {
  color: white !important;
  font-weight: var(--font-weight-semibold);
}

.stripe-nav .nav-link {
  color: rgba(255, 255, 255, 0.8) !important;
  transition: color var(--transition-fast);
}

.stripe-nav .nav-link:hover,
.stripe-nav .nav-link.active {
  color: white !important;
}

/* Hi Team Card */
.hi-team-card {
  background: var(--card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
}

.hi-team-card h2 {
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

/* Month Selector */
.month-selector {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
}

.month-selector .form-select {
  width: auto;
  background: var(--input-background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
}

/* Net Revenue Card */
.net-revenue-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--chart-5) 100%);
  color: white;
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.net-revenue-label {
  font-size: 1rem;
  font-weight: var(--font-weight-medium);
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.net-revenue-value {
  font-size: 2.5rem;
  font-weight: var(--font-weight-bold);
}

/* Action Cards */
.action-card {
  background: var(--card);
  backdrop-filter: blur(4px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  height: 100%;
  transition: all var(--transition-normal);
}

.action-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.action-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.action-icon {
  font-size: 1.5rem;
}

.action-card h3 {
  font-size: 1.125rem;
  font-weight: var(--font-weight-semibold);
  color: var(--foreground);
  margin: 0;
}

.action-card p {
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.action-card .btn {
  width: 100%;
}

/* Sync Button Styling */
#quickSyncBtn {
  background: var(--primary);
  border: none;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  transition: all var(--transition-fast);
}

#quickSyncBtn:hover {
  background: var(--primary);
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Alert Styling - Stripe specific overrides */
.alert-info {
  background: rgba(59, 130, 246, 0.1);
  border-left-color: var(--chart-2);
  color: #1e40af;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .month-selector {
    flex-direction: column;
    align-items: center;
  }
  
  .month-selector .form-select {
    width: 200px;
  }
}

/* ========================================
   PAYOUTS PAGE STYLES - Figma Design
   ======================================== */

/* Page Header */
.payouts-page {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.payouts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 48px;
  margin-bottom: 32px;
}

.payouts-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.payouts-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.payouts-icon {
  width: 40px;
  height: 40px;
  background: var(--settings-icon-bg);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 20px;
}

.payouts-header h1 {
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-bold);
  font-size: 32px;
  line-height: 48px;
  color: #716f6f;
  margin: 0;
}

.btn-export-log {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-export-log:hover {
  background: var(--settings-icon-bg);
  border-color: var(--primary);
  color: var(--primary);
}

/* Payouts List */
.payouts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Payout Card */
.payout-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.payout-card-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.payout-date {
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-normal);
  font-size: 16px;
  line-height: 24px;
  color: var(--foreground);
}

.payout-synced-date {
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-normal);
  font-size: 14px;
  line-height: 20px;
  color: var(--muted-foreground);
}

.payout-badges {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Payout Badges */
.payout-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  padding: 3px 9px;
  border-radius: 6px;
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-normal);
  font-size: 12px;
  line-height: 16px;
  border: 1px solid;
}

.payout-badge.balanced {
  background: #f0fdf4;
  border-color: #b9f8cf;
  color: #008236;
}

.payout-badge.sent-to-qb {
  background: #eff6ff;
  border-color: #bedbff;
  color: #1447e6;
}

.payout-badge.unsynced {
  background: #fefce8;
  border-color: #fff085;
  color: #a65f00;
}

.payout-badge.unbalanced {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

/* Payout Card Right Side */
.payout-card-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.payout-amount {
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-normal);
  font-size: 30px;
  line-height: 36px;
  color: var(--primary);
  white-space: nowrap;
}

.payout-actions {
  display: flex;
  gap: 8px;
}

/* Payout Buttons */
.btn-view-details {
  height: 44px;
  padding: 8px 18px;
  border: 2px solid var(--primary);
  border-radius: 8px;
  background: transparent;
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-normal);
  font-size: 16px;
  line-height: 24px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
  white-space: nowrap;
}

.btn-view-details:hover {
  background-color: rgba(99, 102, 241, 0.05);
}

.btn-view-details i {
  font-size: 16px;
}

.btn-send-to-qb {
  height: 44px;
  padding: 8px 16px;
  background: #a1e2af;
  border: none;
  border-radius: 8px;
  font-family: var(--font-family-primary);
  font-weight: var(--font-weight-normal);
  font-size: 16px;
  line-height: 24px;
  color: #151414;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.btn-send-to-qb:hover {
  background-color: #8fd89f;
}

.btn-send-to-qb i {
  font-size: 16px;
  flex-shrink: 0;
}

/* Empty State */
.payouts-empty {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 48px 25px;
  text-align: center;
}

.payouts-empty p {
  font-family: var(--font-family-primary);
  font-size: 14px;
  line-height: 20px;
  color: var(--muted-foreground);
  margin: 0;
}

/* ========================================
   MOBILE HAMBURGER MENU
   ======================================== */

/* Mobile header bar - only visible on mobile */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: #FEFEFF;
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
  z-index: 1001;
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.mobile-header-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.mobile-header-logo-icon {
  width: 32px;
  height: 32px;
  background: #6366f1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-header-logo-img {
  width: 20px;
  height: 20px;
}

.mobile-header-logo-text {
  font-family: 'Arimo', sans-serif;
  font-weight: 500;
  font-size: 16px;
  color: #334155;
}

/* Hamburger button - hidden on desktop */
.hamburger-btn {
  display: none;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.3s ease;
  padding: 0;
}

.hamburger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: #334155;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-btn.active span:nth-child(2) {
  opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-overlay.active {
  opacity: 1;
}

/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

@media (max-width: 768px) {
  /* Show mobile header bar */
  .mobile-header {
    display: flex;
  }
  
  /* Show hamburger button on mobile */
  .hamburger-btn {
    display: flex;
  }
  
  /* Hide sidebar by default on mobile */
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
    padding-top: 60px; /* Add padding to account for mobile header */
  }
  
  /* Hide sidebar header on mobile */
  .sidebar-header {
    display: none;
  }
  
  /* Show sidebar when active */
  .sidebar.active {
    transform: translateX(0);
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
  }
  
  /* Show overlay when sidebar is active */
  .mobile-overlay {
    display: block;
  }
  
  /* Adjust main content for mobile - add top padding for fixed header */
  .main-content {
    margin-left: 0;
    width: 100vw;
    padding: 76px 16px 16px 16px;
  }
  
  /* Metrics grid - single column on mobile */
  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
  }
  
  /* Charts section - stack vertically on mobile */
  .charts-section {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 20px;
  }
  
  /* Adjust chart height for mobile */
  .chart-container {
    height: 250px;
  }
  
  /* Dashboard container padding */
  .dashboard-container {
    padding: 16px !important;
  }
  
  /* Payouts page mobile adjustments */
  .payouts-page {
    padding: 16px;
    gap: 20px;
  }
  
  .payouts-header {
    flex-direction: column;
    align-items: flex-start;
    height: auto;
    gap: 16px;
  }
  
  .payouts-header-left,
  .payouts-header-right {
    width: 100%;
  }
  
  .payouts-header h1 {
    font-size: 24px;
    line-height: 32px;
  }
  
  /* Payout card mobile layout */
  .payout-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    gap: 12px;
  }
  
  .payout-card-right {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .payout-amount {
    font-size: 24px;
    line-height: 32px;
  }
  
  .payout-actions {
    width: 100%;
    flex-direction: column;
  }
  
  .btn-view-details,
  .btn-send-to-qb {
    width: 100%;
    justify-content: center;
  }
  
  /* Connection grid mobile */
  .connection-grid {
    grid-template-columns: 1fr;
  }
  
  /* Settings container mobile */
  .settings-container {
    flex-direction: column;
    gap: var(--spacing-md);
  }
  
  .settings-sidebar {
    width: 100%;
  }
  
  /* Form adjustments */
  .form-select {
    font-size: 14px;
  }
  
  /* Button text wrapping */
  .btn {
    white-space: normal;
    text-align: center;
  }
  
  /* Dashboard header mobile adjustments */
  .dashboard-container h1 {
    font-size: 20px !important;
    line-height: 28px !important;
  }
  
  /* Month selector mobile */
  .dashboard-container .form-select {
    font-size: 13px;
    padding: 4px 8px;
    height: 28px;
  }
  
  /* Quick sync button mobile */
  #quickSyncBtn {
    font-size: 12px;
    padding: 4px 8px;
    height: 28px;
  }
  
  /* Metric card mobile adjustments */
  .figma-metric-card {
    min-height: 160px;
  }
  
  .figma-metric-value {
    font-size: 20px !important;
    line-height: 28px !important;
  }
  
  .figma-metric-label {
    font-size: 13px !important;
  }
  
  .figma-metric-change {
    font-size: 11px !important;
  }
  
  /* Chart card mobile */
  .chart-card {
    padding: 12px;
  }
  
  .chart-title {
    font-size: 16px;
  }
  
  .chart-subtitle {
    font-size: 12px;
  }
}

/* ========================================
   STRIPE PAYMENT MODAL
   ======================================== */

/* Modal Overlay */
.payment-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.payment-modal-overlay.active {
  display: flex;
  opacity: 1;
}

/* Modal Container */
.payment-modal {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Modal Header */
.payment-modal-header {
  padding: 24px 24px 16px 24px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.payment-modal-title {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.payment-modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.payment-modal-close:hover {
  background: #f1f5f9;
  color: #1a1a1a;
}

/* Modal Body */
.payment-modal-body {
  padding: 24px;
}

/* Payment Summary */
.payment-summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 24px;
}

.payment-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.payment-summary-row:last-child {
  margin-bottom: 0;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  margin-top: 4px;
}

.payment-summary-label {
  font-size: 14px;
  color: #64748b;
}

.payment-summary-value {
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
}

.payment-summary-total {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
}

/* Stripe Payment Element Container */
.stripe-payment-element {
  margin-bottom: 24px;
}

/* Payment Button */
.payment-submit-btn {
  width: 100%;
  background: #6366f1;
  color: white;
  padding: 16px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 6px rgba(99, 102, 241, 0.2);
}

.payment-submit-btn:hover:not(:disabled) {
  background: #4f46e5;
  transform: translateY(-1px);
  box-shadow: 0 6px 8px rgba(99, 102, 241, 0.3);
}

.payment-submit-btn:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
}

/* Loading Spinner */
.payment-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Error Message */
.payment-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  color: #991b1b;
  font-size: 14px;
  display: none;
}

.payment-error.active {
  display: block;
}

/* Success Message */
.payment-success {
  text-align: center;
  padding: 32px 24px;
}

.payment-success-icon {
  width: 64px;
  height: 64px;
  background: #d1fae5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: #10b981;
  font-size: 32px;
}

.payment-success-title {
  font-size: 20px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 8px 0;
}

.payment-success-message {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

/* Stripe Branding */
.stripe-branding {
  text-align: center;
  padding: 16px 24px;
  border-top: 1px solid #e2e8f0;
  font-size: 12px;
  color: #94a3b8;
}

/* Proposal Form Sections */
.form-section-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.form-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.form-section-icon {
  font-size: 20px;
  line-height: 1;
}

.form-section-title {
  font-family: 'Arimo', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0;
}

.form-field {
  margin-bottom: 20px;
}

.form-field:last-child {
  margin-bottom: 0;
}

.form-field-label {
  display: block;
  font-family: 'Arimo', sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.form-field-required {
  color: #ef4444;
}

.form-field-input,
.form-field-select,
.form-field-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-family: 'Arimo', sans-serif;
  font-size: 14px;
  background: white;
  box-sizing: border-box;
}

.form-field-textarea {
  padding: 12px;
  resize: vertical;
  line-height: 1.6;
}

.form-field-hint {
  font-family: 'Arimo', sans-serif;
  font-size: 12px;
  color: #64748b;
  margin-top: 6px;
}

.custom-fields-info {
  background: #f0f9ff;
  border-left: 3px solid #0ea5e9;
  padding: 12px 16px;
  margin-top: 8px;
  border-radius: 4px;
}

.custom-fields-info-title {
  font-family: 'Arimo', sans-serif;
  font-size: 13px;
  color: #0c4a6e;
  margin: 0 0 8px 0;
  font-weight: 600;
}

.custom-fields-variables {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.custom-field-variable {
  background: white;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 12px;
  color: #475569;
  cursor: pointer;
  font-family: 'Courier New', monospace;
  border: 1px solid #e2e8f0;
  transition: all 0.15s ease;
}

.custom-field-variable:hover {
  background: #f8fafc;
  border-color: #0ea5e9;
  color: #0ea5e9;
}

.custom-fields-info-note {
  font-family: 'Arimo', sans-serif;
  font-size: 12px;
  color: #0c4a6e;
  margin: 8px 0 0 0;
}

.payment-settings-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.info-banner {
  padding: 16px 20px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  margin-bottom: 20px;
}

.info-banner-text {
  font-size: 14px;
  color: #0369a1;
  line-height: 1.6;
  margin: 0;
  font-family: 'Arimo', sans-serif;
}

.form-actions {
  display: flex;
  gap: 12px;
}

.btn-primary {
  background: var(--primary);
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-family: 'Arimo', sans-serif;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: filter 0.15s ease;
}

.btn-primary:hover {
  filter: brightness(1.1);
}

.btn-secondary {
  display: inline-block;
  background: white;
  color: #64748b;
  padding: 10px 20px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-family: 'Arimo', sans-serif;
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-secondary:hover {
  background: #f8fafc;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .payment-modal {
    width: 95%;
    max-height: 95vh;
  }
  
  .payment-modal-header {
    padding: 20px 20px 12px 20px;
  }
  
  .payment-modal-title {
    font-size: 18px;
  }
  
  .payment-modal-body {
    padding: 20px;
  }
  
  .payment-submit-btn {
    padding: 14px;
    font-size: 15px;
  }

  .form-section-card {
    padding: 20px;
  }

  .form-actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    text-align: center;
  }
}

/* Markdown Content Styling */
.content-body h1,
.content-body h2,
.content-body h3,
.content-body h4,
.content-body h5,
.content-body h6 {
  font-family: 'Arimo', sans-serif;
  font-weight: 600;
  color: #1a1a1a;
  margin: 24px 0 12px 0;
  line-height: 1.3;
}

.content-body h1 { font-size: 28px; }
.content-body h2 { font-size: 24px; }
.content-body h3 { font-size: 20px; }
.content-body h4 { font-size: 18px; }
.content-body h5 { font-size: 16px; }
.content-body h6 { font-size: 14px; }

.content-body h1:first-child,
.content-body h2:first-child,
.content-body h3:first-child {
  margin-top: 0;
}

.content-body p {
  margin: 0 0 16px 0;
  line-height: 1.6;
}

.content-body p:last-child {
  margin-bottom: 0;
}

.content-body ul,
.content-body ol {
  margin: 16px 0;
  padding-left: 28px;
}

.content-body ul {
  list-style-type: disc;
}

.content-body ol {
  list-style-type: decimal;
}

.content-body li {
  margin-bottom: 8px;
  line-height: 1.6;
  display: list-item;
}

.content-body a {
  color: var(--primary);
  text-decoration: underline;
}

.content-body a:hover {
  opacity: 0.8;
}

.content-body strong,
.content-body b {
  font-weight: 600;
}

.content-body em,
.content-body i {
  font-style: italic;
}

.content-body code {
  background: #f1f5f9;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.content-body pre {
  background: #f1f5f9;
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 0 0 16px 0;
}

.content-body pre code {
  background: none;
  padding: 0;
}

.content-body blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 16px;
  margin: 0 0 16px 0;
  color: #64748b;
  font-style: italic;
}

.content-body hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 24px 0;
}

/* EasyMDE Fullscreen Mode - Ensure it appears above sidebar */
.EasyMDEContainer .CodeMirror-fullscreen {
  z-index: 9999 !important;
}

.editor-toolbar.fullscreen {
  z-index: 9999 !important;
}

.CodeMirror-fullscreen ~ .editor-preview-side {
  z-index: 9999 !important;
}

/* EasyMDE Preview Pane Styling */
.editor-preview,
.editor-preview-side {
  font-family: 'Arimo', sans-serif;
  padding: 16px;
  background: white;
}

.editor-preview p,
.editor-preview-side p {
  margin: 0 0 16px 0;
  line-height: 1.6;
}

.editor-preview p:last-child,
.editor-preview-side p:last-child {
  margin-bottom: 0;
}

.editor-preview ul,
.editor-preview-side ul,
.editor-preview ol,
.editor-preview-side ol {
  margin: 16px 0;
  padding-left: 28px;
}

.editor-preview ul,
.editor-preview-side ul {
  list-style-type: disc;
}

.editor-preview ol,
.editor-preview-side ol {
  list-style-type: decimal;
}

.editor-preview li,
.editor-preview-side li {
  margin-bottom: 8px;
  line-height: 1.6;
  display: list-item;
}

.editor-preview strong,
.editor-preview-side strong,
.editor-preview b,
.editor-preview-side b {
  font-weight: 600;
}

.editor-preview em,
.editor-preview-side em,
.editor-preview i,
.editor-preview-side i {
  font-style: italic;
}

.editor-preview h1,
.editor-preview-side h1,
.editor-preview h2,
.editor-preview-side h2,
.editor-preview h3,
.editor-preview-side h3 {
  font-weight: 600;
  margin: 24px 0 12px 0;
  line-height: 1.3;
}

.editor-preview h1:first-child,
.editor-preview-side h1:first-child,
.editor-preview h2:first-child,
.editor-preview-side h2:first-child,
.editor-preview h3:first-child,
.editor-preview-side h3:first-child {
  margin-top: 0;
}

/* Markdown content styling for app views */
.markdown-content p {
  margin: 0 0 16px 0;
  line-height: 1.6;
}

.markdown-content p:last-child {
  margin-bottom: 0;
}

.markdown-content ul,
.markdown-content ol {
  margin: 16px 0;
  padding-left: 28px;
}

.markdown-content ul {
  list-style-type: disc !important;
}

.markdown-content ol {
  list-style-type: decimal !important;
}

.markdown-content li {
  margin-bottom: 8px;
  line-height: 1.6;
  display: list-item !important;
}

.markdown-content strong,
.markdown-content b {
  font-weight: 600;
}

.markdown-content em,
.markdown-content i {
  font-style: italic;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
  font-weight: 600;
  margin: 24px 0 12px 0;
}

.markdown-content h1:first-child,
.markdown-content h2:first-child,
.markdown-content h3:first-child {
  margin-top: 0;
}

/* ========================================
   MODAL SYSTEM
   ======================================== */

/* Modal Container */
#modal-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

#modal-container.active {
  opacity: 1;
  pointer-events: all;
}

/* Modal Overlay */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

/* Modal Content */
.modal-content {
  position: relative;
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  max-width: 480px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

#modal-container.active .modal-content {
  transform: scale(1);
}

/* Modal Header */
.modal-header {
  padding: 24px 24px 16px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.modal-icon.danger {
  background: #fef2f2;
  color: #dc2626;
}

.modal-icon.warning {
  background: #fefce8;
  color: #f59e0b;
}

.modal-icon.info {
  background: #eff6ff;
  color: #3b82f6;
}

.modal-icon.success {
  background: #f0fdf4;
  color: #10b981;
}

.modal-title {
  font-family: 'Arimo', sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 28px;
  color: #1a1a1a;
  margin: 0;
}

/* Modal Body */
.modal-body {
  padding: 0 24px 24px 24px;
}

.modal-message {
  font-family: 'Arimo', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: #64748b;
  margin: 0;
  text-align: center;
}

/* Modal Footer */
.modal-footer {
  padding: 16px 24px 24px 24px;
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* Modal Buttons */
.modal-btn {
  flex: 1;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: 'Arimo', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  white-space: nowrap;
}

.modal-btn-secondary {
  background: white;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.modal-btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.modal-btn-danger {
  background: #dc2626;
  color: white;
}

.modal-btn-danger:hover {
  background: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.2);
}

.modal-btn-warning {
  background: #f59e0b;
  color: white;
}

.modal-btn-warning:hover {
  background: #d97706;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.2);
}

.modal-btn-info {
  background: #3b82f6;
  color: white;
}

.modal-btn-info:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.2);
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */

/* Toast Container */
#toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

/* Toast */
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  min-width: 320px;
  max-width: 420px;
  pointer-events: all;
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.3s ease;
  border-left: 4px solid;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-success {
  border-left-color: #10b981;
}

.toast-error {
  border-left-color: #dc2626;
}

.toast-info {
  border-left-color: #3b82f6;
}

.toast-warning {
  border-left-color: #f59e0b;
}

.toast-icon {
  flex-shrink: 0;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-success .toast-icon {
  color: #10b981;
}

.toast-error .toast-icon {
  color: #dc2626;
}

.toast-info .toast-icon {
  color: #3b82f6;
}

.toast-warning .toast-icon {
  color: #f59e0b;
}

.toast-message {
  flex: 1;
  font-family: 'Arimo', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: #1a1a1a;
}

.toast-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s ease;
  padding: 0;
}

.toast-close:hover {
  background: #f1f5f9;
  color: #334155;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  #toast-container {
    top: 16px;
    right: 16px;
    left: 16px;
  }

  .toast {
    min-width: auto;
    max-width: none;
  }

  .modal-content {
    width: 95%;
  }

  .modal-footer {
    flex-direction: column-reverse;
  }

  .modal-btn {
    width: 100%;
  }
}

/* ---------------------------------------------------------------------------
   Test-mode banner

   Sits in its own reserved strip at the very top rather than floating over the
   app. The sidebar and mobile header are both position:fixed at top:0, so they
   would otherwise slide underneath it and lose their first 40px -- which is why
   the sidebar logo used to disappear in test mode.
   --------------------------------------------------------------------------- */
:root {
  --test-banner-height: 40px;
}

.test-mode-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--test-banner-height);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fffbeb;
  border-bottom: 1px solid #fcd34d;
  /* Above the sidebar (1000) and the mobile header (1001). */
  z-index: 1100;
}

.test-mode-pill {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  max-width: calc(100% - 24px);
  padding: 4px 14px;
  border-radius: 100px;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  font-family: 'Arimo', sans-serif;
  font-size: 12.5px;
  line-height: 1.4;
  color: #92400e;
  white-space: nowrap;
  overflow: hidden;
}

.test-mode-pill strong {
  font-weight: 600;
}

.test-mode-hint {
  color: #a16207;
}

.test-mode-pill code {
  background: #fde68a;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 11.5px;
}

/* Reserve the strip so nothing renders underneath it. */
body.has-test-banner .sidebar {
  top: var(--test-banner-height);
  height: calc(100vh - var(--test-banner-height));
}

body.has-test-banner .mobile-header {
  top: var(--test-banner-height);
}

body.has-test-banner .app-layout {
  padding-top: var(--test-banner-height);
}

@media (max-width: 768px) {
  /* Stacks under the mobile header, which the layout already accounts for. */
  body.has-test-banner .app-layout {
    padding-top: calc(60px + var(--test-banner-height));
  }

  /* Not enough room for the hint alongside the label. */
  .test-mode-hint {
    display: none;
  }
}
