/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette - Modern & Vibrant */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --dark-color: #1e293b;
    --darker-color: #0f172a;
    --light-color: #f8fafc;
    --lighter-color: #f1f5f9;
    --sidebar-width: 280px;
    --sidebar-bg: linear-gradient(135deg, #4e73df 0%, #224abe 100%);
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --hover-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition-speed: 0.3s;
    --border-radius: 16px;
    --border-radius-sm: 10px;
    --border-radius-lg: 20px;
    
    /* New modern design variables */
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --neon-glow: 0 0 15px rgba(99, 102, 241, 0.5);
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --gradient-5: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    
    /* Enhanced UI variables */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --dark-gradient: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-hover-bg: rgba(255, 255, 255, 1);
    --input-bg: #f8fafc;
    --input-border: #e2e8f0;
    --input-focus: #6366f1;
    --sidebar-text: rgba(255, 255, 255, 0.9);
    --sidebar-active: #ffffff;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #334155;
    background-color: #f8fafc;
    min-height: 100vh;
    background-image:
        linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none"/><path d="M0,0 L100,100 M100,0 L0,100" stroke="rgba(99, 102, 241, 0.03)" stroke-width="0.5"/></svg>');
    background-attachment: fixed;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(at 47% 33%, rgba(99, 102, 241, 0.1) 0, transparent 50%),
                radial-gradient(at 82% 65%, rgba(139, 92, 246, 0.1) 0, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

h1 {
    font-size: 2.25rem;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

h2 {
    font-size: 1.875rem;
    color: var(--dark-color);
}

h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
}

h4 {
    font-size: 1.25rem;
    color: var(--dark-color);
}

h5 {
    font-size: 1.125rem;
    color: var(--dark-color);
}

h6 {
    font-size: 1rem;
    color: var(--dark-color);
}

p {
    margin-bottom: 1rem;
    color: #64748b;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--primary-dark);
}

/* Login Page Styles */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.4;
    z-index: 0;
}

.login-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--glass-shadow);
    padding: 40px 30px;
    text-align: center;
    animation: fadeIn 0.5s ease-in-out;
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
    opacity: 0.3;
    transform: rotate(45deg);
    pointer-events: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-box .logo {
    margin-bottom: 30px;
}

.login-box .logo h1 {
    font-size: 2.5rem;
    margin-bottom: 5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.login-box .logo p {
    color: #64748b;
    font-size: 0.875rem;
}

.login-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 0.875rem;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group input, .input-group select, .input-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--input-border);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    transition: all var(--transition-speed);
    background-color: var(--input-bg);
    color: var(--dark-color);
}

.input-group input:focus, .input-group select:focus, .input-group textarea:focus {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    outline: none;
    transform: translateY(-2px);
}

.input-group input:hover, .input-group select:hover, .input-group textarea:hover {
    border-color: var(--primary-color);
}

.toggle-password {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    font-size: 1.125rem;
}

.remember-me {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    height: 20px;
    width: 20px;
    background-color: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: var(--border-radius-sm);
    margin-right: 10px;
    display: inline-block;
    position: relative;
    transition: all var(--transition-speed);
}

.checkbox-container:hover .checkmark {
    border-color: var(--primary-color);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-container input:checked ~ .checkmark:after {
    content: "";
    position: absolute;
    display: block;
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-password {
    color: var(--primary-color);
    font-size: 0.875rem;
    font-weight: 500;
}

.forgot-password:hover {
    color: var(--primary-dark);
}

.btn {
    padding: 14px 24px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--transition-speed);
    gap: 8px;
    letter-spacing: 0.025em;
}

.btn-full {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(99, 102, 241, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background-color: #f1f5f9;
    color: var(--dark-color);
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background-color: #e2e8f0;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.25);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(245, 158, 11, 0.25);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.25);
}

.btn-small {
    padding: 10px 16px;
    font-size: 0.875rem;
}

.login-info {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(226, 232, 240, 0.5);
}

.login-info h4 {
    color: var(--dark-color);
    margin-bottom: 15px;
    font-size: 1rem;
}

.demo-accounts {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.demo-account {
    padding: 12px 15px;
    background-color: rgba(241, 245, 249, 0.7);
    border-radius: var(--border-radius-sm);
    text-align: left;
    transition: all var(--transition-speed);
}

.demo-account:hover {
    background-color: rgba(241, 245, 249, 0.9);
    transform: translateY(-2px);
}

.demo-account strong {
    color: var(--dark-color);
}

.login-footer {
    margin-top: 30px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.75rem;
}

/* Alerts */
.alert {
    padding: 16px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.alert-icon {
    font-size: 1.25rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background-color: #fef2f2;
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

.alert-warning {
    background-color: #fffbeb;
    color: var(--warning-color);
    border-left: 4px solid var(--warning-color);
}

.alert-success {
    background-color: #ecfdf5;
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

/* Dashboard Layout */
.dashboard {
    min-height: 100vh;
    display: flex;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1100;
    height: 100vh;
    overflow-y: auto;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    box-shadow: 4px 0 20px -5px rgba(0, 0, 0, 0.2);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: rgba(2, 6, 23, 0.8);
    z-index: 1050;
    cursor: pointer;
    touch-action: manipulation;
    opacity: 0;
    transition: opacity var(--transition-speed), visibility var(--transition-speed);
    visibility: hidden;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
    visibility: visible;
}

body.sidebar-open {
    overflow: hidden;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h1 {
    font-size: 1.75rem;
    margin-bottom: 5px;
    background: linear-gradient(90deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.sidebar-header p {
    font-size: 0.875rem;
    opacity: 0.8;
}

.user-info-sidebar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

.user-avatar-sidebar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.user-info-sidebar strong {
    display: block;
    font-size: 1.125rem;
    font-weight: 600;
}

.user-info-sidebar small {
    font-size: 0.75rem;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 4px;
}

.role-admin {
    color: #fbbf24;
}

.role-staff {
    color: #60a5fa;
}

.nav-menu {
    list-style: none;
    padding: 20px 0;
}

.nav-menu li {
    margin-bottom: 5px;
}

.nav-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all var(--transition-speed);
    border-left: 4px solid transparent;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
}

.nav-menu a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: left var(--transition-speed);
}

.nav-menu a:hover::before,
.nav-menu a.active::before {
    left: 0;
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: #ffffff;
    color: #ffffff;
}

.nav-menu a i {
    font-size: 1.125rem;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    text-align: center;
    font-size: 0.75rem;
    opacity: 0.7;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 0;
    flex: 1;
    transition: margin-left var(--transition-speed);
}

/* Top Bar */
.top-bar {
    background: linear-gradient(90deg, #4e73df 0%, #224abe 100%);
    padding: 16px 25px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.menu-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed);
}

.menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.datetime, .date {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

/* Content Area */
.content-area {
    padding: 25px;
}

/* Cards */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    padding: 25px;
    margin-bottom: 25px;
    animation: fadeIn 0.5s ease-in-out;
    transition: all var(--transition-speed);
    border: 1px solid rgba(226, 232, 240, 0.5);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-1);
    opacity: 0.8;
}

.card:nth-child(2n)::before {
    background: var(--gradient-2);
}

.card:nth-child(3n)::before {
    background: var(--gradient-3);
}

.card:nth-child(4n)::before {
    background: var(--gradient-4);
}

.card:nth-child(5n)::before {
    background: var(--gradient-5);
}

.card:hover {
    background: var(--card-hover-bg);
    box-shadow: var(--hover-shadow);
    transform: translateY(-5px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    color: var(--primary-color);
    font-size: 1.375rem;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    position: relative;
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: all var(--transition-speed);
    border: 1px solid rgba(226, 232, 240, 0.5);
    display: flex;
    align-items: center;
    gap: 20px;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, rgba(99, 102, 241, 0) 70%);
    border-radius: 50%;
    transform: translate(30%, 30%);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
}

.stat-card:nth-child(1)::before {
    background: linear-gradient(180deg, #6366f1 0%, #4f46e5 100%);
}

.stat-card:nth-child(2)::before {
    background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}

.stat-card:nth-child(3)::before {
    background: linear-gradient(180deg, #10b981 0%, #059669 100%);
}

.stat-card.status-overdue::before {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 16px;
}

.stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(79, 70, 229, 0.1) 100%);
    color: var(--primary-color);
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.1) 100%);
    color: var(--warning-color);
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.1) 100%);
    color: var(--success-color);
}

.stat-card.status-overdue .stat-icon {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.1) 100%);
    color: var(--danger-color);
}

.stat-content {
    padding-left: 10px;
}

.stat-number {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 8px;
    line-height: 1;
}

.stat-label {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Schedule Summary */
.schedule-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.schedule-item {
    background-color: #f8fafc;
    border-radius: var(--border-radius-sm);
    padding: 16px;
    text-align: center;
    transition: all var(--transition-speed);
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.schedule-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-1);
}

.schedule-item:nth-child(2)::before {
    background: var(--gradient-2);
}

.schedule-item:nth-child(3)::before {
    background: var(--gradient-3);
}

.schedule-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-shadow);
}

.schedule-count {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.schedule-label {
    color: #64748b;
    font-size: 0.875rem;
}

/* Table */
.table-container {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    border: 1px solid rgba(226, 232, 240, 0.5);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
}

table th {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: var(--dark-color);
    font-weight: 600;
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: sticky;
    top: 0;
    z-index: 10;
}

table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    transition: background-color var(--transition-speed);
}

table tr:hover {
    background-color: rgba(99, 102, 241, 0.05);
}

table tr:last-child td {
    border-bottom: none;
}

.text-center {
    text-align: center;
}

.text-overdue {
    color: var(--danger-color);
    font-weight: 600;
}

/* Status */
.status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-speed);
}

.status::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0) 100%);
    transition: left 0.6s;
}

.status:hover::before {
    left: 100%;
}

.status-pending {
    background-color: #fffbeb;
    color: var(--warning-color);
}

.status-completed {
    background-color: #dcfce7;
    color: var(--success-color);
}

.status-active {
    background-color: #dcfce7;
    color: var(--success-color);
}

.status-inactive {
    background-color: #fee2e2;
    color: var(--danger-color);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

.badge-admin {
    background-color: rgba(251, 191, 36, 0.2);
    color: #d97706;
}

.badge-staff {
    background-color: rgba(96, 165, 250, 0.2);
    color: #2563eb;
}

/* Activity Log */
.activity-list {
    max-height: 300px;
    overflow-y: auto;
}

.activity-empty {
    text-align: center;
    padding: 30px;
    color: #64748b;
}

.activity-item {
    display: flex;
    padding: 14px 0;
    border-bottom: 1px solid #f1f5f9;
    align-items: flex-start;
    gap: 12px;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.activity-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.activity-time {
    color: #64748b;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.activity-content {
    flex: 1;
}

.activity-user {
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--dark-color);
}

.activity-action-login {
    color: var(--success-color);
    font-size: 0.75rem;
    margin-left: 8px;
}

.activity-action-logout {
    color: var(--warning-color);
    font-size: 0.75rem;
    margin-left: 8px;
}

.activity-action-add,
.activity-action-update,
.activity-action-status {
    color: var(--primary-color);
    font-size: 0.75rem;
    margin-left: 8px;
}

.activity-details {
    color: #64748b;
    font-size: 0.875rem;
    margin-top: 4px;
}

/* Form Styles */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.required {
    color: var(--danger-color);
}

.error {
    border-color: var(--danger-color) !important;
}

/* Customer Info */
.customer-info, .user-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
}

.info-value {
    font-size: 1rem;
    font-weight: 500;
    color: var(--dark-color);
}

/* Customer/User Guide */
.user-guide, .security-warning {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.guide-item, .warning-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.guide-icon, .warning-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.guide-icon {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(79, 70, 229, 0.1) 100%);
    color: var(--primary-color);
}

.warning-icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(217, 119, 6, 0.1) 100%);
    color: var(--warning-color);
}

.guide-content, .warning-content {
    flex: 1;
}

.guide-content h4, .warning-content h4 {
    margin-bottom: 8px;
    font-size: 1.125rem;
}

.guide-content p, .warning-content p {
    margin-bottom: 0;
}

/* Delete Confirmation */
.delete-confirmation {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.delete-message {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.customer-details {
    background-color: #f8fafc;
    border-radius: var(--border-radius);
    padding: 20px;
    border: 1px solid #e2e8f0;
}

.delete-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Filter Section */
.filter-form {
    margin-bottom: 0;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.filter-actions {
    display: flex;
    justify-content: flex-start;
}

/* Search Container */
.search-container {
    margin-bottom: 20px;
}

.search-form {
    display: flex;
    gap: 10px;
}

/* Customer/User Count */
.customer-count, .user-count, .log-count {
    margin-bottom: 16px;
}

.customer-count p, .user-count p, .log-count p {
    margin-bottom: 0;
    font-weight: 500;
    color: #64748b;
}

.customer-count strong, .user-count strong, .log-count strong {
    color: var(--dark-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin-bottom: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-color);
}

.close-modal {
    color: #64748b;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: color var(--transition-speed);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
}

.close-modal:hover,
.close-modal:focus {
    color: var(--dark-color);
    background-color: #f1f5f9;
}

.modal-body {
    padding: 24px;
}

.warning-text {
    color: var(--danger-color);
    font-weight: 500;
    margin-top: 8px;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }
    
    .sidebar.active {
        transform: translateX(0);
        box-shadow: 4px 0 20px -5px rgba(0, 0, 0, 0.2);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        margin: 0 auto 16px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 260px;
    }
    
    .sidebar-overlay {
        z-index: 1099;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 16px;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 600px;
        font-size: 0.9rem;
    }
    
    table th,
    table td {
        padding: 10px 12px;
    }
    
    .top-bar {
        padding: 12px 15px;
    }
    
    .content-area {
        padding: 15px;
    }
    
    .schedule-summary {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 240px;
    }
    
    .sidebar-overlay {
        z-index: 1098;
    }
    
    .content-area {
        padding: 10px;
    }
    
    .card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .status {
        padding: 4px 8px;
        font-size: 0.75rem;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .card-title {
        font-size: 1.125rem;
    }
    
    .filter-grid {
        grid-template-columns: 1fr;
    }
}