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

:root {
    --theme-bg: #f9f9f9;
    --theme-primary: #d1f7c4;
    --theme-text: #1c1c1e;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--theme-text);
    background-color: var(--theme-bg);
}

.bg-theme-bg {
    background-color: #f7f9fb;
}

.bg-theme-primary {
    background-color: var(--theme-primary);
}

.text-theme-dark {
    color: #1a1a1c;
}

/* Navbar Search and Icons */
.search-input {
    font-size: 0.9rem;
    padding-left: 0;
}
.search-input:focus {
    box-shadow: none;
    border-color: var(--bs-border-color);
}
.input-group-text, .search-input {
    background-color: #f4f5f7 !important;
}

.icon-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border: 1px solid #eaeaea;
}

.icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    font-size: 1.1rem;
}

.line-height-sm {
    line-height: 1.2;
}

/* Secondary Nav */
.nav-link {
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    font-size: 0.95rem;
    transition: color 0.1s;
}
.nav-link.text-dark {
    border-bottom: 2px solid var(--theme-text);
    color: var(--theme-text) !important;
}
.nav-link.text-muted:hover {
    color: var(--theme-text) !important;
}

/* Cards & Styling */
.stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card:hover, .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.04) !important;
}

/* General Typography overrides */
h1, h2, h3, h4, h5, h6 {
    color: #1a1a1c;
    letter-spacing: -0.02em;
}

/* Table Tweaks for matching the aesthetic */
table.table {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}
.table thead th {
    background-color: #f7f9fb !important;
    border-bottom: none !important;
    color: #8c8c8c;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 12px 16px;
}
.table tbody td {
    padding: 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
}

/* Primary Button Styling */
.btn-primary {
    background-color: #cdec85;
    border-color: #cdec85;
    color: #273809;
}
.btn-primary:hover {
    background-color: #bae060;
    border-color: #bae060;
    color: #192505;
}

/* ── Mobile Responsive ───────────────────────────────────────────────── */

/* Secondary nav: horizontal scroll on small screens */
.secondary-nav-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    scrollbar-width: none;
}
.secondary-nav-scroll::-webkit-scrollbar { display: none; }
.secondary-nav-scroll .nav {
    flex-wrap: nowrap;
    display: inline-flex;
    min-width: 100%;
}

/* Make billing/tables responsive on mobile */
.table-responsive-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
}

/* Notification Bell */
#notifBell { cursor: pointer; transition: transform .2s; }

/* ── Responsive Breakpoints ──────────────────────────────────────────── */
@media (max-width: 767.98px) {
    /* Navbar: hide search bar on mobile */
    .navbar-search { display: none !important; }

    /* Compact navbar actions */
    .navbar-actions .line-height-sm { display: none; }
    .navbar .container { flex-wrap: nowrap; gap: 8px; padding-left: 12px; padding-right: 12px; }

    /* Secondary nav font size */
    .nav-link { font-size: 0.85rem; padding: 0.6rem 0.85rem; }

    /* Page containers - reduce side padding */
    .container.px-4 { padding-left: 16px !important; padding-right: 16px !important; }

    /* Card grids - single column on phones */
    .rooms-grid,
    .guests-grid,
    .bookings-grid { grid-template-columns: 1fr !important; }

    /* Stat cards on dashboard - 2 columns */
    .stats-row { --bs-gutter-x: 12px; }
    .stats-row > [class*="col-"] { padding-left: 6px; padding-right: 6px; margin-bottom: 12px; }

    /* Stack form labels above inputs */
    .form-group-row { flex-direction: column !important; }

    /* Page titles smaller */
    h2.fw-bold { font-size: 1.3rem; }
    h4.fw-bold { font-size: 1.1rem; }

    /* Invoice print page: no padding on mobile */
    .inv-body { padding: 20px 16px !important; }
    .inv-header { padding: 20px 16px !important; flex-wrap: wrap; gap: 12px; }
    .parties { grid-template-columns: 1fr !important; }
    .stay-bar { flex-wrap: wrap; gap: 12px; }
    .stay-item { min-width: 80px; }
    .totals { flex-direction: column; }
    .totals-inner { min-width: unset; width: 100%; }

    /* Booking form: full width on mobile */
    #bookingForm .container { max-width: 100% !important; }
}

@media (max-width: 991.98px) {
    /* 2-column card grids on tablets */
    .rooms-grid  { grid-template-columns: repeat(2, 1fr) !important; }
    .guests-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

/* Card grids with CSS grid */
.rooms-grid,
.guests-grid,
.bookings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}
