:root {
    --brand: #961d1c;
    --brand-hover: #7a1716;
    --brand-deep: #7f1d1d;
    --brand-hero: #991b1b;
    --sky: #961d1c;
    --sky-deep: #7a1716;
    --navy: #111827;
    --navy-mid: #961d1c;
    --navy-dark: #7f1d1d;
    --yellow: #961d1c;
    --yellow-hover: #7a1716;
    --orange: #961d1c;
    --teal: #6b7280;
    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;
    --border-soft: #f3f4f6;
    --surface: #ffffff;
    --canvas: #f9fafb;
    --white: #ffffff;
    --danger: #b42318;
    --success: #067647;
    --shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    --radius: 8px;
    --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.admin-body {
    font-family: var(--font);
    font-size: 13px;
    line-height: 1.4;
    color: var(--text);
    background: var(--canvas);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--navy-mid); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; }

.admin-shell {
    display: grid;
    grid-template-columns: 208px 1fr;
    min-height: 100vh;
}

.admin-nav {
    position: sticky;
    top: 0;
    height: 100vh;
    background: linear-gradient(180deg, #991b1b 0%, #7f1d1d 100%);
    color: #fce8e8;
    padding: 14px 10px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: auto;
    border-right: 1px solid #7a1716;
}

.brand-block {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 4px 6px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.brand-mark {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 12px;
    color: #961d1c;
    background: #fff;
}
.brand-block strong {
    display: block;
    font-size: 13px;
    letter-spacing: 0.01em;
    color: #fff;
    font-weight: 600;
}
.brand-block span {
    display: block;
    color: #f3c5c4;
    font-size: 10px;
    margin-top: 1px;
    font-weight: 500;
}
.brand-locale {
    margin-top: 8px;
}
.locale-switcher { display:inline-flex; align-items:center; gap:6px; font-size:12px; }
.locale-switcher .locale-link { color:rgba(232,238,244,.55); text-decoration:none; opacity:.7; }
.locale-switcher .locale-link.is-active { opacity:1; font-weight:700; text-decoration:none; color:rgba(232,238,244,.9); }
.locale-sep { opacity:.4; color:rgba(232,238,244,.35); }

.nav-section-label {
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f3c5c4;
    padding: 0 8px 4px;
    font-weight: 600;
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 1px;
}
.nav-links a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: var(--radius);
    color: #fde8e8;
    font-weight: 500;
    font-size: 12.5px;
    transition: background .12s ease, color .12s ease;
}
.nav-links a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    text-decoration: none;
}
.nav-links a.active {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    box-shadow: inset 3px 0 0 #fff;
}
.nav-ico {
    width: 14px;
    opacity: 0.85;
    font-size: 11px;
    text-align: center;
}
.admin-nav details.nav-tree {
    margin: 2px 0;
}
.admin-nav details.nav-tree > .nav-parent {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0;
    padding: 6px 8px;
    border: 0;
    border-radius: var(--radius);
    background: transparent;
    color: #fde8e8;
    font: inherit;
    font-weight: 600;
    font-size: 12.5px;
    text-align: left;
    cursor: pointer;
    list-style: none;
    appearance: none;
    -webkit-appearance: none;
}
.admin-nav details.nav-tree > .nav-parent::-webkit-details-marker {
    display: none;
}
.admin-nav details.nav-tree > .nav-parent::marker {
    content: "";
    display: none;
}
.admin-nav details.nav-tree > .nav-parent:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}
.admin-nav details.nav-tree.is-active > .nav-parent,
.admin-nav details.nav-tree[open] > .nav-parent {
    color: #fff;
}
.admin-nav .nav-caret {
    width: 6px;
    height: 6px;
    margin-left: auto;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg);
    transition: transform .16s ease;
    opacity: 0.75;
}
.admin-nav details.nav-tree[open] > .nav-parent .nav-caret {
    transform: rotate(45deg);
}
.admin-nav details.nav-tree > .nav-sub {
    display: none;
    flex-direction: column;
    gap: 1px;
    margin: 0 0 2px 10px;
    padding: 0 0 2px 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
}
.admin-nav details.nav-tree[open] > .nav-sub {
    display: flex;
}
.admin-nav .nav-sub a {
    font-size: 12px;
    padding: 5px 8px;
    font-weight: 500;
}

.nav-footer {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.nav-user {
    padding: 4px 8px 8px;
}
.nav-user strong { display: block; font-size: 12px; color: #fff; font-weight: 600; }
.nav-user span { color: #f3c5c4; font-size: 11px; }

.admin-main {
    padding: 16px 20px 28px;
    min-width: 0;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.eyebrow {
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 600;
    margin: 0 0 2px;
}
.page-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--navy);
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.01em;
}
.page-sub {
    margin: 3px 0 0;
    color: var(--muted);
    max-width: 64ch;
    line-height: 1.4;
    font-size: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 0;
    border-radius: var(--radius);
    padding: 5px 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    line-height: 1.2;
    transition: background .12s ease, border-color .12s ease, color .12s ease;
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary {
    background: var(--brand);
    color: #fff;
    border: 1px solid var(--brand);
}
.btn-primary:hover { background: var(--brand-hover); color: #fff; }
.btn-secondary {
    background: var(--white);
    color: var(--navy);
    border: 1px solid var(--border);
}
.btn-secondary:hover { background: #f9fafb; color: var(--navy); }
.btn-danger {
    background: #fff;
    color: var(--danger);
    border: 1px solid #f0b4ae;
}
.btn-danger:hover { background: #fff5f4; }
.btn-ghost {
    background: transparent;
    color: #fde8e8;
    border: 1px solid rgba(255,255,255,0.18);
}
.btn-ghost:hover { background: rgba(255,255,255,0.06); color: #fff; }
.btn-sm { padding: 3px 8px; font-size: 11.5px; }
.btn-link {
    background: transparent;
    border: 0;
    color: var(--navy-mid);
    padding: 0;
    font-weight: 600;
    font-size: 12px;
}
.btn-link:hover { text-decoration: underline; }

.flash {
    border-radius: var(--radius);
    padding: 7px 10px;
    margin-bottom: 10px;
    font-weight: 500;
    font-size: 12px;
}
.flash-success { background: #ecfdf3; color: #067647; border: 1px solid #abefc6; }
.flash-error { background: #fef3f2; color: #b42318; border: 1px solid #fecdca; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.stat-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    padding: 12px 14px;
    background: var(--surface);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    min-height: 0;
}
.stat-card .label {
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.stat-card .value {
    font-size: 26px;
    font-weight: 600;
    color: var(--navy);
    margin: 4px 0 2px;
    letter-spacing: -0.02em;
    line-height: 1.1;
}
.stat-card .meta { color: var(--muted); font-size: 11.5px; }
.stat-card.accent {
    background: linear-gradient(180deg, #961d1c 0%, #7a1716 100%);
    color: #fff;
    border-color: #7a1716;
}
.stat-card.accent .label,
.stat-card.accent .meta { color: #f3c5c4; }
.stat-card.accent .value { color: #fff; }

.panel-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 10px;
}
.panel {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 12px 14px;
}
.panel h2 {
    margin: 0 0 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--navy);
}
.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.panel-head h2 { margin: 0; }

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.toolbar .count {
    color: var(--muted);
    font-size: 11.5px;
}

.filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    flex-wrap: nowrap;
}
.filter-bar .field {
    min-width: 0;
}
.filter-bar .field-grow {
    flex: 1 1 180px;
}
.filter-bar .field-sm {
    flex: 0 1 110px;
}
.filter-bar .field-md {
    flex: 0 1 140px;
}
.filter-bar .field-date {
    flex: 0 1 128px;
}
.filter-bar-wrap {
    flex-wrap: wrap;
}
.filter-bar .filter-actions {
    display: flex;
    gap: 6px;
    flex: 0 0 auto;
    padding-bottom: 0;
}
@media (max-width: 1100px) {
    .filter-bar {
        flex-wrap: wrap;
    }
    .filter-bar .field-grow,
    .filter-bar .field-sm,
    .filter-bar .field-md {
        flex: 1 1 140px;
    }
}

.table-wrap { overflow: auto; }
table.data {
    width: 100%;
    border-collapse: collapse;
}
table.data th,
table.data td {
    text-align: left;
    padding: 6px 8px;
    border-bottom: 1px solid var(--border-soft);
    vertical-align: middle;
    font-size: 12.5px;
}
table.data th {
    color: var(--muted);
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 600;
    background: #f9fafb;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
table.data tbody tr:hover td { background: #f9fafb; }
table.data td strong { font-weight: 600; }
table.data .actions {
    text-align: right;
    white-space: nowrap;
}
table.data .actions a + a { margin-left: 8px; }
table.data .actions .btn,
table.data .actions form {
    display: inline-flex;
    vertical-align: middle;
}
table.data .actions form { margin: 0; }
table.data .actions > * + * { margin-left: 4px; }
button.badge {
    font: inherit;
    cursor: pointer;
    letter-spacing: inherit;
}

.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 11.5px; }

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius);
    padding: 1px 6px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border: 1px solid transparent;
}
.badge-ok { background: #ecfdf3; color: #067647; border-color: #abefc6; }
.badge-warn { background: #fffaeb; color: #93370d; border-color: #fedf89; }
.badge-bad { background: #fef3f2; color: #b42318; border-color: #fecdca; }
.badge-info { background: #fdf2f2; color: #961d1c; border-color: #f0caca; }

.xml-viewer {
    margin: 0;
    max-height: 70vh;
    overflow: auto;
    padding: 12px 14px;
    border-radius: 6px;
    background: #111827;
    color: #f3f4f6;
    font-family: var(--mono);
    font-size: 11.5px;
    line-height: 1.45;
    white-space: pre;
    tab-size: 2;
}

.form-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 14px 16px;
    max-width: 920px;
}
.form-section {
    margin: 0 0 14px;
    padding: 0 0 14px;
    border-bottom: 1px solid var(--border-soft);
}
.form-section:last-of-type {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}
.form-section-title {
    margin: 0 0 2px;
    font-size: 12px;
    font-weight: 600;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.form-section-help {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 11.5px;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
}
.form-grid .full { grid-column: 1 / -1; }
.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 12px;
}
.field label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 3px;
    color: #374151;
}
.field input:not([type="checkbox"]):not([type="radio"]),
.field select,
.field textarea {
    width: 100%;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: var(--radius);
    padding: 5px 8px;
    outline: none;
    font-size: 12.5px;
    line-height: 1.3;
    min-height: 28px;
    transition: border-color .12s ease, box-shadow .12s ease;
}
.field textarea { min-height: 64px; resize: vertical; }
.field input:not([type="checkbox"]):not([type="radio"]):focus,
.field select:focus,
.field textarea:focus {
    border-color: #961d1c;
    box-shadow: 0 0 0 2px rgba(150, 29, 28, 0.18);
    outline: none;
}
.field .error {
    color: var(--danger);
    font-size: 11px;
    margin-top: 3px;
}
.field .hint {
    margin: 3px 0 0;
    font-size: 11px;
    color: var(--muted);
}
.form-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-soft);
}
.check-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 12px;
}
.field label.check-row {
    display: inline-flex;
    align-items: center;
    margin: 0;
    font-weight: 500;
}
.check-row input[type="checkbox"] {
    accent-color: var(--navy-mid);
    width: 13px;
    height: 13px;
    margin: 0;
    flex-shrink: 0;
}

.plan-flag-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 28px;
    margin-top: 10px;
}
.plan-flag-row .check-row {
    flex: 0 0 auto;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 10px;
}
.kv {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 4px 10px;
    margin: 0;
}
.kv dt {
    color: var(--muted);
    font-size: 11.5px;
    padding: 3px 0;
}
.kv dd {
    margin: 0;
    font-weight: 500;
    font-size: 12.5px;
    padding: 3px 0;
    word-break: break-word;
}

.list-row {
    padding: 6px 0;
    border-bottom: 1px solid var(--border-soft);
}
.list-row:last-child { border-bottom: 0; }
.list-row strong { font-size: 12.5px; font-weight: 600; }

.pagination { margin-top: 10px; }
.pagination nav { display: flex; gap: 4px; flex-wrap: wrap; }
.pagination a,
.pagination span {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--border);
    font-size: 11.5px;
    color: var(--navy);
}
.pagination a:hover { background: #f9fafb; text-decoration: none; }
.pagination .active span {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

.empty {
    padding: 16px 8px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(17, 24, 39, 0.45);
}
.modal-backdrop[hidden] {
    display: none;
}
.modal {
    width: min(480px, 100%);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.2);
    padding: 16px 18px;
}
.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}
.modal-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--navy);
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-soft);
}

/* Login — matches booking hero / search panel */
.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    font-family: var(--font);
    color: var(--text);
    background: linear-gradient(90deg, #991b1b 0%, #7f1d1d 100%);
    position: relative;
    overflow: hidden;
}
.login-body::before,
.login-body::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.35;
}
.login-body::before {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, #fff 0%, transparent 70%);
    top: -60px;
    left: -40px;
}
.login-body::after {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255,255,255,0.18) 0%, transparent 70%);
    bottom: -80px;
    right: -40px;
}
.login-card {
    position: relative;
    z-index: 1;
    width: min(400px, 100%);
    background: #fff;
    border-radius: 8px;
    padding: 22px 20px;
    box-shadow: 0 12px 32px rgba(122, 23, 22, 0.35);
    color: var(--text);
    animation: rise .35s ease both;
}
.login-card h1 {
    font-size: 20px;
    font-weight: 600;
    margin: 10px 0 6px;
    color: #111827;
}
.login-card .lede {
    color: #6b7280;
    margin: 0 0 16px;
    line-height: 1.4;
    font-size: 12.5px;
}
.login-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: #961d1c;
    font-size: 13px;
}
.login-card .field label {
    color: #374151;
}
.login-card .field label .req { color: #961d1c; }
.login-card .field input {
    background: #fff;
    color: var(--text);
    border: 1px solid #e5e7eb;
}
.login-card .field .error {
    color: #b42318;
}
.login-card .check-row {
    color: #6b7280;
    font-size: 12px;
}
.login-card .check-row input[type="checkbox"] {
    accent-color: var(--brand);
}
.login-card .btn-primary {
    width: 100%;
    margin-top: 4px;
    padding: 7px 10px;
}
@keyframes rise {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 1100px) {
    .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .panel-grid,
    .detail-grid,
    .form-grid,
    .form-grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-nav {
        position: relative;
        height: auto;
    }
    .admin-main { padding: 12px 12px 24px; }
}

.offer-list-thumb {
    width: 56px;
    aspect-ratio: 16 / 10;
    border-radius: 4px;
    overflow: hidden;
    background: #961d1c;
    border: 1px solid var(--border-soft);
}
.offer-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.offer-edit-form {
    max-width: 560px;
}
.seo-editor-form {
    max-width: 960px;
}
.seo-editor-form .cke {
    margin-top: 4px;
}
.offer-preview {
    aspect-ratio: 16 / 10;
    border-radius: 8px;
    overflow: hidden;
    background: #961d1c;
    margin-bottom: 12px;
    border: 1px solid var(--border-soft);
}
.offer-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.seo-admin-preview {
    padding: 4px 2px 2px;
}
.seo-admin-preview strong {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}
.seo-admin-preview p {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.45;
}
.seo-admin-preview ul {
    margin: 0;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.5;
}
.hero-list-row {
    display: flex;
    align-items: center;
    gap: 14px;
}
.hero-list-thumb,
.hero-admin-preview {
    width: 160px;
    aspect-ratio: 16 / 7;
    border-radius: 6px;
    overflow: hidden;
    background: linear-gradient(180deg, #991b1b 0%, #7f1d1d 100%);
    border: 1px solid var(--border-soft);
    flex-shrink: 0;
}
.hero-admin-preview {
    width: 100%;
    max-width: 560px;
    aspect-ratio: 16 / 7;
    margin-bottom: 12px;
}
.hero-list-thumb img,
.hero-admin-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hero-list-thumb .empty,
.hero-admin-preview .empty {
    display: grid;
    place-items: center;
    height: 100%;
    color: #fff;
    font-size: 12px;
    text-align: center;
    padding: 8px;
    text-shadow: 0 1px 2px rgba(0,0,0,.25);
}

