/* ==================== CSS VARIABLES ==================== */
:root {
    color-scheme: dark;
    supported-color-schemes: dark;
    -webkit-color-scheme: dark;

    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #06b6d4;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --bg-input: #334155;

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --border: #334155;
    --border-light: #475569;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.6);

    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;

    --nav-height: 60px;
    --bottom-nav-height: 65px;
}

/* ==================== RESET & BASE ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    padding-bottom: var(--bottom-nav-height);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: 16px; /* Prevent zoom on iOS */
}

/* ==================== NAVIGATION ==================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: var(--font-display);
}

.nav-toggle {
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    z-index: 1001;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.nav-menu {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.nav-menu.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    background: var(--bg-input);
    color: var(--text-primary);
}

.nav-link.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    justify-content: center;
}

.nav-link.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    color: var(--text-muted);
    font-size: 0.7rem;
    transition: var(--transition);
}

.bottom-nav-item i {
    font-size: 1.25rem;
}

.bottom-nav-item.active, .bottom-nav-item:hover {
    color: var(--primary-light);
}

/* ==================== FLASH MESSAGES ==================== */
.flash-container {
    position: fixed;
    top: calc(var(--nav-height) + 8px);
    left: 16px;
    right: 16px;
    z-index: 998;
    pointer-events: none;
}

.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 8px;
    animation: slideDown 0.3s ease;
    pointer-events: all;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid var(--info);
    color: var(--info);
}

@keyframes slideDown {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* ==================== HERO SECTION ==================== */
.hero {
    padding: calc(var(--nav-height) + 40px) 16px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.08) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

/* ==================== SEARCH BAR ==================== */
.search-section {
    padding: 0 16px 40px;
    max-width: 800px;
    margin: 0 auto;
}

.search-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: var(--shadow-lg);
}

.search-input-group {
    position: relative;
    flex: 1;
}

.search-input-group i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
}

.search-input {
    width: 100%;
    padding: 14px 14px 14px 42px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* ==================== ROOM CARDS ==================== */
.rooms-section {
    padding: 40px 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
}

.rooms-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.room-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.room-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--border-light);
}

.room-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

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

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

.room-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-available {
    background: rgba(16, 185, 129, 0.9);
    color: white;
}

.badge-booked {
    background: rgba(239, 68, 68, 0.9);
    color: white;
}

.badge-maintenance {
    background: rgba(245, 158, 11, 0.9);
    color: white;
}

.room-image-count {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.room-content {
    padding: 16px;
}

.room-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
}

.room-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.room-features {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.room-feature {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.room-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.room-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-light);
}

.room-price span {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

.btn-view {
    padding: 8px 20px;
    background: var(--bg-input);
    color: var(--text-primary);
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-view:hover {
    background: var(--primary);
    color: white;
}

/* ==================== ROOM DETAIL PAGE ==================== */
.room-detail {
    padding-top: var(--nav-height);
}

.room-gallery {
    position: relative;
    background: var(--bg-secondary);
}

.gallery-main {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: var(--transition);
}

.gallery-nav:hover {
    background: rgba(0,0,0,0.8);
}

.gallery-nav.prev { left: 12px; }
.gallery-nav.next { right: 12px; }

.gallery-thumbs {
    display: flex;
    gap: 8px;
    padding: 12px;
    overflow-x: auto;
    scrollbar-width: none;
}

.gallery-thumbs::-webkit-scrollbar { display: none; }

.gallery-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.gallery-thumb.active, .gallery-thumb:hover {
    border-color: var(--primary);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 360 View Button */
.btn-360 {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(99, 102, 241, 0.9);
    color: white;
    padding: 10px 18px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.btn-360:hover {
    background: var(--primary);
    transform: scale(1.05);
}

/* 360 Viewer Modal */
.modal-360 {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    display: none;
    flex-direction: column;
}

.modal-360.active {
    display: flex;
}

.modal-360-header {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.modal-360-close {
    width: 40px;
    height: 40px;
    background: var(--bg-input);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.viewer-360 {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.viewer-360 img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.1s ease-out;
}

.viewer-360-hint {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: fadeInOut 3s ease infinite;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Room Info */
.room-info {
    padding: 24px 16px;
    max-width: 800px;
    margin: 0 auto;
}

.room-info-header {
    margin-bottom: 24px;
}

.room-info-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.room-info-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.room-info-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-light);
    margin: 16px 0;
}

.room-info-price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.room-description {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
}

.amenities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.amenity-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: var(--bg-input);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.amenity-item i {
    color: var(--primary-light);
    font-size: 1.1rem;
}

/* Booking Section */
.booking-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 24px;
}

.booking-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.booking-fee {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-input);
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.booking-fee-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.booking-fee-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

.btn-book {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-book:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-book:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

/* ==================== FORMS ==================== */
.form-page {
    padding: calc(var(--nav-height) + 20px) 16px 40px;
    max-width: 480px;
    margin: 0 auto;
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    box-shadow: var(--shadow-lg);
}

.form-header {
    text-align: center;
    margin-bottom: 28px;
}

.form-header h1 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.form-label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.error-message {
    color: var(--danger);
    font-size: 0.8rem;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.input-hint {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 6px;
}

/* Checkbox styling */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.form-check input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
    margin-top: 2px;
    flex-shrink: 0;
}

.form-check label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.form-check label a {
    color: var(--primary-light);
    text-decoration: underline;
}

/* POPI Disclaimer */
.popi-disclaimer {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
    max-height: 200px;
    overflow-y: auto;
}

.popi-disclaimer h4 {
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--primary-light);
}

.popi-disclaimer p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border-light);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* Payment Methods */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.payment-method:hover, .payment-method.active {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.08);
}

.payment-method input {
    width: 20px;
    height: 20px;
    accent-color: var(--primary);
}

.payment-method-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-card);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.payment-method-info h4 {
    font-size: 1rem;
    margin-bottom: 2px;
}

.payment-method-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==================== DASHBOARD ==================== */
.dashboard {
    padding-top: calc(var(--nav-height) + 16px);
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px;
}

.dashboard-header {
    margin-bottom: 24px;
}

.dashboard-header h1 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.dashboard-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-light);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Booking Cards */
.booking-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.booking-image {
    width: 80px;
    height: 80px;
    border-radius: var(--radius);
    overflow: hidden;
    flex-shrink: 0;
}

.booking-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.booking-info {
    flex: 1;
    min-width: 0;
}

.booking-info h4 {
    font-size: 1rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.booking-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.booking-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.booking-meta span {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 12px;
    background: var(--bg-input);
    color: var(--text-secondary);
}

.status-pending { background: rgba(245, 158, 11, 0.15) !important; color: var(--warning) !important; }
.status-paid { background: rgba(16, 185, 129, 0.15) !important; color: var(--success) !important; }
.status-confirmed { background: rgba(59, 130, 246, 0.15) !important; color: var(--info) !important; }
.status-cancelled { background: rgba(239, 68, 68, 0.15) !important; color: var(--danger) !important; }

/* ==================== ADMIN PANEL ==================== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    padding: 24px 16px;
    z-index: 1000;
    transform: translateX(-100%);
    transition: var(--transition);
    overflow-y: auto;
}

.admin-sidebar.active {
    transform: translateX(0);
}

.admin-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

.admin-sidebar-overlay.active {
    display: block;
}

.admin-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
}

.admin-logo-text {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

.admin-nav-item:hover, .admin-nav-item.active {
    background: var(--bg-input);
    color: var(--text-primary);
}

.admin-nav-item i {
    width: 20px;
    text-align: center;
}

.admin-main {
    flex: 1;
    min-width: 0;
    margin-left: 0;
    padding: 24px 16px;
    padding-top: calc(var(--nav-height) + 24px);
    overflow-x: auto;
}

.admin-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.admin-header h1 {
    min-width: 0;
    flex-shrink: 1;
}

.admin-header h1 {
    font-family: var(--font-display);
    font-size: 1.5rem;
}

.admin-menu-toggle {
    width: 40px;
    height: 40px;
    background: var(--bg-input);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

/* Data Tables */
.data-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.data-table th {
    text-align: left;
    padding: 14px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.data-table td {
    padding: 14px 16px;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.data-table tr:hover td {
    background: rgba(99, 102, 241, 0.03);
}

/* Keep the Actions column always visible on the right, even when the
   table scrolls horizontally, so action buttons are never hidden
   off-screen. */
.data-table th:last-child,
.data-table td:last-child {
    position: sticky;
    right: 0;
    background-color: var(--bg-card) !important;
    box-shadow: -6px 0 8px -4px rgba(0, 0, 0, 0.35);
}

.data-table tr:hover td:last-child {
    background-color: #24324a !important;
}

.table-actions {
    display: flex;
    gap: 8px;
}

.table-actions .btn {
    width: auto;
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}
.status-active::before { background: var(--success); }

.status-paused {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}
.status-paused::before { background: var(--warning); }

.status-inactive {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}
.status-inactive::before { background: var(--danger); }

/* Admin Forms */
.admin-form {
    max-width: 700px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.image-upload {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 16px;
}

.image-upload:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.03);
}

.image-upload i {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.image-upload p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.image-preview {
    aspect-ratio: 4/3;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 48px 16px 24px;
    margin-bottom: var(--bottom-nav-height);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.footer-brand .logo {
    margin-bottom: 12px;
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-links a {
    width: 36px;
    height: 36px;
    background: var(--bg-input);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.footer-links h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-light);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-credit {
    margin-top: 8px;
    color: var(--text-secondary);
}

/* ==================== MODALS ==================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 1500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.25rem;
}

.modal-close {
    width: 32px;
    height: 32px;
    background: var(--bg-input);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* ==================== UTILITIES ==================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--primary-light); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

.hidden { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

/* ==================== RESPONSIVE (TABLET & UP) ==================== */
@media (min-width: 640px) {
    .rooms-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .amenities-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .search-box {
        flex-direction: row;
        align-items: center;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .nav-toggle {
        display: none;
    }

    .nav-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        flex-direction: row;
        background: transparent;
        border: none;
        padding: 0;
        gap: 4px;
    }

    .nav-link {
        padding: 8px 14px;
        font-size: 0.9rem;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    .rooms-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .admin-sidebar {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 260px;
        padding: 32px;
        padding-top: 32px;
    }

    .admin-menu-toggle {
        display: none;
    }

    .mobile-bottom-nav {
        display: none;
    }

    body {
        padding-bottom: 0;
    }

    .footer {
        margin-bottom: 0;
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .rooms-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .room-detail .room-info {
        display: grid;
        grid-template-columns: 1fr 380px;
        gap: 32px;
        align-items: start;
    }

    .booking-section {
        position: sticky;
        top: calc(var(--nav-height) + 20px);
    }
}

/* Print styles */
@media print {
    .navbar, .mobile-bottom-nav, .footer, .btn-book, .booking-section {
        display: none !important;
    }

    body {
        padding: 0;
        background: white;
        color: black;
    }
}

/* ==================== NOTIFICATIONS ==================== */
.notification-bell {
    position: relative;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--radius);
    transition: var(--transition);
}
.notification-bell:hover {
    background: var(--bg-input);
}
.notification-bell i {
    font-size: 1.25rem;
    color: var(--text-secondary);
}
.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}
.notification-dropdown {
    position: absolute;
    top: 50px;
    right: 16px;
    width: 380px;
    max-height: 500px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 1001;
    display: none;
    overflow: hidden;
}
.notification-dropdown.active {
    display: block;
    animation: slideDown 0.2s ease;
}
.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border);
}
.notification-header h4 {
    font-size: 1rem;
}
.notification-list {
    max-height: 400px;
    overflow-y: auto;
}
.notification-item {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
}
.notification-item:hover {
    background: var(--bg-input);
}
.notification-item.unread {
    background: rgba(99, 102, 241, 0.05);
    border-left: 3px solid var(--primary);
}
.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.notification-icon.room { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.notification-icon.transport { background: rgba(99, 102, 241, 0.15); color: var(--primary-light); }
.notification-content {
    flex: 1;
    min-width: 0;
}
.notification-content h5 {
    font-size: 0.9rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.notification-content p {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}
.notification-empty {
    text-align: center;
    padding: 32px;
    color: var(--text-muted);
}
.notification-empty i {
    font-size: 2rem;
    margin-bottom: 8px;
    opacity: 0.5;
}

/* =========================================================================
   ADMIN FIT-TO-SCREEN — FINAL OVERRIDE (highest priority, loaded last)
   Guarantees every admin page fits the browser width: nothing can push
   the page wider than the screen except tables, which scroll inside
   their own box instead of stretching the page.
   ========================================================================= */
html, body {
    max-width: 100% !important;
    overflow-x: auto !important;
}

.admin-layout {
    display: flex !important;
    width: 100% !important;
    max-width: 100vw !important;
}

.admin-main {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: auto !important;
}

.admin-header,
.stats-grid,
.form-row,
.admin-form {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.admin-header {
    flex-wrap: wrap !important;
}

.stats-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
}

.data-table-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch !important;
}

.data-table {
    width: max-content !important;
    min-width: 100% !important;
}

/* Sidebar must never force the page wider than the screen */
.admin-sidebar {
    max-width: 85vw !important;
    box-sizing: border-box !important;
}

@media (min-width: 768px) {
    .admin-main {
        width: calc(100vw - 260px) !important;
    }
}

@media (max-width: 767px) {
    .admin-main {
        width: 100vw !important;
    }
}
