/* Pelican Hill Inspired Luxury Design */
/* Warm coastal elegance with Mediterranean sophistication */

@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;500;600;700&family=Montserrat:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-orange: #C6930A;
    --warm-cream: #fbf9f5;
    --sand: #efefef;
    --navy: #2c4151;
    --warm-brown: #a3663e;
    --soft-gray: #6b6b6b;
    --light-border: #e5e1d8;
    --text-dark: #333333;
}

html {
    width: 100%;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.8;
    color: var(--text-dark);
    background: var(--warm-cream);
    width: 100%;
    max-width: 100vw;
}

/* Typography - Refined Serif Headlines */
h1, h2, h3, h4 {
    font-family: 'Lora', serif;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Header - Clean & Sophisticated */
header {
    background: white;
    color: var(--navy);
    padding: 1.5rem 3rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    border-bottom: 1px solid var(--light-border);
    transition: all 0.3s ease;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--navy);
}

#auth-buttons, #user-info {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* Auth buttons use navy instead of gold */
#auth-buttons .btn-primary,
#user-info .btn-primary {
    background: var(--navy);
}

#auth-buttons .btn-primary:hover,
#user-info .btn-primary:hover {
    background: #1e2f3d;
    box-shadow: 0 4px 12px rgba(44, 65, 81, 0.3);
}

#user-name {
    font-weight: 500;
    color: var(--navy);
    font-size: 0.95rem;
    letter-spacing: 0.05em;
}

.role-badge {
    background: var(--sand);
    color: var(--navy);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.1em;
}

/* Buttons - Understated Elegance */
.btn {
    padding: 0.9rem 2rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    background: #a67c08;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(198, 147, 10, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--navy);
    border: 2px solid var(--navy);
}

.btn-secondary:hover {
    background: var(--navy);
    color: white;
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

/* Hero Section - Full Bleed Elegance */
.hero {
    height: 85vh;
    background: linear-gradient(rgba(44, 65, 81, 0.4), rgba(44, 65, 81, 0.6)),
                url('/images/background.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-content {
    text-align: center;
    color: white;
    max-width: 900px;
    padding: 3rem;
}

.hero-content h2 {
    font-size: 3.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 0.1em;
    line-height: 1.3;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
    letter-spacing: 0.05em;
    line-height: 1.7;
    color: rgba(255,255,255,0.95);
}

.cta-button {
    padding: 1.1rem 2.5rem;
    background: var(--primary-orange);
    color: white;
    border: none;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: #a67c08;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(198, 147, 10, 0.4);
}

/* Dashboard - Spacious & Clean */
#dashboard {
    min-height: 80vh;
    padding: 4rem 3rem;
    background: var(--warm-cream);
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.dashboard-nav {
    display: flex;
    gap: 0;
    margin-bottom: 3rem;
    background: white;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    border: 1px solid var(--light-border);
}

.nav-btn {
    padding: 1.25rem 2.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--soft-gray);
    transition: all 0.3s ease;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-right: 1px solid var(--light-border);
}

.nav-btn:last-child {
    border-right: none;
}

.nav-btn:hover {
    color: var(--primary-orange);
    background: rgba(198, 147, 10, 0.03);
}

.nav-btn.active {
    color: var(--primary-orange);
    background: var(--sand);
    border-bottom: 3px solid var(--primary-orange);
}

.dashboard-view {
    display: none;
    animation: fadeIn 0.4s ease;
}

.dashboard-view.active {
    display: block;
}

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

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

.view-header h2 {
    color: var(--navy);
    font-size: 2.2rem;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Admin Tabs */
.admin-tabs {
    display: flex;
    gap: 0;
    margin: 2rem 0 3rem;
    background: white;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    border: 1px solid var(--light-border);
}

.admin-tab-btn {
    padding: 1rem 2rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--soft-gray);
    transition: all 0.3s ease;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-right: 1px solid var(--light-border);
}

.admin-tab-btn:last-child {
    border-right: none;
}

.admin-tab-btn:hover {
    color: var(--primary-orange);
    background: rgba(198, 147, 10, 0.03);
}

.admin-tab-btn.active {
    color: var(--primary-orange);
    background: var(--sand);
}

.admin-sub-view {
    display: none;
    animation: fadeIn 0.4s ease;
}

.admin-sub-view.active {
    display: block;
}

/* Booking Filters */
.booking-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--light-border);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--soft-gray);
    text-transform: uppercase;
}

.filter-input,
.filter-select {
    padding: 0.75rem;
    border: 1px solid var(--light-border);
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    background: white;
    transition: border-color 0.2s;
}

.filter-input:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary-orange);
}

.filter-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b6b6b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

.btn-clear-filters {
    padding: 0.75rem 1.5rem;
    background: white;
    color: var(--navy);
    border: 2px solid var(--navy);
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: auto;
}

.btn-clear-filters:hover {
    background: var(--navy);
    color: white;
}

@media (max-width: 768px) {
    .booking-filters {
        grid-template-columns: 1fr;
    }
}

/* House Cards - Refined */
.houses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.house-card {
    background: white;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
    border: 1px solid var(--light-border);
    display: flex;
    flex-direction: column;
}

.house-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.12);
}

.house-thumbnail {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: var(--light-border);
}

.house-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.house-card:hover .house-thumbnail img {
    transform: scale(1.05);
}

.house-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.house-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
    padding: 2rem 2rem 0;
    color: var(--navy);
    letter-spacing: 0.05em;
}

.house-card p {
    color: var(--text-dark);
    padding: 0 2rem;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.house-card .address {
    font-size: 0.85rem;
    color: var(--warm-brown);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0 2rem 2rem;
    font-weight: 600;
}

/* Booking Cards */
.booking-card {
    background: white;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border-radius: 0;
    border-left: 4px solid var(--primary-orange);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
}

.booking-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateX(5px);
}

.booking-pending {
    border-left-color: #f59e0b;
    background: linear-gradient(to right, #fffbeb 0%, white 100%);
}

.pending-separator {
    margin: 2.5rem 0;
    text-align: center;
    position: relative;
}

.pending-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--light-border), transparent);
}

.pending-separator span {
    position: relative;
    background: var(--warm-cream);
    padding: 0.5rem 2rem;
    color: var(--soft-gray);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

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

.booking-info h3 {
    color: var(--navy);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.booking-status {
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-approved {
    background: #d1fae5;
    color: #065f46;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.booking-dates {
    color: var(--navy);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.booking-dates strong {
    font-weight: 600;
    font-size: 1.25rem;
}

.booking-notes {
    color: var(--soft-gray);
    font-style: italic;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.booking-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.5rem 0;
}

.pagination-pages {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.pagination-btn {
    min-width: 40px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.pagination-btn.active {
    background: var(--primary-orange);
    color: white;
    border-color: var(--primary-orange);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ellipsis {
    color: var(--soft-gray);
    padding: 0 0.5rem;
}

/* Modal - Clean & Spacious */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 65, 81, 0.92);
    backdrop-filter: blur(8px);
    overflow: auto;
}

.modal.show {
    display: block;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

.modal-content {
    background: white;
    margin: 3rem auto;
    padding: 3rem;
    border-radius: 0;
    max-width: 700px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-content-wide {
    max-width: 1000px;
    width: 90%;
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--navy);
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--light-border);
    padding-bottom: 1rem;
}

.close {
    color: var(--soft-gray);
    float: right;
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

.close:hover {
    color: var(--primary-orange);
}

/* Forms - Elegant */
.form-group {
    margin-bottom: 1.75rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: var(--navy);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--light-border);
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(198, 147, 10, 0.1);
}

.form-footer {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--soft-gray);
    font-size: 0.9rem;
}

.form-footer a {
    color: var(--primary-orange);
    text-decoration: none;
    font-weight: 600;
}

.error-message {
    color: #ef4444;
    margin-top: 1rem;
    padding: 1rem;
    background: #fee2e2;
    border-radius: 4px;
    display: none;
    border-left: 4px solid #ef4444;
}

.error-message.show {
    display: block;
}

/* Users Table */
.users-table-container {
    overflow-x: auto;
    background: white;
    border-radius: 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    margin-top: 1.5rem;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table thead {
    background: var(--navy);
}

.users-table th {
    padding: 1rem 2rem;
    text-align: left;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.1);
}

.users-table td {
    padding: 1.5rem 2rem;
    vertical-align: middle;
    border: 1px solid var(--light-border);
}

.users-table tbody tr:hover {
    background: rgba(198, 147, 10, 0.02);
}

.users-table tr.clickable {
    cursor: pointer;
    transition: all 0.3s ease;
}

.users-table tr.clickable:hover {
    background: rgba(198, 147, 10, 0.05);
}

.houses-cell {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.house-assignment {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    align-items: center;
    padding: 0.5rem 0;
}

.house-assignment span:first-child {
    font-weight: 500;
    color: var(--navy);
}

.access-badge {
    display: inline-block;
    padding: 0.35rem 0.9rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    min-width: 60px;
    text-align: center;
}

.access-badge.booking {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.access-badge.admin {
    background: #fce7f3;
    color: #9f1239;
    border: 1px solid #f9a8d4;
}

.no-houses {
    color: var(--soft-gray);
    font-style: italic;
    font-size: 0.9rem;
    padding: 0.5rem 0;
}

/* Email Filters */
.email-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 2rem;
    background: white;
    border-radius: 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--navy);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.filter-group input[type="date"],
.filter-group input[type="text"],
.filter-group select {
    padding: 0.75rem 1rem;
    border: 1px solid var(--light-border);
    border-radius: 0;
    font-size: 0.95rem;
    background: white;
    transition: border-color 0.3s ease;
    height: 48px;
    box-sizing: border-box;
}

.filter-group input[type="date"]:focus,
.filter-group input[type="text"]:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary-orange);
}

.filter-group button {
    align-self: flex-end;
    margin-top: auto;
}

/* Bookings Table (for manual emails, etc.) */
.bookings-table-container {
    overflow-x: auto;
    background: white;
    border-radius: 0;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    margin-top: 1.5rem;
}

.bookings-table {
    width: 100%;
    border-collapse: collapse;
}

.bookings-table thead {
    background: var(--navy);
}

.bookings-table th {
    padding: 1rem 2rem;
    text-align: left;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    white-space: nowrap;
    border: 1px solid rgba(255,255,255,0.1);
}

.bookings-table td {
    padding: 1.5rem 2rem;
    vertical-align: middle;
    border: 1px solid var(--light-border);
}

.bookings-table td:nth-child(4),
.bookings-table td:nth-child(5) {
    padding: 1.5rem 1rem;
    white-space: nowrap;
}

.bookings-table tbody tr:hover {
    background: rgba(198, 147, 10, 0.02);
}

.bookings-table td button {
    white-space: nowrap;
    width: 240px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.75rem 1rem;
    text-align: center;
    box-sizing: border-box;
    display: inline-block;
}

.user-click-hint {
    color: var(--primary-orange);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s;
}

.user-click-hint:hover {
    opacity: 0.7;
}

.user-name-link {
    color: var(--navy);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 1rem;
}

.user-name-link:hover {
    color: var(--primary-orange);
}

.user-row .user-actions .btn {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
}

/* Profile Modals */
.profile-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.profile-section {
    background: var(--sand);
    padding: 2rem;
    border-radius: 0;
    border: 1px solid var(--light-border);
}

.profile-section h3 {
    margin: 0 0 1.5rem 0;
    color: var(--navy);
    font-size: 1.3rem;
    border-bottom: 2px solid var(--primary-orange);
    padding-bottom: 0.75rem;
    letter-spacing: 0.05em;
}

.house-access-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.house-access-item {
    background: white;
    padding: 1.25rem;
    border-radius: 0;
    border: 1px solid var(--light-border);
}

.house-access-item .house-name {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--navy);
    font-size: 1.05rem;
}

.access-checkboxes {
    display: flex;
    gap: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-orange);
}

.checkbox-label:hover {
    color: var(--primary-orange);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 2rem;
    border-top: 1px solid var(--light-border);
}

.my-house-access-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.my-house-item {
    background: white;
    padding: 1.25rem;
    border-radius: 0;
    border: 1px solid var(--light-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.my-house-item .house-name {
    font-weight: 600;
    color: var(--navy);
}

.my-house-item .house-badges {
    display: flex;
    gap: 0.5rem;
}

/* Calendar Styles */
.calendar-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.calendar-controls .btn-secondary {
    background: var(--navy);
    color: white;
    font-weight: 600;
    padding: 0.9rem 1.5rem;
    border: none;
}

.calendar-controls .btn-secondary:hover {
    background: var(--primary-orange);
}

.calendar-filter {
    padding: 0.75rem 1.25rem;
    border: 1px solid var(--light-border);
    border-radius: 4px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
}

.calendar-filter:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 3px rgba(198, 147, 10, 0.1);
}

.calendar-legend {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    border: 1px solid var(--light-border);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.legend-box {
    width: 24px;
    height: 24px;
    border-radius: 3px;
}

.legend-box.available,
.legend-available {
    background: #d1fae5;
    border: 2px solid #10b981;
}

.legend-box.selected {
    background: var(--primary-orange);
    border: 2px solid var(--primary-orange);
}

.legend-box.booked,
.legend-booked {
    background: #fee2e2;
    border: 2px solid #ef4444;
}

.legend-box.pending,
.legend-pending {
    background: #fef3c7;
    border: 2px solid #f59e0b;
}

#calendar-container {
    background: white;
    border-radius: 0;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid var(--light-border);
    max-width: 100%;
    box-sizing: border-box;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.75rem;
    width: 100%;
}

.calendar-header {
    text-align: center;
    font-weight: 700;
    padding: 1rem;
    background: var(--navy);
    color: white;
    border-radius: 0;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

.calendar-day {
    text-align: center;
    padding: 1rem 0.5rem;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--light-border);
    background: white;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    overflow: hidden;
    word-wrap: break-word;
}

.calendar-day.disabled {
    background: var(--sand);
    color: #d1d5db;
    cursor: not-allowed;
}

.calendar-day.available {
    background: #d1fae5;
    border-color: #10b981;
}

.calendar-day.available:hover {
    background: #a7f3d0;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.calendar-day.booked {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
    cursor: default;
}

.calendar-day.pending {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
    cursor: default;
}

.calendar-day-number {
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--navy);
}

.calendar-day-content {
    font-size: 0.75rem;
    text-align: center;
    line-height: 1.4;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.booking-guest {
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.calendar-day-content .booking-status {
    font-size: 0.7rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.calendar-day-content .booking-dates {
    font-size: 0.65rem;
    color: var(--soft-gray);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

/* Booking Modal Calendar */
.booking-modal-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2.5rem;
}

.booking-calendar-section {
    background: var(--sand);
    padding: 2rem;
    border-radius: 0;
    border: 1px solid var(--light-border);
    max-width: 100%;
    box-sizing: border-box;
}

.booking-details-section {
    display: flex;
    flex-direction: column;
}

.booking-calendar-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.booking-calendar-controls h3 {
    font-size: 1.5rem;
    color: var(--navy);
}

.booking-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    background: white;
    padding: 1.5rem;
    border-radius: 0;
    border: 1px solid var(--light-border);
    width: 100%;
    box-sizing: border-box;
}

.booking-calendar-header {
    text-align: center;
    font-weight: 700;
    padding: 0.75rem;
    color: var(--navy);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.booking-calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.booking-calendar-day.empty {
    background: transparent;
}

.booking-calendar-day.available {
    background: #d1fae5;
    cursor: pointer;
    border-color: #10b981;
}

.booking-calendar-day.available:hover {
    background: #a7f3d0;
    transform: scale(1.1);
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.2);
}

.booking-calendar-day.disabled {
    background: var(--sand) !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
    border-color: #d1d5db !important;
}

.booking-calendar-day.booked {
    background: #fee2e2 !important;
    color: #991b1b !important;
    cursor: not-allowed !important;
    border-color: #ef4444 !important;
}

.booking-calendar-day.pending-reservation {
    background: #fef3c7 !important;
    color: #92400e !important;
    cursor: not-allowed !important;
    border-color: #f59e0b !important;
}

.booking-calendar-day.selected {
    background: var(--primary-orange) !important;
    color: white;
    font-weight: 700;
    border-color: var(--primary-orange);
}

.booking-calendar-day.in-range {
    background: #fef3c7 !important;
    color: var(--navy);
    border-color: var(--primary-orange);
}

.booking-calendar-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--light-border);
}

.scroll-indicator {
    display: none;
    text-align: center;
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(to bottom, transparent, rgba(198, 147, 10, 0.05));
    border-radius: 8px;
}

.scroll-indicator-top {
    margin-top: 0;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fffbf0 0%, #fff4d6 100%);
    border-left: 4px solid var(--primary-orange);
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 8px rgba(198, 147, 10, 0.1);
}

.scroll-indicator p {
    color: var(--navy);
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0;
    letter-spacing: 0.02em;
}

.scroll-arrow {
    display: none;
}

.selected-dates-display {
    background: var(--sand);
    padding: 1.5rem;
    border-radius: 0;
    margin-bottom: 1.5rem;
    border: 1px solid var(--light-border);
}

.selected-dates-display h4 {
    margin: 0 0 0.75rem 0;
    color: var(--navy);
    font-size: 1.1rem;
}

/* Footer - Minimal */
footer {
    background: var(--navy);
    color: white;
    text-align: center;
    padding: 3rem;
    margin-top: 6rem;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
}

/* Responsive */
@media (max-width: 768px) {
    /* Header - Mobile Optimized */
    header {
        padding: 0.75rem 1rem;
        position: static;
        box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    }

    .header-content {
        flex-direction: column;
        gap: 0.75rem;
    }

    header h1 {
        font-size: 1rem;
        text-align: center;
        letter-spacing: 0.1em;
    }

    #auth-buttons, #user-info {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }

    #auth-buttons .btn,
    #user-info .btn {
        width: 100%;
        padding: 0.8rem 1.5rem;
        font-size: 0.8rem;
    }

    .role-badge {
        text-align: center;
    }

    /* Hero - Mobile */
    .hero {
        height: 60vh;
        min-height: 400px;
    }

    .hero-content {
        padding: 1.5rem;
    }

    .hero-content h2 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .cta-button {
        padding: 0.9rem 2rem;
        font-size: 0.8rem;
        width: 100%;
    }

    /* Dashboard - Mobile */
    #dashboard {
        padding: 2rem 0.5rem;
    }

    .dashboard-container {
        width: 100%;
        max-width: 100%;
        padding: 0;
    }

    .dashboard-nav {
        flex-direction: column;
        gap: 0;
    }

    .nav-btn {
        padding: 1rem 1.5rem;
        font-size: 0.75rem;
        border-right: none;
        border-bottom: 1px solid var(--light-border);
    }

    .nav-btn:last-child {
        border-bottom: none;
    }

    .view-header {
        flex-direction: column;
        gap: 1.5rem;
        align-items: flex-start;
        width: 100%;
    }

    .view-header h2 {
        font-size: 1.6rem;
        width: 100%;
    }

    .view-header .btn {
        width: 100%;
    }

    .view-header .calendar-controls {
        width: 100%;
    }

    /* Admin Tabs - Mobile */
    .admin-tabs {
        flex-direction: column;
        gap: 0;
    }

    .admin-tab-btn {
        padding: 0.9rem 1.5rem;
        font-size: 0.75rem;
        border-right: none;
        border-bottom: 1px solid var(--light-border);
    }

    .admin-tab-btn:last-child {
        border-bottom: none;
    }

    /* House Cards - Mobile */
    .houses-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .house-card h3 {
        font-size: 1.3rem;
        padding: 1.5rem 1.5rem 0;
    }

    .house-card p {
        padding: 0 1.5rem;
        font-size: 0.9rem;
    }

    .house-card .address {
        padding: 0 1.5rem 1.5rem;
    }

    /* Booking Cards - Mobile */
    .booking-card {
        padding: 1.5rem;
    }

    .booking-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .booking-actions {
        flex-direction: column;
        width: 100%;
    }

    .booking-actions .btn {
        width: 100%;
    }

    /* Modals - Mobile */
    .modal-content {
        margin: 1rem;
        padding: 1.5rem;
        width: calc(100% - 2rem);
        max-width: none;
        border: 3px solid var(--primary-orange);
    }

    .modal-content-wide {
        width: calc(100% - 2rem);
        max-width: none;
        border: 3px solid var(--primary-orange);
    }

    .modal-content h2 {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
        background: var(--navy);
        color: white;
        padding: 1rem;
        margin: -1.5rem -1.5rem 1.5rem -1.5rem;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    .close {
        font-size: 28px;
        color: white;
        position: relative;
        z-index: 11;
    }

    /* Forms - Mobile */
    .form-group {
        margin-bottom: 1.25rem;
    }

    .form-group label {
        font-size: 0.8rem;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 0.85rem;
        font-size: 0.95rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.8rem;
    }

    /* Profile Sections - Mobile */
    .profile-sections {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .profile-section {
        padding: 1.5rem;
    }

    .profile-section h3 {
        font-size: 1.1rem;
    }

    .access-checkboxes {
        flex-direction: column;
        gap: 1rem;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .btn {
        width: 100%;
    }

    /* Users Table - Mobile */
    .user-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1rem 1.5rem;
    }

    .user-row > div {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }

    .user-row > div::before {
        content: attr(data-label);
        font-weight: 700;
        color: var(--navy);
        font-size: 0.7rem;
        text-transform: uppercase;
        letter-spacing: 0.1em;
    }

    .user-row-header {
        display: none;
    }

    .user-actions {
        flex-direction: column;
    }

    .user-actions .btn {
        width: 100%;
    }

    /* Booking dates - smaller font on mobile */
    .booking-dates {
        font-size: 1rem;
    }

    .booking-dates strong {
        font-size: 1rem;
    }

    /* Pagination - arrows only on mobile for Previous/Next buttons */
    .pagination-btn:not(.pagination-pages .pagination-btn) {
        font-size: 0 !important;
        text-indent: -9999px;
        overflow: hidden;
        position: relative;
        padding: 0.75rem;
        min-width: 50px;
    }

    .pagination-btn:not(.pagination-pages .pagination-btn)::after {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        font-size: 1.5rem;
        text-indent: 0;
    }

    .pagination .pagination-btn:first-child::after {
        content: "←";
    }

    .pagination .pagination-btn:last-child::after {
        content: "→";
    }

    /* Calendar Controls - Mobile */
    .calendar-controls {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        align-items: stretch;
        width: 100%;
    }

    .calendar-controls .btn-secondary {
        padding: 0.8rem 1rem;
        font-size: 0.75rem;
    }

    /* Dropdown - Row 1, full width */
    .calendar-filter {
        width: 100%;
        padding: 0.85rem;
        box-sizing: border-box;
        grid-column: 1 / -1;
        order: 1;
    }

    /* Month/Year - Row 2, full width, centered */
    #calendar-month-year {
        text-align: center;
        display: block;
        width: 100%;
        font-size: 1.3rem !important;
        margin: 0.5rem 0 !important;
        grid-column: 1 / -1;
        order: 2;
    }

    /* Previous button - Row 3, left side */
    .calendar-controls .btn-secondary:first-of-type {
        order: 3;
        grid-column: 1;
    }

    /* Next button - Row 3, right side */
    .calendar-controls .btn-secondary:last-of-type {
        order: 4;
        grid-column: 2;
    }

    /* Calendar Legend - Mobile */
    .calendar-legend {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 1rem;
    }

    .legend-item {
        font-size: 0.75rem;
        gap: 0.5rem;
    }

    .legend-box {
        width: 20px;
        height: 20px;
    }

    /* Calendar Grid - Mobile */
    #calendar-container {
        padding: 1vw;
        box-sizing: border-box;
        width: 100%;
        margin: 0 auto;
    }

    .calendar-grid {
        gap: 0.3vw;
        width: 100%;
        box-sizing: border-box;
    }

    .calendar-day {
        padding: 1vw 0.5vw;
        min-height: auto;
        aspect-ratio: 1;
        font-size: 1.8vw;
        box-sizing: border-box;
        overflow: hidden;
        word-wrap: break-word;
    }

    .calendar-day-number {
        font-size: 2.2vw;
        margin-bottom: 0.5vw;
        width: 100%;
    }

    .calendar-day-content {
        font-size: 1.4vw;
        line-height: 1.2;
        width: 100%;
        overflow: hidden;
    }

    .booking-guest {
        font-size: 1.6vw;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
        margin-bottom: 0;
    }

    /* Hide status and dates on mobile calendar - only show guest name */
    .calendar-day-content .booking-status {
        display: none;
    }

    .calendar-day-content .booking-dates {
        display: none;
    }

    .calendar-header {
        padding: 1.5vw 0.5vw;
        font-size: 1.6vw;
        box-sizing: border-box;
    }

    /* Booking Modal - Mobile */
    .booking-modal-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .booking-calendar-section {
        padding: 1vw;
        box-sizing: border-box;
        width: 100%;
    }

    .booking-calendar-controls {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        align-items: center;
        width: 100%;
    }

    .booking-calendar-controls span {
        font-size: 1.1rem;
        text-align: center;
        grid-column: 1 / -1;
        margin: 0 0 0.75rem 0;
        order: 1;
        font-weight: 600;
        color: var(--navy);
    }

    .booking-calendar-controls h3 {
        font-size: 1.1rem;
        text-align: center;
        grid-column: 1 / -1;
        margin: 0 0 0.75rem 0;
        order: 1;
    }

    .booking-calendar-controls .btn {
        padding: 0.75rem 0.5rem;
        font-size: 0.7rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-width: 0;
    }

    .booking-calendar-controls .btn:first-of-type {
        order: 2;
    }

    .booking-calendar-controls .btn:last-of-type {
        order: 3;
    }

    .booking-calendar-grid {
        padding: 1vw;
        gap: 0.4vw;
        box-sizing: border-box;
        width: 100%;
    }

    .booking-calendar-header {
        font-size: 1.8vw;
        padding: 1.5vw 0.5vw;
        box-sizing: border-box;
    }

    .booking-calendar-day {
        font-size: 2.5vw;
        padding: 0;
        box-sizing: border-box;
    }

    .booking-calendar-legend {
        flex-wrap: wrap;
        gap: 1rem;
        padding-top: 1rem;
    }

    /* Show scroll indicator on mobile */
    .scroll-indicator-top {
        display: block;
    }

    /* Hide the bottom one on mobile, keep the top one */
    .booking-calendar-section .scroll-indicator {
        display: none;
    }

    .selected-dates-display {
        padding: 1rem;
    }

    .selected-dates-display h4 {
        font-size: 0.95rem;
    }

    /* Footer - Mobile */
    footer {
        padding: 2rem 1rem;
        font-size: 0.8rem;
        margin-top: 3rem;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    header h1 {
        font-size: 1rem;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

    .view-header h2 {
        font-size: 1.3rem;
    }

    #dashboard {
        padding: 1.5rem 0.5rem;
    }

    .modal-content {
        margin: 0.5rem;
        padding: 1rem;
        width: calc(100% - 1rem);
        box-sizing: border-box;
    }

    /* Smaller arrow size for pagination on very small screens */
    .pagination-btn:not(.pagination-pages .pagination-btn)::after {
        font-size: 1.3rem;
    }

    /* Extra small mobile - even tighter spacing for calendar controls */
    .calendar-controls {
        gap: 0.5rem;
    }

    .calendar-controls .btn-secondary {
        padding: 0.6rem 0.8rem;
        font-size: 0.7rem;
    }

    #calendar-month-year {
        font-size: 1.1rem !important;
        margin: 0.3rem 0 !important;
    }

    #calendar-container {
        padding: 0.8vw;
        margin: 0;
    }

    .calendar-grid {
        gap: 0.25vw;
    }

    .calendar-day {
        min-height: auto;
        aspect-ratio: 1;
        padding: 0.8vw 0.4vw;
        overflow: hidden;
    }

    .calendar-day-number {
        font-size: 2vw;
        width: 100%;
    }

    .calendar-day-content {
        font-size: 1.2vw;
        width: 100%;
        overflow: hidden;
    }

    .booking-guest {
        font-size: 1.5vw;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-bottom: 0;
    }

    /* Hide status and dates on small mobile calendar - only show guest name */
    .calendar-day-content .booking-status {
        display: none;
    }

    .calendar-day-content .booking-dates {
        display: none;
    }

    .calendar-header {
        padding: 1.2vw 0.4vw;
        font-size: 1.5vw;
    }

    .booking-calendar-section {
        padding: 0.8vw;
    }

    /* Extra small mobile - tighter booking calendar controls */
    .booking-calendar-controls {
        gap: 0.5rem;
    }

    .booking-calendar-controls .btn {
        padding: 0.6rem 0.3rem;
        font-size: 0.65rem;
    }

    .booking-calendar-controls span,
    .booking-calendar-controls h3 {
        font-size: 1rem;
        margin: 0 0 0.5rem 0;
    }

    .booking-calendar-grid {
        gap: 0.3vw;
        padding: 0.8vw;
    }

    .booking-calendar-day {
        font-size: 2.3vw;
        padding: 0;
    }

    .booking-calendar-header {
        font-size: 1.6vw;
        padding: 1.2vw 0.4vw;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.loading-spinner {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.loading-spinner p {
    margin-top: 1rem;
    color: #2c4151;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 1.1rem;
}

.spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto;
    border: 4px solid #efefef;
    border-top: 4px solid #C6930A;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success Popup */
.success-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease-in-out;
}

.success-popup.show {
    opacity: 1;
    transform: translateX(0);
}

.success-popup-content {
    background: white;
    border-left: 4px solid #4caf50;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 300px;
}

.success-icon {
    background: #4caf50;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.success-message {
    color: var(--text-dark);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .success-popup {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .success-popup-content {
        min-width: auto;
    }
}
