/* Theme tokens and global surfaces */
:root,
[data-theme="light"] {
    --bg-primary: #fafafa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f8fafc;
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border-color: #e1e5e9;
    --border-color-light: #f1f3f4;
    --accent-primary: #3b82f6;
    --accent-secondary: #1e40af;
    --accent-contrast: #f8fafc;
    --shadow-soft: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-strong: 0 8px 20px rgba(0, 0, 0, 0.14);
    --surface-muted: #eef2f7;

    /* Resizable sidebar */
    --sidebar-width: 400px;
    --sidebar-min-width: 240px;
    --sidebar-max-width: 700px;
    --sidebar-resizer-width: 6px;
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #111827;
    --bg-tertiary: #1f2937;
    --text-primary: #e2e8f0;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --border-color-light: #475569;
    --accent-primary: #60a5fa;
    --accent-secondary: #3b82f6;
    --accent-contrast: #0b1220;
    --shadow-soft: 0 6px 18px rgba(0, 0, 0, 0.5);
    --shadow-strong: 0 12px 28px rgba(0, 0, 0, 0.6);
    --surface-muted: #162033;
}

:root { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }

/* Global styling - Inspired by Claude's calm professionalism */
body {
    background: var(--bg-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    line-height: 1.5;
}

/* Main layout: resizable sidebar */
.app-shell-row {
    flex-wrap: nowrap !important;
    align-items: stretch;
}

.sidebar-col {
    position: relative;
    flex: 0 0 var(--sidebar-width);
    width: var(--sidebar-width);
    max-width: var(--sidebar-width);
    min-width: var(--sidebar-min-width);
    padding-right: 1rem;
}

.main-col {
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0;
    padding-left: 1rem !important;
}

.sidebar-resizer {
    flex: 0 0 var(--sidebar-resizer-width);
    width: var(--sidebar-resizer-width);
    height: auto;
    cursor: col-resize;
    background: transparent;
    border-radius: 6px;
}

.sidebar-resizer:hover {
    background: rgba(59, 130, 246, 0.15);
}

.sidebar-resizer.is-active {
    background: rgba(59, 130, 246, 0.25);
}

.sidebar-resizer:focus-visible {
    outline: 2px solid rgba(59, 130, 246, 0.6);
    outline-offset: 2px;
}

body.sidebar-resizing,
body.sidebar-resizing * {
    cursor: col-resize !important;
    user-select: none !important;
}

body,
.auth-page,
.low-balance-page,
.settings-page,
.subscription-page {
    background: var(--bg-primary) !important;
    color: var(--text-primary);
}

.card,
.decision-card,
.sidebar-section,
.metric-container,
.settings-sidebar,
.settings-main-content .card,
.config-section,
.results-card,
.pricing-card,
.session-history-list .list-group-item,
.round-flow-item,
.confidence-display,
.confidence-gauge-container,
.metric-badge,
.settings-page .card {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
    box-shadow: var(--shadow-soft);
}

.card,
.decision-card,
.config-section,
.results-card,
.sidebar-section {
    color: var(--text-primary);
}

.sidebar-section,
.sidebar-section p,
.sidebar-section span,
.sidebar-section h4,
.sidebar-section h5,
.sidebar-section h6,
.sidebar-section small {
    color: var(--text-primary) !important;
}
.sidebar-section .text-muted,
.sidebar-section .small {
    color: var(--text-secondary) !important;
}
.session-history-list .list-group-item,
.session-history-list .session-question,
.session-history-list .session-meta {
    color: var(--text-primary) !important;
}
.session-history-list .session-meta {
    color: var(--text-secondary) !important;
}
.sidebar-section .card-title,
.sidebar-section .section-header,
.sidebar-section .metric-label {
    color: var(--text-primary) !important;
}
.sidebar-section .metric-label {
    color: var(--text-secondary) !important;
}

/* Sidebar progress metrics: slightly smaller values (time/cost) */
.sidebar-section .metric-container .metric-value {
    font-size: 1.25rem !important;
}

.text-muted,
.small,
.form-text,
.settings-page .text-muted {
    color: var(--text-secondary) !important;
}

.form-label {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .card,
[data-theme="dark"] .list-group-item,
[data-theme="dark"] .decision-card,
[data-theme="dark"] .sidebar-section,
[data-theme="dark"] .metric-container,
[data-theme="dark"] .results-card,
[data-theme="dark"] .config-section,
[data-theme="dark"] .session-history-list .list-group-item {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
    box-shadow: var(--shadow-soft) !important;
}

[data-theme="dark"] .text-muted,
[data-theme="dark"] .small,
[data-theme="dark"] .form-text {
    color: var(--text-secondary) !important;
}

.section-header {
    color: var(--text-primary) !important;
}

.settings-nav-link {
    color: var(--text-secondary) !important;
}
.settings-nav-link:hover {
    color: var(--text-primary) !important;
    background-color: var(--bg-tertiary) !important;
}
.settings-nav-link.active {
    color: var(--text-primary) !important;
    background-color: var(--bg-tertiary) !important;
    border-left-color: var(--accent-primary) !important;
}

[data-theme="dark"] .settings-sidebar,
[data-theme="dark"] .settings-main-content,
[data-theme="dark"] .settings-content-section {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .settings-page h1,
[data-theme="dark"] .settings-page h2,
[data-theme="dark"] .settings-page h3,
[data-theme="dark"] .settings-page h4,
[data-theme="dark"] .settings-page h5,
[data-theme="dark"] .settings-page h6 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .settings-page .text-muted,
[data-theme="dark"] .settings-page .form-text {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .settings-page .Select-control,
[data-theme="dark"] .settings-page .form-control {
    background: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}
[data-theme="dark"] .settings-page .Select-placeholder,
[data-theme="dark"] .settings-page .Select-value-label {
    color: var(--text-secondary) !important;
}

.form-control,
.settings-page .form-control,
.Select-control {
    background-color: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}
.Select-placeholder,
.Select-value-label {
    color: var(--text-secondary) !important;
}
.Select--single > .Select-control .Select-value {
    color: var(--text-primary) !important;
}
.Select--multi .Select-value {
    color: var(--text-primary) !important;
}
.form-control::placeholder,
.settings-page .form-control::placeholder {
    color: var(--text-secondary) !important;
}
.settings-page .form-label,
.settings-page .form-check-label {
    color: var(--text-primary) !important;
}
.form-control:disabled,
.form-select:disabled,
fieldset:disabled .form-control {
    color: var(--text-secondary) !important;
    background-color: var(--bg-tertiary) !important;
}
.form-control:focus,
.settings-page .form-control:focus,
.Select.is-focused .Select-control {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

.btn-primary,
.settings-page .btn-primary {
    background: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
    color: #fff !important;
}
.btn-primary:hover,
.settings-page .btn-primary:hover {
    background: var(--accent-secondary) !important;
    border-color: var(--accent-secondary) !important;
}

.launch-button,
#launch-analysis-button,
.btn.launch-button,
.btn-primary.launch-button {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}
.launch-button:hover,
#launch-analysis-button:hover,
.btn.launch-button:hover,
.btn-primary.launch-button:hover {
    background: var(--accent-secondary) !important;
    color: #fff !important;
    border-color: var(--accent-secondary) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
}

hr,
.settings-page hr {
    border-color: var(--border-color-light) !important;
}

/* Professional cards - More subtle, less "designed" */
.decision-card {
    background: var(--bg-secondary);
    border-radius: 8px;  /* Reduced from 12px */
    padding: 1.5rem;     /* Reduced from 2rem */
    box-shadow: var(--shadow-soft);  /* Much more subtle */
    border: 1px solid var(--border-color);
    margin: 1rem 0;
    transition: none;    /* Remove hover animations */
}

.decision-card:hover {
    box-shadow: var(--shadow-soft);  /* Same as default - no change */
    transform: none;     /* Remove hover lift */
}

.card-header {
    font-size: 1.25rem;  /* Reduced from 1.5rem */
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;  /* Reduced spacing */
    display: flex;
    align-items: center;
    gap: 0.5rem;        /* Reduced gap */
}

.card-icon {
    width: 20px;         /* Reduced from 24px */
    height: 20px;
    background: #4a5568; /* Simpler gray instead of gradient */
    border-radius: 4px;  /* Reduced from 6px */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 500;    /* Reduced from 600 */
    font-size: 0.8rem;   /* Reduced from 0.9rem */
}

/* Logo section */
.logo-section {
    padding: 1.5rem 1rem;
    margin-bottom: 1.5rem;
    text-align: center;
    background: none !important;  /* No background */
    border: none !important;      /* No border */
    box-shadow: none !important;  /* No shadow */
    border-radius: 0 !important;  /* No rounded corners */
}

.logo-image {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 4px;
}

/* Analysis title styling */
.analysis-title {
    font-size: 1.4rem !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
}

/* Fine-tuning spacing */
.session-history-list .list-group-item {
    padding: 0.875rem !important;
    margin-bottom: 2px;
}

/* Compact progress metrics - time and cost on same line */
.progress-metrics-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.progress-metric-item {
    text-align: center;
    flex: 1;
}

.progress-metric-item .metric-value {
    font-size: 1.5rem !important;  /* Reduced from larger size */
    font-weight: 600 !important;
    margin-bottom: 0.25rem;
    color: var(--text-primary) !important;
}

.progress-metric-item .metric-label {
    font-size: 0.75rem !important;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.accordion-button {
    font-size: 0.95rem !important;
    padding: 0.75rem 1rem !important;
}

.compact-section {
    padding: 0.75rem !important;
}

/* Model configuration dropdowns */
.config-control .Select-control {
    font-size: 0.875rem;
    min-height: 32px;
}

/* Status indicators - More Claude-like */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;       /* Reduced gap */
    padding: 0.375rem 0.75rem;  /* Reduced padding */
    border-radius: 6px;  /* Reduced from 8px */
    font-weight: 500;
    font-size: 0.875rem;
    border: none;        /* Remove borders */
}

.status-success {
    background: #f0f9ff;
    color: #0369a1;
}

.status-warning {
    background: #fffbeb;
    color: #a16207;
}

.status-error {
    background: #fef2f2;
    color: #dc2626;
}

.status-info {
    background: #f8fafc;
    color: #475569;
}

/* Professional buttons - More understated */
.stButton-button {
    background: #3b82f6;  /* Flat color, no gradient */
    color: white;
    border: none;
    border-radius: 6px;   /* Reduced from 8px */
    padding: 0.625rem 1.5rem;  /* Reduced padding */
    font-weight: 500;     /* Reduced from 600 */
    font-size: 0.875rem;  /* Reduced from 1rem */
    transition: background-color 0.2s ease;  /* Only color transition */
    box-shadow: none;     /* Remove shadow */
}

.stButton-button:hover {
    background: #2563eb;  /* Simple color change */
    box-shadow: none;     /* No shadow */
    transform: none;      /* No movement */
}

/* Metrics styling - Cleaner */
.metric-container {
    background: var(--bg-secondary);
    border-radius: 6px;   /* Reduced from 8px */
    padding: 1.25rem;     /* Reduced from 1.5rem */
    text-align: center;
    box-shadow: var(--shadow-soft);  /* More subtle */
    border: 1px solid var(--border-color);
}

.metric-value {
    font-size: 1.75rem;   /* Reduced from 2rem */
    font-weight: 600;     /* Reduced from 700 */
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.metric-label {
    font-size: 0.8125rem; /* Slightly reduced */
    color: var(--text-secondary);
    font-weight: 400;     /* Reduced from 500 */
    text-transform: none; /* Remove uppercase */
    letter-spacing: normal;  /* Remove letter spacing */
}

/* Sidebar metric overrides for dark mode */
[data-theme="dark"] .sidebar-section .metric-container .metric-value,
[data-theme="dark"] .sidebar-section .metric-container .metric-label {
    color: var(--text-primary) !important;
}

/* Sidebar styling - More minimal */
.sidebar-section {
    background: var(--bg-secondary);
    border-radius: 6px;   /* Reduced from 8px */
    padding: 0.875rem;    /* Reduced from 1rem */
    margin-bottom: 0.75rem;  /* Reduced spacing */
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-color);
}

.sidebar-header {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.625rem;  /* Reduced spacing */
    font-size: 0.9375rem;     /* Slightly smaller */
}

/* Configuration controls - Cleaner */
.config-control {
    margin-bottom: 0.625rem;  /* Reduced spacing */
}

.config-label {
    font-weight: 500;
    color: #374151;
    font-size: 0.8125rem;  /* Slightly smaller */
    margin-bottom: 0.375rem;
    display: block;
}

.config-help {
    font-size: 0.75rem;
    color: #6b7280;
    font-style: normal;    /* Remove italic */
    margin-top: 0.25rem;
}

.config-subheader {
    font-weight: 600;
    font-size: 0.95rem;
    color: #111827;
    margin-bottom: 0.5rem;
    margin-top: 1rem;
}

/* Session History - More minimal */
.session-history-list {
    border-radius: 6px;    /* Reduced from 8px */
    border: 1px solid #e1e5e9;
}

.session-history-list .list-group-item {
    padding: 0.75rem;      /* Reduced padding */
    border-left: 2px solid transparent;  /* Thinner border */
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.15s ease;  /* Simplified transition */
    cursor: pointer;
    background-color: #ffffff;
}

.session-history-list .list-group-item:hover {
    background-color: #f8fafc;
    border-left-color: #94a3b8;  /* More subtle */
    transform: none;              /* Remove movement */
}

.session-history-list .list-group-item.active {
    border-left-color: #3b82f6;
    background-color: #f1f5f9;   /* More subtle active state */
    box-shadow: none;            /* Remove shadow */
}

/* Session Item Content - Cleaner typography with dynamic truncation */
.session-question {
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.3;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    color: #1a1a1a;
    overflow: hidden;           /* NEW: Needed for child truncation */
    min-width: 0;               /* NEW: Allows flex children to shrink below content size */
}

.session-question > span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1 1 auto;             /* Grow/shrink to fill available space */
    min-width: 0;               /* Allows shrinking below content size */
}

.session-meta {
    font-size: 0.75rem;
    line-height: 1.2;
    color: #6b7280;
    font-weight: 400;
}

/* Compact configuration section */
.config-section {
    background: #f8fafc;
    border-radius: 6px;           /* Reduced from 8px */
    padding: 1.25rem;             /* Reduced from 1.5rem */
    margin: 0.75rem 0;            /* Reduced margin */
    border: 1px solid #e1e5e9;
}

/* New Analysis button - Subtle, professional styling */
#new-session-button {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    font-weight: 500 !important;
    font-size: 1.1rem !important; /* Normal: 0.875 */
    padding: 0.625rem 1rem !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}

#new-session-button:hover {
    background: var(--accent-primary) !important;
    color: #fff !important;
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.25) !important;
    outline: 3px solid var(--accent-primary) !important;
    outline-offset: 0 !important;
    transform: none !important;
}

/* Launch button - Same pattern: subtle default, strong navy hover */
.launch-button,
#launch-analysis-button,
.btn.launch-button,
.btn-primary.launch-button {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 2px solid var(--border-color) !important;
    border-radius: 6px !important;        
    padding: 0.875rem !important;         
    font-weight: 500 !important;          
    font-size: 1.125rem !important;       
    transition: all 0.2s ease !important;
    box-shadow: var(--shadow-soft) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    height: 2.5rem !important;            
}

.launch-button:hover,
#launch-analysis-button:hover,
.btn.launch-button:hover,
.btn-primary.launch-button:hover {
    background: var(--accent-secondary) !important;
    color: #fff !important;
    border-color: var(--accent-secondary) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35) !important;
    outline: 3px solid var(--accent-secondary) !important;
    outline-offset: 0 !important;
    transform: none !important;           
}

[data-theme="dark"] .Select-menu-outer,
[data-theme="dark"] .Select-menu {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}
[data-theme="dark"] .Select-option {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}
[data-theme="dark"] .Select-option:hover,
[data-theme="dark"] .Select-option.is-focused {
    background: var(--bg-tertiary) !important;
}
[data-theme="dark"] .Select-arrow-zone .Select-arrow {
    border-top-color: var(--text-secondary) !important;
}
[data-theme="dark"] .Select-control {
    background: var(--bg-secondary) !important;
}

[data-theme="dark"] .logo-image {
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.25));
}

[data-theme="dark"] iframe[id$="config-flow-viz-iframe"] {
    filter: invert(1) hue-rotate(180deg);
    background: transparent !important;
}

/* Launch button arrow: swap assets for dark theme */
.launch-button .launch-arrow-dark {
    display: none;
}

[data-theme="dark"] .launch-button .launch-arrow-light {
    display: none;
}

[data-theme="dark"] .launch-button .launch-arrow-dark {
    display: inline;
}

/* Main app controls */
.config-label,
.section-header,
.metric-value,
.card-header,
.debate-message-title,
.config-subheader {
    color: var(--text-primary) !important;
}
.config-help,
.metric-label,
.config-section .form-text,
.config-section .text-muted,
.decision-card .text-muted {
    color: var(--text-secondary) !important;
}
.config-section .form-control,
.config-section .form-select {
    color: var(--text-primary) !important;
    background: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
}
.config-section .form-label,
.config-section .config-label,
.config-section .section-header {
    color: var(--text-primary) !important;
}
.config-section .form-control::placeholder {
    color: var(--text-secondary) !important;
}
.decision-card {
    border-color: var(--border-color) !important;
}

/* --- Launch button: compact rectangle in config panel --- */
.launch-rect {
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Arrow black normally, white on hover (light theme only) */
.launch-rect .launch-arrow { filter: none !important; }
.launch-rect:hover .launch-arrow-light { filter: brightness(0) invert(1) !important; }

/* Make the base border present so hover feels consistent */
#new-session-button,
.launch-button,
#launch-analysis-button,
.btn.launch-button,
.btn-primary.launch-button {
  border-width: 2px;
  border-style: solid;
  border-color: var(--border-color);
}

/* Keyboard users get the same thickness on focus */
#new-session-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.3) !important;
}
.launch-button:focus-visible,
#launch-analysis-button:focus-visible,
.btn.launch-button:focus-visible,
.btn-primary.launch-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35) !important;
}

/* Arrow black by default */
.launch-button .launch-arrow { filter: none !important; }

/* Arrow white on hover (matches your blue hover background) */
.launch-button:hover .launch-arrow-light { filter: brightness(0) invert(1) !important; }

/* Confidence indicator - More understated */
.confidence-display {
    background: #f8fafc;                   /* Flat background */
    border: 1px solid #cbd5e1;            /* Thinner border */
    border-radius: 8px;                    /* Reduced from 12px */
    padding: 1.5rem;                       /* Reduced padding */
    text-align: center;
    margin: 1.5rem 0;                      /* Reduced margin */
}

.confidence-high {
    border-color: #059669;
    background: #f0fdf4;
}

.confidence-medium {
    border-color: #d97706;
    background: #fffbeb;
}

.confidence-low {
    border-color: #dc2626;
    background: #fef2f2;
}

.confidence-score {
    font-size: 2.25rem;                    /* Reduced from 3rem */
    font-weight: 700;                      /* Reduced from 800 */
    color: #1a1a1a;
    margin: 0.5rem 0;
}

.confidence-level {
    font-size: 1.125rem;                   /* Reduced from 1.5rem */
    font-weight: 600;                      /* Reduced from 700 */
    margin-bottom: 0.75rem;                /* Reduced margin */
    text-transform: uppercase;
    letter-spacing: 0.05em;                /* Reduced letter spacing */
}

/* Form elements - Cleaner */
.stTextArea-textarea {
    border-radius: 6px;                    /* Reduced from 8px */
    border: 1px solid var(--border-color);             /* Thinner border */
    font-family: inherit;
    padding: 0.625rem;                     /* Reduced padding */
    font-size: 0.875rem;                   /* Consistent sizing */
    color: var(--text-primary);
    background: var(--bg-secondary);
}
.stTextArea-textarea::placeholder {
    color: var(--text-secondary);
}

.stTextArea-textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);  /* Reduced shadow */
    outline: none;
}

/* File uploader - Simpler */
.stFileUploader {
    background: var(--bg-secondary);
    border-radius: 6px;                    /* Reduced from 8px */
    border: 1px dashed var(--border-color);            /* Thinner border */
    padding: 1.5rem;                       /* Reduced padding */
    text-align: center;
    font-size: 0.875rem;                   /* Added consistent sizing */
    color: var(--text-primary);
}

.stFileUploader:hover {
    border-color: var(--accent-primary);                 /* More subtle hover */
}

/* Accordion headers - More minimal */
.accordion-button {
    background: #f8fafc !important;
    border-radius: 6px !important;         /* Reduced from 8px */
    font-weight: 500 !important;           /* Reduced from 600 */
    font-size: 1rem !important;            /* Reduced size */
    padding: 0.875rem 1rem !important;     /* Reduced padding */
    border: 1px solid #e1e5e9 !important; /* Thinner border */
    margin: 0.375rem 0 !important;         /* Reduced margin */
    color: #1a1a1a !important;
    box-shadow: none !important;
}

.accordion-button:hover {
    background: #f1f5f9 !important;        /* More subtle */
    border-color: #cbd5e1 !important;      /* More subtle */
}

.accordion-button:not(.collapsed) {
    background-color: #f1f5f9 !important;
    color: #1e40af !important;
    border-color: #cbd5e1 !important;      /* More subtle */
    box-shadow: none !important;
}

.accordion-body {
    background: white;
    border-radius: 0 0 6px 6px;            /* Reduced from 8px */
    padding: 1.25rem;                      /* Reduced from 1.5rem */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);  /* More subtle */
    border: 1px solid #e1e5e9;
    border-top: none;
}

/* Debate message styling - Cleaner */
.debate-message {
    background: white;
    border-radius: 6px;                    /* Reduced from 8px */
    padding: 1.25rem;                      /* Reduced from 1.5rem */
    margin: 0.75rem 0;                     /* Reduced margin */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);  /* More subtle */
    border-left: 3px solid #3b82f6;       /* Thinner border */
}

.debate-message.advocate {
    border-left-color: #059669;
}

.debate-message.opposition {
    border-left-color: #dc2626;
}

/* Remove unnecessary animations and transitions */
@keyframes slideInFromRight {
    from { opacity: 0.8; transform: translateX(5px); }  /* Much more subtle */
    to { opacity: 1; transform: translateX(0); }
}

.session-list-item {
    animation: slideInFromRight 0.15s ease-out;  /* Faster, subtler */
}

/* Remove button hover transforms */
#new-session-button:hover {
    transform: none;                       /* Remove movement */
    box-shadow: none;                      /* Remove shadow */
}

.session-management-buttons .btn:hover {
    transform: none;                       /* Remove movement */
}

/* Simplify badges */
.badge {
    font-size: 0.6875rem;                  /* Slightly smaller */
    font-weight: 500;                      /* Reduced weight */
    padding: 0.25rem 0.5rem;               /* Reduced padding */
    border-radius: 3px;                    /* Smaller radius */
    text-transform: uppercase;
    letter-spacing: 0.025em;               /* Reduced letter spacing */
    margin-left: auto;
    flex-shrink: 0;
}

.report-btn-generating {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    border: 2px solid #b45309 !important;
    pointer-events: none;
    animation: report-pulse 1.5s ease-in-out infinite;
}

.report-btn-ready {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: 2px solid #047857 !important;
}

@keyframes report-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5); }
    50% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
}

.report-status-text {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 0.25rem;
    text-align: center;
}

/* Professional loading state for report button */
.launch-button:disabled,
.launch-button[disabled] {
    background: #f3f4f6 !important;
    color: #9ca3af !important;
    border-color: #d1d5db !important;
    cursor: not-allowed !important;
    opacity: 1 !important;  /* Maintain full opacity for readability */
}

.launch-button:disabled:hover,
.launch-button[disabled]:hover {
    background: #f3f4f6 !important;
    color: #9ca3af !important;
    border-color: #d1d5db !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Subtle dots animation for loading */
@keyframes subtle-dots {
    0%, 20% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

.loading-dots {
    display: inline-block;
    animation: subtle-dots 1.5s infinite;
}

.loading-dots:nth-child(2) { animation-delay: 0.2s; }
.loading-dots:nth-child(3) { animation-delay: 0.4s; }

/* Minimal progress pulse */
@keyframes minimal-pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.generating-report {
    animation: minimal-pulse 2s infinite;
}

/* Auth page containers */
.auth-page {
    background: #fafafa;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

.low-balance-page {
    background: #fafafa;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

/* Auth page typography - consistent with main app */
.auth-page h2 {
    font-size: 1.75rem !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    margin-bottom: 0.5rem !important;
}

.auth-page h3 {
    font-size: 1.125rem !important;
    font-weight: 500 !important;
    color: #6b7280 !important;
    margin-bottom: 1rem !important;
}

.auth-page .text-primary {
    color: #1a1a1a !important;
}

.auth-page .text-muted {
    color: #6b7280 !important;
}

/* Auth cards - matching main app card styling */
.auth-page .card {
    background: white !important;
    border-radius: 8px !important;
    padding: 0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
    border: 1px solid #e1e5e9 !important;
    margin: 1rem 0 !important;
}

.auth-page .card-body {
    padding: 1.5rem !important;
}

/* Form styling - professional and clean */
.auth-page .form-label {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: #374151 !important;
    margin-bottom: 0.375rem !important;
}

.auth-page .form-control {
    border-radius: 6px !important;
    border: 1px solid #d1d5db !important;
    padding: 0.625rem !important;
    font-size: 0.875rem !important;
    font-family: inherit !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    background: white !important;
}

.auth-page .form-control:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1) !important;
    outline: none !important;
}

.auth-page .form-control.is-invalid {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.1) !important;
}

.auth-page .form-control.is-valid {
    border-color: #059669 !important;
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.1) !important;
}

/* Form feedback messages */
.auth-page .invalid-feedback {
    font-size: 0.75rem !important;
    color: #dc2626 !important;
    margin-top: 0.25rem !important;
}

.auth-page .form-text {
    font-size: 0.75rem !important;
    color: #6b7280 !important;
    margin-top: 0.25rem !important;
}

/* Primary buttons - matching the launch button style */
.auth-page .btn-primary,
.auth-page .btn[color="primary"] {
    background: #fafafa !important;
    color: #1a1a1a !important;
    border: 2px solid #d1d5db !important;
    border-radius: 6px !important;
    padding: 0.625rem 1.5rem !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    cursor: pointer !important;
    text-decoration: none !important;
}

.auth-page .btn-primary:hover,
.auth-page .btn[color="primary"]:hover {
    background: #1e40af !important;
    color: white !important;
    border-color: #1e40af !important;
    box-shadow: 0 0 0 3px #1e40af !important;
    outline: 3px solid currentColor !important;
    outline-offset: 0 !important;
    transform: none !important;
}

.auth-page .btn-primary:focus,
.auth-page .btn[color="primary"]:focus {
    background: #1e40af !important;
    color: white !important;
    border-color: #1e40af !important;
    box-shadow: 0 0 0 3px #1e40af !important;
    outline: none !important;
}

/* Large buttons */
.auth-page .btn-lg {
    padding: 0.875rem 2rem !important;
    font-size: 1rem !important;
}

/* Outline buttons */
.auth-page .btn-outline-primary {
    background: transparent !important;
    color: #3b82f6 !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    padding: 0.5rem 1rem !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    transition: all 0.2s ease !important;
}

.auth-page .btn-outline-primary:hover {
    background: #3b82f6 !important;
    color: white !important;
    border-color: #3b82f6 !important;
}

.auth-page .btn-outline-secondary {
    background: transparent !important;
    color: #6b7280 !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    padding: 0.5rem 1rem !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    transition: all 0.2s ease !important;
}

.auth-page .btn-outline-secondary:hover {
    background: #6b7280 !important;
    color: white !important;
    border-color: #6b7280 !important;
}

/* Small buttons */
.auth-page .btn-sm {
    padding: 0.375rem 0.75rem !important;
    font-size: 0.75rem !important;
}

/* Success buttons (for add credits, etc.) */
.auth-page .btn-success,
.auth-page .btn[color="success"] {
    background: #fafafa !important;
    color: #1a1a1a !important;
    border: 2px solid #d1d5db !important;
    border-radius: 6px !important;
    padding: 0.625rem 1.5rem !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
}

.auth-page .btn-success:hover,
.auth-page .btn[color="success"]:hover {
    background: #059669 !important;
    color: white !important;
    border-color: #059669 !important;
    box-shadow: 0 0 0 3px #059669 !important;
}

/* Checkbox styling */
.auth-page .form-check-input {
    border-radius: 4px !important;
    border: 1px solid #d1d5db !important;
    background-color: white !important;
}

.auth-page .form-check-input:checked {
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
}

.auth-page .form-check-label {
    font-size: 0.875rem !important;
    color: #374151 !important;
}

/* Alert styling - consistent with main app */
.auth-page .alert {
    border-radius: 8px !important;
    padding: 1rem !important;
    margin: 1rem 0 !important;
    border: 1px solid transparent !important;
    font-size: 0.875rem !important;
}

.auth-page .alert-info {
    background: #f0f9ff !important;
    color: #0369a1 !important;
    border-color: #bae6fd !important;
}

.auth-page .alert-success {
    background: #f0fdf4 !important;
    color: #059669 !important;
    border-color: #bbf7d0 !important;
}

.auth-page .alert-warning {
    background: #fffbeb !important;
    color: #a16207 !important;
    border-color: #fef3c7 !important;
}

.auth-page .alert-danger {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border-color: #fecaca !important;
}

.auth-page .alert-heading {
    font-size: 1rem !important;
    font-weight: 600 !important;
    margin-bottom: 0.5rem !important;
}

/* Links */
.auth-page a {
    color: #3b82f6 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: color 0.2s ease !important;
}

.auth-page a:hover {
    color: #1e40af !important;
    text-decoration: underline !important;
}

/* Dividers */
.auth-page hr {
    border: none !important;
    height: 1px !important;
    background: #e1e5e9 !important;
    margin: 1.5rem 0 !important;
}

/* User menu dropdown */
.dropdown-menu {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    box-shadow: var(--shadow-soft) !important;
    padding: 0.5rem 0 !important;
    font-size: 0.875rem !important;
}

.dropdown-item {
    padding: 0.5rem 1rem !important;
    color: var(--text-primary) !important;
    transition: background-color 0.2s ease !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

.dropdown-header {
    padding: 0.75rem 1rem !important;
    color: var(--text-primary) !important;
    font-weight: 600 !important;
    font-size: 0.875rem !important;
}

.dropdown-item .text-muted {
    color: var(--text-secondary) !important;
}

.dropdown-item.text-danger {
    color: #dc2626 !important;
}

.dropdown-divider {
    margin: 0.25rem 0 !important;
    border-top: 1px solid #e1e5e9 !important;
}

/* Balance and metrics styling */
.sidebar-section {
    background: white !important;
    border-radius: 6px !important;
    padding: 0.875rem !important;
    margin-bottom: 0.75rem !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid #e1e5e9 !important;
}

.sidebar-header {
    font-weight: 600 !important;
    color: #1a1a1a !important;
    margin-bottom: 0.625rem !important;
    font-size: 0.9375rem !important;
}

.metric-container {
    background: white !important;
    border-radius: 6px !important;
    padding: 1.25rem !important;
    text-align: center !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    border: 1px solid #e1e5e9 !important;
}

.metric-value {
    font-size: 1.75rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    margin-bottom: 0.25rem !important;
}

.metric-label {
    font-size: 0.8125rem !important;
    color: var(--text-secondary) !important;
    font-weight: 400 !important;
}

/* Button groups for quick amounts */
.auth-page .btn-group .btn {
    border-radius: 0 !important;
    border-right: 1px solid #d1d5db !important;
}

.auth-page .btn-group .btn:first-child {
    border-radius: 6px 0 0 6px !important;
}

.auth-page .btn-group .btn:last-child {
    border-radius: 0 6px 6px 0 !important;
    border-right: 2px solid #d1d5db !important;
}

.auth-page .btn-group .btn:only-child {
    border-radius: 6px !important;
}

/* Modal styling */
.modal-content {
    border-radius: 8px !important;
    border: 1px solid #e1e5e9 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

.modal-header {
    border-bottom: 1px solid #e1e5e9 !important;
    padding: 1.25rem !important;
    background: #f8fafc !important;
    border-radius: 8px 8px 0 0 !important;
}

.modal-title {
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
}

.modal-body {
    padding: 1.25rem !important;
    color: #374151 !important;
}

.modal-footer {
    border-top: 1px solid #e1e5e9 !important;
    padding: 1rem 1.25rem !important;
    background: #f8fafc !important;
    border-radius: 0 0 8px 8px !important;
}

/* Loading states */
.auth-page .btn:disabled,
.auth-page .btn[disabled] {
    background: #f3f4f6 !important;
    color: #9ca3af !important;
    border-color: #d1d5db !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}

/* Spinner components */
.auth-page .spinner-border {
    width: 1rem !important;
    height: 1rem !important;
    border-width: 0.125rem !important;
}

.auth-page .spinner-border-sm {
    width: 0.75rem !important;
    height: 0.75rem !important;
    border-width: 0.1rem !important;
}

/* Text color utilities for auth pages */
.auth-page .text-success {
    color: #059669 !important;
}

.auth-page .text-warning {
    color: #a16207 !important;
}

.auth-page .text-danger {
    color: #dc2626 !important;
}

.auth-page .text-info {
    color: #0369a1 !important;
}

/* Container and layout refinements */
.auth-page .container-fluid {
    padding: 1rem !important;
}

.auth-page .min-vh-100 {
    min-height: 100vh !important;
}

/* Logo section in auth pages */
.auth-page .logo-section {
    padding: 1.5rem 1rem !important;
    margin-bottom: 1.5rem !important;
    text-align: center !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.auth-page .logo-image {
    width: 48px !important;
    height: 48px !important;
    object-fit: contain !important;
    border-radius: 4px !important;
}

/* Special styling for low balance page */
.low-balance-page .alert {
    border-radius: 8px !important;
    padding: 2rem !important;
    margin: 2rem 0 !important;
}

.low-balance-page .btn-group {
    display: flex !important;
    gap: 0.5rem !important;
}

.low-balance-page .btn-group .btn {
    flex: 1 !important;
    border-radius: 6px !important;
    border-right: 2px solid #d1d5db !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .auth-page .card-body {
        padding: 1rem !important;
    }
    
    .auth-page h2 {
        font-size: 1.5rem !important;
    }
    
    .auth-page .btn-lg {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.9375rem !important;
    }
    
    .low-balance-page .btn-group {
        flex-direction: column !important;
    }
    
    .low-balance-page .btn-group .btn {
        width: 100% !important;
        margin-bottom: 0.5rem !important;
    }
}

/* Focus states for accessibility */
.auth-page .btn:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5) !important;
}

.auth-page .form-control:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
}

/* Subtle animations - minimal and professional */
.auth-page .btn {
    transition: all 0.15s ease !important;
}

.auth-page .form-control {
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.auth-page .card {
    transition: box-shadow 0.15s ease !important;
}

/* ===== BILLING PAGE & ACCOUNT SETTINGS PAGE STYLING ===== */

/* Base page containers - matching auth-page style */
.billing-page,
.settings-page {
    background: var(--bg-primary);
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
}

/* Page headers */
.billing-page h2,
.settings-page h2 {
    font-size: 1.75rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    margin-bottom: 0.5rem !important;
}

.billing-page h3,
.billing-page h5,
.settings-page h3,
.settings-page h5 {
    font-size: 1.125rem !important;
    font-weight: 500 !important;
    color: var(--text-primary) !important;
}

.billing-page h6,
.settings-page h6 {
    font-size: 1rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    margin-bottom: 0.75rem !important;
}

.billing-page .text-primary,
.settings-page .text-primary {
    color: var(--text-primary) !important;
}

.billing-page .text-muted,
.settings-page .text-muted {
    color: var(--text-secondary) !important;
}

/* Cards - matching main app card styling */
.billing-page .card,
.settings-page .card {
    background: var(--bg-secondary) !important;
    border-radius: 8px !important;
    padding: 0 !important;
    box-shadow: var(--shadow-soft) !important;
    border: 1px solid var(--border-color) !important;
    margin-bottom: 1.5rem !important;
}

.billing-page .card-header,
.settings-page .card-header {
    background: var(--bg-tertiary) !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 1.25rem !important;
    border-radius: 8px 8px 0 0 !important;
}

.billing-page .card-body,
.settings-page .card-body {
    padding: 1.5rem !important;
}

.billing-page .shadow-sm,
.settings-page .shadow-sm {
    box-shadow: var(--shadow-soft) !important;
}

/* Form elements */
.billing-page .form-label,
.settings-page .form-label {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: var(--text-primary) !important;
    margin-bottom: 0.375rem !important;
}

.billing-page .form-control,
.billing-page .form-select,
.settings-page .form-control,
.settings-page .form-select {
    border-radius: 6px !important;
    border: 1px solid var(--border-color) !important;
    padding: 0.625rem !important;
    font-size: 0.875rem !important;
    font-family: inherit !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

.billing-page .form-control:focus,
.billing-page .form-select:focus,
.settings-page .form-control:focus,
.settings-page .form-select:focus {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1) !important;
    outline: none !important;
}

.billing-page .form-control-plaintext,
.settings-page .form-control-plaintext {
    padding: 0.625rem !important;
    color: var(--text-primary) !important;
    font-size: 0.875rem !important;
}

.billing-page .form-text,
.settings-page .form-text {
    font-size: 0.75rem !important;
    color: #6b7280 !important;
    margin-top: 0.25rem !important;
}

.billing-page .invalid-feedback,
.settings-page .invalid-feedback {
    font-size: 0.75rem !important;
    color: #dc2626 !important;
    margin-top: 0.25rem !important;
}

.billing-page .form-control.is-invalid,
.settings-page .form-control.is-invalid {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.1) !important;
}

.billing-page .form-control.is-valid,
.settings-page .form-control.is-valid {
    border-color: #059669 !important;
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.1) !important;
}

/* Buttons - matching launch button style */
.billing-page .btn,
.settings-page .btn {
    border-radius: 6px !important;
    padding: 0.625rem 1.5rem !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    transition: all 0.2s ease !important;
    border-width: 2px !important;
    border-style: solid !important;
}

.billing-page .btn-primary,
.settings-page .btn-primary,
.billing-page .btn[color="primary"],
.settings-page .btn[color="primary"] {
    background: var(--accent-primary) !important;
    color: #fff !important;
    border-color: var(--accent-primary) !important;
    box-shadow: var(--shadow-soft) !important;
}

.billing-page .btn-primary:hover,
.settings-page .btn-primary:hover,
.billing-page .btn[color="primary"]:hover,
.settings-page .btn[color="primary"]:hover {
    background: var(--accent-secondary) !important;
    color: white !important;
    border-color: var(--accent-secondary) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important;
    transform: none !important;
}

.billing-page .btn-success,
.settings-page .btn-success,
.billing-page .btn[color="success"],
.settings-page .btn[color="success"] {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
    box-shadow: var(--shadow-soft) !important;
}

.billing-page .btn-success:hover,
.settings-page .btn-success:hover,
.billing-page .btn[color="success"]:hover,
.settings-page .btn[color="success"]:hover {
    background: var(--accent-secondary) !important;
    color: white !important;
    border-color: var(--accent-secondary) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3) !important;
}

.billing-page .btn-outline-primary,
.settings-page .btn-outline-primary {
    background: transparent !important;
    color: var(--accent-primary) !important;
    border-color: var(--border-color) !important;
}

.billing-page .btn-outline-primary:hover,
.settings-page .btn-outline-primary:hover {
    background: var(--accent-primary) !important;
    color: white !important;
    border-color: var(--accent-primary) !important;
}

.billing-page .btn-outline-secondary,
.settings-page .btn-outline-secondary {
    background: transparent !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-color) !important;
}

.billing-page .btn-outline-secondary:hover,
.settings-page .btn-outline-secondary:hover {
    background: var(--accent-secondary) !important;
    color: white !important;
    border-color: var(--accent-secondary) !important;
}

.billing-page .btn-lg,
.settings-page .btn-lg {
    padding: 0.875rem 2rem !important;
    font-size: 1rem !important;
}

.billing-page .btn-sm,
.settings-page .btn-sm {
    padding: 0.375rem 0.75rem !important;
    font-size: 0.75rem !important;
}

/* Button groups - for quick amount selection */
.billing-page .btn-group,
.settings-page .btn-group {
    display: flex !important;
    gap: 0.5rem !important;
}

.billing-page .btn-group .btn,
.settings-page .btn-group .btn {
    flex: 1 !important;
    border-radius: 6px !important;
}

/* Disabled buttons */
.billing-page .btn:disabled,
.settings-page .btn:disabled,
.billing-page .btn[disabled],
.settings-page .btn[disabled] {
    background: #f3f4f6 !important;
    color: #9ca3af !important;
    border-color: #d1d5db !important;
    cursor: not-allowed !important;
    opacity: 1 !important;
}

/* Alerts */
.billing-page .alert,
.settings-page .alert {
    border-radius: 8px !important;
    padding: 1rem !important;
    margin: 1rem 0 !important;
    border: 1px solid transparent !important;
    font-size: 0.875rem !important;
}

.billing-page .alert-info,
.settings-page .alert-info {
    background: #f0f9ff !important;
    color: #0369a1 !important;
    border-color: #bae6fd !important;
}

.billing-page .alert-success,
.settings-page .alert-success {
    background: #f0fdf4 !important;
    color: #059669 !important;
    border-color: #bbf7d0 !important;
}

.billing-page .alert-warning,
.settings-page .alert-warning {
    background: #fffbeb !important;
    color: #a16207 !important;
    border-color: #fef3c7 !important;
}

.billing-page .alert-danger,
.settings-page .alert-danger {
    background: #fef2f2 !important;
    color: #dc2626 !important;
    border-color: #fecaca !important;
}

.billing-page .alert-heading,
.settings-page .alert-heading {
    font-size: 1rem !important;
    font-weight: 600 !important;
    margin-bottom: 0.5rem !important;
}

/* Checkbox styling */
.billing-page .form-check-input,
.settings-page .form-check-input {
    border-radius: 4px !important;
    border: 1px solid #d1d5db !important;
    background-color: white !important;
}

.billing-page .form-check-input:checked,
.settings-page .form-check-input:checked {
    background-color: #3b82f6 !important;
    border-color: #3b82f6 !important;
}

.billing-page .form-check-label,
.settings-page .form-check-label {
    font-size: 0.875rem !important;
    color: #374151 !important;
}

/* Links */
.billing-page a,
.settings-page a {
    color: #3b82f6 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: color 0.2s ease !important;
}

.billing-page a:hover,
.settings-page a:hover {
    color: #1e40af !important;
    text-decoration: underline !important;
}

/* Dividers */
.billing-page hr,
.settings-page hr {
    border: none !important;
    height: 1px !important;
    background: #e1e5e9 !important;
    margin: 1.5rem 0 !important;
}

/* Input groups (for currency inputs) */
.billing-page .input-group-text,
.settings-page .input-group-text {
    background: #f8fafc !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px 0 0 6px !important;
    color: #6b7280 !important;
    font-size: 0.875rem !important;
    padding: 0.625rem !important;
}

.billing-page .input-group .form-control,
.settings-page .input-group .form-control {
    border-left: none !important;
    border-radius: 0 6px 6px 0 !important;
}

.billing-page .input-group .form-control:focus,
.settings-page .input-group .form-control:focus {
    border-left: 1px solid #3b82f6 !important;
}

/* Dropdown menus */
.billing-page .dropdown-menu,
.settings-page .dropdown-menu {
    background: white !important;
    border: 1px solid #e1e5e9 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    padding: 0.5rem 0 !important;
    font-size: 0.875rem !important;
}

.billing-page .dropdown-item,
.settings-page .dropdown-item {
    padding: 0.5rem 1rem !important;
    color: var(--text-primary) !important;
    transition: background-color 0.2s ease !important;
}

.billing-page .dropdown-item:hover,
.settings-page .dropdown-item:hover {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

/* Metric displays on billing page */
.billing-page .metric-container,
.settings-page .metric-container {
    background: var(--bg-secondary) !important;
    border-radius: 6px !important;
    padding: 1.25rem !important;
    text-align: center !important;
    box-shadow: var(--shadow-soft) !important;
    border: 1px solid var(--border-color) !important;
}

.billing-page .metric-value,
.settings-page .metric-value {
    font-size: 1.75rem !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    margin-bottom: 0.25rem !important;
}

.billing-page .metric-label,
.settings-page .metric-label {
    font-size: 0.8125rem !important;
    color: var(--text-secondary) !important;
    font-weight: 400 !important;
}

/* Dark theme overrides for billing */
[data-theme="dark"] .billing-page,
[data-theme="dark"] .billing-page .card,
[data-theme="dark"] .billing-page .card-header,
[data-theme="dark"] .billing-page .card-body,
[data-theme="dark"] .billing-page .alert {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}
[data-theme="dark"] .billing-page .text-muted {
    color: var(--text-secondary) !important;
}
[data-theme="dark"] .billing-page .btn-outline-primary {
    color: var(--accent-primary) !important;
    border-color: var(--border-color) !important;
}
[data-theme="dark"] .billing-page .btn-outline-primary:hover {
    color: #fff !important;
    border-color: var(--accent-primary) !important;
}
[data-theme="dark"] .billing-page .btn-outline-secondary {
    color: var(--text-secondary) !important;
    border-color: var(--border-color) !important;
}
[data-theme="dark"] .billing-page .btn-outline-secondary:hover {
    color: #fff !important;
    border-color: var(--accent-secondary) !important;
}
[data-theme="dark"] .billing-page .input-group-text {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}
[data-theme="dark"] .billing-page .form-control,
[data-theme="dark"] .billing-page .form-select {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}
[data-theme="dark"] .billing-page .metric-container {
    background: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* Spinners */
.billing-page .spinner-border,
.settings-page .spinner-border {
    width: 1rem !important;
    height: 1rem !important;
    border-width: 0.125rem !important;
}

.billing-page .spinner-border-sm,
.settings-page .spinner-border-sm {
    width: 0.75rem !important;
    height: 0.75rem !important;
    border-width: 0.1rem !important;
}

/* Logo sections */
.billing-page .logo-section,
.settings-page .logo-section {
    padding: 1.5rem 1rem !important;
    margin-bottom: 1.5rem !important;
    text-align: center !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.billing-page .logo-image,
.settings-page .logo-image {
    width: 48px !important;
    height: 48px !important;
    object-fit: contain !important;
    border-radius: 4px !important;
}

/* Container spacing */
.billing-page .container-fluid,
.settings-page .container-fluid {
    padding: 1rem !important;
}

.billing-page .min-vh-100,
.settings-page .min-vh-100 {
    min-height: 100vh !important;
}

/* Focus states for accessibility */
.billing-page .btn:focus-visible,
.settings-page .btn:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5) !important;
}

.billing-page .form-control:focus-visible,
.settings-page .form-control:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .billing-page .card-body,
    .settings-page .card-body {
        padding: 1rem !important;
    }
    
    .billing-page h2,
    .settings-page h2 {
        font-size: 1.5rem !important;
    }
    
    .billing-page .btn-lg,
    .settings-page .btn-lg {
        padding: 0.75rem 1.5rem !important;
        font-size: 0.9375rem !important;
    }
    
    .billing-page .btn-group,
    .settings-page .btn-group {
        flex-direction: column !important;
    }
    
    .billing-page .btn-group .btn,
    .settings-page .btn-group .btn {
        width: 100% !important;
        margin-bottom: 0.5rem !important;
    }
}

/* Subtle animations - minimal and professional */
.billing-page .btn,
.settings-page .btn,
.billing-page .form-control,
.settings-page .form-control,
.billing-page .card,
.settings-page .card {
    transition: all 0.15s ease !important;
}

/* Force override all inline styles
* {
    background: unset !important;
    box-shadow: none !important;
}
 */
 
/* Then reapply only what we want */
body { background: var(--bg-primary) !important; color: var(--text-primary); }
.decision-card { background: var(--bg-secondary) !important; }
.metric-container { background: var(--bg-secondary) !important; }

/* ===== Results page clean-up ===== */

/* Sticky, compact export toolbar */
/* Compact export bar that uses the existing .launch-button styles */
.export-toolbar-top {
  margin: 0 0 0.75rem 0;          /* small space before the analysis card */
}

.export-toolbar-top .launch-button {
  /* same look/behavior as launch; just ensure tidy height and spacing in a row */
  height: 2.5rem !important;
}

/* Neutral section headers */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 1.05rem;
  color: #111827;
  margin: 0 0 0.5rem 0;
}

/* Recommendation banner: flatter, smaller */
.confidence-display {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  text-align: left;
  margin: 0.75rem 0 1rem;
}
.confidence-level {
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 0.25rem 0;
  letter-spacing: 0.02em;
  text-transform: none;
}
.confidence-score {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0.1rem 0 0.25rem 0;
}
.confidence-high { background:#f0fdf4; border-color:#d1fae5; }
.confidence-medium { background:#fffbeb; border-color:#fef3c7; }
.confidence-low { background:#fef2f2; border-color:#fee2e2; }

/* Metric cards even calmer */
.metric-container {
  border: 1px solid #e5e7eb;
  box-shadow: none;
  border-radius: 8px;
  padding: 1rem;
}

/* Debate messages: remove gradients & emojis, left rule only */
.debate-message {
  background: #ffffff !important;
  border-left: 3px solid #e5e7eb !important;
  padding: 0.75rem !important;
  margin: 0.75rem 0 !important;
  border-radius: 6px !important;
}
.debate-message .debate-message-title {
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.35rem;
  font-size: 0.95rem;
}
.results-card .debate-message.advocate { border-left-color: #059669 !important; }
.results-card .debate-message.opposition { border-left-color: #dc2626 !important; }

/* Uniform buttons site-wide (a bit smaller) */
.stButton-button {
  padding: 0.55rem 1rem !important;
  font-size: 0.9rem !important;
  border-radius: 6px !important;
}

/* Section cards on results page */
.results-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.75rem 0.75rem 0.25rem;
  margin: 0.75rem 0;
  box-shadow: none;
}
.results-card .body {
  padding: 0.25rem 0.25rem 0.75rem;
}

/* Remove playful icons injected as text blocks */
.card-icon { display: none !important; }

/* ===== CONFIDENCE VISUALIZATION ENHANCEMENTS ===== */

/* Metric badge styling - matching your existing metric-container philosophy */
.metric-badge {
    background: #ffffff !important;
    border: 1px solid #e1e5e9 !important;
    border-radius: 6px !important;
    padding: 0.625rem 0.875rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    transition: background-color 0.15s ease !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
    font-family: inherit !important;
}

.metric-badge:hover {
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
}

.metric-badge i {
    color: #6b7280 !important;
    font-size: 0.875rem !important;
    flex-shrink: 0 !important;
}

.metric-badge span {
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    color: #374151 !important;
    white-space: nowrap !important;
}

/* Round flow visualization - matching your debate message styling */
.round-flow-container {
    font-family: inherit !important;
    line-height: 1.4 !important;
}

.round-flow-item {
    margin-bottom: 0.625rem !important;
    padding: 0.5rem !important;
    background: #ffffff !important;
    border-radius: 4px !important;
    border-left: 2px solid #e1e5e9 !important;
    transition: border-color 0.15s ease !important;
}

.round-flow-item:hover {
    border-left-color: #cbd5e1 !important;
    background: #f8fafc !important;
}

/* Confidence gauge container - minimal styling */
.confidence-gauge-container {
    background: #ffffff !important;
    border-radius: 6px !important;
    padding: 0.75rem !important;
    border: 1px solid #e1e5e9 !important;
}

/* Analysis trajectory header - matching your section headers */
.trajectory-header {
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    margin-bottom: 0.75rem !important;
    letter-spacing: normal !important;
}

/* Ensure Plotly graphs blend in with your design */
.js-plotly-plot .plotly {
    border-radius: 6px !important;
}

.js-plotly-plot .plotly .main-svg {
    border-radius: 6px !important;
}

/* Remove default Plotly margins that might conflict */
.modebar {
    display: none !important;
}

/* Grid adjustments for responsive metric badges */
@media (max-width: 768px) {
    .metric-badge {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.75rem !important;
    }
    
    .metric-badge i {
        font-size: 0.75rem !important;
    }
    
    .round-flow-item {
        font-size: 0.8125rem !important;
    }
}

/* Ensure confidence analysis section card matches results-card style */
.results-card .confidence-gauge-container {
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Typography consistency for trajectory labels */
.trajectory-label {
    font-size: 0.8125rem !important;
    color: #6b7280 !important;
    font-weight: 400 !important;
}

/* Remove any default spacing from row groups in this section */
.results-card .row.g-2 {
    margin-left: -0.25rem !important;
    margin-right: -0.25rem !important;
}

.results-card .row.g-2 > * {
    padding-left: 0.25rem !important;
    padding-right: 0.25rem !important;
}

/* Ensure tooltips on metric badges match your design if they appear */
.metric-badge[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: white;
    padding: 0.375rem 0.625rem;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    pointer-events: none;
    margin-bottom: 0.25rem;
    z-index: 1000;
}

/* Focus states for accessibility - matching your existing patterns */
.metric-badge:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2) !important;
}

/* Ensure consistent spacing in the confidence section */
.results-card .mb-3 {
    margin-bottom: 0.75rem !important;
}

/* Fine-tune the confidence level text below gauge */
.confidence-gauge-container + div {
    margin-top: 0.5rem !important;
}

/* ============================================================================
   SETTINGS PAGE - SIDEBAR NAVIGATION STYLES
   Add this to your custom.css file
   ============================================================================ */

/* Settings page container */
.settings-page {
    background: #fafafa;
}

/* Settings sidebar */
.settings-sidebar {
    background: white;
    border-right: 1px solid #e1e5e9;
}

/* Navigation link styling */
.settings-nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #6b7280;
    background-color: transparent;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 400;
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}

.settings-nav-link:hover {
    color: #1a1a1a;
    background-color: #f8fafc;
    text-decoration: none;
}

.settings-nav-link.active {
    color: #1a1a1a;
    background-color: #f1f5f9;
    font-weight: 500;
    border-left-color: #3b82f6;
}

.settings-nav-link i {
    width: 16px;
    text-align: center;
    margin-right: 0.75rem;
    font-size: 0.875rem;
}

/* Main content area */
.settings-main-content {
    flex: 1;
    padding: 2rem 2.5rem;
    max-width: 800px;
}

/* Danger zone container in settings (account deletion) */
.settings-page .border-danger {
    background: var(--bg-secondary) !important;
    border-color: #dc2626 !important;
    color: var(--text-primary) !important;
}
.settings-page .border-danger .text-danger {
    color: #dc2626 !important;
}
.settings-page .border-danger .text-muted {
    color: var(--text-secondary) !important;
}

/* Content section styling */
.settings-content-section {
    animation: fadeIn 0.2s ease;
}

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

/* Form styling within settings */
.settings-page .form-control {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.9375rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.settings-page .form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.settings-page .form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.375rem;
}

.settings-page .form-text {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Dropdown styling within settings */
.settings-page .Select-control {
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
}

.settings-page .Select-control:hover {
    border-color: #9ca3af !important;
}

.settings-page .Select.is-focused .Select-control {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

/* Checklist styling */
.settings-page .form-check {
    padding-left: 1.75rem;
    margin-bottom: 0.5rem;
}

.settings-page .form-check-input {
    width: 1rem;
    height: 1rem;
    margin-top: 0.2rem;
    margin-left: -1.75rem;
}

.settings-page .form-check-label {
    font-size: 0.9rem;
    color: #374151;
}

/* Alert styling within settings */
.settings-page .alert {
    border-radius: 8px;
    border: none;
    font-size: 0.9rem;
}

.settings-page .alert-success {
    background: #f0fdf4;
    color: #166534;
}

.settings-page .alert-danger {
    background: #fef2f2;
    color: #991b1b;
}

/* Save button styling */
.settings-page .btn-primary {
    background: #3b82f6;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: background-color 0.15s ease;
}

.settings-page .btn-primary:hover {
    background: #2563eb;
}

.settings-page .btn-primary:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

/* Horizontal rule styling */
.settings-page hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 1.5rem 0;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .settings-sidebar {
        width: 180px !important;
        min-width: 180px !important;
    }
    
    .settings-nav-link {
        font-size: 0.875rem;
        padding: 0.625rem 0.75rem;
    }
    
    .settings-main-content {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .settings-page > div {
        flex-direction: column !important;
    }
    
    .settings-sidebar {
        width: 100% !important;
        min-width: 100% !important;
        min-height: auto !important;
        border-right: none !important;
        border-bottom: 1px solid #e1e5e9 !important;
        position: relative !important;
    }
    
    .settings-sidebar > div {
        padding: 1rem !important;
    }
    
    .settings-sidebar nav {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }
    
    .settings-nav-item-wrapper {
        flex: 0 0 auto;
    }
    
    .settings-nav-link {
        padding: 0.5rem 0.75rem;
        margin-bottom: 0;
        border-left: none !important;
        border-bottom: 2px solid transparent;
    }
    
    .settings-nav-link.active {
        border-left: none !important;
        border-bottom-color: #3b82f6;
    }
    
    .settings-main-content {
        padding: 1.5rem 1rem;
        max-width: 100%;
    }
}

/* Report button states - higher specificity override */
.launch-button.report-btn-generating,
#generate-report-button.report-btn-generating {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    border: 2px solid #b45309 !important;
    color: white !important;
    pointer-events: none !important;
    animation: report-pulse 1.5s ease-in-out infinite !important;
}

.launch-button.report-btn-ready,
#generate-report-button.report-btn-ready {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: 2px solid #047857 !important;
    color: white !important;
}

.launch-button.report-btn-ready:hover,
#generate-report-button.report-btn-ready:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.3) !important;
}

/* ============================================================================
   SUBSCRIPTION SELECTION PAGE STYLES
   ============================================================================ */

/* Page container */
.subscription-page {
    background: #fafafa;
    min-height: 100vh;
}

/* Pricing grid container */
.pricing-grid-container {
    margin-bottom: 1.5rem;
}

/* Individual pricing card */
.pricing-card {
    background: #f9fafb;
    border-radius: 16px;
    padding: 1.75rem 1.5rem;
    border: 1px solid #e1e5e9;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Featured card (Professional) */
.pricing-card-featured {
    background: white;
    border-color: #14b8a6;
    box-shadow: 0 20px 45px rgba(20, 184, 166, 0.18);
}

.pricing-card-featured:hover {
    box-shadow: 0 25px 50px rgba(20, 184, 166, 0.22);
}

/* Most Popular badge */
.pricing-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #ecfeff;
    color: #0f766e;
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-weight: 600;
}

/* Tier name */
.pricing-tier {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
    font-weight: 600;
}

/* Price display */
.pricing-price {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    margin-bottom: 0.25rem;
}

/* Description text */
.pricing-desc {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

/* Features list */
.pricing-features {
    list-style: none;
    padding-left: 0;
    margin: 0.25rem 0 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.875rem;
    color: #6b7280;
    flex-grow: 1;
}

.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.4;
}

.pricing-features li::before {
    content: "•";
    color: #14b8a6;
    font-weight: bold;
    flex-shrink: 0;
}

/* Select button */
.pricing-btn {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    background: #1a1a1a;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.pricing-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.pricing-btn:active {
    transform: translateY(0);
}

/* Featured button with gradient */
.pricing-btn-featured {
    background: linear-gradient(135deg, #14b8a6, #3b82f6);
}

.pricing-btn-featured:hover {
    opacity: 0.95;
}

/* Billing info box */
.billing-info-box {
    background: #0f172a;
    color: white;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    text-align: center;
}

.billing-info-box strong {
    color: white;
}

.billing-info-box .small {
    color: rgba(255, 255, 255, 0.85);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .pricing-card {
        padding: 1.5rem 1.25rem;
    }
    
    .pricing-card-featured {
        transform: none;
    }
}

@media (max-width: 768px) {
    .pricing-grid-container .row {
        flex-direction: column;
    }
    
    .pricing-grid-container .col-md-4 {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .pricing-card {
        margin-bottom: 1rem;
    }
}

/* ===========================================================================
   DARK THEME: DEBATE & ANALYSIS DISPLAY COMPONENTS
   Add this entire block to the END of your custom.css file
   =========================================================================== */

/* --- Accordion buttons (dark theme) --- */
[data-theme="dark"] .accordion-button {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .accordion-button:hover {
    background: var(--bg-secondary) !important;
    border-color: var(--border-color-light) !important;
}

[data-theme="dark"] .accordion-button:not(.collapsed) {
    background: var(--bg-secondary) !important;
    color: var(--accent-primary) !important;
    border-color: var(--border-color-light) !important;
}

[data-theme="dark"] .accordion-button::after {
    filter: invert(1) brightness(0.8);
}

/* --- Accordion body (dark theme) --- */
[data-theme="dark"] .accordion-body {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .accordion-item {
    background: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
}

/* --- Debate messages (dark theme) --- */
[data-theme="dark"] .debate-message {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .debate-message .debate-message-title {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .debate-message-content,
[data-theme="dark"] .debate-message-content p,
[data-theme="dark"] .debate-message-content li,
[data-theme="dark"] .debate-message-content ul,
[data-theme="dark"] .debate-message-content ol {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .debate-message-content strong,
[data-theme="dark"] .debate-message-content b {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .debate-message-content a {
    color: var(--accent-primary) !important;
}

/* Advocate message - green left border preserved */
[data-theme="dark"] .debate-message.advocate {
    background: rgba(5, 150, 105, 0.08) !important;
    border-left-color: #10b981 !important;
}

/* Opposition message - red left border preserved */
[data-theme="dark"] .debate-message.opposition {
    background: rgba(220, 38, 38, 0.08) !important;
    border-left-color: #ef4444 !important;
}

/* --- Results card (dark theme) --- */
[data-theme="dark"] .results-card {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .results-card .body,
[data-theme="dark"] .results-card p,
[data-theme="dark"] .results-card span,
[data-theme="dark"] .results-card h3,
[data-theme="dark"] .results-card h4,
[data-theme="dark"] .results-card h5,
[data-theme="dark"] .results-card h6 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .results-card .text-muted {
    color: var(--text-secondary) !important;
}

/* --- Confidence display (dark theme) --- */
[data-theme="dark"] .confidence-display {
    background: var(--bg-tertiary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .confidence-level {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .confidence-score {
    color: var(--text-primary) !important;
}

/* Confidence variants - subtle dark backgrounds with preserved accent colors */
[data-theme="dark"] .confidence-high {
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}

[data-theme="dark"] .confidence-medium {
    background: rgba(245, 158, 11, 0.12) !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
}

[data-theme="dark"] .confidence-low {
    background: rgba(239, 68, 68, 0.12) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
}

/* --- Metric badge (dark theme) --- */
[data-theme="dark"] .metric-badge {
    background: var(--bg-tertiary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .metric-badge:hover {
    background: var(--bg-secondary) !important;
    border-color: var(--border-color-light) !important;
}

[data-theme="dark"] .metric-badge i {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .metric-badge span {
    color: var(--text-primary) !important;
}

/* --- Round flow visualization (dark theme) --- */
[data-theme="dark"] .round-flow-item {
    background: var(--bg-tertiary) !important;
    border-left-color: var(--border-color) !important;
}

[data-theme="dark"] .round-flow-item:hover {
    background: var(--bg-secondary) !important;
    border-left-color: var(--border-color-light) !important;
}

/* --- Confidence gauge container (dark theme) --- */
[data-theme="dark"] .confidence-gauge-container {
    background: var(--bg-tertiary) !important;
    border-color: var(--border-color) !important;
}

/* --- Framework display elements (dark theme) --- */
[data-theme="dark"] .streamlit-expanderHeader .accordion-button {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .streamlit-expanderHeader .accordion-body {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

/* --- Section headers in dark mode --- */
[data-theme="dark"] .section-header {
    color: var(--text-primary) !important;
}

/* --- Analysis trajectory header --- */
[data-theme="dark"] .trajectory-header,
[data-theme="dark"] h6[style*="color: #1e293b"] {
    color: var(--text-primary) !important;
}

/* --- Round flow visual inline spans (dark theme) --- */
[data-theme="dark"] [style*="color: #475569"],
[data-theme="dark"] [style*="color: #64748b"],
[data-theme="dark"] [style*="color: #94a3b8"] {
    color: var(--text-secondary) !important;
}

/* --- Plotly gauge for dark mode --- */
[data-theme="dark"] .js-plotly-plot .plotly .main-svg {
    background: transparent !important;
}

[data-theme="dark"] .js-plotly-plot text {
    fill: var(--text-primary) !important;
}

/* --- Spinner text in dark mode --- */
[data-theme="dark"] .text-primary {
    color: var(--accent-primary) !important;
}

/* --- Analysis dimension checkmarks in accordions --- */
[data-theme="dark"] .accordion-body p {
    color: var(--text-primary) !important;
}

/* --- Current round streaming placeholder --- */
[data-theme="dark"] #current-round-streaming,
[data-theme="dark"] #current-round-turns {
    color: var(--text-primary) !important;
}

/* --- Markdown content inside debates --- */
[data-theme="dark"] .debate-message-content code {
    background: var(--bg-primary) !important;
    color: var(--accent-primary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .debate-message-content pre {
    background: var(--bg-primary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .debate-message-content pre code {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .debate-message-content blockquote {
    border-left-color: var(--border-color-light) !important;
    color: var(--text-secondary) !important;
}

/* --- Evaluation results section in accordions --- */
[data-theme="dark"] .accordion-body h6,
[data-theme="dark"] .accordion-body .mt-4 h6,
[data-theme="dark"] .accordion-body .mt-3 h6 {
    color: var(--text-primary) !important;
}

/* --- Alert boxes inside results --- */
[data-theme="dark"] .alert-warning {
    background: rgba(245, 158, 11, 0.15) !important;
    border-color: rgba(245, 158, 11, 0.3) !important;
    color: #fbbf24 !important;
}

/* --- Strategic question header --- */
[data-theme="dark"] .results-card h3[style*="color: #1a1a1a"] {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .results-card .section-header[style*="color: #6b7280"] {
    color: var(--text-secondary) !important;
}

/* --- Strategic question title (from layouts.py patch) --- */
[data-theme="dark"] .strategic-question-title {
    color: var(--text-primary) !important;
}

/* --- Progress bar in clarification stage --- */
[data-theme="dark"] .progress {
    background: var(--bg-tertiary) !important;
}

/* --- HR elements inside results --- */
[data-theme="dark"] .accordion-body hr,
[data-theme="dark"] .results-card hr {
    border-color: var(--border-color) !important;
    background: var(--border-color) !important;
}

/* --- Director assessment markdown content --- */
[data-theme="dark"] .results-card .body p,
[data-theme="dark"] .results-card .body li,
[data-theme="dark"] .results-card .body ul,
[data-theme="dark"] .results-card .body ol {
    color: var(--text-primary) !important;
}

/* --- Export toolbar buttons --- */
[data-theme="dark"] .export-toolbar-top .launch-button {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .export-toolbar-top .launch-button:hover {
    background: var(--accent-secondary) !important;
    color: #fff !important;
    border-color: var(--accent-secondary) !important;
}

/* --- Evaluation metrics header --- */
[data-theme="dark"] .accordion-body h6 {
    color: var(--text-primary) !important;
}

/* --- Current round accordion active state --- */
[data-theme="dark"] #current-round-accordion .accordion-button {
    background: var(--bg-tertiary) !important;
    color: var(--accent-primary) !important;
}

/* --- Framework accordion specific styling --- */
[data-theme="dark"] #framework-accordion .accordion-body p {
    color: var(--text-primary) !important;
}

/* --- Bold text inside accordion bodies --- */
[data-theme="dark"] .accordion-body p[style*="fontWeight: bold"],
[data-theme="dark"] .accordion-body [style*="font-weight: bold"] {
    color: var(--text-primary) !important;
}

/* --- Ensure any remaining hardcoded colors get overridden --- */
[data-theme="dark"] [style*="color: #1a1a1a"],
[data-theme="dark"] [style*="color: #111827"],
[data-theme="dark"] [style*="color: #1e293b"],
[data-theme="dark"] [style*="color: #374151"] {
    color: var(--text-primary) !important;
}

[data-theme="dark"] [style*="color: #6b7280"],
[data-theme="dark"] [style*="color: #64748b"] {
    color: var(--text-secondary) !important;
}

/* --- Background overrides for remaining hardcoded backgrounds --- */
[data-theme="dark"] [style*="background: #f8fafc"],
[data-theme="dark"] [style*="background-color: #f8fafc"],
[data-theme="dark"] [style*="background: #ffffff"],
[data-theme="dark"] [style*="background-color: #ffffff"],
[data-theme="dark"] [style*="background: white"] {
    background: var(--bg-tertiary) !important;
}

/* --- Gradient backgrounds for advocate/opposition messages --- */
[data-theme="dark"] [style*="linear-gradient(135deg, #dcfce7"],
[data-theme="dark"] [style*="linear-gradient(135deg, #fee2e2"] {
    background: var(--bg-tertiary) !important;
}
/* Transaction history table - theme aware */
.transaction-history-page table {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}
.transaction-history-page thead th {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}
.transaction-history-page tbody td {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}
.transaction-history-page tbody tr:nth-child(odd) td {
    background: var(--bg-tertiary) !important;
}
.transaction-history-page a {
    color: var(--accent-primary) !important;
}
.transaction-history-page a:hover {
    color: var(--accent-secondary) !important;
}
.transaction-history-page .badge {
    color: #fff !important;
}

/* ===========================================================================
   AUTH COMPONENTS - DARK THEME RESPONSIVE ADDITIONS
   Add this entire block to the END of your custom.css file
   =========================================================================== */

/* ============================================
   AUTH PAGE BASE STYLES
   ============================================ */

/* Auth-specific text classes that respond to theme */
.auth-title {
    color: var(--accent-primary) !important;
    font-family: 'DM Serif Display', Georgia, serif;
    font-weight: 400;
}

.auth-subtitle {
    color: var(--accent-primary) !important;
    font-size: 1.1rem;
}

.auth-text {
    color: var(--text-primary) !important;
}

.auth-link {
    color: var(--accent-primary) !important;
    cursor: pointer;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: var(--accent-secondary) !important;
    text-decoration: underline !important;
}

/* Utility class for cursor pointer */
.cursor-pointer {
    cursor: pointer;
}

/* Auth card styling */
.auth-card {
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.auth-card .card-header {
    background: var(--bg-tertiary) !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

.auth-card .card-body {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

/* Auth icon with theme-aware primary color */
.auth-icon-primary {
    color: var(--accent-primary) !important;
}

/* Processing page pending items */
.processing-pending {
    opacity: 0.5;
}

/* Cost breakdown panel */
.cost-breakdown-panel {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
}

/* ============================================
   AUTH PAGE DARK THEME OVERRIDES
   ============================================ */

[data-theme="dark"] .auth-page,
[data-theme="dark"] .subscription-page,
[data-theme="dark"] .low-balance-page {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .auth-page .card,
[data-theme="dark"] .auth-page .auth-card,
[data-theme="dark"] .subscription-page .card,
[data-theme="dark"] .low-balance-page .card {
    background: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .auth-page .card-header,
[data-theme="dark"] .subscription-page .card-header,
[data-theme="dark"] .low-balance-page .card-header {
    background: var(--bg-tertiary) !important;
    border-bottom-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .auth-page .card-body,
[data-theme="dark"] .subscription-page .card-body,
[data-theme="dark"] .low-balance-page .card-body {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

/* Auth page form controls */
[data-theme="dark"] .auth-page .form-control,
[data-theme="dark"] .auth-page .form-select,
[data-theme="dark"] .subscription-page .form-control,
[data-theme="dark"] .low-balance-page .form-control {
    background: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .auth-page .form-control::placeholder,
[data-theme="dark"] .subscription-page .form-control::placeholder,
[data-theme="dark"] .low-balance-page .form-control::placeholder {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .auth-page .form-control:focus,
[data-theme="dark"] .subscription-page .form-control:focus,
[data-theme="dark"] .low-balance-page .form-control:focus {
    background: var(--bg-secondary) !important;
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .auth-page .form-label,
[data-theme="dark"] .subscription-page .form-label,
[data-theme="dark"] .low-balance-page .form-label {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .auth-page .form-text,
[data-theme="dark"] .subscription-page .form-text,
[data-theme="dark"] .low-balance-page .form-text {
    color: var(--text-secondary) !important;
}

/* Auth page checkboxes */
[data-theme="dark"] .auth-page .form-check-input,
[data-theme="dark"] .subscription-page .form-check-input {
    background-color: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .auth-page .form-check-input:checked,
[data-theme="dark"] .subscription-page .form-check-input:checked {
    background-color: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
}

[data-theme="dark"] .auth-page .form-check-label,
[data-theme="dark"] .subscription-page .form-check-label {
    color: var(--text-primary) !important;
}

/* Auth page input group */
[data-theme="dark"] .auth-page .input-group-text,
[data-theme="dark"] .billing-page .input-group-text,
[data-theme="dark"] .low-balance-page .input-group-text {
    background: var(--bg-tertiary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-secondary) !important;
}

/* Auth page text elements */
[data-theme="dark"] .auth-page h1,
[data-theme="dark"] .auth-page h2,
[data-theme="dark"] .auth-page h3,
[data-theme="dark"] .auth-page h4,
[data-theme="dark"] .auth-page h5,
[data-theme="dark"] .auth-page h6,
[data-theme="dark"] .subscription-page h1,
[data-theme="dark"] .subscription-page h2,
[data-theme="dark"] .subscription-page h3,
[data-theme="dark"] .subscription-page h4,
[data-theme="dark"] .subscription-page h5,
[data-theme="dark"] .subscription-page h6,
[data-theme="dark"] .low-balance-page h1,
[data-theme="dark"] .low-balance-page h2,
[data-theme="dark"] .low-balance-page h3,
[data-theme="dark"] .low-balance-page h4,
[data-theme="dark"] .low-balance-page h5,
[data-theme="dark"] .low-balance-page h6 {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .auth-page p,
[data-theme="dark"] .subscription-page p,
[data-theme="dark"] .low-balance-page p {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .auth-page .text-muted,
[data-theme="dark"] .subscription-page .text-muted,
[data-theme="dark"] .low-balance-page .text-muted {
    color: var(--text-secondary) !important;
}

/* Auth page alerts */
[data-theme="dark"] .auth-page .alert-info,
[data-theme="dark"] .subscription-page .alert-info {
    background: rgba(96, 165, 250, 0.12) !important;
    border-color: rgba(96, 165, 250, 0.25) !important;
    color: var(--accent-primary) !important;
}

[data-theme="dark"] .auth-page .alert-success,
[data-theme="dark"] .subscription-page .alert-success {
    background: rgba(16, 185, 129, 0.12) !important;
    border-color: rgba(16, 185, 129, 0.25) !important;
    color: #34d399 !important;
}

[data-theme="dark"] .auth-page .alert-warning,
[data-theme="dark"] .subscription-page .alert-warning,
[data-theme="dark"] .low-balance-page .alert-warning {
    background: rgba(245, 158, 11, 0.12) !important;
    border-color: rgba(245, 158, 11, 0.25) !important;
    color: #fbbf24 !important;
}

[data-theme="dark"] .auth-page .alert-danger,
[data-theme="dark"] .subscription-page .alert-danger {
    background: rgba(239, 68, 68, 0.12) !important;
    border-color: rgba(239, 68, 68, 0.25) !important;
    color: #f87171 !important;
}

[data-theme="dark"] .auth-page .alert-heading,
[data-theme="dark"] .subscription-page .alert-heading,
[data-theme="dark"] .low-balance-page .alert-heading {
    color: inherit !important;
}

/* Auth page dividers */
[data-theme="dark"] .auth-page hr,
[data-theme="dark"] .subscription-page hr,
[data-theme="dark"] .low-balance-page hr {
    border-color: var(--border-color) !important;
    background: var(--border-color) !important;
}

/* Auth page buttons */
[data-theme="dark"] .auth-page .btn-outline-primary,
[data-theme="dark"] .subscription-page .btn-outline-primary,
[data-theme="dark"] .low-balance-page .btn-outline-primary {
    color: var(--accent-primary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .auth-page .btn-outline-primary:hover,
[data-theme="dark"] .subscription-page .btn-outline-primary:hover,
[data-theme="dark"] .low-balance-page .btn-outline-primary:hover {
    background: var(--accent-primary) !important;
    color: #fff !important;
    border-color: var(--accent-primary) !important;
}

[data-theme="dark"] .auth-page .btn-outline-secondary,
[data-theme="dark"] .subscription-page .btn-outline-secondary {
    color: var(--text-secondary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .auth-page .btn-outline-secondary:hover,
[data-theme="dark"] .subscription-page .btn-outline-secondary:hover {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

/* ============================================
   SUBSCRIPTION/PRICING PAGE DARK THEME
   ============================================ */

/* Subscription page title */
[data-theme="dark"] .subscription-title {
    color: var(--text-primary) !important;
}

/* Pricing cards dark theme */
[data-theme="dark"] .pricing-card {
    background: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .pricing-card:hover {
    border-color: var(--border-color-light) !important;
    box-shadow: var(--shadow-strong) !important;
}

[data-theme="dark"] .pricing-card-featured {
    border-color: #14b8a6 !important;
    box-shadow: 0 12px 30px rgba(20, 184, 166, 0.15) !important;
}

[data-theme="dark"] .pricing-card-featured:hover {
    box-shadow: 0 16px 40px rgba(20, 184, 166, 0.2) !important;
}

[data-theme="dark"] .pricing-card-current {
    border-color: var(--accent-primary) !important;
}

[data-theme="dark"] .pricing-tier {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .pricing-price-amount {
    color: var(--text-primary) !important;
    font-size: 1.9rem;
    font-weight: 600;
}

[data-theme="dark"] .pricing-price-period {
    color: var(--text-secondary) !important;
    font-size: 0.9rem;
    margin-left: 0.3rem;
}

[data-theme="dark"] .pricing-desc {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .pricing-features {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .pricing-features li::before {
    color: #14b8a6 !important;
}

[data-theme="dark"] .pricing-badge {
    background: rgba(20, 184, 166, 0.15) !important;
    color: #2dd4bf !important;
}

[data-theme="dark"] .pricing-btn {
    background: var(--text-primary) !important;
    color: var(--bg-primary) !important;
}

[data-theme="dark"] .pricing-btn:hover {
    opacity: 0.85;
}

[data-theme="dark"] .pricing-btn-featured {
    background: linear-gradient(135deg, #14b8a6, #3b82f6) !important;
    color: white !important;
}

[data-theme="dark"] .pricing-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Billing info box - already has dark background, just adjust for better contrast */
[data-theme="dark"] .billing-info-box {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-color) !important;
}

[data-theme="dark"] .billing-info-box strong {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .billing-info-box .small {
    color: var(--text-secondary) !important;
}

/* ============================================
   DROPDOWN MENU DARK THEME (User menu)
   ============================================ */

[data-theme="dark"] .dropdown-menu {
    background: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
    box-shadow: var(--shadow-strong) !important;
}

[data-theme="dark"] .dropdown-item {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .dropdown-item:hover {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .dropdown-item.text-danger {
    color: #f87171 !important;
}

[data-theme="dark"] .dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.1) !important;
}

[data-theme="dark"] .dropdown-divider {
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .dropdown-header {
    color: var(--text-secondary) !important;
}

/* ============================================
   MODAL DARK THEME
   ============================================ */

[data-theme="dark"] .modal-content {
    background: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .modal-header {
    background: var(--bg-tertiary) !important;
    border-bottom-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .modal-header .modal-title {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .modal-header .btn-close {
    filter: invert(1) brightness(0.8);
}

[data-theme="dark"] .modal-body {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

[data-theme="dark"] .modal-body p {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .modal-footer {
    background: var(--bg-tertiary) !important;
    border-top-color: var(--border-color) !important;
}

/* ============================================
   BADGE DARK THEME OVERRIDES
   ============================================ */

[data-theme="dark"] .badge.bg-success {
    background-color: rgba(16, 185, 129, 0.2) !important;
    color: #34d399 !important;
}

[data-theme="dark"] .badge.bg-warning {
    background-color: rgba(245, 158, 11, 0.2) !important;
    color: #fbbf24 !important;
}

[data-theme="dark"] .badge.bg-secondary {
    background-color: var(--bg-tertiary) !important;
    color: var(--text-secondary) !important;
}

/* ============================================
   BUTTON GROUP DARK THEME
   ============================================ */

[data-theme="dark"] .btn-group .btn-outline-primary {
    color: var(--accent-primary) !important;
    border-color: var(--border-color) !important;
    background: var(--bg-secondary) !important;
}

[data-theme="dark"] .btn-group .btn-outline-primary:hover {
    background: var(--accent-primary) !important;
    color: #fff !important;
}

[data-theme="dark"] .btn-group .btn-primary {
    background: var(--accent-primary) !important;
    border-color: var(--accent-primary) !important;
}

[data-theme="dark"] .btn-group .btn-primary:hover {
    background: var(--accent-secondary) !important;
    border-color: var(--accent-secondary) !important;
}

/* ============================================
   SPINNER DARK THEME
   ============================================ */

[data-theme="dark"] .spinner-border.text-primary {
    color: var(--accent-primary) !important;
}

/* ============================================
   COST BREAKDOWN PANEL
   ============================================ */

[data-theme="dark"] .cost-breakdown-panel {
    background: var(--bg-tertiary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}
