/* ============================================================
   SBooking core styles: tokens, base, navbar, footer, forms,
   buttons, badges, toasts, admin, shell, host pages.
   Component styles live in ./components/ (bookings, property-card,
   chat, reviews, empty-state). Read docs/UI-GUIDE.md before adding UI.
   ============================================================ */
@import url("components/property-card.css");
@import url("components/chat.css");
@import url("components/reviews.css");
@import url("components/bookings.css");
@import url("components/empty-state.css");
@import url("components/map.css");
@import url("components/newsletter.css");

:root {
    --sb-primary: #0b3d91;
    --sb-primary-dark: #082d6e;
    --sb-primary-soft: #e8eefb;
    --sb-accent: #ffb703;
    --sb-accent-dark: #e09f00;
    --sb-bg: #f4f6f9;
    --sb-surface: #ffffff;
    --sb-text: #1a2332;
    --sb-muted: #6b7280;
    --sb-border: #e5e7eb;
    --sb-radius: 14px;
    --sb-shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 8px 24px rgba(16, 24, 40, .06);
    --sb-shadow-lg: 0 12px 40px rgba(16, 24, 40, .14);
}

* { box-sizing: border-box; }

body {
    background: var(--sb-bg);
    color: var(--sb-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1; }

/* Links are never underlined (design rule); components keep their own styles. */
a { text-decoration: none; }
a:hover { text-decoration: none; }

/* ---------- Navbar ---------- */
.sb-navbar {
    background: var(--sb-primary);
    padding-top: .75rem;
    padding-bottom: .75rem;
    box-shadow: 0 2px 12px rgba(11, 61, 145, .25);
}
.sb-navbar .nav-link { color: rgba(255, 255, 255, .85); font-weight: 500; }
.sb-navbar .nav-link:hover { color: #fff; }
.sb-navbar .navbar-text { color: rgba(255, 255, 255, .85); }
.sb-navbar .navbar-toggler { border-color: rgba(255, 255, 255, .4); }

.sb-brand {
    color: #fff !important;
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -.02em;
}
.sb-brand-mark {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: var(--sb-accent);
    color: #1a2332;
    font-weight: 900;
    margin-right: .4rem;
    vertical-align: -6px;
}

/* ---------- Footer ---------- */
.sb-footer {
    background: var(--sb-surface);
    border-top: 1px solid var(--sb-border);
    padding: 1.5rem 0;
    color: var(--sb-muted);
    font-size: .9rem;
}
.sb-footer-note { opacity: .8; }

.sb-py { padding-top: 3rem; padding-bottom: 3rem; }

/* ---------- Hero + search ---------- */
.sb-hero {
    background: linear-gradient(135deg, var(--sb-primary) 0%, #1c5bd4 55%, #2f74e8 100%);
    color: #fff;
    padding: 4rem 0 5.5rem;
    position: relative;
    overflow: hidden;
}
.sb-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.12) 1px, transparent 1px);
    background-size: 26px 26px;
    opacity: .5;
}
.sb-hero h1 { font-weight: 800; letter-spacing: -.03em; }
.sb-hero .lead { color: rgba(255, 255, 255, .85); }

.sb-search-card {
    background: #fff;
    border-radius: var(--sb-radius);
    box-shadow: var(--sb-shadow-lg);
    padding: 1.25rem;
    margin-top: -3rem;
    position: relative;
    z-index: 2;
}
.sb-search-card .form-label { font-weight: 600; font-size: .85rem; color: var(--sb-muted); margin-bottom: .35rem; }

/* ---------- Buttons ---------- */
.btn-primary {
    background: var(--sb-primary);
    border-color: var(--sb-primary);
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--sb-primary-dark);
    border-color: var(--sb-primary-dark);
}
.btn-accent {
    background: var(--sb-accent);
    border-color: var(--sb-accent);
    color: #1a2332;
    font-weight: 600;
}
.btn-accent:hover { background: var(--sb-accent-dark); border-color: var(--sb-accent-dark); color: #1a2332; }

/* ---------- Property detail ---------- */
.sb-detail-hero {
    background: linear-gradient(135deg, #0e2f6e, #1c5bd4);
    color: #fff;
    padding: 2.5rem 0;
}
.sb-detail-hero h1 { font-weight: 800; }
.sb-amenity-chip {
    display: inline-block;
    background: var(--sb-primary-soft);
    color: var(--sb-primary);
    padding: .3rem .8rem;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 500;
    margin: 0 .35rem .35rem 0;
}
.sb-room-card {
    background: var(--sb-surface);
    border: 1px solid var(--sb-border);
    border-radius: var(--sb-radius);
    padding: 1.25rem;
    box-shadow: var(--sb-shadow);
}
.sb-room-price-line { color: var(--sb-muted); font-size: .88rem; margin-top: .15rem; }
.sb-room-head { flex-wrap: wrap; gap: .35rem .9rem; }
.sb-room-price-line strong { color: #10203f; }
.sb-room-price-sep {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #c3cbd8;
    margin: 0 .5rem;
    vertical-align: middle;
}

/* ---------- Badges ---------- */
.sb-badge {
    display: inline-block;
    padding: .28rem .7rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
}
.sb-badge-pending { background: #fff3d6; color: #92600a; }
.sb-badge-confirmed { background: #d9f2e3; color: #0f6b3a; }
.sb-badge-cancelled { background: #fde3e1; color: #b02a1d; }
.sb-badge-completed { background: #e7ecf3; color: #42526b; }

/* ---------- Toasts ---------- */
.pg-toast-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}
.pg-toast { box-shadow: var(--sb-shadow-lg); color: #fff; }
.pg-toast-success { background: #128a4a; }
.pg-toast-error { background: #c23b2e; }

/* ---------- Auth pages ---------- */
.sb-auth-body {
    background: linear-gradient(135deg, var(--sb-primary), #2f74e8);
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
}
.sb-auth-card {
    background: #fff;
    border-radius: var(--sb-radius);
    box-shadow: var(--sb-shadow-lg);
    padding: 2rem;
    width: 100%;
    max-width: 440px;
}
.sb-auth-card h1 { font-weight: 800; }

/* ---------- Admin ---------- */
.sb-admin-body { background: var(--sb-bg); }
.sb-admin { display: flex; min-height: 100vh; }
.sb-admin-sidebar {
    width: 240px;
    background: #0c2149;
    color: #fff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.sb-admin-brand {
    padding: 1.25rem 1.25rem 1rem;
    font-weight: 800;
    font-size: 1.15rem;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.sb-admin-nav { list-style: none; padding: .75rem 0; margin: 0; }
.sb-admin-nav a {
    display: block;
    padding: .65rem 1.25rem;
    color: rgba(255, 255, 255, .78);
    text-decoration: none;
    font-weight: 500;
}
.sb-admin-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sb-admin-sidebar-footer {
    margin-top: auto;
    padding: 1rem 1.25rem .3rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.sb-admin-account { padding: 0 .1rem .4rem; }
.sb-admin-account-mail {
    font-size: .8rem;
    font-weight: 600;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sb-admin-account-role {
    margin-top: .14rem;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .45);
}
.sb-admin-sidebar-footer a,
.sb-admin-logout {
    display: flex;
    align-items: center;
    gap: .55rem;
    width: 100%;
    padding: .5rem .7rem;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 9px;
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .85);
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
}
.sb-admin-sidebar-footer a:hover { border-color: rgba(255, 255, 255, .45); color: #fff; }
.sb-admin-logout:hover { border-color: rgba(255, 120, 120, .55); color: #ffb3ad; text-decoration: none; }

.sb-admin-main { flex: 1; display: flex; flex-direction: column; }
.sb-admin-topbar {
    background: #fff;
    border-bottom: 1px solid var(--sb-border);
    padding: 1rem 1.75rem;
}
.sb-admin-content { padding: 1.75rem; }

.sb-stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.25rem; }
.sb-stat-card { background: #fff; border-radius: var(--sb-radius); box-shadow: var(--sb-shadow); padding: 1.25rem; }
.sb-stat-value { font-size: 2rem; font-weight: 800; color: var(--sb-primary); }
.sb-stat-label { color: var(--sb-muted); font-size: .9rem; }

/* ---------- tables (one modern treatment for every list screen) ---------- */
.sb-table {
    background: var(--sb-surface);
    border: 1px solid #e8ecf4;
    border-radius: 12px;
    overflow: auto;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.sb-table .table {
    --bs-table-bg: transparent;
    --bs-table-border-color: #edf0f6;
    --bs-table-hover-bg: #f7f9fd;
    margin-bottom: 0;
}
.sb-table thead th {
    background: #f7f9fc;
    color: var(--sb-muted);
    font-weight: 600;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: .7rem 1rem;
    border-bottom: 1px solid #e8ecf4;
    white-space: nowrap;
}
.sb-table tbody td { padding: .8rem 1rem; vertical-align: middle; }
.sb-table tbody tr:last-child td { border-bottom: 0; }
.sb-table tbody tr { transition: background-color .12s ease; }
.sb-table tbody tr:hover > * { background: #f7f9fd; }

.sb-panel { background: #fff; border-radius: var(--sb-radius); box-shadow: var(--sb-shadow); padding: 1.5rem; }

@media (max-width: 768px) {
    .sb-admin { flex-direction: column; }
    .sb-admin-sidebar { width: 100%; }
}

/* ---------- Flatpickr theme ---------- */
.flatpickr-calendar {
    border-radius: 12px;
    border: 1px solid var(--sb-border);
    box-shadow: var(--sb-shadow-lg);
    font-family: inherit;
}
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange {
    background: var(--sb-primary);
    border-color: var(--sb-primary);
}
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
    background: var(--sb-primary-dark);
    border-color: var(--sb-primary-dark);
}
.flatpickr-day:hover {
    background: var(--sb-primary-soft);
}
.flatpickr-day.today {
    border-color: var(--sb-accent);
}
.flatpickr-day.today:hover {
    background: var(--sb-accent);
    color: #1a2332;
    border-color: var(--sb-accent);
}
.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
    fill: var(--sb-primary);
}
.flatpickr-day.inRange {
    background: var(--sb-primary-soft);
    border-color: transparent;
    color: var(--sb-primary);
}
.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),
.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),
.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)) {
    box-shadow: -10px 0 0 var(--sb-primary);
}

/* ---------- Language switcher ---------- */
.sb-lang-form { display: inline-flex; align-items: center; }
.sb-lang {
    background: none;
    border: none;
    padding: 2px 7px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: var(--sb-muted);
    border-radius: 6px;
    transition: background .15s, color .15s;
}
.sb-lang:hover { color: var(--sb-primary); background: var(--sb-primary-soft); }
.sb-lang.active { color: var(--sb-primary); }
.sb-lang-sep { width: 1px; height: 13px; background: var(--sb-border); margin: 0 2px; display: inline-block; }

/* navbar variant (dark background) */
.sb-navbar .sb-lang { color: rgba(255, 255, 255, .7); }
.sb-navbar .sb-lang:hover { color: #fff; background: rgba(255, 255, 255, .14); }
.sb-navbar .sb-lang.active { color: #fff; }
.sb-navbar .sb-lang-sep { background: rgba(255, 255, 255, .35); }



.sb-gallery { padding-top: 1.25rem; }
.sb-gallery-main {
    display: block;
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: .75rem;
    background: #eef2f8;
}
.sb-gallery-main--empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    background: linear-gradient(135deg, #123a8f, #3a7be0);
}
.sb-gallery-main--empty .sb-thumb-letter {
    font-size: 3.25rem;
    font-weight: 900;
    color: rgba(255, 255, 255, .35);
}
.sb-gallery-empty-note { color: rgba(255, 255, 255, .6); font-size: .85rem; }
.sb-gallery-thumbs {
    display: flex;
    gap: .5rem;
    margin-top: .5rem;
    overflow-x: auto;
    padding-bottom: .25rem;
}
.sb-gallery-thumb {
    width: 110px;
    height: 78px;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: .5rem;
    cursor: pointer;
    opacity: .75;
    border: 2px solid transparent;
    transition: opacity .15s, border-color .15s;
}
.sb-gallery-thumb:hover { opacity: 1; }
.sb-gallery-thumb.is-active { opacity: 1; border-color: #0b3d91; }

@media (max-width: 991.98px) {
    .sb-gallery-main { height: 320px; }
    .sb-gallery-main--empty { height: 260px; }
    .sb-detail-hero { padding: 1.75rem 0; }
}
@media (max-width: 767.98px) {
    .sb-gallery-main { height: 240px; }
    .sb-gallery-main--empty { height: 220px; }
}

/* Image manager (host + admin property edit) */
.sb-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: .75rem;
}
.sb-image-card {
    position: relative;
    border: 1px solid #dee2e6;
    border-radius: .5rem;
    overflow: hidden;
    background: #fff;
}
.sb-image-card img {
    display: block;
    width: 100%;
    height: 110px;
    object-fit: cover;
}
.sb-image-badge {
    position: absolute;
    top: .4rem;
    left: .4rem;
    background: #0b3d91;
    color: #fff;
    font-size: .72rem;
    padding: .15rem .5rem;
    border-radius: 1rem;
}
.sb-image-actions {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
    padding: .5rem;
}


/* ---- admin chips, filters, pager (users + logs screens) ---- */
.sb-chip-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.sb-chip-row-flags { margin-top: -.25rem; }
.sb-chip { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .8rem; border-radius: 999px;
    border: 1px solid var(--sb-border); background: var(--sb-surface); color: var(--sb-text);
    text-decoration: none; font-size: .85rem; line-height: 1; box-shadow: var(--sb-shadow); }
.sb-chip:hover { border-color: var(--sb-primary); color: var(--sb-primary); }
.sb-chip strong { font-size: .95rem; font-weight: 700; color: var(--sb-primary); }
.sb-chip.is-active { border-color: var(--sb-primary); background: var(--sb-primary-soft); }
.sb-chip-flag { border-style: dashed; }
.sb-chip-note { color: var(--sb-muted); font-size: .8rem; margin-left: .25rem; }
.sb-filter-bar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.sb-filter-bar input[type="search"] { max-width: 320px; }
.sb-filter-count { color: var(--sb-muted); font-size: .85rem; margin-left: auto; }
.sb-pager { display: flex; align-items: center; gap: .75rem; margin-top: 1rem; }
.sb-pager-label { color: var(--sb-muted); font-size: .85rem; }
.sb-role-admin { background: #e7e0ff; color: #4b2ea8; }
.sb-role-host { background: #d9f2e3; color: #0f6b3a; }
.sb-role-guest { background: #e7ecf3; color: #42526b; }
.sb-detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1.25rem; }
.sb-actions-bar { display: flex; flex-wrap: wrap; gap: .5rem; }
.sb-section-title { text-transform: uppercase; letter-spacing: .04em; color: var(--sb-muted); margin-bottom: .6rem; }
.sb-empty { background: var(--sb-surface); border-radius: var(--sb-radius); box-shadow: var(--sb-shadow);
    padding: 2rem; text-align: center; }

/* ---- app logs ---- */
.sb-log-table td { vertical-align: top; }
.sb-log-time { color: var(--sb-muted); font-variant-numeric: tabular-nums; }
.sb-log-level { display: inline-block; padding: .15rem .5rem; border-radius: 6px; font-size: .72rem;
    font-weight: 700; text-transform: uppercase; letter-spacing: .03em; background: #e7ecf3; color: #42526b; }
.sb-log-level-information { background: #e7ecf3; color: #365070; }
.sb-log-level-warning { background: #fff3d6; color: #92600a; }
.sb-log-level-error, .sb-log-level-fatal { background: #fde3e1; color: #b02a1d; }
.sb-log-level-debug, .sb-log-level-verbose { background: #eef2f7; color: #5b6b82; }
.sb-log-source { color: var(--sb-muted); font-size: .8rem; }
.sb-log-message { font-size: .875rem; word-break: break-word; }
.sb-log-path { display: inline-block; margin-left: .4rem; padding: .1rem .4rem; border-radius: 5px;
    background: var(--sb-primary-soft); color: var(--sb-primary); font-size: .72rem; }
.sb-log-details { margin-top: .35rem; }
.sb-log-details summary { cursor: pointer; font-size: .75rem; color: var(--sb-muted); }
.sb-log-pre { background: #0f172a; color: #e2e8f0; padding: .75rem; border-radius: 8px; font-size: .78rem;
    max-height: 320px; overflow: auto; white-space: pre-wrap; margin-top: .4rem; }


/* ---- superadmin settings ---- */
.sb-settings-group { margin-bottom: 2rem; }
.sb-settings-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--sb-muted); }
.sb-settings-table td { vertical-align: middle; }
.sb-setting-label { font-weight: 600; }
.sb-setting-desc { color: var(--sb-muted); font-size: .8rem; }
.sb-setting-default { color: var(--sb-muted); font-variant-numeric: tabular-nums; }
.sb-setting-audit { color: var(--sb-muted); font-size: .75rem; margin-top: .25rem; }
.sb-setting-form { display: flex; gap: .4rem; align-items: center; max-width: 460px; }
.sb-setting-form input { max-width: 260px; }
.sb-restart-badge { display: inline-block; margin-top: .25rem; padding: .1rem .45rem; border-radius: 999px;
    border: 1px dashed var(--sb-border); color: var(--sb-muted); font-size: .72rem; }


/* ---- support messages + bans ---- */
.sb-nav-badge { display: inline-block; min-width: 1.35rem; margin-left: .15rem; padding: .06rem .42rem;
    border-radius: 999px; background: #dc3545; color: #fff; font-size: .72rem; font-weight: 700;
    text-align: center; line-height: 1.25; vertical-align: middle; }
.sb-badge-soft { display: inline-block; margin-left: .4rem; padding: .08rem .45rem; border-radius: .35rem;
    background: #eef1f6; border: 1px solid #dde3ec; color: #55637a; font-size: .68rem;
    text-transform: uppercase; letter-spacing: .04em; vertical-align: middle; }
.sb-support-body { white-space: pre-wrap; line-height: 1.55; }
.sb-chip-flag-danger { border-color: #e08592; }

/* ---------- honor chips (trust tiers) ---------- */
.sb-honor {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .16rem .6rem;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .01em;
    vertical-align: 1px;
}
.sb-honor-star { font-size: .68rem; }
.sb-honor-reliable { background: var(--sb-primary-soft); color: var(--sb-primary); }
.sb-honor-distinguished { background: #fff4d6; color: #8a5b00; box-shadow: inset 0 0 0 1px #f3d98a; }
.sb-honor-honored { background: linear-gradient(135deg, #ffb703, #f59e0b); color: #4a3200; box-shadow: 0 2px 6px rgba(245, 158, 11, .35); }
.sb-honor-plus { color: #1a7f37; font-weight: 600; }
.sb-honor-minus { color: #b42318; font-weight: 600; }






/* ---------- inline SVG icons (amenity chips) ---------- */
.sb-ico { display: inline-block; width: 16px; height: 16px; }
.sb-ico-mid .sb-ico { width: 14px; height: 14px; vertical-align: -2px; }
.sb-amenity-chip .sb-ico { width: 15px; height: 15px; flex: none; opacity: .8; }

/* ============================================================
   App shell (host area + signed-in client area). Scoped to
   .sb-shell, set on both bodies, so the dark admin theme
   (admin.css) stays untouched.
   ============================================================ */

/* ---------- shell: sidebar ---------- */
.sb-shell .sb-admin-sidebar {
    width: 264px;
    background: linear-gradient(180deg, #0c2149 0%, #0a1c3e 100%);
}
.sb-shell .sb-admin-brand {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: 1.35rem 1.25rem 1.15rem;
    font-size: 1.12rem;
    font-weight: 800;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.sb-shell .sb-admin-brand .sb-brand-mark { margin-right: 0; }
.sb-host-tag {
    margin-left: auto;
    padding: .14rem .55rem;
    border-radius: 999px;
    background: rgba(255, 183, 3, .16);
    color: #ffd76a;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.sb-shell .sb-admin-nav { padding: .9rem .7rem 0; }
.sb-shell .sb-admin-nav-label {
    padding: .5rem .65rem .35rem;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255, 255, 255, .38);
}
.sb-shell .sb-admin-nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .58rem .7rem;
    margin-bottom: 2px;
    border-radius: 10px;
    color: rgba(255, 255, 255, .75);
    font-weight: 500;
    font-size: .92rem;
}
.sb-shell .sb-admin-nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sb-shell .sb-admin-nav a.is-active { background: rgba(255, 255, 255, .1); color: #fff; font-weight: 600; }
.sb-shell .sb-admin-nav a.is-active::before {
    content: "";
    position: absolute;
    left: -.7rem;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--sb-accent);
}
.sb-shell .sb-admin-nav .sb-ico { flex: 0 0 auto; width: 18px; height: 18px; color: rgba(255, 255, 255, .45); }
.sb-shell .sb-admin-nav a:hover .sb-ico { color: rgba(255, 255, 255, .75); }
.sb-shell .sb-admin-nav a.is-active .sb-ico { color: var(--sb-accent); }
.sb-shell .sb-admin-nav .sb-nav-badge { margin-left: auto; }

.sb-shell .sb-admin-sidebar-footer { border-top: 1px solid rgba(255, 255, 255, .08); }
.sb-shell .sb-admin-account-mail { color: #fff; }
.sb-shell .sb-admin-account-role { color: rgba(255, 255, 255, .45); }
.sb-shell .sb-admin-sidebar-footer a,
.sb-shell .sb-admin-logout {
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .85);
}
.sb-shell .sb-admin-sidebar-footer a:hover { border-color: rgba(255, 255, 255, .45); color: #fff; }
.sb-shell .sb-admin-logout:hover { border-color: rgba(255, 120, 120, .55); color: #ffb3ad; }
.sb-shell .sb-admin-sidebar-footer .sb-ico { width: 16px; height: 16px; color: rgba(255, 255, 255, .45); }

/* ---------- shell: topbar + content ---------- */
.sb-shell .sb-admin-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: .95rem 1.75rem;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--sb-border);
}
.sb-shell .sb-admin-topbar h1 {
    margin: 0;
    font-size: 1.16rem;
    font-weight: 700;
    letter-spacing: -.01em;
}
.sb-shell .sb-topbar-right { display: flex; align-items: center; gap: 1rem; }
.sb-shell .sb-admin-content { padding: 1.6rem 1.75rem 2.5rem; }
.sb-shell .sb-admin-content .sb-py { padding-top: .4rem; padding-bottom: .4rem; }

/* ---------- stat cards ---------- */
.sb-shell .sb-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.sb-shell .sb-stat-card {
    --stat-accent: var(--sb-primary);
    --stat-soft: var(--sb-primary-soft);
    position: relative;
    display: flex;
    align-items: center;
    gap: .95rem;
    padding: 1.1rem 1.25rem;
    background: var(--sb-surface);
    border-radius: var(--sb-radius);
    box-shadow: var(--sb-shadow);
    overflow: hidden;
    color: inherit;
}
.sb-shell .sb-stat-card::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--stat-accent);
    opacity: .85;
}
.sb-shell .sb-stat-card.is-attention { --stat-accent: #c8891a; --stat-soft: #fff3d6; }
.sb-shell .sb-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--stat-soft);
    color: var(--stat-accent);
}
.sb-shell .sb-stat-icon .sb-ico { width: 20px; height: 20px; }
.sb-shell .sb-stat-body { display: flex; flex-direction: column; }
.sb-shell .sb-stat-card .sb-stat-value { font-size: 1.7rem; font-weight: 800; color: var(--sb-text); line-height: 1.1; font-variant-numeric: tabular-nums; }
.sb-shell .sb-stat-card .sb-stat-label { font-size: .82rem; color: var(--sb-muted); }
.sb-shell .sb-stat-card.is-link { transition: transform .14s ease, box-shadow .14s ease; }
.sb-shell .sb-stat-card.is-link:hover { transform: translateY(-2px); box-shadow: var(--sb-shadow-lg); color: inherit; }

/* ---------- section heads, mini rows ---------- */
.sb-shell .sb-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.sb-shell .sb-panel-head h2 { margin: 0; font-size: 1.02rem; font-weight: 700; }
.sb-shell .sb-panel-head a { font-size: .85rem; }
.sb-shell .sb-mini-row { display: flex; align-items: center; gap: 1rem; padding: .7rem .1rem; border-bottom: 1px solid var(--sb-border); }
.sb-shell .sb-mini-row:last-child { border-bottom: none; padding-bottom: .1rem; }
.sb-shell .sb-mini-main { flex: 1; min-width: 0; }
.sb-shell .sb-mini-name { font-weight: 600; }
.sb-shell .sb-mini-sub { font-size: .8rem; color: var(--sb-muted); }
.sb-shell .sb-mini-dates { font-size: .85rem; color: var(--sb-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- tables (shell additions) ---------- */
.sb-shell .sb-num { font-variant-numeric: tabular-nums; }
.sb-shell .sb-actions { display: inline-flex; align-items: center; gap: .4rem; justify-content: flex-end; }
.sb-shell .sb-row-main { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.sb-shell .sb-row-thumb-ph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: .35rem;
    background: linear-gradient(135deg, #123a8f, #3a7be0);
    color: rgba(255, 255, 255, .9);
    font-weight: 800;
}
.sb-shell .sb-table .sb-stars { font-size: .78rem; }

/* ---------- availability calendar ---------- */
.sb-shell .sb-cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 1.25rem; align-items: start; }
@media (max-width: 1100px) { .sb-shell .sb-cal-layout { grid-template-columns: 1fr; } }
.sb-shell .sb-cal-panel { padding: 1.25rem 1.25rem 1.4rem; }
.sb-shell .sb-cal-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .9rem; }
.sb-shell .sb-cal-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--sb-border);
    border-radius: 9px;
    background: #fff;
    color: var(--sb-text);
    font-size: 1.05rem;
    line-height: 1;
}
.sb-shell .sb-cal-nav:hover { border-color: var(--sb-primary); color: var(--sb-primary); }
.sb-shell .sb-cal-title { min-width: 170px; text-align: center; font-weight: 700; font-size: 1.05rem; }
.sb-shell .sb-cal-sub { margin-left: auto; color: var(--sb-muted); font-size: .85rem; }
.sb-shell .sb-cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: .2rem 0 .9rem;
    border-bottom: 1px solid var(--sb-border);
    margin-bottom: .9rem;
    font-size: .82rem;
    color: var(--sb-muted);
}
.sb-shell .sb-legend-item { display: inline-flex; align-items: center; gap: .45rem; }
.sb-shell .sb-legend-item i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; }
.sb-shell .lg-available { background: #fff; border: 1px solid var(--sb-border); }
.sb-shell .lg-pending { background: #fff3d6; border: 1px solid #f0dfb2; }
.sb-shell .lg-confirmed { background: #d9f2e3; border: 1px solid #bfe7d0; }
.sb-shell .lg-blocked { background: repeating-linear-gradient(135deg, #eef2ff 0 5px, #d9e3fa 5px 10px); border: 1px solid #c6d4f2; }
.sb-shell .sb-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.sb-shell .sb-cal-dow { text-align: center; font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; color: var(--sb-muted); padding: .35rem 0; }
.sb-shell .sb-cal-day {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-height: 64px;
    padding: .35rem .45rem .4rem;
    background: #fff;
    border: 1px solid var(--sb-border);
    border-radius: 10px;
    overflow: hidden;
}
.sb-shell .sb-cal-num { font-size: .78rem; color: var(--sb-muted); font-variant-numeric: tabular-nums; }
.sb-shell .sb-cal-tag { margin-top: auto; font-size: .68rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-shell .sb-cal-day.is-outside { opacity: .38; }
.sb-shell .sb-cal-day.is-today { box-shadow: inset 0 0 0 2px var(--sb-accent); }
.sb-shell .sb-cal-day.is-today .sb-cal-num { color: var(--sb-text); font-weight: 700; }
.sb-shell .sb-cal-day.state-pending { background: #fff7e0; border-color: #f0dfb2; }
.sb-shell .sb-cal-day.state-pending .sb-cal-num,
.sb-shell .sb-cal-day.state-pending .sb-cal-tag { color: #92600a; }
.sb-shell .sb-cal-day.state-confirmed { background: #e2f6ea; border-color: #bfe7d0; }
.sb-shell .sb-cal-day.state-confirmed .sb-cal-num,
.sb-shell .sb-cal-day.state-confirmed .sb-cal-tag { color: #0f6b3a; }
.sb-shell .sb-cal-day.state-blocked { background: repeating-linear-gradient(135deg, #eef2ff 0 6px, #dde7fb 6px 12px); border-color: #c6d4f2; }
.sb-shell .sb-cal-day.state-blocked .sb-cal-num,
.sb-shell .sb-cal-day.state-blocked .sb-cal-tag { color: #0b3d91; }
.sb-shell .sb-cal-side .sb-panel { padding: 1.15rem 1.25rem; }
.sb-shell .sb-cal-side .form-label { font-size: .78rem; font-weight: 600; color: var(--sb-muted); margin-bottom: .25rem; }
.sb-shell .sb-block-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .65rem 0; border-bottom: 1px solid var(--sb-border); }
.sb-shell .sb-block-row:last-child { border-bottom: none; padding-bottom: 0; }
.sb-shell .sb-block-range { font-weight: 600; font-size: .86rem; font-variant-numeric: tabular-nums; }
.sb-shell .sb-block-note { font-size: .78rem; color: var(--sb-muted); }
.sb-shell .sb-block-row form { margin: 0; }

/* ============================================================
   Responsive: phones and narrow windows.
   ============================================================ */

/* ---------- host: burger button + off-canvas sidebar ---------- */
.sb-burger {
    display: none;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--sb-border);
    border-radius: 10px;
    background: #fff;
    color: var(--sb-text);
}
.sb-burger:hover { border-color: var(--sb-primary); color: var(--sb-primary); }
.sb-burger .sb-ico { width: 18px; height: 18px; }
.sb-drawer-backdrop { display: none; }

@media (max-width: 991.98px) {
    .sb-shell .sb-admin { display: block; }
    .sb-shell .sb-admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 284px;
        max-width: 86vw;
        height: 100dvh;
        overflow-y: auto;
        transform: translateX(-104%);
        transition: transform .22s ease;
        z-index: 1045;
        box-shadow: 0 24px 60px rgba(2, 8, 23, .45);
    }
    .sb-shell.sb-drawer-open .sb-admin-sidebar { transform: translateX(0); }
    .sb-shell .sb-drawer-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1040;
        background: rgba(10, 16, 32, .45);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }
    .sb-shell.sb-drawer-open .sb-drawer-backdrop { opacity: 1; pointer-events: auto; }
    .sb-shell .sb-burger { display: inline-flex; }
    .sb-shell .sb-admin-topbar { padding: .7rem 1rem; }
    .sb-shell .sb-admin-topbar h1 {
        font-size: 1.02rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .sb-shell .sb-admin-content { padding: 1.1rem 1rem 2.25rem; }
}

/* ---------- host: compact cards + panels ---------- */
@media (max-width: 640px) {
    .sb-shell .sb-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
    .sb-shell .sb-stat-card { padding: .85rem .95rem; gap: .6rem; }
    .sb-shell .sb-stat-card .sb-stat-value { font-size: 1.35rem; }
    .sb-shell .sb-stat-card .sb-stat-label { font-size: .76rem; }
    .sb-shell .sb-stat-icon { width: 34px; height: 34px; border-radius: 10px; }
    .sb-shell .sb-stat-icon .sb-ico { width: 17px; height: 17px; }
    .sb-shell .sb-mini-row { flex-wrap: wrap; gap: .3rem .8rem; }
    .sb-shell .sb-mini-main { flex: 1 1 100%; }
    .sb-shell .sb-mini-dates { font-size: .8rem; }
    .sb-shell .sb-mini-row .sb-badge { margin-left: auto; }
    .sb-shell .sb-panel { padding: 1rem; }
}

/* ---------- host: tables scroll, never squish ---------- */
@media (max-width: 767.98px) {
    .sb-shell .sb-table .table { min-width: 560px; }
    .sb-shell .sb-table thead th { padding: .65rem .8rem; }
    .sb-shell .sb-table tbody td { padding: .7rem .8rem; }
}

/* ---------- host: calendar on phones ---------- */
@media (max-width: 767.98px) {
    .sb-shell .sb-cal-panel { padding: .85rem .7rem 1rem; }
    .sb-shell .sb-cal-grid { gap: 3px; }
    .sb-shell .sb-cal-day { min-height: 52px; padding: .22rem .28rem .3rem; border-radius: 8px; }
    .sb-shell .sb-cal-num { font-size: .7rem; }
    .sb-shell .sb-cal-tag { font-size: .6rem; }
    .sb-shell .sb-cal-dow { font-size: .58rem; letter-spacing: .04em; padding: .25rem 0; }
    .sb-shell .sb-cal-head { flex-wrap: wrap; gap: .4rem; }
    .sb-shell .sb-cal-title { min-width: 0; }
    .sb-shell .sb-cal-sub { order: 3; flex-basis: 100%; margin-left: 0; text-align: center; font-size: .8rem; }
    .sb-shell .sb-cal-legend { gap: .5rem .9rem; font-size: .75rem; padding-bottom: .7rem; margin-bottom: .7rem; }
    .sb-shell .sb-cal-side .sb-panel { padding: 1rem; }
}

/* ---------- public site on phones ---------- */
@media (max-width: 767.98px) {
    .sb-hero { padding: 2.4rem 0 4rem; }
    .sb-hero h1 { font-size: 1.9rem; }
    .sb-hero .lead { font-size: 1rem; }
    .sb-search-card { padding: 1rem; margin-top: -2.4rem; }
    .sb-detail-hero h1 { font-size: 1.5rem; }
    .sb-py { padding-top: 2rem; padding-bottom: 2rem; }
}
@media (max-width: 575.98px) {
    .row { --bs-gutter-x: 1rem; }
}

/* Navbar toggler on the dark bar: our own white burger, sized and centered.
   Only exists while the navbar is collapsed (below xl), Bootstrap hides it above. */
@media (max-width: 1399.98px) {
    .sb-navbar .navbar-toggler {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 38px;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, .4);
        border-radius: 10px;
    }
    .sb-navbar .navbar-toggler:focus { box-shadow: 0 0 0 .18rem rgba(255, 255, 255, .28); }
    .sb-navbar .navbar-toggler-icon {
        width: 20px;
        height: 20px;
        filter: none;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.92)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.4' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
        background-size: 100% 100%;
    }
}

/* Collapsed public menu: menu rows with icons, account block, real tap targets. */
@media (max-width: 1399.98px) {
    .sb-navbar .navbar-collapse {
        margin-top: .65rem;
        padding: .45rem .15rem 1.05rem;
        border-top: 1px solid rgba(255, 255, 255, .14);
    }
    .sb-navbar .navbar-collapse .navbar-nav { gap: .2rem; }
    .sb-navbar .navbar-collapse .nav-link {
        display: flex;
        align-items: center;
        gap: .8rem;
        padding: .8rem .95rem;
        border-radius: 12px;
        font-size: 1rem;
        font-weight: 500;
        color: rgba(255, 255, 255, .94);
    }
    .sb-navbar .navbar-collapse .nav-link .sb-ico { flex: 0 0 auto; width: 19px; height: 19px; opacity: .78; }
    .sb-navbar .navbar-collapse .nav-link:hover,
    .sb-navbar .navbar-collapse .nav-link:focus { background: rgba(255, 255, 255, .1); }
    .sb-navbar .navbar-collapse .nav-link .sb-nav-badge { margin-left: auto; }
    .sb-navbar .navbar-collapse .d-flex {
        flex-direction: column;
        align-items: stretch !important;
        gap: .2rem !important;
        margin-top: .55rem;
        padding-top: .8rem;
        border-top: 1px solid rgba(255, 255, 255, .14);
    }
    .sb-navbar .navbar-collapse .d-flex > .navbar-nav { align-items: stretch !important; gap: .2rem; width: 100%; }
    .sb-navbar .navbar-collapse .sb-lang-form { display: flex; align-items: center; gap: .35rem; padding: 0 .95rem .5rem; }
    .sb-navbar .navbar-collapse .navbar-text {
        width: 100%;
        margin: 0;
        padding: .5rem .95rem .1rem;
        color: rgba(255, 255, 255, .62);
        font-size: .85rem;
    }
    .sb-navbar .navbar-collapse .btn:not(.sb-lang) {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: .6rem;
        width: 100%;
        padding: .72rem 1rem;
        border-radius: 12px;
        font-weight: 600;
    }
    .sb-navbar .navbar-collapse .btn:not(.sb-lang) .sb-ico { width: 18px; height: 18px; }
}
