/* ============================
   Match Together - Professional Design System
   VSLO-Style Clean & Enterprise
   ============================ */

/* ============================
   DESIGN SYSTEM VARIABLES
   ============================ */
:root, [data-theme="light"] {
    /* VSLO-Style Professional Colors */
    --color-navy: #002D5C;           /* Primary brand - navy blue */
    --color-navy-light: #003D7A;     /* Lighter navy */
    --color-blue: #0066CC;           /* Accent blue */
    --color-blue-light: #E6F0FF;     /* Light blue bg */

    /* Background Colors */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-tertiary: #F1F3F5;
    --bg-card: #FFFFFF;

    /* Text Colors */
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #6C757D;

    /* Border Colors */
    --border-color: #DEE2E6;
    --border-light: #E9ECEF;

    /* Semantic Colors */
    --color-success: #28A745;
    --color-warning: #FFC107;
    --color-danger: #DC3545;
    --color-info: #17A2B8;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --text-3xl: 2rem;
    --text-2xl: 1.5rem;
    --text-xl: 1.25rem;
    --text-lg: 1.125rem;
    --text-base: 1rem;
    --text-sm: 0.875rem;
    --text-xs: 0.75rem;

    --font-regular: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;

    /* Transitions */
    --transition: 0.2s ease;
}

/* Dark Mode */
[data-theme="dark"] {
    --color-navy: #1a4d8f;
    --color-navy-light: #245aa3;
    --color-blue: #3399ff;
    --color-blue-light: #1a3a5c;

    --bg-primary: #1a1d24;
    --bg-secondary: #242933;
    --bg-tertiary: #2d3340;
    --bg-card: #2d3340;

    --text-primary: #ffffff;
    --text-secondary: #c5cad4;
    --text-muted: #8a92a3;

    --border-color: #3d4452;
    --border-light: #4a5261;

    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-danger: #ef4444;
    --color-info: #3b82f6;
}

/* Dark mode specific shadows */
[data-theme="dark"] .dashboard-card {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .dashboard-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 4px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .programs-table-container {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .btn {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .login-modal,
[data-theme="dark"] .modal {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 8px 16px rgba(0, 0, 0, 0.4);
    border-color: var(--border-light);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Subtle texture overlay for depth */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.03;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255,255,255,0.03) 2px, rgba(255,255,255,0.03) 4px);
}

[data-theme="light"] body::before {
    opacity: 0.02;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,0,0,0.02) 2px, rgba(0,0,0,0.02) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(0,0,0,0.02) 2px, rgba(0,0,0,0.02) 4px);
}

/* Ensure content sits above texture */
.top-navbar,
.main-content,
.app-container {
    position: relative;
    z-index: 1;
}

/* Focus visible styles for accessibility */
*:focus-visible {
    outline: 2px solid var(--color-navy);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--color-navy);
    outline-offset: 2px;
}

/* Smooth scrolling for all scrollable containers */
* {
    scroll-behavior: smooth;
}

/* Selection styling */
::selection {
    background: var(--color-blue-light);
    color: var(--color-navy);
}

[data-theme="dark"] ::selection {
    background: var(--color-navy-light);
    color: white;
}

/* ============================
   TOP NAVIGATION BAR (VSLO Style)
   ============================ */
.top-navbar {
    background: var(--color-navy);
    color: white;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-6);
    height: 64px;
}

.navbar-brand h1 {
    font-family: var(--font-family);
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: white;
    margin: 0;
    letter-spacing: -0.5px;
}

.brand-subtitle {
    font-family: var(--font-family);
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.8);
    display: block;
    margin-top: 2px;
}

.navbar-nav {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.nav-tab {
    font-family: var(--font-family);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    padding: var(--space-3) var(--space-4);
    cursor: pointer;
    transition: all var(--transition);
    border-bottom: 3px solid transparent;
    height: 64px;
    letter-spacing: 0.3px;
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-tab.active {
    color: white;
    border-bottom-color: white;
    background: rgba(255, 255, 255, 0.15);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.navbar-btn {
    font-family: var(--font-family);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.3px;
}

.navbar-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Theme Toggle Switch */
.theme-toggle {
    font-family: var(--font-family);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
}

.theme-toggle-track {
    width: 44px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    position: relative;
    transition: background 0.3s ease;
}

.theme-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    transition: transform 0.3s ease, background 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Sun icon (light mode indicator) */
.theme-toggle-thumb::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.3);
    transition: opacity 0.3s ease;
}

/* Dark mode - thumb slides right, shows moon */
.theme-toggle.is-dark .theme-toggle-thumb {
    transform: translateX(20px);
}

.theme-toggle.is-dark .theme-toggle-thumb::before {
    background: #94a3b8;
    box-shadow: inset -3px -2px 0 0 #1e293b;
    border-radius: 50%;
}

.theme-toggle.is-dark .theme-toggle-track {
    background: rgba(255, 255, 255, 0.15);
}

.theme-toggle.is-light .theme-toggle-track {
    background: rgba(245, 158, 11, 0.3);
}

#theme-text {
    font-family: var(--font-family);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    min-width: 36px;
    letter-spacing: 0.3px;
}

.user-btn {
    font-family: var(--font-family);
    background: var(--color-blue);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
    font-weight: var(--font-semibold);
    font-size: var(--text-sm);
}

.user-btn:hover {
    background: var(--color-navy-light);
}

.user-initials {
    color: white;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
}

.user-menu {
    position: relative;
}

.user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    padding: var(--space-3);
    animation: dropdownSlide 0.2s ease;
    z-index: 10000;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 12px;
    width: 12px;
    height: 12px;
    background: var(--bg-card);
    border-left: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    transform: rotate(45deg);
}

.user-dropdown button {
    width: 100%;
    text-align: left;
    padding: var(--space-3);
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all var(--transition);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.user-dropdown button:hover {
    background: var(--bg-secondary);
    color: var(--color-navy);
    transform: translateX(2px);
}

.user-dropdown hr {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: var(--space-2) 0;
}

/* ============================
   MAIN CONTENT AREA
   ============================ */
.app-container {
    width: 100%;
}

.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-8) var(--space-6);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.page-header {
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--border-color);
}

.page-header h2 {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin: 0 0 var(--space-2) 0;
}

.page-subtitle {
    font-size: var(--text-base);
    color: var(--text-muted);
    margin: 0;
}

/* ============================
   HORIZONTAL SPECIALTY TABS (Premium Design)
   ============================ */
.horizontal-tabs {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-8);
    border-bottom: 2px solid var(--border-color);
    background: var(--bg-card);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.horiz-tab {
    padding: var(--space-3) var(--space-6);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: all var(--transition);
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    position: relative;
    white-space: nowrap;
}

.horiz-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 3px;
    background: var(--color-navy);
    transition: transform var(--transition);
}

.horiz-tab:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.horiz-tab.active {
    color: var(--color-navy);
    background: rgba(0, 102, 204, 0.05);
}

.horiz-tab.active::after {
    transform: translateX(-50%) scaleX(1);
}

.tab-count {
    display: inline-block;
    background: var(--bg-secondary);
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: var(--font-bold);
    margin-left: 6px;
}

.horiz-tab.active .tab-count {
    background: var(--color-navy);
    color: white;
}

.specialty-view {
    display: none;
    animation: fadeInContent 0.3s ease;
}

.specialty-view.active {
    display: block;
}

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

/* ============================
   CARDS & CONTAINERS (Premium Depth)
   ============================ */
.dashboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    margin-bottom: var(--space-8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all var(--transition);
}

.dashboard-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.dashboard-card h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin: 0 0 var(--space-6) 0;
    padding-bottom: var(--space-4);
    border-bottom: 2px solid var(--bg-secondary);
}

/* ============================
   BUTTONS (Premium Design)
   ============================ */
.btn {
    padding: var(--space-3) var(--space-6);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-navy-light) 0%, var(--color-navy) 100%);
    box-shadow: 0 4px 12px rgba(0, 45, 92, 0.3), 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--color-navy);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

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

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* ============================
   TABLES (Premium Design)
   ============================ */
.programs-table-container {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.programs-table {
    width: 100%;
    border-collapse: collapse;
}

.programs-table thead {
    background: linear-gradient(to bottom, #f8f9fa, #e9ecef);
    border-bottom: 3px solid var(--color-navy);
}

[data-theme="dark"] .programs-table thead {
    background: linear-gradient(to bottom, #2d3340, #242933);
    border-bottom: 3px solid var(--color-navy-light);
}

.programs-table th {
    padding: var(--space-5) var(--space-4);
    text-align: left;
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    color: var(--color-navy);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-theme="dark"] .programs-table th {
    color: var(--text-primary);
}

.programs-table td {
    padding: var(--space-5) var(--space-4);
    border-bottom: 1px solid var(--border-light);
    font-size: var(--text-sm);
    transition: all var(--transition);
}

.programs-table tbody tr {
    transition: all var(--transition);
}

.programs-table tbody tr:hover {
    background: rgba(0, 102, 204, 0.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* When dropdown is open, ensure proper stacking */
.programs-table tbody tr:has(.status-dropdown-menu.open) {
    position: relative;
    z-index: 100;
}

.programs-table tbody tr:last-child td {
    border-bottom: none;
}

.programs-table tbody tr {
    cursor: pointer;
}

.programs-table tbody tr.favorited {
    background: rgba(255, 215, 0, 0.05);
}

[data-theme="dark"] .programs-table tbody tr.favorited {
    background: rgba(255, 215, 0, 0.1);
}

/* Table Input Fields (Date inputs, etc.) */
.programs-table input[type="date"],
.programs-table input[type="text"] {
    font-family: var(--font-family);
    font-size: var(--text-sm);
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-3);
    transition: all var(--transition);
    min-width: 120px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.programs-table input[type="date"]:focus,
.programs-table input[type="text"]:focus {
    outline: none;
    border-color: var(--color-navy);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(26, 77, 143, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
}

.programs-table input[type="date"]:hover,
.programs-table input[type="text"]:hover {
    border-color: var(--border-light);
    background: var(--bg-card);
}

.programs-table input[type="date"]::placeholder,
.programs-table input[type="text"]::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

/* Date input calendar icon styling */
.programs-table input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.7);
    cursor: pointer;
    padding: 2px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.programs-table input[type="date"]::-webkit-calendar-picker-indicator:hover {
    filter: invert(0.5);
    background: rgba(26, 77, 143, 0.1);
}

/* ============================
   ACTION BUTTONS & ICONS
   ============================ */
.action-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    font-size: var(--text-sm);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.action-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--color-navy);
    color: var(--color-navy);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Action Buttons Container */
.action-btns {
    display: flex;
    gap: var(--space-2);
    align-items: center;
    justify-content: center;
}

/* Edit Button - Navy/Blue accent */
.action-btn.edit {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(26, 77, 143, 0.1) 0%, rgba(36, 90, 163, 0.05) 100%);
    border: 1px solid rgba(26, 77, 143, 0.3);
    color: var(--color-navy);
    border-radius: var(--radius-md);
}

.action-btn.edit:hover {
    background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
    border-color: var(--color-navy);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 77, 143, 0.3);
}

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

.action-btn.edit svg {
    width: 16px;
    height: 16px;
}

/* Delete Button - Red accent */
.action-btn.delete {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--color-danger);
    border-radius: var(--radius-md);
}

.action-btn.delete:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #ef4444;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

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

.action-btn.delete svg {
    width: 16px;
    height: 16px;
}

.favorite-btn, .star-btn {
    background: transparent;
    border: none;
    font-size: var(--text-xl);
    cursor: pointer;
    transition: all var(--transition);
    padding: var(--space-2);
}

.favorite-btn:hover, .star-btn:hover {
    transform: scale(1.2);
}

.favorite-btn.favorited, .star-btn.favorited {
    color: #ffd700;
    filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.4));
}

.favorite-btn:not(.favorited), .star-btn:not(.favorited) {
    color: var(--text-muted);
}

/* Favorite star SVG styling */
.favorite-star {
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.favorite-star svg {
    width: 20px;
    height: 20px;
    transition: all var(--transition);
}

.favorite-star:hover svg {
    transform: scale(1.2);
}

.favorite-star.favorited svg {
    color: #ffd700;
    filter: drop-shadow(0 2px 4px rgba(255, 215, 0, 0.4));
}

.favorite-star:not(.favorited) svg {
    color: var(--text-muted);
}

.favorite-star:not(.favorited):hover svg {
    color: #ffd700;
}

/* Toggle chevron animation */
.toggle-chevron {
    transition: transform var(--transition);
}

.toggle-chevron.open {
    transform: rotate(90deg);
}

/* Calendar icon styling */
.calendar-icon {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all var(--transition);
}

.calendar-icon:hover {
    color: var(--color-navy);
}

.calendar-icon svg {
    width: 16px;
    height: 16px;
}

/* ============================
   CUSTOM CALENDAR MODAL
   ============================ */
.calendar-modal-content {
    max-width: 400px;
    width: 100%;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-4);
    border-bottom: 2px solid var(--border-color);
}

#calendar-month-year {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
}

.calendar-nav-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
}

.calendar-nav-btn:hover {
    background: var(--color-navy);
    border-color: var(--color-navy);
    color: white;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--space-2);
    margin-bottom: var(--space-2);
    text-align: center;
}

.calendar-weekday {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--text-muted);
    padding: var(--space-2);
}

#calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    cursor: pointer;
    transition: all var(--transition);
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.calendar-day:hover:not(.empty) {
    background: var(--color-navy);
    color: white;
    transform: scale(1.05);
}

.calendar-day.empty {
    background: transparent;
    border: none;
    cursor: default;
}

.calendar-day.today {
    border: 2px solid var(--color-navy);
    font-weight: var(--font-semibold);
}

.calendar-day.selected {
    background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
    color: white;
    font-weight: var(--font-bold);
    box-shadow: 0 4px 12px rgba(26, 77, 143, 0.3);
}

.calendar-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: flex-end;
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-color);
}

.calendar-actions button {
    min-width: 100px;
}

/* Link styling */
a {
    color: var(--color-navy);
    text-decoration: none;
    transition: all var(--transition);
    position: relative;
}

a:hover {
    color: var(--color-blue);
}

a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-navy);
    transform: scaleX(0);
    transition: transform var(--transition);
}

a:not(.btn):hover::after {
    transform: scaleX(1);
}

/* ============================
   PROGRAM CONTROLS (Premium Container)
   ============================ */
.program-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
    padding: var(--space-6);
    background: linear-gradient(to bottom, var(--bg-card), var(--bg-secondary));
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.filter-group {
    display: flex;
    gap: var(--space-3);
}

.filter-group select,
.filter-group input {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all var(--transition);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--color-navy);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1), 0 1px 2px rgba(0, 0, 0, 0.05);
}

.filter-group input {
    min-width: 250px;
}

.filter-group input::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

/* ============================
   EMPTY STATE (Premium Design)
   ============================ */
.empty-state {
    text-align: center;
    padding: var(--space-12);
    color: var(--text-muted);
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
    border-radius: var(--radius-xl);
    border: 2px dashed var(--border-color);
    margin: var(--space-8) 0;
    transition: all var(--transition);
}

.empty-state:hover {
    border-color: var(--color-navy);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.empty-state h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-4);
}

.empty-state p {
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-4);
    opacity: 0.3;
    color: var(--text-muted);
}

/* ============================
   MODALS (Premium Design)
   ============================ */
.login-overlay, .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Modal Overlay - MUST be hidden by default and centered */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: var(--space-4);
}

/* When modal is shown via .active class or inline style */
.modal.active,
.modal[style*="display: flex"],
.modal[style*="display: block"] {
    display: flex !important;
}

/* The actual modal box content */
.modal-content, .login-modal {
    background: var(--bg-card);
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 8px 16px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
    border: 1px solid var(--border-color);
    animation: slideUp 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

/* Larger modal for program forms */
#add-program-modal .modal-content,
#add-audition-modal .modal-content {
    max-width: 600px;
}

/* Extra wide modal for program details */
#program-details-modal .modal-content {
    max-width: 1200px;
    width: 95%;
    padding: var(--space-6);
    position: relative;
}

/* macOS-style close button for all modals */
.modal-close-x,
.close-btn,
.modal-close {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    border-radius: 50% !important;
    background: #ff5f57 !important;
    border: none !important;
    color: transparent !important;
    font-size: 0 !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.15s ease !important;
    z-index: 100;
    padding: 0 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.modal-close-x:hover,
.close-btn:hover,
.modal-close:hover {
    background: #ff3b30 !important;
    transform: scale(1.1);
}

/* Show X on hover */
.modal-close-x::after,
.close-btn::after,
.modal-close::after {
    content: '×';
    font-size: 14px;
    font-weight: bold;
    color: transparent;
    transition: color 0.15s ease;
    line-height: 1;
}

.modal-close-x:hover::after,
.close-btn:hover::after,
.modal-close:hover::after {
    color: #990000;
}

/* Form Group Styling */
.form-group {
    margin-bottom: var(--space-4);
}

.form-group label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
}

/* Form Row for side-by-side fields */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.form-row .form-group {
    margin-bottom: 0;
}

/* Form Actions (buttons at bottom) */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    margin-top: var(--space-6);
    padding-top: var(--space-6);
    border-top: 1px solid var(--border-color);
}

.form-actions button {
    min-width: 120px;
}

/* Advanced Stats Section (collapsible) */
.advanced-stats-section {
    margin-top: var(--space-6);
    padding: var(--space-4);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.advanced-stats-section summary {
    cursor: pointer;
    font-weight: var(--font-semibold);
    color: var(--color-navy);
    padding: var(--space-2);
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.advanced-stats-section summary::-webkit-details-marker {
    display: none;
}

.advanced-stats-section summary:hover {
    color: var(--color-blue);
}

.advanced-stats-content {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-color);
}

.advanced-stats-content h4 {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

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

.login-modal h2, .modal h2 {
    margin-bottom: var(--space-6);
    color: var(--text-primary);
    font-weight: var(--font-bold);
    padding-bottom: var(--space-4);
    border-bottom: 2px solid var(--bg-secondary);
}

.login-modal input, .modal input, .modal select, .modal textarea {
    width: 100%;
    padding: var(--space-3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    margin-bottom: var(--space-4);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: all var(--transition);
    font-family: var(--font-family);
}

.login-modal input:focus, .modal input:focus, .modal select:focus, .modal textarea:focus {
    outline: none;
    border-color: var(--color-navy);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.login-modal button, .modal button {
    width: 100%;
}

/* Override for modal close buttons - should NOT be full width */
.modal .close-btn,
.modal .modal-close,
.modal .modal-close-x,
#program-details-modal .btn-edit-program-top {
    width: auto !important;
}

.modal textarea {
    min-height: 100px;
    resize: vertical;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 2px solid var(--bg-secondary);
}

.modal-header h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin: 0;
}

/* Old close-btn styles - now using macOS-style defined above */

/* Old modal-close styles - now using macOS-style defined above */

/* ============================
   STATUS BADGES (Premium Design)
   ============================ */
.status-badge, .badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-lg);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.status-interested {
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    color: #0369a1;
}

.status-applied {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.status-interview {
    background: linear-gradient(135deg, #ddd6fe 0%, #c4b5fd 100%);
    color: #5b21b6;
}

.status-accepted {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.status-rejected {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

/* ============================
   LOADING STATES
   ============================ */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-top-color: var(--color-navy);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

.loading-content {
    background: var(--bg-card);
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    min-width: 200px;
}

.loading-content .loading-spinner {
    width: 40px;
    height: 40px;
    border-width: 4px;
    margin-bottom: var(--space-4);
}

/* ============================
   UTILITY CLASSES
   ============================ */
.text-center {
    text-align: center;
}

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

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

.text-navy {
    color: var(--color-navy);
}

.mb-4 {
    margin-bottom: var(--space-4);
}

.mb-6 {
    margin-bottom: var(--space-6);
}

.mb-8 {
    margin-bottom: var(--space-8);
}

.mt-4 {
    margin-top: var(--space-4);
}

.mt-6 {
    margin-top: var(--space-6);
}

.flex {
    display: flex;
}

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

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: var(--space-2);
}

.gap-4 {
    gap: var(--space-4);
}

.hidden {
    display: none !important;
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* ============================
   NOTIFICATION BADGE
   ============================ */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    font-size: 0.65rem;
    font-weight: var(--font-bold);
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* ============================
   TOOLTIPS
   ============================ */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--text-primary);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.tooltip:hover::before,
.tooltip:hover::after {
    opacity: 1;
}

/* ============================
   HELP TEXT
   ============================ */
.help-text {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: var(--space-1);
    font-style: italic;
}

.help-text::before {
    content: 'ℹ️ ';
    margin-right: var(--space-1);
}

/* ============================
   PILL TABS
   ============================ */
.pill-tabs {
    display: inline-flex;
    background: var(--bg-secondary);
    padding: var(--space-1);
    border-radius: var(--radius-lg);
    gap: var(--space-1);
}

.pill-tab {
    padding: var(--space-2) var(--space-4);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.pill-tab:hover {
    color: var(--text-primary);
}

.pill-tab.active {
    background: var(--bg-card);
    color: var(--color-navy);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ============================
   DIVIDER
   ============================ */
.divider {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border-color), transparent);
    margin: var(--space-6) 0;
}

.divider-text {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin: var(--space-6) 0;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.divider-text::before,
.divider-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* ============================
   PROGRAM DETAILS MODAL V2 (Premium Design)
   ============================ */
.program-details-modal-v2 {
    position: relative;
    max-width: 1200px;
    width: 100%;
    display: block;
}

.program-details-modal-v2 > .modal-close-btn {
    position: absolute !important;
    top: -10px !important;
    right: -10px !important;
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
    border-radius: 50% !important;
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-muted) !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all var(--transition);
    z-index: 100;
    flex-shrink: 0;
    flex-grow: 0;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.program-details-modal-v2 > .modal-close-btn:hover {
    background: var(--color-danger) !important;
    border-color: var(--color-danger) !important;
    color: white !important;
    transform: rotate(90deg);
}

.program-details-modal-v2 > .modal-close-btn svg {
    width: 14px !important;
    height: 14px !important;
    min-width: 14px;
    max-width: 14px;
    min-height: 14px;
    max-height: 14px;
    flex-shrink: 0;
}

.modal-header-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--space-6);
    gap: var(--space-4);
}

.header-left-content {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    flex: 1 1 auto;
    min-width: 0;
}

.program-details-modal-v2 .btn-edit-program-top {
    position: absolute !important;
    top: 12px !important;
    right: 44px !important; /* Position to the left of the close button */
    padding: 6px 12px !important;
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-secondary) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
    width: auto !important;
    min-width: auto !important;
    max-width: fit-content !important;
    flex: 0 0 auto !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    height: auto !important;
    z-index: 99;
}

.program-details-modal-v2 .btn-edit-program-top:hover {
    background: var(--color-navy) !important;
    border-color: var(--color-navy) !important;
    color: white !important;
}

.program-details-modal-v2 .btn-edit-program-top svg {
    flex-shrink: 0;
    width: 14px !important;
    height: 14px !important;
}

.specialty-icon-wrapper {
    flex-shrink: 0;
}

.modal-specialty-icon {
    width: 48px;
    height: 48px;
    color: var(--color-navy);
}

.header-main-info {
    text-align: left;
}

.modal-program-name {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin: 0 0 var(--space-2) 0;
    line-height: 1.3;
}

.modal-location-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.modal-location {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-secondary);
    font-size: var(--text-base);
}

.modal-location svg {
    color: var(--color-danger);
}

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

.modal-program-type {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.modal-links-row {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-6);
}

.modal-link-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    text-decoration: none;
    transition: all var(--transition);
}

.modal-link-btn::after {
    display: none;
}

.modal-link-btn.primary {
    background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
    color: white;
}

.modal-link-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 77, 143, 0.3);
}

.modal-link-btn.secondary {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.modal-link-btn.secondary:hover {
    border-color: var(--color-navy);
    background: var(--bg-tertiary);
}

.modal-body-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-6);
    margin-bottom: var(--space-6);
}

.modal-main-column {
    min-width: 0;
}

.modal-side-column {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.modal-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
}

.info-card-header {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border-color);
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.info-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-weight: var(--font-medium);
}

.info-value {
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.info-value.highlighted {
    color: var(--color-navy);
    font-weight: var(--font-semibold);
}

.modal-notes-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
}

.notes-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border-color);
}

.notes-header svg {
    color: var(--color-navy);
}

.notes-content {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-wrap;
}

.modal-data-section {
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    margin-bottom: var(--space-5);
}

.modal-data-section.re-section {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.03) 100%);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.modal-data-section.freida-section {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(16, 185, 129, 0.03) 100%);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.section-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.section-header svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.re-section .section-header svg {
    color: #3b82f6;
}

.freida-section .section-header svg {
    color: #10b981;
}

.section-title {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.section-title span:first-child {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
}

.section-subtitle {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-weight: var(--font-normal);
}

.do-status-badge {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-4);
}

.no-data-msg {
    color: var(--text-muted);
    font-size: var(--text-sm);
    font-style: italic;
    margin-bottom: var(--space-4);
}

.stats-grid-v2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-4);
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    text-align: center;
    transition: all var(--transition);
}

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

.stat-card.highlight {
    border-width: 2px;
}

.re-section .stat-card.highlight {
    border-color: #3b82f6;
}

.freida-section .stat-card.highlight {
    border-color: #10b981;
}

.stat-card .stat-value {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.stat-card .stat-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    line-height: 1.3;
}

.section-link-container {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-color);
}

.section-link-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    text-decoration: none;
    transition: all var(--transition);
    width: 100%;
    justify-content: center;
}

.section-link-btn:hover {
    background: var(--color-navy);
    border-color: var(--color-navy);
    color: white;
    transform: translateY(-1px);
}

.section-link-btn::after {
    display: none;
}

.section-link-btn svg {
    flex-shrink: 0;
}

.modal-info-row {
    display: flex;
    gap: var(--space-6);
    flex-wrap: wrap;
    padding: var(--space-4);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-5);
}

.info-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
}

.info-item svg {
    color: var(--text-muted);
}

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

.info-value {
    color: var(--text-primary);
    font-weight: var(--font-medium);
}

.modal-notes-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-bottom: var(--space-5);
}

.notes-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
}

.notes-content {
    font-size: var(--text-sm);
    color: var(--text-primary);
    line-height: 1.6;
    margin: 0;
}

.modal-actions-v2 {
    display: flex;
    gap: var(--space-3);
    justify-content: flex-end;
    padding-top: var(--space-5);
    border-top: 1px solid var(--border-color);
}

.modal-actions-v2 .btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

/* ============================
   STATUS DROPDOWN (Sleek Design)
   ============================ */
.status-dropdown-container {
    position: relative;
    display: inline-block;
}

.status-dropdown-container.open {
    z-index: 9999;
}

.status-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    position: relative;
}

.status-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.status-btn.applied {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
}

.status-btn.interested {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: #f59e0b;
}

.status-btn.not-interested {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #ef4444;
}

.status-btn.applied,
.status-btn.interested,
.status-btn.not-interested {
    color: white;
}

.status-btn svg {
    width: 16px;
    height: 16px;
}

.status-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.2);
    min-width: 160px;
    padding: var(--space-2);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(-10px);
    transition: all 0.2s ease;
    pointer-events: none;
}

.status-dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.status-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: var(--bg-card);
    border-left: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    transform: translateX(-50%) rotate(45deg);
}

.status-option {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-primary);
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

.status-option:hover {
    background: var(--bg-secondary);
}

.status-option .status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-option .status-dot.green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
}

.status-option .status-dot.orange {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
}

.status-option .status-dot.red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
}

.status-option.selected {
    background: var(--bg-tertiary);
}

.status-option.selected::after {
    content: '';
    margin-left: auto;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%2310b981' stroke-width='3' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20,6 9,17 4,12'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* ============================
   PROGRAMS TO AUDITION AT VIEW (Compact City Cards)
   ============================ */
.cities-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.state-group {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    border: 1px solid var(--border-color);
}

.state-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 2px solid var(--border-color);
}

.state-header h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin: 0;
}

.state-count {
    background: var(--color-navy);
    color: white;
    padding: 4px var(--space-3);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
}

.state-group .city-card {
    margin-bottom: var(--space-3);
}

.state-group .city-card:last-child {
    margin-bottom: 0;
}

.city-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    transition: all var(--transition);
}

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

.city-card.has-overlap {
    border-left: 3px solid #10b981;
}

.city-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--border-color);
}

.city-name {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.city-name svg {
    color: var(--color-danger);
    flex-shrink: 0;
}

.city-badges {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.distance-badge {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 4px var(--space-3);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: var(--font-bold);
    border: 1px solid var(--border-color);
}

/* Distance color coding */
.distance-badge.distance-excellent {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.distance-badge.distance-good {
    background: #22c55e;
    color: white;
    border-color: #22c55e;
}

.distance-badge.distance-moderate {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

.distance-badge.distance-far {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.overlap-badge {
    background: #10b981;
    color: white;
    padding: 4px var(--space-3);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.applied-count-badge {
    background: var(--color-navy);
    color: white;
    padding: 4px var(--space-3);
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: var(--font-bold);
}

/* Metro card styling */
.metro-card {
    margin-bottom: var(--space-4);
}

/* Legacy side-by-side (kept for compatibility) */
.programs-side-by-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
}

.program-list-side {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-3);
}

.program-list-side h4 {
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    color: var(--text-secondary);
    margin: 0 0 var(--space-2) 0;
    padding-bottom: var(--space-2);
    border-bottom: 1px solid var(--border-color);
}

/* NEW: Paired programs layout with distance badges */
.programs-paired-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.programs-paired-header {
    display: grid;
    grid-template-columns: 1fr 70px 1fr;
    gap: var(--space-2);
    padding: var(--space-3);
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    color: var(--text-secondary);
}

.paired-header-left {
    text-align: left;
}

.paired-header-center {
    text-align: center;
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.paired-header-right {
    text-align: right;
}

.programs-paired-list {
    padding: var(--space-2);
}

.program-pair-row {
    display: grid;
    grid-template-columns: 1fr 70px 1fr;
    gap: var(--space-2);
    align-items: stretch;
    margin-bottom: var(--space-2);
}

.program-pair-row:last-child {
    margin-bottom: 0;
}

.program-pair-left,
.program-pair-right {
    min-height: 60px;
}

.program-pair-left .program-mini,
.program-pair-right .program-mini {
    height: 100%;
    margin: 0;
}

.program-pair-distance {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.program-pair-distance::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-color);
    z-index: 0;
}

.pair-distance-badge {
    position: relative;
    z-index: 1;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    padding: 4px 8px;
    border-radius: var(--radius-md);
    font-size: 0.7rem;
    font-weight: var(--font-bold);
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Distance color coding for pair badges */
.program-pair-distance.distance-excellent .pair-distance-badge {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.program-pair-distance.distance-good .pair-distance-badge {
    background: #22c55e;
    border-color: #22c55e;
    color: white;
}

.program-pair-distance.distance-moderate .pair-distance-badge {
    background: #f59e0b;
    border-color: #f59e0b;
    color: white;
}

.program-pair-distance.distance-far .pair-distance-badge {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

.program-pair-distance.empty .pair-distance-badge {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    color: var(--text-muted);
}

.program-pair-empty {
    background: var(--bg-tertiary);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: var(--text-xs);
}

/* NEW: Program match groups (one-to-many matching) - Collapsible */
.programs-match-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.programs-match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3);
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    color: var(--text-secondary);
}

.match-header-count {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-weight: var(--font-medium);
}

.programs-match-list {
    padding: var(--space-2);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

/* Collapsible match group */
.program-match-group {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.program-match-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3);
    cursor: pointer;
    transition: background var(--transition);
}

.program-match-header-row:hover {
    background: var(--bg-secondary);
}

.match-header-left {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.match-chevron {
    color: var(--text-muted);
    flex-shrink: 0;
}

.match-header-program {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.match-header-program strong {
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.match-header-location {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.match-vslo-date {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    margin-left: var(--space-2);
    font-weight: var(--font-medium);
}

.match-vslo-input-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-2);
}

.match-vslo-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: var(--font-medium);
}

.match-vslo-input {
    font-size: 0.7rem;
    padding: 3px 6px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    width: 80px;
}

.match-vslo-input:focus {
    outline: none;
    border-color: var(--accent-blue);
}

.match-header-summary {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.match-count-badge {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: var(--font-bold);
}

.match-closest-badge {
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: var(--font-bold);
    color: white;
}

.match-closest-badge.distance-excellent {
    background: #10b981;
}

.match-closest-badge.distance-good {
    background: #22c55e;
}

.match-closest-badge.distance-moderate {
    background: #f59e0b;
}

.match-closest-badge.distance-far {
    background: #ef4444;
}

/* Collapsible content */
.program-match-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.program-match-content.open {
    max-height: 2000px;
}

.program-match-connections {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    padding: 0 var(--space-3) var(--space-3) var(--space-3);
    border-top: 1px solid var(--border-color);
    padding-top: var(--space-3);
}

.program-match-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

.match-distance-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: var(--font-bold);
    color: white;
    white-space: nowrap;
}

.match-distance-badge.distance-excellent {
    background: #10b981;
}

.match-distance-badge.distance-good {
    background: #22c55e;
}

.match-distance-badge.distance-moderate {
    background: #f59e0b;
}

.match-distance-badge.distance-far {
    background: #ef4444;
}

.match-program-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.match-program-info strong {
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.match-program-info span {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.match-details-btn {
    padding: 4px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.match-details-btn:hover {
    background: var(--color-navy);
    color: white;
    border-color: var(--color-navy);
}

/* Apply/Action buttons in match view */
.match-header-actions {
    display: flex;
    gap: var(--space-2);
    margin-left: var(--space-3);
}

.match-item-actions {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.match-action-btn {
    padding: 4px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.match-action-btn:hover {
    background: var(--color-success);
    color: white;
    border-color: var(--color-success);
}

.match-action-btn.active {
    background: var(--color-success);
    color: white;
    border-color: var(--color-success);
}

/* Icon-only status buttons */
.match-status-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.match-status-btn svg {
    flex-shrink: 0;
}

/* Apply button - Green */
.match-status-btn.apply-btn {
    color: var(--text-muted);
}

.match-status-btn.apply-btn:hover {
    background: rgba(16, 185, 129, 0.15);
    border-color: #10b981;
    color: #10b981;
}

.match-status-btn.apply-btn.active {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

/* Interested button - Yellow/Orange */
.match-status-btn.interested-btn {
    color: var(--text-muted);
}

.match-status-btn.interested-btn:hover {
    background: rgba(245, 158, 11, 0.15);
    border-color: #f59e0b;
    color: #f59e0b;
}

.match-status-btn.interested-btn.active {
    background: #f59e0b;
    border-color: #f59e0b;
    color: white;
}

/* Not Interested button - Red */
.match-status-btn.not-interested-btn {
    color: var(--text-muted);
}

.match-status-btn.not-interested-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: #ef4444;
    color: #ef4444;
}

.match-status-btn.not-interested-btn.active {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

/* Applied state highlighting */
.program-match-group.applied {
    border-left: 3px solid #10b981;
}

.program-match-group.applied .match-header-program strong {
    color: #10b981;
}

.program-match-item.applied {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.program-match-item.applied .match-program-info strong {
    color: #10b981;
}

/* Interested state highlighting */
.program-match-group.interested {
    border-left: 3px solid #f59e0b;
}

.program-match-group.interested .match-header-program strong {
    color: #f59e0b;
}

.program-match-item.interested {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.program-match-item.interested .match-program-info strong {
    color: #f59e0b;
}

/* Not interested state */
.program-match-group.not-interested {
    opacity: 0.6;
    border-left: 3px solid #ef4444;
}

.program-match-item.not-interested {
    opacity: 0.6;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Legacy not-interested-btn styles (for backwards compatibility) */
.not-interested-btn {
    background: var(--bg-tertiary) !important;
    color: var(--text-muted) !important;
}

.not-interested-btn:hover {
    background: var(--color-danger) !important;
    color: white !important;
    border-color: var(--color-danger) !important;
}

.not-interested-btn.active {
    background: var(--color-danger) !important;
    color: white !important;
    border-color: var(--color-danger) !important;
}

/* DO% badge in match view */
.match-do-badge {
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
    font-weight: var(--font-bold);
    white-space: nowrap;
    flex-shrink: 0;
}

/* Show hidden button */
.show-hidden-btn {
    padding: 4px 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}

.show-hidden-btn:hover {
    background: var(--color-danger);
    color: white;
    border-color: var(--color-danger);
}

.show-hidden-btn.active {
    background: var(--color-danger);
    color: white;
    border-color: var(--color-danger);
}

/* Match header right section */
.match-header-right {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.programs-match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Nearby programs in other states */
.nearby-other-states {
    margin-top: var(--space-4);
    padding: var(--space-4);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(147, 51, 234, 0.08));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-lg);
}

.nearby-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.nearby-header svg {
    color: #3b82f6;
}

.nearby-header span {
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    color: var(--text-primary);
}

.nearby-programs-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.nearby-program-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-2) var(--space-3);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    gap: var(--space-3);
}

.nearby-program-item.your-program {
    border-left: 3px solid var(--color-partner-1, #14b8a6);
}

.nearby-program-item.her-program {
    border-left: 3px solid var(--color-partner-2, #f97316);
}

.nearby-program-info {
    flex: 1;
    min-width: 0;
}

.nearby-program-info strong {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nearby-program-info span {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.nearby-program-badges {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

.nearby-specialty-tag {
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.65rem;
    font-weight: var(--font-bold);
    background: var(--color-partner-1, #14b8a6);
    color: white;
}

.nearby-specialty-tag.obgyn {
    background: var(--color-partner-2, #f97316);
}

.nearby-distance {
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: var(--font-bold);
    background: var(--color-navy, #1e3a5f);
    color: white;
}

.program-mini {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--space-2) var(--space-3);
    margin-bottom: var(--space-2);
    transition: all var(--transition);
}

.program-mini:last-child {
    margin-bottom: 0;
}

.program-mini:hover {
    border-color: var(--color-navy);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.program-mini.applied {
    border-left: 3px solid #10b981;
}

.program-mini.favorited {
    background: rgba(255, 215, 0, 0.05);
}

.program-mini-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-2);
    margin-bottom: var(--space-1);
}

.program-mini-title {
    flex: 1;
    cursor: pointer;
}

.program-mini-title:hover strong {
    color: var(--color-navy);
}

.program-mini strong {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 2px;
}

.program-mini-location {
    display: block;
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-weight: var(--font-normal);
}

.do-rate {
    background: #10b981;
    color: white;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: var(--font-bold);
    flex-shrink: 0;
}

.vslo-info {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.program-mini-actions {
    display: flex;
    gap: 4px;
    margin-top: var(--space-2);
}

.quick-action {
    flex: 1;
    padding: 4px var(--space-2);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: var(--font-medium);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}

.quick-action:hover {
    border-color: var(--color-navy);
    color: var(--color-navy);
    background: var(--bg-card);
}

.quick-action.active {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.quick-action.view-btn {
    flex: 0.8;
}

.quick-action.view-btn:hover {
    background: var(--color-navy);
    border-color: var(--color-navy);
    color: white;
}

/* ============================
   DO% Color Badge System
   ============================ */
.do-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: var(--font-bold);
    white-space: nowrap;
    flex-shrink: 0;
}

.do-badge-red {
    background: #ef4444 !important;
    color: #ffffff !important;
}

.do-badge-orange {
    background: #f97316 !important;
    color: #ffffff !important;
}

.do-badge-yellow {
    background: #eab308 !important;
    color: #1f2937 !important;
}

.do-badge-green {
    background: #22c55e !important;
    color: #ffffff !important;
}

.do-badge-green-dark {
    background: #16a34a !important;
    color: #ffffff !important;
}

.do-badge-unknown {
    background: #6b7280 !important;
    color: #ffffff !important;
}

/* ============================
   Collapsible State Sections
   ============================ */
.state-group {
    margin-bottom: var(--space-4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.state-group.collapsed .state-content {
    display: none;
}

.state-group.expanded .state-content {
    display: block;
}

.state-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: background var(--transition);
    user-select: none;
}

.state-header:hover {
    background: var(--bg-tertiary);
}

.state-header h3 {
    margin: 0;
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    flex: 1;
}

.state-header-badges {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.state-count {
    background: var(--color-navy, #1e3a5f);
    color: #ffffff;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
}

.state-applied-badge {
    background: #10b981;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
}

.state-chevron {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform var(--transition);
}

.state-content {
    padding: var(--space-4);
}

.state-content:not(.open) {
    display: none;
}

/* ============================
   Collapsible Program Cards
   ============================ */
.program-mini-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-2);
    cursor: pointer;
    padding: var(--space-1) 0;
}

.program-mini-title-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex: 1;
    min-width: 0;
}

.program-mini-badges {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

.status-badge {
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
    font-weight: var(--font-bold);
}

.applied-badge {
    background: #10b981;
    color: white;
}

.fav-badge {
    background: #ffd700;
    color: #1f2937;
}

.card-chevron {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform var(--transition);
}

.card-chevron.open {
    transform: rotate(0deg);
}

.program-mini-details {
    margin-top: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px solid var(--border-color);
}

.program-mini-details:not(.open) {
    display: none;
}

.program-mini.collapsed .program-mini-details {
    display: none;
}

.program-mini.expanded .program-mini-details {
    display: block;
}

/* Geography state collapsible styles */
.geo-state-group.collapsed .geo-state-locations {
    display: none;
}

.geo-state-group.expanded .geo-state-locations {
    display: block;
}

.geo-state-header {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.geo-state-locations:not(.open) {
    display: none;
}

/* Empty program list state */
.program-list-side .empty-message {
    text-align: center;
    padding: var(--space-8) var(--space-4);
    color: var(--text-muted);
    font-style: italic;
    font-size: var(--text-sm);
}

/* Apply Toggle Buttons */
.apply-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.toggle-buttons {
    display: inline-flex;
    background: var(--bg-secondary);
    padding: var(--space-1);
    border-radius: var(--radius-lg);
    gap: var(--space-1);
    border: 1px solid var(--border-color);
}

.toggle-btn {
    padding: var(--space-3) var(--space-6);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.toggle-btn:hover {
    color: var(--text-primary);
    background: rgba(26, 77, 143, 0.1);
}

.toggle-btn.active {
    background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(26, 77, 143, 0.3);
}

.toggle-btn svg {
    width: 16px;
    height: 16px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .programs-side-by-side {
        grid-template-columns: 1fr;
    }

    .city-header {
        flex-direction: column;
        gap: var(--space-3);
        align-items: flex-start;
    }

    .overlap-badge {
        align-self: flex-start;
    }

    /* Modal responsive */
    .modal-body-grid {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }

    .modal-header-section {
        flex-direction: column;
        gap: var(--space-4);
    }

    .header-left-content {
        width: 100%;
    }

    .btn-edit-program-top {
        width: 100%;
    }

    .stats-grid-v2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================
   GEOGRAPHY / COUPLES MATCH VIEW (Premium Card Design)
   ============================ */
#geo-summary {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}

.geo-stat {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-4) var(--space-6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    transition: all var(--transition);
}

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

.geo-stat.overlap {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-color: rgba(16, 185, 129, 0.3);
}

.geo-stat-value {
    font-size: var(--text-3xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
}

.geo-stat.overlap .geo-stat-value {
    color: #10b981;
}

.geo-stat-label {
    font-size: var(--text-sm);
    color: var(--text-muted);
    text-align: center;
}

/* State Groups */
.geo-state-group {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
    transition: all var(--transition);
}

.geo-state-group.has-overlaps {
    border-color: rgba(16, 185, 129, 0.3);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, var(--bg-card) 100%);
}

.geo-state-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 2px solid var(--border-color);
}

.geo-state-header h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin: 0;
}

.geo-state-stats {
    font-size: var(--text-sm);
    color: var(--text-muted);
    display: flex;
    gap: var(--space-4);
    align-items: center;
}

.geo-overlap-count {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-lg);
    font-weight: var(--font-semibold);
    font-size: var(--text-xs);
}

.geo-state-locations {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

/* Region/City Cards */
.geo-region {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    transition: all var(--transition);
}

.geo-region:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.geo-region.has-both {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, var(--bg-secondary) 100%);
    border-color: rgba(16, 185, 129, 0.3);
    border-width: 2px;
}

.geo-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border-light);
}

.geo-header h4 {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.geo-count {
    font-size: var(--text-sm);
    color: var(--text-muted);
    padding: var(--space-1) var(--space-3);
    background: var(--bg-primary);
    border-radius: var(--radius-md);
}

.geo-overlap-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-lg);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.geo-programs-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.geo-column-header {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-secondary);
    padding: var(--space-2);
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    text-align: center;
}

/* City Rows */
.geo-city-row {
    margin-bottom: var(--space-4);
}

.geo-city-row.city-has-both {
    background: rgba(16, 185, 129, 0.05);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.geo-city-label {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.distance-tag {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-weight: var(--font-normal);
    background: var(--bg-primary);
    padding: 2px var(--space-2);
    border-radius: var(--radius-sm);
}

.geo-city-programs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.geo-column {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* Program Cards */
.geo-program {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    transition: all var(--transition);
}

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

.geo-program.geo-empty {
    background: transparent;
    border: 1px dashed var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-style: italic;
    min-height: 80px;
}

.geo-program.geo-applied {
    border-color: rgba(16, 185, 129, 0.5);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, var(--bg-card) 100%);
}

.geo-program.geo-interested {
    border-color: rgba(245, 158, 11, 0.5);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, var(--bg-card) 100%);
}

.geo-program-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.geo-program-name {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    flex: 1;
    line-height: 1.4;
}

.geo-program-actions {
    display: flex;
    gap: var(--space-2);
    flex-shrink: 0;
}

.geo-action-btn {
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.geo-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.geo-interested-btn {
    font-size: var(--text-base);
}

.geo-interested-btn.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: #f59e0b;
    color: white;
}

.geo-applied-btn.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
    color: white;
}

.geo-dismiss-btn {
    color: var(--color-danger);
    border-color: rgba(239, 68, 68, 0.3);
}

.geo-dismiss-btn:hover {
    background: var(--color-danger);
    border-color: var(--color-danger);
    color: white;
}

.geo-program-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.geo-city-tag {
    background: var(--bg-secondary);
    padding: 2px var(--space-2);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
}

.geo-vslo-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.geo-vslo-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-weight: var(--font-medium);
}

.geo-vslo-input {
    flex: 1;
    font-family: var(--font-family);
    font-size: var(--text-sm);
    padding: var(--space-1) var(--space-2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all var(--transition);
}

.geo-vslo-input:focus {
    outline: none;
    border-color: var(--color-navy);
    background: var(--bg-card);
}

.geo-program-links {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.geo-link {
    font-size: var(--text-xs);
    padding: 2px var(--space-2);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all var(--transition);
}

.geo-link.freida-link {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.geo-link.freida-link:hover {
    background: #10b981;
    color: white;
}

.geo-link.re-link {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.geo-link.re-link:hover {
    background: #3b82f6;
    color: white;
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 768px) {
    .navbar-container {
        flex-wrap: wrap;
    }

    .navbar-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
    }

    .nav-tab {
        white-space: nowrap;
    }

    .horizontal-tabs {
        overflow-x: auto;
        white-space: nowrap;
    }

    .programs-table-container {
        overflow-x: auto;
    }

    .program-controls {
        flex-direction: column;
        gap: var(--space-4);
    }

    .filter-group {
        flex-direction: column;
        width: 100%;
    }

    .filter-group input,
    .filter-group select {
        width: 100%;
    }

    /* Geography View Mobile */
    .geo-programs-header,
    .geo-city-programs {
        grid-template-columns: 1fr;
    }

    .geo-program-actions {
        flex-wrap: wrap;
    }
}

/* ============================
   DOCUMENTS PAGE - REDESIGNED
   ============================ */

/* Strategy Banner */
.docs-strategy-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.strategy-card {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

.strategy-card.ortho-strategy {
    border-left: 4px solid var(--color-navy);
}

.strategy-card.obgyn-strategy {
    border-left: 4px solid #ec4899;
}

.strategy-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ortho-strategy .strategy-icon {
    background: rgba(26, 77, 143, 0.1);
    color: var(--color-navy);
}

.obgyn-strategy .strategy-icon {
    background: rgba(236, 72, 153, 0.1);
    color: #ec4899;
}

.strategy-content h4 {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin: 0 0 var(--space-2) 0;
}

.strategy-content p {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

/* Applicant Cards Grid */
.docs-applicant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.applicant-doc-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition);
}

.applicant-doc-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Card Header */
.applicant-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-5);
    border-bottom: 1px solid var(--border-color);
}

.applicant-card-header.ortho-header {
    background: linear-gradient(135deg, rgba(26, 77, 143, 0.08) 0%, transparent 100%);
}

.applicant-card-header.obgyn-header {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.08) 0%, transparent 100%);
}

.applicant-avatar {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ortho-header .applicant-avatar {
    background: var(--color-navy);
    color: white;
}

.obgyn-header .applicant-avatar {
    background: #ec4899;
    color: white;
}

.applicant-info {
    flex: 1;
}

.applicant-info h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin: 0 0 var(--space-2) 0;
}

.specialty-tag {
    display: inline-block;
    padding: 2px var(--space-3);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.specialty-tag.ortho {
    background: rgba(26, 77, 143, 0.15);
    color: var(--color-navy);
}

.specialty-tag.obgyn {
    background: rgba(236, 72, 153, 0.15);
    color: #ec4899;
}

/* Completion Ring */
.completion-ring {
    position: relative;
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.completion-ring svg {
    width: 60px;
    height: 60px;
    transform: rotate(-90deg);
}

.completion-ring .ring-bg {
    fill: none;
    stroke: var(--bg-secondary);
    stroke-width: 3;
}

.completion-ring .ring-fill {
    fill: none;
    stroke: #10b981;
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 0.5s ease;
}

/* Ortho header uses teal color */
.ortho-header .completion-ring .ring-fill {
    stroke: var(--color-partner-1, #14b8a6);
}

/* OBGYN header uses coral color */
.obgyn-header .completion-ring .ring-fill {
    stroke: var(--color-partner-2, #f97316);
}

.completion-ring .ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: var(--text-sm);
    font-weight: var(--font-bold);
    color: var(--text-primary);
}

/* Document Sections */
.doc-sections-container {
    padding: var(--space-4);
}

.doc-section {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
    overflow: hidden;
}

.doc-section:last-child {
    margin-bottom: 0;
}

.doc-section-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.doc-section-header:hover {
    background: var(--bg-tertiary);
}

.doc-section-header h4 {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin: 0;
}

.doc-section-header h4 svg {
    color: var(--text-muted);
}

.section-progress {
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    color: var(--text-muted);
    background: var(--bg-card);
    padding: 2px var(--space-2);
    border-radius: var(--radius-sm);
}

.doc-section-header .chevron {
    color: var(--text-muted);
    transition: transform var(--transition);
}

.doc-section-header.collapsed .chevron {
    transform: rotate(-90deg);
}

.doc-section-content {
    padding: var(--space-4);
    background: var(--bg-card);
}

.doc-section-content.collapsed {
    display: none;
}

/* Checklist V2 */
.doc-checklist-v2 {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.doc-item-v2 {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid transparent;
}

.doc-item-v2:hover {
    background: var(--bg-secondary);
}

.doc-item-v2 input[type="checkbox"] {
    display: none;
}

.custom-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition);
    background: var(--bg-card);
}

.doc-item-v2 input[type="checkbox"]:checked + .custom-checkbox {
    background: #10b981;
    border-color: #10b981;
}

.doc-item-v2 input[type="checkbox"]:checked + .custom-checkbox::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.doc-label {
    flex: 1;
    font-size: var(--text-sm);
    color: var(--text-primary);
    transition: all var(--transition);
}

.doc-item-v2 input[type="checkbox"]:checked ~ .doc-label {
    color: var(--text-muted);
    text-decoration: line-through;
}

/* LOR Items with Writer Input */
.doc-item-v2.lor-item {
    flex-wrap: wrap;
}

.lor-writer-input {
    width: 100%;
    margin-top: var(--space-2);
    margin-left: 34px;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all var(--transition);
}

.lor-writer-input:focus {
    outline: none;
    border-color: var(--color-navy);
    background: var(--bg-card);
}

.lor-writer-input::placeholder {
    color: var(--text-muted);
}

/* Applicant Notes */
.applicant-notes {
    padding: var(--space-4);
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.applicant-notes h4 {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin: 0 0 var(--space-3) 0;
}

.applicant-notes h4 svg {
    color: var(--text-muted);
}

.applicant-notes textarea {
    width: 100%;
    min-height: 80px;
    padding: var(--space-3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    background: var(--bg-card);
    color: var(--text-primary);
    resize: vertical;
    transition: all var(--transition);
}

.applicant-notes textarea:focus {
    outline: none;
    border-color: var(--color-navy);
}

/* Document Vault Section */
.document-vault-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
}

.vault-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--border-color);
}

.vault-title {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
}

.vault-title svg {
    color: var(--color-navy);
    flex-shrink: 0;
}

.vault-title h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin: 0 0 var(--space-1) 0;
}

.vault-title p {
    font-size: var(--text-sm);
    color: var(--text-muted);
    margin: 0;
}

/* Vault Categories */
.vault-categories {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
}

.vault-cat-btn {
    padding: var(--space-2) var(--space-4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    background: transparent;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all var(--transition);
}

.vault-cat-btn:hover {
    border-color: var(--color-navy);
    color: var(--color-navy);
}

.vault-cat-btn.active {
    background: var(--color-navy);
    border-color: var(--color-navy);
    color: white;
}

/* Vault Grid */
.vault-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-4);
}

.vault-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-12) var(--space-6);
    color: var(--text-muted);
}

.vault-empty-state svg {
    margin-bottom: var(--space-4);
    opacity: 0.5;
}

.vault-empty-state p {
    font-size: var(--text-base);
    font-weight: var(--font-medium);
    margin: 0 0 var(--space-2) 0;
}

.vault-empty-state span {
    font-size: var(--text-sm);
}

/* Vault Item Card */
.vault-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    transition: all var(--transition);
    position: relative;
}

.vault-item:hover {
    border-color: var(--color-navy);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.vault-item-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.vault-item-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vault-item-icon.spreadsheet {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.vault-item-icon.link {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.vault-item-icon.document {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.vault-item-icon.reddit {
    background: rgba(255, 87, 34, 0.15);
    color: #ff5722;
}

.vault-item-info {
    flex: 1;
    min-width: 0;
}

.vault-item-info h4 {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin: 0 0 var(--space-1) 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vault-item-info span {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.vault-item-desc {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vault-item-actions {
    display: flex;
    gap: var(--space-2);
}

.vault-item-actions a,
.vault-item-actions button {
    flex: 1;
    padding: var(--space-2);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition);
}

.vault-item-actions a:hover,
.vault-item-actions button:hover {
    background: var(--color-navy);
    border-color: var(--color-navy);
    color: white;
}

.vault-item-actions button.delete-btn:hover {
    background: var(--color-danger);
    border-color: var(--color-danger);
}

/* ============================
   REGION COLLAPSIBILITY
   ============================ */

/* Clickable region header */
.city-header.clickable {
    cursor: pointer;
    transition: background var(--transition);
    padding: var(--space-3);
    margin: calc(-1 * var(--space-4));
    margin-bottom: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.city-header.clickable:hover {
    background: var(--bg-secondary);
}

/* Region header layout */
.city-header-left {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* Chevron icon for regions */
.region-chevron {
    color: var(--text-muted);
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

/* Region summary badge */
.region-summary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 4px var(--space-3);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: var(--font-medium);
}

/* Collapsible region content */
.region-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.2s ease;
    opacity: 0;
}

.region-content.open {
    max-height: 5000px;
    opacity: 1;
}

/* Collapsed state styling */
.metro-card.collapsed .city-header {
    border-bottom: none;
    margin-bottom: 0;
}

.metro-card.collapsed .city-header.clickable {
    border-radius: var(--radius-lg);
}

.metro-card.expanded .city-header.clickable {
    margin-bottom: var(--space-3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .docs-applicant-grid {
        grid-template-columns: 1fr;
    }

    .docs-strategy-banner {
        grid-template-columns: 1fr;
    }

    .vault-header {
        flex-direction: column;
        gap: var(--space-4);
    }

    .vault-header .btn {
        width: 100%;
    }

    .city-header.clickable {
        padding: var(--space-2);
        margin: calc(-1 * var(--space-3));
        margin-bottom: 0;
    }

    .region-summary {
        font-size: 0.65rem;
        padding: 3px var(--space-2);
    }
}

/* ============================
   TIMELINE CHECKBOXES
   ============================ */

.timeline-checklist {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.timeline-checkbox-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition);
    position: relative;
}

.timeline-checkbox-item:hover {
    background: var(--bg-secondary);
}

.timeline-checkbox-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.timeline-checkbox-marker {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition);
    position: relative;
    margin-top: 2px;
}

.timeline-checkbox-item input[type="checkbox"]:checked ~ .timeline-checkbox-marker {
    background: #10b981;
    border-color: #10b981;
}

.timeline-checkbox-item input[type="checkbox"]:checked ~ .timeline-checkbox-marker::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    top: 3px;
    left: 7px;
}

.timeline-checkbox-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timeline-checkbox-date {
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    color: var(--color-navy);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-checkbox-text {
    font-size: var(--text-sm);
    color: var(--text-primary);
    font-weight: var(--font-medium);
}

.timeline-checkbox-item input[type="checkbox"]:checked ~ .timeline-checkbox-content .timeline-checkbox-text {
    text-decoration: line-through;
    opacity: 0.6;
}

/* ============================
   PERSONAL TO-DO LISTS
   ============================ */

.personal-todo-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    min-height: 200px;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition);
}

.todo-item:hover {
    background: var(--bg-tertiary);
}

.todo-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-color);
    cursor: pointer;
    flex-shrink: 0;
}

.todo-item input[type="checkbox"]:checked {
    background: #10b981;
    border-color: #10b981;
}

.todo-item-text {
    flex: 1;
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.todo-item.completed .todo-item-text {
    text-decoration: line-through;
    opacity: 0.6;
}

.todo-item-delete {
    padding: var(--space-1);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    opacity: 0;
}

.todo-item:hover .todo-item-delete {
    opacity: 1;
}

.todo-item-delete:hover {
    color: var(--color-danger);
    background: rgba(239, 68, 68, 0.1);
}

.todo-empty-state {
    text-align: center;
    padding: var(--space-6);
    color: var(--text-muted);
    font-size: var(--text-sm);
}
