:root {
    --bg: #f3f7fb;
    --panel: #ffffff;
    --ink: #172033;
    --muted: #6b778c;
    --blue: #2563eb;
    --blue-soft: #eaf1ff;
    --line: #dce4ef;
    --shadow: 0 18px 45px rgba(15, 23, 42, .08);
    --radius: 22px;
}

body {
    margin: 0;
    background: radial-gradient(circle at top left, #e9f4ff 0, var(--bg) 36%, #f8fafc 100%);
    color: var(--ink);
}

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

.sidebar {
    padding: 24px;
    background: #101828;
    color: #fff;
}

.brand-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 20px;
    background: rgba(255,255,255,.08);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: #ffffff;
    color: #101828;
    font-size: 24px;
}

.brand-title { font-weight: 800; font-size: 20px; }
.brand-subtitle { color: #bdc7d8; font-size: 13px; }

.side-nav {
    display: grid;
    gap: 8px;
    margin-top: 28px;
}

.side-nav a {
    color: #d8e2f3;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 14px;
}

.side-nav a:hover {
    background: rgba(255,255,255,.10);
    color: #fff;
}

.main-area { padding: 28px; }

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.topbar h1 { margin: 0; font-size: 30px; font-weight: 800; }
.topbar p { margin: 5px 0 0; color: var(--muted); }

.operator-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 16px;
}

.avatar-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
}

.content-card, .metric-card {
    background: rgba(255,255,255,.86);
    border: 1px solid rgba(220,228,239,.88);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.content-card { padding: 22px; }

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

.card-head h2 { margin: 0; font-size: 23px; font-weight: 800; }
.card-head p { margin: 5px 0 0; color: var(--muted); }

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

.metric-card { padding: 22px; }
.metric-card strong { display: block; font-size: 40px; line-height: 1; margin: 10px 0; }
.metric-label, .metric-card small { color: var(--muted); }

.timeline-soft {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.timeline-soft div {
    background: var(--blue-soft);
    border: 1px solid #cfe0ff;
    border-radius: 16px;
    padding: 14px;
}

.search-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-bottom: 18px;
}

.resort-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.resort-card {
    display: block;
    background: #fff;
    color: inherit;
    text-decoration: none;
    border: 1px solid var(--line);
    border-radius: 20px;
    overflow: hidden;
    transition: .16s ease;
}

.resort-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(15,23,42,.10);
}

.resort-image-frame, .media-frame, .preview-image {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #dbeafe, #f0f9ff);
    color: #2563eb;
}

.resort-image-frame { height: 150px; font-size: 48px; overflow: hidden; }
.resort-image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-placeholder { filter: drop-shadow(0 8px 16px rgba(37,99,235,.25)); }
.resort-card-body { padding: 16px; }
.resort-card h3 { font-size: 18px; font-weight: 800; margin: 0; }
.resort-card p { color: var(--muted); min-height: 46px; }
.resort-card small { color: var(--muted); }

.status-pill {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.status-draft { background: #fff7ed; color: #c2410c; }
.status-ready { background: #ecfdf5; color: #047857; }
.status-published { background: #eff6ff; color: #1d4ed8; }

.editor-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 22px;
}

.preview-panel {
    position: sticky;
    top: 20px;
    align-self: start;
}

.phone-preview {
    border-radius: 34px;
    padding: 14px;
    background: #111827;
    box-shadow: 0 20px 55px rgba(17,24,39,.22);
}

.preview-image {
    height: 190px;
    border-radius: 24px 24px 10px 10px;
    font-size: 54px;
}

.preview-body {
    background: #fff;
    border-radius: 10px 10px 24px 24px;
    padding: 18px;
}

.preview-body h3 { margin: 10px 0 6px; font-weight: 800; }
.preview-body p { color: var(--muted); }

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

.tag-list span {
    background: #eef2ff;
    color: #3730a3;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
}

.media-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 12px;
}

.media-frame {
    height: 120px;
    border-radius: 14px;
    margin-bottom: 10px;
    font-size: 36px;
}

.media-card small { display: block; color: var(--muted); }

.json-preview {
    background: #0f172a;
    color: #dbeafe;
    border-radius: 18px;
    padding: 18px;
    min-height: 320px;
}

@media (max-width: 1100px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .editor-layout, .grid-dashboard, .timeline-soft { grid-template-columns: 1fr; }
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.operator-chip span:last-child {
    display: grid;
    line-height: 1.15;
}

.operator-chip small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.login-page {
    min-height: 100vh;
    background: radial-gradient(circle at 20% 10%, #dbeafe 0, #eef6ff 28%, #f8fafc 72%);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 460px;
    align-items: center;
    gap: 42px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 42px;
}

.login-hero h1 {
    margin: 38px 0 16px;
    font-size: clamp(42px, 5vw, 72px);
    line-height: .95;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.login-hero > p {
    max-width: 620px;
    color: var(--muted);
    font-size: 18px;
}

.login-brand {
    width: fit-content;
    background: #101828;
    color: #fff;
}

.login-preview-card {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 18px;
    max-width: 560px;
    margin-top: 34px;
    padding: 16px;
    border-radius: 26px;
    background: rgba(255,255,255,.72);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.login-preview-card .preview-image {
    height: 130px;
    border-radius: 20px;
    font-size: 46px;
}

.login-preview-card h3 {
    margin: 10px 0 6px;
    font-weight: 900;
}

.login-preview-card p {
    margin: 0;
    color: var(--muted);
}

.login-card {
    padding: 34px;
    background: rgba(255,255,255,.9);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.login-card h2 {
    margin: 0;
    font-weight: 900;
}

.login-card > p {
    margin: 8px 0 24px;
    color: var(--muted);
}

.admin-table-wrap {
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
}

.admin-table {
    margin-bottom: 0;
}

.admin-table thead th {
    background: #f8fafc;
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-cell small {
    display: block;
    color: var(--muted);
}

.user-avatar {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--blue-soft);
    color: var(--blue);
    font-weight: 900;
}

.role-pill {
    display: inline-flex;
    align-items: center;
    height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.role-admin { background: #fee2e2; color: #b91c1c; }
.role-editor { background: #e0f2fe; color: #0369a1; }
.role-viewer { background: #f1f5f9; color: #475569; }

.user-edit-form {
    max-width: 920px;
}

.admin-switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    font-weight: 700;
}

.admin-switch input {
    width: 18px;
    height: 18px;
}

@media (max-width: 900px) {
    .login-shell {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .login-card {
        padding: 24px;
    }
}

/* Resort media editor */
.resort-media-panel {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    padding: 18px;
}

.media-panel-head,
.gallery-head,
.main-media-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.media-panel-head h3,
.gallery-head h4 {
    margin: 0;
    font-weight: 900;
}

.media-panel-head p,
.gallery-head p,
.main-media-help p {
    margin: 4px 0 0;
    color: var(--muted);
}

.main-media-row {
    align-items: stretch;
    margin-top: 16px;
    padding: 14px;
    border-radius: 22px;
    background: #f1f5f9;
}

.hidden-upload-form {
    display: none;
}

.main-media-click {
    position: relative;
    display: block;
    width: 260px;
    min-width: 260px;
    height: 170px;
    overflow: hidden;
    border: 2px dashed #bfdbfe;
    border-radius: 22px;
    background: #fff;
    cursor: pointer;
}

.main-media-click.is-readonly {
    cursor: default;
}

.main-media-click img,
.media-tile img,
.preview-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-media-placeholder,
.media-empty {
    display: grid;
    place-items: center;
    height: 100%;
    text-align: center;
    color: var(--muted);
    padding: 18px;
}

.main-media-placeholder span,
.media-empty span {
    font-size: 36px;
}

.main-media-placeholder strong,
.media-empty strong {
    display: block;
    color: var(--ink);
    font-weight: 900;
}

.main-media-placeholder small,
.media-empty small {
    display: block;
    max-width: 220px;
}

.main-media-overlay {
    position: absolute;
    inset: auto 12px 12px 12px;
    padding: 9px 12px;
    border-radius: 14px;
    background: rgba(15, 23, 42, .76);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    opacity: 0;
    transition: opacity .18s ease;
}

.main-media-click:hover .main-media-overlay {
    opacity: 1;
}

.main-media-help {
    flex: 1;
    padding: 8px 4px;
}

.main-media-help strong {
    font-size: 16px;
    font-weight: 900;
}

.gallery-head {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.media-tile {
    position: relative;
    overflow: hidden;
    min-height: 170px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .06);
}

.media-tile img {
    height: 118px;
}

.media-tile-caption {
    padding: 10px 11px 12px;
}

.media-tile-caption strong,
.media-tile-caption small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.media-tile-caption strong {
    font-size: 13px;
    font-weight: 900;
}

.media-tile-caption small {
    color: var(--muted);
    font-size: 11px;
}

.media-delete-form {
    position: absolute;
    top: 8px;
    right: 8px;
}

.media-delete-form button {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(220, 38, 38, .92);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(220, 38, 38, .25);
}

.media-empty {
    min-height: 170px;
    border: 1px dashed #cbd5e1;
    border-radius: 20px;
    background: #fff;
}

.preview-image {
    overflow: hidden;
}

@media (max-width: 900px) {
    .media-panel-head,
    .gallery-head,
    .main-media-row {
        align-items: stretch;
        flex-direction: column;
    }

    .main-media-click {
        width: 100%;
        min-width: 0;
    }
}

.form-hint {
    display: block;
    margin-top: .35rem;
    color: #64748b;
    font-size: .82rem;
}

.code-field {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: .86rem;
}


.code-field.is-invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 .2rem rgba(220, 38, 38, .12);
}

.form-hint code {
    color: #0f172a;
    background: #eef2ff;
    border-radius: 6px;
    padding: 1px 5px;
}

/* JSON dictionary helpers */
.dictionary-helper {
    margin-top: .75rem;
    padding: .75rem;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: #f8fbff;
}

.dictionary-helper.empty {
    border-style: dashed;
    color: var(--muted);
}

.dictionary-helper-title {
    margin-bottom: .5rem;
    color: #334155;
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.dictionary-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}

.dictionary-chip {
    display: inline-grid;
    gap: 1px;
    max-width: 210px;
    padding: .42rem .6rem;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: .78rem;
    font-weight: 800;
    line-height: 1.1;
    text-align: left;
}

.dictionary-chip:hover:not(:disabled) {
    background: #dbeafe;
    border-color: #93c5fd;
}

.dictionary-chip:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.dictionary-chip small {
    color: #64748b;
    font-size: .67rem;
    font-weight: 700;
}

.dictionary-item-form {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #f8fafc;
}

.dictionary-mode-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin: 14px 0 20px;
    padding: 12px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 18px;
    background: rgba(239, 246, 255, .86);
}

.dictionary-mode-toolbar small {
    color: var(--muted);
}

.dictionary-mode-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    font-weight: 800;
    cursor: pointer;
}

.dictionary-mode-toggle input {
    width: 18px;
    height: 18px;
    accent-color: var(--blue);
}

.dictionary-helper-head {
    display: grid;
    gap: 4px;
    margin-bottom: 10px;
}

.dictionary-helper-mode-note {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

.dictionary-select-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.dictionary-simple-picker {
    display: none;
}

.dictionary-advanced-picker {
    display: flex;
}

.simple-dictionary-mode .dictionary-simple-picker {
    display: grid;
    gap: 10px;
}

.simple-dictionary-mode .dictionary-advanced-picker {
    display: none;
}

.advanced-dictionary-mode .dictionary-simple-picker {
    display: none;
}

.advanced-dictionary-mode .dictionary-advanced-picker {
    display: flex;
}

.dictionary-selected-preview {
    min-height: 58px;
    padding: 10px 12px;
    border: 1px dashed #bfdbfe;
    border-radius: 14px;
    background: #f8fbff;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
    white-space: pre-wrap;
}

.dictionary-selected-preview.has-value {
    border-style: solid;
    background: #eef6ff;
    color: #1e3a8a;
}

.dictionary-select-add {
    white-space: nowrap;
}

.dictionary-selected-table-wrap {
    display: grid;
    gap: 8px;
}

.dictionary-selected-table-title {
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #1e3a8a;
}

.dictionary-selected-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    background: #fff;
    font-size: 12px;
}

.dictionary-selected-table th,
.dictionary-selected-table td {
    padding: 8px 9px;
    border-bottom: 1px solid #e0edff;
    vertical-align: middle;
}

.dictionary-selected-table th {
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .035em;
}

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

.dictionary-selected-row {
    background: #fff;
}

.dictionary-selected-row:hover {
    background: #f8fbff;
}

.dictionary-selected-row.is-dragging {
    opacity: .55;
    background: #dbeafe;
}

.dictionary-drag-cell {
    width: 30px;
    text-align: center;
}

.dictionary-drag-handle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 24px;
    border-radius: 8px;
    color: #2563eb;
    cursor: grab;
    user-select: none;
    font-weight: 900;
    line-height: 1;
}

.dictionary-drag-handle:active {
    cursor: grabbing;
}

.dictionary-label-cell {
    font-weight: 800;
    color: #172033;
}

.dictionary-value-cell {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #172033;
    cursor: text;
}

.dictionary-value-cell:hover {
    background: #eff6ff;
}

.dictionary-value-cell.is-editing {
    white-space: pre-wrap;
    overflow: visible;
    text-overflow: clip;
    outline: 2px solid #93c5fd;
    outline-offset: -2px;
    background: #fff;
    border-radius: 8px;
}

.dictionary-edit-cell {
    width: 54px;
    text-align: center;
}

.dictionary-table-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 26px;
    padding: 0 8px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
}

.dictionary-table-edit:hover:not(:disabled) {
    background: #dbeafe;
    border-color: #93c5fd;
}

.dictionary-table-edit:disabled {
    opacity: .45;
    cursor: default;
}

.dictionary-remove-cell {
    width: 36px;
    text-align: right;
}

.dictionary-table-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 0;
    border-radius: 999px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 18px;
    line-height: 1;
    font-weight: 900;
    cursor: pointer;
}

.dictionary-table-remove:hover {
    background: #fecaca;
}

.dictionary-table-remove:disabled,
.dictionary-selected-row[draggable="false"] .dictionary-drag-handle {
    opacity: .45;
    cursor: default;
}

.dictionary-selected-empty td {
    color: var(--muted);
    text-align: center;
    background: #f8fafc;
    font-weight: 700;
}

.dictionary-selected-empty.is-error td {
    color: #b91c1c;
    background: #fff1f2;
}

.dictionary-selected-table-hint {
    color: var(--muted);
    font-size: 11px;
}

/* In simplified dictionary mode operators work through the selected-fields table.
   Hide raw JSON editors and JSON hints so they do not distract or confuse. */
.simple-dictionary-mode textarea.code-field[data-json-object="1"],
.simple-dictionary-mode textarea.code-field[data-json-object="1"] + .form-hint {
    display: none;
}

/* Resort editor tabs and linked resort entities */
.resort-tabs {
    display: grid;
    gap: 18px;
}

.resort-tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: rgba(255, 255, 255, .72);
    border: 1px solid var(--line);
    border-radius: 18px;
}

.resort-tab-button {
    border: 0;
    border-radius: 999px;
    padding: 9px 13px;
    background: #eef2f7;
    color: #334155;
    font-weight: 700;
    cursor: pointer;
}

.resort-tab-button:hover {
    background: #e0e7ff;
    color: #1d4ed8;
}

.resort-tab-button.is-active {
    background: var(--blue);
    color: #fff;
}

.resort-tab-panel {
    display: none;
}

.resort-tab-panel.is-active {
    display: block;
}

.section-head-soft {
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    background: linear-gradient(135deg, #f8fbff, #eef6ff);
}

.section-head-soft h3 {
    margin: 0 0 4px;
    font-weight: 800;
}

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

.linked-table-wrap {
    overflow-x: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
}

.linked-table {
    width: 100%;
    min-width: 880px;
    border-collapse: collapse;
}

.linked-table th,
.linked-table td {
    padding: 10px;
    border-bottom: 1px solid #edf2f7;
    vertical-align: middle;
    font-size: 13px;
}

.linked-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.linked-table input,
.linked-table select {
    width: 100%;
    min-width: 90px;
    box-sizing: border-box;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 7px 8px;
    background: #fff;
}

.linked-table input[type="checkbox"] {
    width: auto;
    min-width: 0;
}

.linked-edit-row td {
    background: #f8fbff;
}

.linked-empty {
    text-align: center;
    color: var(--muted);
    padding: 18px !important;
}

.linked-url-cell {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.link-delete-btn {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 999px;
    background: #fee2e2;
    color: #b91c1c;
    font-weight: 900;
    cursor: pointer;
}

.link-delete-btn:hover {
    background: #fecaca;
}

.export-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
}

.export-summary-grid div {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 16px;
}

.export-summary-grid strong {
    display: block;
    font-size: 30px;
    line-height: 1;
    color: var(--blue);
}

.export-summary-grid span {
    color: var(--muted);
    font-size: 13px;
}

/* Admin-only analytics notes */
.admin-only-tab {
    border-color: #fde68a !important;
    background: #fffbeb !important;
    color: #92400e !important;
}

.admin-only-tab.is-active {
    background: #f59e0b !important;
    color: #fff !important;
    border-color: #f59e0b !important;
}

.admin-analytics-head {
    border-color: #fde68a;
    background: linear-gradient(135deg, #fffbeb, #f8fafc);
}

.admin-note-form-card,
.admin-notes-list {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid #fde68a;
    border-radius: 20px;
    background: #fffdf6;
}

.admin-note-form-card h4,
.admin-notes-list h4 {
    margin: 0 0 12px;
    font-weight: 800;
}

.admin-notes-list-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.admin-notes-list-head small,
.admin-note-meta {
    color: var(--muted);
}

.admin-note-card {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: #fff;
    overflow: hidden;
    margin-bottom: 12px;
}

.admin-note-card summary {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
}

.admin-note-card summary::-webkit-details-marker {
    display: none;
}

.admin-note-title {
    flex: 1;
    min-width: 220px;
    font-weight: 800;
}

.admin-note-priority {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 4px 8px;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.admin-note-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 12px;
    font-weight: 800;
}

.admin-note-badge.status-done {
    background: #dcfce7;
    color: #166534;
}

.admin-note-badge.status-needs_backend,
.admin-note-badge.status-needs_admin,
.admin-note-badge.status-needs_import {
    background: #fee2e2;
    color: #991b1b;
}

.admin-note-badge.status-ready,
.admin-note-badge.status-in_progress {
    background: #dbeafe;
    color: #1d4ed8;
}

.admin-note-body {
    border-top: 1px solid #e2e8f0;
    padding: 14px 16px 16px;
}

.admin-note-meta {
    display: flex;
    gap: 8px 14px;
    flex-wrap: wrap;
    font-size: 12px;
    margin-bottom: 10px;
}

.admin-note-text {
    white-space: normal;
    margin: 0 0 12px;
    line-height: 1.55;
}

.admin-note-json-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin: 12px 0;
}

.admin-note-json-grid div {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
    overflow: hidden;
}

.admin-note-json-grid strong {
    display: block;
    padding: 8px 10px;
    background: #eef2ff;
    font-size: 12px;
}

.admin-note-json-grid pre {
    margin: 0;
    padding: 10px;
    max-height: 260px;
    overflow: auto;
    font-size: 12px;
}

.admin-note-inline-edit {
    display: flex;
    gap: 8px;
    align-items: end;
    flex-wrap: wrap;
    margin-top: 10px;
}

.admin-note-inline-edit label {
    font-size: 12px;
    font-weight: 800;
    color: var(--muted);
}

.admin-note-inline-edit select {
    width: auto;
    min-width: 170px;
}

.admin-note-delete-form {
    margin-top: 8px;
}

.admin-note-empty {
    padding: 16px;
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    color: var(--muted);
    background: #f8fafc;
}

/* Resort media grid v2 */
.resort-media-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.resort-media-section-head:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.resort-media-section-head h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 900;
}

.resort-media-section-head p {
    margin: 4px 0 0;
    color: var(--muted);
}

.resort-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
    margin-top: 14px;
}

.resort-media-grid-main {
    grid-template-columns: minmax(260px, 560px);
}

.resort-media-tile {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .07);
}

.resort-media-tile-main {
    max-width: 560px;
}

.resort-media-preview-button {
    display: block;
    width: 100%;
    height: 164px;
    padding: 0;
    border: 0;
    background: #e2e8f0;
    cursor: zoom-in;
}

.resort-media-tile-main .resort-media-preview-button {
    height: 260px;
}

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

.resort-media-tile-body {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 13px;
}

.resort-media-tile-body strong,
.resort-media-tile-body small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resort-media-tile-body strong {
    max-width: 240px;
    font-size: 14px;
    font-weight: 900;
}

.resort-media-tile-body small {
    max-width: 240px;
    color: var(--muted);
    font-size: 11px;
}

.resort-media-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    min-width: 130px;
}

.resort-media-actions form {
    margin: 0;
}

.resort-media-empty-main {
    max-width: 560px;
    min-height: 230px;
}

.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
    padding: 28px;
    background: rgba(15, 23, 42, .86);
}

.image-lightbox.is-open {
    display: grid;
    place-items: center;
}

.image-lightbox-dialog {
    width: min(1180px, 100%);
    max-height: calc(100vh - 56px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    border-radius: 24px;
    background: #0f172a;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
}

.image-lightbox-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    color: #fff;
}

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

.image-lightbox-body {
    min-height: 0;
    overflow: auto;
    padding: 0 16px 16px;
}

.image-lightbox-body img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 140px);
    margin: 0 auto;
    border-radius: 16px;
    background: #fff;
    object-fit: contain;
}

@media (max-width: 900px) {
    .resort-media-section-head,
    .resort-media-tile-body,
    .image-lightbox-head {
        align-items: stretch;
        flex-direction: column;
    }

    .resort-media-actions,
    .image-lightbox-actions {
        justify-content: flex-start;
    }

    .resort-media-grid,
    .resort-media-grid-main {
        grid-template-columns: 1fr;
    }

    .image-lightbox {
        padding: 10px;
    }
}

/* Preview-card typed tags */
.preview-tags-editor {
    margin-top: 20px;
    padding: 16px;
    border: 1px solid #dbeafe;
    border-radius: 20px;
    background: linear-gradient(135deg, #f8fbff, #f4f9ff);
}

.preview-tags-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.preview-tags-head h3 {
    margin: 0 0 4px;
    font-size: 1rem;
    font-weight: 900;
}

.preview-tags-head p {
    margin: 0;
    color: var(--muted);
    font-size: .86rem;
}

.preview-tags-group {
    display: grid;
    gap: 8px;
    height: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
}

.preview-tags-group-title {
    color: #334155;
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.preview-tags-check {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: flex-start;
    margin: 0;
    padding: 8px;
    border-radius: 12px;
    cursor: pointer;
}

.preview-tags-check:hover {
    background: #f8fafc;
}

.preview-tags-check input {
    margin-top: 3px;
}

.preview-tags-check strong,
.preview-tags-check small {
    display: block;
}

.preview-tags-check strong {
    color: #0f172a;
    font-size: .86rem;
}

.preview-tags-check small {
    color: var(--muted);
    font-size: .75rem;
    line-height: 1.25;
}

/* Resort groups */
.group-edit-layout {
    align-items: flex-start;
}

.group-main-card {
    min-width: 0;
}

.group-side-card {
    position: sticky;
    top: 18px;
}

.group-cover-placeholder {
    height: 220px;
    border-radius: 22px;
}

.empty-state-soft {
    display: grid;
    gap: 6px;
    padding: 24px;
    border: 1px dashed rgba(34, 72, 112, 0.2);
    border-radius: 20px;
    background: rgba(245, 249, 255, 0.75);
    color: #59708a;
}

.group-select-list {
    display: grid;
    gap: 10px;
    max-height: 480px;
    overflow: auto;
    padding: 4px;
}

.group-select-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid rgba(32, 66, 105, 0.12);
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.group-select-row:hover {
    border-color: rgba(24, 101, 214, 0.35);
    box-shadow: 0 8px 24px rgba(28, 60, 96, 0.08);
    transform: translateY(-1px);
}

.group-select-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.group-select-row strong {
    display: block;
    color: #172b4d;
}

.group-select-row small {
    display: block;
    color: #6b7c93;
}

.group-place-row {
    grid-template-columns: auto 56px 1fr;
}

.group-place-row img,
.group-place-no-image {
    width: 56px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    background: #eef3f8;
    display: grid;
    place-items: center;
    color: #789;
}

.group-select-row[hidden] {
    display: none !important;
}

@media (max-width: 1100px) {
    .group-side-card {
        position: static;
    }
}

.edit-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 24px;
}

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

.toggle-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid rgba(32, 66, 105, 0.12);
    border-radius: 12px;
    background: #fff;
}

.form-hint {
    display: block;
    margin-top: 6px;
    color: #6b7c93;
    font-size: 12px;
}

@media (max-width: 1100px) {
    .edit-layout,
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.search-alias-editor {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(248, 250, 252, .72);
}

.search-alias-editor-compact {
    margin: 10px 0 14px;
    padding: 12px;
}

.search-alias-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.search-alias-head .form-label {
    margin-bottom: 2px;
}

.search-alias-rows {
    display: grid;
    gap: 8px;
}

.search-alias-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.search-alias-row .btn {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    font-size: 20px;
    line-height: 1;
}

/* Search test / algorithmic search */
.search-row-extended {
    grid-template-columns: minmax(260px, 1fr) auto auto;
    align-items: center;
}

.search-algorithm-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 14px;
    background: rgba(248, 250, 252, .9);
    white-space: nowrap;
}

.search-mini-debug,
.search-debug-grid {
    display: grid;
    gap: 12px;
}

.search-mini-debug {
    grid-template-columns: minmax(180px, 240px) 1fr;
    margin-top: 14px;
}

.search-mini-debug > div,
.search-debug-card,
.search-help-box,
.places-search-note {
    border: 1px solid rgba(15, 23, 42, .1);
    background: rgba(248, 250, 252, .82);
    border-radius: 16px;
    padding: 12px 14px;
}

.search-mini-debug small,
.search-debug-card small {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-bottom: 4px;
}

.search-mini-debug span,
.search-candidate-list span {
    display: inline-flex;
    margin: 2px 4px 2px 0;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-size: 12px;
}

.search-test-form {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px minmax(240px, 1fr) 110px auto;
    gap: 14px;
    align-items: end;
}

.search-test-actions {
    display: flex;
    align-items: end;
}

.search-help-box {
    color: #334155;
}

.search-examples {
    display: grid;
    gap: 4px;
    margin-top: 10px;
    color: #64748b;
    font-size: 13px;
}

.search-debug-grid {
    grid-template-columns: 1fr 1fr 2fr;
}

.search-results-table code {
    white-space: nowrap;
}

.places-search-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto auto auto;
    gap: 12px;
    align-items: center;
    margin: 16px 0;
}

.places-search-note {
    margin: -4px 0 16px;
    color: #475569;
    font-size: 13px;
}

@media (max-width: 1100px) {
    .search-test-form,
    .places-search-panel,
    .search-mini-debug,
    .search-debug-grid,
    .search-row-extended {
        grid-template-columns: 1fr;
    }
}

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

.preference-tag-group {
    border: 1px solid rgba(15, 23, 42, .1);
    border-radius: 18px;
    background: rgba(248, 250, 252, .75);
    padding: 16px;
}

.preference-tag-group-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.preference-tag-group-head h4 {
    margin: 0;
    font-size: 16px;
}

.preference-tag-group-head code {
    color: #64748b;
    font-size: 11px;
}

.preference-tag-list {
    display: grid;
    gap: 10px;
}

.preference-tag-check,
.preference-tag-readonly {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, .35);
    border-radius: 14px;
    background: #fff;
}

.preference-tag-readonly {
    display: block;
}

.preference-tag-check input {
    margin-top: 4px;
}

.preference-tag-check strong,
.preference-tag-readonly strong {
    display: block;
    font-size: 14px;
    color: #0f172a;
}

.preference-tag-check small,
.preference-tag-readonly small {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 11px;
}

.preference-tag-check em,
.preference-tag-readonly em {
    display: block;
    margin-top: 4px;
    color: #475569;
    font-size: 12px;
    font-style: normal;
}

.preference-tag-readonly.is-disabled {
    opacity: .55;
}

.questionnaire-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
}

.questionnaire-summary-card {
    border: 1px solid rgba(15, 23, 42, .1);
    border-radius: 16px;
    background: #fff;
    padding: 16px;
}

.questionnaire-summary-card strong {
    display: block;
    font-size: 28px;
    line-height: 1;
    color: #0f172a;
}

.questionnaire-summary-card span {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 13px;
}

.questionnaire-question-list {
    display: grid;
    gap: 16px;
}

.questionnaire-question-card {
    border: 1px solid rgba(15, 23, 42, .1);
    border-radius: 18px;
    background: #fff;
    padding: 16px;
}

.questionnaire-question-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.questionnaire-question-head h4 {
    margin: 0;
    font-size: 16px;
}

.questionnaire-question-head p {
    margin: 4px 0 0;
    color: #64748b;
}

.questionnaire-question-meta {
    display: grid;
    justify-items: end;
    gap: 4px;
    color: #64748b;
    font-size: 12px;
}

/* Media extension upload: resort videos and place galleries */
.resort-video-grid video,
.resort-video-preview video {
    display: block;
    width: 100%;
    max-height: 260px;
    border-radius: 14px;
    background: #111827;
}

.resort-media-tile-video .resort-media-tile-body small:last-child {
    color: #6b7280;
    font-weight: 700;
    letter-spacing: .04em;
}

.place-gallery-editor {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #f9fafb;
}

.place-gallery-head {
    display: flex;
    gap: 12px;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.place-gallery-head strong {
    display: block;
    font-size: 14px;
}

.place-gallery-head small,
.place-gallery-empty {
    display: block;
    color: #6b7280;
    font-size: 12px;
}

.place-gallery-upload-form {
    flex: 0 0 auto;
}

.place-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.place-gallery-item {
    overflow: hidden;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}

.place-gallery-item button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.place-gallery-item img,
.place-gallery-item video {
    display: block;
    width: 100%;
    height: 92px;
    object-fit: cover;
    background: #111827;
}

.place-gallery-caption {
    display: flex;
    gap: 6px;
    justify-content: space-between;
    align-items: center;
    padding: 7px 8px;
}

.place-gallery-caption small {
    min-width: 0;
    overflow: hidden;
    color: #374151;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.place-gallery-caption form {
    margin: 0;
}

.place-gallery-caption button[type="submit"] {
    display: inline-flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    border: 1px solid #fecaca;
    border-radius: 999px;
    background: #fff;
    color: #dc2626;
    font-weight: 700;
    line-height: 1;
}

.mobile-preview-hero video,
.mobile-preview-hero-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-place-map {
    position: relative;
    overflow: hidden;
}

.mobile-place-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.mobile-place-map.has-video::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(15, 23, 42, .1), rgba(15, 23, 42, .42));
    z-index: 1;
    pointer-events: none;
}

.mobile-place-map.has-video .mobile-place-back,
.mobile-place-map.has-video .mobile-place-map-pin {
    position: relative;
    z-index: 2;
}

.resort-media-tile-video small:last-child,
.place-gallery-caption small {
    white-space: normal;
}

.place-gallery-caption form[action*="set-main-video"] button[type="submit"] {
    border-color: #bfdbfe;
    color: #2563eb;
}

/* Resort main video toggle */
.resort-video-actions {
    align-items: flex-start;
}

.main-video-toggle-form {
    width: 100%;
}

.main-video-toggle {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 230px;
    padding: 8px 10px;
    border: 1px solid #d7e0ee;
    border-radius: 10px;
    background: #f8fbff;
    color: #334155;
    font-size: 12px;
    line-height: 1.25;
    cursor: pointer;
}

.main-video-toggle input {
    margin-top: 1px;
}

/* Fix: show resort video controls on narrow media cards */
.resort-media-tile-video .resort-media-tile-body {
    flex-direction: column;
    align-items: stretch;
}

.resort-media-tile-video .resort-media-tile-body > div:first-child {
    min-width: 0;
}

.resort-media-tile-video .resort-media-tile-body strong,
.resort-media-tile-video .resort-media-tile-body small {
    max-width: 100%;
}

.resort-video-actions {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
}

.resort-video-actions .main-video-toggle-form {
    width: 100%;
    order: 1;
}

.resort-video-actions .main-video-toggle {
    max-width: none;
    width: 100%;
}

.resort-video-actions a,
.resort-video-actions form:not(.main-video-toggle-form) {
    order: 2;
}

.questionnaire-picker-form {
    margin: 18px 0;
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, .1);
    border-radius: 16px;
    background: #f8fafc;
}

.questionnaire-picker-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.questionnaire-current-card {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 18px;
    padding: 16px;
    border: 1px solid rgba(37, 99, 235, .18);
    border-radius: 18px;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.questionnaire-current-card h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}

.questionnaire-current-card p {
    margin: 6px 0 0;
    color: #475569;
}

.questionnaire-current-meta {
    display: grid;
    gap: 5px;
    justify-items: end;
    align-content: start;
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .questionnaire-picker-row,
    .questionnaire-current-card {
        display: grid;
        grid-template-columns: 1fr;
    }

    .questionnaire-current-meta {
        justify-items: start;
        white-space: normal;
    }
}

/* Day-off preference tags for Place */
.day-off-tags-editor {
    margin: 14px 0 18px;
    padding: 14px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: #f8fbff;
}

.day-off-tags-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.day-off-tags-head strong {
    display: block;
    color: #0f172a;
}

.day-off-tags-head small {
    display: block;
    color: #64748b;
    margin-top: 3px;
}

.day-off-tags-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 16px;
}

.day-off-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.day-off-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 9px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    color: #334155;
    font-size: 12px;
    cursor: pointer;
}

.day-off-chip input {
    margin: 0;
}

.day-off-chip:has(input:checked) {
    border-color: #60a5fa;
    background: #eff6ff;
    color: #1d4ed8;
}

.day-off-side-fields {
    display: grid;
    gap: 8px;
    align-content: start;
}

.day-off-check-list {
    display: grid;
    gap: 5px;
    font-size: 13px;
    color: #334155;
}

.day-off-check-list label {
    display: flex;
    gap: 7px;
    align-items: center;
}

.preference-test-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    grid-template-areas:
        "controls preview"
        "results preview";
    gap: 18px;
    align-items: start;
}

.preference-test-controls {
    grid-area: controls;
}

.preference-test-results {
    grid-area: results;
}

.preference-test-preview {
    grid-area: preview;
    position: sticky;
    top: 18px;
}

.preference-test-form {
    display: grid;
    gap: 14px;
}

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

.preference-test-chip-list {
    max-height: 260px;
    overflow: auto;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #f8fafc;
}

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

.preference-score-list {
    display: grid;
    gap: 8px;
}

.preference-score-card {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
}

.preference-score-card.is-match {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.preference-score-card strong,
.preference-score-card small,
.preference-reasons {
    display: block;
}

.preference-score-card small {
    color: #64748b;
}

.preference-reasons {
    margin-top: 4px;
    color: #2563eb;
    font-size: 12px;
}

.preference-score-card b {
    min-width: 44px;
    height: 32px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    color: #0f172a;
}

.preference-score-card.is-match b {
    background: #2563eb;
    color: #fff;
}

@media (max-width: 1180px) {
    .day-off-tags-grid,
    .preference-test-page,
    .preference-test-row {
        grid-template-columns: 1fr;
        grid-template-areas: none;
    }

    .preference-test-controls,
    .preference-test-results,
    .preference-test-preview {
        grid-area: auto;
    }

    .preference-test-preview {
        position: static;
    }
}


/* Event media: scale previews in admin UI only; source media stays untouched. */
.resort-events .event-media-column {
    min-width: 0;
}

.resort-events .event-cover-preview button,
.resort-events .event-gallery-item > button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
}

.resort-events .event-cover-preview img {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 360px;
    object-fit: contain;
}

.resort-events .event-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
}

.resort-events .event-gallery-item {
    min-width: 0;
}

.resort-events .event-gallery-item img,
.resort-events .event-gallery-item video {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 140px;
    object-fit: contain;
}

/* Soft character limit: make exceeded state clearly visible, without blocking save. */
.character-counter.is-over-limit {
    color: #dc2626;
    font-weight: 600;
}

.form-control.is-soft-over-limit,
.form-select.is-soft-over-limit {
    border-color: #dc2626;
    box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.12);
}

.form-control.is-soft-over-limit:focus,
.form-select.is-soft-over-limit:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 0.2rem rgba(220, 38, 38, 0.12);
}

/* Compact thumbnails in article/news list. */
.article-list-cover-cell {
    width: 92px;
    min-width: 92px;
}

.article-list-cover {
    display: block;
    width: 76px;
    height: 56px;
    max-width: 76px;
    object-fit: cover;
    border-radius: 8px;
}

.article-list-cover-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
}

/* Compact thumbnails in banner list. */
.banner-list-image-cell {
    width: 112px;
    min-width: 112px;
}

.banner-list-image {
    display: block;
    width: 96px;
    height: 56px;
    max-width: 96px;
    object-fit: cover;
    border-radius: 8px;
}

.banner-list-image-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
}

/* Rental admin */
.rental-items-list {
    display: grid;
    gap: 16px;
}

.rental-item-editor {
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 16px;
    padding: 16px;
    background: rgba(248, 250, 252, .55);
}

.rental-item-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 12px;
    align-items: end;
}

.rental-item-media {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(148, 163, 184, .2);
}

.rental-item-current-image img,
.rental-image-empty {
    width: 132px;
    height: 92px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid rgba(148, 163, 184, .3);
    background: #f8fafc;
}

.rental-image-empty {
    display: grid;
    place-items: center;
    color: #64748b;
    font-size: 13px;
}

.rental-shared-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
    gap: 10px;
}

.rental-shared-image button {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, .28);
    background: #fff;
    border-radius: 12px;
    padding: 6px;
    cursor: pointer;
}

.rental-shared-image img {
    width: 100%;
    height: 74px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.rental-shared-image span {
    display: block;
    margin-top: 5px;
    font-size: 11px;
    color: #2563eb;
}

@media (max-width: 1100px) {
    .rental-item-form { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
}

@media (max-width: 700px) {
    .rental-item-form { grid-template-columns: 1fr; }
}

/* Profile avatar editor */
.profile-avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.profile-avatar-card {
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 16px;
    padding: 14px;
    background: rgba(248, 250, 252, .72);
    display: grid;
    gap: 12px;
}

.profile-avatar-preview {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 220px;
    border-radius: 14px;
    overflow: hidden;
    background: #eef2f7;
    border: 1px solid rgba(148, 163, 184, .22);
}

.profile-avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.profile-avatar-empty {
    width: 100%;
    height: 100%;
    min-height: 180px;
    display: grid;
    place-items: center;
    color: #64748b;
    font-size: 14px;
}

.profile-avatar-meta {
    display: grid;
    gap: 4px;
}

.profile-avatar-meta small {
    color: #64748b;
    overflow-wrap: anywhere;
}

.profile-avatar-upload {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}

.profile-avatar-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-avatar-actions form {
    margin: 0;
}

@media (max-width: 600px) {
    .profile-avatar-upload {
        grid-template-columns: 1fr;
    }
}

/* Resort Live collections editor */
.live-collections-seed-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
}

.live-collections-seed-card p {
  margin: 6px 0;
  color: #64748b;
  font-size: 13px;
}

.live-place-groups-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.resort-live-collection-list {
  display: grid;
  gap: 16px;
}

.resort-live-collection-card {
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #fff;
}

.resort-live-collection-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.resort-live-collection-fields {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 110px 150px;
  gap: 12px;
  flex: 1;
}

.resort-live-collection-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 980px) {
  .live-collections-seed-card,
  .resort-live-collection-head {
    align-items: stretch;
    flex-direction: column;
  }

  .resort-live-collection-fields {
    grid-template-columns: 1fr 110px;
  }

  .live-collection-active-field {
    grid-column: 1 / -1;
  }

  .resort-live-collection-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .resort-live-collection-fields {
    grid-template-columns: 1fr;
  }

  .live-collection-active-field {
    grid-column: auto;
  }
}


/* Shared drag-and-drop ordering for collections */
.collection-drag-cell {
  width: 42px;
  text-align: center;
  vertical-align: middle;
}

.collection-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #f8fafc;
  color: #475569;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  cursor: grab;
  user-select: none;
}

.collection-drag-handle:hover {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.collection-drag-handle:active {
  cursor: grabbing;
}

.collection-card-drag-handle {
  flex: 0 0 auto;
  align-self: center;
}

[data-sortable-item].is-dragging {
  opacity: .52;
}

[data-sortable-list].is-drag-over {
  outline: 2px dashed #93c5fd;
  outline-offset: 3px;
  border-radius: 12px;
}

.resort-live-collection-card.is-dragging {
  background: #eff6ff;
  border-color: #93c5fd;
}

.collection-items-table tr.is-dragging,
.resort-live-collection-card tr.is-dragging {
  background: #eff6ff;
}

/* Unified collection sorting: Pointer Events instead of native HTML5 drag. */
.collection-drag-handle[data-sortable-handle] {
  touch-action: none;
  -webkit-user-drag: none;
}

body.collection-sort-active,
body.collection-sort-active * {
  cursor: grabbing !important;
}
