:root {
    --sidebar-width: 280px;
    --primary-color: #F97316;
    /* Orange brand color */
    --primary-hover: #EA580C;
    --primary-soft: rgba(249, 115, 22, 0.1);
    --bg-color: #F8FAFC;
    --card-bg: #FFFFFF;
    --sidebar-bg: #0F172A;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    --accent-blue: #3B82F6;
    --accent-green: #10B981;
    --accent-red: #EF4444;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);

    /* Premium Gradients */
    --grad-primary: linear-gradient(135deg, #F97316 0%, #FB923C 100%);
    --grad-blue: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%);
    --grad-green: linear-gradient(135deg, #10B981 0%, #34D399 100%);
    --grad-red: linear-gradient(135deg, #EF4444 0%, #F87171 100%);
    --grad-purple: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 100%);
    --grad-dark: linear-gradient(135deg, #1E293B 0%, #334155 100%);

    /* Enhanced Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    display: flex;
    min-height: 100vh;
    background: var(--bg-color);
    margin: 0;
    font-family: 'Outfit', 'Inter', -apple-system, sans-serif;
    color: var(--text-main);
    overflow-x: hidden;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    backdrop-filter: blur(12px);
    color: white;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1100;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0;      /* margin controlled by sidebar-top wrapper */
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.02em;
}

.sidebar-brand img {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
}

/* sidebar-top: wraps brand + close button; owns the bottom spacing */
.sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3rem;
}

.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-links li {
    margin-bottom: 0.5rem;
}

.nav-links a {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.25rem;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.9375rem;
    gap: 1rem;
    white-space: nowrap;
    overflow: hidden;
}

.nav-links a span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-links a i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.nav-links a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 10px 20px -5px rgba(249, 115, 22, 0.4);
}

.sidebar-footer {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
}

/* Main Content area */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: clamp(1.5rem, 3vw, 2.5rem);
    padding-left: clamp(1.25rem, 4vw, 2.5rem);
    padding-right: clamp(1.25rem, 4vw, 2.5rem);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    transition: all 0.4s ease;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.page-title h1 {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0;
    letter-spacing: -0.025em;
}

.page-title p {
    color: var(--text-muted);
    margin: 0.5rem 0 0 0;
}

/* Glass Cards */
.card {
    background: var(--card-bg);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 10px 15px -3px rgba(0, 0, 0, 0.03);
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
}

/* Table Design */
.table-container {
    background: white;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-top: 1rem;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background: #F8FAFC;
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9375rem;
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: #FBFDFF;
}

/* Buttons */
.btn {
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(249, 115, 22, 0.2);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(249, 115, 22, 0.3);
}

.btn-outline {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--bg-color);
    border-color: #cbd5e1;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

/* Badges */
.status-badge {
    padding: 0.375rem 0.875rem;
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.status-pending {
    background: #FEF3C7;
    color: #B45309;
}

.status-confirmed {
    background: #D1FAE5;
    color: #065F46;
}

.status-cancelled {
    background: #FEE2E2;
    color: #B91C1C;
}

.status-completed {
    background: #DBEAFE;
    color: #1E40AF;
}

/* Dashboard Widgets */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0.5rem 0;
}

/* Login Overlay - Premium Glassmorphism */
#loginOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: 32px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.login-card h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 2rem;
    margin-bottom: 2.5rem;
    letter-spacing: -0.025em;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

.form-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: #F8FAFC;
    transition: all 0.2s;
    font-size: 1rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px var(--primary-soft);
}

/* Inventory Cards */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.inventory-card {
    background: white;
    border-radius: 24px;
    padding: 1.75rem;
    border: 1px solid var(--border-color);
    position: relative;
    display: flex;
    flex-direction: column;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.inventory-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-soft);
}

.inventory-card.low-stock {
    border-color: #FECACA;
    background: linear-gradient(to bottom right, #FFFFFF, #FFFBFB);
    box-shadow: 0 10px 15px -3px rgba(239, 68, 68, 0.05);
}

.inventory-qty-control {
    display: flex;
    align-items: center;
    background: #F8FAFC;
    border-radius: 14px;
    padding: 6px;
    width: fit-content;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
}

.inventory-qty-input {
    width: 60px;
    border: none;
    background: transparent;
    text-align: center;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text-main);
}

.inventory-qty-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: white;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-main);
}

.inventory-qty-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.inventory-qty-btn:active {
    transform: scale(0.95);
}

/* Modal Styling */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    z-index: 2100;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow-y: auto;
}

.modal-content,
.modal-card {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 760px;
    max-height: 90vh;
    padding: 1.75rem;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Modal size variants */
.max-w-lg {
    max-width: 760px;
}

.max-w-md {
    max-width: 512px;
}

.max-w-sm {
    max-width: 384px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.progress-container {
    height: 10px;
    background: #F1F5F9;
    border-radius: 5px;
    overflow: hidden;
    margin: 1.5rem 0;
}

/* Utilities */
.hidden {
    display: none !important;
}

.flex {
    display: flex !important;
}

.opacity-50 {
    opacity: 0.5;
}

/* Tab System */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
    display: block !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Grid & Layout Utilities */
.stat-grid,
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.bi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Room Management Grid */
.room-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.room-type-card {
    background: white;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
}

.room-type-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-soft);
}

.room-type-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.room-type-card:hover img {
    transform: scale(1.05);
}

.room-type-card .details {
    padding: 1.5rem;
    flex-grow: 1;
}

.room-type-card .footer {
    padding: 1.25rem 1.5rem;
    background: #F8FAFC;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Status Dot */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

/* Modern Typography Utilities */
.text-overline {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

/* Tab Content Animation */
.tab-content {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Premium Chart Container */
.chart-card {
    background: white;
    padding: 2rem;
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.chart-card h3 {
    margin-top: 0;
    margin-bottom: 2rem;
    font-size: 1.125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Custom Scrollbar for modern look */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* Specific Badge improvements */
.badge-cleaning {
    background: #DBEAFE;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
}

.badge-repair {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.badge-maintenance {
    background: #DCFCE7;
    color: #166534;
    border: 1px solid #BBF7D0;
}

.badge-other {
    background: #F1F5F9;
    color: #475569;
    border: 1px solid #E2E8F0;
}

/* Specialized Badges */
.status-badge-blue {
    background: #DBEAFE;
    color: #1E40AF;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Table Hover Interactions */
.hover-row:hover {
    background-color: #F8FAFC !important;
    transform: scale(1.002);
    box-shadow: inset 4px 0 0 var(--primary-color);
}

.modern-table tr {
    transition: all 0.2s ease;
}

/* Page Header Spacing */
.page-header {
    margin-bottom: 2.5rem;
}

/* Modal Enhancements */
.modal-content {
    background: white;
    border: none;
    box-shadow: var(--shadow-xl);
    border-radius: 24px;
    overflow: hidden;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.modal-header {
    background: var(--grad-dark);
    color: white;
    padding: 1.5rem 2rem;
}

/* Utility Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

/* Additional RWD Improvements */

/* Extra small devices */

/* Landscape mode on mobile */

/* Tablet specific improvements */

/* Mobile modal improvements */

/* ==========================================
   COMPREHENSIVE RWD - WIDTH & HEIGHT
   ========================================== */

/* Extra Large Screens (1440px+) */

/* Large Screens (1200px - 1439px) */

/* Medium Screens (768px - 1023px) */

/* Small Screens (481px - 767px) */

/* Extra Small (360px - 480px) */

/* Ultra Small (< 360px) */

/* ==========================================
   HEIGHT-BASED RESPONSIVE (vh)
   ========================================== */

/* Short Viewport (< 600px height) */

/* Medium Height (600px - 800px) */

/* Tall Viewport (> 1000px) */

/* ==========================================
   LANDSCAPE / ORIENTATION
   ========================================== */

/* Landscape on Mobile */

/* ==========================================
   LOGIN PAGE RWD
   ========================================== */

/* ==========================================
   TABLE & MODAL RWD
   ========================================== */

/* ==========================================
   CARD & GRID RWD
   ========================================== */

/* ==========================================
   FORM RWD
   ========================================== */

/* ==========================================
   SIDEBAR RWD (Mobile Menu)
   ========================================== */

/* ==========================================
   BUTTON RWD
   ========================================== */

/* ==========================================
   UTILITY RWD
   ========================================== */

/* Touch device optimizations */

/* Reduced motion preference */
