:root {
    --primary: #D4AF37;
    --primary-hover: #C5A021;
    --bg: #f8f9fa;
    --bg-secondary: #FDF5E6;
    --text-primary: #1A1A1A;
    --text-secondary: #666666;
    --header-bg: #000000;
    --footer-bg: #000000;
    --card-bg: #FFFFFF;
    --border: #e7e7e7;
    --success: #05cd99;
    --danger: #ef4444;
    --shadow: 0 4px 12px rgba(0,0,0,0.05);
    --radius: 12px;
    --sidebar-width: 280px;
}

[data-theme="dark"] {
    --bg: #000000;
    --bg-secondary: #0a0a0a;
    --text-primary: #FDF5E6;
    --text-secondary: #a0a0a0;
    --card-bg: #0f0f0f;
    --border: #1a1a1a;
    --header-bg: #000000;
    --footer-bg: #000000;
    --shadow: 0 4px 12px rgba(0,0,0,0.4);
}

[data-theme="dark"] body {
    background: var(--bg-main);
    color: var(--text-primary);
}

[data-theme="dark"] .card, 
[data-theme="dark"] .hotel-card, 
[data-theme="dark"] .offer-card, 
[data-theme="dark"] .blog-card,
[data-theme="dark"] .stat-card { 
    background: var(--card-bg); 
    border-color: var(--border); 
}

[data-theme="dark"] .form-control {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border) !important;
}

[data-theme="dark"] .navbar {
    background: var(--header-bg) !important;
    border-bottom-color: var(--border) !important;
}

[data-theme="dark"] .footer {
    background: var(--footer-bg) !important;
}

.sun-icon { display: none; }
.moon-icon { display: block; }
[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }

/* Global Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { 
    background: var(--bg); 
    color: var(--text-primary); 
    -webkit-font-smoothing: antialiased; 
    line-height: 1.6;
}
body.dashboard-body { display: flex; min-height: 100vh; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Navbar & Base Classes */
.navbar { background: var(--header-bg); padding: 15px 0; color: var(--text-primary); position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.1); border-bottom: 1px solid var(--border); }
.footer { background: var(--footer-bg); color: var(--text-primary); padding: 80px 0 40px; margin-top: 80px; border-top: 1px solid var(--border); }
.card, .hotel-card, .offer-card, .blog-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); }
.btn-gold { background: var(--primary); color: #000; font-weight: 800; border: none; }
.btn-gold:hover { background: #c5a02c; }

/* Theme Toggle */
.theme-toggle {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
}
.theme-toggle:hover {
    background: rgba(255,255,255,0.2);
}
[data-theme="dark"] .navbar { background: #0b1437; }
[data-theme="dark"] .hero-search { background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=1920&q=80'); }
[data-theme="dark"] .search-box { background: #1b254b; }
[data-theme="dark"] .search-group { background: #111c44; border: 1px solid #1b254b; }
[data-theme="dark"] .search-input { background: transparent; color: white; }
[data-theme="dark"] .card, [data-theme="dark"] .hotel-card, [data-theme="dark"] .offer-card, [data-theme="dark"] .blog-card { background: #111c44; border-color: #1b254b; }
[data-theme="dark"] .hotel-title, [data-theme="dark"] .offer-content h3, [data-theme="dark"] .blog-info h3 { color: white; }
[data-theme="dark"] .hotel-pricing { background: #0b1437; }

/* Hero & Search */
.hero-search { 
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=1920&q=80'); 
    background-size: cover;
    background-position: center;
    padding: 100px 0 140px; 
    color: white; 
    text-align: left; 
}
.hero-search h1 { font-size: 56px; font-weight: 800; margin-bottom: 15px; letter-spacing: -1px; line-height: 1.1; }
.hero-search p { font-size: 24px; opacity: 1; font-weight: 500; margin-bottom: 30px; }
.btn-explore { 
    background: var(--booking-light-blue); 
    color: white; 
    padding: 12px 24px; 
    border-radius: 4px; 
    font-weight: 700; 
    text-decoration: none; 
    display: inline-block;
    font-size: 16px;
}

.search-box { 
    background: var(--booking-yellow); 
    padding: 4px; 
    border-radius: 8px; 
    display: grid; 
    grid-template-columns: 1.5fr 1.2fr 1.2fr auto;
    gap: 4px; 
    margin: -35px auto 0; 
    max-width: 1100px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    position: relative;
    z-index: 10;
}
.search-group {
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 15px;
}
.search-group i { color: #666; margin-right: 10px; }
.search-input { flex: 1; border: none; padding: 15px 0; font-size: 15px; outline: none; font-weight: 500; color: #333; }
.btn-search { background: var(--booking-light-blue); color: white; border: none; padding: 0 40px; border-radius: 4px; font-weight: 700; cursor: pointer; font-size: 18px; transition: 0.3s; }
.btn-search:hover { background: #0056b3; }

/* Tabs */
.tabs-container { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; border-bottom: 1px solid #eee; }
.tabs { display: flex; gap: 30px; }
.tab { padding: 15px 0; font-weight: 700; color: #4b4b4b; cursor: pointer; border-bottom: 3px solid transparent; transition: 0.2s; font-size: 15px; }
.tab.active { color: var(--booking-light-blue); border-bottom-color: var(--booking-light-blue); }
.see-more { color: var(--booking-light-blue); font-weight: 700; text-decoration: none; font-size: 15px; display: flex; align-items: center; gap: 5px; }

/* Property Card Refinements */
.hotel-card { border-radius: 16px; border: none; box-shadow: none; }
.hotel-img-container { height: 240px; border-radius: 16px; }
.hotel-img { border-radius: 16px; }
.rating-badge { top: 15px; right: 15px; border-radius: 4px; font-size: 14px; padding: 4px 8px; }
.hotel-info { padding: 15px 0; }
.hotel-title { font-size: 17px; color: var(--text-primary); margin-bottom: 8px; line-height: 1.3; font-family: 'Playfair Display', serif; }
.hotel-location { color: var(--primary); font-weight: 700; font-size: 13px; margin-bottom: 8px; }
.price-sub-text { font-size: 13px; color: var(--text-secondary); margin-bottom: 4px; }
.price-tag { font-size: 20px; color: var(--primary); font-weight: 800; }
.hotel-pricing { background: transparent; padding: 0; border: none; }

/* Components */
.section { margin-top: 50px; }
.section h2 { margin-bottom: 20px; font-size: 28px; font-weight: 800; color: var(--text-dark); }
.card { background: var(--white); padding: 35px; border-radius: 20px; border: none; box-shadow: 0 4px 25px rgba(0,0,0,0.03); }
.badge { padding: 6px 12px; border-radius: 8px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.badge-success { background: #e6faf5; color: #05cd99; }
.badge-warning { background: #fff8ed; color: #ffb547; }
.badge-danger { background: #fff0f0; color: #ef4444; }

/* Hotel Listings Grid */
.hotel-list { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 25px; 
    margin-top: 30px; 
}
.hotel-card { 
    background: var(--white); 
    border: 1px solid var(--border); 
    border-radius: 16px; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
    transition: 0.3s; 
    height: 100%;
}
.hotel-card:hover { 
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: var(--booking-light-blue); 
}
.hotel-img-container { 
    width: 100%; 
    height: 200px; 
    flex-shrink: 0; 
    position: relative;
    overflow: hidden;
}

.slider-wrapper {
    display: flex;
    transition: transform 0.3s ease-in-out;
    height: 100%;
}

.slider-img {
    min-width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s;
}

.hotel-img-container:hover .slider-btn {
    opacity: 1;
}

.slider-btn.prev { left: 10px; }
.slider-btn.next { right: 10px; }

.hotel-img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.hotel-card:hover .hotel-img { transform: scale(1.08); }

.hotel-info { 
    padding: 15px; 
    flex: 1; 
    display: flex;
    flex-direction: column;
}
.hotel-title { 
    font-size: 18px; 
    font-weight: 800; 
    color: var(--text-dark); 
    margin-bottom: 5px; 
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hotel-location { 
    font-size: 13px; 
    color: var(--booking-light-blue); 
    font-weight: 700;
    margin-bottom: 10px; 
}
.hotel-pricing { 
    padding: 15px; 
    background: #f8faff; 
    border-top: 1px solid var(--border);
    width: 100%;
}
.price-tag { font-size: 20px; font-weight: 800; color: var(--booking-blue); }
.rating-badge { 
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--booking-blue); 
    color: white; 
    padding: 4px 8px; 
    border-radius: 6px; 
    font-weight: 800; 
    font-size: 12px; 
    z-index: 2;
}

/* Dashboard Layout */
.sidebar {
    width: var(--sidebar-width);
    background: var(--white);
    padding: 40px 24px;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    z-index: 100;
    overflow-y: auto; /* Added scroll */
}
/* Custom Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
    width: 4px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
}
.sidebar-logo {
    font-size: 26px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.nav-menu { list-style: none; flex: 1; padding: 0; }
.nav-item { margin-bottom: 12px; }
.nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 14px 20px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 15px;
    transition: all 0.2s ease;
    font-weight: 700;
    font-size: 15px;
}
.nav-link:hover, .nav-link.active {
    background: var(--bg-light);
    color: var(--text-main);
}
.nav-link i { width: 22px; height: 22px; }

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 50px;
    background: var(--bg-light);
    min-height: 100vh;
}

/* Cards & Forms */
.card { 
    background: var(--white); 
    padding: 35px; 
    border-radius: 20px; 
    border: none; 
    box-shadow: 0 4px 25px rgba(0,0,0,0.03); 
}
.form-group { margin-bottom: 20px; }
.form-control { width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: 8px; font-size: 15px; transition: 0.3s; background: var(--card-bg); color: var(--text-primary); }
.form-control:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: 8px; font-weight: 700; text-decoration: none; cursor: pointer; transition: 0.3s; border: none; }
.btn-gold { background: var(--primary); color: #000 !important; }
.btn-gold:hover { background: var(--primary-hover); }

/* Navigation */
.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    transition: 0.3s;
    margin-bottom: 5px;
    font-weight: 500;
}
.nav-link:hover, .nav-link.active {
    background: var(--bg-secondary);
    color: var(--primary);
}
.nav-link i { width: 20px; height: 20px; }

/* Icon Toggling */
.sun-icon, .moon-icon { display: none; }
:root:not([data-theme="dark"]) .moon-icon { display: block; }
[data-theme="dark"] .sun-icon { display: block; }
.stat-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.stat-icon {
    width: 56px;
    height: 56px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}
.stat-info h3 { font-size: 14px; color: var(--text-muted); margin-bottom: 5px; }
.stat-info .value { font-size: 24px; font-weight: 800; color: var(--text-main); }

.owner-table, .admin-table {
    width: 100%;
    border-collapse: collapse;
}
.owner-table th, .admin-table th {
    text-align: left;
    padding: 15px;
    color: var(--text-secondary);
    font-size: 13px;
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.owner-table td, .admin-table td {
    padding: 18px 15px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-primary);
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.badge-success { background: rgba(5, 205, 153, 0.1); color: #05cd99; border: 1px solid rgba(5, 205, 153, 0.2); }
.badge-warning { background: rgba(255, 181, 71, 0.1); color: #ffb547; border: 1px solid rgba(255, 181, 71, 0.2); }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.2); }

/* Offers Section */
.offer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; }
.offer-card { 
    background: var(--card-bg); 
    border-radius: 12px; 
    overflow: hidden; 
    display: flex; 
    border: 1px solid var(--border);
    transition: 0.3s;
    cursor: pointer;
}
.offer-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.offer-img { width: 150px; height: 150px; flex-shrink: 0; }
.offer-img img { width: 100%; height: 100%; object-fit: cover; }
.offer-content { padding: 20px; flex: 1; display: flex; flex-direction: column; justify-content: center; }
.offer-content h3 { font-size: 18px; font-weight: 800; margin-bottom: 8px; color: var(--text-primary); }
.offer-content p { font-size: 14px; color: var(--text-secondary); margin-bottom: 15px; line-height: 1.4; }
.btn-offer { 
    background: var(--primary); 
    color: #000; 
    padding: 8px 16px; 
    border-radius: 4px; 
    font-weight: 700; 
    text-decoration: none; 
    font-size: 13px;
    align-self: flex-start;
}

/* Blog Section */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 30px; }
.blog-card { background: var(--card-bg); border-radius: 16px; overflow: hidden; transition: 0.3s; }
.blog-card:hover { transform: translateY(-8px); box-shadow: 0 15px 35px rgba(0,0,0,0.1); }
.blog-img { height: 220px; overflow: hidden; }
.blog-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.blog-card:hover .blog-img img { transform: scale(1.1); }
.blog-info { padding: 25px; }
.blog-info .date { font-size: 12px; color: var(--primary); font-weight: 700; text-transform: uppercase; margin-bottom: 10px; display: block; }
.blog-info h3 { font-size: 20px; font-weight: 800; margin-bottom: 12px; color: var(--text-primary); line-height: 1.4; }
.blog-info p { font-size: 15px; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.6; }
.read-more { color: var(--primary); font-weight: 700; text-decoration: none; font-size: 14px; display: flex; align-items: center; gap: 6px; }

.footer { background: var(--footer-bg); color: white; padding: 80px 0 40px; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.footer h4 { margin-bottom: 25px; font-size: 18px; font-weight: 700; color: white; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 12px; }
.footer ul li a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 14px; transition: 0.3s; }
.footer ul li a:hover { color: white; }
.footer-bottom { margin-top: 60px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; color: rgba(255,255,255,0.5); font-size: 13px; }

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .hotel-list { grid-template-columns: repeat(3, 1fr); }
    .search-box { max-width: 95%; }
}

@media (max-width: 992px) {
    .sidebar { 
        width: 100% !important; 
        height: auto !important; 
        position: relative !important; 
        padding: 15px !important; 
        border-right: none !important; 
        border-bottom: 1px solid var(--border) !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        display: flex !important;
        align-items: center !important;
    }
    .sidebar-logo { margin-bottom: 0 !important; margin-right: 20px !important; }
    .nav-menu { display: flex !important; flex-direction: row !important; gap: 10px !important; margin-top: 0 !important; }
    .nav-item { margin-bottom: 0 !important; }
    .nav-link { padding: 8px 15px !important; font-size: 13px !important; }
    .main-content { margin-left: 0 !important; padding: 20px !important; width: 100% !important; }
    
    .dashboard-body { flex-direction: column !important; }
    
    .hotel-list { grid-template-columns: repeat(2, 1fr); }
    .hero-search h1 { font-size: 32px; }
    .hero-search p { font-size: 16px; }
    .footer-grid { grid-template-columns: 1fr; }
    
    .search-box { 
        grid-template-columns: 1fr; 
        margin-top: -50px;
        padding: 10px;
    }
    .btn-search { padding: 15px; width: 100%; height: 50px; }
    
    .offer-grid, .blog-grid { grid-template-columns: 1fr; }
    .offer-card { flex-direction: column; }
    .offer-img { width: 100%; height: 200px; }
    
    .dashboard-grid { grid-template-columns: 1fr !important; }
    
    .navbar-flex { flex-direction: row !important; justify-content: space-between !important; }
    #mobile-toggle { display: block !important; }
    .nav-links { 
        display: none !important; 
        position: absolute; 
        top: 100%; 
        left: 0; 
        width: 100%; 
        background: var(--white); 
        flex-direction: column; 
        padding: 20px; 
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        z-index: 1000;
        gap: 15px !important;
    }
    .nav-links li { width: 100%; }
    .nav-links a, .nav-links button { width: 100%; justify-content: center; }
    .nav-links.active { display: flex !important; }
    .hide-mobile { display: none !important; }
}

@media (max-width: 768px) {
    .hero-search { padding: 40px 0 80px; text-align: center; }
    .hero-search h1 { font-size: 28px; }
    .tabs { gap: 10px; overflow-x: auto; padding-bottom: 10px; }
    .tab { white-space: nowrap; font-size: 13px; }
    .tabs-container { flex-direction: column; align-items: flex-start; gap: 10px; }
    
    .hotel-header-flex { flex-direction: column; gap: 15px; }
    .hotel-gallery-grid { grid-template-columns: 1fr !important; height: auto !important; }
    .hotel-gallery-side { display: none !important; }
    .hotel-content-grid { grid-template-columns: 1fr !important; }
    
    .room-card-grid { grid-template-columns: 1fr !important; }
    .room-card-img { height: 180px !important; }
    .room-card-price { border-right: none !important; border-top: 1px solid var(--border); width: 100% !important; }
    
    .policy-grid { grid-template-columns: 1fr !important; gap: 5px !important; }
    
    .stat-card { padding: 15px; }
    .stat-icon { width: 40px; height: 40px; }
    .stat-info .value { font-size: 20px; }
    
    .page-title { font-size: 28px !important; }
}

@media (max-width: 576px) {
    .hotel-list { grid-template-columns: 1fr; }
    .logo { font-size: 18px; }
    .navbar .container { padding: 0 10px; }
    .btn { width: 100%; }
    
    .owner-table, .admin-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .card { padding: 15px !important; }
    
    div[style*="grid-template-columns: 1fr 1fr"],
    div[style*="grid-template-columns: repeat(4, 1fr)"] {
        grid-template-columns: 1fr !important;
    }
}

@media (min-width: 993px) {
    .hide-desktop { display: none !important; }
}
