﻿:root {
    --accent: #5b0b4a;
    --accent-strong: #3a0630;
    --accent-hover: #7a1265;
    --gold: #ffd700;
    --gold-soft: #ffe680;
    --gold-muted: #d9b84a;
    --surface: #140714;
    --surface-2: #1e0a1c;
    --surface-3: #2a0d25;
    --border-gold: rgba(255, 215, 0, 0.35);
    --border-soft: rgba(255, 215, 0, 0.18);
    --text: #ffd700;
    --muted: #d9b84a;
    --danger: #ff6b8a;
    --success: #7dffb0;
    --font: "Open Sans", "Segoe UI", Arial, sans-serif;
    --radius: 16px;
}

html, body {
    font-family: var(--font);
    background: #0d030c;
    color: var(--text);
    min-height: 100%;
}

body {
    margin: 0;
    overflow-x: hidden;
}

a, .btn-link {
    color: var(--gold);
}

a:hover {
    color: var(--gold-soft);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--gold);
    font-weight: 700;
    letter-spacing: -0.02em;
}

p, li, label, span, small, div {
    color: inherit;
}

.text-muted, .subtle {
    color: var(--gold-muted) !important;
}

.page-background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.page-background.is-fixed {
    position: fixed;
}

.page-background-canvas {
    position: absolute;
    inset: 0;
}

.page-scrim {
    position: absolute;
    inset: 0;
    background: rgba(10, 2, 14, var(--gf-scrim, 0.55));
    pointer-events: none;
}

.site-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1;
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 38px 0 72px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 14px max(20px, calc((100vw - 1180px) / 2));
    border-bottom: 1px solid var(--border-soft);
    background: rgba(13, 3, 12, 0.78);
    backdrop-filter: blur(18px);
}

.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    flex: 0 0 auto;
}

.brand-logo {
    height: 46px;
    width: auto;
    display: block;
    filter: drop-shadow(0 0 14px rgba(255, 215, 0, 0.12));
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.site-nav a,
.site-nav .link-button {
    color: var(--gold);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    padding: 9px 11px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
}

.site-nav a:hover,
.site-nav .link-button:hover {
    background: rgba(91, 11, 74, 0.65);
    border-color: var(--border-soft);
    color: var(--gold-soft);
}

.site-nav a.active {
    background: var(--accent);
    border-color: var(--gold);
}

.logout-form {
    display: inline-flex;
    margin: 0;
}

.link-button {
    border: 0;
    background: transparent;
    font-family: inherit;
    cursor: pointer;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: var(--accent);
    border: 1px solid var(--gold);
    border-radius: 9px;
    padding: 10px;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--gold);
}

.site-footer {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 26px;
    padding: 36px max(20px, calc((100vw - 1180px) / 2));
    border-top: 1px solid var(--border-soft);
    background: rgba(13, 3, 12, 0.82);
    backdrop-filter: blur(16px);
}

.site-footer p {
    margin: 12px 0 0;
    color: var(--gold-muted);
    max-width: 360px;
}

.footer-links, .footer-meta {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer-links a, .footer-meta a {
    color: var(--gold);
    text-decoration: none;
    font-size: 0.92rem;
}

.footer-meta {
    color: var(--gold-muted);
    font-size: 0.86rem;
}

.floating-admin {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 30;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid var(--gold);
    background: var(--accent);
    color: var(--gold);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.86rem;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
}

.floating-admin:hover {
    background: var(--accent-hover);
    color: var(--gold-soft);
}

/* Buttons */
.btn,
.btn:focus,
.btn:active {
    border-radius: 11px;
    font-weight: 700;
    font-family: var(--font);
}

.btn-gold,
.btn-primary,
button.btn-gold,
button.btn-primary {
    background: var(--accent) !important;
    border: 1px solid var(--gold) !important;
    color: var(--gold) !important;
    padding: 10px 18px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-gold:hover,
.btn-primary:hover {
    background: var(--accent-hover) !important;
    color: var(--gold-soft) !important;
}

.btn-outline-gold {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
}

.btn-outline-gold:hover {
    background: rgba(91, 11, 74, 0.7);
    color: var(--gold-soft);
}

.btn-danger-gold {
    background: rgba(90, 5, 30, 0.6);
    border: 1px solid var(--danger);
    color: #ffd9e2;
}

.btn-sm {
    padding: 7px 12px !important;
    font-size: 0.82rem;
}

.btn:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
    box-shadow: none;
}

/* Forms */
.form-control,
.form-select,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
select,
textarea {
    background: rgba(20, 7, 20, 0.92) !important;
    color: var(--gold) !important;
    border: 1px solid var(--border-gold) !important;
    border-radius: 11px !important;
    font-family: var(--font);
    padding: 10px 12px;
}

.form-control::placeholder,
textarea::placeholder {
    color: rgba(217, 184, 74, 0.55) !important;
}

.form-control:focus,
.form-select:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--gold) !important;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.12) !important;
}

.form-label,
label {
    color: var(--gold-muted);
    font-weight: 600;
    font-size: 0.88rem;
}

.form-check-input {
    background-color: var(--surface-2);
    border-color: var(--border-gold);
}

.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--gold);
}

select option {
    background: var(--surface-2);
    color: var(--gold);
}

/* Panels and cards */
.panel,
.card {
    background: rgba(20, 7, 20, 0.82);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    color: var(--gold);
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.panel-body, .card-body {
    padding: 22px;
}

.panel-title {
    margin: 0 0 4px;
    font-size: 1.08rem;
}

.panel-subtitle {
    color: var(--gold-muted);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 34px;
    align-items: center;
    padding: 54px 0 42px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--gold-muted);
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.hero-kicker::before {
    content: "";
    width: 34px;
    height: 1px;
    background: var(--gold);
}

.hero h1 {
    font-size: clamp(2.6rem, 6vw, 5.2rem);
    line-height: 0.98;
    margin: 0 0 20px;
}

.hero h1 em {
    font-style: normal;
    color: var(--gold-soft);
    text-shadow: 0 0 28px rgba(255, 215, 0, 0.25);
}

.hero p {
    max-width: 620px;
    color: var(--gold-muted);
    font-size: 1.02rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 26px;
}

.hero-art {
    min-height: 340px;
    border-radius: 24px;
    border: 1px solid var(--border-gold);
    overflow: hidden;
    position: relative;
    background: var(--surface-2);
}

.section {
    padding: 42px 0;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.section-head h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    margin: 0;
}

.section-head p {
    color: var(--gold-muted);
    margin: 0;
}

.grid {
    display: grid;
    gap: 18px;
}

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

.category-card,
.product-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    text-decoration: none;
}

.category-card:hover,
.product-card:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
    transition: 160ms ease;
}

.category-thumb,
.product-thumb {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
}

.product-thumb {
    aspect-ratio: 1 / 1;
}

.category-thumb img,
.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.card-title {
    font-size: 1.03rem;
    margin: 0;
    color: var(--gold);
}

.card-text {
    color: var(--gold-muted);
    font-size: 0.88rem;
    line-height: 1.55;
    margin: 0;
    flex: 1;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
}

.price {
    color: var(--gold);
    font-size: 1.05rem;
    font-weight: 800;
}

.badge-gold {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid var(--border-gold);
    color: var(--gold);
    background: rgba(91, 11, 74, 0.55);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.badge-success { color: #baffd8; border-color: rgba(125, 255, 176, 0.45); }
.badge-danger { color: #ffc2ce; border-color: rgba(255, 107, 138, 0.5); }

/* Tables */
.table {
    color: var(--gold);
    border-color: var(--border-soft);
    margin-bottom: 0;
}

.table > :not(caption) > * > * {
    background: transparent;
    color: inherit;
    border-color: var(--border-soft);
    vertical-align: middle;
}

.table thead th {
    color: var(--gold-muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    border-bottom: 1px solid var(--border-gold) !important;
}

.table-hover > tbody > tr:hover > * {
    background: rgba(91, 11, 74, 0.24);
    color: var(--gold);
}

.table-responsive {
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    overflow: auto;
}

/* Slots */
.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.slot-chip {
    border: 1px solid var(--border-gold);
    background: rgba(20, 7, 20, 0.8);
    color: var(--gold);
    border-radius: 11px;
    padding: 10px 12px;
    text-align: center;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.slot-chip:hover,
.slot-chip.selected {
    background: var(--accent);
    border-color: var(--gold);
}

.slot-chip.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* Checkout */
.qr-box {
    background: #fff;
    border-radius: 18px;
    padding: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 300px;
}

.qr-box img {
    width: 100%;
    height: auto;
    display: block;
}

.deeplink-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.deeplink {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--border-soft);
    border-radius: 9px;
    padding: 7px 10px;
    color: var(--gold);
    text-decoration: none;
    font-size: 0.8rem;
    background: rgba(20, 7, 20, 0.6);
}

.deeplink img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Admin */
.admin-shell {
    min-height: 100vh;
    background: #0d030c;
    color: var(--gold);
}

.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 264px;
    display: flex;
    flex-direction: column;
    padding: 20px 14px;
    background: linear-gradient(180deg, #2a0724, #120311 70%);
    border-right: 1px solid var(--border-gold);
    z-index: 20;
    overflow-y: auto;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding: 4px 8px 18px;
    border-bottom: 1px solid var(--border-soft);
    margin-bottom: 14px;
}

.admin-brand .brand-logo { height: 40px; }
.admin-brand span {
    color: var(--gold-muted);
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1;
}

.admin-nav a {
    color: var(--gold);
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 0.9rem;
    font-weight: 600;
}

.admin-nav a:hover {
    background: rgba(91, 11, 74, 0.55);
    border-color: var(--border-soft);
}

.admin-nav a.active {
    background: var(--accent);
    border-color: var(--gold);
}

.admin-sidebar-footer {
    border-top: 1px solid var(--border-soft);
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-view-site {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--gold);
    background: var(--accent);
    border: 1px solid var(--gold);
    border-radius: 10px;
    padding: 9px 11px;
    font-size: 0.86rem;
    font-weight: 700;
}

.admin-user {
    color: var(--gold-muted);
    font-size: 0.78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 4px 6px;
}

.admin-main {
    margin-left: 264px;
    min-height: 100vh;
    background: radial-gradient(circle at 80% 0%, rgba(91, 11, 74, 0.25), transparent 45%), #0d030c;
}

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 30px;
    border-bottom: 1px solid var(--border-soft);
    background: rgba(13, 3, 12, 0.75);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.admin-topbar strong {
    display: block;
    margin-top: 2px;
    color: var(--gold);
}

.admin-kicker {
    color: var(--gold-muted);
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.admin-content {
    padding: 28px 30px 60px;
    max-width: 1400px;
}

.page-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.page-head h1 {
    font-size: 1.8rem;
    margin: 0;
}

.page-head p {
    color: var(--gold-muted);
    margin: 6px 0 0;
}

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

.stat-card {
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: rgba(20, 7, 20, 0.78);
    padding: 16px;
}

.stat-card span {
    color: var(--gold-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-card strong {
    display: block;
    font-size: 1.55rem;
    margin-top: 6px;
    color: var(--gold);
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
    margin-bottom: 16px;
}

.toolbar > * {
    min-width: 0;
}

.alert {
    border-radius: 12px;
    border: 1px solid var(--border-gold);
    background: rgba(91, 11, 74, 0.55);
    color: var(--gold);
    padding: 12px 14px;
}

.alert-danger {
    border-color: rgba(255, 107, 138, 0.55);
    background: rgba(90, 5, 30, 0.5);
    color: #ffd9e2;
}

.alert-success {
    border-color: rgba(125, 255, 176, 0.45);
    background: rgba(10, 60, 35, 0.45);
    color: #baffd8;
}

/* Misc */
.gradient-picker-host {
    width: 100%;
}

.fade-in {
    animation: fadeIn 420ms ease both;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.validation-message {
    color: var(--danger);
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--success);
}

.invalid {
    outline: 1px solid var(--danger);
}

.blazor-error-boundary {
    background: rgba(90, 5, 30, 0.75);
    border: 1px solid var(--danger);
    color: #ffd9e2;
    padding: 1rem;
    border-radius: 12px;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--accent-strong);
    color: var(--gold);
    padding: 12px 18px;
    border-top: 1px solid var(--gold);
}

#blazor-error-ui .dismiss {
    float: right;
    cursor: pointer;
}

/* Bootstrap dialog/validation */
.text-danger { color: var(--danger) !important; }
.text-success { color: var(--success) !important; }
hr { border-color: var(--border-soft); opacity: 1; }

/* Account manage layout */
.account-manage, .manage-layout, .row {
    color: var(--gold);
}

@media (max-width: 1000px) {
    .hero { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-footer { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 780px) {
    .nav-toggle { display: flex; }
    .site-nav {
        display: none;
        position: absolute;
        top: 76px;
        left: 16px;
        right: 16px;
        flex-direction: column;
        align-items: stretch;
        background: rgba(20, 7, 20, 0.97);
        border: 1px solid var(--border-gold);
        border-radius: 14px;
        padding: 12px;
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    }
    .site-nav.open { display: flex; }
    .site-header { position: relative; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .site-footer { grid-template-columns: 1fr; }
    .site-main { width: calc(100% - 28px); }
    .admin-sidebar {
        position: static;
        width: auto;
        border-right: 0;
        border-bottom: 1px solid var(--border-gold);
        max-height: none;
    }
    .admin-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .admin-main { margin-left: 0; }
    .admin-topbar, .admin-content { padding-left: 16px; padding-right: 16px; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
    .stat-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.6rem; }
}

/* GradFlow wrappers */
.hero-gradflow,
.gradient-thumb-canvas {
    position: absolute;
    inset: 0;
}

.hero-gradflow {
    width: 100%;
    height: 100%;
}

.hero-art-overlay {
    position: absolute;
    inset: auto 18px 18px 18px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(13, 3, 12, 0.64);
    border: 1px solid var(--border-gold);
    backdrop-filter: blur(12px);
}

.hero-art-overlay strong {
    font-size: 1.2rem;
    color: var(--gold);
}

.hero-art-overlay p {
    margin: 0;
    font-size: .86rem;
    color: var(--gold-muted);
}

.product-detail .panel,
.product-thumb,
.category-thumb {
    position: relative;
}

@media (max-width: 900px) {
    .product-detail,
    .booking-layout,
    .checkout-layout,
    .cart-layout,
    .admin-split {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 700px) {
    .site-footer { padding: 26px 16px; }
    .site-header { padding: 12px 16px; }
    .brand-logo { height: 38px; }
    .floating-admin span { display: none; }
    .floating-admin { padding: 12px; }
}

/* Static GradFlow preview (no per-card WebGL context) */
.static-gradient {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: #140714;
    box-shadow: inset 0 0 80px rgba(10, 2, 14, 0.55);
}
.static-gradient::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 15%, rgba(255, 215, 0, 0.12), transparent 45%);
    pointer-events: none;
}

.thumb-interactive {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.thumb-hover-live {
    animation: thumbFade 220ms ease both;
}

@keyframes thumbFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Floating account / dashboard menu */
.floating-user-wrap {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 40;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 8px;
}

.floating-user-backdrop {
    position: fixed;
    inset: 0;
    z-index: 39;
    background: rgba(0, 0, 0, 0.28);
}

.floating-user-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid var(--gold);
    background: var(--accent);
    color: var(--gold);
    font-family: var(--font);
    font-weight: 700;
    font-size: 0.86rem;
    cursor: pointer;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
}

.floating-user-button:hover {
    background: var(--accent-hover);
    color: var(--gold-soft);
}

.floating-user-menu {
    width: 238px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px;
    border-radius: 16px;
    border: 1px solid var(--gold);
    background: linear-gradient(180deg, #2a0724, #140714);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65);
}

.floating-user-name {
    padding: 8px 10px 10px;
    margin-bottom: 3px;
    border-bottom: 1px solid var(--border-soft);
    color: var(--gold-muted);
    font-size: 0.76rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.floating-user-link {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: var(--gold);
    text-decoration: none;
    font-family: var(--font);
    font-size: 0.88rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.floating-user-link:hover {
    background: rgba(91, 11, 74, 0.7);
    border-color: var(--border-soft);
    color: var(--gold-soft);
}

.floating-user-icon {
    width: 16px;
    text-align: center;
    color: var(--gold-muted);
}

.floating-user-logout {
    margin: 0;
}

@media (max-width: 700px) {
    .floating-user-button span { display: none; }
    .floating-user-button { padding: 12px; }
    .floating-user-menu { width: 210px; }
}

/* Full-page gradient coverage when Scroll mode is selected */
body {
    position: relative;
}

.page-background.is-absolute {
    position: absolute;
    inset: 0;
    height: auto;
    min-height: 100vh;
}

/* Toaster */
.toast-stack {
    position: fixed;
    top: 88px;
    right: 22px;
    z-index: 80;
    width: min(370px, calc(100vw - 32px));
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.app-toast {
    pointer-events: auto;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 38px 15px 12px;
    border-radius: 14px;
    border: 1px solid var(--gold);
    background: rgba(42, 7, 36, 0.97);
    color: var(--gold);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    animation: toastIn 220ms ease both;
}

.app-toast-success { border-color: rgba(125, 255, 176, 0.65); }
.app-toast-error { border-color: rgba(255, 107, 138, 0.7); }
.app-toast-warning { border-color: rgba(255, 215, 0, 0.8); }

.app-toast-icon {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--gold);
    background: rgba(91, 11, 74, 0.85);
    color: var(--gold);
    font-size: 0.8rem;
    font-weight: 800;
    margin-top: 1px;
}

.app-toast-success .app-toast-icon { border-color: rgba(125, 255, 176, 0.7); color: #baffd8; }
.app-toast-error .app-toast-icon { border-color: rgba(255, 107, 138, 0.7); color: #ffc2ce; }

.app-toast-message {
    flex: 1;
    font-size: 0.88rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.app-toast-close {
    position: absolute;
    top: 5px;
    right: 8px;
    border: 0;
    background: transparent;
    color: var(--gold-muted);
    font-family: var(--font);
    font-size: 1.15rem;
    line-height: 1;
    cursor: pointer;
}

.app-toast-close:hover { color: var(--gold-soft); }

.app-toast-progress {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: var(--gold);
    transform-origin: left;
    animation: toastProgress var(--toast-duration) linear forwards;
}

.app-toast-error .app-toast-progress { background: #ff6b8a; }
.app-toast-success .app-toast-progress { background: #7dffb0; }

@keyframes toastIn {
    from { opacity: 0; transform: translateX(24px) scale(0.98); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastProgress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

@media (max-width: 700px) {
    .toast-stack { top: 78px; right: 12px; }
}


/* Logo upload preview */
.logo-preview {
    min-width: 250px;
    min-height: 96px;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    border: 1px solid var(--border-soft);
    background: radial-gradient(circle at 50% 0%, rgba(91, 11, 74, 0.55), transparent 70%), #140714;
}

.logo-preview img {
    display: block;
    max-width: 280px;
    max-height: 76px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Native date/time picker icon visibility on dark inputs */
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="month"],
input[type="week"] {
    color-scheme: light;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="week"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 1;
    filter: invert(1);
}

input[type="date"]::-webkit-calendar-picker-indicator:hover,
input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover,
input[type="time"]::-webkit-calendar-picker-indicator:hover,
input[type="month"]::-webkit-calendar-picker-indicator:hover,
input[type="week"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.page-background-poster {
    object-fit: cover;
    object-position: center;
    width: 100%;
    height: 100%;
    display: block;
}

/* Layer order for live background + static fallback */
.page-background-fallback,
.page-background-poster {
    z-index: 0;
}

.page-background-live {
    z-index: 1;
}

.page-scrim {
    z-index: 2;
}

/* Booking day selector */
.booking-days {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 6px 2px 10px;
    scrollbar-width: thin;
}

.day-button {
    flex: 0 0 auto;
    min-width: 88px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border: 1px solid var(--border-gold);
    border-radius: 14px;
    background: rgba(20, 7, 20, 0.82);
    color: var(--gold);
    font-family: var(--font);
    cursor: pointer;
    transition: 150ms ease;
}

.day-button:hover:not(:disabled) {
    background: rgba(91, 11, 74, 0.75);
    border-color: var(--gold);
    transform: translateY(-1px);
}

.day-button.selected {
    background: var(--accent);
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.18);
}

.day-button.empty,
.day-button:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

.day-weekday {
    font-size: 0.68rem;
    color: var(--gold-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.day-number {
    font-size: 1.55rem;
    line-height: 1;
    color: var(--gold);
}

.day-month {
    font-size: 0.68rem;
    color: var(--gold-muted);
}

.day-count {
    margin-top: 3px;
    font-size: 0.66rem;
    color: var(--gold-muted);
}

.day-button.selected .day-weekday,
.day-button.selected .day-month,
.day-button.selected .day-count {
    color: var(--gold-soft);
}

/* Slim, themed scrollbars */
:root {
    --scrollbar-track: rgba(13, 3, 12, 0.72);
    --scrollbar-thumb: rgba(255, 215, 0, 0.38);
    --scrollbar-thumb-strong: rgba(255, 215, 0, 0.7);
}

html {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: linear-gradient(180deg, #7a1265 0%, #5b0b4a 100%);
    border: 1px solid rgba(255, 215, 0, 0.35);
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #9a1a80 0%, #7a1265 100%);
    border-color: var(--scrollbar-thumb-strong);
}

::-webkit-scrollbar-corner {
    background: transparent;
}

.booking-days,
.table-responsive,
.admin-sidebar,
.toast-stack {
    scrollbar-width: thin;
    scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

@media (max-width: 700px) {
    ::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }
}

/* Category image upload */
.category-image-preview {
    width: 100%;
    max-width: 340px;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border-gold);
    background: var(--surface-2);
    margin-bottom: 10px;
}

.category-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.category-image-empty {
    padding: 16px;
    margin-bottom: 10px;
    border-radius: 12px;
    border: 1px dashed var(--border-gold);
    color: var(--gold-muted);
    font-size: .85rem;
    background: rgba(20, 7, 20, .5);
}

/* Media library / chooser */
.media-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(5, 1, 6, 0.72);
    backdrop-filter: blur(4px);
}

.media-modal {
    position: fixed;
    z-index: 91;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(1040px, calc(100vw - 32px));
    max-height: min(82vh, 900px);
    display: flex;
    flex-direction: column;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid var(--gold);
    background: linear-gradient(180deg, #2a0724, #140714);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
}

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

.media-modal-head h2 {
    margin: 8px 0 0;
    font-size: 1.35rem;
}

.media-modal-close {
    border: 0;
    background: transparent;
    color: var(--gold-muted);
    font-family: var(--font);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
}

.media-modal-close:hover { color: var(--gold-soft); }

.media-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0 10px;
}

.media-toolbar input { flex: 1; min-width: 180px; }
.media-toolbar select { max-width: 220px; }

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    overflow-y: auto;
    padding: 4px;
    min-height: 0;
}

.media-grid-admin {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    margin-top: 10px;
}

.media-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 7px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: rgba(20, 7, 20, 0.78);
    color: var(--gold);
    text-align: left;
    font-family: var(--font);
    font-size: 0.72rem;
    cursor: pointer;
}

.media-item:hover {
    border-color: var(--gold);
    background: rgba(91, 11, 74, 0.55);
}

.media-thumb {
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    background: var(--surface-2);
}

.media-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.media-meta {
    display: flex;
    justify-content: space-between;
    gap: 6px;
    flex-wrap: wrap;
    color: var(--gold-muted);
    font-size: 0.64rem;
}

.media-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px solid var(--border-soft);
}

.media-pager > div {
    display: flex;
    gap: 6px;
}

.media-empty {
    padding: 34px 12px;
    text-align: center;
    color: var(--gold-muted);
}

.media-admin-item {
    cursor: default;
}

.media-actions {
    display: flex;
    gap: 5px;
    margin-top: auto;
}

.media-actions .btn {
    flex: 1;
    padding: 5px 6px;
    font-size: 0.7rem;
}

@media (max-width: 700px) {
    .media-modal {
        width: calc(100vw - 16px);
        max-height: 92vh;
        padding: 12px;
    }
    .media-toolbar { flex-wrap: wrap; }
    .media-toolbar select { max-width: none; }
    .media-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}

/* Responsive booking / content layouts */
.booking-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 22px;
    align-items: start;
    min-width: 0;
}

.booking-layout > *,
.grid-2 > *,
.grid-3 > *,
.grid-4 > *,
.product-detail > *,
.checkout-layout > *,
.cart-layout > *,
.admin-split > * {
    min-width: 0;
}

.panel {
    min-width: 0;
}

.booking-days {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.page-head {
    min-width: 0;
}

@media (max-width: 900px) {
    .booking-layout,
    .product-detail,
    .checkout-layout,
    .cart-layout,
    .admin-split {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

@media (max-width: 780px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

/* Admin slot day history */
.admin-slot-days {
    margin-top: 8px;
}

.admin-slot-days .day-button.empty {
    opacity: 0.72;
    cursor: pointer;
}

.admin-slot-days .day-button.empty:hover {
    opacity: 1;
}

/* Admin table search + pagination */
.pagination-pages {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 4px;
}

.table-search {
    min-width: 220px;
    flex: 1;
}
