/* ==========================================================================
   Admin site (Phase 3)
   ========================================================================== */

body.admin { min-height: 100vh; display: flex; flex-direction: column; background: var(--cream); }
body.admin--signed-out {
    background:
        radial-gradient(640px 360px at 85% 10%, rgba(203, 209, 235, .6), transparent 70%),
        radial-gradient(520px 320px at 10% 90%, rgba(240, 184, 169, .28), transparent 70%),
        var(--cream);
}

.admin-header { background: #fff; border-bottom: 1px solid var(--line); }
.admin-header__inner {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    max-width: 1200px; margin: 0 auto; padding: 12px 20px;
}
.admin--app .admin-header { position: sticky; top: 0; z-index: 30; }
.admin--app .admin-header__inner { max-width: none; }
.admin--app .admin-header__brand { margin-right: auto; }
.admin-header__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.admin-header__brand img { width: auto; height: 42px; }
.admin-header__tag {
    padding: 4px 10px 2px; border-radius: 999px; background: var(--slate); color: #fff;
    font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
}
.admin-header__user { display: flex; align-items: center; gap: 14px; font-size: .95rem; color: var(--muted); }
.admin-header__user form { margin: 0; }
.admin-header__back { color: var(--slate); font-size: .92rem; text-decoration: none; }
.admin-header__back:hover { text-decoration: underline; }
.btn--small { min-height: 36px; padding: .5em 1.1em .4em; font-size: .85rem; }
.admin-header__site { display: inline-flex; align-items: center; gap: 6px; color: var(--slate); font-weight: 600; text-decoration: none; }
.admin-header__site:hover { text-decoration: underline; }
.admin-header__site .icon { width: 15px; height: 15px; }
@media (max-width: 760px) { .admin-header__name, .admin-header__site { display: none; } }

.admin-main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 40px 20px 64px; }
.admin-main:focus { outline: none; }
.admin--signed-out .admin-main { display: grid; place-items: center; }

/* ---- Sign-in card ---- */
.login-card {
    width: min(100%, 420px); padding: 36px 32px 28px; border-radius: 20px;
    background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lg);
}
@media (max-width: 480px) { .login-card { padding: 28px 20px 22px; } }
.login-card__badge {
    display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 16px;
    border-radius: 16px; background: var(--pale-soft); color: var(--slate);
}
.login-card__badge .icon { width: 28px; height: 28px; }
.login-card__title { font-size: 1.9rem; margin: 0 0 8px; }
.login-card__lead { margin: 0 0 20px; color: var(--muted); overflow-wrap: anywhere; }
.login-card__notice { margin: 0 0 16px; padding: 10px 12px; border-radius: 10px; background: var(--sage-soft); color: #4f5a2a; }
.login-card__error { margin: 0 0 16px; padding: 10px 12px; border-radius: 10px; background: #fbeceb; color: #8f3a32; }

.login-form { display: grid; gap: 8px; }
.login-form label { font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.login-form input {
    width: 100%; height: 50px; padding: 0 14px; font: inherit; font-size: 1.05rem; color: var(--ink);
    background: var(--cream); border: 1.5px solid var(--line); border-radius: 12px;
}
.login-form input:focus { outline: none; border-color: var(--slate); box-shadow: 0 0 0 3px var(--pale); }
.login-form__code { font-size: 1.7rem !important; letter-spacing: .5em; text-align: center; padding-left: calc(14px + .5em) !important; font-variant-numeric: tabular-nums; }
.login-form__submit { margin-top: 10px; width: 100%; }

.login-card__resend { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px; margin: 18px 0 0; font-size: .9rem; color: var(--muted); }
.login-card__resend .link-button { font-size: inherit; }
.login-card__other { margin: 6px 0 0; font-size: .9rem; }
.login-card__other a { color: var(--slate); }

/* ==========================================================================
   Signed-in layout: side menu + content
   ========================================================================== */
.admin--app { --nav-w: 248px; background: #fbf9f8; }
.admin-shell { flex: 1; display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); }
.admin--app .admin-main { max-width: 1240px; margin: 0; padding: 32px clamp(20px, 3vw, 40px) 64px; }

.admin-nav {
    position: sticky; top: 67px; align-self: start; height: calc(100vh - 67px); overflow-y: auto;
    padding: 20px 14px 32px; background: #fff; border-right: 1px solid var(--line);
}
.admin-nav__group + .admin-nav__group { margin-top: 18px; }
.admin-nav__label { margin: 0 0 6px 12px; font-size: .68rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.admin-nav ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.admin-nav__link {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
    color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem;
    transition: background-color .15s, color .15s;
}
.admin-nav__link .icon { width: 20px; height: 20px; flex: none; color: var(--slate); }
a.admin-nav__link:hover { background: var(--pale-soft); }
.admin-nav__link.is-current { background: var(--slate); color: #fff; }
.admin-nav__link.is-current .icon { color: #fff; }
.admin-nav__link.is-soon { color: var(--muted); cursor: default; font-weight: 400; }
.admin-nav__link.is-soon .icon { color: #b5aeb2; }

.soon-pill {
    margin-left: auto; padding: 2px 7px 1px; border-radius: 999px; background: var(--cream);
    border: 1px solid var(--line); color: var(--muted);
    font-size: .62rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
}
.soon-pill--on-dark { background: rgba(255, 255, 255, .18); border-color: transparent; color: #fff; }

.admin-menu-btn {
    display: none; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 10px;
    border: 1.5px solid var(--line); background: #fff; color: var(--slate); font: 600 .9rem var(--font-body); cursor: pointer;
}
.admin-menu-btn .icon { width: 20px; height: 20px; }

@media (max-width: 960px) {
    .admin-shell { grid-template-columns: 1fr; }
    /* No JavaScript: the menu sits above the content. */
    .admin-nav { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
    .admin-js .admin-menu-btn:not([hidden]) { display: inline-flex; }
    .admin-js .admin-nav {
        position: fixed; z-index: 40; top: 0; left: 0; bottom: 0; width: min(86vw, 300px); height: 100vh;
        border-right: 1px solid var(--line); box-shadow: var(--shadow-lg);
        transform: translateX(-105%); transition: transform .25s ease; visibility: hidden;
    }
    .admin-js .admin-nav.is-open { transform: none; visibility: visible; }
    .admin-menu-open body::after {
        content: ""; position: fixed; inset: 0; z-index: 35; background: rgba(47, 42, 53, .35);
    }
}
@media (prefers-reduced-motion: reduce) { .admin-js .admin-nav { transition: none; } }

/* ==========================================================================
   Dashboard
   ========================================================================== */
.dash-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 18px 28px; margin-bottom: 26px; }
.dash-head__title { font-size: clamp(1.9rem, 3.4vw, 2.6rem); margin: 0 0 4px; }
.dash-head__lead { margin: 0; color: var(--muted); }
.dash-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dash-actions .btn:disabled { cursor: not-allowed; opacity: .75; }
.dash-actions .btn .soon-pill { margin-left: 4px; }

/* Headline figures (stat tiles: text, not charts) */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .tiles { grid-template-columns: 1fr; } }
.tile { padding: 18px 20px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
.tile__label { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tile__label .icon { width: 18px; height: 18px; color: var(--slate); }
.tile__value { margin: 0; font-family: var(--font-display); font-size: 2.4rem; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.tile__note { margin: 8px 0 0; font-size: .88rem; color: var(--muted); }

/* Cards */
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 860px) { .dash-grid { grid-template-columns: 1fr; } }
.dash-card { padding: 20px 22px; border-radius: 16px; background: #fff; border: 1px solid var(--line); min-width: 0; }
.dash-card--wide { grid-column: 1 / -1; }
.dash-card__title { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 1.25rem; }
.dash-card__title .icon { width: 20px; height: 20px; color: var(--slate); }
.dash-card__meta { margin: 0 0 14px; font-size: .85rem; color: var(--muted); }
.dash-card__empty { margin: 12px 0 0; color: var(--muted); }
.dash-card__ok { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; color: #4f5a2a; }
.dash-card__ok .icon { width: 20px; height: 20px; flex: none; color: #8e9a55; }

.dash-card--attention .dash-card__title .icon { color: #b8743a; }
.attention { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.attention__item { display: flex; gap: 12px; align-items: flex-start; }
.attention__icon { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: #fbf0e6; color: #a8652e; }
.attention__icon .icon { width: 19px; height: 19px; }
.attention__text { margin: 0; }
.attention__examples { margin: 2px 0 0; font-size: .88rem; color: var(--muted); }
.attention__examples a { color: var(--slate); }

.dash-news__label { margin: 12px 0 2px; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.dash-news__name { margin: 0 0 4px; font-family: var(--font-display); font-size: 1.5rem; }
.dash-news__name span { font-family: var(--font-body); font-size: .95rem; color: var(--muted); }

/* Ranked lists: one series, one hue (slate); numbers in ink, never in the bar colour */
.rank { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.rank__item { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.rank__pos { font-size: .85rem; font-weight: 600; color: var(--muted); text-align: right; }
.rank__body { display: grid; gap: 5px; min-width: 0; }
.rank__title { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank__title:hover { text-decoration: underline; color: var(--slate); }
.rank__bar { display: block; width: 100%; height: 6px; }
.rank__track { fill: var(--pale-soft); }
.rank__fill { fill: var(--slate); }
.rank__value { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }

.dash-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.dash-table th { text-align: left; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 10px 12px 8px 0; border-bottom: 1px solid var(--line); }
.dash-table td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.dash-table tr:last-child td { border-bottom: 0; }
.dash-table a { color: var(--slate); }
@media (max-width: 560px) { .dash-table th:nth-child(2), .dash-table td:nth-child(2) { display: none; } }

.btn--light { background: var(--pale-soft); color: var(--slate); border-color: transparent; }
.btn--light:hover:not(:disabled) { background: var(--pale); color: var(--slate-dark); }
.btn .icon { width: 1.05em; height: 1.05em; }

/* Fixes after review */
.admin--app { --nav-w: 264px; }
.admin-nav__link > span:not(.soon-pill) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash-card__title .icon, .tile__label .icon { fill: none; stroke: currentColor; }
@media (max-width: 560px) {
    .admin--app .admin-header__tag { display: none; }
    .admin--app .admin-header__brand img { height: 34px; }
    .admin--app .admin-header__inner { gap: 10px; padding-left: 14px; padding-right: 14px; }
}

/* ==========================================================================
   Shared admin page pieces (Properties list, edit form)
   ========================================================================== */
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 14px 24px; margin-bottom: 20px; }
.page-head__title { font-size: clamp(1.8rem, 3.2vw, 2.4rem); margin: 0; overflow-wrap: anywhere; }
.page-head__meta { margin: 4px 0 0; font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.page-head .eyebrow a { color: inherit; text-decoration: none; }
.page-head .eyebrow a:hover { text-decoration: underline; }

.flash { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 12px 14px; border-radius: 12px; background: var(--sage-soft); color: #4f5a2a; }
.flash .icon { width: 20px; height: 20px; flex: none; }
.flash--error { background: #fbeceb; color: #8f3a32; }

.btn--danger { background: #b04a40; color: #fff; }
.btn--danger:hover { background: #943b32; color: #fff; }
.icon-link { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--slate); }
.icon-link:hover { background: var(--pale-soft); }
.icon-link .icon { width: 18px; height: 18px; }

/* ---- Properties list ---- */
.list-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.list-tools__search { position: relative; flex: 1 1 280px; }
.list-tools__search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.list-tools input, .list-tools select {
    width: 100%; height: 44px; padding: 0 12px; font: inherit; color: var(--ink);
    background: #fff; border: 1.5px solid var(--line); border-radius: 10px;
}
.list-tools input { padding-left: 38px; }
.list-tools__filter { flex: 0 1 200px; }
.list-tools__clear { color: var(--slate); font-size: .92rem; }
.list-count { margin: 0 0 12px; color: var(--muted); font-size: .92rem; }
.list-empty { padding: 40px 20px; text-align: center; background: #fff; border: 1px dashed var(--line); border-radius: 16px; }

.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.list-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.list-table th { text-align: left; padding: 12px 14px 10px; font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
.list-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list-table tr:last-child td { border-bottom: 0; }
.list-table tbody tr:hover { background: #fcfbfa; }
.list-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.list-table .nowrap { white-space: nowrap; }
.list-table__photo { width: 96px; padding-right: 0 !important; }
.list-table__photo img, .thumb-empty { display: block; width: 96px; height: 64px; border-radius: 8px; object-fit: cover; background: var(--pale-soft); }
.thumb-empty { display: grid; place-items: center; color: var(--muted); }
.thumb-empty .icon { width: 22px; height: 22px; }
.list-table__title { display: block; color: var(--ink); font-weight: 600; text-decoration: none; }
.list-table__title:hover { color: var(--slate); text-decoration: underline; }
.list-table__sub { display: block; font-size: .85rem; color: var(--muted); }
.list-table__actions { white-space: nowrap; text-align: right; }
.tag { display: inline-block; margin: 2px 4px 2px 0; padding: 3px 8px 2px; border-radius: 999px; background: var(--pale-soft); color: var(--slate); font-size: .72rem; font-weight: 600; letter-spacing: .04em; white-space: nowrap; }
.tag--on { background: var(--sage-soft); color: #4f5a2a; }
.tag--off { background: #f1eeef; color: var(--muted); }
.tag--closed { background: var(--mauve); color: #fff; }
@media (max-width: 760px) {
    .list-table th:nth-child(5), .list-table td:nth-child(5), .list-table th:nth-child(6), .list-table td:nth-child(6) { display: none; }
}
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 18px; color: var(--muted); font-size: .92rem; }

/* ---- Edit form ---- */
.section-nav {
    position: sticky; top: 67px; z-index: 10; display: flex; gap: 4px; overflow-x: auto;
    margin: 0 0 16px; padding: 8px 0; background: #fbf9f8; border-bottom: 1px solid var(--line);
}
.section-nav a { padding: 7px 12px; border-radius: 999px; color: var(--slate); text-decoration: none; font-weight: 600; font-size: .88rem; white-space: nowrap; }
.section-nav a:hover { background: var(--pale-soft); }
.edit-card { scroll-margin-top: 130px; margin-bottom: 16px; padding: 22px 24px; border-radius: 16px; background: #fff; border: 1px solid var(--line); }
@media (max-width: 560px) { .edit-card { padding: 18px 16px; } }
.edit-card__title { font-size: 1.35rem; margin: 0 0 16px; }
.edit-card--danger { border-color: #ecc8c3; }
.edit-card--danger p { color: var(--muted); }
.delete-form { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }

.field { display: grid; gap: 6px; align-content: start; margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.field > label, .field > legend, .field-label { margin: 0; padding: 0; font-size: .78rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.req { color: #b04a40; }
.field input[type="text"], .field input[type="number"], .field select, .field textarea {
    width: 100%; height: 46px; padding: 0 12px; font: inherit; font-size: 1rem; color: var(--ink);
    background: #fff; border: 1.5px solid var(--line); border-radius: 10px;
}
.field textarea { height: auto; padding: 10px 12px; line-height: 1.55; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--slate); box-shadow: 0 0 0 3px var(--pale); }
.field [aria-invalid="true"] { border-color: #c2554a; }
.field-hint { margin: 0; font-size: .85rem; color: var(--muted); }
.field-error { margin: 0; font-size: .88rem; color: #b04a40; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
.field-row--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 640px) { .field-row--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.field-row--coords { grid-template-columns: 1fr 1fr auto; align-items: end; margin-top: 12px; }
.field-row--coords .btn { margin-bottom: 16px; }
@media (max-width: 560px) { .field-row--coords { grid-template-columns: 1fr 1fr; } .field-row--coords .btn { grid-column: 1 / -1; justify-self: start; } }

.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 14px; margin: 14px 0 10px; }
.choice-grid--3 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); margin-top: 0; }
.choice { display: flex; align-items: center; gap: 10px; padding: 6px 0; cursor: pointer; }
.choice input { width: 19px; height: 19px; flex: none; accent-color: var(--slate); }
.choice-row .choice { padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 999px; }
.choice-row .choice:has(input:checked) { border-color: var(--slate); background: var(--pale-soft); }

.switch { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track { position: relative; flex: none; width: 46px; height: 26px; margin-top: 2px; border-radius: 999px; background: #d9d2d5; transition: background-color .2s; }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + .switch__track { background: var(--slate); }
.switch input:checked + .switch__track::after { transform: translateX(20px); }
.switch input:focus-visible + .switch__track { outline: 3px solid var(--peach-dark); outline-offset: 2px; }
.switch .field-hint { display: block; }

.map-box { position: relative; height: 380px; margin-top: 4px; border-radius: 12px; overflow: hidden; background: var(--pale-soft); border: 1px solid var(--line); }
.map-box__fallback { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 20px; text-align: center; color: var(--muted); }
@media (max-width: 560px) { .map-box { height: 300px; } }

.save-bar {
    position: sticky; bottom: 0; z-index: 10; display: flex; justify-content: flex-end; align-items: center; gap: 10px;
    margin: 0 -4px 16px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .96);
    border: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(47, 42, 53, .08);
}
.save-bar__state { margin-right: auto; font-size: .9rem; color: var(--muted); }

/* ---- Description editor (Quill, snow theme) ---- */
.field .ql-toolbar.ql-snow {
    display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; padding: 6px 8px;
    font-family: inherit; background: #faf9f6; border: 1.5px solid var(--line); border-bottom: 0; border-radius: 10px 10px 0 0;
}
.field .ql-toolbar.ql-snow + .ql-container.ql-snow { margin-top: -6px; } /* cancel the field's grid gap */
.field .ql-container.ql-snow {
    font: inherit; font-size: 1rem; color: var(--ink); background: #fff;
    border: 1.5px solid var(--line); border-radius: 0 0 10px 10px;
}
.field .ql-container.ql-snow:focus-within { border-color: var(--slate); box-shadow: 0 0 0 3px var(--pale); }
.field .ql-container.is-invalid { border-color: #c2554a; }
.field .ql-editor { min-height: 220px; max-height: 60vh; overflow-y: auto; padding: 12px 14px; line-height: 1.6; }
.field .ql-editor p, .field .ql-editor ol, .field .ql-editor ul { margin-bottom: .6em; }
.field .ql-editor h3 { margin: .8em 0 .3em; font-size: 1.2rem; }
.field .ql-editor h4 { margin: .8em 0 .3em; font-size: 1.05rem; }
.field .ql-editor.ql-blank::before { left: 14px; right: 14px; font-style: normal; color: var(--muted); }
.field .ql-snow .ql-picker.ql-header { width: 118px; }
.field .ql-snow .ql-picker.ql-header .ql-picker-label::before,
.field .ql-snow .ql-picker.ql-header .ql-picker-item::before { content: 'Paragraph'; }
.field .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
.field .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { content: 'Heading'; }
.field .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]::before,
.field .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]::before { content: 'Subheading'; }
.field .ql-snow .ql-tooltip { z-index: 5; border-radius: 8px; }
.field .ql-snow .ql-tooltip input[type="text"] { width: 220px; height: 30px; padding: 0 8px; font-size: .9rem; border-radius: 6px; }

/* ---- Photos ---- */
.photo-drop {
    display: grid; justify-items: center; gap: 4px; margin: 14px 0; padding: 26px 16px; text-align: center;
    border: 2px dashed var(--pale); border-radius: 14px; background: #fcfcfe; transition: background-color .2s, border-color .2s;
}
.photo-drop .icon { width: 34px; height: 34px; color: var(--slate); }
.photo-drop p { margin: 0; }
.photo-drop.is-over { border-color: var(--slate); background: var(--pale-soft); }
.upload-list { margin: 0 0 12px; padding: 0; list-style: none; display: grid; gap: 6px; }
.upload { display: grid; grid-template-columns: minmax(0, 1fr) 160px auto; gap: 10px; align-items: center; font-size: .9rem; }
.upload__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload progress { width: 100%; height: 8px; accent-color: var(--slate); }
.upload__status { color: var(--muted); white-space: nowrap; }
.upload--done .upload__status { color: #4f5a2a; }
.upload--error { color: #8f3a32; }
.upload--error .upload__status { color: #8f3a32; }
.photo-grid { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.photo { position: relative; border-radius: 12px; overflow: hidden; background: var(--pale-soft); aspect-ratio: 4 / 3; border: 2px solid transparent; }
.photo.is-featured { border-color: var(--slate); }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo__badge { position: absolute; top: 8px; left: 8px; padding: 3px 9px 2px; border-radius: 999px; background: var(--slate); color: #fff; font-size: .72rem; font-weight: 600; letter-spacing: .06em; }
.photo__tools { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 6px; padding: 8px; background: linear-gradient(transparent, rgba(30, 26, 34, .65)); }
.photo__btn { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .92); color: var(--ink); font: 600 .8rem var(--font-body); cursor: pointer; }
.photo__btn .icon { width: 16px; height: 16px; }
.photo__btn--delete { margin-left: auto; }
.photo__btn.is-armed { background: #b04a40; color: #fff; }
.photo__btn:disabled { opacity: .6; cursor: progress; }

/* Narrow screens: keep everything inside the viewport */
@media (max-width: 960px) { .admin-shell { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
    .list-tools__filter { flex: 1 1 140px; }
    .list-table__photo { display: none; }
    .page-head .btn { width: 100%; }
}
