:root {
    --ink: #172033;
    --ink-strong: #0c1220;
    --muted: #687386;
    --line: #dde5ef;
    --line-strong: #cbd5e1;
    --brand: #0f9f8f;
    --brand-dark: #08766d;
    --brand-soft: #e6f7f4;
    --admin: #a54f16;
    --admin-soft: #fff3ea;
    --accent: #f4b63f;
    --surface: #f4f7fb;
    --card: #fff;
    --radius: 8px;
    --shadow-sm: 0 8px 22px rgba(15, 23, 42, .06);
    --shadow-md: 0 18px 48px rgba(15, 23, 42, .11);
    --shadow-lg: 0 26px 80px rgba(15, 23, 42, .18);
    --focus: 0 0 0 .22rem rgba(15, 159, 143, .18);
}

* { box-sizing: border-box; }
html, body { min-width: 320px; }
body {
    background:
        radial-gradient(circle at top left, rgba(15, 159, 143, .08), transparent 34rem),
        linear-gradient(180deg, #f8fbfe 0%, var(--surface) 45%, #eef3f8 100%);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; }
a {
    color: var(--brand-dark);
    text-decoration: none;
    transition: color .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
a:hover { color: #075b54; }
h1, h2, h3, h4, h5, h6 {
    color: var(--ink-strong);
    font-weight: 850;
    letter-spacing: 0;
}
.app-shell { min-height: 100vh; }
.hp-field {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.btn {
    --bs-btn-border-radius: var(--radius);
    --bs-btn-font-weight: 760;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    box-shadow: none;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease, opacity .18s ease;
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, .12);
}
.btn:active { transform: translateY(0); }
.btn-success {
    --bs-btn-bg: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand-dark);
    --bs-btn-hover-border-color: var(--brand-dark);
    --bs-btn-active-bg: #075f58;
    --bs-btn-active-border-color: #075f58;
    color: #fff;
}
.btn-outline-success {
    --bs-btn-color: var(--brand-dark);
    --bs-btn-border-color: rgba(15, 159, 143, .42);
    --bs-btn-hover-bg: var(--brand);
    --bs-btn-hover-border-color: var(--brand);
    --bs-btn-active-bg: var(--brand-dark);
    --bs-btn-active-border-color: var(--brand-dark);
}
.btn-dark {
    --bs-btn-bg: #111827;
    --bs-btn-border-color: #111827;
    --bs-btn-hover-bg: #243044;
    --bs-btn-hover-border-color: #243044;
}
.btn-light {
    --bs-btn-bg: #fff;
    --bs-btn-border-color: #fff;
    color: var(--ink-strong);
}
.btn-outline-light {
    --bs-btn-border-color: rgba(255,255,255,.54);
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: rgba(255,255,255,.14);
    --bs-btn-hover-border-color: rgba(255,255,255,.76);
    --bs-btn-hover-color: #fff;
}
.is-loading {
    pointer-events: none;
    opacity: .82;
}
.is-loading::after {
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    content: "";
    animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-control, .form-select, .input-group-text {
    border-color: var(--line);
    border-radius: var(--radius);
    color: var(--ink);
}
.form-control, .form-select {
    min-height: 44px;
    background-color: #fff;
    box-shadow: inset 0 1px 0 rgba(15, 23, 42, .02);
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.form-control:focus, .form-select:focus {
    border-color: var(--brand);
    box-shadow: var(--focus);
}
.form-label, label {
    color: #39455a;
    font-weight: 760;
}
.form-text, .text-secondary { color: var(--muted) !important; }
.alert {
    border: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.table {
    color: var(--ink);
    margin-bottom: 0;
}
.table thead th {
    border-bottom: 1px solid var(--line);
    color: #536073;
    font-size: .76rem;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.table td, .table th {
    padding: .85rem .75rem;
    vertical-align: middle;
}
.table tbody tr { transition: background-color .16s ease; }
.table tbody tr:hover { background: #f8fbfd; }

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(8, 118, 109, .9), rgba(17, 24, 39, .76)),
        url("https://images.unsplash.com/photo-1556761175-b413da4baf72?auto=format&fit=crop&w=1800&q=80") center/cover;
}
.auth-card {
    width: min(460px, 100%);
    background: rgba(255,255,255,.94);
    border: 1px solid rgba(255,255,255,.68);
    border-radius: var(--radius);
    padding: clamp(22px, 4vw, 34px);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
}

.layout {
    display: grid;
    grid-template-columns: 278px minmax(0, 1fr);
    min-height: 100vh;
}
.sidebar {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 100vh;
    background: rgba(255, 255, 255, .92);
    border-right: 1px solid rgba(221, 229, 239, .9);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: 10px 0 34px rgba(15, 23, 42, .04);
    backdrop-filter: blur(16px);
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--ink-strong);
    font-size: 1.02rem;
    font-weight: 900;
}
.brand span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.brand i {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), #15b8a6);
    border-radius: var(--radius);
    box-shadow: 0 12px 26px rgba(15, 159, 143, .28);
}
.sidebar-logo {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    object-fit: contain;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}
.sidebar nav {
    display: grid;
    gap: 6px;
}
.sidebar nav a, .sidebar-exit {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: var(--muted);
    font-weight: 760;
}
.sidebar nav a i, .sidebar-exit i {
    width: 22px;
    flex: 0 0 22px;
    color: #98a3b3;
    font-size: 1.04rem;
}
.sidebar nav a:hover, .sidebar nav a.active, .sidebar-exit:hover {
    background: var(--brand-soft);
    border-color: rgba(15, 159, 143, .16);
    color: var(--brand-dark);
}
.sidebar nav a:hover i, .sidebar nav a.active i, .sidebar-exit:hover i { color: var(--brand-dark); }
.sidebar nav a.active::before {
    position: absolute;
    left: -18px;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 999px;
    background: var(--brand);
    content: "";
}
.sidebar-admin .brand i {
    background: linear-gradient(135deg, var(--admin), #d97706);
    box-shadow: 0 12px 26px rgba(165, 79, 22, .24);
}
.sidebar-admin nav a:hover, .sidebar-admin nav a.active, .sidebar-admin .sidebar-exit:hover {
    background: var(--admin-soft);
    border-color: rgba(165, 79, 22, .14);
    color: var(--admin);
}
.sidebar-admin nav a:hover i, .sidebar-admin nav a.active i, .sidebar-admin .sidebar-exit:hover i { color: var(--admin); }
.sidebar-admin nav a.active::before { background: var(--admin); }
.sidebar-exit { margin-top: auto; }

.content {
    width: 100%;
    min-width: 0;
    padding: clamp(18px, 3vw, 34px);
}
.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}
.topbar h1 { margin-bottom: 0; }
.card-lite {
    background: rgba(255,255,255,.95);
    border: 1px solid rgba(221, 229, 239, .92);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.stat {
    position: relative;
    min-height: 118px;
    padding: 20px;
    overflow: hidden;
}
.stat::after {
    position: absolute;
    right: 16px;
    bottom: -22px;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(15, 159, 143, .08);
    content: "";
}
.stat .value {
    color: var(--ink-strong);
    font-size: clamp(1.8rem, 4vw, 2.45rem);
    font-weight: 900;
    line-height: 1;
}

.badge-status { text-transform: capitalize; }
.appointment-status-form { min-width: 150px; }
.appointment-status-select {
    min-height: 38px;
    border-width: 1px;
    font-weight: 800;
}
.appointment-status-select.status-pending { border-color: #f1b232; color: #8a5a00; background-color: #fff8e6; }
.appointment-status-select.status-confirmed { border-color: #21a66b; color: #126843; background-color: #edfdf5; }
.appointment-status-select.status-cancelled { border-color: #e24c5b; color: #9d2030; background-color: #fff1f3; }
.appointment-status-select.status-completed { border-color: #3c7ee9; color: #2454a8; background-color: #eef5ff; }

.calendar-help {
    color: var(--muted);
    font-weight: 760;
}
.calendar-card { overflow: hidden; }
.calendar-card .fc { max-width: 100%; }
.fc {
    --fc-border-color: var(--line);
    --fc-button-bg-color: var(--brand);
    --fc-button-border-color: var(--brand);
    --fc-button-hover-bg-color: var(--brand-dark);
    --fc-button-hover-border-color: var(--brand-dark);
    --fc-today-bg-color: rgba(15, 159, 143, .08);
}
.fc .fc-toolbar {
    gap: 10px;
    flex-wrap: wrap;
}
.fc .fc-toolbar-title {
    color: var(--ink-strong);
    font-size: clamp(1.05rem, 4vw, 1.55rem);
    font-weight: 900;
}
.fc .fc-button {
    border-radius: var(--radius) !important;
    font-weight: 760 !important;
}
.fc .fc-event {
    border-radius: 6px;
    border: 0;
    padding: 2px 4px;
}
.fc .status-pending { background: #f1a814; border-color: #f1a814; }
.fc .status-confirmed { background: #16a36a; border-color: #16a36a; }
.fc .status-cancelled { background: #d9364c; border-color: #d9364c; }
.fc .status-completed { background: #2f6fe4; border-color: #2f6fe4; }

.legal-footer {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 18px;
    color: var(--muted);
    font-size: .9rem;
}
.legal-footer a { color: var(--muted); }
.legal-footer a:hover { color: var(--brand-dark); }
.legal-page {
    max-width: 900px;
    background: #fff;
    border-radius: var(--radius);
}
.legal-page h1, .legal-page h2 { font-weight: 900; }
.legal-page h2 {
    font-size: 1.2rem;
    margin-top: 24px;
}

.home-page, .booking-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(244, 182, 63, .12), transparent 28rem),
        var(--surface);
}
.home-hero {
    min-height: 72vh;
    color: #fff;
    background:
        linear-gradient(120deg, rgba(8, 32, 45, .92), rgba(8, 118, 109, .82)),
        url("https://images.unsplash.com/photo-1521590832167-7bcbfaa6381f?auto=format&fit=crop&w=1800&q=80") center/cover;
    padding: 18px 0 46px;
}
.home-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: clamp(42px, 8vw, 86px);
}
.home-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 1.15rem;
    font-weight: 900;
}
.home-brand:hover { color: #fff; }
.home-brand i {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.24);
}
.home-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.hero-copy {
    max-width: 800px;
    padding-bottom: 28px;
}
.hero-copy h1, .booking-hero h1 {
    color: #fff;
    font-size: clamp(2.35rem, 6.8vw, 5.1rem);
    line-height: .96;
    font-weight: 950;
    letter-spacing: 0;
}
.hero-copy p, .booking-hero p {
    max-width: 650px;
    color: rgba(255,255,255,.88);
    font-size: clamp(1rem, 2vw, 1.18rem);
}
.hero-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border: 1px solid rgba(255,255,255,.34);
    border-radius: 999px;
    padding: 7px 12px;
    margin-bottom: 14px;
    background: rgba(255,255,255,.13);
    color: #fff;
    font-size: .86rem;
    font-weight: 820;
    backdrop-filter: blur(12px);
}
.search-panel {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr auto;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.6);
    border-radius: var(--radius);
    background: rgba(255,255,255,.96);
    color: var(--ink);
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(18px);
}
.search-panel-wide { grid-template-columns: 1fr 1fr 1fr 1fr 1.2fr auto; }
.search-panel label {
    margin-bottom: 4px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 850;
    text-transform: uppercase;
}
.search-panel .btn {
    align-self: end;
    min-height: 44px;
    white-space: nowrap;
}
.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}
.section-head h2 {
    margin: 0;
    font-weight: 900;
}
.section-head p {
    margin: 4px 0 0;
    color: var(--muted);
}
.business-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.map-wrap {
    position: relative;
    min-height: 320px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.business-map {
    width: 100%;
    min-height: 320px;
}
.map-locate {
    position: absolute;
    right: 14px;
    top: 14px;
    z-index: 500;
    border: 1px solid var(--line);
    box-shadow: 0 8px 20px rgba(24,34,53,.12);
}
.business-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(221, 229, 239, .92);
    border-radius: var(--radius);
    background: #fff;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.business-card > :not(.business-image) {
    min-width: 0;
    margin-left: 18px;
    margin-right: 18px;
}
.business-card > :last-child { margin-bottom: 18px; }
.business-image {
    position: relative;
    min-height: 164px;
    margin-bottom: 17px;
    background:
        linear-gradient(135deg, rgba(15,159,143,.78), rgba(244,182,63,.62)),
        linear-gradient(45deg, #0f9f8f, #f4b63f);
    background-size: cover;
    background-position: center;
}
.business-image::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(15, 23, 42, .18));
    content: "";
}
.business-image img {
    position: absolute;
    left: 14px;
    bottom: -22px;
    z-index: 1;
    width: 64px;
    height: 64px;
    object-fit: contain;
    background: #fff;
    border: 3px solid #fff;
    border-radius: var(--radius);
    box-shadow: 0 10px 26px rgba(24,34,53,.22);
}
.business-card:hover {
    border-color: rgba(15, 159, 143, .36);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.business-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
    margin-bottom: 12px;
    padding-top: 11px;
}
.business-top > * {
    min-width: 0;
    overflow-wrap: anywhere;
}
.category, .open-dot {
    font-size: .78rem;
    font-weight: 850;
}
.category { color: var(--brand-dark); }
.open-dot { color: #15803d; }
.business-card h3 {
    color: var(--ink-strong);
    font-size: 1.2rem;
    font-weight: 900;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.business-card p {
    min-height: 48px;
    color: var(--muted);
    overflow-wrap: anywhere;
    word-break: break-word;
}
.business-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin-top: 8px;
    color: #405066;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.business-meta i { color: var(--brand-dark); }
.business-meta span, .business-meta i { min-width: 0; }
.empty-state {
    padding: 28px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    background: #fff;
    color: var(--muted);
}

.booking-hero {
    color: #fff;
    background:
        linear-gradient(120deg, rgba(7, 24, 38, .9), rgba(8, 118, 109, .84)),
        url("https://images.unsplash.com/photo-1560066984-138dadb4c035?auto=format&fit=crop&w=1600&q=80") center/cover;
    padding: 22px 0 62px;
}
.booking-logo {
    width: 92px;
    height: 92px;
    object-fit: contain;
    margin-bottom: 14px;
    background: #fff;
    border: 4px solid rgba(255,255,255,.92);
    border-radius: var(--radius);
    box-shadow: 0 16px 40px rgba(0,0,0,.22);
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    color: rgba(255,255,255,.9);
    font-weight: 760;
}
.back-link:hover { color: #fff; }
.booking-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
    gap: 24px;
    align-items: end;
}
.booking-hero-grid > * { min-width: 0; }
.booking-hero h1 { overflow-wrap: anywhere; }
.booking-hero p {
    overflow-wrap: anywhere;
    word-break: break-word;
}
.booking-info {
    display: grid;
    gap: 12px;
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: var(--radius);
    background: rgba(255,255,255,.13);
    backdrop-filter: blur(14px);
}
.booking-info div {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr);
    column-gap: 8px;
    min-width: 0;
}
.booking-info i { color: #a8fff3; }
.booking-info strong { color: #fff; }
.booking-info span {
    grid-column: 2;
    min-width: 0;
    color: rgba(255,255,255,.84);
    overflow-wrap: anywhere;
    word-break: break-word;
}
.booking-info .hours-summary {
    line-height: 1.45;
    overflow-wrap: anywhere;
}
.booking-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}
.booking-socials a {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: var(--radius);
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.28);
    color: #fff;
    font-size: 1.2rem;
}
.booking-socials a:hover {
    background: rgba(255,255,255,.22);
    color: #fff;
    transform: translateY(-2px);
}
.whatsapp-float {
    position: fixed;
    right: 18px;
    bottom: 22px;
    z-index: 900;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #25d366;
    color: #fff;
    font-size: 1.8rem;
    box-shadow: 0 16px 36px rgba(37, 211, 102, .35);
    transition: transform .18s ease, box-shadow .18s ease;
}
.whatsapp-float:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 20px 44px rgba(37, 211, 102, .42);
}
.booking-content {
    margin-top: -30px;
    padding-bottom: 42px;
}
.booking-form { box-shadow: var(--shadow-md); }
.service-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}
.service-row span, .service-row strong {
    min-width: 0;
    overflow-wrap: anywhere;
}
.sticky-note {
    position: sticky;
    top: 16px;
}

.dashboard-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.dashboard-title > div { min-width: 0; }
.dashboard-logo {
    width: 58px;
    height: 58px;
    flex: 0 0 auto;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.dashboard-appointment-sections {
    display: grid;
    gap: 16px;
}
.table-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}
.table-actions form { margin: 0; }
.appointment-modal-details {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.appointment-modal-details div {
    min-width: 0;
    display: grid;
    gap: 2px;
}
.appointment-modal-details strong {
    color: var(--muted);
    font-size: .78rem;
    text-transform: uppercase;
}
.appointment-modal-details span { overflow-wrap: anywhere; }
.modal-content {
    border: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}
.modal-header { border-bottom-color: var(--line); }
.image-preview {
    display: block;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.logo-preview {
    width: 96px;
    height: 96px;
}
.featured-preview {
    width: min(100%, 360px);
    height: 150px;
    object-fit: cover;
}
.weekly-day {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}
.weekly-day-label {
    min-height: 38px;
    display: flex;
    align-items: center;
    color: var(--ink-strong);
    font-weight: 850;
}
.weekly-ranges {
    display: grid;
    gap: 8px;
}
.weekly-range {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
    gap: 8px;
    align-items: center;
}
.weekly-range span {
    color: var(--muted);
    font-weight: 760;
}

.table-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
}
.admin-cards { display: none; }
.admin-cards.always-show {
    display: grid;
    gap: 12px;
}
.admin-topbar .btn { min-height: 44px; }
.admin-stat {
    display: flex;
    align-items: center;
    gap: 14px;
}
.admin-stat::after { background: rgba(165, 79, 22, .08); }
.admin-stat i {
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border-radius: var(--radius);
    display: grid;
    place-items: center;
    background: var(--admin-soft);
    color: var(--admin);
    font-size: 1.35rem;
}
.status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.status-tile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}
.status-tile span {
    color: var(--muted);
    text-transform: capitalize;
    font-weight: 760;
}
.status-tile strong {
    color: var(--ink-strong);
    font-size: 1.4rem;
}
.admin-mini-list {
    display: grid;
    gap: 10px;
}
.admin-mini-list a {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}
.admin-mini-list a:hover {
    border-color: rgba(165, 79, 22, .28);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}
.admin-mini-list img, .mini-fallback {
    width: 42px;
    height: 42px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: #fff;
    object-fit: contain;
    display: grid;
    place-items: center;
}
.admin-mini-list strong, .admin-mini-list small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.admin-mini-list small { color: var(--muted); }
.admin-mini-list em {
    color: var(--muted);
    font-style: normal;
    text-transform: capitalize;
}
.admin-edit-form .form-control, .admin-edit-form .form-select { min-height: 48px; }
.admin-business-card {
    padding: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.admin-business-head {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}
.admin-business-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
}
.admin-business-title {
    display: block;
    color: var(--ink-strong);
    font-weight: 900;
}
.admin-business-head span {
    color: var(--muted);
    font-size: .92rem;
    word-break: break-word;
}
.admin-business-meta {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 12px;
}
.admin-business-meta div {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fbfdff;
}
.admin-business-meta small {
    display: block;
    color: var(--muted);
    font-weight: 760;
}
.admin-business-meta strong {
    display: block;
    word-break: break-word;
    font-size: .95rem;
}
.admin-status-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    margin-bottom: 10px;
}
.admin-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.admin-actions-grid .btn, .admin-status-form .btn { min-height: 42px; }
.search-inline {
    display: flex;
    gap: 8px;
    max-width: 520px;
    margin-top: 8px;
}
.search-inline .form-control { min-width: 0; }
.template-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
    color: var(--brand-dark);
    font-weight: 850;
    font-size: .92rem;
}
.cookie-banner {
    position: fixed;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 1000;
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px;
    background: rgba(255,255,255,.96);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(16px);
}
.cookie-banner div {
    display: grid;
    gap: 2px;
}
.cookie-banner span { color: var(--muted); }

@media (max-width: 1100px) {
    .search-panel-wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .search-panel-wide .btn { grid-column: 1 / -1; }
}

@media (max-width: 900px) {
    body { background: var(--surface); }
    .layout { grid-template-columns: 1fr; }
    .sidebar {
        position: sticky;
        top: 0;
        height: auto;
        padding: 12px 14px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
    .sidebar nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .sidebar .sidebar-exit { margin-top: 0; }
    .sidebar nav a.active::before { display: none; }
    .content {
        padding: 18px;
        padding-bottom: 76px;
    }
    .topbar {
        align-items: stretch;
        flex-direction: column;
    }
    .topbar .btn { width: 100%; }
    .home-hero {
        min-height: auto;
        padding-bottom: 32px;
    }
    .home-nav {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 38px;
    }
    .home-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
    }
    .search-panel, .search-panel-wide { grid-template-columns: 1fr; }
    .search-panel-wide .btn { grid-column: auto; }
    .map-locate {
        left: 12px;
        right: 12px;
        width: auto;
    }
    .section-head {
        align-items: stretch;
        flex-direction: column;
    }
    .business-grid, .booking-hero-grid { grid-template-columns: 1fr; }
    .booking-info { align-self: stretch; }
    .sticky-note { position: static; }
    .fc .fc-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
    .fc .fc-toolbar-chunk {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
    }
    .fc .fc-button {
        min-height: 40px;
        padding: 6px 10px;
        font-size: .86rem;
    }
    .fc .fc-list-event-title, .fc .fc-list-event-time { white-space: normal; }
    .appointment-modal-details, .weekly-day { grid-template-columns: 1fr; }
    .weekly-range { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
    .sidebar-admin nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sidebar-admin nav a, .sidebar-admin .sidebar-exit {
        min-height: 48px;
        justify-content: center;
        text-align: center;
        flex-direction: column;
        gap: 4px;
        font-size: .78rem;
        padding: 8px 6px;
    }
    .admin-table { display: none; }
    .admin-cards {
        display: grid;
        gap: 12px;
    }
    .admin-topbar .btn {
        width: 100%;
        justify-content: center;
    }
    .admin-actions-grid { grid-template-columns: 1fr 1fr; }
    .status-grid { grid-template-columns: 1fr; }
    .admin-mini-list a { grid-template-columns: 42px minmax(0, 1fr); }
    .admin-mini-list em { grid-column: 2; }
    .search-inline {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        max-width: none;
    }
    .mobile-stack thead { display: none; }
    .mobile-stack, .mobile-stack tbody, .mobile-stack tr, .mobile-stack td {
        display: block;
        width: 100%;
    }
    .mobile-stack tr {
        padding: 12px;
        margin-bottom: 12px;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--shadow-sm);
    }
    .mobile-stack td {
        border: 0;
        padding: 6px 0;
    }
    .mobile-stack td::before {
        display: block;
        margin-bottom: 4px;
        color: var(--muted);
        font-size: .76rem;
        font-weight: 850;
        letter-spacing: .03em;
        text-transform: uppercase;
    }
    .appointments-table td:nth-child(1)::before { content: "Fecha"; }
    .appointments-table td:nth-child(2)::before { content: "Cliente"; }
    .appointments-table td:nth-child(3)::before { content: "Servicio"; }
    .appointments-table td:nth-child(4)::before { content: "Empleado"; }
    .appointments-table td:nth-child(5)::before { content: "Estado"; }
    .appointments-table td:nth-child(6)::before { content: "Acciones"; }
    .customers-table td:nth-child(1)::before,
    .services-table td:nth-child(1)::before,
    .employees-table td:nth-child(1)::before { content: "Nombre"; }
    .customers-table td:nth-child(2)::before,
    .employees-table td:nth-child(3)::before { content: "Telefono"; }
    .customers-table td:nth-child(3)::before,
    .employees-table td:nth-child(2)::before { content: "Email"; }
    .services-table td:nth-child(2)::before { content: "Duracion"; }
    .services-table td:nth-child(3)::before { content: "Precio"; }
    .mobile-stack .table-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        text-align: initial !important;
    }
    .mobile-stack .btn, .mobile-stack .form-control, .mobile-stack .form-select {
        width: 100%;
        min-height: 42px;
    }
    .cookie-banner {
        align-items: stretch;
        flex-direction: column;
    }
    .whatsapp-float {
        right: 14px;
        bottom: 86px;
    }
}

@media (max-width: 575px) {
    .content {
        padding-left: 14px;
        padding-right: 14px;
    }
    .sidebar nav, .sidebar-admin nav { grid-template-columns: 1fr 1fr; }
    .brand span { max-width: 210px; }
    .hero-copy h1, .booking-hero h1 { font-size: clamp(2.05rem, 12vw, 3rem); }
    .service-row {
        flex-direction: column;
        gap: 4px;
    }
    .weekly-range { grid-template-columns: 1fr; }
    .weekly-range span { text-align: center; }
    .admin-actions-grid, .mobile-stack .table-actions { grid-template-columns: 1fr; }
}

@media (min-width: 901px) and (max-width: 1180px) {
    .business-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 901px) {
    .admin-table { display: block; }
}

/* Final UI polish layer */
body {
    background:
        linear-gradient(135deg, rgba(15, 159, 143, .05), transparent 28rem),
        linear-gradient(180deg, #f9fbfd 0%, #f3f6fb 100%);
}

.layout {
    grid-template-columns: 292px minmax(0, 1fr);
}

.sidebar {
    background: #fff;
    border-right-color: #e6edf5;
    padding: 22px 18px;
    box-shadow: 8px 0 30px rgba(15, 23, 42, .035);
}

.brand {
    min-height: 46px;
    padding: 4px 6px;
    margin-bottom: 6px;
}

.brand i,
.sidebar-logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
}

.brand i {
    box-shadow: none;
}

.sidebar nav {
    gap: 4px;
}

.sidebar nav a,
.sidebar-exit {
    min-height: 42px;
    padding: 9px 11px;
    color: #52627a;
    border-radius: 10px;
}

.sidebar nav a i,
.sidebar-exit i {
    color: #7b8aa2;
}

.sidebar nav a:hover,
.sidebar nav a.active,
.sidebar-exit:hover {
    background: #f1fbf9;
    border-color: #cceee9;
    box-shadow: inset 0 0 0 1px rgba(15, 159, 143, .04);
}

.sidebar-admin nav a:hover,
.sidebar-admin nav a.active,
.sidebar-admin .sidebar-exit:hover {
    background: #fff7f1;
    border-color: #f4d3bd;
}

.content {
    padding: clamp(24px, 3vw, 40px);
}

.topbar {
    align-items: center;
    margin-bottom: 28px;
}

.topbar h1,
.section-head h2 {
    font-size: clamp(1.65rem, 2.4vw, 2.15rem);
    letter-spacing: -.01em;
}

.card-lite,
.admin-business-card,
.status-tile,
.admin-mini-list a {
    border-color: #e1e8f2;
    box-shadow: 0 14px 36px rgba(15, 23, 42, .055);
}

.card-lite {
    background: #fff;
}

.stat {
    min-height: 132px;
    padding: 24px;
}

.stat .text-secondary {
    font-weight: 760;
}

.stat .value {
    margin-top: 8px;
}

.admin-stat i {
    border-radius: 12px;
}

.table-responsive {
    border-radius: var(--radius);
}

.table > :not(caption) > * > * {
    background: transparent;
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

.form-control,
.form-select {
    border-color: #d7e0eb;
}

.form-control:hover,
.form-select:hover {
    border-color: #bdcad9;
}

.auth-page {
    background:
        linear-gradient(120deg, rgba(8, 31, 45, .82), rgba(10, 112, 103, .68)),
        url("https://images.unsplash.com/photo-1497366754035-f200968a6e72?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.auth-card {
    border: 1px solid rgba(255, 255, 255, .75);
    background: rgba(255, 255, 255, .96);
}

.auth-card h1 {
    font-size: 1.55rem;
}

.auth-card .btn {
    min-height: 46px;
}

.home-hero {
    min-height: 660px;
    background:
        linear-gradient(100deg, rgba(10, 24, 38, .94) 0%, rgba(11, 81, 81, .84) 48%, rgba(15, 159, 143, .68) 100%),
        url("https://images.unsplash.com/photo-1521590832167-7bcbfaa6381f?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.home-hero .container,
.booking-hero .container {
    max-width: 1180px;
}

.hero-copy h1,
.booking-hero h1 {
    max-width: 780px;
    font-size: clamp(2.55rem, 5.6vw, 4.65rem);
    letter-spacing: -.015em;
}

.hero-copy p,
.booking-hero p {
    font-size: clamp(1rem, 1.6vw, 1.15rem);
}

.hero-pill {
    border-color: rgba(255, 255, 255, .42);
    background: rgba(255, 255, 255, .11);
}

.search-panel {
    padding: 12px;
    border-color: rgba(255, 255, 255, .72);
    box-shadow: 0 22px 60px rgba(4, 20, 34, .24);
}

.search-panel .form-control,
.search-panel .form-select {
    min-height: 46px;
}

.business-card,
.map-wrap {
    box-shadow: 0 14px 36px rgba(15, 23, 42, .07);
}

.business-image {
    min-height: 178px;
}

.booking-hero {
    background:
        linear-gradient(100deg, rgba(10, 24, 38, .94), rgba(11, 81, 81, .8), rgba(15, 159, 143, .66)),
        url("https://images.unsplash.com/photo-1560066984-138dadb4c035?auto=format&fit=crop&w=1600&q=80") center/cover;
}

.booking-info {
    background: rgba(255, 255, 255, .14);
    box-shadow: 0 18px 44px rgba(4, 20, 34, .18);
}

.booking-form,
.sticky-note {
    border-color: #dde7f1;
}

.modal-content {
    border-radius: 12px;
}

.cookie-banner {
    border-radius: 12px;
}

@media (max-width: 900px) {
    .layout {
        display: block;
    }

    .sidebar {
        gap: 10px;
        padding: 12px;
    }

    .sidebar nav {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .sidebar nav::-webkit-scrollbar {
        display: none;
    }

    .sidebar nav a,
    .sidebar-exit {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .sidebar-admin nav a,
    .sidebar-admin .sidebar-exit {
        flex-direction: row;
        justify-content: flex-start;
        font-size: .92rem;
    }

    .content {
        padding: 18px;
    }

    .topbar {
        align-items: stretch;
        gap: 14px;
    }

    .home-hero {
        min-height: auto;
        padding-bottom: 36px;
    }

    .hero-copy {
        padding-bottom: 22px;
    }

    .hero-copy h1,
    .booking-hero h1 {
        font-size: clamp(2.35rem, 10vw, 3.45rem);
    }

    .search-panel {
        box-shadow: 0 18px 44px rgba(4, 20, 34, .22);
    }
}

@media (max-width: 575px) {
    .home-nav {
        gap: 12px;
    }

    .hero-copy h1,
    .booking-hero h1 {
        font-size: clamp(2rem, 11vw, 2.85rem);
    }

    .auth-page {
        padding: 16px;
    }

    .auth-card {
        padding: 22px;
    }
}
