/* =============================================================
   OtelSistem — Dark Premium Theme
   ============================================================= */

/* Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

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

:root {
    --dark-900: #0f172a;
    --dark-800: #1e293b;
    --dark-700: #334155;
    --dark-600: #475569;
    --accent: #6366f1;
    --accent-light: #818cf8;
    --accent-dark: #4f46e5;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--dark-900);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* =========================================================
   GLASS CARD
   ========================================================= */
.glass-card {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.3);
    backdrop-filter: blur(8px);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.glass-card:hover {
    border-color: rgba(99, 102, 241, 0.2);
}

/* =========================================================
   SIDEBAR NAV
   ========================================================= */
.sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(71,85,105,0.5) transparent;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.15s ease;
    margin-bottom: 2px;
}
.nav-item:hover {
    background: rgba(99, 102, 241, 0.08);
    color: #e2e8f0;
}
.nav-active {
    background: rgba(99, 102, 241, 0.15) !important;
    color: var(--accent-light) !important;
    border-left: 3px solid var(--accent);
}

/* =========================================================
   FORM ELEMENTS
   ========================================================= */
.form-input {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(71, 85, 105, 0.6);
    border-radius: 10px;
    padding: 10px 14px;
    color: #f1f5f9;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: 'Inter', sans-serif;
}
.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.form-input::placeholder { color: #475569; }
.form-input option { background: #1e293b; color: #f1f5f9; }

select.form-input { cursor: pointer; }
textarea.form-input { resize: vertical; }

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 6px;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 4px 15px rgba(99,102,241,0.35); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 10px;
    background: rgba(71, 85, 105, 0.3);
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid rgba(71, 85, 105, 0.4);
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}
.btn-secondary:hover { background: rgba(71, 85, 105, 0.5); color: #e2e8f0; }

/* Demo login buttons */
.demo-btn {
    padding: 6px 4px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid;
    transition: all 0.15s ease;
    text-align: center;
    width: 100%;
}

/* =========================================================
   STATUS BADGES
   ========================================================= */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.status-pending    { background: rgba(245,158,11,0.12); color: #f59e0b; border: 1px solid rgba(245,158,11,0.25); }
.status-inprogress { background: rgba(99,102,241,0.12); color: #818cf8; border: 1px solid rgba(99,102,241,0.25); }
.status-completed  { background: rgba(16,185,129,0.12); color: #10b981; border: 1px solid rgba(16,185,129,0.25); }
.status-cancelled  { background: rgba(239,68,68,0.12);  color: #ef4444; border: 1px solid rgba(239,68,68,0.25); }

/* =========================================================
   MODALS
   ========================================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeInOverlay 0.2s ease;
}
.modal-overlay.hidden { display: none; }

.modal-box {
    background: #1e293b;
    border: 1px solid rgba(71, 85, 105, 0.5);
    border-radius: 20px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    animation: slideUp 0.25s ease;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(71, 85, 105, 0.3);
}
.modal-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(71, 85, 105, 0.3);
    color: #94a3b8;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}
.modal-close-btn:hover { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid rgba(71, 85, 105, 0.3);
    flex-wrap: wrap;
}

/* =========================================================
   TAB BUTTONS (Staff Panel)
   ========================================================= */
.tab-btn {
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.tab-btn:hover { color: #94a3b8; }
.tab-active {
    background: rgba(99, 102, 241, 0.15) !important;
    color: #818cf8 !important;
}

/* =========================================================
   TOAST NOTIFICATIONS
   ========================================================= */
.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 14px;
    font-size: 0.875rem;
    font-weight: 500;
    pointer-events: all;
    max-width: 360px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    border: 1px solid;
    animation: slideInRight 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(8px);
}
.toast-success { background: rgba(16,185,129,0.15); border-color: rgba(16,185,129,0.3); color: #10b981; }
.toast-error   { background: rgba(239,68,68,0.15);  border-color: rgba(239,68,68,0.3);  color: #ef4444; }
.toast-info    { background: rgba(99,102,241,0.15); border-color: rgba(99,102,241,0.3); color: #818cf8; }
.toast-warning { background: rgba(245,158,11,0.15); border-color: rgba(245,158,11,0.3); color: #f59e0b; }
.toast-exit {
    animation: slideOutRight 0.3s ease forwards;
}

/* =========================================================
   ANIMATIONS
   ========================================================= */
@keyframes fadeInOverlay {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideOutRight {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(40px); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeIn 0.6s ease; }

/* =========================================================
   SCROLLBAR
   ========================================================= */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(71, 85, 105, 0.6); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99, 102, 241, 0.5); }

/* =========================================================
   VALIDATION ERRORS
   ========================================================= */
.text-danger { color: var(--danger); }
.field-validation-error { color: var(--danger); font-size: 0.75rem; margin-top: 4px; }
.input-validation-error { border-color: var(--danger) !important; }

/* =========================================================
   RESPONSIVE SIDEBAR
   ========================================================= */
@media (max-width: 1023px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
}

/* =========================================================
   SELECTION
   ========================================================= */
::selection { background: rgba(99, 102, 241, 0.3); color: white; }