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

:root {
    --font-sans: Manrope, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    --font-display: Manrope, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    --app-bg: #f6f3ef;
    --surface: #fffefc;
    --surface-soft: #f2faf9;
    --surface-quiet: #f8fafc;
    --text: #171a21;
    --muted: #687385;
    --muted-strong: #3f4856;
    --line: #dce3ea;
    --line-soft: #edf1f5;
    --brand: #006d77;
    --brand-strong: #064e55;
    --brand-deep: #102a2f;
    --accent: #e76f51;
    --accent-soft: #fff0ea;
    --gold: #c5912b;
    --danger: #b42318;
    --success: #157347;
    --warning: #a16207;
    --shadow: 0 18px 44px rgba(18, 38, 49, .09);
    --shadow-soft: 0 10px 26px rgba(18, 38, 49, .07);
    --radius: 8px;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    background: var(--app-bg);
    color: var(--text);
    letter-spacing: 0;
}

h1, h2, .brand, .display-title {
    font-family: var(--font-display);
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

form,
section,
article,
aside,
main,
.panel,
.stat,
.vivid-card,
.feature-card,
.customer-panel-card {
    min-width: 0;
}

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

input,
select,
textarea {
    -webkit-appearance: none;
    appearance: none;
    display: block;
    width: 100%;
    max-width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 15px;
    outline: none;
    box-shadow: none;
    caret-color: var(--brand);
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

input:not([type="file"]):not([type="radio"]):not([type="checkbox"]),
select {
    height: 48px;
    min-height: 48px;
    padding: 0 14px;
    line-height: 48px;
}

input[type="radio"],
input[type="checkbox"] {
    appearance: auto;
    -webkit-appearance: auto;
    display: inline-block;
    width: auto;
    min-height: 0;
    padding: 0;
}

input::placeholder,
textarea::placeholder {
    color: #9099a8;
    opacity: 1;
}

select {
    padding-right: 42px;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--brand-deep) 50%),
        linear-gradient(135deg, var(--brand-deep) 50%, transparent 50%);
    background-position:
        calc(100% - 19px) 21px,
        calc(100% - 14px) 21px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

textarea {
    min-height: 116px;
    padding: 13px 14px;
    line-height: 1.55;
    resize: vertical;
    overflow: auto;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #b9c7d3;
}

input:focus,
select:focus,
textarea:focus,
a:focus-visible,
button:focus-visible {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(0, 109, 119, .18);
}

input:disabled,
select:disabled,
textarea:disabled {
    cursor: not-allowed;
    background: #eef2f6;
    color: #94a3b8;
}

input[type="file"] {
    min-height: 48px;
    padding: 6px 8px;
    background: var(--surface-quiet);
    color: var(--muted-strong);
    line-height: 1.4;
}

input[type="file"]::file-selector-button {
    min-height: 36px;
    margin-right: 12px;
    padding: 0 13px;
    border: 0;
    border-radius: 6px;
    background: var(--brand-deep);
    color: #fff;
    cursor: pointer;
    font-weight: 800;
}

button,
.btn,
.gradient-button,
.outline-button {
    min-height: 42px;
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.2;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease;
}

button:hover,
.btn:hover,
.gradient-button:hover,
.outline-button:hover {
    transform: translateY(-1px);
}

.btn,
.gradient-button,
.outline-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 100%;
    padding: 11px 15px;
    text-align: center;
    white-space: normal;
    text-decoration: none;
}

button,
.btn {
    border: 1px solid transparent;
    background: var(--brand);
    color: #fff !important;
}

.btn:hover,
.gradient-button:hover {
    box-shadow: 0 14px 28px rgba(0, 109, 119, .2);
}

.btn.dark {
    background: var(--brand-deep);
}

.btn.light {
    border-color: var(--line);
    background: #fff;
    color: var(--brand-deep) !important;
}

.btn.small {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12px;
}

.btn.success {
    background: var(--success);
}

.btn.danger,
.delete-link {
    border-color: #ffd5d0 !important;
    background: #fff1ef !important;
    color: var(--danger) !important;
}

.inline-delete,
.inline-action {
    display: inline-flex;
    margin: 0;
}

.actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.actions .inline-delete,
.actions .inline-action {
    flex: 0 0 auto;
}

.gradient-button {
    border: 1px solid rgba(255, 255, 255, .08);
    background: linear-gradient(135deg, var(--brand), #0a8f87 52%, var(--accent));
    color: #fff !important;
    box-shadow: 0 16px 30px rgba(0, 109, 119, .2);
}

.outline-button {
    border: 1px solid rgba(255,255,255,.72);
    background: rgba(255,255,255,.14);
    color: #fff !important;
    backdrop-filter: blur(10px);
}

.form,
.stack {
    display: grid;
    gap: 14px;
}

.form-row,
.field {
    display: grid;
    gap: 7px;
}

.field label,
.field span,
.form-label {
    color: var(--muted-strong);
    font-size: 12px;
    font-weight: 800;
}

.field small,
.field-help {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.55;
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.field.full,
.field-grid .full {
    grid-column: 1 / -1;
}

.settings-section {
    gap: 18px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.settings-panel {
    height: fit-content;
}

.empty-state {
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: var(--surface-soft);
    color: var(--muted);
    padding: 20px;
    text-align: center;
    font-weight: 750;
}

.compact-card {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.mobile-scroll,
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 109, 119, .34) transparent;
}

.table-wrap::-webkit-scrollbar,
.mobile-scroll::-webkit-scrollbar {
    height: 8px;
}

.table-wrap::-webkit-scrollbar-thumb,
.mobile-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(0, 109, 119, .28);
}

.edit-row {
    display: none !important;
}

.edit-grid,
.edit-grid.wide {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 12px;
    align-items: start;
}

.app-toast-wrap {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 9999;
    display: grid;
    gap: 10px;
    width: min(390px, calc(100vw - 28px));
    pointer-events: none;
}

.app-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1px solid var(--line-soft);
    border-left: 4px solid var(--brand);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 20px 44px rgba(18, 38, 49, .16);
    color: var(--text);
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.45;
    transform: translateY(-8px);
    animation: toast-in .22s ease forwards;
    pointer-events: auto;
}

.app-toast.success { border-left-color: var(--success); }
.app-toast.error { border-left-color: var(--danger); }
.app-toast i { margin-top: 2px; color: var(--brand); }
.app-toast.success i { color: var(--success); }
.app-toast.error i { color: var(--danger); }

.app-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid var(--line-soft);
    border-left: 4px solid var(--brand);
    border-radius: 8px;
    background: #fff;
    padding: 12px 14px;
    color: var(--muted-strong);
    font-size: 14px;
    font-weight: 800;
}

.app-note.success {
    border-left-color: var(--success);
}

.app-note i {
    margin-top: 2px;
    color: var(--success);
}

@keyframes toast-in {
    to { opacity: 1; transform: translateY(0); }
}

.status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #eaf7f5;
    color: var(--brand-strong);
    padding: 6px 9px;
    font-size: 11px;
    font-weight: 900;
}

.pending,
.open {
    background: #fff7ed;
    color: #92400e;
}

.approved {
    background: #e0f2fe;
    color: #075985;
}

.completed,
.paid,
.answered {
    background: #dcfce7;
    color: #166534;
}

.cancelled,
.unpaid,
.closed {
    background: #fee2e2;
    color: #991b1b;
}

.lead {
    color: var(--muted);
    line-height: 1.65;
}

.support-ticket-card {
    display: grid;
    gap: 7px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #fff;
    padding: 14px;
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow-soft);
}

.support-ticket-card.answered {
    border-color: rgba(22, 163, 74, .28);
    background: #f7fef9;
}

.support-ticket-card b {
    font-size: 16px;
}

.support-ticket-card small,
.support-ticket-card em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

/* Admin shell */
.layout {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 20;
    display: flex;
    width: 286px;
    flex-direction: column;
    border-right: 1px solid rgba(255,255,255,.08);
    background: linear-gradient(180deg, #102a2f 0%, #17212b 100%);
    color: #fff;
    padding: 22px;
    box-shadow: 14px 0 34px rgba(16,42,47,.16);
}

.sidebar .brand {
    color: #fff;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
}

.sidebar .brand span {
    color: #7edbd2;
}

.sidebar .muted {
    margin-top: 8px;
    color: #bad0d4;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .12em;
}

.side-menu {
    display: grid;
    gap: 5px;
    margin-top: 26px;
    overflow: auto;
    padding-right: 2px;
}

.side-menu a {
    display: flex;
    align-items: center;
    gap: 11px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    padding: 10px 11px;
    color: #d8e4e6;
    font-size: 13px;
    font-weight: 800;
}

.side-menu a i {
    width: 18px;
    color: #7edbd2;
    text-align: center;
}

.side-menu a:hover,
.side-menu a:focus-visible {
    border-color: rgba(255,255,255,.12);
    background: rgba(255,255,255,.08);
    color: #fff;
}

.main {
    margin-left: 286px;
    padding: 26px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: rgba(255,254,252,.96);
    padding: 18px 20px;
    box-shadow: var(--shadow-soft);
}

.topbar h2 {
    margin: 5px 0 0;
    color: var(--text);
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #eaf7f5;
    color: var(--brand-strong);
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.stat,
.panel {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: rgba(255,254,252,.98);
    box-shadow: var(--shadow-soft);
}

.stat {
    padding: 18px;
}

.stat small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.stat b {
    display: block;
    margin-top: 8px;
    color: var(--text);
    font-size: 28px;
    font-weight: 900;
}

.panel {
    overflow: hidden;
    margin-bottom: 18px;
    padding: 20px;
}

.panel h3 {
    margin: 0 0 14px;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 21px;
    font-weight: 900;
}

.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.two {
    display: grid;
    grid-template-columns: minmax(310px,.9fr) 1.1fr;
    gap: 18px;
}

.three {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 14px;
}

.filters {
    display: grid;
    grid-template-columns: repeat(5,minmax(130px,1fr));
    gap: 10px;
    margin: 14px 0;
}

table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
}

th {
    background: #f3f7f7;
    color: var(--muted-strong);
    font-size: 11px;
    font-weight: 900;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: .08em;
}

th,
td {
    border-bottom: 1px solid var(--line-soft);
    padding: 13px 14px;
}

td {
    color: var(--muted-strong);
    font-size: 14px;
    vertical-align: top;
}

tr:hover td {
    background: #fbfdfd;
}

.detail-form {
    max-width: 1040px;
}

.form-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.calendar {
    display: grid;
    grid-template-columns: repeat(7,minmax(0,1fr));
    gap: 8px;
}

.day {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: 10px;
    background: #fff;
}

.day.full { background: #fff1ef; }
.day.busy { background: #fff7ed; }
.day.free { background: #edfdf8; }

/* Tailwind color normalization for the legacy PHP views. */
.bg-cyan-700,
.hover\:bg-cyan-800:hover { background-color: var(--brand) !important; }
.text-cyan-700,
.hover\:text-cyan-700:hover,
.focus\:border-cyan-700:focus { color: var(--brand) !important; border-color: var(--brand) !important; }
.focus\:ring-cyan-700\/10:focus { --tw-ring-color: rgba(0, 109, 119, .16) !important; }
.bg-cyan-50 { background-color: var(--surface-soft) !important; }
.text-cyan-800,
.text-cyan-200 { color: var(--brand-strong) !important; }
.border-slate-200 { border-color: var(--line-soft) !important; }
.bg-slate-50 { background-color: var(--app-bg) !important; }
.bg-slate-100 { background-color: var(--surface-soft) !important; }
.bg-slate-950 { background-color: var(--brand-deep) !important; }
.bg-white\/10 { background-color: rgba(255, 255, 255, .18) !important; }
.text-slate-950,
.text-slate-900 { color: var(--text) !important; }
.text-slate-700 { color: var(--muted-strong) !important; }
.text-slate-600,
.text-slate-500,
.text-slate-400 { color: var(--muted) !important; }
.text-pink-700 { color: var(--brand) !important; }
.shadow-sm { box-shadow: var(--shadow-soft) !important; }
.rounded-xl,
.rounded-2xl { border-radius: var(--radius) !important; }

/* Public site */
.site-body {
    background:
        radial-gradient(circle at 12% 0%, rgba(0, 109, 119, .11), transparent 28%),
        radial-gradient(circle at 88% 10%, rgba(231, 111, 81, .12), transparent 30%),
        linear-gradient(180deg, #fffdf8 0%, #f6f3ef 100%);
}

.site-header {
    border-bottom: 1px solid rgba(220, 227, 234, .9);
    background: rgba(255, 254, 252, .9);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 24px rgba(18, 38, 49, .06);
}

.site-header-inner {
    gap: 18px;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--brand-deep), var(--brand));
    color: #fff;
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 800;
    box-shadow: var(--shadow-soft);
}

.site-brand-text small {
    color: var(--brand) !important;
    letter-spacing: .08em;
}

.site-link {
    position: relative;
    color: var(--muted-strong);
    font-weight: 800;
}

.site-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -8px;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left;
    background: var(--accent);
    transition: transform .16s ease;
}

.site-link:hover,
.site-link:focus-visible {
    color: var(--brand-deep);
}

.site-link:hover::after,
.site-link:focus-visible::after {
    transform: scaleX(1);
}

.site-actions > a:first-child {
    border: 1px solid var(--line);
    background: #fff !important;
    color: var(--brand-deep) !important;
}

.site-hero {
    position: relative;
    min-height: 690px;
    overflow: hidden;
    isolation: isolate;
    background: var(--brand-deep);
}

.site-hero > img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(.98) contrast(1.04);
    transform: scale(1.03);
}

.site-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(16, 42, 47, .88) 0%, rgba(16, 42, 47, .62) 48%, rgba(16, 42, 47, .18) 100%),
        linear-gradient(180deg, rgba(0,0,0,.08), rgba(0,0,0,.34));
}

.hero-content {
    min-height: 690px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    background: rgba(255,255,255,.13);
    color: #fff;
    padding: 8px 11px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.section-kicker {
    border-color: rgba(0, 109, 119, .22);
    background: #eaf7f5;
    color: var(--brand-strong);
}

.color-band {
    background:
        linear-gradient(135deg, rgba(0, 109, 119, .08), rgba(231, 111, 81, .07)),
        #fffaf4;
}

.vivid-card,
.feature-card,
.editorial-card,
.auth-split {
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: rgba(255, 254, 252, .96);
    box-shadow: var(--shadow-soft);
}

.vivid-card:hover,
.feature-card:hover {
    border-color: #c9d9df;
    box-shadow: var(--shadow);
}

.vivid-media {
    width: 100%;
    height: 225px;
    object-fit: cover;
    background: #dce3ea;
}

.site-icon {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: #eaf7f5;
    color: var(--brand);
    font-size: 18px;
}

.metric-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 999px;
    background: rgba(255,255,255,.9);
    color: var(--brand-deep);
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 900;
    box-shadow: var(--shadow-soft);
}

.reveal {
    opacity: 0;
    transform: translateY(14px);
    animation: reveal-up .5s ease forwards;
}

.delay-1 { animation-delay: .07s; }
.delay-2 { animation-delay: .14s; }
.delay-3 { animation-delay: .21s; }

@keyframes reveal-up {
    to { opacity: 1; transform: translateY(0); }
}

.media-cover {
    position: relative;
    overflow: hidden;
    min-height: 220px;
    background:
        linear-gradient(135deg, rgba(16,42,47,.28), rgba(0,109,119,.18)),
        url("https://images.unsplash.com/photo-1522337360788-8b13dee7a37e?auto=format&fit=crop&w=1200&q=82") center/cover;
}

.hero-shell {
    background: linear-gradient(90deg, rgba(255,255,255,.96), rgba(255,255,255,.78));
}

/* Customer area */
.customer-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at 0% 0%, rgba(0,109,119,.12), transparent 28%),
        linear-gradient(180deg, #fbfaf7, #eef5f4 100%);
}

.customer-sidebar {
    background: rgba(255, 254, 252, .94);
    border-right: 1px solid var(--line);
    box-shadow: 14px 0 34px rgba(18, 38, 49, .08);
    backdrop-filter: blur(16px);
}

.customer-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    padding: 12px 13px;
    color: var(--muted-strong);
    font-size: 14px;
    font-weight: 850;
}

.customer-nav a i {
    width: 18px;
    color: var(--brand);
    text-align: center;
}

.customer-nav a:hover,
.customer-nav a.active {
    border-color: var(--line-soft);
    background: #fff;
    color: var(--brand-deep);
    box-shadow: var(--shadow-soft);
}

.customer-panel-card {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: rgba(255,254,252,.96);
    box-shadow: var(--shadow-soft);
}

.customer-welcome {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    background:
        linear-gradient(90deg, rgba(16,42,47,.9), rgba(0,109,119,.64)),
        url("https://images.unsplash.com/photo-1522337360788-8b13dee7a37e?auto=format&fit=crop&w=1400&q=82") center/cover;
    color: #fff;
    box-shadow: var(--shadow);
}

.customer-welcome p {
    color: rgba(255,255,255,.86);
}

.slot-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.slot-card {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 54px;
    border: 1px solid #b9eadf;
    border-radius: var(--radius);
    background: #edfdf8;
    color: #075e4d;
    cursor: pointer;
    font-weight: 900;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background-color .15s ease;
}

.slot-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.slot-card span {
    display: block;
    padding: 0 6px;
    text-align: center;
    overflow-wrap: anywhere;
}

.slot-card:has(input:focus-visible) {
    box-shadow: 0 0 0 3px rgba(0,109,119,.18);
}

.slot-card:has(input:checked) {
    border-color: var(--brand);
    background: var(--brand);
    color: #fff;
    box-shadow: 0 14px 24px rgba(0,109,119,.18);
    transform: translateY(-1px);
}

.slot-card.disabled {
    border-color: #e2e8f0;
    background: #f3f6f8;
    color: #8b98a8;
    cursor: not-allowed;
    opacity: .82;
}

.booking-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.booking-step,
.summary-row,
.detail-list > div {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .76);
}

.booking-step {
    display: flex;
    gap: 12px;
    padding: 14px;
}

.booking-step i {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    border-radius: var(--radius);
    background: #eaf7f5;
    color: var(--brand);
}

.booking-step span,
.summary-row span,
.detail-list span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.booking-step b,
.summary-row b,
.detail-list b {
    display: block;
    margin-top: 4px;
    color: var(--text);
    font-weight: 900;
}

.summary-row,
.detail-list > div {
    padding: 13px 14px;
}

.summary-grid,
.detail-list {
    display: grid;
    gap: 10px;
}

.purchase-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(16, 42, 47, .92), rgba(0, 109, 119, .84) 52%, rgba(231, 111, 81, .88)),
        var(--brand-deep);
    color: #fff;
    padding: 24px;
}

.purchase-hero b {
    display: block;
    margin-top: 6px;
    font-size: clamp(34px, 5vw, 54px);
    font-weight: 900;
    line-height: 1;
}

.purchase-hero p {
    margin: 10px 0 0;
    color: rgba(255,255,255,.82);
}

.purchase-badge {
    flex: 0 0 auto;
    border: 1px solid rgba(255,255,255,.34);
    border-radius: 999px;
    background: rgba(255,255,255,.16);
    padding: 10px 13px;
    color: #fff;
    font-weight: 900;
}

.check-line {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: #fff;
    padding: 13px;
    color: var(--muted-strong);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.45;
}

.check-line input {
    margin-top: 3px;
    accent-color: var(--brand);
}

.package-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.package-progress-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 14px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: rgba(255,255,255,.88);
    padding: 18px;
    box-shadow: var(--shadow-soft);
}

.package-progress-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.package-progress-head b {
    display: block;
    color: var(--text);
    font-size: 18px;
    font-weight: 900;
}

.package-progress-head span,
.package-progress-card small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.progress-track {
    position: relative;
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #edf2f5;
}

.table-progress {
    min-width: 150px;
    margin-bottom: 7px;
}

.progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand), #fb7185, #f59e0b);
}

.mini-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.mini-metrics span {
    min-width: 0;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    background: #fff;
    padding: 10px 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-align: center;
}

.mini-metrics b {
    display: block;
    color: var(--text);
    font-size: 18px;
    line-height: 1.1;
}

.compact-form {
    border-top: 1px solid var(--line-soft);
    padding-top: 14px;
}

.compact-filters {
    grid-template-columns: minmax(240px, 1fr) auto auto !important;
}

.inline-search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: #fff;
    padding: 10px 12px;
}

.inline-search i {
    color: var(--brand);
}

.table-search {
    border: 0 !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.customer-picker {
    position: relative;
    z-index: 3;
}

.customer-picker-results {
    position: absolute;
    top: calc(100% - 2px);
    left: 0;
    right: 0;
    z-index: 30;
    display: none;
    max-height: 290px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 0 0 var(--radius) var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
}

.customer-picker-results.is-open {
    display: block;
}

.customer-picker-results button {
    display: flex;
    width: 100%;
    min-height: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    border: 0;
    border-bottom: 1px solid var(--line-soft);
    border-radius: 0;
    background: #fff;
    padding: 12px 14px;
    color: var(--text);
    text-align: left;
    transform: none;
}

.customer-picker-results button:hover,
.customer-picker-results button:focus-visible {
    background: var(--surface-soft);
    box-shadow: none;
}

.customer-picker-results b {
    font-size: 14px;
    font-weight: 900;
}

.customer-picker-results small,
.customer-picker-selected {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.auth-visual {
    background:
        linear-gradient(135deg, rgba(16,42,47,.82), rgba(0,109,119,.62)),
        url("https://images.unsplash.com/photo-1560066984-138dadb4c035?auto=format&fit=crop&w=1400&q=82") center/cover;
    color: #fff;
}

/* Layout helpers */
.panel > input,
.panel > select,
.panel > textarea,
.panel > input[type="file"] {
    margin-bottom: 12px;
}

.form > input,
.form > select,
.form > textarea,
.form > button,
.form > .btn {
    margin: 0;
}

/* Tailwind CDN injects its reset after page load. These stronger rules keep
   every PHP view's form controls stable in admin, customer and public pages. */
html,
body,
button,
.btn,
.gradient-button,
.outline-button,
input,
select,
textarea {
    font-family: var(--font-sans) !important;
}

body input:not([type="hidden"]):not([type="file"]):not([type="radio"]):not([type="checkbox"]),
body select,
body textarea,
body input[type="file"] {
    width: 100% !important;
    max-width: 100% !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius) !important;
    background-color: #fff !important;
    color: var(--text) !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    box-shadow: none !important;
    outline: none !important;
}

body input:not([type="hidden"]):not([type="file"]):not([type="radio"]):not([type="checkbox"]),
body select {
    height: 50px !important;
    min-height: 50px !important;
    line-height: 50px !important;
    padding: 0 14px !important;
}

body select {
    padding-right: 44px !important;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--brand-deep) 50%),
        linear-gradient(135deg, var(--brand-deep) 50%, transparent 50%) !important;
    background-position:
        calc(100% - 20px) 22px,
        calc(100% - 15px) 22px !important;
    background-size: 5px 5px, 5px 5px !important;
    background-repeat: no-repeat !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

body textarea {
    min-height: 128px !important;
    padding: 13px 14px !important;
    line-height: 1.55 !important;
    resize: vertical !important;
}

body input[type="file"] {
    min-height: 50px !important;
    padding: 6px 8px !important;
    background: var(--surface-quiet) !important;
    line-height: 1.35 !important;
}

body input[type="file"]::file-selector-button {
    min-height: 36px !important;
    margin-right: 12px !important;
    padding: 0 14px !important;
    border: 0 !important;
    border-radius: 6px !important;
    background: var(--brand-deep) !important;
    color: #fff !important;
    font-family: var(--font-sans) !important;
    font-weight: 800 !important;
}

body input::placeholder,
body textarea::placeholder {
    color: #8994a5 !important;
    opacity: 1 !important;
}

body input:not([type="hidden"]):not([type="file"]):not([type="radio"]):not([type="checkbox"]):focus,
body select:focus,
body textarea:focus,
body input[type="file"]:focus {
    border-color: var(--brand) !important;
    box-shadow: 0 0 0 4px rgba(0, 109, 119, .16) !important;
}

.field label,
.field span,
.form-label {
    font-size: 13px !important;
    line-height: 1.35 !important;
    letter-spacing: 0 !important;
}

.field-grid,
.settings-grid {
    align-items: start;
}

.detail-form {
    max-width: 100% !important;
}

.detail-form .field-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
    gap: 18px 20px;
}

.detail-form .field.full {
    grid-column: 1 / -1;
}

footer {
    background: #fffefc !important;
}

footer a:hover {
    color: var(--brand);
}

@media (max-width: 1080px) {
    .edit-grid,
    .edit-grid.wide,
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .customer-sidebar {
        position: relative !important;
        width: auto !important;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        box-shadow: none;
    }

    .customer-nav {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .customer-nav a {
        white-space: nowrap;
    }
}

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

    .sidebar {
        position: relative;
        inset: auto;
        width: auto;
        border-right: 0;
        border-bottom: 1px solid rgba(255,255,255,.08);
        box-shadow: none;
        padding: 16px;
    }

    .side-menu {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        margin-top: 16px;
        padding-bottom: 6px;
    }

    .side-menu a {
        white-space: nowrap;
        background: rgba(255,255,255,.06);
    }

    .main {
        margin-left: 0;
        padding: 16px;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px;
    }

    .topbar h2 {
        font-size: 27px;
    }

    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .two,
    .three {
        grid-template-columns: 1fr;
    }

    .filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .calendar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    table {
        min-width: 720px;
    }

    .page-heading {
        flex-direction: column;
    }

    .site-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start;
        padding-top: 10px;
    }

    .site-nav a {
        white-space: nowrap;
    }

    .site-header-inner {
        flex-wrap: wrap;
    }

    .site-actions {
        margin-left: auto;
    }
}

@media (max-width: 760px) {
    .field-grid {
        grid-template-columns: 1fr;
    }

    .detail-form .field-grid {
        grid-template-columns: 1fr;
    }

    .booking-steps {
        grid-template-columns: 1fr;
    }

    .purchase-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .site-hero,
    .hero-content {
        min-height: 620px;
    }

    .vivid-media {
        height: 190px;
    }

    .hero-kicker,
    .section-kicker {
        font-size: 11px;
    }
}

@media (max-width: 640px) {
    body {
        overflow-x: hidden;
    }

    .text-7xl,
    .sm\:text-7xl,
    .lg\:text-7xl {
        font-size: 2.8rem !important;
        line-height: 1.02 !important;
    }

    .text-6xl,
    .sm\:text-6xl,
    .lg\:text-6xl {
        font-size: 2.35rem !important;
        line-height: 1.08 !important;
    }

    .text-5xl,
    .sm\:text-5xl {
        font-size: 2rem !important;
        line-height: 1.12 !important;
    }

    .text-4xl {
        font-size: 1.65rem !important;
        line-height: 1.18 !important;
    }

    .text-3xl {
        font-size: 1.4rem !important;
        line-height: 1.22 !important;
    }

    section {
        scroll-margin-top: 92px;
    }

    input:not([type="file"]):not([type="radio"]):not([type="checkbox"]),
    select {
        height: 50px;
        min-height: 50px;
        line-height: 50px;
        font-size: 16px;
    }

    textarea {
        font-size: 16px;
    }

    input[type="file"] {
        min-height: auto;
        white-space: normal;
    }

    input[type="file"]::file-selector-button {
        display: block;
        width: 100%;
        margin: 0 0 8px 0;
    }

    .app-toast-wrap {
        top: 12px;
        left: 12px;
        right: 12px;
        width: auto;
    }

    .site-header {
        margin-inline: 0;
    }

    .site-actions a:first-child {
        display: none !important;
    }

    .site-header-inner {
        flex-wrap: nowrap !important;
        gap: 10px;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .site-header .site-nav {
        display: none !important;
    }

    .site-actions {
        margin-left: auto;
        flex: 0 0 auto;
    }

    .site-actions .gradient-button {
        max-width: 118px;
        min-height: 40px;
        padding: 10px 12px !important;
        font-size: 13px !important;
    }

    .site-brand-text .display-title {
        font-size: 1.45rem !important;
        line-height: 1.05 !important;
    }

    .site-brand-text small {
        display: none;
    }

    .brand-mark {
        width: 42px;
        height: 42px;
    }

    .site-hero,
    .hero-content {
        min-height: 590px;
    }

    .gradient-button,
    .outline-button {
        padding: 12px 14px;
    }

    .table-wrap {
        margin-left: -12px;
        margin-right: -12px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .panel,
    .stat {
        padding: 14px;
    }

    .stats,
    .filters,
    .compact-filters {
        grid-template-columns: 1fr;
    }

    .customer-picker-results {
        position: static;
        margin-top: 8px;
        border-radius: var(--radius);
    }

    .actions {
        width: 100%;
    }

    .actions .btn,
    .actions form,
    .actions button {
        flex: 1 1 auto;
        width: 100%;
    }

    .calendar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .topbar .actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    table {
        min-width: 660px;
    }

    .slot-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    .slot-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
