    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
    
    :root {
        /* Color Theme - Dark Blue */
        --primary-dark: #1a237e;
        --primary-main: #283593;
        --primary-light: #3949ab;
        --primary-lighter: #5c6bc0;
        --accent: #00bcd4;
        --success: #4caf50;
        --warning: #ff9800;
        --error: #f44336;
        
        /* Neutral Colors */
        --white: #ffffff;
        --gray-50: #f8f9fa;
        --gray-100: #f5f5f5;
        --gray-200: #e0e0e0;
        --gray-300: #bdbdbd;
        --gray-600: #666666;
        --gray-800: #333333;
        --gray-900: #212121;
        
        /* Spacing */
        --spacing-xs: 0.25rem;
        --spacing-sm: 0.5rem;
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
        --spacing-2xl: 3rem;
        
        /* Border Radius */
        --radius-sm: 4px;
        --radius-md: 8px;
        --radius-lg: 12px;
        --radius-xl: 16px;
        --radius-round: 50%;
        
        /* Shadows */
        --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
        --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
        --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
        --shadow-xl: 0 20px 60px rgba(0,0,0,0.3);
        
        /* Transitions */
        --transition-fast: 0.2s ease;
        --transition-normal: 0.3s ease;
    }
    
    body {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        background: linear-gradient(135deg, var(--primary-main) 0%, var(--primary-dark) 100%);
        min-height: 100vh;
        padding: var(--spacing-xl) var(--spacing-md);
        color: var(--gray-800);
        line-height: 1.6;
    }
    
    /* Layout Container */
    .layout {
        max-width: 900px;
        margin: 0 auto;
        background: var(--white);
        border-radius: var(--radius-xl);
        box-shadow: var(--shadow-xl);
        overflow: hidden;
    }
    
    .layout-wide {
        max-width: 1200px;
    }
    
    /* Header Styles */
    .header {
        background: linear-gradient(135deg, var(--primary-main) 0%, var(--primary-dark) 100%);
        color: var(--white);
        padding: var(--spacing-xl);
        border-bottom: 4px solid rgba(255,255,255,0.2);
    }
    
    .header h1 {
        font-size: 2rem;
        font-weight: 700;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: var(--spacing-sm);
        margin: 0;
    }
    
    .header h2 {
        font-size: 1.5rem;
        font-weight: 600;
        margin: 0;
    }
    
    /* Navigation */
    .nav-top {
        margin-bottom: var(--spacing-md);
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }
    
    .nav-links {
        display: flex;
        gap: var(--spacing-lg);
        flex-wrap: wrap;
    }
    
    .nav-links a,
    .nav-top a {
        color: var(--white);
        text-decoration: none;
        transition: opacity var(--transition-fast);
    }
    
    .nav-links a:hover,
    .nav-top a:hover {
        opacity: 0.8;
    }
    
    /* Content Area */
    .content {
        padding: var(--spacing-xl);
    }
    
    /* Badges */
    .badge {
        display: inline-block;
        background: rgba(255,255,255,0.2);
        padding: 0.3rem 0.8rem;
        border-radius: 20px;
        font-size: 0.9rem;
        font-weight: 500;
    }
    
    .badge-success {
        background: var(--success);
        color: var(--white);
    }
    
    .badge-warning {
        background: var(--warning);
        color: var(--white);
    }
    
    /* Alerts & Messages */
    .note,
    .alert {
        padding: var(--spacing-md);
        border-radius: var(--radius-md);
        margin-bottom: var(--spacing-lg);
        border-left: 4px solid;
    }
    
    .note,
    .alert-success {
        background: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%);
        border-color: var(--success);
        font-weight: 500;
    }
    
    .alert-error {
        background: #ffebee;
        border-color: var(--error);
        color: #c62828;
    }
    
    .alert-warning {
        background: #fff3e0;
        border-color: var(--warning);
        color: #e65100;
    }
    
    .alert-info {
        background: #e3f2fd;
        border-color: var(--accent);
        color: #0277bd;
    }
    
    /* Form Sections */
    .form-section {
        background: var(--gray-50);
        padding: var(--spacing-lg);
        border-radius: var(--radius-lg);
        margin-bottom: var(--spacing-lg);
    }
    
    .form-section h2,
    .form-section h3 {
        color: var(--primary-main);
        margin-bottom: var(--spacing-md);
    }
    
    .form-section h2 {
        font-size: 1.3rem;
    }
    
    .form-section h3 {
        font-size: 1.1rem;
    }
    
    /* Form Elements */
    label {
        display: block;
        margin-top: var(--spacing-md);
        margin-bottom: 0.4rem;
        font-weight: 600;
        color: var(--gray-800);
    }
    
    label:first-of-type {
        margin-top: 0;
    }
    
    .small,
    .help-text {
        font-size: 0.85rem;
        color: var(--gray-600);
        margin-top: 0.3rem;
        display: block;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="url"],
    input[type="date"],
    textarea,
    select {
        width: 100%;
        padding: 0.75rem;
        border: 2px solid var(--gray-200);
        border-radius: var(--radius-md);
        font-family: inherit;
        font-size: 1rem;
        transition: all var(--transition-normal);
        background: var(--white);
    }
    
    input[type="text"]:focus,
    input[type="email"]:focus,
    input[type="password"]:focus,
    input[type="url"]:focus,
    input[type="date"]:focus,
    textarea:focus,
    select:focus {
        outline: none;
        border-color: var(--primary-main);
        box-shadow: 0 0 0 3px rgba(40, 53, 147, 0.1);
    }
    
    textarea {
        min-height: 120px;
        resize: vertical;
    }
    
    input[type="file"] {
        margin-top: var(--spacing-sm);
        padding: var(--spacing-sm);
        border: 2px dashed var(--gray-200);
        border-radius: var(--radius-md);
        width: 100%;
        cursor: pointer;
        transition: all var(--transition-normal);
    }
    
    input[type="file"]:hover {
        border-color: var(--primary-main);
        background: var(--gray-50);
    }
    
    .form-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-md);
        margin-top: var(--spacing-md);
    }
    
    @media (max-width: 600px) {
        .form-row {
            grid-template-columns: 1fr;
        }
    }
    
    /* Buttons */
    button,
    .btn {
        padding: var(--spacing-md) var(--spacing-xl);
        border: none;
        border-radius: var(--radius-md);
        background: linear-gradient(135deg, var(--primary-main) 0%, var(--primary-dark) 100%);
        color: var(--white);
        font-weight: 600;
        font-size: 1rem;
        cursor: pointer;
        transition: all var(--transition-normal);
        box-shadow: 0 4px 12px rgba(40, 53, 147, 0.3);
        display: inline-block;
        text-decoration: none;
        text-align: center;
    }
    
    button:hover,
    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(40, 53, 147, 0.4);
    }
    
    button:active,
    .btn:active {
        transform: translateY(0);
    }
    
    button:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }
    
    .btn-secondary {
        background: var(--gray-600);
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }
    
    .btn-secondary:hover {
        box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    }
    
    .btn-success {
        background: linear-gradient(135deg, #66bb6a 0%, #43a047 100%);
        box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    }
    
    .btn-danger {
        background: linear-gradient(135deg, #ef5350 0%, #e53935 100%);
        box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
    }
    
    .btn-small {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Cards */
    .card {
        background: var(--white);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-md);
        padding: var(--spacing-lg);
        margin-bottom: var(--spacing-lg);
        transition: all var(--transition-normal);
    }
    
    .card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
    }
    
    .card h3 {
        color: var(--primary-main);
        margin-bottom: var(--spacing-sm);
    }
    
    /* Tables */
    table {
        width: 100%;
        border-collapse: collapse;
        margin: var(--spacing-lg) 0;
    }
    
    th {
        background: var(--gray-100);
        padding: var(--spacing-md);
        text-align: left;
        font-weight: 600;
        border-bottom: 2px solid var(--gray-300);
    }
    
    td {
        padding: var(--spacing-md);
        border-bottom: 1px solid var(--gray-200);
    }
    
    tr:hover {
        background: var(--gray-50);
    }
    
    /* Preview Images */
    .preview-img {
        max-width: 300px;
        display: block;
        margin-top: var(--spacing-sm);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-md);
    }
    
    /* Links */
    a {
        color: var(--primary-main);
        text-decoration: none;
        transition: color var(--transition-fast);
    }
    
    a:hover {
        color: var(--primary-light);
    }
    
    .link {
        color: var(--primary-main);
        text-decoration: none;
        font-weight: 500;
        transition: color var(--transition-fast);
    }
    
    .link:hover {
        color: var(--primary-light);
        text-decoration: underline;
    }
    
    /* Button Alias */
    .button {
        padding: var(--spacing-md) var(--spacing-xl);
        border: none;
        border-radius: var(--radius-md);
        background: linear-gradient(135deg, var(--primary-main) 0%, var(--primary-dark) 100%);
        color: var(--white);
        font-weight: 600;
        font-size: 1rem;
        cursor: pointer;
        transition: all var(--transition-normal);
        box-shadow: 0 4px 12px rgba(40, 53, 147, 0.3);
        display: inline-block;
        text-decoration: none;
        text-align: center;
    }
    
    .button:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(40, 53, 147, 0.4);
        color: var(--white);
    }
    
    .button:active {
        transform: translateY(0);
    }
    
    /* Badge Variants */
    .badge-admin {
        background: var(--primary-main);
        color: var(--white);
        padding: 0.3rem 0.8rem;
        border-radius: 20px;
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .badge-active {
        background: var(--success);
        color: var(--white);
        padding: 0.3rem 0.8rem;
        border-radius: 20px;
        font-size: 0.85rem;
        font-weight: 500;
    }
    
    .badge-inactive {
        background: var(--gray-300);
        color: var(--gray-800);
        padding: 0.3rem 0.8rem;
        border-radius: 20px;
        font-size: 0.85rem;
        font-weight: 500;
    }
    
    /* Empty State */
    .empty-state {
        text-align: center;
        padding: var(--spacing-2xl);
        background: var(--white);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-md);
    }
    
    .empty-state-icon {
        font-size: 4rem;
        margin-bottom: var(--spacing-lg);
        opacity: 0.5;
    }
    
    .empty-state h2 {
        color: var(--gray-800);
        margin-bottom: var(--spacing-md);
    }
    
    .empty-state p {
        color: var(--gray-600);
        margin-bottom: var(--spacing-lg);
    }
    
    /* Utility Classes */
    .text-center { text-align: center; }
    .text-right { text-align: right; }
    .mt-1 { margin-top: var(--spacing-md); }
    .mt-2 { margin-top: var(--spacing-lg); }
    .mb-1 { margin-bottom: var(--spacing-md); }
    .mb-2 { margin-bottom: var(--spacing-lg); }
    
    /* Auth Pages (Login, Register, Forgot Password, Reset Password) */
    .login-box,
    .register-box,
    .forgot-box,
    .reset-box {
        max-width: 420px;
        width: 100%;
        padding: 2.5rem;
        background: var(--white);
        border-radius: 12px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.15);
        margin: 0 auto;
    }
    
    .login-box h1,
    .register-box h1,
    .forgot-box h1,
    .reset-box h1 {
        margin: 0 0 0.5rem 0;
        color: var(--gray-800);
        font-size: 1.75rem;
    }
    
    .subtitle {
        color: var(--gray-600);
        margin-bottom: 2rem;
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .password-hint {
        font-size: 0.8rem;
        color: var(--gray-600);
        margin-top: -1rem;
        margin-bottom: 1rem;
    }
    
    .links {
        margin-top: 1.5rem;
        text-align: center;
        font-size: 0.9rem;
    }
    
    .links a {
        color: var(--primary-main);
        text-decoration: none;
    }
    
    .links a:hover {
        text-decoration: underline;
    }
    
    .error {
        background: #fee;
        color: #c33;
        padding: 0.875rem;
        border-radius: 6px;
        margin-bottom: 1.25rem;
        border: 1px solid #fcc;
    }
    
    .success {
        background: #efe;
        color: #363;
        padding: 0.875rem;
        border-radius: 6px;
        margin-bottom: 1.25rem;
        border: 1px solid #cec;
    }
    
    .icon {
        font-size: 3rem;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    /* Center auth pages */
    body:has(.login-box),
    body:has(.register-box),
    body:has(.forgot-box),
    body:has(.reset-box) {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
    }
    
    /* Calendar Editor Styles */
    body:has(.sidebar) {
        display: flex;
        height: 100vh;
        padding: 0;
    }
    
    .sidebar {
        width: 380px;
        background: white;
        border-right: 1px solid var(--gray-200);
        display: flex;
        flex-direction: column;
        box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    }
    
    .sidebar-header {
        padding: 20px;
        background: linear-gradient(135deg, var(--primary-main) 0%, var(--primary-dark) 100%);
        color: white;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .sidebar-header h2 {
        font-size: 1.5rem;
        font-weight: 600;
        margin-bottom: 12px;
    }
    
    .sidebar-header .nav-links a {
        color: rgba(255,255,255,0.9);
        text-decoration: none;
        font-size: 13px;
        padding: 6px 12px;
        border-radius: 6px;
        background: rgba(255,255,255,0.15);
        transition: background 0.2s;
    }
    
    .sidebar-header .nav-links a:hover {
        background: rgba(255,255,255,0.25);
    }
    
    .sidebar-tabs {
        display: flex;
        background: var(--gray-100);
        border-bottom: 1px solid var(--gray-200);
    }
    
    .tab-button {
        flex: 1;
        padding: 15px;
        background: none;
        border: none;
        border-bottom: 3px solid transparent;
        font-weight: 600;
        font-size: 14px;
        color: var(--gray-600);
        cursor: pointer;
        transition: all 0.2s;
    }
    
    .tab-button:hover {
        background: var(--gray-50);
        color: var(--gray-800);
    }
    
    .tab-button.active {
        background: white;
        color: var(--primary-main);
        border-bottom-color: var(--primary-main);
    }
    
    .sidebar-content {
        flex: 1;
        overflow-y: auto;
        padding: 25px;
    }
    
    .tab-content {
        display: none;
    }
    
    .tab-content.active {
        display: block;
    }
    
    .days-list {
        margin: 0;
        padding: 0;
    }
    
    .day-list-item {
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 12px 15px;
        background: var(--gray-50);
        border: 1px solid var(--gray-200);
        border-radius: 8px;
        margin-bottom: 8px;
        transition: all 0.2s;
    }
    
    .day-list-item:hover {
        background: white;
        border-color: var(--primary-light);
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    
    .day-list-item .day-number {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--primary-main);
        min-width: 50px;
        text-align: center;
        background: white;
        border-radius: 8px;
        padding: 8px;
        border: 2px solid var(--primary-light);
    }
    
    .day-info {
        flex: 1;
        min-width: 0;
    }
    
    .day-title {
        font-weight: 600;
        color: var(--gray-800);
        margin-bottom: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .day-status {
        font-size: 12px;
        color: var(--gray-500);
    }
    
    .day-edit-btn {
        padding: 8px 16px;
        background: var(--primary-main);
        color: white;
        border: none;
        border-radius: 6px;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        text-decoration: none;
        transition: all 0.2s;
        white-space: nowrap;
    }
    
    .day-edit-btn:hover {
        background: var(--primary-dark);
        color: white;
        transform: translateX(2px);
    }
    
    .editor-section {
        flex: 1;
        display: flex;
        flex-direction: column;
        background: var(--gray-100);
    }
    
    .main {
        flex: 1;
        display: flex;
        flex-direction: column;
        background: var(--gray-100);
        overflow: hidden;
    }
    
    .main-header {
        background: white;
        padding: 25px 30px;
        border-bottom: 1px solid var(--gray-200);
        box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }
    
    .main-header h2 {
        font-size: 1.75rem;
        color: var(--gray-900);
        font-weight: 700;
        margin: 0;
    }
    
    .main-header p {
        font-size: 14px;
        color: var(--gray-600);
        margin: 8px 0 0 0;
    }
    
    .main-content {
        flex: 1;
        overflow-y: auto;
        padding: 25px 30px;
    }
    
    .instruction-box {
        background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
        border: 2px solid #0ea5e9;
        border-radius: 12px;
        padding: 20px;
        margin-bottom: 25px;
        display: flex;
        gap: 15px;
        align-items: flex-start;
        box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
    }
    
    .instruction-icon {
        font-size: 28px;
        line-height: 1;
        flex-shrink: 0;
    }
    
    .instruction-text h4 {
        font-size: 16px;
        font-weight: 700;
        color: #0c4a6e;
        margin: 0 0 8px 0;
    }
    
    .instruction-text p {
        font-size: 14px;
        color: #0c4a6e;
        line-height: 1.6;
        margin: 0;
    }
    
    .editor-controls {
        padding: 20px 25px;
        background: white;
        border-bottom: 1px solid var(--gray-200);
    }
    
    .door-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
        margin-top: 12px;
    }
    
    .door-grid-item {
        background: var(--gray-50);
        border: 2px solid var(--gray-200);
        border-radius: 8px;
        padding: 12px;
        display: flex;
        flex-direction: column;
        gap: 8px;
        transition: all 0.2s;
    }
    
    .door-grid-item.has-door {
        background: #ecfdf5;
        border-color: #10b981;
    }
    
    .door-grid-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .door-grid-number {
        font-weight: 600;
        color: var(--gray-800);
        font-size: 14px;
    }
    
    .door-grid-actions {
        display: flex;
        gap: 6px;
    }
    
    .btn-grid-action {
        flex: 1;
        padding: 6px 10px;
        border: none;
        border-radius: 6px;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.2s;
        white-space: nowrap;
    }
    
    .btn-grid-action.btn-delete {
        flex: none;
    }
    
    .btn-draw {
        background: var(--primary-main);
        color: white;
        padding: 0;
        width: 24px;
        height: 24px;
        border-radius: 4px;
        font-size: 14px;
        flex: none;
    }
    
    .btn-draw:hover {
        background: var(--primary-dark);
        transform: scale(1.1);
    }
    
    .btn-draw:disabled {
        background: var(--gray-300);
        cursor: not-allowed;
        transform: none;
    }
    
    .btn-delete {
        background: #ef4444;
        color: white;
        padding: 0;
        width: 24px;
        height: 24px;
        border-radius: 4px;
        font-size: 18px;
        font-weight: bold;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }
    
    .btn-delete:hover {
        background: #dc2626;
        transform: scale(1.1);
    }
    
    .draw-mode-notice {
        background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
        border: 2px solid #f59e0b;
        border-radius: 8px;
        padding: 12px 16px;
        margin-bottom: 15px;
        display: none;
        align-items: center;
        gap: 10px;
        font-weight: 600;
        color: #92400e;
    }
    
    .draw-mode-notice.active {
        display: flex;
    }
    
    .draw-mode-notice button {
        margin-left: auto;
        padding: 4px 12px;
        background: white;
        border: 1px solid #f59e0b;
        border-radius: 6px;
        font-size: 12px;
        cursor: pointer;
        color: #92400e;
        font-weight: 600;
    }
    
    .draw-mode-notice button:hover {
        background: #fef3c7;
    }
    
    .bg-editor {
        position: relative;
        margin-top: 20px;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 4px 20px rgba(0,0,0,0.15);
        background: #000;
        cursor: crosshair;
    }
    
    .bg-editor img {
        display: block;
        width: 100%;
        height: auto;
        user-select: none;
        -webkit-user-drag: none;
    }
    
    .door-outline {
        position: absolute;
        border: 3px solid #10b981;
        background: rgba(16, 185, 129, 0.2);
        cursor: move;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 24px;
        color: white;
        text-shadow: 0 2px 4px rgba(0,0,0,0.5);
        transition: border-color 0.2s, background 0.2s;
    }
    
    .door-outline:hover {
        border-color: #059669;
        background: rgba(16, 185, 129, 0.3);
    }
    
    .door-outline.dragging {
        opacity: 0.7;
        z-index: 1000;
    }
    
    .door-outline.selected {
        border-color: #3b82f6;
        background: rgba(59, 130, 246, 0.2);
        box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
    }
    
    .resize-handle {
        position: absolute;
        width: 12px;
        height: 12px;
        background: white;
        border: 2px solid #10b981;
        border-radius: 50%;
        z-index: 10;
    }
    
    .resize-handle.nw { top: -6px; left: -6px; cursor: nw-resize; }
    .resize-handle.ne { top: -6px; right: -6px; cursor: ne-resize; }
    .resize-handle.sw { bottom: -6px; left: -6px; cursor: sw-resize; }
    .resize-handle.se { bottom: -6px; right: -6px; cursor: se-resize; }
    
    .door-outline:not(:hover) .resize-handle {
        display: none;
    }
    
    .door-label {
        pointer-events: none;
        user-select: none;
    }
    
    /* Responsive */
    @media (max-width: 768px) {
        body {
            padding: var(--spacing-md) var(--spacing-sm);
        }
        
        .header {
            padding: var(--spacing-lg);
        }
        
        .header h1 {
            font-size: 1.5rem;
        }
        
        .content {
            padding: var(--spacing-lg);
        }
        
        .nav-top {
            flex-direction: column;
            align-items: flex-start;
        }
    }
