/**
 * Gesture CMS Modern - Main Styles
 * Enhanced with modern design, accessibility, and performance
 */

/* CSS Custom Properties for Theming */
:root {
    /* Light Theme Colors */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
    
    /* Primary color alias */
    --primary-color: var(--primary-500);
    
    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Semantic Colors */
    --success-50: #ecfdf5;
    --success-500: #10b981;
    --success-600: #059669;
    
    --warning-50: #fffbeb;
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    
    --error-50: #fef2f2;
    --error-500: #ef4444;
    --error-600: #dc2626;
    
    /* Light Theme Variables */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-tertiary: #9ca3af;
    --border-color: #e5e7eb;
    --border-hover: #d1d5db;
    --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);
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-tertiary: #9ca3af;
    --border-color: #374151;
    --border-hover: #4b5563;
    
    /* Primary color alias */
    --primary-color: var(--primary-500);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

.loading-screen p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
}

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-800) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.login-container {
    background-color: var(--bg-primary);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 400px;
    margin: 1rem;
    transition: all 0.3s ease;
}

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

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.logo h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.1;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    margin: 0.5rem 0 0 0;
    opacity: 0.8;
}

/* Form Styles */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-group input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: all 0.2s ease;
    box-sizing: border-box;
    height: 48px;
    line-height: 24px;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-50);
}

/* Password Input Group */
.password-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-group input {
    padding-right: 45px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: var(--text-primary);
    background-color: var(--bg-tertiary);
}

.password-toggle:focus {
    outline: none;
    color: var(--primary-500);
    background-color: var(--primary-50);
}

.form-icon {
    position: absolute;
    left: 12px;
    top: calc(22.4px + 0.5rem + 24px); /* Label height (22.4px) + margin (8px) + half input height (24px) = input center */
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 0.875rem;
    pointer-events: none;
    z-index: 1;
    height: 16px;
    width: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: calc(22.4px + 0.5rem + 24px); /* Label height (22.4px) + margin (8px) + half input height (24px) = input center */
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 0.25rem;
    transition: color 0.2s ease;
    z-index: 2;
    height: 24px;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: var(--text-secondary);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    font-size: 0.875rem;
    color: var(--text-secondary);
    cursor: pointer;
    flex-wrap: nowrap !important;
    position: relative;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    pointer-events: auto;
    z-index: 1;
}

.checkbox-label .checkmark {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-radius: 3px;
    position: relative;
    display: inline-block;
    background-color: var(--bg-primary);
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-500);
    border-color: var(--primary-500);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓' !important;
    position: absolute;
    top: -2px;
    left: 2px;
    color: white;
    font-size: 12px;
    font-weight: bold;
    line-height: 1;
}

/* Login form specific checkbox styles to override later rules */
.form-options .checkbox-label {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    flex-wrap: nowrap !important;
    position: relative !important;
}

.form-options .checkbox-label input[type="checkbox"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    cursor: pointer;
    pointer-events: auto;
    z-index: 1;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
}

.form-options .checkbox-label .checkmark {
    flex-shrink: 0 !important;
    width: 16px !important;
    height: 16px !important;
    border: 2px solid var(--border-color) !important;
    border-radius: 3px !important;
    position: relative !important;
    display: inline-block !important;
    background-color: var(--bg-primary) !important;
    transition: all 0.2s ease;
}

.form-options .checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-500) !important;
    border-color: var(--primary-500) !important;
}

.form-options .checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓' !important;
    position: absolute !important;
    top: -2px !important;
    left: 2px !important;
    color: white !important;
    font-size: 12px !important;
    font-weight: bold !important;
    line-height: 1 !important;
}

.checkbox-label > span:not(.checkmark),
.checkbox-label > text {
    white-space: nowrap;
}

.forgot-password {
    color: var(--primary-600);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: var(--primary-700);
    text-decoration: underline;
}

.login-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    color: var(--text-tertiary);
    font-size: 0.75rem;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
}

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

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

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-700);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

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

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

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

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

.btn-danger {
    background-color: var(--error-500);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background-color: var(--error-600);
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 1rem 1.5rem;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
}

/* Main Application Layout */
.main-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: var(--bg-primary);
}

/* Header */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    z-index: 100;
    position: sticky;
    top: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.sidebar-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.sidebar-toggle:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sidebar .logo-icon {
    width: auto;
    height: 32px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    font-weight: 700;
}

.sidebar .logo-icon img {
    height: 32px;
    width: auto;
    border-radius: 0.5rem;
    object-fit: contain;
    display: block;
}

.logo-text {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.header-center {
    flex: 1;
    max-width: 500px;
    margin: 0 2rem;
}

.search-container {
    position: relative;
    width: 100%;
}

.search-container input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-50);
    background-color: var(--bg-primary);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notifications {
    position: relative;
}

.notification-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    position: relative;
}

.notification-btn:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.notification-badge {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background-color: var(--error-500);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    min-width: 1.25rem;
    text-align: center;
}

.user-menu {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.user-btn:hover {
    background-color: var(--bg-tertiary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background-color: var(--primary-500);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
}

.user-name {
    font-weight: 500;
    font-size: 0.875rem;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.5rem);
    transition: all 0.2s ease;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
}

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

.dropdown-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 0.25rem 0;
}

/* Company Logo */
.sidebar-logo {
    padding: 15px 10px 15px 10px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 25px;
}

.company-logo {
    max-width: 100%;
    max-height: 25px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
    transition: opacity 0.3s ease;
    margin-bottom: 15px;
}

.company-logo:hover {
    opacity: 0.8;
}

/* CMS Branding */
.cms-branding {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0;
}

.animated-hand {
    font-size: 20px;
    animation: gentle-wave 2.5s ease-in-out infinite;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: inline-block;
    transform-origin: 70% 70%;
}

.animated-hand:hover {
    transform: scale(1.1);
    animation-duration: 1s;
}

.cms-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 4px 0;
    letter-spacing: 0.5px;
}

.cms-subtitle {
    font-size: 9px;
    font-weight: 400;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: 0.8;
    margin-bottom: 0px;
}

/* Hand Animation Keyframes */
@keyframes gentle-wave {
    0%, 100% {
        transform: rotate(0deg);
    }
    10%, 30% {
        transform: rotate(14deg);
    }
    20% {
        transform: rotate(-8deg);
    }
    40%, 60% {
        transform: rotate(14deg);
    }
    50% {
        transform: rotate(-8deg);
    }
    70% {
        transform: rotate(0deg);
    }
}

/* Dark theme logo adjustments removed - no company logo */

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

[data-theme="dark"] .cms-subtitle {
    color: var(--text-secondary);
}

/* Responsive logo */
@media (max-width: 768px) {
    .sidebar-logo {
        padding: 15px 10px 15px 10px;
    }
    
    /* Company logo removed */
    
    .animated-hand {
        font-size: 20px;
    }
    
    .cms-title {
        font-size: 14px;
    }
    
    .cms-subtitle {
        font-size: 10px;
    }
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 200;
    transform: translateX(0);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar.show {
    transform: translateX(0);
}

.sidebar-nav {
    padding: 1rem 0;
    flex: 1;
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    padding: 0 1rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.nav-link:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-link.active {
    background-color: var(--primary-50);
    color: var(--primary-700);
    border-right: 3px solid var(--primary-500);
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.nav-badge {
    background-color: var(--primary-500);
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    margin-left: auto;
}

.nav-badge.coming-soon {
    background-color: #6c757d;
    color: white;
}

/* Hide counter badges for Stores and Deployments */
#stores-count,
#deployments-count {
    display: none !important;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem;
    margin-left: 250px;
    overflow-y: auto;
    transition: margin-left 0.3s ease;
}

/* Page Styles */
.page {
    display: none;
}

.page.active {
    display: block;
}

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

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

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    background-color: var(--primary-50);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-600);
    font-size: 1.25rem;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

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

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

.stat-change.neutral {
    color: var(--text-tertiary);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

.dashboard-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.5rem 0;
    margin-bottom: 1rem;
}

.card-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-content {
    padding: 0 1.5rem 1.5rem;
}

/* Activity List */
.activity-list {
    space-y: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

.activity-icon {
    width: 32px;
    height: 32px;
    background-color: var(--primary-50);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-600);
    font-size: 0.875rem;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Page Actions */
.page-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Filters Bar */
.filters-bar {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.filter-select, .search-input {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.search-input {
    min-width: 200px;
    padding-right: 2.5rem;
}

.search-input + .search-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
}

/* Data Tables */
.table-container {
    background: var(--bg-primary);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

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

.data-table th {
    background: var(--bg-secondary);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.data-table tr:hover {
    background: var(--bg-tertiary);
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.status-online {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.status-offline {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.status-maintenance {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.pagination-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.content-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.2s ease;
}

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

/* Client Info */
.client-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.client-name {
    font-weight: 500;
    color: var(--text-primary);
}

.client-id {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.unique-id {
    background: var(--bg-tertiary);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
}

/* Settings Sections */
.settings-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.settings-section {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.settings-section h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* Analytics Grid */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
}

.analytics-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.analytics-card h3 {
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* ==========================================
   LOG VIEWER STYLES
   ========================================== */

.log-viewer-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
}

/* Log Statistics Card */
.log-stats-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5e9;
    margin-bottom: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.stat-item {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 24px 20px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .stat-item {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    box-shadow: var(--shadow-lg);
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #007bff;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #007bff, #0056b3);
    border-radius: 12px 12px 0 0;
}

.stat-value {
    font-size: 4rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
    letter-spacing: -2px;
    text-align: center;
    display: block;
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 8px;
    border: 2px solid var(--border-color);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .stat-value {
    color: var(--text-primary);
    background: var(--bg-secondary);
    border-color: var(--border-color);
    text-shadow: 0 3px 6px rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.05);
}

.stat-label {
    font-size: 1.2rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-align: center;
    background: var(--bg-secondary);
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .stat-label {
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border-color: var(--border-color);
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
}

/* Specific stat item styling */
.stat-item:nth-child(1)::before {
    background: linear-gradient(90deg, #28a745, #20c997);
}

.stat-item:nth-child(2)::before {
    background: linear-gradient(90deg, #dc3545, #fd7e14);
}

.stat-item:nth-child(3)::before {
    background: linear-gradient(90deg, #17a2b8, #6f42c1);
}

.stat-item:nth-child(4)::before {
    background: linear-gradient(90deg, #ffc107, #e83e8c);
}

/* Log Filters */
.log-filters {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5e9;
    margin-bottom: 24px;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-weight: 600;
    color: #495057;
    font-size: 0.875rem;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: #495057;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
}

/* Log Entries Container */
.log-entries-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5e9;
    overflow: hidden;
}

.log-entries-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 2px solid #dee2e6;
}

.log-entries-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 600;
}

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

.log-entries-list {
    max-height: 700px;
    overflow-y: auto;
    background: #fafbfc;
}

/* Log Entry */
.log-entry {
    padding: 20px 24px;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.2s ease;
    background: white;
    margin: 8px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.log-entry:hover {
    background: #f8f9fa;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.log-entry:last-child {
    border-bottom: none;
}

.log-entry-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.log-level-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.log-level-error {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    border: none;
}

.log-level-warn {
    background: linear-gradient(135deg, #ffc107, #e0a800);
    color: #212529;
    border: none;
}

.log-level-info {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
    border: none;
}

.log-level-debug {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    border: none;
}

.log-category-badge {
    padding: 6px 12px;
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    color: #495057;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.log-timestamp {
    color: #6c757d;
    font-size: 0.9rem;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-weight: 500;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
}

.log-message {
    color: #2c3e50;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 12px;
    font-weight: 500;
    padding: 8px 0;
}

.log-meta {
    color: #6c757d;
    font-size: 0.8rem;
    margin: 4px 0;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-right: 8px;
}

/* No Logs State */
.no-logs {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.no-logs i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

/* Pagination */
.log-pagination {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.pagination {
    display: flex;
    gap: 5px;
    align-items: center;
}

.pagination button {
    min-width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination button.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination-info {
    color: #6c757d;
    font-size: 0.875rem;
}

/* Login 2FA Step Styles */
.hidden {
    display: none !important;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: 20px;
}

.form-actions .btn {
    flex: 1;
}

.form-help {
    margin-top: 8px;
    margin-bottom: 16px;
}

.form-help p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
    text-align: center;
}

/* 2FA QR Code Styles */
.qr-code-container {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.qr-code-container canvas {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.test-success {
    background: var(--bg-primary);
    border: 2px solid var(--success-500);
    border-radius: 12px;
    padding: 24px;
    margin: 16px 0;
}

.test-success h4 {
    color: var(--success-600);
    margin-bottom: 16px;
    font-size: 1.2rem;
}

.test-success code {
    background: var(--bg-tertiary);
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.test-success p {
    margin: 12px 0;
    color: var(--text-secondary);
}

.instructions {
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 4px solid var(--success-500);
}

.instructions h5 {
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 1rem;
}

.instructions ol {
    margin: 0;
    padding-left: 20px;
}

.instructions li {
    margin: 8px 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

.test-error {
    background: var(--bg-primary);
    border: 2px solid var(--error-500);
    border-radius: 12px;
    padding: 24px;
    margin: 16px 0;
    color: var(--error-600);
    text-align: center;
}

.test-error i {
    margin-right: 8px;
}

/* Log Management Card */
.log-management-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e5e9;
    margin-bottom: 20px;
}

.log-management-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.log-management-header h3 {
    margin: 0 0 5px 0;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.log-management-header p {
    margin: 0;
    color: #6c757d;
    font-size: 0.875rem;
}

.log-management-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Disk Usage Info */
.disk-usage-info {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px;
    border: 1px solid #e9ecef;
}

.disk-usage-loading {
    text-align: center;
    color: #6c757d;
    padding: 20px;
}

.disk-usage-loading i {
    margin-right: 8px;
}

.disk-usage-error {
    text-align: center;
    color: #dc3545;
    padding: 20px;
}

.disk-usage-error i {
    margin-right: 8px;
}

.disk-usage-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: white;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.total-size {
    display: flex;
    align-items: center;
    gap: 8px;
}

.total-size i {
    color: #007bff;
}

.size-label {
    font-weight: 600;
    color: #495057;
}

.size-value {
    font-weight: bold;
    color: #007bff;
    font-size: 1.1rem;
}

.file-count {
    display: flex;
    gap: 5px;
}

.count-label {
    color: #6c757d;
}

.count-value {
    font-weight: 600;
    color: #495057;
}

/* Files List */
.files-list {
    background: white;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    overflow: hidden;
}

.files-header {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 15px;
    padding: 10px 15px;
    background: #e9ecef;
    font-weight: 600;
    font-size: 0.875rem;
    color: #495057;
}

.file-info {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 15px;
    padding: 10px 15px;
    border-bottom: 1px solid #f1f3f4;
    align-items: center;
}

.file-info:last-child {
    border-bottom: none;
}

.file-info.file-missing {
    opacity: 0.6;
}

.file-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.file-name i {
    color: #6c757d;
}

.file-size {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #495057;
    font-weight: 500;
}

.file-modified {
    font-size: 0.875rem;
    color: #6c757d;
    font-family: 'Courier New', monospace;
}

/* Log Management Actions */
.log-management-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.action-group h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 1rem;
    font-weight: 600;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-buttons .btn {
    justify-content: flex-start;
    text-align: left;
}

.cleanup-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cleanup-options .form-group {
    margin: 0;
}

.cleanup-options .form-group label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
    display: block;
}

.cleanup-options .form-control {
    width: 100%;
}

/* Responsive Log Viewer */
@media (max-width: 768px) {
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .filter-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .log-entries-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .log-entry-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .log-pagination {
        flex-direction: column;
        text-align: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .log-management-actions {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .disk-usage-summary {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .files-header {
        grid-template-columns: 1fr;
        gap: 5px;
    }
    
    .file-info {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .log-viewer-container {
        padding: 10px;
    }
}

/* Coming Soon Page Styles */
.coming-soon-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 2rem;
}

.coming-soon-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.coming-soon-icon {
    font-size: 4rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.coming-soon-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
}

.coming-soon-description {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.coming-soon-features {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: left;
}

.coming-soon-features h3 {
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

.coming-soon-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.coming-soon-features li {
    padding: 0.5rem 0;
    color: #666;
    display: flex;
    align-items: center;
}

.coming-soon-features li i {
    color: #28a745;
    margin-right: 0.75rem;
    width: 16px;
}

.coming-soon-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.coming-soon-actions .btn {
    min-width: 140px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .header-center {
        margin: 0 1rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        justify-content: space-between;
    }
    
    .data-table {
        font-size: 0.875rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .header-center {
        display: none;
    }
}

@media (max-width: 640px) {
    .login-container {
        margin: 0.5rem;
        padding: 2rem;
    }
    
    .app-header {
        padding: 1rem;
    }
    
    .user-name {
        display: none;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.btn:focus-visible,
.nav-link:focus-visible,
input:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-secondary: #000000;
    }
    
    [data-theme="dark"] {
        --border-color: #ffffff;
        --text-secondary: #ffffff;
    }
}

/* Enhanced Client Management Styles */
.player-status {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.player-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.player-indicator.enabled {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.player-indicator.disabled {
    background: var(--bg-secondary);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.player-indicator i {
    font-size: 0.75rem;
}

.client-actions {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.client-actions .btn {
    padding: 6px 8px;
    font-size: 0.875rem;
}

/* QR Code Styles */
.qr-code-container {
    text-align: center;
    padding: 20px;
}

.qr-code-header {
    margin-bottom: 20px;
}

.qr-code-header h3 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.qr-code-header p {
    margin: 0;
    color: var(--text-secondary);
}

.qr-code-image {
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qr-code-image img {
    max-width: 100%;
    height: auto;
}

.qr-code-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

/* Preview Styles */
.preview-container {
    padding: 20px;
}

.preview-header {
    margin-bottom: 20px;
}

.preview-header h3 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.preview-header p {
    margin: 0;
    color: var(--text-secondary);
}

.preview-frame {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
}

.preview-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}

/* Player Configuration Styles */
.player-config {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.player-config-item {
    flex: 1;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
}

.checkmark {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-radius: 3px;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 2px;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Info Box */
.info-box {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 6px;
    margin-top: 16px;
    font-size: 0.875rem;
    color: #1e40af;
}

.info-box .icon-info {
    color: #3b82f6;
    font-size: 1rem;
}

/* Site Creation Details */
.site-creation-details {
    padding: 20px;
}

.site-creation-details h3 {
    margin: 0 0 20px 0;
    color: var(--text-primary);
    text-align: center;
}

.players-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.player-info {
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.player-info h4 {
    margin: 0 0 12px 0;
    color: var(--primary);
    font-size: 1.1rem;
}

.player-info p {
    margin: 8px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.player-info code {
    background: var(--bg-primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.player-info a {
    color: var(--primary);
    text-decoration: none;
}

.player-info a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .players-info {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Site and Player Display Styles */
.site-players {
    margin-top: 4px;
}

.site-players small {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.player-indicators {
    display: flex;
    gap: 8px;
    align-items: center;
}

.player-indicator {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
}

.player-indicator.online {
    background: var(--success);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3);
}

.player-indicator.offline {
    background: var(--danger);
    opacity: 0.7;
}

.player-indicator.maintenance {
    background: var(--warning);
}

.player-indicator.disabled {
    background: var(--text-muted);
    opacity: 0.4;
    border: 2px dashed var(--border-color);
    color: var(--text-muted);
    font-weight: normal;
}

.site-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* Sites Layout */
.clients-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 32px;
    height: calc(100vh - 160px);
    min-height: 700px;
}

.clients-sidebar {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    overflow-y: auto;
}

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

.sites-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.2rem;
}

.client-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.client-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.client-item:hover {
    border-color: var(--primary);
    background: var(--bg-primary);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.client-item.active {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.client-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.client-name {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.client-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.client-status {
    font-size: 1.2rem;
    color: var(--success);
}

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

.player-delete-dropdown {
    position: relative;
}

.delete-client-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.delete-client-btn:hover {
    background: var(--danger-light);
    color: var(--danger);
}

.player-delete-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 150px;
}

.player-delete-option {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: background 0.2s;
}

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

.player-delete-option.delete-all {
    color: var(--danger);
    border-top: 1px solid var(--border-color);
}

.client-details {
    margin-top: 8px;
}

.client-description {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.client-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.deployment-path {
    font-family: 'Courier New', monospace;
    background: var(--bg-primary);
    padding: 2px 4px;
    border-radius: 3px;
}

/* Site Details Panel */
.client-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    overflow-y: auto;
}

.no-selection {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--text-muted);
}

.no-selection-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-selection h3 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
}

.site-content {
    height: 100%;
}

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

.content-header h2 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.client-status {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.client-status h3 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.3em;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.status-item {
    text-align: center;
    padding: 15px;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.status-item .value {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 5px;
}

.status-item .label {
    color: var(--text-muted);
    font-size: 0.9em;
}

/* Player Tabs */
.player-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.player-tab {
    background: none;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

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

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

/* Player Content */
.player-content {
    display: none;
}

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

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.player-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.2rem;
}

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

/* Frames Grid */
.frames-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.frame-item {
    /* Solid, theme-aware border to avoid light-looking dashed edge in dark mode */
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    min-height: 150px;
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    transition: all 0.3s ease;
}

.frame-item.assigned {
    border: 2px solid var(--success-color);
    /* Use theme-aware background so it looks correct in dark mode */
    background: var(--bg-secondary);
}

.frame-item.assigned .frame-header h4 {
    color: var(--success-color);
}

.frame-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.frame-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1rem;
}

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

.frame-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    color: var(--text-muted);
    font-style: italic;
    background: var(--bg-primary);
    border: 1px dashed var(--border-color);
    border-radius: 6px;
}

.frame-assigned {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    background: var(--bg-primary);
    border: 1px solid var(--success-color);
    border-radius: 6px;
    color: var(--success-color);
    font-weight: 500;
}

.frame-assigned i {
    margin-right: 8px;
    font-size: 1.2em;
}

/* Preview Styles */
.preview-container {
    padding: 20px;
}

.preview-frames-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin: 20px 0;
}

.preview-frame {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    text-align: center;
    background: var(--bg-secondary);
}

.preview-frame h4 {
    margin: 0 0 12px 0;
    color: var(--text-primary);
}

.preview-content {
    padding: 12px;
    border-radius: 6px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-content.assigned {
    background: rgba(40, 167, 69, 0.1);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

.preview-content.empty {
    background: var(--bg-primary);
    border: 1px dashed var(--border-color);
    color: var(--text-muted);
    font-style: italic;
}

.preview-content i {
    margin-right: 8px;
}

.preview-info {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    margin-top: 20px;
}

.preview-info p {
    margin: 8px 0;
    color: var(--text-primary);
}

/* Deployment Config Styles */
.deployment-config {
    padding: 20px;
}

.config-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.config-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.config-section h4 {
    margin: 0 0 16px 0;
    color: var(--text-primary);
    font-size: 1.1em;
}

/* Playlist Preview Styles */
.playlist-preview {
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.playlist-preview h4 {
    margin: 0 0 12px 0;
    color: var(--text-primary);
    font-size: 1em;
}

.preview-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.preview-image-item {
    text-align: center;
}

.preview-image-item img {
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.image-info {
    margin-top: 4px;
}

.image-info small {
    color: var(--text-muted);
    font-size: 0.75em;
    word-break: break-word;
}

/* Deployment Info Styles */
.deployment-info {
    margin-top: 20px;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.deployment-info h4 {
    margin: 0 0 12px 0;
    color: var(--text-primary);
    font-size: 1em;
}

.deployment-info p {
    margin: 8px 0;
    color: var(--text-primary);
}

.deployment-info .text-info {
    color: var(--info-color);
    font-style: italic;
}

/* QR and Queue Configuration Styles */
.config-section {
    margin-top: 24px;
    padding: 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

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

.config-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1em;
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.config-content {
    margin-top: 16px;
}

.qr-code-display {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.qr-code-image {
    width: 120px;
    height: 120px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    object-fit: contain;
}

.qr-code-info p {
    margin: 8px 0;
    color: var(--text-primary);
}

.no-qr-code, .no-queue-config {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.no-qr-code i, .no-queue-config i {
    font-size: 3em;
    margin-bottom: 16px;
    opacity: 0.5;
}

.queue-config-display {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
}

.config-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.config-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.color-preview {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    margin-right: 8px;
    vertical-align: middle;
}

.display-options {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}

.display-options li {
    padding: 4px 0;
    color: var(--text-primary);
}

.display-options li:before {
    content: "✓";
    color: var(--success-color);
    font-weight: bold;
    margin-right: 8px;
}

/* Player Configuration */
.player-config {
    margin: 20px 0;
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.config-row {
    display: flex;
    gap: 30px;
    align-items: center;
}

.config-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.config-item label {
    font-weight: 500;
    color: var(--text-primary);
    min-width: 100px;
}

.config-item select {
    min-width: 150px;
}

.config-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    align-items: center;
}

.config-actions .btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

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

.config-actions .btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.frames-section {
    margin-top: 20px;
}

.frames-section h3 {
    margin: 0 0 15px 0;
    color: var(--text-primary);
    font-size: 1.1em;
}

.frame-status {
    font-size: 0.8em;
    font-weight: bold;
    color: var(--text-tertiary);
    text-transform: uppercase;
}

.frame-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 15px;
}

.frame-empty {
    color: var(--text-tertiary);
    font-size: 0.9em;
}

/* Deployment Configuration */
.deployment-config-section {
    margin: 20px 0;
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.deployment-config-section h4 {
    margin: 0 0 15px 0;
    color: var(--text-primary);
    font-size: 1.1em;
}

.deployment-config-section .config-row {
    display: flex;
    gap: 15px;
    align-items: end;
    flex-wrap: wrap;
}

.deployment-config-section .form-group {
    flex: 1;
    margin-bottom: 0;
    min-width: 120px;
}

/* Store and Player Actions */
.store-actions, .player-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

.store-actions {
    margin-left: auto;
}

.player-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0; /* Prevent buttons from shrinking */
    margin-left: auto;
}

.player-id {
    font-size: 0.8em;
    color: var(--text-tertiary);
    font-family: monospace;
    white-space: nowrap;
    overflow: visible;
    flex-shrink: 0;
}

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

.player-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    overflow: hidden;
    min-width: 0; /* Prevents flex children from overflowing */
}

.player-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.player-info > * {
    flex-shrink: 0;
}

.player-item.deleted-player {
    opacity: 0.6;
    background-color: #f8f9fa;
    border-left: 3px solid #dc3545;
}

.player-item.deleted-player .player-status {
    color: #dc3545;
    font-weight: bold;
}

.frame-playlist-section {
    margin-bottom: 12px;
}

.assigned-playlist {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.playlist-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.frame-preview {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.frame-empty {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Playlist Selection Modal */
.playlist-selection {
    max-height: 400px;
    overflow-y: auto;
}

.playlist-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.playlist-item {
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.playlist-item:hover {
    border-color: var(--primary);
    background: var(--bg-secondary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
}

.playlist-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.playlist-name {
    font-size: 1.3rem;
    font-weight: 800;
    color: #e6f0ff; /* higher-contrast heading color for dark cards */
    letter-spacing: 0.01em;
    margin: 0;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}

.playlist-timestamp {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.playlist-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.playlist-image-count {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.playlist-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0 0 12px 0;
}

.playlist-preview-images {
    display: flex;
    gap: 6px;
}

.playlist-preview-image {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.playlist-preview-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 768px) {
    .clients-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .clients-sidebar {
        height: 300px;
    }
    
    .frames-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Image Library Styles */
.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.image-item {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

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

.image-preview {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.image-item:hover .image-preview img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.image-item:hover .image-overlay {
    opacity: 1;
}

.image-info {
    padding: 1rem;
}

.image-name {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.image-size, .image-dimensions, .image-category {
    background: var(--bg-secondary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.image-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.tag {
    background: var(--primary-color);
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
}

.no-tags {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-style: italic;
}

/* Image Details Modal */
.image-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 800px;
}

.image-preview-large {
    text-align: center;
}

.image-preview-large img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.image-info-large h3 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
}

.image-meta-large {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.meta-item strong {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.meta-item span {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Upload Progress */
.upload-progress {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.progress-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Form Help Text */
.form-help {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* Image Selector Styles */
.image-selector-modal {
    max-width: 800px;
    max-height: 600px;
    overflow-y: auto;
}

.image-selector-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.image-selector-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.image-selector-item:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.image-selector-item.selected {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.3);
}

.image-selector-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-selector-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.image-selector-item.selected .image-selector-overlay {
    opacity: 1;
}

.image-selector-overlay i {
    color: white;
    font-size: 1.2rem;
}

.selected-images-preview {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.selected-images-preview h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.selected-images-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-height: 150px;
    overflow-y: auto;
}

.selected-image-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-secondary);
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.selected-image-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.selected-image-name {
    font-size: 0.8rem;
    color: var(--text-primary);
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.no-selected-images {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

/* Playlist Images Styles */
.playlist-image-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.playlist-image-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

.playlist-image-item .image-name {
    font-size: 0.8rem;
    color: var(--text-primary);
    text-align: center;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-image-item .image-id {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.image-placeholder {
    width: 80px;
    height: 80px;
    background: var(--bg-secondary);
    border: 2px dashed var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.no-images {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

/* Content Queue Styles */
.queue-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.queue-item {
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

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

.queue-item.pending {
    border-left: 4px solid var(--warning-color);
}

.queue-item.playing {
    border-left: 4px solid var(--success-color);
}

.queue-item.completed {
    border-left: 4px solid var(--info-color);
}

.queue-item.failed {
    border-left: 4px solid var(--danger-color);
}

.queue-item-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.queue-priority {
    flex-shrink: 0;
}

.priority-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
}

.priority-1, .priority-2, .priority-3 {
    background: var(--danger-color);
}

.priority-4, .priority-5, .priority-6 {
    background: var(--warning-color);
}

.priority-7, .priority-8, .priority-9, .priority-10 {
    background: var(--info-color);
}

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

.queue-playlist {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 500;
}

.queue-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.queue-store, .queue-player {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.queue-status {
    flex-shrink: 0;
}

.queue-item-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
}

.queue-details {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.queue-duration, .queue-scheduled, .queue-created {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.queue-actions {
    display: flex;
    gap: 0.5rem;
}

/* Status Badge Styles */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-badge i {
    font-size: 0.7rem;
}

.status-pending {
    background: rgba(var(--warning-color-rgb), 0.1);
    color: var(--warning-color);
}

.status-playing {
    background: rgba(var(--success-color-rgb), 0.1);
    color: var(--success-color);
}

.status-completed {
    background: rgba(var(--info-color-rgb), 0.1);
    color: var(--info-color);
}

.status-failed {
    background: rgba(var(--danger-color-rgb), 0.1);
    color: var(--danger-color);
}

/* Preview System Styles */
.preview-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.preview-selector {
    text-align: center;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

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

.preview-options button {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.preview-options button i {
    font-size: 2rem;
    color: var(--primary-color);
}

.preview-selector-modal {
    max-width: 600px;
}

.preview-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.preview-option {
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

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

.preview-option i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.preview-option h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
}

.preview-option p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.preview-controls {
    display: flex;
    gap: 0.5rem;
}

.preview-info {
    background: var(--card-bg);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.preview-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.meta-item strong {
    color: var(--text-primary);
    font-size: 0.9rem;
}

.meta-item span {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.preview-display {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.preview-screen {
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.preview-image-container {
    position: relative;
    width: 100%;
    height: 400px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.2rem;
}

.preview-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.preview-progress {
    padding: 1rem;
    background: var(--bg-secondary);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.preview-details {
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 1rem;
}

.preview-details h4 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
}

.images-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
}

.image-list-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.image-list-item:hover {
    background: var(--bg-secondary);
}

.image-list-item.active {
    background: rgba(var(--primary-color-rgb), 0.1);
    border-color: var(--primary-color);
}

.image-list-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
}

.image-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.image-info .image-name {
    font-size: 0.8rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-info .image-dimensions {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.no-images {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 2rem;
}

/* QR Code and Queue Configuration Styles */
.config-section {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

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

.config-header h3 {
    margin: 0;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.config-actions {
    display: flex;
    gap: 10px;
}

.config-content {
    min-height: 100px;
}

.qr-code-display {
    display: flex;
    gap: 20px;
    align-items: center;
}

.qr-code-image {
    width: 150px;
    height: 150px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    object-fit: contain;
    background: white;
}

.qr-code-info {
    flex: 1;
}

.qr-code-info p {
    margin: 8px 0;
    color: var(--text-secondary);
}

.no-qr-code, .no-queue-config {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.no-qr-code i, .no-queue-config i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.queue-config-display {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 20px;
}

.config-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.config-item {
    padding: 10px;
    background: var(--bg-primary);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.config-item strong {
    color: var(--text-primary);
    display: block;
    margin-bottom: 5px;
}

.color-preview {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid var(--border-color);
    margin-right: 8px;
    vertical-align: middle;
}

.display-options {
    list-style: none;
    padding: 0;
    margin: 5px 0 0 0;
}

.display-options li {
    padding: 2px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.display-options li:before {
    content: "✓";
    color: var(--success-500);
    margin-right: 8px;
}

.deployment-config-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.qr-preview-container {
    text-align: center;
    padding: 20px;
}

.qr-preview-image {
    max-width: 300px;
    max-height: 300px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 20px;
}

.qr-preview-info {
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.qr-preview-info p {
    margin: 8px 0;
    color: var(--text-secondary);
}

.queue-preview-container {
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.queue-preview-display {
    position: relative;
    margin: 0 auto;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
}

.queue-preview-display h4 {
    margin: 0 0 15px 0;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.queue-preview-display p {
    margin: 8px 0;
    color: var(--text-secondary);
}

/* Deployments Page Styles */
.deployments-table-container {
    background: var(--bg-primary);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.deployment-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.deployment-id {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.deployment-description {
    color: var(--text-secondary);
    font-size: 13px;
}

.client-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.client-name {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.client-id {
    color: var(--text-secondary);
    font-size: 12px;
}

.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.type-immediate {
    background: var(--warning-100);
    color: var(--warning-700);
}

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

.type-rollback {
    background: var(--danger-100);
    color: var(--danger-700);
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 120px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--success-500);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 30px;
    text-align: right;
}

.deployment-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

.deployment-actions .btn {
    padding: 4px 8px;
    font-size: 12px;
}

.deployment-details {
    padding: 20px;
}

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

.deployment-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.deployment-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-item strong {
    color: var(--text-primary);
    font-size: 14px;
}

.meta-item span {
    color: var(--text-secondary);
    font-size: 13px;
}

.deployment-progress h4 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
    font-size: 16px;
}

.filters-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.search-input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    min-width: 200px;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 2px var(--primary-100);
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 2px var(--primary-100);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding: 15px;
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 14px;
}

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

/* Scheduling Page Styles */
.scheduled-deployments-container {
    background: var(--bg-primary);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

/* Bulk Delete Styles */
.scheduled-deployments-controls {
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.bulk-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: space-between;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.checkbox-label .checkmark {
    position: relative;
    display: inline-block;
    width: 18px;
    height: 18px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-500);
    border-color: var(--primary-500);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label input[type="checkbox"]:indeterminate + .checkmark {
    background: var(--primary-500);
    border-color: var(--primary-500);
}

.checkbox-label input[type="checkbox"]:indeterminate + .checkmark::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 7px;
    width: 8px;
    height: 2px;
    background: white;
}

#bulk-delete-btn {
    transition: all 0.2s ease;
}

#bulk-delete-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#bulk-delete-btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

/* Deployment Card Checkbox */
.scheduled-deployment-card {
    position: relative;
}

.deployment-checkbox {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 10;
}

.deployment-checkbox-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-500);
}

.deployment-header {
    padding-left: 40px; /* Make room for checkbox */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .bulk-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .deployment-checkbox {
        top: 12px;
        left: 12px;
    }
    
    .deployment-header {
        padding-left: 36px;
    }
}

.scheduled-time {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.scheduled-date {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.time-until {
    color: var(--text-secondary);
    font-size: 12px;
    font-style: italic;
}

.time-until:contains("Overdue") {
    color: var(--danger-500);
    font-weight: 500;
}

/* Preview Modal Styles */
.preview-modal {
    max-width: 90vw;
    max-height: 90vh;
    width: 1000px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.preview-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 18px;
}

.preview-content {
    padding: 20px;
}

.preview-screen {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    min-height: 400px;
}

.preview-frames {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    height: 100%;
}

.preview-frame {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.preview-frame.frame-assigned {
    border-color: var(--success-500);
    box-shadow: 0 0 0 2px var(--success-100);
}

.preview-frame.frame-empty {
    border-color: var(--border-color);
    background: var(--bg-secondary);
}

.frame-header {
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.frame-content {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.frame-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.frame-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
    font-size: 24px;
}

.frame-info {
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    font-size: 11px;
    color: var(--text-secondary);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-controls {
    display: flex;
    gap: 10px;
    justify-content: center;
    padding: 20px;
    background: var(--bg-secondary);
    border-radius: 6px;
}

.preview-controls .btn {
    min-width: 120px;
}

/* Analytics Page Styles */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stats-card {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stats-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--primary-500);
    background: var(--primary-100);
}

.stats-content h3 {
    margin: 0 0 5px 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.stats-content p {
    margin: 0 0 10px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.stats-breakdown {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stats-breakdown span {
    font-size: 12px;
    color: var(--text-secondary);
}

.stats-breakdown .online,
.stats-breakdown .completed,
.stats-breakdown .active {
    color: var(--success-500);
}

.stats-breakdown .offline,
.stats-breakdown .failed {
    color: var(--danger-500);
}

.stats-breakdown .maintenance {
    color: var(--warning-500);
}

.analytics-charts {
    margin-bottom: 30px;
}

.chart-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.chart-container {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.chart-container h3 {
    margin: 0 0 20px 0;
    color: var(--text-primary);
    font-size: 18px;
}

.chart-container canvas {
    max-height: 300px;
}

.analytics-tables {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.table-container h3 {
    margin: 0 0 20px 0;
    color: var(--text-primary);
    font-size: 18px;
}

.recent-activity {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-500);
    font-size: 16px;
}

.activity-content {
    flex: 1;
}

.activity-description {
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 4px;
}

.activity-time {
    color: var(--text-secondary);
    font-size: 12px;
}

.no-activity {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 40px 20px;
}

.export-options {
    text-align: center;
    padding: 20px;
}

.export-options h3 {
    margin: 0 0 15px 0;
    color: var(--text-primary);
}

.export-options p {
    margin: 0 0 25px 0;
    color: var(--text-secondary);
}

.export-formats {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.export-formats .btn {
    min-width: 120px;
}

/* Responsive Analytics */
@media (max-width: 768px) {
    .analytics-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-row {
        grid-template-columns: 1fr;
    }
    
    .export-formats {
        flex-direction: column;
        align-items: center;
    }
    
    .export-formats .btn {
        width: 100%;
        max-width: 200px;
    }
}

/* Responsive Preview */
@media (max-width: 768px) {
    .preview-display {
        grid-template-columns: 1fr;
    }
    
    .preview-options {
        grid-template-columns: 1fr;
    }
    
    .preview-options-grid {
        grid-template-columns: 1fr;
    }
    
    .preview-meta {
        grid-template-columns: 1fr;
    }
    
    .qr-code-display {
        flex-direction: column;
        text-align: center;
    }
    
    .config-summary {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .filters-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-input,
    .filter-select {
        min-width: 100%;
    }
    
    .deployment-meta {
        grid-template-columns: 1fr;
    }
    
    .deployment-actions {
        flex-wrap: wrap;
    }
}

/* Store and Player Sublist Styles */
.store-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.store-item:hover {
    border-color: var(--primary-300);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
}

.store-item.active {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 2px var(--primary-100);
}

.store-header {
    padding: 24px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

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

.store-name {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.store-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.store-details {
    padding: 20px 24px;
    background: var(--bg-secondary);
}

.store-description {
    margin: 0 0 8px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.store-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
}

.status-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 10px;
}

.status-active {
    background: var(--success-50);
    color: var(--success-600);
}

.status-inactive {
    background: var(--gray-100);
    color: var(--gray-600);
}

.players-sublist {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

.player-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

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

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

.player-item.active {
    background: var(--primary-50);
    border-left: 3px solid var(--primary-500);
}

.player-item.no-player {
    opacity: 0.6;
    cursor: not-allowed;
}

.player-item.no-player:hover {
    background: transparent;
}

.player-type {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 14px;
}

.player-status {
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
}

.player-status.status-active {
    background: var(--success-50);
    color: var(--success-600);
}

.player-status.status-disabled {
    background: var(--gray-100);
    color: var(--gray-500);
}

.player-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.player-actions i {
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.player-actions i:hover {
    color: var(--primary-500);
    background: var(--primary-50);
}

.store-delete-dropdown {
    position: relative;
}

.delete-store-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.delete-store-btn:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.store-delete-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: var(--shadow-lg);
    z-index: 10;
    min-width: 160px;
}

.store-delete-option {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    transition: background 0.2s ease;
}

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

.store-delete-option.delete-all {
    color: var(--error-500);
    border-top: 1px solid var(--border-color);
}

.store-delete-option.delete-all:hover {
    background: var(--error-50);
}

/* No Player Selected State */
.no-player-selected {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--text-secondary);
}

.no-player-selected .no-selection-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 32px;
}

.no-player-selected h3 {
    margin: 0 0 8px 0;
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 600;
}

.no-player-selected p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* Drag and Drop Upload Styles */
.drag-drop-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
    cursor: pointer;
}

.drag-drop-area:hover {
    border-color: var(--primary-400);
    background: var(--primary-50);
}

.drag-drop-area.drag-over {
    border-color: var(--primary-500);
    background: var(--primary-100);
    transform: scale(1.02);
}

.drag-drop-content {
    padding: 1rem 0;
}

.drag-drop-icon {
    font-size: 3rem;
    color: var(--primary-400);
    margin-bottom: 1rem;
    display: block;
}

.drag-drop-area h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-weight: 600;
}

.drag-drop-area p {
    margin: 0 0 1rem 0;
    color: var(--text-secondary);
}

.drag-drop-preview {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: left;
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
}

.file-item.valid {
    border-color: var(--success-300);
    background: var(--success-50);
}

.file-item.invalid {
    border-color: var(--warning-300);
    background: var(--warning-50);
}

.file-item i {
    font-size: 1.5rem;
    color: var(--primary-500);
}

.file-info {
    flex: 1;
}

.file-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.file-size {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.file-status i {
    font-size: 1.25rem;
}

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

.text-warning {
    color: var(--warning-600);
}

/* ==========================================
   SESSIONS AND LOGIN HISTORY STYLES
   ========================================== */

.sessions-management,
.login-history {
    max-width: 100%;
}

.sessions-list,
.history-list {
    max-height: 60vh;
    overflow-y: auto;
    padding: 1rem 0;
}

.session-item,
.history-item {
    background: var(--surface-50);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

.session-item:hover,
.history-item:hover {
    border-color: var(--primary-300);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.session-item.active {
    border-left: 4px solid var(--success-500);
}

.session-item.inactive {
    border-left: 4px solid var(--neutral-400);
    opacity: 0.7;
}

.history-item.success {
    border-left: 4px solid var(--success-500);
}

.history-item.failed {
    border-left: 4px solid var(--error-500);
}

.session-header,
.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.session-id {
    font-weight: 600;
    color: var(--text-primary);
}

.session-status,
.history-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

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

.session-status.inactive {
    background: var(--neutral-100);
    color: var(--neutral-600);
}

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

.history-status.failed {
    background: var(--error-100);
    color: var(--error-700);
}

.session-details,
.history-details {
    display: grid;
    gap: 0.75rem;
}

.session-detail,
.history-detail {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.session-detail i,
.history-detail i {
    width: 16px;
    color: var(--primary-500);
}

.session-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: flex-end;
}

.history-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 1rem;
}

.history-item.success .history-icon {
    background: var(--success-100);
    color: var(--success-600);
}

.history-item.failed .history-icon {
    background: var(--error-100);
    color: var(--error-600);
}

.history-info {
    flex: 1;
}

.no-sessions,
.no-history {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.no-sessions i,
.no-history i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Password Change Reminder Popup */
.password-reminder-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.password-reminder-content {
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 500px;
    width: 90%;
    margin: 1rem;
    animation: slideIn 0.3s ease-out;
}

.password-reminder-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.password-reminder-header i {
    font-size: 1.5rem;
    color: var(--warning-500);
}

.password-reminder-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.password-reminder-body {
    padding: 1rem 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.password-reminder-body p {
    margin: 0 0 0.5rem 0;
}

.password-reminder-actions {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem 1.5rem;
    justify-content: flex-end;
}

.password-reminder-actions .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.password-reminder-actions .btn-primary {
    background: var(--primary-500);
    color: white;
}

.password-reminder-actions .btn-primary:hover {
    background: var(--primary-600);
    transform: translateY(-1px);
}

.password-reminder-actions .btn-secondary {
    background: var(--gray-100);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.password-reminder-actions .btn-secondary:hover {
    background: var(--gray-200);
    transform: translateY(-1px);
}

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

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Dark theme adjustments */
[data-theme="dark"] .session-item,
[data-theme="dark"] .history-item {
    background: var(--surface-800);
    border-color: var(--border-color-dark);
}

[data-theme="dark"] .session-item:hover,
[data-theme="dark"] .history-item:hover {
    border-color: var(--primary-600);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .session-detail,
[data-theme="dark"] .history-detail {
    color: var(--text-secondary-dark);
}

[data-theme="dark"] .no-sessions,
[data-theme="dark"] .no-history {
    color: var(--text-secondary-dark);
}

/* Role-based Navigation Hiding */
.admin-only {
    display: none !important;
}

.user-role-admin .admin-only {
    display: flex !important;
}

.user-role-manager .admin-only {
    display: none !important;
}

.user-role-user .admin-only {
    display: none !important;
}

/* ==========================================
   HELP SECTION STYLES
   ========================================== */

.help-content {
    max-width: 100%;
}

.help-section {
    margin-bottom: 2rem;
}

.help-section h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.help-section h3 i {
    color: var(--primary-600);
}

/* Quick Start Guide Cards */
.help-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.help-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.help-card:hover {
    border-color: var(--primary-300);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

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

.help-card-header i {
    font-size: 1.5rem;
    color: var(--primary-600);
    background: var(--primary-50);
    padding: 0.75rem;
    border-radius: 8px;
}

.help-card-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.help-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.help-steps ol {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--text-secondary);
}

.help-steps li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.help-steps strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Feature Guides Grid */
.help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.help-feature {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.help-feature:hover {
    border-color: var(--primary-300);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.help-feature-icon {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    background: var(--primary-50);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.help-feature-icon i {
    font-size: 1.25rem;
    color: var(--primary-600);
}

.help-feature-content h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
}

.help-feature-content p {
    margin: 0 0 1rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.help-feature-content ul {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.help-feature-content li {
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

/* FAQ Section */
.faq-container {
    margin-bottom: 2rem;
}

.faq-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--primary-300);
}

.faq-question {
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background: var(--bg-secondary);
}

.faq-question h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
}

.faq-question i {
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 1.5rem 1rem 1.5rem;
    max-height: 200px;
}

.faq-answer p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Keyboard Shortcuts */
.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.shortcut-item:hover {
    border-color: var(--primary-300);
    background: var(--primary-50);
}

.shortcut-item kbd {
    background: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.shortcut-item span {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Support Cards */
.support-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.support-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.support-card:hover {
    border-color: var(--primary-300);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.support-card i {
    font-size: 2.5rem;
    color: var(--primary-600);
    margin-bottom: 1rem;
}

.support-card h4 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.support-card p {
    margin: 0 0 1.5rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.support-card .btn {
    margin-top: 1rem;
}

/* Dark Theme Adjustments */
[data-theme="dark"] .help-card,
[data-theme="dark"] .help-feature,
[data-theme="dark"] .faq-item,
[data-theme="dark"] .shortcut-item,
[data-theme="dark"] .support-card {
    background: var(--surface-800);
    border-color: var(--border-color-dark);
}

[data-theme="dark"] .help-card:hover,
[data-theme="dark"] .help-feature:hover,
[data-theme="dark"] .faq-item:hover,
[data-theme="dark"] .shortcut-item:hover,
[data-theme="dark"] .support-card:hover {
    border-color: var(--primary-600);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .faq-question:hover {
    background: var(--surface-700);
}

[data-theme="dark"] .shortcut-item kbd {
    background: var(--surface-700);
    border-color: var(--border-color-dark);
    color: var(--text-primary-dark);
}

/* Responsive Design */
@media (max-width: 768px) {
    .help-cards,
    .help-grid,
    .shortcuts-grid,
    .support-cards {
        grid-template-columns: 1fr;
    }
    
    .help-feature {
        flex-direction: column;
        text-align: center;
    }
    
    .help-feature-icon {
        align-self: center;
    }
}

/* Playlist View Styles */
.playlist-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.playlist-view-title h1 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 2rem;
    font-weight: 700;
}

.playlist-view-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.playlist-view-actions {
    display: flex;
    gap: 0.75rem;
}

.playlist-description-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.playlist-description-section p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
}

.playlist-images-section {
    background: var(--bg-primary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.playlist-images-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.playlist-images-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

.playlist-images-actions {
    display: flex;
    gap: 0.75rem;
}

.playlist-images-list {
    padding: 1.5rem;
}

.playlist-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.playlist-image-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    cursor: grab;
}

.playlist-image-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.playlist-image-item.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.playlist-image-item .image-card {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.playlist-image-item .card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-secondary);
}

.playlist-image-item .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.playlist-image-item .card-info {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.playlist-image-item .card-filename {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    word-break: break-word;
}

.playlist-image-item .card-metadata {
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.playlist-image-item .card-actions {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.playlist-image-item .drag-handle {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 6px;
    border-radius: 4px;
    cursor: grab;
    z-index: 10;
    font-size: 0.875rem;
}

.playlist-image-item .drag-handle:hover {
    background: rgba(0, 0, 0, 0.9);
}

.no-images-message {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.no-images-message i {
    font-size: 3rem;
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.no-images-message h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.no-images-message p {
    margin: 0 0 1.5rem 0;
    font-size: 1.1rem;
}

/* Edit mode styles */
.playlist-images-list.edit-mode .playlist-image-item {
    cursor: grab;
}

.playlist-images-list.edit-mode .playlist-image-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .playlist-view-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .playlist-view-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .playlist-images-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    .playlist-images-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .playlist-images-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* =========================================
   STORES TABLE - NEW CLEAN LAYOUT
   ========================================= */

/* Stores Table Page Layout */
.stores-table-page {
    padding: 20px;
    background: var(--bg-secondary);
    min-height: 100vh;
}

.stores-table-container {
    background: var(--bg-primary);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.stores-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
}

.stores-table-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: var(--gray-900);
}

.stores-table-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.stores-table-filters .search-box {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.stores-table-filters .search-box input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
}

.stores-table-filters .search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.stores-table-filters select {
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
    background: white;
    cursor: pointer;
}

/* Stores Table */
.stores-table {
    width: 100%;
    border-collapse: collapse;
}

.stores-table thead {
    background: var(--gray-50);
    position: sticky;
    top: 0;
    z-index: 10;
}

.stores-table th {
    text-align: left;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    color: var(--gray-600);
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--gray-200);
}

.stores-table td {
    padding: 16px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 14px;
    color: var(--gray-800);
}

.stores-table tbody tr {
    transition: background-color 0.15s ease;
}

.stores-table tbody tr:hover {
    background: var(--gray-50);
    cursor: pointer;
}

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

/* Table Cells */
.store-name-cell {
    font-weight: 600;
    color: var(--primary-600);
}

.store-name-cell .store-unique-id {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 400;
    margin-top: 2px;
}

.location-cell {
    color: var(--gray-600);
}

.players-cell {
    font-weight: 500;
}

.players-cell .active-count {
    color: var(--success-600);
}

.players-cell .inactive-count {
    color: var(--gray-500);
}

/* Status Cell (Like the provided image) */
.status-cell {
    font-size: 12px;
    line-height: 1.8;
}

.status-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    font-size: 10px;
    width: 12px;
    text-align: center;
}

.status-dot.online { color: var(--success-600); }
.status-dot.offline { color: var(--gray-400); }
.status-dot.partial { color: var(--warning-600); }
.status-dot.error { color: var(--error-600); }

.status-icon {
    font-size: 12px;
    width: 14px;
    color: var(--gray-500);
}

.status-text {
    color: var(--gray-700);
    font-weight: 500;
}

.status-timestamp {
    color: var(--gray-500);
    font-size: 11px;
}

.status-ip {
    color: var(--gray-400);
    font-size: 11px;
}

.last-updated-cell {
    color: var(--gray-500);
    font-size: 13px;
}

/* Action Button */
.table-action-btn {
    padding: 6px 12px;
    background: var(--primary-600);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.table-action-btn:hover {
    background: var(--primary-700);
}

/* Store Detail Page (After Click) */
.store-detail-page {
    padding: 20px;
    background: var(--bg-secondary);
    min-height: 100vh;
}

.store-detail-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 24px;
}

.back-button {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid var(--gray-300);
    background: white;
    color: var(--gray-700);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.back-button:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.store-detail-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.store-info-bar {
    display: flex;
    gap: 24px;
    padding: 16px 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.store-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--gray-600);
}

.store-info-item i {
    color: var(--gray-400);
    font-size: 16px;
}

.store-info-item strong {
    color: var(--gray-900);
    font-weight: 600;
}

/* Player Tabs */
.player-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    background: white;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.player-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    transition: all 0.15s ease;
}

.player-tab:hover {
    background: var(--gray-50);
    color: var(--gray-900);
}

.player-tab.active {
    background: var(--primary-600);
    color: white;
}

/* Store Detail Sections */
.store-config-section {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: none;
    margin-bottom: 20px;
}

.store-config-section h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
}

.frame-detail-view {
    background: var(--bg-secondary);
    padding: 24px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: none;
}

.frame-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

.frame-pagination-button {
    padding: 8px 16px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    background: white;
    color: var(--gray-700);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.frame-pagination-button:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.frame-pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.frame-pagination-indicator {
    font-size: 14px;
    color: var(--gray-600);
    font-weight: 500;
}

/* =========================================
   NEW STORE DETAIL LAYOUT (Scala-like)
   ========================================= */

.store-detail-layout {
    display: flex;
    gap: 24px;
    height: calc(100vh - 200px);
}

/* LEFT SIDEBAR */
.store-detail-sidebar {
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.player-selection {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.player-selection-header {
    padding: 12px 16px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    font-size: 12px;
    color: var(--gray-600);
    font-weight: 600;
}

.player-selection-item {
    padding: 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background-color 0.15s ease;
    font-size: 14px;
    font-weight: 500;
}

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

.player-selection-item.active {
    background: var(--primary-50);
    color: var(--primary-600);
}

.player-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.player-indicator.online {
    background: var(--success-600);
}

.player-indicator.offline {
    background: var(--gray-400);
}

/* Player Detail Card (Left Sidebar) */
.player-detail-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.player-detail-header {
    padding: 16px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.player-detail-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
}

#player-detail-info {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}

.player-info {
    margin-bottom: 20px;
}

.player-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.player-id {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 12px;
}

.player-frames-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.player-frame-item {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 6px;
    padding: 12px;
    font-size: 13px;
}

.frame-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 4px;
}

.frame-status {
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.frame-status.assigned {
    color: var(--success-600);
}

.frame-content {
    color: var(--gray-700);
    font-weight: 500;
    margin-bottom: 2px;
}

.frame-content-empty {
    color: var(--gray-400);
    text-align: center;
    padding: 8px;
}

.frame-meta {
    font-size: 11px;
    color: var(--gray-500);
}

/* RIGHT MAIN CONTENT */
.store-detail-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

/* Store Status Section */
.store-status-section {
    background: var(--gray-800);
    color: white;
    padding: 24px;
    border-radius: 8px;
    text-align: center;
}

.status-timestamp {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.status-label {
    font-size: 13px;
    color: var(--gray-300);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Player Configuration Section */
.player-config-section {
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: none;
    overflow: hidden;
}

.config-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.config-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

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

.config-options {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.config-option {
    display: flex;
    align-items: center;
    gap: 16px;
}

.config-option label {
    min-width: 150px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
}

.config-option .form-control {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 14px;
}

/* Frames Section */
.frames-section {
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: none;
    padding: 24px;
}

.frames-section h3 {
    margin: 0 0 20px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.frames-container {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.frame-card {
    min-width: 200px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    flex-shrink: 0;
}

.frame-card.assigned {
    background: var(--bg-secondary);
    border-color: var(--success-color);
}

.frame-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.frame-card-header span:first-child {
    font-weight: 600;
    color: var(--text-primary);
}

.assigned-badge {
    font-size: 11px;
    color: var(--success-600);
    font-weight: 600;
    text-transform: uppercase;
}

.not-assigned-badge {
    font-size: 11px;
    color: var(--gray-400);
    text-transform: uppercase;
}

.frame-card-content {
    background: var(--bg-primary);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
}

.frame-playlist-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.frame-image-count {
    font-size: 12px;
    color: var(--text-secondary);
}

.frame-card-content-empty {
    background: var(--bg-primary);
    border-radius: 6px;
    padding: 12px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    margin-bottom: 12px;
}

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

.frame-actions .btn {
    flex: 1;
    font-size: 12px;
    padding: 6px 12px;
}
