/**
 * ROBUST STYLESHEET FOR BOOKING_PROJECT
 * Includes variables, reset, layout, components, and responsive design.
 */

:root {
    /* Colors */
   --primary: #192c57;
    --primary-dark: #ff1493;
    --white: #ffffff;
    --bg-main: #f4f7f6;
    --gray-dark: #2d3748;
    --transition: all 0.3s ease;
    --secondary: #9b59b6;
    --success: #2ecc71;
    --success-dark: #27ae60;
    --danger: #e74c3c;
    --warning: #f1c40f;
    --dark: #1a202c;
    --gray-dark: #2d3748;
    --gray: #4a5568;
    --gray-light: #718096;
    --gray-lighter: #a0aec0;
    --border: #e2e8f0;
    /* New Hero Section Utility */
/* --- Hero Section --- */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    overflow: hidden;
    margin-bottom: 30px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 105, 180, 0.4); /* Hotpink tint overlay */
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 20px;
}

    .bg-login-page {
        background: url('<?= BASE_URL; ?>assets/images/town2.jpg') no-repeat center center fixed;
        background-size: cover;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }
    .bg-login-page::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay for readability */
        z-index: 0;
    }
    .auth-container {
        z-index: 1;
        position: relative;
    }

/* Ensure Bootstrap primary buttons use your Hotpink */
.bg-primary { background-color: var(--primary) !important; }
.btn-primary { background-color: var(--primary) !important; border-color: var(--primary) !important; }
.btn-primary:hover { background-color: var(--primary-dark) !important; border-color: var(--primary-dark) !important; }

    /* Sidebar Theme */
    --sidebar-bg: #1a1a1a;
    --sidebar-accent: #00d4ff;
    --sidebar-highlight: #ffcc00;
    --sidebar-logout: #ff5f5f;

    /* Shadows & Transitions */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;

    /* Layout */
    --sidebar-width: 250px;
}

/* --- Base Reset & Sticky Footer --- */
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--gray-dark);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Layout Hierarchy --- */
.wrapper { 
    display: flex; 
    width: 100%; 
    flex-grow: 1; /* Pushes the footer down */
}

.main-content {
    margin-left: var(--sidebar-width);
    padding: 30px;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    width: calc(100% - var(--sidebar-width));
}

/* --- Common Components --- */

/* Cards */
.card, .form-card, .table-card-glass {
    background: var(--white);
    border-radius: 12px;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.04);
    padding: 25px;
    margin-bottom: 30px;
}

.card-sm {
    background: var(--white);
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.bg-glassmorphism {
    background: linear-gradient(rgba(244, 247, 246, 0.9), rgba(244, 247, 246, 0.9)),
                url('../images/background.jpg') center/cover fixed;
}

.table-card-glass {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
}

/* Typography & Titles */
.card-header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.card-title-main {
    color: var(--dark);
    font-size: 24px;
    margin-bottom: 30px;
    border-bottom: 2px solid #f7fafc;
    padding-bottom: 15px;
}

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

.form-full-width { grid-column: span 2; }

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray);
    font-size: 14px;
}

input, textarea, select {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--success);
}

/* Auth Card Override */
.auth-card {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 450px;
}

.auth-card h2 { text-align: center; color: var(--gray-dark); margin-bottom: 10px; font-weight: 600; }
.auth-card input:focus { border-color: var(--primary); }

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); }

.btn-success { background: var(--success); color: var(--white); }
.btn-success:hover { background: var(--success-dark); }

.btn-danger { color: var(--danger); }
.btn-info { color: var(--primary); }
.btn-secondary { color: var(--secondary); }

.btn-block { width: 100%; padding: 14px; font-size: 16px; margin-top: 10px; }

.click-me { 
    padding: 8px 18px; border-radius: 20px; font-size: 13px; font-weight: bold; 
    text-decoration: none; display: inline-block; transition: 0.3s; 
}

/* --- Sidebar Navigation --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: var(--white);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    padding: 20px;
    font-family: sans-serif;
    box-sizing: border-box;
    transition: var(--transition);
    z-index: 1000;
}

.sidebar-title { margin-top: 0; margin-bottom: 10px; color: var(--sidebar-accent); }
.sidebar-user-info { font-size: 12px; color: #888; margin-bottom: 15px; }
.sidebar-divider { border: 0.5px solid #333; margin-bottom: 20px; }
.sidebar-menu { list-style: none; padding: 0; }
.sidebar-menu-item { padding: 10px 0; }
.sidebar-link { color: var(--white); text-decoration: none; display: block; }
.sidebar-link:hover { color: var(--sidebar-accent); }
.sidebar-link-highlight { color: var(--sidebar-highlight); }
.sidebar-link-logout { color: var(--sidebar-logout); }

/* Mobile Header/Nav */
.mobile-nav {
    display: none;
    padding: 10px 20px;
    background: var(--sidebar-bg);
    color: var(--white);
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1001;
}

/* --- Tables --- */
.table-responsive {
    background: var(--white);
    padding: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td { padding: 15px; text-align: left; border-bottom: 1px solid #eee; }
th { background: #fafafa; color: #666; font-size: 13px; text-transform: uppercase; }

/* --- Status Badges --- */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 11px;
    text-transform: uppercase;
}

.status-confirmed { background: #eafaf1; color: var(--success); }
.status-pending { background: #fff9e6; color: var(--warning); }
.status-cancelled { background: #fee2e2; color: var(--danger); }

/* --- Images --- */
.img-responsive { width: 100%; height: 200px; object-fit: cover; border-radius: 8px; }
.img-responsive-h180 { height: 180px; object-fit: cover; }
.img-thumbnail-sm { width: 150px; border-radius: 8px; object-fit: cover; cursor: pointer; }
.img-thumbnail-md { width: 200px; height: 150px; object-fit: cover; border-radius: 8px; }
.hotel-thumb { width: 50px; height: 40px; border-radius: 4px; object-fit: cover; }

/* --- Utilities & Messages --- */
.message { padding: 15px; margin-bottom: 20px; border-radius: 8px; font-weight: bold; }
.success-msg { background-color: #eafaf1; color: var(--success-dark); border: 1px solid var(--success-dark); }
.error-msg { background-color: #fdedec; color: var(--danger); border: 1px solid var(--danger); }

.text-muted-small { color: var(--gray-light); font-size: 0.875em; }
.text-primary-bold { color: var(--primary); font-weight: bold; }
.text-success-bold { color: var(--success); font-weight: bold; }
.text-danger-bold { color: var(--danger); font-weight: bold; }
.text-center { text-align: center; }
.text-medium-gray { color: var(--gray); }
.text-dark-gray { color: var(--gray-dark); }
.description-small { color: var(--gray-light); font-size: 0.85em; }

.mb-15 { margin-bottom: 15px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.p-40 { padding: 40px; }
.w-100 { width: 100%; }
.h-100 { height: 100%; }
.object-fit-cover { object-fit: cover; }
.rounded-8 { border-radius: 8px; }

/* Flex Helpers */
.d-flex { display: flex; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.gap-20 { gap: 20px; }
.flex-1 { flex: 1; }

/* Property Gallery */
.property-gallery-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.hotel-preview-section { margin-bottom: 30px; border-bottom: 2px solid #f4f4f4; padding-bottom: 20px; }

/* Footer */
.footer {
    margin-top: auto;
    padding: 30px 0;
    text-align: center;
    color: var(--gray-light);
    font-size: 0.85em;
}

.footer-social-link {
    color: var(--gray-light);
    transition: var(--transition);
    margin: 0 12px;
    font-size: 20px;
    text-decoration: none;
}
.footer-social-link:hover { color: var(--dark); }

/* --- Responsive Media Queries --- */
@media (max-width: 1024px) {
    .form-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .mobile-nav { display: flex; }

    .sidebar {
        left: calc(-1 * var(--sidebar-width));
    }
    .sidebar.active {
        left: 0;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 20px;
    }

    .image-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
.border-purple { border-color: #a855f7 !important; }
.btn-outline-purple { 
    color: #a855f7; 
    border-color: #a855f7; 
}
.btn-outline-purple:hover { 
    background-color: #a855f7; 
    color: #fff; 
}
.form-control:hover {
    border-color: #0d6efd;
    box-shadow: 0 0 5px rgba(13, 110, 253, 0.2);
}