/* ===================================================================
   VILLA BOOKING — Global Stylesheet
   =================================================================== */

/* --- Base & Reset --- */
:root {
    --color-primary: #0f172a;
    --color-primary-light: #1e293b;
    --color-accent: #0ea5e9;
    --color-accent-hover: #0284c7;
    --color-surface: #ffffff;
    --color-surface-alt: #f8fafc;
    --color-border: #e2e8f0;
    --color-text: #334155;
    --color-text-light: #64748b;
    --color-text-heading: #0f172a;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow-xs: 0 1px 2px rgba(15,23,42,0.04);
    --shadow-sm: 0 1px 3px rgba(15,23,42,0.06), 0 1px 2px rgba(15,23,42,0.04);
    --shadow-md: 0 4px 6px -1px rgba(15,23,42,0.07), 0 2px 4px -2px rgba(15,23,42,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(15,23,42,0.08), 0 4px 6px -4px rgba(15,23,42,0.04);
    --shadow-xl: 0 20px 25px -5px rgba(15,23,42,0.1), 0 8px 10px -6px rgba(15,23,42,0.06);
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    position: relative;
    min-height: 100%;
}

body {
    font-family: var(--font-family);
    color: var(--color-text);
    background: var(--color-surface-alt);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.25);
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ===================================================================
   LAYOUT — Navbar
   =================================================================== */
.site-navbar {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.75rem 0;
    transition: background 0.3s var(--ease);
}

.site-logo {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff !important;
    letter-spacing: -0.5px;
    text-decoration: none;
}

.site-logo i {
    color: var(--color-accent);
}

.logo-accent {
    color: var(--color-accent);
}

.navbar-toggler {
    color: #ffffff;
}

.nav-link-custom {
    color: rgba(255, 255, 255, 0.75) !important;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: all 0.2s var(--ease);
}

.nav-link-custom:hover,
.nav-link-custom:focus {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.08);
}

/* ===================================================================
   LAYOUT — Footer
   =================================================================== */
.site-footer {
    background: var(--color-primary);
    color: rgba(255, 255, 255, 0.7);
    padding: 3rem 0;
    margin-top: 0;
}

.footer-brand {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 0.5rem;
}

.footer-tagline {
    font-size: 0.875rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.5);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s var(--ease);
}

.footer-links a:hover {
    color: var(--color-accent);
}

.footer-copy {
    font-size: 0.8125rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.4);
}

/* ===================================================================
   HERO SECTION
   =================================================================== */
.hero-section {
    margin-top: 56px; /* offset for fixed navbar */
}

.hero-panel {
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 50%, transparent 30%, rgba(0,0,0,0.4) 100%);
    pointer-events: none;
}

.min-vh-hero {
    min-height: 600px;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    padding: 0.5rem 1.125rem;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 1.5rem;
}

.hero-heading {
    font-size: 3.75rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 1.5rem;
}

.hero-heading-accent {
    background: linear-gradient(135deg, var(--color-accent) 0%, #38bdf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.7;
    max-width: 520px;
    margin-bottom: 2rem;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    background: var(--color-accent);
    color: #ffffff;
    border: none;
    padding: 0.875rem 2rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s var(--ease);
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.4);
}

.btn-hero:hover {
    background: var(--color-accent-hover);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5);
}

.hero-nav {
    width: 48px;
    opacity: 1;
}

.hero-nav-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: #ffffff;
    font-size: 1.125rem;
    transition: all 0.2s var(--ease);
}

.hero-nav:hover .hero-nav-icon {
    background: rgba(255, 255, 255, 0.2);
}

.hero-indicators .active {
    background-color: var(--color-accent);
}

.carousel-fade .carousel-item {
    transition: opacity 0.8s ease-in-out;
}

.hero-content-enter {
    animation: heroFadeIn 0.7s ease-out;
}

@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ===================================================================
   LISTINGS SECTION
   =================================================================== */
.listings-section {
    padding: 5rem 0 4rem;
    background: var(--color-surface-alt);
}

.section-eyebrow {
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-accent);
    margin-bottom: 0.75rem;
}

.section-heading {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-text-heading);
    letter-spacing: -0.75px;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-desc {
    font-size: 1.0625rem;
    color: var(--color-text-light);
    line-height: 1.7;
    margin-bottom: 0;
}

/* Alert */
.alert-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #dc3545;
    font-size: 1.125rem;
}

/* Empty State */
.empty-state-card {
    background: var(--color-surface);
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-lg);
    padding: 3.5rem 2rem;
}

.empty-icon-wrap {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--color-surface-alt);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--color-text-light);
}

/* ===================================================================
   VILLA CARD
   =================================================================== */
.v-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-xs);
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
    display: flex;
    flex-direction: column;
}

.v-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.v-card-media {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: var(--color-surface-alt);
}

.v-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease);
}

.v-card:hover .v-card-img {
    transform: scale(1.05);
}

.v-card-img-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e293b, #334155);
    color: rgba(255, 255, 255, 0.3);
    font-size: 3rem;
}

.v-card-price {
    position: absolute;
    bottom: 0.875rem;
    left: 0.875rem;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    letter-spacing: -0.25px;
}

.v-card-price-unit {
    font-weight: 400;
    font-size: 0.8125rem;
    opacity: 0.7;
    margin-left: 1px;
}

.v-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 0.75rem;
}

.v-card-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-heading);
    margin: 0;
    line-height: 1.3;
}

.v-card-detail {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.65;
    margin: 0;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.v-card-meta {
    display: flex;
    gap: 1.25rem;
    padding: 0.875rem 0;
    border-top: 1px solid var(--color-border);
}

.v-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-text-light);
}

.v-meta-item i {
    color: var(--color-accent);
    font-size: 0.9375rem;
}

.btn-contact-villa {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--color-primary);
    color: #ffffff;
    border: none;
    padding: 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all 0.25s var(--ease);
}

.btn-contact-villa:hover {
    background: var(--color-accent);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

/* ===================================================================
   STATS STRIP
   =================================================================== */
.stats-strip {
    margin-top: 4rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-sm);
}

.s-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 0;
}

.s-stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.375rem;
    flex-shrink: 0;
}

.s-stat-icon--blue  { background: #e0f2fe; color: #0284c7; }
.s-stat-icon--green { background: #dcfce7; color: #16a34a; }
.s-stat-icon--violet { background: #ede9fe; color: #7c3aed; }
.s-stat-icon--amber { background: #fef3c7; color: #d97706; }

.s-stat-body {
    display: flex;
    flex-direction: column;
}

.s-stat-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text-heading);
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.s-stat-label {
    font-size: 0.8125rem;
    color: var(--color-text-light);
    font-weight: 500;
    margin-top: 2px;
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 1200px) {
    .hero-heading {
        font-size: 3rem;
    }
}

@media (max-width: 992px) {
    .min-vh-hero {
        min-height: 480px;
    }

    .hero-heading {
        font-size: 2.5rem;
    }

    .section-heading {
        font-size: 2rem;
    }

    .stats-strip {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .min-vh-hero {
        min-height: 420px;
    }

    .hero-heading {
        font-size: 2rem;
        letter-spacing: -0.75px;
    }

    .hero-text {
        font-size: 1rem;
    }

    .hero-badge {
        font-size: 0.75rem;
    }

    .hero-nav {
        display: none;
    }

    .listings-section {
        padding: 3rem 0 2.5rem;
    }

    .section-heading {
        font-size: 1.75rem;
    }

    .stats-strip {
        padding: 1.5rem 1rem;
    }

    .s-stat {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: start;
    }
}

@media (max-width: 576px) {
    .min-vh-hero {
        min-height: 380px;
    }

    .hero-heading {
        font-size: 1.75rem;
    }

    .hero-text {
        font-size: 0.9375rem;
    }

    .btn-hero {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }

    .v-card-content {
        padding: 1.25rem;
    }

    .section-heading {
        font-size: 1.5rem;
    }
}

/* ===================================================================
   VILLA MANAGEMENT — Scoped Styles
   =================================================================== */
.villa-mgmt-header {
    padding: 7rem 0 2.5rem;
    background: var(--color-primary);
    color: #ffffff;
}

.villa-mgmt-header .section-eyebrow {
    color: rgba(255, 255, 255, 0.5);
}

.villa-mgmt-header .section-heading {
    color: #ffffff;
    font-size: 2.25rem;
}

.villa-mgmt-header .section-desc {
    color: rgba(255, 255, 255, 0.6);
}

.villa-mgmt-content {
    padding: 2.5rem 0 3rem;
}

/* Alert success icon variant */
.alert-icon-wrap--success {
    background: rgba(22, 163, 74, 0.1);
    color: #16a34a;
}

/* Table card */
.villa-table-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.villa-table {
    font-size: 0.9rem;
}

.villa-table thead {
    background: var(--color-surface-alt);
}

.villa-table thead th {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-light);
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--color-border);
}

.villa-table tbody td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.villa-table tbody tr {
    transition: background 0.15s var(--ease);
}

.villa-table tbody tr:last-child td {
    border-bottom: none;
}

.villa-table tbody tr:hover {
    background: var(--color-surface-alt);
}

/* Table image thumbnail */
.villa-table-thumb {
    width: 56px;
    height: 42px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.villa-table-thumb-empty {
    width: 56px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #1e293b, #334155);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.35);
    font-size: 1rem;
}

/* Table name */
.villa-table-name {
    font-weight: 700;
    color: var(--color-text-heading);
    font-size: 0.9rem;
}

/* Table rate badge */
.villa-table-rate {
    display: inline-block;
    background: #dcfce7;
    color: #16a34a;
    font-size: 0.8125rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
}

/* Action buttons */
.villa-table-actions {
    display: inline-flex;
    gap: 0.375rem;
}

.villa-action-btn {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    transition: all 0.2s var(--ease);
    text-decoration: none;
}

.villa-action-btn--edit {
    background: #fef3c7;
    color: #d97706;
}

.villa-action-btn--edit:hover {
    background: #d97706;
    color: #ffffff;
}

.villa-action-btn--delete {
    background: #fee2e2;
    color: #dc2626;
}

.villa-action-btn--delete:hover {
    background: #dc2626;
    color: #ffffff;
}

/* Responsive — Villa Management */
@media (max-width: 768px) {
    .villa-mgmt-header {
        padding: 6rem 0 2rem;
        text-align: center;
    }

    .villa-mgmt-header .row {
        flex-direction: column;
        gap: 1.25rem;
    }

    .villa-mgmt-header .col-auto {
        width: 100%;
    }

    .villa-mgmt-header .btn-hero {
        width: 100%;
        justify-content: center;
    }

    .villa-mgmt-content {
        padding: 1.5rem 0 2rem;
    }
}

/* ===================================================================
   AUTH PAGES — Scoped Styles
   =================================================================== */
.auth-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    animation: authFadeIn 0.5s var(--ease) both;
}

@keyframes authFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #e0f2fe;
    color: var(--color-accent);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-light);
    font-size: 1rem;
    pointer-events: none;
    transition: color 0.2s var(--ease);
    z-index: 2;
}

.auth-input {
    padding-left: 2.75rem !important;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.auth-input:focus ~ .auth-input-icon,
.auth-input-wrap:focus-within .auth-input-icon {
    color: var(--color-accent);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.auth-divider span {
    font-size: 0.8125rem;
    color: var(--color-text-light);
    font-weight: 500;
    text-transform: lowercase;
}

/* ===================================================================
   NAVBAR — Auth & User Dropdown Polish
   =================================================================== */
.nav-avatar-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.875rem;
    transition: background 0.2s var(--ease);
}

.nav-user-toggle {
    color: rgba(255, 255, 255, 0.8) !important;
    padding: 0.375rem 0.5rem !important;
    border-radius: var(--radius-sm);
    transition: all 0.2s var(--ease);
}

.nav-user-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

.nav-user-toggle:hover .nav-avatar-badge {
    background: rgba(255, 255, 255, 0.2);
}

.nav-user-name {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
}

.nav-dropdown {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    padding: 0.25rem 0;
    animation: dropdownFadeIn 0.2s var(--ease);
}

.logout-link {
    color: #dc3545 !important;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

