/* ACRMT Admin Dashboard - Styles */
/* Color scheme based on Ashirwad Logo: Blue, Red-Orange, Green, Grey */

:root {
    /* Primary Colors - Blue (from "Ashirwad" text) */
    --primary-color: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1e40af;
    --primary-gradient: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    
    /* Accent Colors - Red-Orange (from heart, CARDIO, RADIO) */
    --accent-color: #f97316;
    --accent-light: #fb923c;
    --accent-dark: #ea580c;
    --accent-gradient: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    
    /* Health/Success - Green (from ECG lines) */
    --success-color: #10b981;
    --success-light: #34d399;
    --success-dark: #059669;
    
    /* Neutral Colors - Grey (from "Medical Training" text) */
    --secondary-color: #64748b;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    
    /* Background Colors - Light Grey/Off-white (from logo background) */
    --bg-color: #f8fafc;
    --bg-secondary: #f1f5f9;
    --card-bg: #ffffff;
    --card-hover: #ffffff;
    
    /* Text Colors - Dark Grey/Black */
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    /* Border & Shadow */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Layout */
    --sidebar-width: 280px;
    --top-bar-height: 70px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Login Screen */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--primary-gradient);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(249, 115, 22, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(16, 185, 129, 0.15) 0%, transparent 50%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 10px,
            rgba(255, 255, 255, 0.03) 10px,
            rgba(255, 255, 255, 0.03) 20px
        );
    pointer-events: none;
}

.login-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 48px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-xl);
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    background: white;
    padding: 8px;
    transition: transform var(--transition-base);
}

.login-logo:hover {
    transform: scale(1.05);
}

.login-header h1 {
    font-size: 32px;
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.login-header h2 {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.login-form input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.error-message {
    color: var(--danger-color);
    font-size: 14px;
    margin-top: 12px;
    padding: 12px;
    background: #fef2f2;
    border-radius: 6px;
    border: 1px solid #fecaca;
}

/* Admin Dashboard Layout */
.admin-dashboard {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--card-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: var(--shadow-md);
    z-index: 100;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--bg-color);
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.sidebar-header {
    padding: 28px 24px;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
    background: var(--primary-gradient);
    position: relative;
    overflow: hidden;
}

.sidebar-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.sidebar-logo {
    width: 70px;
    height: 70px;
    object-fit: contain;
    margin-bottom: 14px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    background: white;
    padding: 6px;
    position: relative;
    z-index: 1;
    transition: transform var(--transition-base);
}

.sidebar-logo:hover {
    transform: scale(1.05) rotate(2deg);
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-base);
    border-left: 4px solid transparent;
    margin: 2px 12px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--primary-gradient);
    transition: width var(--transition-base);
    opacity: 0.1;
}

.nav-item:hover {
    background: var(--bg-color);
    color: var(--primary-color);
    transform: translateX(4px);
}

.nav-item:hover::before {
    width: 100%;
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.nav-item.active::before {
    width: 100%;
    opacity: 0.15;
}

.nav-icon {
    font-size: 20px;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.user-info {
    margin-bottom: 16px;
    text-align: center;
}

.user-info span {
    display: block;
    font-size: 14px;
}

.user-email {
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 4px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

.top-bar {
    height: var(--top-bar-height);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar-actions {
    position: relative;
    z-index: 2002;
}

.top-bar h1 {
    font-size: 24px;
    font-weight: 600;
}

.time-display {
    color: var(--text-secondary);
    font-size: 14px;
}

.content-container {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

.page-content {
    display: none;
}

.page-content.active {
    display: block;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Stats Grid */
/* ==================== DASHBOARD STYLES ==================== */

.dashboard-welcome {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 32px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.dashboard-welcome::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.welcome-content h1 {
    margin: 0 0 8px 0;
    font-size: 32px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.welcome-content p {
    margin: 0;
    font-size: 16px;
    opacity: 0.95;
}

.time-display-large {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.time-large {
    font-size: 36px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.date-large {
    font-size: 14px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 28px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stat-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.05;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    z-index: 0;
}

.stat-card-primary .stat-card-bg {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.stat-card-success .stat-card-bg {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--success-dark) 100%);
}

.stat-card-info .stat-card-bg {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}

.stat-card-warning .stat-card-bg {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-dark) 100%);
}

.stat-icon-wrapper {
    position: relative;
    z-index: 1;
    margin-right: 20px;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

.stat-icon {
    font-size: 36px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.stat-info {
    position: relative;
    z-index: 1;
    flex: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin: 0 0 8px 0;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.trend-icon {
    font-size: 14px;
}

.trend-text {
    font-weight: 500;
}

.quick-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.quick-stat-item {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--border-light);
    transition: all 0.2s;
}

.quick-stat-item:hover {
    background: var(--card-bg);
    border-color: var(--border-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.quick-stat-icon {
    font-size: 32px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border-radius: 10px;
}

.quick-stat-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.quick-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.quick-stat-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.dashboard-section {
    margin-top: 32px;
}

.section-header-dashboard {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.section-header-dashboard h2 {
    margin: 0 0 4px 0;
    font-size: 24px;
    color: var(--text-primary);
}

.section-subtitle {
    margin: 0;
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 500;
    opacity: 0.9;
    line-height: 1.5;
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.view-all-link:hover {
    background: var(--bg-secondary);
    color: var(--primary-dark);
}

.view-all-link span {
    transition: transform 0.2s;
}

.view-all-link:hover span {
    transform: translateX(4px);
}

.recent-activity-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item-modern {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: all 0.2s;
    animation: slideIn 0.3s ease-out backwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.activity-item-modern:hover {
    background: var(--card-bg);
    border-color: var(--primary-color);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.activity-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.avatar-icon {
    color: white;
    font-size: 20px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
}

.activity-header strong {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 600;
}

.activity-order {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    background: var(--bg-color);
    padding: 2px 8px;
    border-radius: 4px;
}

.activity-details {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 13px;
}

.activity-category {
    color: var(--text-secondary);
    font-weight: 500;
}

.activity-separator {
    color: var(--text-muted);
}

.activity-amount {
    color: var(--primary-color);
    font-weight: 600;
}

.activity-footer {
    font-size: 12px;
    color: var(--text-muted);
}

.activity-status {
    flex-shrink: 0;
}

.badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
}

.badge-icon {
    font-size: 14px;
}

.empty-state-card {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state-card p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

.empty-state-hint {
    margin-top: 8px !important;
    font-size: 14px !important;
    opacity: 0.7;
}

.error-state-card {
    text-align: center;
    padding: 40px 20px;
}

/* Responsive Dashboard */
@media (max-width: 768px) {
    .dashboard-welcome {
        flex-direction: column;
        text-align: center;
        padding: 32px 24px;
    }
    
    .time-display-large {
        text-align: center;
        margin-top: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-stats-row {
        grid-template-columns: 1fr;
    }
    
    .section-header-dashboard {
        flex-direction: column;
        gap: 12px;
    }
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.stat-info p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Tables */
.table-container {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--bg-color);
}

.data-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.data-table tbody tr:hover {
    background: var(--bg-color);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast);
}

.badge:hover {
    transform: scale(1.05);
}

.badge-success {
    background: linear-gradient(135deg, var(--success-light) 0%, var(--success-color) 100%);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.badge-warning {
    background: linear-gradient(135deg, #fbbf24 0%, var(--warning-color) 100%);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.badge-danger {
    background: linear-gradient(135deg, #f87171 0%, var(--danger-color) 100%);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.badge-info {
    background: var(--primary-gradient);
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-input {
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    width: 100%;
    max-width: 400px;
    transition: all var(--transition-base);
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1), var(--shadow-md);
    transform: translateY(-1px);
}

.filter-select {
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    background: var(--card-bg);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
    font-weight: 500;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1), var(--shadow-md);
}

.search-filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

/* Activity List */
.activity-list {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.activity-info strong {
    color: var(--text-primary);
}

.activity-info span {
    color: var(--text-secondary);
    font-size: 12px;
}

.activity-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 48px;
    color: var(--text-secondary);
}

.loading-text {
    text-align: center;
    padding: 24px;
    color: var(--text-secondary);
}

.error-text {
    color: var(--danger-color);
    text-align: center;
    padding: 24px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .search-filter-bar {
        flex-direction: column;
    }
    
    .search-input,
    .filter-select {
        max-width: 100%;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .data-table {
        min-width: 800px;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 24px;
    }
    
    .content-container {
        padding: 16px;
    }
    
    .top-bar {
        padding: 0 16px;
    }
    
    .top-bar h1 {
        font-size: 20px;
    }
}

/* Tabs */
.tab-btn {
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    font-size: 14px;
    font-weight: 500;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
    margin-top: 24px;
}

.tab-content.active {
    display: block;
}

/* Chart Canvas */
.chart-card canvas {
    max-height: 400px;
    width: 100% !important;
    height: 400px !important;
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.chart-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 28px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.chart-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.chart-card h3 {
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 600;
}

/* Upload Area */
.upload-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 48px;
    text-align: center;
    background: var(--bg-color);
    cursor: pointer;
    transition: all 0.2s;
}

.upload-dropzone:hover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.import-upload-area {
    margin-top: 16px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.preview-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 16px;
}

.preview-table-container {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.import-preview {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.validation-errors {
    margin-bottom: 16px;
}

.alert {
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid;
}

.alert-warning {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.alert-warning ul {
    list-style-type: disc;
    margin-top: 8px;
}

.alert-warning li {
    margin-bottom: 4px;
    font-size: 13px;
}

/* Print Preview */
/* ==================== PASS PRINTING PAGE STYLES ==================== */

.print-header-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    color: white;
    box-shadow: var(--shadow-xl);
}

.print-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.print-header-content h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.print-header-content .section-subtitle {
    margin: 0;
    font-size: 16px;
    opacity: 0.95;
    color: white;
    font-weight: 500;
}

.print-header-icon {
    font-size: 64px;
    opacity: 0.9;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.print-instructions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.instruction-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.instruction-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    flex-shrink: 0;
}

.instruction-item span:last-child {
    font-size: 14px;
    font-weight: 500;
}

.print-search-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.print-search-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.print-stats-mini {
    display: flex;
    gap: 16px;
    align-items: center;
}

.print-stat-item {
    font-size: 14px;
    color: var(--text-secondary);
}

.print-stat-item strong {
    color: var(--primary-color);
    font-weight: 700;
    margin-right: 4px;
}

.print-container {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 24px;
    min-height: 600px;
}

.print-list-section {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.print-list-header {
    padding: 20px;
    border-bottom: 2px solid var(--border-color);
    background: var(--bg-secondary);
}

.print-list-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.print-registrations-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.print-registration-item {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    gap: 12px;
    align-items: center;
    animation: slideInLeft 0.3s ease-out backwards;
}

.print-registration-item:hover {
    background: var(--card-bg);
    border-color: var(--primary-color);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.print-registration-item.selected {
    background: var(--card-bg);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.print-item-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.print-item-content {
    flex: 1;
    min-width: 0;
}

.print-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    gap: 12px;
}

.print-item-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.print-item-order {
    font-size: 11px;
    color: var(--text-secondary);
    font-family: 'Courier New', monospace;
    background: var(--bg-color);
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.print-item-details {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 13px;
}

.print-item-category {
    color: var(--text-secondary);
    font-weight: 500;
}

.print-item-separator {
    color: var(--text-muted);
}

.print-item-phone {
    color: var(--text-secondary);
}

.print-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
}

.print-item-date {
    color: var(--text-muted);
}

.print-item-qr-badge {
    color: var(--success-color);
    font-weight: 600;
    font-size: 10px;
}

.print-item-action {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
    border-radius: 8px;
    transition: all 0.2s;
}

.print-registration-item:hover .print-item-action {
    background: var(--primary-color);
    color: white;
}

.action-icon {
    font-size: 16px;
}

.print-preview-section {
    display: flex;
    flex-direction: column;
}

.print-empty-list {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.print-empty-list p {
    margin: 0;
    font-size: 14px;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 16px;
    font-size: 20px;
    color: var(--text-secondary);
    z-index: 1;
}

.search-input-large {
    width: 100%;
    padding: 16px 16px 16px 48px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-color);
    color: var(--text-primary);
    transition: all 0.2s;
}

.search-input-large:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-large {
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.print-preview-modern {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    min-height: 500px;
    overflow: hidden;
}

.print-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    text-align: center;
    color: var(--text-secondary);
}

.empty-state-icon-large {
    font-size: 80px;
    margin-bottom: 24px;
    opacity: 0.5;
}

.print-empty-state h3 {
    margin: 0 0 12px 0;
    font-size: 24px;
    color: var(--text-primary);
    font-weight: 600;
}

.print-empty-state p {
    margin: 0;
    font-size: 15px;
    max-width: 400px;
}

.print-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    text-align: center;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.print-loading-state p {
    color: var(--text-secondary);
    font-size: 15px;
    margin: 0;
}

.print-error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    text-align: center;
}

.error-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.print-error-state h3 {
    margin: 0 0 12px 0;
    font-size: 20px;
    color: var(--error-color);
    font-weight: 600;
}

.print-error-state p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 14px;
    max-width: 400px;
}

.print-preview-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.print-preview-header {
    padding: 24px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: var(--bg-secondary);
}

.print-preview-header h3 {
    margin: 0 0 4px 0;
    font-size: 22px;
    color: var(--text-primary);
    font-weight: 700;
}

.preview-subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.print-preview-body {
    flex: 1;
    padding: 32px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    overflow-y: auto;
}

.preview-pass-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-pass-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 350px;
    color: white;
    box-shadow: var(--shadow-xl);
    text-align: center;
}

.preview-pass-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.preview-logo-placeholder {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
}

.preview-year {
    font-size: 18px;
    font-weight: 600;
    opacity: 0.9;
}

.preview-pass-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.preview-pass-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    word-break: break-word;
}

.preview-pass-category {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 16px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: inline-block;
}

.preview-pass-qr {
    margin: 16px 0;
    display: flex;
    justify-content: center;
}

.qr-code-preview {
    width: 180px;
    height: 180px;
    border-radius: 12px;
    background: white;
    padding: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.preview-pass-no-qr {
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    font-size: 13px;
    margin: 16px 0;
}

.preview-pass-id {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 12px;
    font-family: 'Courier New', monospace;
    word-break: break-all;
}

.preview-details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.preview-detail-item {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    border-left: 4px solid var(--primary-color);
}

.detail-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-word;
}

.print-preview-footer {
    padding: 24px;
    border-top: 2px solid var(--border-color);
    background: var(--bg-secondary);
    text-align: center;
}

.btn-print {
    margin-bottom: 12px;
    box-shadow: var(--shadow-md);
    transition: all 0.2s;
}

.btn-print:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.print-hint {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Responsive Print Preview */
@media (max-width: 1024px) {
    .print-preview-body {
        grid-template-columns: 1fr;
    }
    
    .preview-pass-card {
        max-width: 100%;
    }
    
    .print-instructions {
        grid-template-columns: 1fr;
    }
    
    .print-search-wrapper {
        flex-direction: column;
    }
}

/* ==================== DATA IMPORT PAGE STYLES ==================== */

.import-header-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    color: white;
    box-shadow: var(--shadow-xl);
}

.import-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.import-header-content h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.import-header-content .section-subtitle {
    margin: 0;
    font-size: 16px;
    opacity: 0.95;
    color: white;
    font-weight: 500;
}

.import-header-icon {
    font-size: 64px;
    opacity: 0.9;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.import-instructions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.import-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.import-stat-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.import-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.import-stat-icon {
    font-size: 32px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.import-stat-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.import-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.import-stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.import-template-card,
.import-upload-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.import-template-card:hover,
.import-upload-card:hover {
    box-shadow: var(--shadow-lg);
}

.template-card-header,
.upload-card-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
}

.template-icon-wrapper,
.upload-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.template-icon {
    font-size: 32px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.upload-icon-large {
    font-size: 36px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.template-content h3,
.upload-content h3 {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.template-content p,
.upload-content p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.template-card-body {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.template-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.template-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 4px solid var(--success-color);
}

.feature-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--success-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.template-feature span:last-child {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
}

.upload-card-body {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.upload-dropzone-modern {
    border: 3px dashed var(--border-color);
    border-radius: 16px;
    padding: 48px 24px;
    text-align: center;
    background: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.upload-dropzone-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.1), transparent);
    transition: left 0.5s;
}

.upload-dropzone-modern:hover::before {
    left: 100%;
}

.upload-dropzone-modern:hover {
    border-color: var(--primary-color);
    background: var(--card-bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.upload-dropzone-modern.drag-over {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
    border-style: solid;
}

.dropzone-content {
    position: relative;
    z-index: 1;
}

.dropzone-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.7;
}

.dropzone-text {
    font-size: 18px;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.dropzone-text strong {
    color: var(--primary-color);
    font-weight: 600;
}

.dropzone-hint {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.import-preview-modern {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 24px;
    border: 2px solid var(--border-color);
    margin-top: 24px;
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.preview-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.preview-header-modern h4 {
    margin: 0 0 4px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.preview-subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.preview-count {
    color: var(--primary-color);
    font-weight: 700;
}

.validation-errors-modern {
    background: #fee2e2;
    border: 2px solid #dc2626;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.validation-errors-modern h5 {
    margin: 0 0 12px 0;
    color: #dc2626;
    font-size: 16px;
    font-weight: 600;
}

.validation-errors-modern ul {
    margin: 0;
    padding-left: 20px;
    color: #991b1b;
}

.validation-errors-modern li {
    margin: 6px 0;
    font-size: 14px;
}

.preview-table-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.preview-table-container {
    min-width: 100%;
}

.preview-actions {
    display: flex;
    justify-content: center;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

#importCountBadge {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: 8px;
    font-size: 14px;
}

/* Responsive Data Import */
@media (max-width: 768px) {
    .import-instructions {
        grid-template-columns: 1fr;
    }
    
    .import-stats-row {
        grid-template-columns: 1fr;
    }
    
    .template-info {
        grid-template-columns: 1fr;
    }
    
    .template-card-header,
    .upload-card-header {
        flex-direction: column;
        text-align: center;
    }
}

/* Validation */
/* ==================== REGISTRATION VALIDATION PAGE STYLES ==================== */

.validation-header-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    color: white;
    box-shadow: var(--shadow-xl);
}

.validation-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.validation-header-content h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.validation-header-content .section-subtitle {
    margin: 0;
    font-size: 16px;
    opacity: 0.95;
    color: white;
    font-weight: 500;
}

.validation-header-icon {
    font-size: 64px;
    opacity: 0.9;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.validation-features {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.validation-feature-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 13px;
    font-weight: 500;
}

.validation-tabs-modern {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 8px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.validation-tab-modern {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    flex: 1;
    justify-content: center;
    color: var(--text-secondary);
    font-weight: 500;
}

.validation-tab-modern:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.validation-tab-modern.active {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.validation-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.validation-tab-content.active {
    display: block;
}

.validation-card-modern {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.validation-card-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
}

.validation-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.validation-icon-large {
    font-size: 32px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.validation-card-header h3 {
    margin: 0 0 4px 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.validation-subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.qr-scanner-modern {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.qr-scanner-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    aspect-ratio: 4/3;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-secondary);
    border: 3px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.qr-scanner-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px;
    text-align: center;
    color: var(--text-secondary);
}

.scanner-placeholder-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.qr-scanner-placeholder h4 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: var(--text-primary);
    font-weight: 600;
}

.qr-scanner-placeholder p {
    margin: 0 0 24px 0;
    font-size: 14px;
}

.scanner-tips {
    display: flex;
    gap: 16px;
    margin-top: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--card-bg);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.tip-icon {
    font-size: 16px;
}

.qr-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.qr-scan-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.scan-frame {
    width: 250px;
    height: 250px;
    border: 3px solid var(--primary-color);
    border-radius: 16px;
    position: relative;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
    animation: scanPulse 2s ease-in-out infinite;
}

@keyframes scanPulse {
    0%, 100% {
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5), 0 0 0 0 rgba(37, 99, 235, 0.7);
    }
    50% {
        box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5), 0 0 0 10px rgba(37, 99, 235, 0);
    }
}

.scan-corner {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 4px solid white;
}

.scan-corner-tl {
    top: -4px;
    left: -4px;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: 12px;
}

.scan-corner-tr {
    top: -4px;
    right: -4px;
    border-left: none;
    border-bottom: none;
    border-top-right-radius: 12px;
}

.scan-corner-bl {
    bottom: -4px;
    left: -4px;
    border-right: none;
    border-top: none;
    border-bottom-left-radius: 12px;
}

.scan-corner-br {
    bottom: -4px;
    right: -4px;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: 12px;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    animation: scanLine 2s linear infinite;
}

@keyframes scanLine {
    0% {
        top: 0;
    }
    100% {
        top: 100%;
    }
}

.scan-hint {
    margin-top: 280px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.qr-scanner-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.phone-lookup-modern {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.phone-lookup-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.input-icon-wrapper-large {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon-large {
    position: absolute;
    left: 16px;
    font-size: 24px;
    color: var(--text-secondary);
    z-index: 1;
}

.form-control-large {
    width: 100%;
    padding: 16px 16px 16px 56px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-color);
    color: var(--text-primary);
    transition: all 0.2s;
}

.form-control-large:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.phone-lookup-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    font-size: 14px;
    color: var(--text-secondary);
}

.hint-icon {
    font-size: 18px;
}

.phone-lookup-examples {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.examples-title {
    margin: 0 0 12px 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.examples-list {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.example-item {
    padding: 6px 12px;
    background: var(--card-bg);
    border-radius: 6px;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.validation-result-modern {
    margin-top: 24px;
    animation: slideInUp 0.3s ease-out;
}

.validation-result-valid-modern {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px;
    border: 2px solid var(--success-color);
    box-shadow: var(--shadow-md);
}

.result-header-valid {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
}

.result-icon-large {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
}

.result-icon-large.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: var(--shadow-md);
}

.result-header-valid h3 {
    margin: 0 0 4px 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.result-subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.result-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.result-detail-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-left: 4px solid var(--primary-color);
}

.result-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-value {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
}

.result-value-large {
    font-size: 18px;
    color: var(--text-primary);
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.result-actions {
    display: flex;
    justify-content: center;
    padding-top: 24px;
    border-top: 2px solid var(--border-color);
}

.validation-result-invalid-modern {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px;
    border: 2px solid var(--error-color);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.validation-result-invalid-modern .result-icon-large {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px;
    box-shadow: var(--shadow-md);
}

.validation-result-invalid-modern h3 {
    margin: 0 0 12px 0;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.result-message {
    margin: 0 0 20px 0;
    font-size: 15px;
    color: var(--text-secondary);
}

.result-details {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px;
    margin-top: 20px;
}

.result-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.result-detail-item:last-child {
    border-bottom: none;
}

/* Responsive Validation */
@media (max-width: 768px) {
    .validation-features {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .validation-tabs-modern {
        flex-direction: column;
    }
    
    .validation-tab-modern {
        width: 100%;
    }
    
    .qr-scanner-container {
        max-width: 100%;
    }
    
    .phone-lookup-input-wrapper {
        flex-direction: column;
    }
    
    .result-details-grid {
        grid-template-columns: 1fr;
    }
}

.validation-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.validation-loading p {
    margin: 16px 0 0 0;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Handheld Scanner Styles */
.handheld-scanner-modern {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.scanner-input-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.scanner-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scanner-input {
    font-size: 18px;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.scanner-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    font-size: 14px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success-color);
    transition: all 0.3s;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: statusPulse 2s ease-in-out infinite;
}

.status-dot.scanning {
    background: var(--primary-color);
    animation: statusPulse 0.5s ease-in-out infinite;
}

.status-dot.processing {
    background: var(--warning-color);
    animation: statusPulse 1s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(37, 99, 235, 0);
    }
}

.status-text {
    color: var(--text-secondary);
    font-weight: 500;
}

.scanner-instructions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.instruction-card {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
}

.instruction-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.instruction-card strong {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 14px;
}

.instruction-card ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 13px;
}

.instruction-card li {
    margin-bottom: 4px;
}

.phone-lookup-auto-search {
    display: flex;
    justify-content: center;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.auto-search-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: var(--text-secondary);
}

.auto-search-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.auto-search-toggle:hover {
    color: var(--text-primary);
}

/* Responsive Handheld Scanner */
@media (max-width: 768px) {
    .scanner-instructions {
        grid-template-columns: 1fr;
    }
    
    .scanner-input {
        font-size: 16px;
    }
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

.badge-secondary {
    background: #e2e8f0;
    color: #475569;
}

/* CRM */
/* ==================== CRM PAGE STYLES ==================== */

.crm-header-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    color: white;
    box-shadow: var(--shadow-xl);
}

.crm-header-content h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.crm-header-content .section-subtitle {
    margin: 0;
    font-size: 16px;
    opacity: 0.95;
    color: white;
    font-weight: 500;
}

.crm-stats-mini {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.crm-stat-mini {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.crm-stat-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.crm-stat-mini > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.crm-stat-value {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.crm-stat-label {
    font-size: 12px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.crm-container {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 24px;
    min-height: 600px;
}

.crm-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.crm-filters-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.crm-filters-title {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.crm-filters {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.crm-threads-card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.crm-threads-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.crm-threads-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.crm-threads-count {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.crm-threads {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.crm-thread-item-modern {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    display: flex;
    gap: 12px;
    animation: slideInLeft 0.3s ease-out backwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.crm-thread-item-modern:hover {
    background: var(--card-bg);
    border-color: var(--primary-color);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.crm-thread-item-modern.open {
    border-left: 4px solid #ef4444;
}

.crm-thread-item-modern.in-progress {
    border-left: 4px solid #f59e0b;
}

.crm-thread-item-modern.resolved {
    border-left: 4px solid #10b981;
}

.thread-item-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.avatar-letter {
    color: white;
    font-size: 18px;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.thread-item-content {
    flex: 1;
    min-width: 0;
}

.thread-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    gap: 12px;
}

.thread-item-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.thread-item-email {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
    margin-top: 2px;
}

.thread-status-badge {
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.thread-status-badge.open {
    background: #fee2e2;
    color: #dc2626;
}

.thread-status-badge.in-progress {
    background: #fef3c7;
    color: #d97706;
}

.thread-status-badge.resolved {
    background: #d1fae5;
    color: #059669;
}

.thread-item-preview {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.thread-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-muted);
}

.thread-has-response {
    color: var(--primary-color);
    font-weight: 600;
}

.crm-main {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow-y: auto;
    min-height: 600px;
}

.crm-thread-view {
    padding: 0;
}

.crm-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 40px;
    text-align: center;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.crm-empty-state h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: var(--text-primary);
}

.crm-empty-state p {
    margin: 0;
    font-size: 14px;
}

.crm-empty-threads,
.crm-error-threads {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.crm-error-state {
    padding: 40px 20px;
    text-align: center;
    color: var(--error-color);
}

.crm-thread-detail-modern {
    padding: 32px;
}

.thread-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
}

.thread-detail-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.thread-detail-avatar-large {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.avatar-letter-large {
    color: white;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.thread-detail-user-info h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
    color: var(--text-primary);
}

.thread-detail-status-badge {
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
}

.thread-detail-status-badge.open {
    background: #fee2e2;
    color: #dc2626;
}

.thread-detail-status-badge.in-progress {
    background: #fef3c7;
    color: #d97706;
}

.thread-detail-status-badge.resolved {
    background: #d1fae5;
    color: #059669;
}

.thread-detail-meta {
    text-align: right;
}

.thread-detail-date {
    font-size: 13px;
    color: var(--text-secondary);
}

.thread-detail-info-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 15px;
    color: var(--text-primary);
    font-weight: 500;
}

.info-value a {
    color: var(--primary-color);
    text-decoration: none;
}

.info-value a:hover {
    text-decoration: underline;
}

.thread-detail-message-card,
.thread-detail-response-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border-left: 4px solid var(--primary-color);
}

.thread-detail-response-card {
    border-left-color: var(--success-color);
    background: #f0fdf4;
}

.message-card-header,
.response-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.message-card-header h4,
.response-card-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.response-date {
    font-size: 12px;
    color: var(--text-secondary);
}

.message-card-body,
.response-card-body {
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 15px;
}

.message-card-body p,
.response-card-body p {
    margin: 0;
}

.thread-detail-actions-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    border: 2px solid var(--border-color);
}

.thread-detail-actions-card h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.thread-response-textarea {
    margin-bottom: 16px;
    font-family: inherit;
    resize: vertical;
}

.thread-actions-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.thread-actions-buttons .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Responsive CRM */
@media (max-width: 1024px) {
    .crm-container {
        grid-template-columns: 1fr;
    }
    
    .crm-sidebar {
        order: 2;
    }
    
    .crm-main {
        order: 1;
        min-height: 400px;
    }
    
    .crm-stats-mini {
        grid-template-columns: repeat(2, 1fr);
    }
}

.thread-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.thread-detail {
    padding: 24px;
}

.thread-header-detail {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.thread-info p {
    margin: 8px 0;
    color: var(--text-secondary);
}

.thread-message {
    margin: 24px 0;
    padding: 16px;
    background: var(--bg-color);
    border-radius: 8px;
}

.thread-response {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.print-preview-content {
    padding: 24px;
}

.pass-details {
    margin-top: 16px;
}

.pass-details p {
    margin: 8px 0;
}

/* Template Management */
.templates-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.template-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--card-bg);
    transition: all 0.2s;
}

.template-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.template-info {
    flex: 1;
}

.template-info h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
}

.template-subject {
    margin: 4px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.template-meta {
    margin: 4px 0 0 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.template-actions {
    display: flex;
    gap: 8px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.card-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-color);
}

.card-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

/* Verification History */
.verification-history {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid;
}

.history-item.verified {
    background: #d1fae5;
    border-left-color: var(--success-color);
}

.history-item.rejected {
    background: #fee2e2;
    border-left-color: var(--danger-color);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.history-details {
    font-size: 14px;
    color: var(--text-secondary);
}

.history-details p {
    margin: 4px 0;
}

/* Edit Form Styles */
.read-only-badge {
    display: inline-block;
    background: #e2e8f0;
    color: #475569;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    font-weight: 500;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input:disabled,
.form-group input[readonly] {
    background-color: #f1f5f9;
    cursor: not-allowed;
    opacity: 0.7;
}

.form-group small.form-text {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

#membershipEditForm {
    max-width: 100%;
}

/* Page Header */
.page-header {
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.page-header h2 {
    font-size: 24px;
    font-weight: 600;
}

/* Pagination */
.pagination {
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 40px;
}

.pagination button:hover:not(:disabled) {
    background: var(--bg-color);
    border-color: var(--primary-color);
}

.pagination button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ellipsis {
    padding: 8px 4px;
    color: var(--text-secondary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.modal[style*="display: flex"],
.modal[style*="display:flex"],
.modal[style*="display: flex !important"],
.modal[style*="display:flex !important"] {
    display: flex !important;
}

/* Ensure About modal is visible when opened */
#aboutModal[style*="flex"],
#aboutModal.modal-open,
#aboutModal[style*="display: flex"],
#aboutModal[style*="display:flex"] {
    display: flex !important;
    z-index: 9999 !important;
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 28px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary-gradient);
    border-radius: 20px 20px 0 0;
    color: white;
}

.modal-header h2 {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.modal-content-large {
    max-width: 900px;
}

.modal-header-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.validation-modal-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}

.validation-modal-icon.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.modal-subtitle {
    margin: 4px 0 0 0;
    font-size: 14px;
    opacity: 0.9;
    font-weight: 400;
}

.validation-modal-content {
    padding: 8px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    font-weight: 300;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: var(--bg-color);
    border-radius: 0 0 12px 12px;
}

.detail-section {
    margin-bottom: 24px;
}

.detail-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 500;
}

.detail-value.empty {
    color: var(--text-secondary);
    font-style: italic;
}

/* ==================== BULK EMAIL PAGE STYLES ==================== */

/* Email Tabs */
/* ==================== BULK EMAIL PAGE STYLES ==================== */

.email-header-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    color: white;
    box-shadow: var(--shadow-xl);
}

.email-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.email-header-content h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.email-header-content .section-subtitle {
    margin: 0;
    font-size: 16px;
    opacity: 0.95;
    color: white;
    font-weight: 500;
}

.email-header-icon {
    font-size: 64px;
    opacity: 0.9;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.email-features {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.feature-badge {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 13px;
    font-weight: 500;
}

.feature-badge-icon {
    font-size: 16px;
}

.email-tabs-modern {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 8px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.email-tab-modern {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    flex: 1;
    justify-content: center;
    color: var(--text-secondary);
    font-weight: 500;
}

.email-tab-modern:hover:not(.active) {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.email-tab-modern.active {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.email-tab-modern.active .tab-indicator {
    display: none;
}

.tab-icon {
    font-size: 18px;
}

.tab-text {
    font-size: 14px;
}

.email-composer-card-modern {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.composer-section-modern {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 2px solid var(--border-color);
}

.composer-section-modern:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-header-modern {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.section-header-left {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.section-number {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.section-header-left h3 {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.section-description {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.section-badge-modern {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-badge-modern.required {
    background: #fee2e2;
    color: #dc2626;
}

.section-badge-modern.optional {
    background: #fef3c7;
    color: #d97706;
}

.recipients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.recipient-option {
    cursor: pointer;
    display: block;
}

.recipient-option input[type="checkbox"] {
    display: none;
}

.recipient-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s;
    height: 100%;
}

.recipient-card:hover {
    border-color: var(--primary-color);
    background: var(--card-bg);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.recipient-option input[type="checkbox"]:checked + .recipient-card {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.recipient-icon {
    font-size: 32px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.recipient-info {
    flex: 1;
    min-width: 0;
}

.recipient-info strong {
    display: block;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-weight: 600;
}

.recipient-info small {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
}

.recipient-count {
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.composer-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid var(--border-color);
}

.templates-card-modern {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.templates-header-modern {
    padding: 24px;
    border-bottom: 2px solid var(--border-color);
    background: var(--bg-secondary);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.templates-header-modern h3 {
    margin: 0 0 4px 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.templates-subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.templates-body-modern {
    padding: 24px;
}

.templates-list-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.templates-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.recipients-import-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.recipients-import-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
}

.import-icon-wrapper {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.import-icon {
    font-size: 32px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.recipients-import-header h3 {
    margin: 0 0 4px 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.import-subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.recipients-list-card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.recipients-list-header {
    padding: 24px;
    border-bottom: 2px solid var(--border-color);
    background: var(--bg-secondary);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.recipients-list-header h3 {
    margin: 0 0 4px 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}

.recipients-subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.recipients-list-body {
    padding: 24px;
}

/* Responsive Bulk Email */
@media (max-width: 768px) {
    .email-features {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .email-tabs-modern {
        flex-direction: column;
    }
    
    .email-tab-modern {
        width: 100%;
    }
    
    .recipients-grid {
        grid-template-columns: 1fr;
    }
    
    .templates-list-modern {
        grid-template-columns: 1fr;
    }
    
    .templates-header-modern,
    .recipients-list-header {
        flex-direction: column;
    }
    
    .section-header-modern {
        flex-direction: column;
        gap: 12px;
    }
}

.email-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0;
}

.email-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    bottom: -2px;
}

.email-tab:hover {
    color: var(--primary-color);
    background: var(--bg-secondary);
}

.email-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: transparent;
}

.tab-icon {
    font-size: 18px;
}

.tab-text {
    font-weight: 600;
}

.email-tab-content {
    display: none;
}

.email-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Email Composer Card */
.email-composer-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.composer-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-light);
}

.composer-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-header h3 {
    margin: 0;
    font-size: 18px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-badge.required {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

.section-badge:not(.required) {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

/* Recipients Grid */
.recipients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.recipient-option {
    display: block;
    cursor: pointer;
    margin: 0;
}

.recipient-option input[type="checkbox"] {
    display: none;
}

.recipient-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.2s;
    height: 100%;
}

.recipient-card:hover {
    border-color: var(--primary-light);
    background: #eff6ff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.recipient-option input[type="checkbox"]:checked + .recipient-card {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.recipient-icon {
    font-size: 32px;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.recipient-info {
    flex: 1;
}

.recipient-info strong {
    display: block;
    color: var(--text-primary);
    font-size: 15px;
    margin-bottom: 4px;
}

.recipient-info small {
    display: block;
    color: var(--text-secondary);
    font-size: 13px;
}

.recipient-count {
    background: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    margin-left: 8px;
    transition: all 0.2s;
}

.recipient-count.count-zero {
    background: var(--text-muted);
}

.recipient-count.count-error {
    background: var(--danger-color);
}

.link-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.link-button:hover {
    background: var(--bg-secondary);
    color: var(--primary-dark);
}

/* Form Enhancements */
.form-hint {
    display: block;
    margin-top: 6px;
    color: var(--text-secondary);
    font-size: 13px;
}

.form-hint-box {
    margin-top: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.form-hint-box strong {
    display: block;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 14px;
}

.form-hint-box ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 13px;
}

.form-hint-box li {
    margin-bottom: 4px;
}

.form-hint-box code {
    background: var(--card-bg);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: var(--primary-color);
}

.required-star {
    color: var(--danger-color);
    font-weight: 600;
}

.email-body-textarea {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    resize: vertical;
}

.image-selector {
    display: flex;
    gap: 12px;
    align-items: center;
}

.image-preview {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.image-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    object-fit: contain;
}

/* Composer Actions */
.composer-actions {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid var(--border-light);
}

.btn-large {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 10px;
    transition: all 0.2s;
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Templates List */
.templates-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.template-item {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s;
}

.template-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.template-item h4 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 16px;
}

.template-item p {
    margin: 0 0 12px 0;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.template-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

/* ==================== REGISTRATIONS PAGE STYLES ==================== */
.registrations-header-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    color: white;
    box-shadow: var(--shadow-xl);
}

.registrations-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.registrations-header-content h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.registrations-header-content .section-subtitle {
    margin: 0;
    font-size: 16px;
    opacity: 0.95;
    color: white;
    font-weight: 500;
}

.registrations-header-icon {
    font-size: 64px;
    opacity: 0.9;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.registrations-features {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.registrations-feature-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 13px;
    font-weight: 500;
}

.registrations-search-card, .memberships-search-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.search-filter-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.search-input-wrapper {
    flex: 1;
    min-width: 300px;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 16px;
    font-size: 20px;
    color: var(--text-secondary);
    z-index: 1;
}

.search-input-large {
    width: 100%;
    padding: 14px 16px 14px 48px;
    font-size: 15px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-color);
    color: var(--text-primary);
    transition: all 0.2s;
}

.search-input-large:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-group {
    display: flex;
    gap: 12px;
}

.filter-select-modern {
    padding: 14px 16px;
    font-size: 15px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-color);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    min-width: 150px;
}

.filter-select-modern:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.export-buttons {
    display: flex;
    gap: 8px;
}

.registrations-table-card, .memberships-table-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.table-container-modern {
    overflow-x: auto;
    margin-bottom: 24px;
}

.data-table-modern {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table-modern thead {
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
}

.data-table-modern th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table-modern td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.data-table-modern tbody tr:hover {
    background: var(--bg-secondary);
}

.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.actions-column {
    text-align: center;
}

.actions-column .action-buttons {
    justify-content: center;
}

.pagination-modern {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
}

/* ==================== MEMBERSHIPS PAGE STYLES ==================== */
.memberships-header-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    color: white;
    box-shadow: var(--shadow-xl);
}

.memberships-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.memberships-header-content h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.memberships-header-content .section-subtitle {
    margin: 0;
    font-size: 16px;
    opacity: 0.95;
    color: white;
    font-weight: 500;
}

.memberships-header-icon {
    font-size: 64px;
    opacity: 0.9;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.memberships-features {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.memberships-feature-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 13px;
    font-weight: 500;
}

/* ==================== ANALYTICS PAGE STYLES ==================== */
.analytics-header-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 24px;
    color: white;
    box-shadow: var(--shadow-xl);
}

.analytics-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.analytics-header-content h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.analytics-header-content .section-subtitle {
    margin: 0;
    font-size: 16px;
    opacity: 0.95;
    color: white;
    font-weight: 500;
}

.analytics-header-icon {
    font-size: 64px;
    opacity: 0.9;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
}

.analytics-features {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.analytics-feature-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 13px;
    font-weight: 500;
}

.analytics-charts-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.chart-card-modern {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.chart-header h3 {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.chart-subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.chart-icon {
    font-size: 32px;
    opacity: 0.7;
}

.chart-body {
    position: relative;
    height: 300px;
}

.analytics-actions-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.actions-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.actions-content h3 {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.actions-subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
}

.actions-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
    .email-tabs {
        flex-wrap: wrap;
    }
    
    .email-tab {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
    
    .tab-text {
        display: none;
    }
    
    .recipients-grid {
        grid-template-columns: 1fr;
    }
    
    .composer-actions {
        flex-direction: column;
    }
    
    .btn-large {
        width: 100%;
        justify-content: center;
    }
    
    .email-composer-card {
        padding: 20px;
    }
}

/* ==================== PROFILE MENU STYLES ==================== */

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-menu-wrapper {
    position: relative;
    z-index: 2001;
}

.profile-menu-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--primary-gradient);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.profile-menu-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.user-initial {
    display: block;
    line-height: 1;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    min-width: 220px;
    z-index: 2000;
    overflow: hidden;
    animation: dropdownSlideIn 0.2s ease-out;
    display: none;
}

@keyframes dropdownSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-dropdown-header {
    padding: 16px;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}

.profile-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.profile-email {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
}

.profile-dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 0;
}

.profile-dropdown-item {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-primary);
    transition: background var(--transition-fast);
}

.profile-dropdown-item:hover {
    background: var(--bg-color);
}

.profile-dropdown-item:active {
    background: var(--bg-secondary);
}

.dropdown-icon {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

/* ==================== ABOUT MODAL STYLES ==================== */

.modal-content-about {
    max-width: 500px;
}

.about-section {
    margin-bottom: 24px;
}

.about-section:last-child {
    margin-bottom: 0;
}

.about-app-name {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-version {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 16px;
}

.about-section-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
}

.about-license-text {
    color: var(--text-primary);
    line-height: 1.7;
}

.about-license-text p {
    margin-bottom: 12px;
}

.about-license-text p:last-child {
    margin-bottom: 0;
}

.about-contact {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px;
    background: var(--bg-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.about-contact-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.about-contact-phone {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

.about-contact-link {
    font-size: 16px;
    font-weight: 500;
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-base);
}

.about-contact-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.about-copy-btn {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: 16px;
}

.about-copy-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.about-copy-btn:active {
    transform: scale(0.95);
}

.copy-icon {
    display: block;
}

.copy-feedback {
    font-size: 12px;
    color: var(--success-color);
    font-weight: 600;
    margin-left: 8px;
    animation: fadeInOut 2s ease-in-out;
}

@keyframes fadeInOut {
    0%, 100% {
        opacity: 0;
    }
    10%, 90% {
        opacity: 1;
    }
}

/* ==================== SIDEBAR FOOTER LINK ==================== */

.sidebar-footer-links {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.about-link {
    display: inline-block;
    font-size: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
    padding: 4px 8px;
    border-radius: 4px;
}

.about-link:hover {
    color: var(--primary-color);
    background: var(--bg-color);
}

/* Mobile Responsive for About Modal and Profile Menu */
@media (max-width: 768px) {
    .profile-dropdown {
        right: 0;
        left: auto;
        min-width: 200px;
    }
    
    .modal-content-about {
        width: 95%;
        margin: 10% auto;
    }
    
    .about-app-name {
        font-size: 24px;
    }
    
    .about-contact {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .about-copy-btn {
        width: 100%;
        justify-content: center;
    }
    
    .top-bar-actions {
        gap: 8px;
    }
    
    .profile-menu-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

