:root {
    --ink: #3d342f;
    --ink-soft: #7d716a;
    --paper: #f7f4f1;
    --card: #ffffff;
    --field: #ffffff;
    --line: #eadfd6;
    --clay: #e09a8c;
    --clay-deep: #d07d6e;
    --gold: #e4c39a;
    --blush: #f3e6df;
    --rose: #c9897c;
    --side: 268px;
    --top: 72px;
    --shadow: 0 12px 32px rgba(61, 52, 47, 0.06);
    --font-body: Inter, sans-serif;
    --font-heading: Inter, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { font-size: 17px; }
body { font-family: var(--font-body); color: var(--ink); background: #fff; font-size: 16px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 0; background: none; }
img { max-width: 100%; display: block; }
h1, h2, .side-logo strong { font-family: var(--font-heading); }

.admin-app {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--side) minmax(0, 1fr);
}

.admin-side {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: auto;
    border-right: 1px solid var(--line);
    background: var(--card);
    padding: 16px 12px 28px;
}
.side-collapse,
.side-restore {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: var(--ink-soft);
    flex: 0 0 auto;
}
.side-collapse:hover,
.side-restore:hover { background: var(--paper); color: var(--ink); }
.side-collapse svg,
.side-restore svg { width: 18px; height: 18px; }
.side-restore { display: none; width: 42px; height: 42px; border-radius: 12px; }
html.side-collapsed .admin-app { grid-template-columns: minmax(0, 1fr); }
html.side-collapsed .admin-side { display: none; }
html.side-collapsed .side-restore { display: grid; }
.side-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 8px 18px;
}
.side-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 650;
}
.side-logo span {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--clay);
    color: #fff;
    display: grid;
    place-items: center;
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 22px;
}
.side-logo strong { font-size: 19px; white-space: nowrap; }
.side-brand .side-logo { min-width: 0; }
.side-label {
    margin: 16px 10px 6px;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-soft);
    font-weight: 600;
}
.side-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 12px;
    border-radius: 12px;
    color: var(--ink);
    font-size: 16px;
    font-weight: 500;
}
.side-link i {
    width: 20px;
    height: 20px;
    display: grid;
    color: var(--ink-soft);
}
.side-link svg { width: 20px; height: 20px; }
.side-link em {
    margin-left: auto;
    width: 14px;
    color: #c4b8b0;
    display: grid;
}
.side-link em svg { width: 14px; height: 14px; }
.side-link:hover { background: var(--paper); }
.side-link.is-on {
    background: var(--clay);
    color: #fff;
}
.side-link.is-on i,
.side-link.is-on em { color: #fff; }
.side-sub {
    display: grid;
    gap: 2px;
    padding: 0 8px 10px 42px;
}
.side-sub a {
    min-height: 34px;
    display: flex;
    align-items: center;
    font-size: 15px;
    color: var(--ink-soft);
}
.side-sub a.is-on { color: var(--ink); font-weight: 700; }

.admin-main { min-width: 0; background: var(--paper); overflow-x: auto; }
.admin-top {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: var(--top);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 22px;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    min-width: 0;
}
.top-menu { display: none; }
.top-store {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--card);
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
}
.top-store svg { width: 15px; height: 15px; }
.top-note {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 8px 14px;
    border-radius: 12px;
    background: #fff6e8;
    color: #8a7040;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.top-tools { display: flex; align-items: center; gap: 6px; }
.top-tools button,
.top-user {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--ink-soft);
}
.top-tools button:hover { background: var(--blush); }
.top-tools svg { width: 20px; height: 20px; }
.top-user { background: var(--clay); color: #fff; }
.top-user b { font-size: 13px; font-weight: 700; font-family: var(--font-body); }

.admin-page {
    padding: 22px;
    min-width: 0;
    max-width: 100%;
}
.dash,
.work,
.report-page { min-width: 0; max-width: 100%; }
.dash { display: grid; gap: 16px; }
.dash-pair > *,
.dash-mid > *,
.dash-foot > * { min-width: 0; }
.dash-pair,
.dash-foot {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.dash-mid {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 16px;
}
.dash-stack { display: grid; gap: 16px; }
.dash-foot { grid-template-columns: 0.9fr 1.1fr 1fr; }

.card,
.promo,
.wait-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 20px 22px;
    box-shadow: var(--shadow);
    overflow: visible;
}
.card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 16px;
}
.card-head h2,
.list-card h2,
.promo h2,
.wait-card h1 { margin: 0 0 4px; font-size: 24px; }
.card-head p,
.promo p,
.wait-card p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.kicker {
    margin: 0 0 4px;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--clay-deep);
    font-weight: 700;
}
.delta {
    font-size: 14px;
    color: var(--ink-soft);
    font-weight: 600;
}
.stat-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.stat-row div { display: flex; flex-direction: column; gap: 4px; }
.stat-row i {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    margin-bottom: 4px;
}
.stat-row i.is-box { background: #efe8ff; color: #7a68c7; }
.stat-row i.is-user { background: #e8f2ff; color: #4d7ec7; }
.stat-row i.is-coin { background: #fff1d6; color: #c39232; }
.stat-row svg { width: 16px; height: 16px; }
.stat-row b { font-size: 22px; overflow-wrap: anywhere; }
.stat-row span { font-size: 14px; color: var(--ink-soft); }

.range-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--card);
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    min-width: 0;
}
.range-chips { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.range-chip {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-size: 14px;
    font-weight: 650;
    background: var(--card);
    color: var(--ink);
}
.range-chip.is-on {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}
.range-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: end;
    min-width: 0;
}
.range-form label {
    display: grid;
    gap: 4px;
    font-size: 12px;
    font-weight: 650;
    color: var(--ink-soft);
    min-width: 0;
}
.range-form input[type="date"] {
    min-height: 40px;
    min-width: 0;
    width: 100%;
    max-width: 176px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 10px;
    background: var(--field);
    color: var(--ink);
    color-scheme: inherit;
}
.range-form button {
    min-height: 40px;
    padding: 0 16px;
    border-radius: 12px;
    background: var(--clay);
    color: #fff;
    font-weight: 700;
}

.promo {
    background: linear-gradient(120deg, #3d342f, #7d5b52);
    color: #fff8f3;
    min-height: 210px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    overflow: hidden;
}
.promo p { color: rgba(255, 248, 243, 0.78); max-width: 36ch; margin-bottom: 16px; }
.promo a {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-weight: 700;
    font-size: 13px;
}
.promo-art {
    position: relative;
    height: 160px;
}
.promo-art span,
.promo-art b {
    position: absolute;
    border: 2px solid rgba(255, 248, 243, 0.35);
    border-radius: 16px;
}
.promo-art span:nth-child(1) { width: 74px; height: 50px; right: 28px; top: 18px; }
.promo-art span:nth-child(2) { width: 56px; height: 40px; right: 118px; top: 8px; }
.promo-art span:nth-child(3) { width: 46px; height: 34px; right: 8px; top: 78px; }
.promo-art b {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    right: 56px;
    top: 48px;
    background: rgba(255, 248, 243, 0.12);
}

.visit-total { margin: 0 0 16px; font-size: 36px; font-weight: 650; overflow-wrap: anywhere; }
.visit-split {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 10px;
    align-items: end;
    margin-bottom: 12px;
}
.visit-split small { display: block; color: var(--ink-soft); font-size: 12px; }
.visit-split b { font-size: 22px; }
.visit-split em { display: block; color: var(--ink-soft); font-size: 12px; font-style: normal; }
.vs { color: var(--ink-soft); font-size: 12px; padding-bottom: 8px; }
.visit-bar {
    height: 8px;
    border-radius: 99px;
    background: var(--blush);
    overflow: hidden;
}
.visit-bar i {
    display: block;
    height: 100%;
    background: var(--clay);
}
.flat-line {
    height: 2px;
    margin-top: 28px;
    background: var(--line);
}

.feed { list-style: none; margin: 16px 0 0; padding: 0; }
.feed li {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
}
.feed strong { display: block; font-size: 15px; }
.feed p { margin: 3px 0 8px; color: var(--ink-soft); font-size: 14px; }
.feed a {
    display: inline-flex;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--paper);
    font-size: 14px;
    font-weight: 600;
    align-items: center;
}
.feed time { font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.dot {
    width: 10px;
    height: 10px;
    margin-top: 6px;
    border-radius: 50%;
    background: #7dce8a;
}
.dot.is-ship { background: #7dce8a; }
.dot.is-pack { background: #7dce8a; }
.dot.is-new { background: #7dce8a; }
.dot.is-user { background: #9b87d8; }

.mini { text-align: left; }
.ring {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: conic-gradient(var(--clay) 72%, var(--blush) 0);
    mask: radial-gradient(farthest-side, transparent 62%, #000 63%);
    -webkit-mask: radial-gradient(farthest-side, transparent 62%, #000 63%);
    margin-bottom: 10px;
}
.mini b { display: block; font-size: 28px; }
.mini span { color: var(--ink-soft); font-size: 13px; }
.mini small { display: block; margin: 6px 0 18px; color: var(--ink-soft); }
.mini-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.mini-foot i {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--line);
}
.mini-foot em { font-style: normal; font-weight: 700; }

.month-grid {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 14px;
    align-items: center;
}
.avatar-tile {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--blush);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 22px;
}
.month-grid dl {
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
}
.month-grid dt { font-size: 12px; color: var(--ink-soft); }
.month-grid dd { margin: 0; font-weight: 700; }
.card-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}
.card-actions a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-size: 15px;
    font-weight: 600;
}
.card-actions a svg { width: 14px; height: 14px; }
.card-actions .is-fill { background: var(--ink); color: #fff; border-color: var(--ink); }

.spark {
    height: 120px;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding-top: 10px;
}
.spark i {
    flex: 1;
    background: #7dce8a;
    border-radius: 6px 6px 2px 2px;
    min-height: 8px;
}

.flash-ok {
    margin: 0 0 14px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #eef7ee;
    color: #3d7044;
    font-size: 13px;
    font-weight: 600;
}
.flash-err {
    margin: 0 0 14px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #fff1f0;
    color: #a14a46;
    font-size: 13px;
    font-weight: 600;
}

.work-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 16px;
}
.work-head > div:first-child { min-width: 0; flex: 1; }
.work-head > a,
.work-head > .ghost-link,
.work-head > .row-go {
    flex: 0 0 auto;
    margin-top: 28px;
    white-space: nowrap;
}
.work-head h1 { margin: 4px 0 6px; font-size: 36px; overflow-wrap: anywhere; }
.work-head p { margin: 0; color: var(--ink-soft); font-size: 16px; max-width: 72ch; }
.work-head .kicker a { color: var(--clay-deep); }
.work-head .head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    margin-top: 28px;
}
.work-head .head-actions .ghost-link {
    white-space: nowrap;
}
.work-head > .work-search {
    margin-top: 28px;
    flex-shrink: 0;
    min-width: 0;
}
.work-head .head-actions .work-search {
    margin-top: 0;
    flex-shrink: 0;
    min-width: 0;
}
.work-head .head-actions .work-search input {
    min-width: 180px;
    width: min(260px, 100%);
}

.cust-add-panel {
    display: none;
    margin-bottom: 18px;
    padding: 24px 26px 26px;
}
.cust-add-panel.is-open { display: block; }
.cust-add-panel h2 { margin: 0 0 18px; font-size: 22px; }
.cust-add-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 28px;
    align-items: end;
}
.cust-add-form label {
    display: grid;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
}
.cust-add-form input {
    min-height: 50px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 16px;
    background: #fff;
}
.cust-add-form .ghost-link {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: 6px;
}

.work-search {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}
.work-search input {
    min-height: 46px;
    min-width: 0;
    flex: 1 1 160px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 12px;
    background: var(--field);
    color: var(--ink);
}
.work-search button {
    min-height: 46px;
    padding: 0 16px;
    border-radius: 12px;
    background: var(--ink);
    color: var(--paper);
    font-weight: 700;
}

.work-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.work-tabs a {
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    display: inline-flex;
    align-items: center;
    font-size: 15px;
    font-weight: 600;
}
.work-tabs a.is-on {
    background: var(--ink);
    color: #fff;
    border-color: var(--ink);
}

.table-card { overflow: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.work-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}
.work-table th,
.work-table td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid var(--line);
    vertical-align: top;
    overflow-wrap: break-word;
}
.work-table .pill { white-space: nowrap; overflow-wrap: normal; }
.work-table th {
    font-size: 13px;
    color: var(--ink-soft);
    font-weight: 600;
}
.work-table small {
    display: block;
    margin-top: 3px;
    color: var(--ink-soft);
    font-size: 12px;
}
.table-code { font-weight: 700; }
.row-go {
    display: inline-flex;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    background: var(--paper);
    font-size: 14px;
    font-weight: 700;
    align-items: center;
    border: 0;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
    text-decoration: none;
}
.row-go.is-danger { color: #9a3b32; }
.row-go:disabled { opacity: 0.4; cursor: default; }
.row-ops { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.check-line {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-weight: 650;
}
.plugin-grid { display: grid; gap: 12px; }
.plugin-help, .plugin-url, .plugin-extra .muted { color: var(--muted, #6b6570); font-size: 13px; line-height: 1.5; }
.plugin-url code, .plugin-extra code { font-size: 12px; word-break: break-all; }
.plugin-url { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.plugin-extra { margin-top: 14px; }
.cargo-firms { display: grid; gap: 10px; margin: 8px 0 12px; }
.cargo-firm {
    display: grid;
    grid-template-columns: 132px minmax(160px, 0.9fr) minmax(220px, 1.4fr) auto;
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #faf8f6;
}
.cargo-firm label { margin: 0; }
.cargo-firm-logo { display: grid; gap: 8px; align-content: start; }
.cargo-logo-preview {
    width: 72px;
    height: 72px;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    display: grid;
    place-items: center;
}
.cargo-logo-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.cargo-firm-logo input[type="file"] { font-size: 13px; }
@media (max-width: 720px) {
    .cargo-firm { grid-template-columns: 1fr; }
}
.plugin-logs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plugin-logs li { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.plugin-card {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow);
}
.plugin-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.home-row { padding: 16px 18px; margin-bottom: 10px; }
.home-row.is-drag { opacity: 0.55; }
.home-row-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.home-row-top strong { flex: 1; }
.home-row-drag {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    color: var(--ink-soft);
    cursor: grab;
    background: #f6f0ea;
}
.home-row-drag:active { cursor: grabbing; }
.home-row-drag svg { width: 16px; height: 16px; pointer-events: none; }
.home-row-ops { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.space-card { margin-bottom: 16px; }
.space-card h2 { margin: 0 0 8px; }
.space-ctrl {
    display: flex;
    align-items: center;
    gap: 12px;
}
.space-ctrl input[type="range"] {
    flex: 1;
    min-height: 0;
    height: 28px;
    padding: 0;
    accent-color: var(--clay);
}
.space-ctrl output {
    min-width: 56px;
    font-variant-numeric: tabular-nums;
    color: var(--ink-soft);
    font-weight: 700;
    font-size: 14px;
}
.space-minis {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-left: auto;
    align-items: center;
}
.space-mini {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin-left: 0;
    font-size: 13px;
    font-weight: 650;
}
.space-mini input {
    width: 92px;
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 4px 8px;
    font: inherit;
}
.ticket-thread { display: grid; gap: 10px; margin: 14px 0; }
.ticket-msg.is-admin { border-left: 3px solid var(--clay); }
.ticket-msg.is-member { border-left: 3px solid var(--ink); }
a.market-card { text-decoration: none; color: inherit; }

.pill {
    display: inline-flex;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    align-items: center;
    background: #eef7ee;
    color: #3d7044;
}
.pill.is-lg { min-height: 34px; padding: 0 14px; }
.pill.is-new { background: #eef2ff; color: #4d5db8; }
.pill.is-pack { background: #fff4d8; color: #8a6a20; }
.pill.is-ship { background: #e8f6ee; color: #2f7a4a; }
.pill.is-done { background: #e8f1f6; color: #3d6580; }
.pill.is-cancel { background: #fff1f0; color: #a14a46; }
.dot.is-done { background: #6aa3c7; }
.dot.is-cancel { background: #d27a74; }

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.7fr);
    gap: 16px;
    align-items: start;
}
.detail-grid > * { min-width: 0; }
.detail-side { display: grid; gap: 16px; align-content: start; overflow: visible; }
.detail-grid h2,
.table-card h2 { margin: 0 0 12px; font-size: 20px; }
.side-name { margin: 0 0 8px; font-weight: 700; }

.lines { list-style: none; margin: 0; padding: 0; }
.lines li {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    align-items: center;
}
.lines img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 12px;
    background: var(--paper);
}
.lines p { margin: 4px 0 0; color: var(--ink-soft); font-size: 13px; }

.totals { margin: 12px 0 0; }
.totals div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid var(--line);
}
.totals dt { color: var(--ink-soft); }
.totals dd { margin: 0; font-weight: 700; }

.status-form { display: grid; gap: 10px; }
.status-form label { display: grid; gap: 6px; font-size: 15px; font-weight: 600; }
.status-form [hidden] { display: none !important; }
.status-form select {
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 10px;
}
.status-form button,
.ghost-link.is-slim {
    min-height: 46px;
    font-size: 15px;
    border-radius: 12px;
    background: var(--clay);
    color: #fff;
    font-weight: 700;
}
.ghost-link.is-slim {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    margin-top: 12px;
}

.palette-form { display: grid; gap: 18px; justify-items: stretch; }
.palette-form > .ghost-link { justify-self: start; }
.palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
    gap: 12px;
    width: 100%;
}
.palette {
    position: relative;
    display: grid;
    gap: 8px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    cursor: pointer;
}
.palette.is-on,
.palette:has(input:checked) {
    border-color: var(--ink);
    box-shadow: var(--shadow);
}
.palette input { position: absolute; opacity: 0; pointer-events: none; }
.palette i {
    width: 100%;
    height: 54px;
    border-radius: 12px;
}
.palette span { color: var(--ink-soft); font-size: 12px; }
.palette-duo {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 4px;
    min-height: 54px;
}
.palette-duo i { height: 54px; }
.palette-mixer {
    display: grid;
    gap: 16px;
    padding: 20px;
    overflow: visible;
}
.palette-mixer h2 { margin: 0 0 6px; font-size: 22px; }
.palette-group { display: grid; gap: 12px; }
.palette-group h3 {
    margin: 4px 0 0;
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.palette-live [data-live-rose],
.palette-live [data-live-gold],
.palette-live [data-live-danger] { font-size: 13px; font-weight: 650; }
.palette-mixer-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    gap: 14px;
    align-items: end;
}
.palette-mixer-row label { display: grid; gap: 8px; font-weight: 600; }
.palette-mixer-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}
.palette-pick { display: grid; gap: 10px; }
.palette-pick strong { font-size: 14px; }
.color-pick {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}
.color-pick input[type="color"] {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    pointer-events: none;
}
.rgb-open {
    width: 56px;
    height: 56px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--field);
    cursor: pointer;
    flex: 0 0 auto;
}
.rgb-open i {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 10px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}
.rgb-pop {
    position: absolute;
    z-index: 40;
    top: calc(100% + 8px);
    left: 0;
    width: 268px;
    padding: 12px;
    border-radius: 16px;
    background: var(--card);
    border: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(44, 38, 34, 0.16);
}
.rgb-pop[hidden] { display: none !important; }
.rgb-sv {
    position: relative;
    height: 132px;
    border-radius: 10px;
    overflow: hidden;
    cursor: crosshair;
    background: #f00;
}
.rgb-sv::before,
.rgb-sv::after {
    content: "";
    position: absolute;
    inset: 0;
}
.rgb-sv::before { background: linear-gradient(to right, #fff, transparent); }
.rgb-sv::after { background: linear-gradient(to top, #000, transparent); }
.rgb-sv-thumb {
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
}
.rgb-tools {
    display: grid;
    grid-template-columns: 28px 28px 1fr;
    gap: 10px;
    align-items: center;
    margin: 12px 0;
}
.rgb-drop,
.rgb-preview {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: #fff;
    padding: 0;
    display: grid;
    place-items: center;
    color: var(--ink);
}
.rgb-drop svg { width: 16px; height: 16px; }
.rgb-hue {
    position: relative;
    height: 12px;
    border-radius: 99px;
    background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
    cursor: pointer;
}
.rgb-hue i {
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.28);
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.rgb-channels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.rgb-channels label {
    display: grid;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--ink-soft);
}
.rgb-channels input {
    min-height: 36px;
    width: 100%;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    text-align: center;
    font-weight: 650;
}
.color-pick input[type="text"] {
    flex: 1;
    min-height: 56px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--field);
    color: var(--ink);
    text-transform: lowercase;
    letter-spacing: 0.04em;
    font-weight: 650;
}
.product-form .rgb-open {
    width: 42px;
    height: 42px;
    min-height: 42px;
    padding: 3px;
    border-radius: 12px;
}
.product-form .color-pick input[type="text"] {
    min-height: 42px;
    text-transform: lowercase;
}
.swatch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(28px, 1fr));
    gap: 6px;
}
.swatch {
    width: 100%;
    aspect-ratio: 1;
    min-height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(61, 52, 47, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.swatch.is-on {
    outline: 2px solid var(--ink);
    outline-offset: 2px;
}
.palette-live {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding: 14px 4px 4px;
}
.palette-live-stage {
    flex: 1 1 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--line);
}
.palette-live-empty {
    flex: 1 1 100%;
    text-align: center;
    padding: 18px 16px;
    border-radius: 16px;
    background: #fffdfb;
    border: 1px dashed rgba(61, 52, 47, 0.16);
}
.palette-live-empty strong { display: block; font-size: 16px; }
.palette-live-empty small { color: var(--ink-soft); font-size: 13px; }
.palette-live-bar {
    flex: 1 1 100%;
    text-align: center;
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--clay);
    color: #3d342f;
    font-size: 13px;
    font-weight: 650;
}
.palette-live [data-live-btn] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--clay);
    color: #fff;
    font-weight: 650;
}
.palette-live [data-live-link] {
    color: var(--clay-deep);
    font-weight: 650;
}
.palette-live [data-live-head] {
    font-family: var(--font-heading);
    font-size: 22px;
}

.font-form { display: grid; gap: 18px; }
.font-form > .ghost-link { justify-self: start; }
.font-stage { padding: 22px; display: grid; gap: 8px; }
.font-stage .kicker { margin: 0; }
.font-stage h2 { margin: 0; font-size: 32px; }
.font-stage p { margin: 0; color: var(--ink-soft); max-width: 62ch; }
.font-stage-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 8px;
}
.font-stage-row [data-live-btn] {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--clay);
    color: #fff;
    font-weight: 650;
}
.font-block { display: grid; gap: 16px; padding: 20px; }
.font-block h2 { margin: 0 0 4px; font-size: 22px; }
.font-block h3 { margin: 0 0 10px; font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-soft); }
.font-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.font-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
}
.font-card {
    position: relative;
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
}
.font-card.is-on { border-color: var(--ink); box-shadow: var(--shadow); }
.font-card input { position: absolute; opacity: 0; pointer-events: none; }
.font-card strong { font-size: 16px; }
.font-card .font-sample {
    display: flex;
    gap: 12px;
    color: var(--ink);
    font-size: 14px;
}
.font-card .font-sample b { font-weight: 700; }
.font-card .font-sample em { font-style: italic; font-weight: 400; }
.font-card.is-head strong { font-size: 18px; }

.work-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.work-filters input,
.work-filters select {
    min-height: 46px;
    min-width: 0;
    max-width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 12px;
    font-size: 15px;
}
.work-filters button {
    min-height: 46px;
    padding: 0 16px;
    font-size: 15px;
    border-radius: 12px;
    background: var(--ink);
    color: var(--paper);
    font-weight: 700;
}
.product-filters {
    align-items: flex-end;
}
.product-filters input[type="search"] {
    flex: 1 1 220px;
    min-width: 180px;
}
.product-filters .filter-num {
    display: grid;
    gap: 4px;
    font-size: 12px;
    font-weight: 650;
    color: var(--ink-soft);
}
.product-filters .filter-num input {
    width: 100%;
    min-width: 0;
    max-width: 140px;
}
.content-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 10px;
    background: var(--paper);
}
.content-cover {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 10px;
}
.prod-cell { display: flex; gap: 10px; align-items: center; }
.prod-cell img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 10px;
    background: var(--paper);
}
.row-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.work-table .row-actions { flex-wrap: wrap; white-space: normal; }
.table-toolbar { padding: 10px 10px 0; }
.product-form .field-block,
.product-form label,
.status-form label {
    display: grid;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 10px;
}
.orvia-editor {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: var(--field);
    color: var(--ink);
}
.orvia-editor-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}
.orvia-editor-bar span {
    width: 1px;
    background: var(--line);
    margin: 4px 4px;
}
.orvia-editor-bar button {
    min-height: 30px;
    min-width: 30px;
    padding: 0 8px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 700;
    color: var(--ink);
}
.orvia-editor-bar button:hover,
.orvia-editor-bar button.is-on {
    background: #fff;
    border-color: var(--line);
}
.orvia-editor-view {
    min-height: 280px;
    padding: 14px 16px;
    outline: none;
    line-height: 1.55;
    cursor: text;
    user-select: text;
    -webkit-user-select: text;
    color: var(--ink);
    background: var(--field);
    position: relative;
}
.orvia-editor-view img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    pointer-events: auto !important;
    cursor: pointer;
}
.orvia-editor-view a {
    pointer-events: auto !important;
    cursor: pointer;
}
.orvia-editor-view input,
.orvia-editor-view textarea,
.orvia-editor-view select,
.orvia-editor-view button,
.orvia-editor-view .comparison-range,
.orvia-editor-view .comparison-handle,
.orvia-editor-view .comparison-divider {
    pointer-events: none !important;
}
.orvia-editor-view .orvia-hot {
    outline: 2px solid #c9a227 !important;
    outline-offset: 2px;
    cursor: pointer !important;
    box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.18);
    position: relative;
    z-index: 2;
}
.orvia-editor-view a.orvia-hot {
    text-decoration-thickness: 2px;
}
.orvia-editor-pop textarea {
    min-height: 88px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 10px;
    color: var(--ink);
    background: var(--field, #fff);
    resize: vertical;
    font: inherit;
}
.orvia-editor-tip {
    position: absolute;
    z-index: 30;
    pointer-events: none;
    transform: translate(-50%, -110%);
    padding: 5px 10px;
    border-radius: 999px;
    background: #1f1a17;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}
.orvia-editor-tip[hidden] { display: none !important; }
.orvia-editor-pop {
    position: absolute;
    z-index: 40;
    width: min(320px, calc(100% - 24px));
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--paper, #fff);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
    display: grid;
    gap: 8px;
}
.orvia-editor-pop[hidden] { display: none !important; }
.orvia-editor-pop strong {
    font-size: 13px;
}
.orvia-editor-pop label {
    display: grid;
    gap: 4px;
    font-size: 12px;
    color: var(--soft, #7d716a);
}
.orvia-editor-pop input {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 6px 10px;
    color: var(--ink);
    background: var(--field, #fff);
}
.orvia-editor-pop .orvia-pop-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 4px;
}
.orvia-editor-pop .orvia-pop-actions button {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    font-size: 12px;
    font-weight: 700;
}
.orvia-editor-pop .orvia-pop-actions button[data-ok] {
    background: #1f1a17;
    color: #fff;
    border-color: #1f1a17;
}
.orvia-editor-view pre,
.orvia-editor-source {
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    background: #f7f4f1;
    padding: 10px;
    border-radius: 8px;
    overflow: auto;
}
.orvia-editor.is-source .orvia-editor-source {
    display: block !important;
    width: 100%;
    min-height: 280px;
    border: 0;
    resize: vertical;
}
.orvia-editor-view table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}
.orvia-editor-view th,
.orvia-editor-view td {
    border: 1px solid var(--line);
    padding: 6px 8px;
    text-align: left;
}

.product-form input,
.product-form select,
.product-form textarea,
.status-form input,
.status-form select,
.status-form textarea {
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px 12px;
    font: inherit;
    font-size: 15px;
    background: var(--field);
    color: var(--ink);
}
.space-card .space-ctrl input[type="range"] {
    min-height: 0;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 0;
    accent-color: var(--clay);
}
.form-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.promo-code-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    align-items: center;
}
.promo-code-row .row-go {
    min-height: 46px;
    padding: 0 14px;
    white-space: nowrap;
}
.promo-form select[multiple] {
    min-height: 148px;
    padding-top: 8px;
}
.promo-form .media-hint { font-weight: 500; }
.form-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.block-add-row {
    display: flex;
    justify-content: flex-start;
    margin: 4px 0 14px;
}
.block-add-row .ghost-link {
    min-height: 42px;
    padding: 0 16px;
}
.block-composer {
    margin: 0 0 18px;
    padding: 14px 14px 6px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #faf7f2;
}
.block-composer-title {
    display: block;
    margin: 0 0 6px;
    font-size: 15px;
}
.block-composer .media-hint {
    margin-top: 0;
}
.block-composer .flash-err {
    margin: 0 0 10px;
}
.slide-edit {
    margin: 0 0 16px;
    padding: 12px 0 4px;
    border-top: 1px solid var(--line);
}
.slide-preview.is-mobile {
    max-width: 160px;
    outline: 1px dashed rgba(28, 22, 16, 0.18);
}
.slide-preview.is-mobile::before {
    content: "Mobil";
    display: block;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--ink-soft, #7a716a);
}
.slide-preview {
    margin: 0 0 10px;
    border-radius: 12px;
    overflow: hidden;
    background: #f4eee4;
}
.slide-preview img,
.slide-preview video {
    display: block;
    width: 100%;
    height: auto;
    max-height: 220px;
    object-fit: contain;
    background: #f4eee4;
}
.slide-edit h3,
.product-form h3 {
    margin: 0 0 10px;
    font-size: 16px;
}
.story-type-grid {
    margin: 0 0 18px;
}
.story-type-grid .palette {
    position: relative;
}
.story-type-grid .palette:has(input:checked) {
    border-color: var(--ink);
    box-shadow: var(--shadow);
}
.story-type-demo {
    width: 56px;
    height: 56px;
    padding: 3px;
    background: conic-gradient(from 140deg, var(--gold, #e4c39a), var(--clay), var(--rose, #c9897c), var(--gold, #e4c39a));
    display: grid;
    place-items: center;
}
.story-type-demo::after {
    content: "";
    width: 100%;
    height: 100%;
    background: #ead8d0;
    border: 3px solid #fff;
}
.story-type-demo.is-square,
.story-type-demo.is-square::after { border-radius: 16px; }
.story-type-demo.is-round,
.story-type-demo.is-round::after { border-radius: 50%; }
.hero-type-grid .palette {
    position: relative;
}
.hero-type-grid .palette:has(input:checked) {
    border-color: var(--ink);
    box-shadow: var(--shadow);
}
.hero-type-demo {
    width: 100%;
    height: 54px;
    display: grid;
    gap: 5px;
    align-items: stretch;
}
.hero-type-demo span {
    display: block;
    min-height: 0;
    background: #ead8d0;
}
.hero-type-demo.is-classic {
    grid-template-columns: 1fr;
}
.hero-type-demo.is-classic span:first-child {
    border-radius: 12px;
    background: linear-gradient(90deg, #ead8d0, #c9897c 55%, #e4c39a);
}
.hero-type-demo.is-classic span:nth-child(n+2) { display: none; }
.hero-type-demo.is-peek {
    grid-template-columns: 10px 1fr 10px;
}
.hero-type-demo.is-peek span { border-radius: 8px; }
.hero-type-demo.is-peek span:nth-child(2) {
    background: linear-gradient(90deg, #e4c39a, #c9897c);
}
.hero-type-demo.is-wide {
    grid-template-columns: 1.4fr 1fr 0.9fr;
    grid-template-rows: 1fr 1fr;
    position: relative;
}
.hero-type-demo.is-classic span:nth-child(4),
.hero-type-demo.is-peek span:nth-child(4) {
    display: none;
}
.hero-type-demo.is-wide span {
    border-radius: 6px;
}
.hero-type-demo.is-wide span:first-child {
    grid-row: 1 / span 2;
    background: linear-gradient(180deg, #d07d6e, #ead8d0);
}
.hero-type-demo.is-wide span:nth-child(2) {
    grid-row: 1 / span 2;
    background: #c9897c;
}
.hero-type-demo.is-wide span:nth-child(3) {
    background: #e4c39a;
}
.hero-type-demo.is-wide span:nth-child(4) {
    background: #ead8d0;
}
.story-edit-previews {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin: 0 0 12px;
}
.story-edit-previews img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 22px;
    background: #f4eee4;
}
.story-edit-previews.is-round img { border-radius: 50%; }
.story-edit-previews .is-cover {
    width: 100%;
    height: 88px;
    border-radius: 12px;
}
.orvia-code {
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}
.orvia-code-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding: 8px;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
}
.orvia-code-bar span {
    font-size: 12px;
    font-weight: 700;
    margin-right: 6px;
}
.orvia-code-bar button {
    min-height: 30px;
    padding: 0 10px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: #fff;
    font-size: 12px;
    font-weight: 700;
}
.orvia-code textarea,
textarea[data-orvia-code] {
    min-height: 420px;
    width: 100%;
    border: 0;
    border-radius: 0;
    resize: vertical;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.5;
    background: #f7f4f1;
    cursor: text;
    user-select: text;
    -webkit-user-select: text;
}
.media-hint { margin: 0 0 12px; color: var(--ink-soft); font-size: 13px; }
.gallery-list {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    min-height: 88px;
}
.gallery-tile {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: var(--paper);
    cursor: grab;
}
.gallery-tile.is-drag { opacity: 0.45; }
.gallery-tile.is-cover { border-color: var(--ink); }
.gallery-tile img { width: 100%; height: 110px; object-fit: cover; display: block; }
.gallery-cover {
    display: none;
    position: absolute;
    left: 8px;
    bottom: 8px;
    background: var(--ink);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    font-style: normal;
    padding: 3px 8px;
    border-radius: 999px;
}
.gallery-tile.is-cover .gallery-cover { display: inline-flex; }
.gallery-del {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--line);
    font-size: 16px;
    line-height: 1;
}
.gallery-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}
.gallery-upload { position: relative; overflow: hidden; }
.gallery-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.gallery-tools select {
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 10px;
    font: inherit;
}
.gallery-drop {
    border: 1px dashed var(--line);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
    color: var(--ink-soft);
    font-size: 13px;
}
.gallery-drop.is-over { border-color: var(--ink); background: var(--blush); }
@media (max-width: 860px) {
    .gallery-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.media-pick {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}
.media-pick label {
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}
.media-pick label.is-on { border-color: var(--ink); }
.media-pick input { position: absolute; opacity: 0; }
.media-pick img { height: 64px; width: 100%; object-fit: cover; }
.check-row { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 12px; }
.check {
    display: inline-flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}
.detail-side.is-wide { display: grid; gap: 16px; }
.mini-face {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--blush);
    display: grid;
    place-items: center;
    font-weight: 700;
    flex: 0 0 auto;
}
.cust-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.bulk-confirm { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.bulk-confirm input {
    min-height: 32px;
    width: 90px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 8px;
}
.bulk-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}
.bulk-grid .card { padding: 16px 18px; }
.bulk-grid h2 { margin: 0 0 8px; font-size: 20px; }
.bulk-grid p { color: var(--ink-soft); font-size: 13px; margin: 0 0 12px; }
.csv-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.csv-form input[type="file"] { font-size: 13px; }
.bulk-ops { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 14px 14px 8px; }
.bulk-count {
    margin: 0 auto 8px 0;
    font-weight: 700;
    font-size: 14px;
    color: var(--clay-deep);
    align-self: center;
}
.bulk-count[hidden] { display: none !important; }
.pazarlama-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px 8px;
}
.option-add,
.option-add-value {
    display: flex;
    gap: 8px;
    min-width: 0;
    margin-bottom: 16px;
}
.option-add input,
.option-add-value input {
    flex: 1;
    min-width: 0;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 12px;
    background: var(--field);
    color: var(--ink);
}
.option-add button,
.option-add-value button {
    flex: 0 0 auto;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 12px;
    background: var(--ink);
    color: var(--paper);
    font-weight: 700;
}
.option-add-value { margin: 0; }
.option-add-value input,
.option-add-value button { min-height: 42px; }
.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    align-items: start;
}
.option-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    overflow: hidden;
}
.option-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}
.option-card-head h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.25;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}
.option-values {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
    min-height: 8px;
}
.option-values li {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    padding: 6px 6px 6px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--paper);
    font-size: 14px;
    font-weight: 600;
}
.option-chip-del {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--ink-soft);
    font-size: 16px;
    line-height: 1;
}
.option-chip-del:hover { background: var(--blush); color: var(--ink); }
.bulk-ops label {
    display: grid;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
}
.bulk-ops select,
.bulk-ops input[type="text"] {
    min-height: 38px;
    min-width: 160px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 10px;
    font: inherit;
}
.bulk-field.is-hide { display: none; }
@media (max-width: 860px) {
    .bulk-grid { grid-template-columns: 1fr; }
}

.cust-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}
.cust-actions a,
.cust-actions button {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    font-weight: 600;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
}

.wait-card { max-width: 640px; }
.wait-card h1 { margin-top: 6px; }
.wait-card p { margin: 10px 0 18px; }
.return-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.stat-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 12px;
    display: grid;
    gap: 4px;
    min-width: 0;
}
.stat-card strong { font-size: 28px; font-family: var(--font-heading); overflow-wrap: anywhere; }
.stat-card span { color: var(--ink-soft); font-size: 12px; font-weight: 600; }
.stat-card.is-on { border-color: var(--ink); }
.history { list-style: none; margin: 0; padding: 0; }
.history li {
    padding: 10px 0;
    border-top: 1px solid var(--line);
}
.history small { display: block; margin-top: 4px; color: var(--ink-soft); }
@media (max-width: 980px) {
    .return-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media print {
    .admin-side, .admin-top, .admin-veil, .work-filters, .cust-actions, .side-sub { display: none !important; }
    .admin-app { grid-template-columns: 1fr; }
    .admin-page { padding: 0; }
}

.ghost-link {
    display: inline-flex;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--clay);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    align-items: center;
    border: 0;
    cursor: pointer;
}
.ghost-link.is-fill { background: var(--ink); }

.market-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}
.market-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow);
}
.market-lead { display: flex; align-items: center; gap: 14px; }
.market-lead h2 { margin: 0 0 4px; font-size: 20px; }
.market-lead p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.market-ico {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--blush);
    color: var(--ink);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.market-ico.is-mail { background: #eef4f8; }
.market-ico svg { width: 22px; height: 22px; }
.market-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2f7a4a;
    margin: 0 4px 0 8px;
    vertical-align: middle;
}
.market-form-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.market-form-head strong { display: block; }
.market-form-head p { margin: 2px 0 0; color: var(--ink-soft); font-size: 13px; font-weight: 400; }
.market-form-head .pill { margin-left: auto; }
.market-form .muted { color: var(--ink-soft); font-size: 13px; margin: 0 0 16px; }
.market-form small { font-weight: 500; color: var(--ink-soft); }
.market-audience {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px;
    margin: 0 0 16px;
}
.market-audience legend { font-size: 13px; font-weight: 700; padding: 0 6px; }
.market-form .pick-opt {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 8px;
    border-radius: 12px;
    margin-bottom: 0;
}
.pick-opt strong { display: block; }
.pick-opt small { display: block; font-weight: 500; color: var(--ink-soft); }
.pick-opt input { margin-top: 4px; }
.market-pick { margin-top: 8px; }
.market-pick input[type="search"] {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 12px;
    margin-bottom: 8px;
}
.pick-list {
    max-height: 240px;
    overflow: auto;
    display: grid;
    gap: 4px;
}
.market-form .pick-list label {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 10px;
    padding: 8px 10px;
    border-radius: 10px;
    margin: 0;
}
.pick-list label small { grid-column: 2; }
.pick-list label:hover { background: var(--paper); }
.market-detail-top {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
}
.market-detail-top strong { display: block; font-size: 18px; margin-bottom: 8px; }
.market-detail-top p { margin: 0; color: var(--ink-soft); }
.market-meta {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}
.market-meta div {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
}
.market-meta dt { margin: 0; color: var(--ink-soft); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.market-meta dd { margin: 4px 0 0; font-weight: 700; }
.table-toolbar strong { display: block; }
.table-toolbar span { color: var(--ink-soft); font-size: 13px; }

.admin-login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: var(--paper);
}
.login-wrap { width: min(440px, calc(100% - 32px)); }
.login-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 32px 28px;
    box-shadow: var(--shadow);
}
.login-card h1 { margin: 8px 0 8px; font-size: 32px; }
.login-card > p { color: var(--ink-soft); }
.login-kicker {
    margin: 22px 0 0;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--clay-deep);
    font-weight: 700;
}
.login-card form { display: grid; gap: 12px; margin-top: 18px; }
.login-card label { display: grid; gap: 6px; font-size: 15px; font-weight: 600; }
.login-card input {
    min-height: 50px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 12px;
}
.login-card button {
    min-height: 52px;
    font-size: 16px;
    border-radius: 12px;
    background: var(--clay);
    color: #fff;
    font-weight: 700;
}
.login-error {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff1f0;
    color: #a14a46;
    font-size: 13px;
}
.login-hint { margin-top: 14px; font-size: 13px; }
.login-back { display: inline-block; margin-top: 8px; color: var(--clay-deep); font-weight: 600; }

.admin-veil {
    position: fixed;
    inset: 0;
    background: rgba(61, 52, 47, 0.28);
    z-index: 30;
}

@media (max-width: 1200px) {
    .dash-pair,
    .dash-mid,
    .dash-foot,
    .detail-grid { grid-template-columns: 1fr; }
    .promo { grid-template-columns: 1fr; }
    .palette-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .palette-mixer-row,
    .palette-mixer-cols,
    .font-pair { grid-template-columns: 1fr; }
    .cust-add-form { grid-template-columns: 1fr 1fr; gap: 18px 22px; }
    .market-grid,
    .market-meta { grid-template-columns: 1fr 1fr; }
    .return-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .bulk-grid { grid-template-columns: 1fr; }
    .cargo-firm { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

@media (max-width: 980px) {
    .admin-app { grid-template-columns: 1fr; }
    .admin-side {
        position: fixed;
        left: 0;
        top: 0;
        z-index: 40;
        transform: translateX(-105%);
        transition: transform 0.2s ease;
        width: min(280px, 88vw);
    }
    body.side-open .admin-side { transform: none; }
    .side-collapse,
    html.side-collapsed .side-restore { display: none; }
    html.side-collapsed .admin-side { display: block; }
    .top-menu {
        display: grid;
        width: 40px;
        height: 40px;
        place-items: center;
    }
    .top-menu svg { width: 22px; height: 22px; }
    .top-note { display: none; }
    .stat-row { grid-template-columns: 1fr; }
    .admin-page { padding: 14px; }
    .admin-top { padding: 10px 12px; }
    .work-head { flex-direction: column; align-items: stretch; }
    .work-head > a,
    .work-head > .ghost-link,
    .work-head > .row-go,
    .work-head .head-actions,
    .work-head > .work-search,
    .work-head .head-actions .work-search { margin-top: 0; }
    .work-head .head-actions .work-search,
    .work-head .head-actions .work-search input { width: 100%; }
    .work-search input { min-width: 0; width: 100%; }
    .option-add { max-width: none; }
    .work-head h1 { font-size: 28px; }
    .range-form { width: 100%; }
    .range-form input[type="date"] { max-width: none; }
    .cargo-firm { grid-template-columns: minmax(0, 1fr); }
    .visit-filters input[type="date"] { max-width: none; }
    .cust-add-form { grid-template-columns: 1fr; }
    .form-2,
    .form-3 { grid-template-columns: 1fr; }
    .market-grid,
    .market-card,
    .market-meta { grid-template-columns: 1fr; }
    .market-card { flex-direction: column; align-items: stretch; }
    .plugin-card { flex-direction: column; align-items: stretch; }
    .theme-soon-grid,
    .logo-admin { grid-template-columns: 1fr; }
}

.market-card.is-soon { background: var(--paper); }
.theme-soon-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.theme-soon-card {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow);
}
.theme-soon-card.is-wait { opacity: 0.78; }
.theme-soon-frame {
    display: grid;
    place-items: center;
    height: 120px;
    border-radius: 16px;
    background: var(--blush);
    color: var(--ink-soft);
    font-family: var(--font-heading);
    font-size: 32px;
    margin-bottom: 12px;
}
.theme-soon-card strong { display: block; margin-bottom: 6px; }
.theme-soon-card p { margin: 0 0 12px; color: var(--ink-soft); font-size: 13px; }
.logo-admin {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}
.logo-preview {
    padding: 16px;
    border: 1px dashed var(--line);
    border-radius: 16px;
    margin-bottom: 12px;
    background: var(--paper);
}
.logo-preview .logo { pointer-events: none; }
.fav-preview {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 12px;
    border: 1px solid var(--line);
    margin-bottom: 10px;
}
.code-area { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.link-row { align-items: end; margin-bottom: 8px; }
.bulk-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 0 0 12px;
}
.bulk-bar select {
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0 12px;
}
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
}
.muted { color: var(--ink-soft); font-size: 13px; }
.sys-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.visit-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: 8px 0 0;
    font-size: 13px;
}
.visit-line span { color: var(--ink-soft); }
.visit-filters { min-width: 0; }
.visit-filters input[type="date"] { min-width: 0; flex: 1 1 140px; max-width: 180px; }
.visit-chart { margin: 14px 0; }
.visit-chart h2,
.sys-grid h2,
.table-card h2 { margin: 0 0 12px; font-size: 18px; }
.visit-bars {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 140px;
    overflow-x: auto;
}
.visit-bars div {
    flex: 1;
    min-width: 28px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    height: 100%;
    gap: 6px;
}
.visit-bars span {
    width: 100%;
    max-width: 28px;
    background: var(--clay);
    border-radius: 8px 8px 4px 4px;
    display: block;
}
.visit-bars em { font-size: 10px; color: var(--ink-soft); font-style: normal; }
.visit-pager { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 0 0; }
.visit-pager a {
    min-width: 32px;
    min-height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
}
.visit-pager a.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.note-month-nav,
.note-day-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 0 14px;
}
.note-cal {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 18px;
}
.note-cal-h {
    font-size: 12px;
    font-weight: 700;
    color: var(--ink-soft);
    text-align: center;
    padding: 4px 0;
}
.note-cal-cell {
    min-height: 92px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: inherit;
}
.note-cal-cell.is-empty { background: transparent; border-color: transparent; }
.note-cal-cell.is-today { border-color: var(--clay); box-shadow: 0 0 0 2px rgba(224, 154, 140, 0.25); }
.note-cal-num { font-weight: 700; font-size: 13px; }
.note-pill {
    display: block;
    border-radius: 8px;
    padding: 4px 8px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.note-pill.is-tiny { padding: 2px 6px; font-size: 11px; }
.note-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
    vertical-align: middle;
}
.note-more { font-size: 11px; color: var(--ink-soft); }
.note-week {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 18px;
}
.note-day-col {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px;
    background: #fff;
    min-height: 160px;
}
.note-day-col.is-today { border-color: var(--clay); }
.note-day-col a { color: inherit; }
.note-day-col strong { display: block; }
.note-day-col span { color: var(--ink-soft); font-size: 12px; }
.note-stack { display: grid; gap: 10px; margin-bottom: 16px; }
.note-card {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    color: inherit;
}
.note-card p { margin: 4px 0 0; color: var(--ink-soft); font-size: 13px; }
.add-kinds { margin-bottom: 18px; padding: 18px 20px; }
.kind-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.kind-card {
    border: 1.5px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    background: #fffaf7;
    display: grid;
    gap: 8px;
}
.kind-card p { margin: 0; color: var(--ink-soft); font-size: 13px; }
.pick-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-height: 420px;
    overflow: auto;
    margin: 0 0 12px;
    padding: 4px;
}
.pick-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    padding: 8px;
    background: #fff;
    cursor: pointer;
}
.pick-item img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 10px;
}
.pick-item strong { display: block; font-size: 13px; }
.pick-item small { color: var(--ink-soft); }
.pick-item.is-on { border-color: var(--clay-deep); background: #fffaf7; }
.pick-item input { accent-color: var(--clay-deep); }
.home-pick { display: grid; gap: 14px; margin: 0 0 14px; }
.home-pick.is-order-only .home-pick-order {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    overflow: visible;
    min-height: 0;
    padding: 2px 0 4px;
}
.home-pick.is-order-only .home-pick-chip {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 12px;
    grid-template-areas:
        "media media media"
        "rank copy handle";
    gap: 8px;
    align-items: center;
    width: 100%;
    min-width: 0;
    max-width: none;
    flex: none;
    cursor: grab;
    padding: 10px;
}
.home-pick.is-order-only .home-pick-chip img {
    grid-area: media;
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
}
.home-pick.is-order-only .home-pick-rank { grid-area: rank; }
.home-pick.is-order-only .home-pick-chip-copy { grid-area: copy; }
.home-pick.is-order-only .home-pick-handle { grid-area: handle; }
@media (max-width: 1100px) {
    .home-pick.is-order-only .home-pick-order {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 760px) {
    .home-pick.is-order-only .home-pick-order {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 480px) {
    .home-pick.is-order-only .home-pick-order {
        grid-template-columns: minmax(0, 1fr);
    }
}
.home-pick-chosen {
    border: 1.5px solid var(--line);
    border-radius: 18px;
    padding: 14px;
    background: var(--blush);
    color: var(--ink);
}
.home-pick-chosen-head { display: grid; gap: 4px; margin-bottom: 10px; }
.home-pick-chosen-head span,
.home-pick-empty,
.home-pick-none { color: var(--ink-soft); font-size: 13px; margin: 0; }
.home-pick-order {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    min-height: 92px;
    padding: 4px 2px 8px;
}
.home-pick-chip {
    display: grid;
    grid-template-columns: 22px 12px 72px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-width: 280px;
    max-width: 320px;
    padding: 8px;
    border: 1.5px solid var(--line);
    border-radius: 16px;
    background: var(--card);
    color: var(--ink);
    cursor: grab;
    flex: 0 0 auto;
}
.home-pick-chip.is-drag { opacity: 0.45; }
.home-pick-chip img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
}
.home-pick-rank {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--clay-deep);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.home-pick-handle {
    width: 10px;
    height: 28px;
    background-image: radial-gradient(currentColor 1.2px, transparent 1.4px);
    background-size: 5px 6px;
    opacity: 0.35;
}
.home-pick-chip-copy { min-width: 0; overflow: hidden; }
.home-pick-chip-copy strong,
.home-pick-card strong {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.3;
    color: var(--ink);
}
.home-pick-chip-copy small,
.home-pick-card small {
    display: block;
    margin-top: 4px;
    color: var(--ink-soft);
    font-size: 12px;
}
.home-pick-drop {
    border: 0;
    background: transparent;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
    padding: 4px;
}
.home-pick-search input[type="search"] {
    width: 100%;
    min-height: 44px;
    border: 1.5px solid var(--line);
    border-radius: 14px;
    padding: 0 14px;
    margin-top: 6px;
}
.home-pick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 12px;
    max-height: 560px;
    overflow: auto;
    padding: 4px;
}
.home-pick-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    gap: 0;
    margin: 0;
    padding: 8px;
    border: 1.5px solid var(--line);
    border-radius: 18px;
    background: var(--card);
    cursor: pointer;
    color: var(--ink);
    font: inherit;
}
.home-pick-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 14px;
    background: #f4eee8;
}
.home-pick-card strong { margin-top: 10px; }
.home-pick-card.is-on {
    border-color: var(--clay-deep);
    background: var(--blush);
    box-shadow: inset 0 0 0 1px var(--clay-deep);
}
.home-pick-card:hover { border-color: var(--clay); }
.home-pick-card[hidden] { display: none; }
.source-fields .check-radios { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 12px; }
.source-fields [hidden] { display: none !important; }
.menu-media {
    display: grid;
    gap: 6px;
    justify-items: start;
}
.menu-media img,
.menu-media-preview {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--line);
    margin: 6px 0;
}
.menu-media input[type="file"] { font-size: 12px; max-width: 180px; }
.pay-order {
    list-style: none;
    margin: 0 0 8px;
    padding: 0;
    display: grid;
    gap: 8px;
}
.pay-order li {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--paper);
}
.pay-order .pay-move {
    display: flex;
    gap: 4px;
    margin-left: auto;
}

html.is-dark {
    color-scheme: dark;
    --ink: #f4eee8;
    --ink-soft: #c9bdb4;
    --paper: #161310;
    --card: #221e1b;
    --field: #1a1714;
    --line: #3f372f;
    --blush: #2c2622;
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    background: #161310;
}
html.is-dark body,
html.is-dark .admin-body { background: #161310; color: var(--ink); }
html.is-dark .admin-main { background: var(--paper); }
html.is-dark .top-note { background: #3a3220; color: #e4c39a; }
html.is-dark .top-tools button:hover,
html.is-dark .side-link:hover,
html.is-dark .side-collapse:hover,
html.is-dark .side-restore:hover { background: #2c2723; }
html.is-dark .pay-order li,
html.is-dark .palette,
html.is-dark .font-card,
html.is-dark .market-card,
html.is-dark .stat-card,
html.is-dark .list-card,
html.is-dark .table-card,
html.is-dark .orvia-editor-bar { background: var(--card); color: var(--ink); }
html.is-dark .orvia-editor,
html.is-dark .orvia-editor-view,
html.is-dark .orvia-editor-source,
html.is-dark .orvia-editor-view pre { background: var(--field); color: var(--ink); }
html.is-dark .orvia-editor-bar button { color: var(--ink); }
html.is-dark .orvia-editor-bar button:hover,
html.is-dark .orvia-editor-bar button.is-on { background: var(--field); border-color: var(--line); }
html.is-dark .orvia-editor-pop { background: var(--card); }
html.is-dark .orvia-editor-pop input { background: var(--field); }
html.is-dark input,
html.is-dark select,
html.is-dark textarea {
    background: var(--field);
    color: var(--ink);
    border-color: var(--line);
}
html.is-dark .range-bar,
html.is-dark .range-chip {
    background: var(--card);
    color: var(--ink);
    border-color: var(--line);
}
html.is-dark .range-chip.is-on {
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
}
html.is-dark input[type="date"],
html.is-dark input[type="datetime-local"],
html.is-dark input[type="time"],
html.is-dark input[type="month"] {
    color-scheme: dark;
    background: var(--field);
    color: var(--ink);
    caret-color: var(--ink);
}
html.is-dark input[type="date"]::-webkit-datetime-edit,
html.is-dark input[type="date"]::-webkit-datetime-edit-fields-wrapper,
html.is-dark input[type="date"]::-webkit-datetime-edit-text,
html.is-dark input[type="date"]::-webkit-datetime-edit-month-field,
html.is-dark input[type="date"]::-webkit-datetime-edit-day-field,
html.is-dark input[type="date"]::-webkit-datetime-edit-year-field,
html.is-dark input[type="datetime-local"]::-webkit-datetime-edit,
html.is-dark input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper,
html.is-dark input[type="datetime-local"]::-webkit-datetime-edit-text,
html.is-dark input[type="datetime-local"]::-webkit-datetime-edit-month-field,
html.is-dark input[type="datetime-local"]::-webkit-datetime-edit-day-field,
html.is-dark input[type="datetime-local"]::-webkit-datetime-edit-year-field,
html.is-dark input[type="datetime-local"]::-webkit-datetime-edit-hour-field,
html.is-dark input[type="datetime-local"]::-webkit-datetime-edit-minute-field {
    color: var(--ink);
}
html.is-dark input[type="date"]::-webkit-calendar-picker-indicator,
html.is-dark input[type="datetime-local"]::-webkit-calendar-picker-indicator,
html.is-dark input[type="time"]::-webkit-calendar-picker-indicator,
html.is-dark input[type="month"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.85;
}
html.is-dark .work-tabs a.is-on {
    background: #f4eee8;
    color: #1c1917;
    border-color: #f4eee8;
}
html.is-dark .row-go {
    border-color: var(--line);
    color: var(--ink);
    background: var(--card);
}
html.is-dark .ghost-link { color: #fff; }
html.is-dark .ghost-link.is-fill {
    background: #f4eee8;
    color: #1c1917;
    border-color: #f4eee8;
}
html.is-dark .work-filters input,
html.is-dark .work-filters select,
html.is-dark .work-filters button,
html.is-dark .cust-actions a,
html.is-dark .cust-actions button {
    background: var(--card);
    color: var(--ink);
    border-color: var(--line);
}
html.is-dark .home-pick-search input,
html.is-dark .rgb-channels input { background: var(--field); color: var(--ink); }
html.is-dark .palette-live-stage,
html.is-dark .palette-live-empty { background: var(--field); color: var(--ink); border-color: var(--line); }
@media (max-width: 860px) {
    .sys-grid,
    .note-cal,
    .note-week,
    .kind-grid,
    .pick-list { grid-template-columns: 1fr; }
    .note-cal-h { display: none; }
}
