/* PMS Professional Dashboard - Premium Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Premium Color Palette */
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.1);
    --secondary-color: #64748b;

    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Premium Backgrounds */
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-sidebar: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    --bg-hover: rgba(99, 102, 241, 0.04);
    --bg-secondary: #f1f5f9;

    /* Text Colors */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-white: #ffffff;

    /* Borders & Shadows */
    --border-color: #e2e8f0;
    --border-light: rgba(0, 0, 0, 0.05);
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* 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: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.5rem;
}

h3 {
    font-size: 1.25rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-hover);
}

/* Premium Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-xl);
    border: 1px solid var(--border-color);
    transition: box-shadow var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.text-muted {
    color: var(--text-muted);
}

/* Premium Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    gap: 6px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn:hover::before {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: var(--text-white);
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-block {
    width: 100%;
}

/* Premium Forms */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all var(--transition-fast);
    background: var(--bg-card);
    color: var(--text-primary);
}

.form-control:hover {
    border-color: #cbd5e1;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Premium Tables */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-lg);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    background: var(--bg-secondary);
}

.table th:first-child {
    border-radius: var(--radius-md) 0 0 0;
}

.table th:last-child {
    border-radius: 0 var(--radius-md) 0 0;
}

.table tbody tr {
    transition: background var(--transition-fast);
}

.table tbody tr:hover {
    background: var(--bg-hover);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Premium Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    letter-spacing: 0.01em;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.badge-secondary {
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.badge-primary {
    background: var(--primary-light);
    color: var(--primary-color);
}

/* Layout */
.layout {
    display: flex;
    height: 100vh;
}

/* Premium Sidebar - ENHANCED SIZE */
.sidebar {
    width: 320px;
    background: var(--bg-sidebar);
    color: var(--text-white);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: radial-gradient(ellipse at top left, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.sidebar-header {
    padding: 24px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 1;
}

.sidebar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 14px;
    letter-spacing: -0.01em;
}

.sidebar-brand .material-icons-outlined {
    font-size: 36px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    list-style: none;
    padding: var(--spacing-lg) 0;
    flex-grow: 1;
    position: relative;
    z-index: 1;
}

.nav-item {
    margin: 6px 18px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 22px;
    color: rgba(255, 255, 255, 0.65);
    transition: all var(--transition-fast);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-size: 1.125rem;
    font-weight: 500;
}

.nav-link .material-icons-outlined {
    font-size: 28px;
    opacity: 0.75;
    transition: opacity var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.nav-link:hover .material-icons-outlined {
    opacity: 1;
}

.nav-link.active {
    color: var(--text-white);
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.3) 0%, rgba(99, 102, 241, 0.15) 100%);
    border-left: 4px solid var(--primary-color);
    padding-left: 18px;
    /* 22px original - 4px border */
}

.nav-link.active .material-icons-outlined {
    color: #a5b4fc;
    opacity: 1;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background: var(--bg-body);
}

.top-bar {
    background: var(--bg-card);
    padding: 16px var(--spacing-xl);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.top-bar h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    background: var(--bg-secondary);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.user-profile:hover {
    background: var(--border-color);
}

.page-content {
    padding: var(--spacing-xl);
    max-width: 100%;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.stat-card {
    background: var(--bg-card);
    padding: var(--spacing-xl);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-light) 0%, transparent 60%);
    border-radius: 0 var(--radius-xl) 0 100%;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-title {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Selection */
::selection {
    background: var(--primary-light);
    color: var(--primary-hover);
}

/* Focus Visible */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ========================================
   RESPONSIVE DESIGN (Mobile/Tablet)
   ======================================== */

/* Mobile Menu Button (Hidden on Desktop) */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    margin-right: 12px;
}

.mobile-menu-btn:hover {
    background: var(--bg-hover);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Tablet Breakpoint (Sidebar collapsible) */
@media (max-width: 1200px) {
    .sidebar {
        width: 260px;
    }
}

/* Mobile Layout (< 1024px) */
@media (max-width: 1024px) {
    .layout {
        position: relative;
    }

    /* Sidebar - Off-Canvas */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 280px !important;
        z-index: 1000;
        transform: translateX(-100%);
        box-shadow: var(--shadow-xl);
        background: var(--bg-sidebar);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar-header {
        padding: 20px !important;
    }

    .sidebar-toggle {
        display: none !important;
    }

    /* Main Content */
    .main-content {
        width: 100%;
        margin-left: 0 !important;
    }

    /* Top Bar */
    .top-bar {
        padding: 12px 16px;
    }

    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-menu-btn .material-icons-outlined {
        font-size: 24px;
        color: var(--text-primary);
    }

    /* Page Content */
    .page-content {
        padding: 16px;
    }

    /* General Typography Scaling */
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1.125rem;
    }

    /* Tables */
    .table th,
    .table td {
        padding: 12px 10px;
        white-space: nowrap;
    }

    .table-responsive {
        border-radius: var(--radius-md);
        border: 1px solid var(--border-color);
        margin-bottom: 20px;
    }

    /* Forms & Grid */
    .form-row,
    .row {
        flex-direction: column;
        gap: 16px !important;
    }

    .col-md-6,
    .half {
        width: 100%;
        flex: auto;
    }

    .border-right {
        border-right: none !important;
        border-bottom: 1px solid var(--border-color);
        padding-right: 0 !important;
        padding-bottom: 16px;
        margin-bottom: 16px;
    }

    /* Modals */
    .modal-dialog {
        width: 95% !important;
        margin: 10px auto;
    }

    .modal-content {
        max-height: 85vh;
    }

    /* Button Full Width on Mobile */
    .btn {
        width: 100%;
        justify-content: center;
        margin-bottom: 8px;
    }

    .btn:last-child {
        margin-bottom: 0;
    }

    /* Reservations Toolbar Stack */
    .reservations-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px;
    }

    .toolbar-left,
    .toolbar-right {
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .search-box {
        width: 100% !important;
    }

    .status-filter {
        width: 100%;
    }

    .status-filter select {
        width: 100%;
    }

    /* Guest Badge Mobile */
    .guest-cell {
        gap: 8px;
    }

    .avatar-placeholder {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}