:root {
    --bg: #f1e7d3;
    --surface: #fffaf0;
    --surface-alt: #ebdec0;
    --ink: #17221b;
    --ink-soft: #5c6459;
    --accent: #b6892f;
    --accent-dark: #8a651f;
    --accent-light: #ddbb6e;
    --emerald: #16332a;
    --emerald-light: #234a3b;
    --border: #ddc99b;
    --success: #3c6e4f;
    --danger: #8a3226;
    --serif: "EB Garamond", Georgia, "Times New Roman", "Noto Serif", serif;
    --sans: "Be Vietnam Pro", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
    margin: 0;
    font-family: var(--sans);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
}

h1, h2, h3, .brand {
    font-family: var(--serif);
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

.narrow { max-width: 640px; }
.narrow-wide { max-width: 780px; }

.site-header {
    background: var(--emerald);
    border-bottom: 1px solid var(--accent-dark);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    letter-spacing: 0.08em;
    font-size: 1.25rem;
    color: var(--accent-light);
    text-decoration: none;
}

.brand-mark { flex-shrink: 0; }

.nav a {
    margin-left: 28px;
    color: #cfe0d3;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.94rem;
    letter-spacing: 0.02em;
}

.nav a:hover { color: var(--accent-light); }

.hero {
    background:
        radial-gradient(circle at 20% 20%, rgba(182, 137, 47, 0.12), transparent 45%),
        linear-gradient(135deg, #0d1712, #1c3b30 60%, #2c4f3f);
    color: #fff;
    padding: 100px 0;
    text-align: center;
}

.eyebrow {
    color: var(--accent);
    letter-spacing: 0.22em;
    font-size: 0.78rem;
    font-weight: 600;
    margin: 0 0 18px;
    text-transform: uppercase;
    text-wrap: balance;
}

.eyebrow.center { text-align: center; }

.hero .eyebrow { color: var(--accent-light); }

.hero h1 {
    font-size: 2.6rem;
    margin: 0 0 18px;
    font-weight: 600;
    font-family: var(--serif);
    color: #f7efdd;
    text-wrap: balance;
}

.hero p {
    color: #d8e4da;
    font-size: 1.1rem;
    margin: 0 0 36px;
}

.btn {
    display: inline-block;
    padding: 13px 30px;
    border-radius: 3px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    font-size: 0.92rem;
    letter-spacing: 0.03em;
    transition: opacity 0.15s ease, background 0.15s ease;
}

.btn:hover { opacity: 0.88; }

.btn-primary {
    background: var(--accent);
    color: #1a1410;
}

.btn-outline {
    background: transparent;
    border-color: var(--accent);
    color: var(--accent);
}

.btn-block { display: block; width: 100%; text-align: center; }

.btn-sm { padding: 6px 12px; font-size: 0.8rem; background: var(--emerald); color: #fff; border-radius: 3px; }

.section { padding: 68px 0; }
.section-alt { background: var(--surface-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-title {
    font-size: 1.7rem;
    font-weight: 600;
    margin: 0 0 32px;
    text-align: center;
    color: var(--emerald);
}

.section-title-sm {
    font-size: 1.2rem;
    margin: 40px 0 16px;
    font-family: var(--serif);
    color: var(--emerald);
}

.page-title {
    font-size: 2rem;
    font-weight: 600;
    margin: 40px 0 24px;
    color: var(--emerald);
}

.page-title.center { text-align: center; }

.section-footnote {
    text-align: center;
    color: var(--ink-soft);
    font-size: 0.9rem;
    margin-top: 32px;
}

.section-footnote a { color: var(--accent-dark); }

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.service-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.service-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--accent);
}

.service-card.has-image::before { display: none; }

.service-card-image {
    display: block;
    width: calc(100% + 52px);
    height: auto;
    margin: -26px -26px 16px -26px;
    border-radius: 4px 4px 0 0;
}

.service-card h3 { margin: 6px 0 8px; font-size: 1.1rem; color: var(--emerald); }
.service-desc { color: var(--ink-soft); font-size: 0.9rem; flex-grow: 1; }

.service-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
    color: var(--ink-soft);
    margin: 16px 0;
}

.service-meta .price { color: var(--accent-dark); font-weight: 700; }

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    text-align: center;
}

.info-grid h3 { margin: 0 0 8px; font-size: 1rem; font-family: var(--serif); color: var(--emerald); }
.info-grid p { color: var(--ink-soft); margin: 0; }

.booking-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 32px;
}

.field { margin-bottom: 20px; }

.field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 0.9rem;
    color: var(--emerald);
}

.field input, .field select, .field textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 3px;
    font-size: 0.95rem;
    font-family: inherit;
    background: #fff;
    color: var(--ink);
}

.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.field input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
    min-height: 45px;
    line-height: 1.4;
}

.hint { color: var(--ink-soft); font-size: 0.85rem; }
.hint a { color: var(--accent-dark); }

.btn-link-plain {
    background: none;
    border: none;
    padding: 0;
    color: var(--accent-dark);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    text-decoration: underline;
}

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

.slot-btn {
    padding: 9px 14px;
    border: 1px solid var(--border);
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--ink);
}

.slot-btn:hover { border-color: var(--accent); }

.slot-btn.selected {
    background: var(--emerald);
    border-color: var(--emerald);
    color: #fff;
}

.slot-btn.locked {
    background: #e9ddc2;
    border-color: var(--border);
    color: #a89b7a;
    text-decoration: line-through;
    cursor: not-allowed;
}

.slot-btn.locked:hover { border-color: var(--border); }

.slots-note { width: 100%; }

.form-error {
    color: var(--danger);
    background: #f6e5df;
    border: 1px solid #e0bcae;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 0.88rem;
}

.confirm-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 40px;
    text-align: center;
    margin: 40px 0;
}

.confirm-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--emerald);
    color: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 20px;
}

.confirm-details {
    text-align: left;
    margin: 24px 0;
    border-top: 1px solid var(--border);
}

.confirm-details .row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
}

.confirm-details .row span:first-child { color: var(--ink-soft); }

.confirm-icon-pending { width: auto; height: auto; background: none; border-radius: 0; }
.confirm-icon-cancelled { background: var(--danger); color: #fff; }

.deposit-box {
    text-align: left;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 20px;
    margin: 24px 0;
}

.deposit-title {
    font-size: 1.05rem;
    color: var(--emerald);
    margin: 0 0 8px;
    text-align: center;
}

.deposit-qr {
    display: block;
    width: 220px;
    max-width: 100%;
    margin: 16px auto;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.deposit-bank-details { margin: 16px 0; border-top: 1px solid var(--border); }

.transfer-code-box {
    background: var(--emerald);
    border-radius: 4px;
    padding: 14px 16px;
    text-align: center;
}

.transfer-code-label {
    display: block;
    color: var(--accent-light);
    font-size: 0.78rem;
    letter-spacing: 0.03em;
    margin-bottom: 8px;
}

.transfer-code-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.transfer-code {
    font-family: monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.04em;
}

.transfer-code-row .btn-sm {
    background: var(--accent);
    color: #1a1410;
}

.table-wrap { overflow-x: auto; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    font-size: 0.88rem;
}

.admin-table th, .admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}

.admin-table th { color: var(--emerald); }

.badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-confirmed { background: #e1ebe3; color: var(--success); }
.badge-cancelled { background: #f2ddd6; color: var(--danger); }
.badge-completed { background: #e4e8e9; color: var(--emerald-light); }
.badge-pending_deposit { background: #f5ecd6; color: #8a651f; }

.inline-form { display: flex; gap: 6px; align-items: center; }

.site-footer {
    padding: 32px 0;
    text-align: center;
    color: #cfe0d3;
    font-size: 0.85rem;
    background: var(--emerald);
}

.footer-inner p { margin: 10px 0 0; color: #9fb5a7; }

.footer-admin-link { color: #9fb5a7; text-decoration: underline; }
.footer-admin-link:hover { color: var(--accent-light); }

.footer-contact {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 18px;
    font-size: 0.85rem;
    color: var(--accent-light);
}

/* Pricing page */
.divider {
    text-align: center;
    color: var(--accent);
    margin: 48px 0;
    position: relative;
}

.divider::before, .divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 40%;
    border-top: 1px solid var(--border);
}

.divider::before { left: 0; }
.divider::after { right: 0; }

.price-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    font-size: 0.9rem;
}

.price-table th, .price-table td {
    padding: 14px 16px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.price-table thead th {
    background: var(--emerald);
    color: var(--accent-light);
    font-weight: 600;
    letter-spacing: 0.03em;
    font-size: 0.78rem;
    text-transform: uppercase;
}

.price-table .row-label {
    font-weight: 700;
    text-align: left;
    color: var(--emerald);
}

.price-table tbody tr:last-child { background: #ecdcae; font-weight: 600; }

.note-list {
    color: var(--ink-soft);
    font-size: 0.9rem;
    margin: 20px 0;
    padding-left: 20px;
}

.note-list li { margin-bottom: 6px; }

.policy-block { margin-bottom: 32px; }
.policy-block h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    margin: 0 0 10px;
    color: var(--accent-dark);
    font-family: var(--serif);
}
.policy-icon { width: 20px; height: 20px; flex-shrink: 0; }

.cta-row { text-align: center; margin-top: 40px; }

.price-hint { color: var(--accent-dark); font-weight: 600; margin-top: 8px; }

.price-box {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 16px 18px;
    margin-bottom: 20px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--ink-soft);
    padding: 4px 0;
}

.price-row-surcharge span:last-child,
.price-row-light span:last-child,
.price-row-offhours span:last-child { color: var(--accent-dark); }

.slot-btn.off-hours { border-style: dashed; }
.slot-btn.off-hours.selected { border-style: solid; }

.price-row-total {
    border-top: 1px solid var(--border);
    margin-top: 6px;
    padding-top: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--emerald);
}

.price-row-deposit {
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px dashed var(--border);
    font-weight: 700;
    color: var(--accent-dark);
}

/* Mobile */
@media (max-width: 600px) {
    .container { padding: 0 18px; }

    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px 18px;
    }

    .nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
    .nav a { margin-left: 0; }

    .hero { padding: 56px 0; }
    .hero h1 { font-size: 1.85rem; }
    .hero p { font-size: 1rem; }

    .section { padding: 44px 0; }
    .section-title { font-size: 1.4rem; }
    .page-title { font-size: 1.6rem; margin: 28px 0 20px; }

    .booking-form { padding: 22px; }
    .confirm-box { padding: 28px 20px; }

    .price-table th, .price-table td { padding: 6px 4px; font-size: 0.66rem; }
    .price-table thead th { font-size: 0.6rem; letter-spacing: 0.01em; }
}

.settings-saved {
    background: #e1ebe3;
    color: var(--success);
    border: 1px solid #c3ddc8;
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.color-field-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-field-row input[type="color"] {
    width: 56px;
    height: 40px;
    padding: 2px;
    cursor: pointer;
}

.color-value {
    font-family: monospace;
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.space-edit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.space-edit-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 18px;
}

.space-edit-card h3 { margin: 0 0 12px; font-size: 1rem; color: var(--emerald); font-family: var(--serif); }

.price-field-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px 12px;
    margin-bottom: 16px;
}

.price-field-grid .field { margin-bottom: 8px; }
.price-field-grid .field label { font-size: 0.78rem; margin-bottom: 3px; }
.price-field-grid .field input { padding: 8px 10px; font-size: 0.88rem; }

.space-edit-preview {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: contain;
    background: var(--surface-alt);
    border-radius: 4px;
    margin-bottom: 8px;
    border: 1px solid var(--border);
}

.space-edit-preview-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-alt);
    color: var(--ink-soft);
    font-size: 0.85rem;
}

.space-edit-remove {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--ink-soft);
    margin-bottom: 12px;
    cursor: pointer;
}

/* Lịch trống */
.hint.center { text-align: center; }

.calendar-space-field {
    max-width: 320px;
    margin: 28px auto 0;
}

.calendar-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 24px;
    margin-top: 20px;
}

.calendar-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 18px;
}

.calendar-month-label {
    font-family: var(--serif);
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--emerald);
    min-width: 160px;
    text-align: center;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 6px;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink-soft);
    letter-spacing: 0.04em;
}

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

.calendar-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: 4px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--ink);
    font-size: 0.88rem;
    font-family: inherit;
    background: var(--surface);
    cursor: pointer;
    padding: 0;
}

.calendar-cell-blank { border: none; background: none; cursor: default; }

.calendar-cell-available {
    background: #e6f0e8;
    border-color: #c3ddc8;
    font-weight: 600;
}

.calendar-cell-available:hover { background: #d7e9db; }

.calendar-cell-full {
    background: var(--surface-alt);
    color: var(--ink-soft);
}

.calendar-cell-full:hover { background: #e3dcc5; }

.calendar-cell-past {
    background: none;
    color: var(--border);
}

.calendar-cell-past:hover { background: var(--surface-alt); }

.calendar-cell-selected {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.calendar-detail {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.calendar-detail h3 {
    font-family: var(--serif);
    font-size: 1rem;
    color: var(--emerald);
    margin: 0 0 10px;
}

.calendar-booked-list {
    list-style: none;
    padding: 0;
    margin: 0 0 14px;
}

.calendar-booked-list li {
    padding: 8px 12px;
    background: var(--surface-alt);
    border-radius: 4px;
    margin-bottom: 6px;
    font-size: 0.88rem;
    color: var(--ink-soft);
}

.admin-cal-booking-card {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.admin-cal-booking-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--emerald);
}

.admin-cal-booking-card .confirm-details {
    margin: 0;
    border-top: none;
}

.admin-cal-booking-card .confirm-details .row {
    padding: 6px 0;
    font-size: 0.85rem;
}

.calendar-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.calendar-dot-available { background: var(--success); }
.calendar-dot-full { background: var(--danger); }
.calendar-dot-past { background: var(--border); }

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 18px;
    font-size: 0.82rem;
    color: var(--ink-soft);
}

.calendar-legend span {
    display: flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 600px) {
    .calendar-cell { font-size: 0.76rem; }
    .calendar-legend { flex-wrap: wrap; gap: 10px 16px; }
}

/* Gallery ảnh phụ từng không gian */
.btn-link-plain {
    display: inline-block;
    background: none;
    border: none;
    padding: 0;
    margin: 4px 0 12px;
    color: var(--accent-dark);
    font-size: 0.85rem;
    text-decoration: underline;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.btn-link-plain:hover { color: var(--accent); }

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 17, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 40px;
}

.lightbox-image {
    max-width: 90vw;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 18px;
    right: 24px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    font-size: 1.4rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
}

.lightbox-nav:hover { background: rgba(255, 255, 255, 0.24); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    font-size: 0.85rem;
    opacity: 0.85;
}

@media (max-width: 600px) {
    .lightbox { padding: 16px; }
    .lightbox-nav { width: 38px; height: 38px; font-size: 1.1rem; }
}

.space-gallery-card {
    grid-column: 1 / -1;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 18px;
}

.space-gallery-card h4 {
    margin: 0 0 12px;
    font-size: 0.92rem;
    color: var(--emerald);
    font-family: var(--serif);
}

.space-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.space-gallery-thumb {
    position: relative;
    aspect-ratio: 1;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border);
}

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

.space-gallery-thumb form {
    position: absolute;
    top: 4px;
    right: 4px;
}

.space-gallery-thumb-delete {
    background: rgba(10, 22, 17, 0.72);
    color: #fff;
    border: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}

.space-gallery-thumb-delete:hover { background: var(--danger); }

.space-gallery-thumb-delete.confirming {
    background: var(--danger);
    width: auto;
    padding: 0 8px;
    border-radius: 11px;
    font-size: 0.85rem;
}

.space-gallery-upload {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.space-gallery-upload .field { flex-grow: 1; min-width: 220px; margin-bottom: 0; }
