/* 
 * LHK Media - Video Player Platform
 * Professional UI Stylesheet
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* Primary - Professional Blue-Slate */
    --primary: #4F46E5;
    --primary-dark: #4338CA;
    --primary-light: #EEF2FF;
    
    /* Accent */
    --accent: #0EA5E9;
    --accent-light: #E0F2FE;
    
    /* Semantic */
    --success: #059669;
    --success-light: #ECFDF5;
    --danger: #DC2626;
    --danger-light: #FEF2F2;
    --warning: #D97706;
    --warning-light: #FFFBEB;
    --info: #0284C7;
    --info-light: #E0F2FE;
    
    /* Neutrals */
    --gray-25: #FCFCFD;
    --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;
    
    /* Layout */
    --sidebar-width: 260px;
    --header-height: 64px;
    
    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
    --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.1), 0 1px 2px rgba(16, 24, 40, 0.06);
    --shadow-md: 0 4px 8px -2px rgba(16, 24, 40, 0.1), 0 2px 4px -2px rgba(16, 24, 40, 0.06);
    --shadow-lg: 0 12px 16px -4px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.03);
    --shadow-xl: 0 20px 24px -4px rgba(16, 24, 40, 0.08), 0 8px 8px -4px rgba(16, 24, 40, 0.03);
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Loading Screen */
.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    gap: 1rem;
    background: var(--gray-50);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Login */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338CA 100%);
    padding: 1.5rem;
}

.login-box {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 420px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: var(--gray-900);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.login-header p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="url"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--gray-900);
    background: white;
    transition: all 0.15s ease;
}

/* Date inputs - better styling */
input[type="date"] {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--gray-700);
    background: white;
    cursor: pointer;
    min-width: 140px;
}

input[type="date"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.15s;
}

input[type="date"]:hover::-webkit-calendar-picker-indicator {
    opacity: 1;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-400);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.form-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-right: 0.5rem;
    accent-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-secondary {
    background: white;
    color: var(--gray-700);
    border-color: var(--gray-300);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #047857;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #B91C1C;
}

.btn-ghost {
    background: transparent;
    color: var(--gray-600);
}

.btn-ghost:hover:not(:disabled) {
    background: var(--gray-100);
    color: var(--gray-900);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: transform 0.2s ease;
}

.sidebar-header {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid var(--gray-100);
}

.sidebar-header h2 {
    color: var(--gray-900);
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.sidebar-nav {
    flex: 1;
    padding: 0.75rem;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    color: var(--gray-600);
    text-decoration: none;
    border-radius: var(--radius);
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.nav-item:hover {
    background: var(--gray-50);
    color: var(--gray-900);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
}

.nav-item i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    color: var(--gray-400);
    transition: color 0.15s ease;
}

.nav-item:hover i {
    color: var(--gray-600);
}

.nav-item.active i {
    color: var(--primary);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Header */
.top-header {
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.greeting {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-600);
}

/* Page Content */
.page-content {
    flex: 1;
    padding: 1.5rem;
    max-width: 1400px;
    width: 100%;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.02em;
    flex-shrink: 0;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-900);
}

.card-body {
    padding: 1.25rem;
}

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.kpi-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: box-shadow 0.15s ease;
}

.kpi-card:hover {
    box-shadow: var(--shadow-sm);
}

.kpi-card .label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.kpi-card .value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
}

.kpi-card .change {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.5rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
}

.kpi-card .change.positive {
    color: var(--success);
    background: var(--success-light);
}

.kpi-card .change.negative {
    color: var(--danger);
    background: var(--danger-light);
}

/* Colored KPI variants */
.kpi-card.green { border-left: 3px solid var(--success); }
.kpi-card.yellow { border-left: 3px solid var(--warning); }
.kpi-card.cyan { border-left: 3px solid var(--info); }
.kpi-card.orange { border-left: 3px solid #EA580C; }
.kpi-card.pink { border-left: 3px solid #DB2777; }
.kpi-card.purple { border-left: 3px solid var(--primary); }

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
}

th {
    background: var(--gray-50);
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    border-bottom: 1px solid var(--gray-200);
}

td {
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
    font-size: 0.875rem;
}

tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: var(--gray-25);
}

/* Action Icons */
.action-icons {
    display: flex;
    gap: 0.5rem;
}

.action-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 1rem;
}

.action-icon:hover {
    background: var(--gray-100);
}

.action-icon.edit:hover {
    background: var(--primary-light);
}

.action-icon.delete:hover {
    background: var(--danger-light);
}

.action-icon.delete {
    color: var(--danger);
}

/* Filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.filter-group select,
.filter-group input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: white;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--primary);
}

.date-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Inline filters for page headers */
.filters-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.quick-filters {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.quick-filters button {
    padding: 0.5rem 0.875rem;
    border: 1px solid var(--gray-300);
    background: white;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-600);
    transition: all 0.15s ease;
}

.quick-filters button:hover {
    border-color: var(--gray-400);
    background: var(--gray-50);
}

.quick-filters button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Filters Row */
.filters-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filters-row select,
.filters-row input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.filters-row select:focus,
.filters-row input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.modal {
    background: white;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

/* Wide modal for player form */
.modal.modal-wide,
.modal:has(#player-form) {
    max-width: 800px;
}

.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: white;
    z-index: 10;
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
}

.modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--gray-400);
    border-radius: var(--radius);
    transition: all 0.15s ease;
}

.modal-close:hover {
    background: var(--gray-100);
    color: var(--gray-600);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-100);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background: var(--gray-50);
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-info {
    background: var(--info-light);
    color: var(--info);
}

.badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
}

/* Status Badge for Tables */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
}

.status-badge.active {
    background: var(--success-light);
    color: var(--success);
}

.status-badge.inactive {
    background: var(--gray-100);
    color: var(--gray-500);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 1.5rem;
}

.tab {
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: all 0.15s ease;
}

.tab:hover {
    color: var(--gray-700);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Toggle Switch */
.toggle {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gray-300);
    border-radius: 24px;
    transition: 0.2s;
}

.toggle-slider::before {
    position: absolute;
    content: '';
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.2s;
    box-shadow: var(--shadow-xs);
}

.toggle input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    padding: 0.875rem 1rem;
    border-radius: var(--radius);
    background: white;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.2s ease;
    border-left: 4px solid;
    min-width: 300px;
}

.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }
.toast-info { border-left-color: var(--info); }

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Content Integration Options */
.content-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.content-option {
    cursor: pointer;
    display: block;
}

.content-option input[type="radio"] {
    display: none;
}

.content-option .option-card {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1rem;
    background: white;
    transition: all 0.15s ease;
    min-height: 120px;
}

.content-option:hover .option-card {
    border-color: var(--primary);
}

.content-option.selected .option-card {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 1px var(--primary);
}

.content-option.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.content-option.disabled .option-card {
    background: var(--gray-50);
}

.option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.option-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-800);
}

.toggle-indicator {
    width: 36px;
    height: 20px;
    background: var(--gray-300);
    border-radius: 10px;
    position: relative;
    transition: background 0.15s;
}

.toggle-indicator::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.15s;
    box-shadow: var(--shadow-xs);
}

.content-option.selected .toggle-indicator {
    background: var(--primary);
}

.content-option.selected .toggle-indicator::after {
    transform: translateX(16px);
}

.option-desc {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.content-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.8125rem;
    margin-top: 0.5rem;
    background: white;
}

.content-input:focus {
    outline: none;
    border-color: var(--primary);
}

.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--gray-700);
}

/* Source Toggle */
.source-toggle {
    display: inline-flex;
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 0.25rem;
}

.source-toggle .toggle-option {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-600);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.source-toggle .toggle-option:has(input:checked) {
    background: white;
    color: var(--gray-900);
    box-shadow: var(--shadow-xs);
}

.source-toggle input {
    display: none;
}

.toggle-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.toggle-option input {
    cursor: pointer;
}

/* File Upload Zone */
.file-upload-zone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    background: var(--gray-50);
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.file-upload-zone:hover,
.file-upload-zone.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.file-upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-upload-zone.small {
    padding: 1rem;
}

.upload-placeholder {
    color: var(--gray-500);
    pointer-events: none;
}

.upload-placeholder .upload-icon,
.upload-placeholder span {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
    color: var(--gray-400);
}

.upload-placeholder .upload-icon i,
.upload-placeholder span i {
    font-size: 2rem;
}

.upload-placeholder.small span {
    font-size: 1.5rem;
}

.upload-placeholder p {
    font-size: 0.875rem;
    margin: 0;
}

.upload-placeholder .link {
    color: var(--primary);
    text-decoration: underline;
}

.upload-placeholder.small {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.upload-placeholder.small p {
    font-size: 0.8rem;
}

.upload-preview {
    max-width: 100%;
    max-height: 150px;
    object-fit: contain;
}

.upload-progress {
    pointer-events: none;
}

.progress-bar {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--gray-500);
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.video-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    overflow: hidden;
    transition: box-shadow 0.15s ease;
}

.video-card:hover {
    box-shadow: var(--shadow-md);
}

.video-thumbnail {
    aspect-ratio: 16/9;
    background: var(--gray-100);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 160px;
}

.video-thumbnail img,
.video-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-placeholder {
    font-size: 3rem;
    color: var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.video-placeholder i {
    font-size: 3rem;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.video-info {
    padding: 1rem;
}

.video-info h4,
.video-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-info p {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.video-meta {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.video-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--gray-500);
}

.video-stats i {
    margin-right: 0.25rem;
}

.video-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--gray-100);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--gray-400);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    font-size: 0.9375rem;
    color: var(--gray-500);
}

.empty-state a {
    color: var(--primary);
}

/* Stats Card */
.stats-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.stats-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stats-info .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.stats-info .label {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

/* Code/Embed Box */
.code-block {
    background: var(--gray-800);
    color: #E5E7EB;
    padding: 1rem;
    border-radius: var(--radius);
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.8125rem;
    line-height: 1.5;
    overflow-x: auto;
    position: relative;
}

.code-block .copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.375rem 0.75rem;
    background: var(--gray-700);
    border: 1px solid var(--gray-600);
    color: var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.code-block .copy-btn:hover {
    background: var(--gray-600);
    color: white;
}

/* Utilities */
.hidden { display: none !important; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-sm { font-size: 0.75rem; }
.text-gray { color: var(--gray-500); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-mono { font-family: 'Monaco', 'Consolas', monospace; }

/* Tags */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    background: var(--gray-100);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-700);
}

.tag-remove {
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--gray-400);
    line-height: 1;
}

.tag-remove:hover {
    color: var(--danger);
}

/* Search Input */
.search-input {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.search-input input {
    padding-left: 2.25rem;
}

.search-input i {
    position: absolute;
    left: 0.875rem;
    color: var(--gray-400);
    font-size: 0.875rem;
    pointer-events: none;
}

/* Filter inputs with search icon */
.filter-group input[type="text"] {
    padding-left: 2rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239CA3AF' viewBox='0 0 512 512'%3E%3Cpath d='M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 0.625rem center;
    background-size: 14px;
}

/* Table results count */
.table-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--gray-100);
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.table-count {
    font-weight: 500;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 0.25rem;
}

.pagination button {
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--gray-300);
    background: white;
    border-radius: var(--radius);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pagination button:hover:not(:disabled) {
    background: var(--gray-50);
    border-color: var(--gray-400);
}

.pagination button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* No results message */
.no-results {
    text-align: center;
    padding: 2rem;
    color: var(--gray-400);
}

.no-results i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* FAB */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 0.875rem 1.25rem;
    border-radius: 9999px;
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
}

.fab:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

/* ===================
   Player Config Sections (UNIBOTS-style)
   =================== */
.config-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    overflow: hidden;
}

.config-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1rem;
    background: var(--background);
    border-bottom: 1px solid var(--border);
}

.config-section-header.clickable {
    cursor: pointer;
    user-select: none;
}

.config-section-header.clickable:hover {
    background: var(--gray-100);
}

.section-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-label .fa-circle-info {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.collapse-icon {
    transition: transform 0.2s ease;
    font-size: 0.625rem;
}

.config-section.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.config-section.collapsed .config-section-body {
    display: none;
}

.config-section-body {
    padding: 1rem;
}

.config-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.config-row:last-child {
    margin-bottom: 0;
}

.config-field {
    flex: 1;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.config-field.full-width {
    flex: 100%;
    min-width: 100%;
}

.config-field label {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.config-field label .fa-circle-info {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
}

.config-field select,
.config-field input[type="text"],
.config-field input[type="url"],
.config-field input[type="number"],
.config-field textarea {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--background);
    color: var(--text-primary);
    width: 100%;
}

.config-field select:focus,
.config-field input:focus,
.config-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.config-field input[type="color"] {
    width: 60px;
    height: 36px;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--gray-300);
    transition: 0.3s;
    border-radius: 24px;
}

.switch .slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.switch input:checked + .slider {
    background-color: var(--primary);
}

.switch input:checked + .slider:before {
    transform: translateX(20px);
}

.switch input:focus + .slider {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* Logo Upload */
.logo-upload-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-filename {
    font-size: 0.75rem;
    color: var(--text-secondary);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logo-filename:before {
    content: "📎 ";
}

.logo-filename:empty:before {
    content: "";
}

/* Logo Visibility Row */
.logo-visibility-row {
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
}

/* Player ID Display Box */
.player-id-display {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.player-id-display label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    display: block;
    margin-bottom: 0.5rem;
}

.player-id-box {
    font-family: monospace;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    background: var(--gray-100);
    border-radius: var(--radius);
    color: var(--text-primary);
}

/* Logo Preview Container */
.logo-preview-container {
    position: relative;
    width: 100%;
    height: 300px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

/* Text helpers */
.text-danger {
    color: var(--danger) !important;
    font-size: 0.75rem;
}

.text-gray {
    color: var(--text-tertiary) !important;
}

/* ===================
   Reports Page
   =================== */
.reports-filters {
    background: var(--surface);
}

.reports-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.reports-filter-row .filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    min-width: 140px;
}

.reports-filter-row .filter-group label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.reports-filter-row .filter-group select,
.reports-filter-row .filter-group input[type="date"] {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--background);
    color: var(--text-primary);
}

.reports-filter-row .filter-group select:focus,
.reports-filter-row .filter-group input[type="date"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.reports-filter-row .filter-actions {
    margin-left: auto;
}

/* KPI Grid for Reports */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.2s ease;
}

.kpi-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.kpi-card.highlight {
    background: linear-gradient(135deg, var(--primary), #818CF8);
    border: none;
    color: white;
}

.kpi-card.highlight .kpi-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.kpi-card.highlight .kpi-label {
    color: rgba(255, 255, 255, 0.9);
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.kpi-content {
    flex: 1;
    min-width: 0;
}

.kpi-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

.kpi-card.highlight .kpi-value {
    color: white;
}

.kpi-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
    margin-top: 0.25rem;
}

/* Charts Row */
.charts-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.chart-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.chart-card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--background);
}

.chart-card .card-header h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-card .card-header h3 i {
    color: var(--primary);
}

.chart-card .card-body {
    padding: 1.25rem;
    height: 300px;
}

.chart-card .card-body canvas {
    width: 100% !important;
    height: 100% !important;
}

/* Report Table Footer */
#report-totals {
    background: var(--background);
    font-weight: 600;
}

#report-totals td {
    border-top: 2px solid var(--border);
    padding-top: 0.875rem;
}

/* Card Header with Actions */
.card .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--background);
}

.card .card-header h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card .card-header h3 i {
    color: var(--primary);
}

/* Responsive */
@media (max-width: 1024px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .content-options-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .filters {
        flex-wrap: wrap;
    }
    
    .quick-filters {
        width: 100%;
        justify-content: flex-start;
    }
    
    .charts-row {
        grid-template-columns: 1fr;
    }
    
    .reports-filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .reports-filter-row .filter-group {
        width: 100%;
    }
    
    .reports-filter-row .filter-actions {
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    /* Sidebar - hidden by default on mobile */
    .sidebar {
        transform: translateX(-100%);
        box-shadow: var(--shadow-xl);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    /* Config sections responsive */
    .config-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .config-field {
        min-width: 100%;
    }
    
    .config-section-body {
        padding: 0.875rem;
    }
    
    .logo-visibility-row {
        flex-wrap: wrap;
    }
    
    .logo-visibility-row .config-field {
        min-width: calc(50% - 0.5rem);
    }
    
    /* Modal responsive */
    .modal:has(#player-form) {
        max-width: calc(100vw - 2rem);
        max-height: calc(100vh - 2rem);
    }
    
    /* Sidebar overlay backdrop */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .top-header {
        padding: 0 1rem;
    }
    
    .header-right {
        gap: 0.5rem;
    }
    
    .greeting {
        display: none;
    }
    
    .page-content {
        padding: 1rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .page-header h1 {
        font-size: 1.25rem;
    }
    
    /* Filters responsive */
    .filters {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .filters-inline {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        width: 100%;
    }
    
    .filter-group {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .date-range {
        flex-wrap: wrap;
        width: 100%;
        justify-content: flex-start;
    }
    
    .date-range input[type="date"] {
        flex: 1;
        min-width: 120px;
    }
    
    .quick-filters {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .quick-filters button {
        flex: 1;
        min-width: auto;
        text-align: center;
    }
    
    /* KPI Cards - stack on mobile */
    .kpi-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .kpi-card {
        padding: 1rem;
    }
    
    .kpi-card .value {
        font-size: 1.5rem;
    }
    
    /* Charts on mobile */
    .chart-card .card-body {
        height: 250px;
    }
    
    /* Video grid */
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    /* Tables - horizontal scroll */
    .table-container {
        margin: 0 -1rem;
        padding: 0 1rem;
    }
    
    table {
        font-size: 0.8125rem;
        min-width: 600px;
    }
    
    th, td {
        padding: 0.5rem 0.625rem;
        white-space: nowrap;
    }
    
    /* Cards */
    .card {
        border-radius: var(--radius);
    }
    
    .card-header {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Modal fullscreen on mobile */
    .modal {
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
        height: 100%;
    }
    
    .modal-overlay {
        padding: 0;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 0.75rem 1rem;
    }
    
    /* Form adjustments */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Content options */
    .content-options-grid {
        gap: 0.75rem;
    }
    
    .content-option .option-card {
        min-height: auto;
        padding: 0.875rem;
    }
    
    /* Buttons */
    .btn {
        padding: 0.5rem 0.875rem;
    }
    
    /* Action icons */
    .action-icons {
        gap: 0.25rem;
    }
    
    .action-icon {
        width: 28px;
        height: 28px;
    }
    
    /* Tabs */
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .tabs::-webkit-scrollbar {
        display: none;
    }
    
    .tab {
        white-space: nowrap;
        padding: 0.625rem 0.875rem;
    }
    
    /* Source toggle */
    .source-toggle {
        width: 100%;
    }
    
    .source-toggle .toggle-option {
        flex: 1;
        justify-content: center;
    }
    
    /* FAB position */
    .fab {
        bottom: 1rem;
        right: 1rem;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    
    .kpi-card .label {
        font-size: 0.6875rem;
    }
    
    .kpi-card .value {
        font-size: 1.25rem;
    }
    
    .page-header h1 {
        font-size: 1.125rem;
    }
    
    .avatar {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .sidebar {
        width: 280px;
    }
    
    /* Even smaller text for tables */
    table {
        font-size: 0.75rem;
    }
    
    th, td {
        padding: 0.375rem 0.5rem;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .top-header,
    .fab,
    .btn {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
    }
}
