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

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.login-container {
    width: 100%;
    max-width: 340px;
    padding: 12px;
}

.login-box {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.login-box h1 {
    font-size: 18px;
    margin-bottom: 4px;
    color: var(--primary);
    text-align: center;
}

.login-box h2 {
    font-size: 14px;
    margin-bottom: 16px;
    color: var(--text-light);
    text-align: center;
}

.navbar {
    background: var(--bg-card);
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.nav-brand {
    font-weight: 600;
    font-size: 14px;
    color: var(--primary);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.card {
    background: var(--bg-card);
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.card h2 {
    font-size: 14px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    font-size: 12px;
    color: var(--text);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.help-text {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 2px;
}

.btn {
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
}

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

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

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

.btn-small {
    padding: 5px 10px;
    font-size: 11px;
}

.btn:hover {
    opacity: 0.9;
}

.alert {
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 12px;
}

.alert-error {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
}

.alert-success {
    background: #f0fdf4;
    color: var(--success);
    border: 1px solid #bbf7d0;
}

.table-container {
    overflow-x: auto;
}

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

.data-table th,
.data-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
}

.data-table th {
    background: var(--bg);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-light);
}

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

.badge {
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}

.badge-success {
    background: #d1fae5;
    color: var(--success);
}

.badge-inactive {
    background: #f1f5f9;
    color: var(--secondary);
}

.mt-2 {
    margin-top: 16px;
}

.page-header {
    margin-bottom: 16px;
}

.page-header h1 {
    font-size: 20px;
    margin-bottom: 4px;
}

.page-header p {
    font-size: 12px;
    color: var(--text-light);
}

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

.modal-content {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 8px;
    max-width: 450px;
    width: 90%;
    position: relative;
    animation: modalSlide 0.2s ease;
}

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

.modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-light);
}

.modal-close:hover {
    color: var(--text);
}

.modal-content h2 {
    font-size: 15px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.slot-details {
    background: var(--bg);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.detail-item {
    padding: 6px 8px;
    background: white;
    border-radius: 4px;
    font-size: 12px;
}

.detail-item.highlight {
    grid-column: span 2;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.detail-item.full-width {
    grid-column: span 2;
}

.detail-label {
    display: block;
    font-size: 10px;
    color: var(--text-light);
    text-transform: uppercase;
    margin-bottom: 2px;
}

.detail-value {
    display: block;
    font-weight: 600;
    font-size: 13px;
}

.info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.info-box h4 {
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 2px;
}

.info-box p {
    font-weight: 600;
    font-size: 13px;
    color: var(--primary);
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.btn-full {
    width: 100%;
    text-align: center;
}

.modal-small {
    max-width: 340px;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-group .btn {
    flex: 1;
    min-width: 120px;
}

.row-inactive {
    background: #f8f8f8;
    color: #999;
}

.row-inactive td {
    color: #999;
}

.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .navbar {
        padding: 8px 12px;
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .nav-brand {
        font-size: 13px;
    }
    
    .nav-user {
        flex-direction: column;
        gap: 6px;
    }
    
    .page-header h1 {
        font-size: 18px;
    }
    
    .card {
        padding: 12px;
    }
    
    .card h2 {
        font-size: 13px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }
    
    .section-header .btn {
        width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        margin: 0 -12px;
        padding: 0 12px;
        overflow-x: auto;
    }
    
    .data-table {
        font-size: 11px;
        min-width: 500px;
    }
    
    .data-table th,
    .data-table td {
        padding: 6px 8px;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    .btn-group .btn {
        width: 100%;
    }
    
    .modal-content {
        padding: 16px;
        margin: 10px;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-item.highlight {
        grid-column: span 1;
    }
    
    .btn {
        padding: 10px 14px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 8px;
    }
    
    .login-box {
        padding: 16px;
    }
    
    .login-box h1 {
        font-size: 16px;
    }
    
    .card {
        padding: 10px;
    }
    
    .data-table th,
    .data-table td {
        padding: 6px 4px;
        font-size: 10px;
    }
    
    .badge {
        padding: 2px 4px;
        font-size: 10px;
    }
    
    .desktop-only {
        display: none;
    }
    
    .mobile-only {
        display: block;
    }
    
    .cards-container {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .slot-card,
    .booking-card {
        background: white;
        border: 1px solid var(--border);
        border-radius: 6px;
        overflow: hidden;
    }
    
    .slot-card.card-inactive {
        opacity: 0.7;
        background: #f8f8f8;
    }
    
    .slot-card-header,
    .booking-card-header {
        background: var(--bg);
        padding: 8px 10px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid var(--border);
    }
    
    .slot-card-date,
    .booking-card-date {
        font-weight: 600;
        font-size: 12px;
    }
    
    .booking-card-time {
        font-size: 11px;
        color: var(--text-light);
    }
    
    .slot-card-body,
    .booking-card-body {
        padding: 8px 10px;
    }
    
    .slot-card-row,
    .booking-card-row {
        display: flex;
        justify-content: space-between;
        padding: 2px 0;
        font-size: 11px;
    }
    
    .slot-card-label,
    .booking-card-label {
        color: var(--text-light);
    }
    
    .slot-card-footer,
    .booking-card-footer {
        padding: 8px 10px;
        border-top: 1px solid var(--border);
    }
    
    .text-muted {
        color: var(--text-light);
        font-size: 11px;
    }
    
    .no-data {
        text-align: center;
        color: var(--text-light);
        padding: 12px;
        font-size: 12px;
    }
    
    .modal-content {
        padding: 12px;
    }
    
    .modal-close {
        top: 8px;
        right: 10px;
        font-size: 18px;
    }
}

.change-password-container {
    max-width: 400px;
    margin: 0 auto;
}

.change-password-container .card {
    width: 100%;
}

.change-password-container .form-group:last-of-type {
    margin-bottom: 16px;
}

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

.section-header h2 {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.btn-pdf {
    background: #059669;
}

.btn-pdf:hover {
    background: #047857;
}
