/**
 * LeadsEngine Unified Theme
 * MAIN STYLING - All colors from design-tokens.css
 *
 * CSS ARCHITECTURE:
 * ==================
 * 1. design-tokens.css    - CSS variables (colors, spacing, fonts)
 * 2. unified-theme.css    - Global styles for all pages (THIS FILE)
 * 3. Page-specific CSS    - Complex feature-specific styles:
 *    - messaging-redesign.css  → leads.html (SMS/Email tabs, message bubbles)
 *    - analytics.css           → analytics.html (KPI grids, charts, leaderboard)
 *    - automations.css         → automations.html (workflow builder, step cards)
 *
 * NOTE: The page-specific files contain 300-1600 lines of specialized styles.
 * They are intentionally kept separate for maintainability and performance.
 *
 * CONTRAST RULES:
 * 1. Light backgrounds (white, gray) → Dark text
 * 2. Dark/colored backgrounds (blue, green, red) → White text
 * 3. Warning backgrounds (yellow/amber) → Dark amber text
 */

/* ==================== BASE STYLES ==================== */
body {
    background-color: var(--gray-50);
    color: var(--text-on-light);
    font-family: var(--font-sans);
}

/* ==================== UTILITY CLASSES ==================== */
.hidden {
    display: none !important;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-overlay.hidden {
    display: none !important;
}

/* ==================== TYPOGRAPHY ==================== */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-on-light);
    font-weight: var(--font-bold);
}

p, span, div, label, li {
    color: var(--text-on-light);
}

a:not(.btn):not(.nav-link):not(.navbar-brand) {
    color: var(--text-link);
}

a:not(.btn):not(.nav-link):not(.navbar-brand):hover {
    color: var(--text-link-hover);
}

.text-muted {
    color: var(--text-on-light-muted) !important;
}

small {
    color: var(--text-on-light-secondary);
}

/* ==================== CARDS ==================== */
.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

/* Default card header - light gray background, dark text */
.card-header {
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
    color: var(--text-on-light);
}

.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6,
.card-header .card-title {
    color: var(--text-on-light);
}

.card-body {
    color: var(--text-on-light);
}

/* ==================== BUTTONS ==================== */
.btn {
    font-weight: var(--font-semibold);
}

/* Primary button - blue background, white text */
.btn-primary {
    background: var(--primary-600);
    border-color: var(--primary-600);
    color: var(--text-on-dark) !important;
}

.btn-primary:hover {
    background: var(--primary-700);
    border-color: var(--primary-700);
    color: var(--text-on-dark) !important;
}

/* Success button - green background, white text */
.btn-success {
    background: var(--success-600);
    border-color: var(--success-600);
    color: var(--text-on-dark) !important;
}

/* Danger button - red background, white text */
.btn-danger {
    background: var(--danger-600);
    border-color: var(--danger-600);
    color: var(--text-on-dark) !important;
}

/* Warning button - yellow background, dark text */
.btn-warning {
    background: var(--warning-500);
    border-color: var(--warning-500);
    color: var(--text-on-warning) !important;
}

/* Secondary/outline buttons - light background, dark text */
.btn-secondary,
.btn-outline-primary,
.btn-outline-secondary {
    color: var(--text-on-light);
}

/* ==================== FORMS ==================== */
.form-label,
label {
    color: var(--text-on-light);
    font-weight: var(--font-medium);
}

.form-control,
.form-select,
input,
select,
textarea {
    color: var(--text-on-light) !important;
    background-color: var(--white) !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.form-text,
.help-block {
    color: var(--text-on-light-muted);
}

.input-group-text {
    color: var(--text-on-light-secondary);
    background: var(--gray-100);
}

::placeholder {
    color: var(--gray-400) !important;
}

/* ==================== TABLES ==================== */
.table {
    color: var(--text-on-light);
}

.table thead th {
    background: var(--primary-600);
    color: var(--text-on-dark) !important;
    font-weight: var(--font-semibold);
}

.table tbody td {
    color: var(--text-on-light);
}

.table-striped tbody tr:nth-of-type(odd) {
    background: var(--gray-50);
}

/* ==================== BADGES ==================== */
.badge {
    font-weight: var(--font-semibold);
}

.badge.bg-primary,
.badge.bg-success,
.badge.bg-danger,
.badge.bg-info {
    color: var(--text-on-dark) !important;
}

.badge.bg-warning {
    color: var(--text-on-warning) !important;
}

.badge.bg-secondary,
.badge.bg-light {
    color: var(--text-on-light) !important;
    background: var(--gray-200) !important;
}

/* ==================== ALERTS ==================== */
.alert-primary,
.alert-info {
    background: var(--primary-100);
    border-color: var(--primary-300);
    color: var(--primary-800);
}

.alert-success {
    background: var(--success-100);
    border-color: var(--success-300);
    color: var(--success-800);
}

.alert-warning {
    background: var(--warning-100);
    border-color: var(--warning-300);
    color: var(--text-on-warning);
}

.alert-danger {
    background: var(--danger-100);
    border-color: var(--danger-300);
    color: var(--danger-800);
}

/* ==================== NAVBAR ==================== */
/*
 * High specificity overrides to ensure visibility
 * Overrides: Bootstrap defaults, navbar-compact.css, enterprise-overrides.css
 */

/* Navbar background - blue gradient (override enterprise-overrides.css .navbar-dark white bg) */
.navbar,
nav.navbar,
.navbar.navbar-expand-lg,
.navbar.navbar-dark,
.navbar-dark,
nav.navbar.navbar-dark,
nav.navbar.navbar-expand-lg.navbar-dark {
    background: var(--gradient-navbar) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

/* Navbar brand - white text */
.navbar .navbar-brand,
.navbar-dark .navbar-brand,
nav.navbar .navbar-brand,
nav.navbar.navbar-dark .navbar-brand {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

/* Force all navbar nav-links to be white and bold */
.navbar .nav-link,
.navbar .navbar-nav .nav-link,
.navbar-nav .nav-link,
nav.navbar .nav-link,
nav.navbar .navbar-nav .nav-link,
.navbar-expand-lg .navbar-nav .nav-link,
.navbar-dark .navbar-nav .nav-link,
nav.navbar.navbar-dark .navbar-nav .nav-link {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
    opacity: 1 !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
}

/* Navbar nav-link hover */
.navbar .nav-link:hover,
.navbar .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:hover,
nav.navbar .navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

/* Dropdown toggles in navbar */
.navbar .dropdown-toggle,
nav.navbar .dropdown-toggle,
.navbar-nav .dropdown-toggle,
.navbar-dark .dropdown-toggle,
nav.navbar.navbar-dark .dropdown-toggle {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

/* Icons in navbar top-level items - white */
.navbar .nav-link > i,
.navbar .nav-link > .fas,
.navbar .nav-link > .fab,
.navbar .nav-link > .bi,
.navbar .dropdown-toggle > i,
.navbar .dropdown-toggle > .fas,
.navbar .dropdown-toggle > .fab,
.navbar .dropdown-toggle > .bi,
.navbar-dark .nav-link > i,
.navbar-dark .dropdown-toggle > i {
    color: #ffffff !important;
    opacity: 1 !important;
}

/* Active/selected navbar items - highlighted with border */
.navbar .nav-link.active,
.navbar .navbar-nav .nav-link.active,
.navbar-nav .nav-link.active,
nav.navbar .nav-link.active,
nav.navbar .navbar-nav .nav-link.active,
.navbar-dark .navbar-nav .nav-link.active,
nav.navbar.navbar-dark .navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.2) !important;
}

/* Active dropdown toggle when child page is active */
.navbar .dropdown-toggle.active,
.navbar-nav .dropdown-toggle.active,
nav.navbar .dropdown-toggle.active,
.navbar-dark .dropdown-toggle.active {
    background-color: rgba(255, 255, 255, 0.4) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.2) !important;
}

/* Active item icons remain white */
.navbar .nav-link.active > i,
.navbar .dropdown-toggle.active > i {
    color: #ffffff !important;
}

/* User dropdown - ensure all text is white */
.navbar .nav-link #user-name,
.navbar #user-name,
.navbar .dropdown-toggle span,
.navbar-nav .nav-link span {
    color: #ffffff !important;
}

/* ==================== DROPDOWN MENUS ==================== */
/* Dropdown menu container - white background */
.navbar .dropdown-menu,
.dropdown-menu,
nav.navbar .dropdown-menu,
.navbar-dark .dropdown-menu {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    padding: 0.5rem 0 !important;
    margin-top: 0.5rem !important;
    z-index: 1050 !important;
}

/* Dropdown items - dark text on white background */
.navbar .dropdown-menu .dropdown-item,
.dropdown-menu .dropdown-item,
nav.navbar .dropdown-menu .dropdown-item,
.navbar-dark .dropdown-menu .dropdown-item {
    color: #374151 !important;
    font-weight: 500 !important;
    font-size: 0.9rem !important;
    text-shadow: none !important;
    padding: 0.625rem 1.25rem !important;
    display: flex !important;
    align-items: center !important;
    transition: all 0.15s ease !important;
}

/* Dropdown item icons - PRIMARY BLUE for visibility */
.navbar .dropdown-menu .dropdown-item i,
.navbar .dropdown-menu .dropdown-item .fas,
.navbar .dropdown-menu .dropdown-item .fab,
.navbar .dropdown-menu .dropdown-item .bi,
.dropdown-menu .dropdown-item i,
.dropdown-menu .dropdown-item .fas,
.dropdown-menu .dropdown-item .fab,
.dropdown-menu .dropdown-item .bi {
    color: #3b82f6 !important;
    width: 1.25rem !important;
    text-align: center !important;
    opacity: 1 !important;
    flex-shrink: 0 !important;
}

/* Active/selected dropdown item - when on that page */
.navbar .dropdown-menu .dropdown-item.active,
.dropdown-menu .dropdown-item.active,
.navbar .dropdown-menu .dropdown-item[aria-current="page"],
.dropdown-menu .dropdown-item[aria-current="page"] {
    background-color: #dbeafe !important;
    color: #1e40af !important;
    font-weight: 600 !important;
    border-left: 3px solid #3b82f6 !important;
}

.navbar .dropdown-menu .dropdown-item.active i,
.dropdown-menu .dropdown-item.active i {
    color: #1e40af !important;
}

/* Preserve brand-colored icons in dropdown (Facebook, Google, etc.) */
.dropdown-menu .dropdown-item i.text-primary,
.dropdown-menu .dropdown-item .text-primary,
.navbar .dropdown-menu .dropdown-item i.text-primary {
    color: #3b82f6 !important;
}

.dropdown-menu .dropdown-item i.text-danger,
.dropdown-menu .dropdown-item .text-danger,
.navbar .dropdown-menu .dropdown-item i.text-danger {
    color: #ef4444 !important;
}

.dropdown-menu .dropdown-item i.text-warning,
.dropdown-menu .dropdown-item .text-warning,
.navbar .dropdown-menu .dropdown-item i.text-warning {
    color: #f59e0b !important;
}

.dropdown-menu .dropdown-item i.text-success,
.dropdown-menu .dropdown-item .text-success,
.navbar .dropdown-menu .dropdown-item i.text-success {
    color: #10b981 !important;
}

/* Dropdown item hover state */
.navbar .dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:hover,
nav.navbar .dropdown-menu .dropdown-item:hover {
    background-color: #f3f4f6 !important;
    color: #1e40af !important;
}

/* Icon color on hover */
.navbar .dropdown-menu .dropdown-item:hover i,
.dropdown-menu .dropdown-item:hover i,
.navbar .dropdown-menu .dropdown-item:hover .fas,
.navbar .dropdown-menu .dropdown-item:hover .fab,
.navbar .dropdown-menu .dropdown-item:hover .bi {
    color: #3b82f6 !important;
}

/* Keep brand colors on hover */
.dropdown-menu .dropdown-item:hover i.text-primary {
    color: #2563eb !important;
}

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

/* Dropdown headers - uppercase, small, dark gray */
.navbar .dropdown-menu .dropdown-header,
.dropdown-menu .dropdown-header,
.navbar .dropdown-menu h6.dropdown-header,
.dropdown-menu h6.dropdown-header,
nav.navbar .dropdown-menu .dropdown-header {
    color: #374151 !important;
    font-weight: 700 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 0.625rem 1.25rem !important;
    text-shadow: none !important;
    background: transparent !important;
}

/* Dropdown header icons - blue for visibility */
.navbar .dropdown-menu .dropdown-header i,
.dropdown-menu .dropdown-header i,
.dropdown-menu h6.dropdown-header i {
    color: #3b82f6 !important;
    opacity: 1 !important;
    width: 1rem !important;
}

/* Dropdown dividers */
.navbar .dropdown-menu .dropdown-divider,
.dropdown-menu .dropdown-divider,
nav.navbar .dropdown-menu .dropdown-divider {
    border-top: 1px solid #e5e7eb !important;
    margin: 0.5rem 0 !important;
}

/* Navbar toggler for mobile */
.navbar-toggler,
.navbar-dark .navbar-toggler {
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 6px !important;
}

.navbar-toggler:focus,
.navbar-dark .navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2) !important;
}

.navbar-toggler-icon,
.navbar-dark .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Mobile responsive navbar */
@media (max-width: 991px) {
    .navbar-collapse {
        background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%) !important;
        margin: 0.5rem -1rem 0 !important;
        padding: 1rem !important;
        border-radius: 8px !important;
    }

    .navbar .dropdown-menu {
        background: rgba(255, 255, 255, 0.98) !important;
    }
}

/* ==================== MODALS ==================== */
.modal-header {
    background: var(--primary-600);
    color: var(--text-on-dark);
}

.modal-header .modal-title,
.modal-header .btn-close {
    color: var(--text-on-dark);
}

.modal-body {
    color: var(--text-on-light);
}

/* ==================== DROPDOWNS ==================== */
.dropdown-menu {
    background: var(--white);
    border: 1px solid var(--gray-200);
}

.dropdown-item {
    color: var(--text-on-light);
}

.dropdown-item:hover {
    background: var(--gray-100);
    color: var(--text-on-light);
}

/* ==================== TABS ==================== */
/* Inactive tabs: light gray background, BLACK text */
.nav-tabs .nav-link,
.nav-pills .nav-link,
.decision-tab,
button.decision-tab {
    background: var(--tab-inactive-bg) !important;
    color: var(--tab-inactive-text) !important;
    border: 1px solid var(--gray-300);
    font-weight: var(--font-semibold);
}

/* Active tabs: blue background, WHITE text */
.nav-tabs .nav-link.active,
.nav-pills .nav-link.active,
.decision-tab.active,
button.decision-tab.active {
    background: var(--tab-active-bg) !important;
    color: var(--tab-active-text) !important;
    border-color: var(--tab-active-bg) !important;
}

/* ==================== BACKGROUND UTILITIES ==================== */
/* Dark backgrounds → White text */
.bg-primary,
.bg-primary *:not(input):not(select):not(textarea):not(.form-control):not(.form-select):not(.dropdown-item) {
    color: var(--text-on-dark) !important;
}

.bg-success,
.bg-success *:not(input):not(select):not(textarea):not(.form-control):not(.form-select):not(.dropdown-item) {
    color: var(--text-on-dark) !important;
}

.bg-danger,
.bg-danger *:not(input):not(select):not(textarea):not(.form-control):not(.form-select):not(.dropdown-item) {
    color: var(--text-on-dark) !important;
}

.bg-info,
.bg-info *:not(input):not(select):not(textarea):not(.form-control):not(.form-select):not(.dropdown-item) {
    color: var(--text-on-dark) !important;
}

/* Warning background - dark amber text */
.bg-warning,
.bg-warning * {
    color: var(--text-on-warning) !important;
}

/* Light backgrounds → Dark text */
.bg-light,
.bg-light *,
.bg-secondary,
.bg-secondary * {
    color: var(--text-on-light) !important;
}

/* Opacity variants - light yellow background with dark text */
.bg-warning.bg-opacity-10,
.bg-warning.bg-opacity-10 *,
.bg-warning.bg-opacity-25,
.bg-warning.bg-opacity-25 * {
    color: var(--text-on-warning) !important;
}

/* ==================== GRADIENT BACKGROUNDS ==================== */
/* Any element with inline gradient gets white text */
[style*="linear-gradient"],
[style*="linear-gradient"] *:not(input):not(select):not(textarea):not(.form-control):not(.form-select):not(.dropdown-item) {
    color: var(--text-on-dark) !important;
}

/* ==================== AUTONOMOUS PAGE SPECIFIC ==================== */
.autonomy-status-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
}

.autonomy-status-card,
.autonomy-status-card * {
    color: var(--text-on-light) !important;
}

.autonomy-status-card .form-select,
.autonomy-status-card select {
    color: var(--text-on-light) !important;
    background: var(--white) !important;
}

.autonomy-status-card label {
    color: var(--gray-600) !important;
}

.decision-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
}

.decision-type {
    color: var(--text-on-light);
}

.decision-time,
.decision-meta {
    color: var(--text-on-light-muted);
}

.empty-state {
    color: var(--text-on-light-muted);
}

.learning-card {
    background: var(--info-50);
    border-left: 4px solid var(--info-600);
}

.learning-insight {
    color: var(--info-700);
}

.learning-action {
    color: var(--text-on-light-secondary);
}

/* ==================== BTN-CHECK (Day Selectors) ==================== */
.btn-check {
    position: absolute;
    clip: rect(0, 0, 0, 0);
    pointer-events: none;
}

.btn-check + .btn {
    color: var(--primary-600);
    background-color: transparent;
    border-color: var(--primary-600);
}

.btn-check:checked + .btn,
.btn-check:active + .btn {
    color: var(--text-on-dark) !important;
    background-color: var(--primary-600) !important;
    border-color: var(--primary-600) !important;
}

/* ==================== PROGRESS BARS ==================== */
.progress {
    background: var(--gray-200);
}

.progress-bar {
    background: var(--primary-600);
}

/* ==================== LIST GROUPS ==================== */
.list-group-item {
    color: var(--text-on-light);
    border-color: var(--gray-200);
}

.list-group-item:hover {
    background: var(--gray-50);
}

/* ==================== KPI ICONS ==================== */
.kpi-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.kpi-icon.primary {
    background: var(--primary-100);
    color: var(--primary-600) !important;
}

.kpi-icon.success {
    background: var(--success-100);
    color: var(--success-600) !important;
}

.kpi-icon.warning {
    background: var(--warning-100);
    color: var(--warning-700) !important;
}

.kpi-icon.danger {
    background: var(--danger-100);
    color: var(--danger-600) !important;
}

.kpi-icon.info {
    background: var(--info-100);
    color: var(--info-600) !important;
}

/* ==================== STAT ICONS (Circular) ==================== */
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-icon.primary {
    background: var(--primary-100);
    color: var(--primary-600) !important;
}

.stat-icon.success {
    background: var(--success-100);
    color: var(--success-600) !important;
}

.stat-icon.warning {
    background: var(--warning-100);
    color: var(--warning-700) !important;
}

.stat-icon.danger {
    background: var(--danger-100);
    color: var(--danger-600) !important;
}

.stat-icon.info {
    background: var(--info-100);
    color: var(--info-600) !important;
}

/* ==================== SUMMARY ICONS (Solid Background) ==================== */
.summary-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--text-on-dark) !important;
}

.summary-icon.primary {
    background: var(--primary-600);
}

.summary-icon.success {
    background: var(--success-600);
}

.summary-icon.warning {
    background: var(--warning-500);
    color: var(--text-on-warning) !important;
}

.summary-icon.danger {
    background: var(--danger-600);
}

.summary-icon.info {
    background: var(--info-600);
}

/* ==================== LEGEND COLORS (Calendar/Charts) ==================== */
.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    display: inline-block;
}

.legend-color.appointment {
    background: var(--primary-600);
}

.legend-color.follow-up {
    background: var(--success-600);
}

.legend-color.reminder {
    background: var(--warning-500);
}

.legend-color.deadline {
    background: var(--danger-600);
}

.legend-color.other {
    background: var(--gray-500);
}

/* ==================== STATUS INDICATORS ==================== */
.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.active, .status-dot.success {
    background: var(--success-500);
}

.status-dot.pending, .status-dot.warning {
    background: var(--warning-500);
}

.status-dot.inactive, .status-dot.danger {
    background: var(--danger-500);
}

.status-dot.info {
    background: var(--info-500);
}

/* ==================== METRIC CARDS ==================== */
.metric-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.metric-value {
    font-size: 2rem;
    font-weight: var(--font-bold);
    color: var(--text-on-light);
}

.metric-label {
    color: var(--text-on-light-muted);
    font-size: 0.875rem;
}

.metric-change.positive {
    color: var(--success-600) !important;
}

.metric-change.negative {
    color: var(--danger-600) !important;
}

/* ==================== CHART CONTAINERS ==================== */
.chart-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.chart-card h3 {
    color: var(--text-on-light);
    margin-bottom: 1rem;
}

/* ==================== LEADERBOARD ==================== */
.leaderboard-table thead th {
    background: var(--primary-600);
    color: var(--text-on-dark) !important;
}

.leaderboard-table tbody td {
    color: var(--text-on-light);
}

/* ==================== RESPONSE TIME SECTION ==================== */
.response-summary-grid .summary-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1rem;
}

.response-summary-grid .summary-value {
    font-size: 1.5rem;
    font-weight: var(--font-bold);
    color: var(--text-on-light);
}

.response-summary-grid .summary-label {
    color: var(--text-on-light-muted);
}

/* ==================== CAMPAIGN/CHANNEL CARDS ==================== */
.campaign-card,
.channel-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
}

.campaign-card .card-header,
.channel-card .card-header {
    background: var(--gray-50);
    color: var(--text-on-light);
}

/* ==================== HEALTH MONITOR ==================== */
.health-status.healthy {
    color: var(--success-600) !important;
}

.health-status.warning {
    color: var(--warning-600) !important;
}

.health-status.critical {
    color: var(--danger-600) !important;
}

/* ==================== FINANCING STATS ==================== */
.finance-stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
}

.finance-stat-value {
    font-size: 2rem;
    font-weight: var(--font-bold);
    color: var(--text-on-light);
}

/* ==================== WORKFLOW/AUTOMATION ==================== */
.workflow-step {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
}

.workflow-step.active {
    border-color: var(--primary-500);
    background: var(--primary-50);
}

.workflow-step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-600);
    color: var(--text-on-dark) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-bold);
}

/* ==================== INBOX/MESSAGES ==================== */
.message-item {
    border-bottom: 1px solid var(--gray-200);
}

.message-item:hover {
    background: var(--gray-50);
}

.message-sender {
    color: var(--text-on-light);
    font-weight: var(--font-semibold);
}

.message-preview {
    color: var(--text-on-light-muted);
}

.message-time {
    color: var(--text-on-light-muted);
    font-size: 0.75rem;
}

/* ==================== ICON COLORS (FA icons) ==================== */
.icon-primary {
    color: var(--primary-600) !important;
}

.icon-success {
    color: var(--success-600) !important;
}

.icon-warning {
    color: var(--warning-600) !important;
}

.icon-danger {
    color: var(--danger-600) !important;
}

.icon-info {
    color: var(--info-600) !important;
}

/* ==================== LOGIN PAGE ==================== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-900) 0%, var(--primary-800) 25%, var(--primary-600) 50%, var(--primary-500) 75%, var(--primary-400) 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    margin: 1rem;
}

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

.login-title {
    color: var(--primary-600);
    font-size: 1.75rem;
    font-weight: var(--font-bold);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--text-on-light);
    font-size: 1rem;
}

/* ==================== PAGE HEADER ==================== */
.page-header {
    background: var(--gradient-page-header);
    color: var(--text-on-dark);
    padding: 2rem 2.5rem;
    border-radius: var(--radius-xl);
    margin-top: 1rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.page-header h1,
.page-header h2,
.page-header h3 {
    color: var(--text-on-dark) !important;
    margin-top: 0 !important;
    margin-bottom: 0.75rem !important;
    font-weight: var(--font-semibold);
    font-size: 1.75rem;
    line-height: 1.3;
}

.page-header p,
.page-header .text-muted {
    color: var(--text-on-dark-secondary) !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    font-size: 1rem;
    line-height: 1.5;
}

.page-header .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.6);
    color: var(--text-on-dark);
    padding: 0.5rem 1.25rem;
    font-weight: var(--font-semibold);
}

.page-header .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--white);
}

/* ==================== HEALTH HEADER (health-monitor.html) ==================== */
/* Force white text on gradient background */
.health-header,
.health-header h1,
.health-header h2,
.health-header h3,
.health-header p,
.health-header .last-updated,
.health-header span {
    color: #ffffff !important;
}

.health-header i {
    color: #ffffff !important;
}

/* ==================== SECTION HEADER (ssh-guide.html) ==================== */
/* Force white text on gradient background */
.section-header,
.section-header h1,
.section-header h2,
.section-header h3,
.section-header p,
.section-header span {
    color: #ffffff !important;
}

.section-header i {
    color: #ffffff !important;
}

/* ==================== FULL WIDTH PAGES ==================== */
/* Make certain pages use full width instead of container max-width */
body[data-page="health-monitor"] .container,
body[data-page="ssh-guide"] .container {
    max-width: 100% !important;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
}

/* ==================== STAT CARDS ==================== */
.stat-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    min-height: 120px;
    border-top: 4px solid var(--gray-300);
    transition: all 0.2s ease;
}

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

/* Colored border variants */
.stat-card.border-primary,
.stat-card.blue {
    border-top-color: var(--primary-600) !important;
}

.stat-card.border-success,
.stat-card.green {
    border-top-color: var(--success-500) !important;
}

.stat-card.border-danger,
.stat-card.red {
    border-top-color: var(--danger-500) !important;
}

.stat-card.border-warning,
.stat-card.orange {
    border-top-color: var(--warning-500) !important;
}

.stat-card.border-info,
.stat-card.cyan {
    border-top-color: var(--info-500) !important;
}

.stat-card .stat-number,
.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: var(--font-bold);
    line-height: 1.2;
    margin-bottom: 0.5rem;
    color: var(--text-on-light);
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: var(--text-on-light-muted);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    font-weight: var(--font-medium);
}

.stat-card .stat-icon {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    color: var(--gray-200);
}

/* ==================== FADE IN ANIMATION ==================== */
.fade-in-up {
    animation: fadeInUp 0.5s ease-out;
}

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

/* ==================== CHECKBOX STYLING ==================== */
/* Make checkboxes more visible with clear check marks */
.form-check-input {
    width: 1.1em !important;
    height: 1.1em !important;
    border: 2px solid var(--gray-400) !important;
    background-color: var(--white) !important;
    cursor: pointer !important;
}

.form-check-input:hover {
    border-color: var(--primary-500) !important;
    background-color: var(--primary-50) !important;
}

.form-check-input:checked {
    background-color: var(--primary-600) !important;
    border-color: var(--primary-600) !important;
}

/* Force visible checkmark when checked */
.form-check-input:checked::after {
    content: '✓' !important;
    color: white !important;
    font-size: 0.9em !important;
    font-weight: bold !important;
    display: block !important;
    text-align: center !important;
    line-height: 1 !important;
}

/* Table header checkbox visibility */
table thead .form-check-input,
.table thead .form-check-input,
th .form-check-input {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ensure checkbox is visible on hover in table header */
table thead th:hover .form-check-input,
.table thead th:hover .form-check-input {
    border-color: var(--primary-500) !important;
}

/* ==================== BUTTON ICON SPACING ==================== */
/* Add proper spacing between icon and text in buttons */
.btn i + span,
.btn .fas + span,
.btn .fab + span,
.btn .bi + span,
.btn .fa + span,
.btn i:not(:last-child),
.btn .fas:not(:last-child),
.btn .fab:not(:last-child),
.btn .bi:not(:last-child),
.btn .fa:not(:last-child) {
    margin-right: 0.5rem !important;
}

/* Icon after text */
.btn span + i,
.btn span + .fas,
.btn span + .fab,
.btn span + .bi {
    margin-left: 0.5rem !important;
}

/* Modal buttons specifically */
.modal-footer .btn i,
.modal-body .btn i {
    margin-right: 0.4rem !important;
}

/* ==================== SELECTED ROWS HEADER ==================== */
/* Make selected rows header buttons more visible and spaced */
.selected-rows-header,
.bulk-actions-bar,
#selectedRowsHeader {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    padding: 0.75rem 1rem !important;
    background: var(--primary-50) !important;
    border: 1px solid var(--primary-200) !important;
    border-radius: var(--radius-lg) !important;
    margin-bottom: 1rem !important;
}

.selected-rows-header .btn,
.bulk-actions-bar .btn,
#selectedRowsHeader .btn {
    margin: 0 0.25rem !important;
    white-space: nowrap !important;
}

/* ==================== PAGINATION STYLING ==================== */
/* Make active pagination button clearly visible */
.pagination .page-link {
    color: var(--primary-600) !important;
    background-color: var(--white) !important;
    border-color: var(--gray-300) !important;
    padding: 0.5rem 0.75rem !important;
}

.pagination .page-item.active .page-link,
.pagination .page-link.active {
    background-color: var(--primary-600) !important;
    border-color: var(--primary-600) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3) !important;
}

.pagination .page-link:hover {
    background-color: var(--primary-50) !important;
    border-color: var(--primary-300) !important;
}

/* ==================== TOAST STYLING ==================== */
/* Make toast titles white and visible */
.toast-header,
.toast .toast-header {
    background: var(--primary-600) !important;
    color: #ffffff !important;
    border-bottom: none !important;
}

.toast-header strong,
.toast-header .me-auto,
.toast .toast-header strong {
    color: #ffffff !important;
}

.toast-header .btn-close {
    filter: invert(1) !important;
}

.toast-body {
    background: var(--white) !important;
    color: var(--text-on-light) !important;
}

/* Success toast */
.toast.bg-success .toast-header,
.toast-success .toast-header {
    background: var(--success-600) !important;
}

/* Danger toast */
.toast.bg-danger .toast-header,
.toast-danger .toast-header {
    background: var(--danger-600) !important;
}

/* Warning toast */
.toast.bg-warning .toast-header,
.toast-warning .toast-header {
    background: var(--warning-600) !important;
    color: var(--text-on-warning) !important;
}

.toast.bg-warning .toast-header strong {
    color: var(--text-on-warning) !important;
}

/* ==================== CALENDAR STYLING ==================== */

/* ========== MONTH VIEW - Date Numbers Visibility ========== */
/* Force date numbers to be visible with high specificity */
.fc .fc-daygrid-day-number,
.fc-daygrid-day-number,
.fc .fc-daygrid-day-top,
.fc .fc-daygrid-day-top a,
.fc td.fc-daygrid-day .fc-daygrid-day-number,
.fc .fc-daygrid-day .fc-daygrid-day-top .fc-daygrid-day-number,
a.fc-daygrid-day-number {
    color: #1f2937 !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    text-decoration: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* Today's date - emphasized */
.fc .fc-day-today .fc-daygrid-day-number,
.fc .fc-daygrid-day.fc-day-today .fc-daygrid-day-top a {
    color: #2563eb !important;
    font-weight: 700 !important;
    background-color: rgba(37, 99, 235, 0.1) !important;
    border-radius: 50% !important;
    padding: 2px 6px !important;
}

/* Past dates - slightly muted */
.fc .fc-day-past .fc-daygrid-day-number {
    color: #6b7280 !important;
}

/* Day header row (SUN, MON, TUE...) - keep white on blue background */
.fc .fc-col-header-cell-cushion,
.fc-col-header-cell-cushion {
    color: #ffffff !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* ========== LIST VIEW - Text Contrast Fix ========== */
/* List view events have colored backgrounds - text must be WHITE */
.fc-list-event,
.fc-list-event td {
    color: #ffffff !important;
}

/* Event title in list view - WHITE text */
.fc .fc-list-event-title,
.fc-list-event-title,
.fc .fc-list-event-title a,
.fc-list-event td.fc-list-event-title,
.fc-list-event-title a {
    color: #ffffff !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

/* Event time in list view - WHITE text */
.fc .fc-list-event-time,
.fc-list-event-time,
.fc-list-event td.fc-list-event-time {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

/* List day header (Monday, December 1, 2025) - keep dark text on light bg */
.fc .fc-list-day-cushion,
.fc-list-day-cushion {
    background: var(--gray-100) !important;
    color: #1f2937 !important;
    font-weight: 700 !important;
}

/* List day header text */
.fc-list-day-cushion a,
.fc .fc-list-day-cushion a {
    color: #1f2937 !important;
}

/* ========== MONTH/WEEK VIEW - Event Text White ========== */
/* Events on month grid and week/day time grid need white text */
.fc-daygrid-event,
.fc-daygrid-event .fc-event-title,
.fc-daygrid-event .fc-event-time,
.fc-daygrid-dot-event .fc-event-title,
.fc-timegrid-event,
.fc-timegrid-event .fc-event-title,
.fc-timegrid-event .fc-event-time {
    color: #ffffff !important;
}

/* Event title in daygrid (month view) */
.fc .fc-daygrid-event-harness .fc-event-title,
.fc .fc-daygrid-event .fc-event-title-container {
    color: #ffffff !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* Event time in month view */
.fc .fc-daygrid-event .fc-event-time {
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* Week/Day view events */
.fc-timegrid-event .fc-event-main {
    color: #ffffff !important;
}

.fc-timegrid-event-harness .fc-event-title,
.fc-timegrid-event-harness .fc-event-time {
    color: #ffffff !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

/* ========== Calendar Container Spacing ========== */
/* More bottom margin to separate from footer */
.fc,
#calendar {
    margin-bottom: 3rem !important;
}

.calendar-container {
    margin-bottom: 3rem !important;
    padding-bottom: 1rem !important;
}

/* Calendar statistics popup headings */
.calendar-stats h5,
.calendar-stats h6,
#calendarStatsModal h5,
#calendarStatsModal h6 {
    color: var(--text-on-light) !important;
}

/* Event type color label - force white text */
.event-color-label,
.color-label-text {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3) !important;
}

/* ==================== BADGE TEXT VISIBILITY ==================== */
/* Ensure badge text is visible - especially Source badges */
.badge {
    font-size: 0.75rem !important;
    padding: 0.35em 0.65em !important;
}

.badge.bg-secondary {
    background-color: var(--gray-500) !important;
    color: #ffffff !important;
}

.badge.bg-light {
    background-color: var(--gray-200) !important;
    color: var(--gray-800) !important;
}

/* Source badge specific styling */
.source-badge,
.lead-source-badge {
    background-color: var(--primary-100) !important;
    color: var(--primary-800) !important;
    font-weight: 500 !important;
}

/* ==================== VALIDATION ERROR COLORS ==================== */
/* Make validation errors more visible with red color */
.invalid-feedback,
.form-text.text-danger,
.text-danger.small,
.error-message,
.validation-error {
    color: var(--danger-600) !important;
    font-weight: 500 !important;
}

.is-invalid,
.was-validated .form-control:invalid {
    border-color: var(--danger-500) !important;
}

.is-invalid:focus,
.was-validated .form-control:invalid:focus {
    border-color: var(--danger-500) !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* ==================== LOGIN PAGE FIXES ==================== */
/* Align Remember checkbox and label vertically */
.login-card .form-check,
.login-form .form-check {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.login-card .form-check-input,
.login-form .form-check-input {
    margin-top: 0 !important;
}

.login-card .form-check-label,
.login-form .form-check-label {
    margin-bottom: 0 !important;
}

/* ==================== PROSPECTS PAGE HEADER ==================== */
/* Match prospects header to other page headers */
.prospects-header,
body[data-page="prospects"] .page-header,
#prospectsHeader {
    background: var(--gradient-page-header) !important;
    color: var(--text-on-dark) !important;
    padding: 2rem 2.5rem !important;
    border-radius: var(--radius-xl) !important;
    margin-top: 1rem !important;
    margin-bottom: 2rem !important;
    box-shadow: var(--shadow-md) !important;
}

.prospects-header h1,
.prospects-header h2,
body[data-page="prospects"] .page-header h1,
body[data-page="prospects"] .page-header h2 {
    color: #ffffff !important;
}

.prospects-header p,
body[data-page="prospects"] .page-header p {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* ==================== TABLE ACTION BUTTONS ==================== */
/* Reduce size of action buttons in table rows */
.table .btn-sm,
.table .btn-group-sm .btn {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.75rem !important;
}

.table .btn-group {
    gap: 0.25rem !important;
}

/* ==================== FILTER PANEL ALIGNMENT ==================== */
/* Align Show Archived checkbox with search */
.filter-panel .form-check,
.filters .form-check {
    display: inline-flex !important;
    align-items: center !important;
    margin-left: 1rem !important;
}

/* ==================== BROWSE FILES BUTTON ==================== */
/* Fix Browse Files text color */
.file-upload-btn,
.browse-files-btn,
input[type="file"]::file-selector-button {
    color: var(--primary-600) !important;
    background: var(--primary-50) !important;
    border: 1px solid var(--primary-300) !important;
    padding: 0.375rem 0.75rem !important;
    border-radius: var(--radius) !important;
    cursor: pointer !important;
}

input[type="file"]::file-selector-button:hover {
    background: var(--primary-100) !important;
}

/* ==================== HEALTH MONITOR PAGE ==================== */
/* Health monitor specific styles - extracted from health-monitor.html inline CSS */

.health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.health-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.health-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gray-300);
}

.health-card.healthy::before {
    background: var(--success-500);
}

.health-card.warning::before {
    background: var(--warning-500);
}

.health-card.error::before {
    background: var(--danger-500);
}

.health-card-title {
    font-size: 1.2rem;
    font-weight: var(--font-semibold);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: var(--font-medium);
}

.status-badge.healthy {
    background: var(--success-100);
    color: var(--success-700);
}

.status-badge.warning {
    background: var(--warning-100);
    color: var(--warning-700);
}

.status-badge.error {
    background: var(--danger-100);
    color: var(--danger-700);
}

.health-details {
    font-size: 0.9rem;
    color: var(--text-on-light-secondary);
    line-height: 1.6;
}

.health-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.health-detail-item:last-child {
    border-bottom: none;
}

.refresh-btn {
    background: var(--white);
    color: var(--primary-600);
    border: 2px solid var(--primary-600);
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-weight: var(--font-medium);
    transition: all 0.3s;
}

.refresh-btn:hover {
    background: var(--primary-600);
    color: var(--text-on-dark);
}

.refresh-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.last-updated {
    color: var(--text-on-dark-muted);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.endpoints-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.endpoint-item {
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.endpoint-item.success {
    background: var(--success-100);
}

.endpoint-item.failure {
    background: var(--danger-100);
}

.endpoint-item.warning {
    background: var(--warning-100);
}

.spinner {
    border: 3px solid var(--gray-200);
    border-radius: 50%;
    border-top: 3px solid var(--primary-600);
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==================== PHONE & MESSAGES PAGES ==================== */
/* Shared styles between phone.html and messages.html */

.change-positive {
    color: var(--success-600);
}

.change-negative {
    color: var(--danger-600);
}

.badge-inbound {
    background-color: var(--success-600);
    color: var(--text-on-dark);
}

.badge-outbound {
    background-color: var(--primary-600);
    color: var(--text-on-dark);
}

.badge-delivered {
    background-color: var(--success-600);
    color: var(--text-on-dark);
}

.badge-failed {
    background-color: var(--danger-600);
    color: var(--text-on-dark);
}

.row-missed {
    background-color: var(--warning-100);
}

.row-active {
    background-color: var(--info-100);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

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

.message-body {
    max-width: 400px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-row-failed {
    background-color: var(--warning-100);
}

/* ==================== TEMPLATES PAGE ==================== */
/* Extracted from templates.html inline CSS */

.template-card {
    transition: all 0.3s;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

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

.template-type-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: var(--font-semibold);
    text-transform: uppercase;
}

.template-type-sms {
    background: var(--info-100);
    color: var(--info-700);
}

.template-type-email {
    background: var(--success-100);
    color: var(--success-700);
}

.template-preview {
    background: var(--gray-50);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    max-height: 300px;
    overflow-y: auto;
}

.variable-tag {
    display: inline-block;
    background: var(--warning-100);
    color: var(--warning-800);
    padding: 0.1rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin: 0.2rem;
    font-family: 'Courier New', monospace;
}

.tabs-container {
    border-bottom: 2px solid var(--gray-300);
    margin-bottom: 2rem;
}

.tab-button {
    background: none;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: var(--font-medium);
    color: var(--text-on-light-secondary);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-button:hover {
    color: var(--primary-600);
}

.tab-button.active {
    color: var(--primary-600);
    border-bottom-color: var(--primary-600);
}

/* ==================== CAMPAIGN INTELLIGENCE PAGE ==================== */
/* Extracted from campaign-intelligence.html inline CSS */

.winner-card {
    border-left: 5px solid var(--success-500);
    transition: all 0.2s;
}

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

.opportunity-card {
    border-left: 5px solid var(--info-500);
}

.audience-card {
    border-left: 5px solid var(--warning-500);
}

.metric-badge {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: var(--font-semibold);
}

.roi-positive {
    background: var(--success-50);
    color: var(--success-700);
}

.confidence-high {
    background: var(--success-50);
    color: var(--success-700);
}

.confidence-medium {
    background: var(--warning-50);
    color: var(--warning-700);
}

/* ==================== AUTONOMOUS AI PAGE ==================== */
/* Extracted from autonomous.html inline CSS */

.autonomy-status-card {
    border-radius: var(--radius-xl);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
}

.status-item {
    text-align: center;
}

.status-item label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-value {
    font-size: 1.8rem;
    font-weight: var(--font-bold);
}

.status-value select {
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
}

.decision-card {
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s;
    background: var(--white);
    border: 1px solid var(--gray-200);
}

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

.decision-card.pending {
    border-left: 5px solid var(--warning-500);
}

.decision-card.executed {
    border-left: 5px solid var(--success-500);
}

.decision-card.rejected {
    border-left: 5px solid var(--danger-500);
}

.decision-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.decision-type {
    font-weight: var(--font-semibold);
    font-size: 1.1rem;
}

.decision-time {
    font-size: 0.85rem;
    color: var(--text-on-light-secondary);
}

.decision-meta {
    font-size: 0.95rem;
    margin: 0.5rem 0;
    line-height: 1.6;
}

.decision-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.learning-card {
    padding: 1.25rem;
    margin-bottom: 1rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
}

/* ==================== KPI CARDS (Shared) ==================== */
/* Used across multiple pages: templates, analytics, etc. */

.kpi-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.kpi-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.kpi-value {
    font-size: 2rem;
    font-weight: var(--font-bold);
    color: var(--text-on-light);
}

.kpi-label {
    font-size: 0.875rem;
    color: var(--text-on-light-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==================== LOGIN PAGE ==================== */
/* Extracted from login.html inline CSS */

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-500) 100%);
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
}

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

.login-logo img {
    height: 60px;
}

.login-title {
    font-size: 1.5rem;
    font-weight: var(--font-bold);
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text-on-light);
}

.login-subtitle {
    text-align: center;
    color: var(--text-on-light-secondary);
    margin-bottom: 2rem;
}

/* ==================== CHANNEL PERFORMANCE PAGE ==================== */
/* Extracted from channel-performance.html inline CSS */

.channel-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

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

.channel-header {
    padding: 1rem;
    color: var(--white);
}

.channel-header.facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0d5fc2 100%);
}

.channel-header.google {
    background: linear-gradient(135deg, #ea4335 0%, #4285f4 100%);
}

.channel-header.organic {
    background: linear-gradient(135deg, var(--success-500) 0%, var(--success-700) 100%);
}

.channel-header.referral {
    background: linear-gradient(135deg, var(--info-500) 0%, var(--info-700) 100%);
}

/* ==================== FACEBOOK ADS PAGE ==================== */
/* Extracted from facebook-ads.html inline CSS */

.fb-campaign-card {
    border-left: 4px solid #1877f2;
    transition: all 0.2s;
}

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

.fb-status-active {
    background: var(--success-100);
    color: var(--success-700);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: var(--font-semibold);
}

.fb-status-paused {
    background: var(--warning-100);
    color: var(--warning-700);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: var(--font-semibold);
}

/* ==================== ACQUISITION PAGE ==================== */
/* Extracted from acquisition.html inline CSS */

.source-card {
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    transition: all 0.2s;
}

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

.source-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.trend-up {
    color: var(--success-600);
}

.trend-down {
    color: var(--danger-600);
}

/* ==================== ADMIN NURTURE SEQUENCES PAGE ==================== */
/* Extracted from admin-nurture-sequences.html inline CSS */

.sequence-card {
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    transition: all 0.2s;
}

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

.sequence-status-active {
    background: var(--success-100);
    color: var(--success-700);
}

.sequence-status-draft {
    background: var(--gray-100);
    color: var(--gray-700);
}

.step-timeline {
    position: relative;
    padding-left: 30px;
}

.step-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray-300);
}

.step-item {
    position: relative;
    padding: 0.75rem 0;
}

.step-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary-500);
    border: 2px solid var(--white);
    box-shadow: var(--shadow-sm);
}

/* ==================== SSH GUIDE PAGE ==================== */
/* Extracted from ssh-guide.html inline CSS */

.command-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
    transition: all 0.3s cubic-bezier(.25,.8,.25,1);
}

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

.command-code {
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem;
    border-radius: var(--radius-md);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    overflow-x: auto;
    position: relative;
}

.copy-btn {
    position: absolute;
    top: 0.625rem;
    right: 0.625rem;
    background-color: var(--gray-600);
    color: var(--white);
    border: none;
    padding: 0.3rem 0.625rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.75rem;
    transition: background-color 0.2s;
}

.copy-btn:hover {
    background-color: var(--gray-700);
}

.copy-btn.copied {
    background-color: var(--success-500);
}

.category-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    margin-bottom: 0.625rem;
}

.badge-monitoring { background-color: var(--info-100); color: var(--info-700); }
.badge-docker { background-color: var(--success-100); color: var(--success-700); }
.badge-logs { background-color: var(--warning-100); color: var(--warning-700); }
.badge-system { background-color: #f3e5f5; color: #7b1fa2; }
.badge-database { background-color: #e0f2f1; color: #00796b; }
.badge-maintenance { background-color: #fce4ec; color: #c2185b; }
.badge-network { background-color: #e8eaf6; color: #3f51b5; }

/* ==================== SYSTEM MONITOR PAGE ==================== */
/* Extracted from system-monitor.html inline CSS */

.terminal-container {
    background: var(--gray-900);
    color: var(--gray-300);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    min-height: 400px;
    max-height: 600px;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.terminal-header {
    background: var(--gradient-primary);
    color: var(--text-on-dark);
    padding: 2rem 2.5rem;
    border-radius: var(--radius-lg);
    margin-top: 1rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.command-input {
    background: #2d2d30;
    color: #d4d4d4;
    border: 1px solid #3e3e42;
    padding: 0.75rem;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    width: 100%;
    margin-bottom: 1rem;
    border-radius: var(--radius-md);
}

.command-input:focus {
    outline: none;
    border-color: var(--primary-600);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.execute-btn {
    background: var(--primary-600);
    color: var(--white);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-md);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all 0.3s;
}

.execute-btn:hover {
    background: var(--primary-700);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.execute-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.output-line {
    margin: 0.25rem 0;
    padding: 0.25rem 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.output-line.command {
    color: #569cd6;
    font-weight: var(--font-bold);
}

.output-line.success {
    color: #4ec9b0;
}

.output-line.error {
    color: #f14c4c;
}

/* ==================== GOOGLE ADS PAGE ==================== */
/* Extracted from google-ads.html inline CSS */

.google-gradient {
    background: linear-gradient(135deg, #4285f4 0%, #34a853 50%, #fbbc05 75%, #ea4335 100%);
    color: var(--white);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.campaign-row {
    transition: background-color 0.2s;
}

.campaign-row:hover {
    background-color: var(--gray-50);
}

.status-active { background: var(--success-100); color: var(--success-700); }
.status-paused { background: var(--warning-100); color: var(--warning-700); }
.status-ended { background: var(--danger-100); color: var(--danger-700); }

.budget-input {
    max-width: 120px;
}

.sync-status {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.sync-success {
    background-color: var(--success-100);
    color: var(--success-700);
    border: 1px solid var(--success-300);
}

.sync-warning {
    background-color: var(--warning-100);
    color: var(--warning-700);
    border: 1px solid var(--warning-300);
}

.sync-error {
    background-color: var(--danger-100);
    color: var(--danger-700);
    border: 1px solid var(--danger-300);
}

/* ==================== ANALYTICS & AUTOMATIONS PAGES ==================== */
/* Grid layouts for KPI cards and charts */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.chart-card h3 {
    font-size: 1.1rem;
    font-weight: var(--font-semibold);
    margin-bottom: 1rem;
    color: var(--text-on-light);
}

.chart-card h3 i {
    color: var(--primary-500);
    margin-right: 0.5rem;
}
