:root {
    --primary: #6C5CE7;
    --primary-dark: #5849c2;
    --secondary: #00CEC9;
    --accent: #FD79A8;
    --warning: #FDCB6E;
    --danger: #E17055;
    --success: #00B894;
    --dark: #2D3436;
    --light: #DFE6E9;
    --white: #FFFFFF;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-shadow: 0 10px 40px rgba(108, 92, 231, 0.15);
    /* Gray scale for header */
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #eeeeee;
    --gray-300: #e0e0e0;
    --gray-500: #9e9e9e;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-900: #212121;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: var(--dark);
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-screen.hidden {
    display: none;
}

.loading-screen .spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(108, 92, 231, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-screen p {
    color: var(--dark);
    margin-top: 20px;
    font-size: 18px;
}

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

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 20px;
}

.login-box {
    background: var(--white);
    padding: 50px 40px;
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.login-box .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.login-box .logo-icon {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.login-box h1 {
    color: var(--primary);
    font-size: 32px;
    font-weight: 800;
}

.login-box h1 span {
    color: var(--dark);
}

.login-box h2 {
    color: var(--dark);
    font-size: 24px;
    margin-bottom: 30px;
}

.login-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
    color: var(--dark);
}

.login-form input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--light);
    border-radius: 12px;
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    transition: all 0.3s ease;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
}

.login-form .btn-login {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Nunito', sans-serif;
}

.login-form .btn-login:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(108, 92, 231, 0.3);
}

.login-form .btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.login-error {
    background: rgba(225, 112, 85, 0.1);
    color: var(--danger);
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.login-error.show {
    display: block;
}

/* Header */
.header {
    background: var(--white);
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 42px;
    height: 42px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--white);
}

.logo h1 {
    color: var(--primary);
    font-size: 22px;
    font-weight: 800;
}

.logo h1 span {
    color: var(--dark);
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-time {
    color: var(--gray-600);
    font-size: 14px;
    font-weight: 600;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gray-700);
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--gray-100);
    transition: all 0.2s ease;
}

.user-menu:hover {
    background: var(--gray-200);
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.user-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    padding: 10px 0;
    display: none;
    z-index: 100;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

.dropdown-menu a:hover {
    background: #f8f9fa;
}

.dropdown-menu a.danger {
    color: var(--danger);
}

/* Navigation */
.nav {
    background: var(--white);
    padding: 15px 40px;
    display: flex;
    gap: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 25px;
    font-family: 'Nunito', sans-serif;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--light);
    color: var(--dark);
}

.nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.nav-btn.hidden {
    display: none;
}

/* Main Container */
.main-container {
    padding: 30px 40px;
    display: none;
}

.main-container.active {
    display: block;
}

/* Form Section */
.form-section {
    background: var(--white);
    border-radius: 25px;
    padding: 35px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
}

.form-section h2 {
    color: var(--primary);
    margin-bottom: 25px;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 700;
    color: var(--dark);
    font-size: 14px;
}

.form-group input,
.form-group select {
    padding: 14px 18px;
    border: 2px solid var(--light);
    border-radius: 12px;
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(108, 92, 231, 0.1);
}

.btn-group {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 30px;
    border: none;
    border-radius: 12px;
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.btn-primary { background: var(--primary); color: var(--white); }
.btn-secondary { background: var(--secondary); color: var(--white); }
.btn-accent { background: var(--accent); color: var(--white); }
.btn-warning { background: var(--warning); color: var(--dark); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-success { background: var(--success); color: var(--white); }

/* Sessions Grid */
.sessions-section h2 {
    color: var(--primary);
    margin-bottom: 25px;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sessions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.session-card {
    background: var(--white);
    border-radius: 20px;
    padding: 25px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    border-left: 5px solid var(--success);
    position: relative;
    overflow: hidden;
}

.session-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, transparent 50%, rgba(108, 92, 231, 0.05) 50%);
}

.session-card.warning {
    border-left-color: var(--warning);
    animation: pulse-warning 1.5s infinite;
}

.session-card.danger {
    border-left-color: var(--danger);
    animation: pulse-danger 1s infinite;
}

.session-card.unlimited {
    border-left-color: var(--primary);
    background: linear-gradient(135deg, #f8f9ff 0%, #eef0ff 100%);
}

@keyframes pulse-warning {
    0%, 100% { box-shadow: var(--card-shadow); }
    50% { box-shadow: 0 10px 40px rgba(253, 203, 110, 0.4); }
}

@keyframes pulse-danger {
    0%, 100% { box-shadow: var(--card-shadow); }
    50% { box-shadow: 0 10px 40px rgba(225, 112, 85, 0.4); }
}

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

.session-names h3 {
    font-size: 22px;
    color: var(--dark);
    margin-bottom: 5px;
}

.session-names p {
    color: #636e72;
    font-size: 14px;
}

.session-status {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.status-active { background: rgba(0, 184, 148, 0.15); color: var(--success); }
.status-warning { background: rgba(253, 203, 110, 0.3); color: #e67e22; }
.status-ended { background: rgba(225, 112, 85, 0.15); color: var(--danger); }
.status-unlimited { background: rgba(102, 126, 234, 0.15); color: var(--primary); }
.status-paused { background: rgba(108, 117, 125, 0.2); color: #495057; }

/* Paused session card style */
.session-card.paused {
    border: 2px dashed #6c757d;
    background: linear-gradient(135deg, #f8f9fa 0%, #e2e6ea 100%);
    opacity: 0.85;
}

.session-card.paused .timer-display {
    color: #6c757d;
}

.session-card.paused .session-timer {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border: 2px dashed #adb5bd;
}

.session-timer {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    margin-bottom: 20px;
}

.timer-display {
    font-size: 42px;
    font-weight: 800;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

.timer-label {
    font-size: 13px;
    color: #636e72;
    margin-top: 5px;
}

.session-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.info-item {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 10px;
}

.info-item label {
    display: block;
    font-size: 11px;
    color: #636e72;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.info-item span {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
}

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

.session-actions .btn {
    flex: 1;
    min-width: 100px;
    padding: 10px 15px;
    font-size: 13px;
    justify-content: center;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #636e72;
}

.empty-state .icon {
    font-size: 60px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--dark);
}

/* Reports Section */
.reports-section {
    background: var(--white);
    border-radius: 25px;
    padding: 35px;
    box-shadow: var(--card-shadow);
}

.reports-section h2 {
    color: var(--primary);
    margin-bottom: 25px;
    font-size: 24px;
}

/* Credits View */
#creditsView {
    background: var(--white);
    border-radius: 25px;
    padding: 35px;
    box-shadow: var(--card-shadow);
}

#creditsView h2 {
    color: #17a2b8;
    font-size: 24px;
}

.report-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.report-tab {
    padding: 12px 25px;
    border: 2px solid var(--light);
    border-radius: 25px;
    background: transparent;
    font-family: 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--dark);
}

.report-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.report-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

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

.stat-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    border: 2px solid var(--light);
}

.stat-card .icon {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 15px;
}

.stat-card:nth-child(1) .icon { background: rgba(108, 92, 231, 0.15); }
.stat-card:nth-child(2) .icon { background: rgba(0, 206, 201, 0.15); }
.stat-card:nth-child(3) .icon { background: rgba(253, 203, 110, 0.15); }
.stat-card:nth-child(4) .icon { background: rgba(0, 184, 148, 0.15); }

.stat-card .value {
    font-size: 32px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 5px;
}

.stat-card .label {
    font-size: 14px;
    color: #636e72;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.report-table th,
.report-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--light);
}

.report-table th {
    background: #f8f9fa;
    font-weight: 700;
    color: var(--dark);
    font-size: 13px;
    text-transform: uppercase;
}

.report-table tr:hover {
    background: #f8f9fa;
}

/* Settings Section */
.settings-section {
    background: var(--white);
    border-radius: 25px;
    padding: 35px;
    box-shadow: var(--card-shadow);
}

.settings-section h2 {
    color: var(--primary);
    margin-bottom: 25px;
    font-size: 24px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.setting-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
}

.setting-card h3 {
    font-size: 18px;
    color: var(--dark);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Staff Section */
.staff-section {
    background: var(--white);
    border-radius: 25px;
    padding: 35px;
    box-shadow: var(--card-shadow);
}

.staff-section h2 {
    color: var(--primary);
    margin-bottom: 25px;
    font-size: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.staff-table th,
.staff-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--light);
}

.staff-table th {
    background: #f8f9fa;
    font-weight: 700;
    color: var(--dark);
}

.role-badge {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 700;
}

.role-admin { background: rgba(108, 92, 231, 0.15); color: var(--primary); }
.role-manager { background: rgba(0, 206, 201, 0.15); color: var(--secondary); }
.role-staff { background: rgba(253, 203, 110, 0.3); color: #e67e22; }

.status-badge {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 700;
}

.status-active { background: rgba(0, 184, 148, 0.15); color: var(--success); }
.status-inactive { background: rgba(225, 112, 85, 0.15); color: var(--danger); }

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: 25px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    animation: modalSlide 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 24px;
    color: #636e72;
    cursor: pointer;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--dark);
}

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

.modal-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 20px;
}

.modal-icon.warning { background: rgba(253, 203, 110, 0.2); }
.modal-icon.danger { background: rgba(225, 112, 85, 0.2); }
.modal-icon.success { background: rgba(0, 184, 148, 0.2); }

.modal h2 {
    font-size: 24px;
    color: var(--dark);
    margin-bottom: 15px;
}

.modal p {
    color: #636e72;
    margin-bottom: 25px;
    font-size: 16px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.modal-buttons .btn {
    flex: 1;
}

/* Toast */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: var(--white);
    padding: 16px 24px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastSlide 0.3s ease;
    font-weight: 600;
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left-color: var(--danger);
}

@keyframes toastSlide {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Super Admin Panel */
.super-section {
    background: var(--white);
    border-radius: 25px;
    padding: 35px;
    box-shadow: var(--card-shadow);
}

.super-section h2 {
    color: var(--primary);
    margin-bottom: 25px;
    font-size: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tenant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.tenant-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    border: 2px solid var(--light);
    transition: all 0.3s ease;
}

.tenant-card:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.15);
}

.tenant-card h3 {
    color: var(--dark);
    margin-bottom: 15px;
    font-size: 18px;
}

.tenant-card .tenant-info {
    font-size: 14px;
    color: #636e72;
    line-height: 1.8;
}

/* TV Screen Section */
.tv-section {
    min-height: calc(100vh - 180px);
}

.tv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: var(--white);
    padding: 20px 30px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
}

.tv-header h2 {
    color: var(--primary);
    font-size: 28px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.tv-controls {
    display: flex;
    gap: 10px;
}

.tv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.tv-card {
    background: var(--white);
    border-radius: 25px;
    padding: 30px;
    box-shadow: 0 15px 50px rgba(108, 92, 231, 0.15);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.tv-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: var(--success);
    transition: background 0.3s ease;
}

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

.tv-card.danger::before {
    background: var(--danger);
    animation: danger-pulse 1s infinite;
}

@keyframes danger-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.tv-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 60px rgba(108, 92, 231, 0.25);
    border-color: var(--primary);
}

.tv-card.warning:hover {
    border-color: var(--warning);
}

.tv-card.danger:hover {
    border-color: var(--danger);
}

.tv-card-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary) 0%, #a29bfe 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    margin: 0 auto 20px;
    box-shadow: 0 10px 30px rgba(108, 92, 231, 0.3);
}

.tv-card.warning .tv-card-icon {
    background: linear-gradient(135deg, var(--warning) 0%, #ffeaa7 100%);
    box-shadow: 0 10px 30px rgba(253, 203, 110, 0.4);
}

.tv-card.danger .tv-card-icon {
    background: linear-gradient(135deg, var(--danger) 0%, #fab1a0 100%);
    box-shadow: 0 10px 30px rgba(225, 112, 85, 0.4);
}

.tv-card-name {
    font-size: 26px;
    font-weight: 800;
    color: var(--dark);
    text-align: center;
    margin-bottom: 15px;
    line-height: 1.2;
}

.tv-card-timer {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #dfe6e9 100%);
    border-radius: 20px;
    margin-bottom: 15px;
}

.tv-card-time {
    font-size: 52px;
    font-weight: 800;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
}

.tv-card.warning .tv-card-time {
    color: #e67e22;
}

.tv-card.danger .tv-card-time {
    color: var(--danger);
}

.tv-card-status {
    text-align: center;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.tv-card .tv-card-status {
    background: rgba(0, 184, 148, 0.15);
    color: var(--success);
}

.tv-card.warning .tv-card-status {
    background: rgba(253, 203, 110, 0.3);
    color: #e67e22;
}

.tv-card.danger .tv-card-status {
    background: rgba(225, 112, 85, 0.2);
    color: var(--danger);
}

.tv-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 100px 20px;
    background: var(--white);
    border-radius: 25px;
    box-shadow: var(--card-shadow);
}

.tv-empty-icon {
    font-size: 100px;
    margin-bottom: 30px;
    opacity: 0.5;
}

.tv-empty h3 {
    font-size: 28px;
    color: var(--dark);
    margin-bottom: 15px;
}

.tv-empty p {
    font-size: 18px;
    color: #636e72;
}

/* TV Sidebar */
.tv-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background: var(--white);
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.tv-sidebar.active {
    right: 0;
}

.tv-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    background: var(--bg-gradient);
    color: var(--white);
}

.tv-sidebar-header h3 {
    font-size: 20px;
}

.tv-sidebar-close {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tv-sidebar-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.tv-sidebar-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

.tv-detail-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary) 0%, #a29bfe 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 50px;
    margin: 0 auto 25px;
    box-shadow: 0 15px 40px rgba(108, 92, 231, 0.3);
}

.tv-detail-name {
    font-size: 32px;
    font-weight: 800;
    color: var(--dark);
    text-align: center;
    margin-bottom: 30px;
}

.tv-detail-timer {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9fa 0%, #dfe6e9 100%);
    border-radius: 20px;
    margin-bottom: 30px;
}

.tv-detail-time {
    font-size: 64px;
    font-weight: 800;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
}

.tv-detail-label {
    font-size: 14px;
    color: #636e72;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.tv-detail-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tv-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.tv-detail-row label {
    font-size: 14px;
    color: #636e72;
    font-weight: 600;
}

.tv-detail-row span {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
}

/* Fullscreen Mode */
body.tv-fullscreen {
    overflow: hidden;
}

body.tv-fullscreen .header,
body.tv-fullscreen .nav {
    display: none;
}

body.tv-fullscreen .main-container {
    padding: 20px;
}

body.tv-fullscreen .tv-section {
    min-height: 100vh;
}

body.tv-fullscreen .tv-header {
    background: var(--bg-gradient);
}

body.tv-fullscreen .tv-header h2 {
    color: var(--white);
}

body.tv-fullscreen .tv-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

body.tv-fullscreen .tv-card {
    padding: 35px;
}

body.tv-fullscreen .tv-card-name {
    font-size: 30px;
}

body.tv-fullscreen .tv-card-time {
    font-size: 60px;
}

/* Staff Table Wrapper */
.staff-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.staff-table {
    min-width: 600px;
}

/* Report Table Wrapper */
.report-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.report-table {
    min-width: 800px;
}

/* Responsive */
@media (max-width: 1024px) {
    .charts-container {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 10px;
    }

    .nav {
        padding: 10px 20px;
        overflow-x: auto;
    }

    .main-container {
        padding: 20px;
    }

    .form-section,
    .reports-section,
    .settings-section,
    .staff-section,
    .super-section {
        padding: 20px;
    }

    .sessions-grid {
        grid-template-columns: 1fr;
    }

    .login-box {
        padding: 30px 20px;
    }

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

    .breakdown-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .date-selectors {
        flex-wrap: wrap;
    }

    .date-selector-group {
        flex: 1;
        min-width: 100px;
    }

    /* Modal Responsive */
    .modal-overlay {
        padding: 15px;
        align-items: flex-start;
        overflow-y: auto;
    }

    .modal {
        width: 100% !important;
        max-width: 100% !important;
        padding: 25px 20px;
        border-radius: 20px;
        margin: 10px 0;
    }

    .modal h2 {
        font-size: 20px;
    }

    .modal .form-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

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

    .modal .form-group input,
    .modal .form-group select {
        padding: 12px 14px;
        font-size: 14px;
    }

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

    .modal-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .modal-icon {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }

    /* Tenant Grid Responsive */
    .tenant-grid {
        grid-template-columns: 1fr;
    }

    .tenant-card {
        padding: 20px;
    }

    /* Super Section Title */
    .super-section h2 {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .super-section h2 .btn {
        width: 100%;
        justify-content: center;
    }

    /* Staff Section Title */
    .staff-section h2 {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .staff-section h2 .btn {
        width: 100%;
        justify-content: center;
    }
}

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

    .breakdown-grid {
        grid-template-columns: 1fr !important;
    }

    /* Small Screen Modal */
    .modal {
        padding: 20px 15px;
    }

    .modal h2 {
        font-size: 18px;
    }

    .modal h3 {
        font-size: 16px;
    }

    .modal .form-group label {
        font-size: 13px;
    }

    .modal .form-group input,
    .modal .form-group select {
        padding: 10px 12px;
        font-size: 14px;
    }

    /* Toast Responsive */
    .toast-container {
        left: 10px;
        right: 10px;
        top: 10px;
    }

    .toast {
        padding: 12px 16px;
        font-size: 14px;
    }

    /* Header Time Hide on Small */
    .header-time {
        display: none;
    }

    /* Nav Buttons Smaller */
    .nav-btn {
        padding: 10px 15px;
        font-size: 13px;
    }
}

/* ==================== Autocomplete Dropdown ==================== */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--primary);
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 8px 20px rgba(108, 92, 231, 0.2);
}

.autocomplete-item {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s ease;
}

.autocomplete-item:last-child {
    border-bottom: none;
    border-radius: 0 0 10px 10px;
}

.autocomplete-item:hover {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
}

.autocomplete-item .child-name {
    font-weight: 700;
    color: var(--dark);
    font-size: 14px;
}

.autocomplete-item .parent-name {
    font-size: 13px;
    color: #636e72;
    margin-top: 2px;
}

.autocomplete-item .phone {
    font-size: 12px;
    color: var(--primary);
    margin-top: 2px;
}

.autocomplete-item.highlighted {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
}

.autocomplete-no-results {
    padding: 15px;
    text-align: center;
    color: #636e72;
    font-size: 13px;
}
