/* =====================================================
   NUMB STUDIO — ADMIN PAGES
   ===================================================== */
:root {
    /* ===== ADMIN LOGIN BACKGROUND: change this path to use another image ===== */
    --admin-bg: url("../img/bg-img/admin-bg.jpg");

    --gold: #d4af5f;
    --brown: #3c2405;
    --brown-deep: #2a1708;
    --cream: #f3ebe1;
    --card: rgba(24, 24, 24, .94);
    --line: #3a3a3a;
    --muted: #a3a3a3;
    --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); }

/* =====================================================
   LOGIN / REGISTER (Tinyauth-style card)
   ===================================================== */
body.admin-auth {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 70px 16px 40px;
    background: #1d2a1d var(--admin-bg) center / cover no-repeat fixed;
    color: #f2f2f2;
}
.auth-back {
    position: fixed;
    top: 16px;
    right: 16px;
    padding: 8px 14px;
    border-radius: 8px;
    background: rgba(17, 17, 17, .9);
    color: #f2f2f2;
    font-size: 13px;
    text-decoration: none;
    transition: background 200ms;
}
.auth-back:hover { background: #000; }

.auth-card {
    width: 100%;
    max-width: 380px;
    padding: 28px 24px 24px;
    border-radius: 12px;
    background: var(--card);
    box-shadow: 0 24px 60px rgba(0, 0, 0, .45);
    backdrop-filter: blur(4px);
    animation: authIn 500ms cubic-bezier(.22, .8, .24, 1) both;
}
@keyframes authIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.auth-card h1 {
    margin: 0;
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: .2px;
}
.auth-sub { margin: 6px 0 22px; text-align: center; font-size: 14px; color: var(--muted); }

.auth-card form { display: flex; flex-direction: column; }
.auth-card label { font-size: 14px; font-weight: 600; margin: 0 0 7px; }
.auth-card input {
    width: 100%;
    height: 38px;
    margin-bottom: 16px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #262626;
    color: #f2f2f2;
    font: 14px var(--font);
    transition: border-color 200ms, box-shadow 200ms;
}
.auth-card input::placeholder { color: #7d7d7d; }
.auth-card input:focus { outline: none; border-color: #8a8a8a; box-shadow: 0 0 0 3px rgba(255, 255, 255, .12); }

.auth-btn {
    display: block;
    width: 100%;
    height: 40px;
    margin-top: 4px;
    border: 0;
    border-radius: 8px;
    background: #ececec;
    color: #111;
    font: 600 14px/40px var(--font);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 200ms, transform 200ms;
}
.auth-btn:hover { background: #fff; transform: translateY(-1px); }
.auth-btn-ghost {
    background: transparent;
    color: #f2f2f2;
    border: 1px solid var(--line);
    line-height: 38px;
}
.auth-btn-ghost:hover { background: #262626; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: var(--muted);
    font-size: 13px;
}
.auth-divider::before,
.auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.auth-msg {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #262626;
    font-size: 13px;
    line-height: 1.5;
    color: #e5e5e5;
}
.auth-msg.is-error { background: rgba(198, 40, 40, .18); color: #ffb4ab; }
.auth-msg.is-ok { background: rgba(46, 125, 50, .2); color: #a5d6a7; }
.auth-msg code { color: #fff; }

/* =====================================================
   ADMIN PANEL (dashboard, orders, gallery, products)
   ===================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

body.admin-panel {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* lace behind everything */
    background: var(--brown-deep) url("../img/bg-img/lace-bg.jpg") center top / 480px auto repeat;
    color: var(--cream);
}

/* ---------- Top bar ---------- */
.ap-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding: 14px 34px;
}
.ap-logo {
    font: 800 32px "Nunito", "Poppins", var(--font);
    color: #fff;
    letter-spacing: .5px;
    text-decoration: none;
    white-space: nowrap;
}
.ap-logo:hover { color: #fff; opacity: .9; }
.ap-top-right { display: flex; align-items: center; gap: 14px; }

.ap-search {
    display: flex;
    align-items: center;
    width: 372px;
    height: 38px;
    border: 1px solid #111;
    border-radius: 8px;
    background: #c8bebc;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .15);
    transition: box-shadow 200ms;
}
.ap-search:focus-within { box-shadow: 0 0 0 3px rgba(212, 175, 95, .55); }
.ap-search input {
    flex: 1;
    min-width: 0;
    height: 100%;
    border: 0;
    background: transparent;
    font: 16px "Times New Roman", Times, serif;
    color: #111;
}
.ap-search input:focus { outline: none; }
.ap-search input::placeholder { color: #6d6260; }
.ap-search-go {
    width: 40px;
    height: 100%;
    padding: 0 0 0 8px;
    border: 0;
    background: transparent;
    color: #111;
    cursor: pointer;
}
.ap-search-go svg { width: 20px; height: 20px; display: block; }
.ap-search-clear {
    width: 36px;
    text-align: center;
    font: 24px/1 Arial, sans-serif;
    color: #111;
    text-decoration: none;
}

/* Prettier logout */
.ap-logout-form { margin: 0; }
.ap-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 18px 0 14px;
    border: 1px solid rgba(212, 175, 95, .7);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(60, 36, 5, .85), rgba(42, 23, 8, .95));
    color: var(--cream);
    font: 700 15px "Times New Roman", Times, serif;
    letter-spacing: .4px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .08);
    transition: background 250ms, color 250ms, transform 250ms;
}
.ap-logout svg { width: 18px; height: 18px; transition: transform 250ms; }
.ap-logout:hover { background: var(--gold); color: var(--brown-deep); transform: translateY(-1px); }
.ap-logout:hover svg { transform: translateX(2px); }
.ap-logout:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------- Brown panel ---------- */
.ap-shell {
    flex: 1;
    display: grid;
    grid-template-columns: 182px minmax(0, 1fr);
    margin: 0 26px 26px;
    background: var(--brown);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
}

/* Sidebar */
.ap-side {
    padding: 38px 16px 30px;
    border-right: 2px solid var(--cream);
    text-align: center;
}
.ap-avatar { width: 86px; height: 86px; margin: 0 auto; color: var(--cream); }
.ap-avatar svg { width: 100%; height: 100%; display: block; }
.ap-side-name {
    margin: 10px 0 44px;
    font: 700 15px "Times New Roman", Times, serif;
    color: #d8cdc1;
    overflow-wrap: anywhere;
}
.ap-nav { display: flex; flex-direction: column; gap: 14px; }
.ap-nav-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 44px;
    padding: 0 12px;
    border-radius: 10px;
    background: #fbf7f1;
    color: #1a1208;
    font: 700 16px "Times New Roman", Times, serif;
    letter-spacing: .3px;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 4px 0 #b9a58a, 0 8px 18px rgba(0, 0, 0, .35);
    transition: transform 180ms, box-shadow 180ms, background 200ms;
}
.ap-nav-btn svg { width: 18px; height: 18px; flex: 0 0 auto; fill: currentColor; color: #8a6328; }
.ap-nav-btn:hover {
    color: #1a1208;
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #b9a58a, 0 12px 22px rgba(0, 0, 0, .4);
}
.ap-nav-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 #b9a58a, 0 4px 10px rgba(0, 0, 0, .3); }
.ap-nav-btn.is-active {
    background: linear-gradient(180deg, #e9cf8f, var(--gold));
    box-shadow: 0 4px 0 #8a6328, 0 8px 18px rgba(0, 0, 0, .35);
}
.ap-nav-btn.is-active svg { color: #2a1708; }
.ap-nav-btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* Main area */
.ap-main { min-width: 0; display: flex; flex-direction: column; }
.ap-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 22px 18px 20px 54px;
    border-bottom: 2px solid var(--cream);
}
.ap-head h1 {
    margin: 0;
    font: 700 32px "Times New Roman", Times, serif;
    text-transform: uppercase;
    color: var(--cream);
    overflow-wrap: anywhere;
}
.ap-filters { display: flex; gap: 16px; flex-wrap: wrap; margin: 0; }
.ap-select select {
    -webkit-appearance: none;
    appearance: none;
    height: 32px;
    min-width: 140px;
    padding: 0 34px 0 12px;
    border: 0;
    border-radius: 4px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23111' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 11px center / 11px 8px;
    color: #111;
    font: 20px "Times New Roman", Times, serif;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
}
.ap-select select:focus { outline: 3px solid var(--gold); outline-offset: 1px; }
.ap-select option { text-transform: none; font-size: 16px; }

.ap-body { padding: 18px 34px 40px 54px; }

.ap-flash {
    margin: 0 0 16px;
    padding: 12px 16px;
    border-radius: 10px;
    background: rgba(165, 214, 167, .15);
    border: 1px solid rgba(165, 214, 167, .5);
    color: #d7f0d8;
    font-size: 14px;
}
.ap-flash.is-error { background: rgba(255, 180, 171, .12); border-color: rgba(255, 180, 171, .5); color: #ffd3cc; }

/* Stat strip (one white bar, like the "Today" design) */
.ap-stats {
    display: grid;
    grid-template-columns: auto repeat(4, minmax(0, 1fr));
    align-items: stretch;
    margin-bottom: 26px;
    padding: 18px 8px;
    border-radius: 16px;
    background: #fff;
    color: #1f1f1f;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .3);
}
.ap-stats-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 22px 0 14px;
    font: 700 16px var(--font);
    color: #1f1f1f;
}
.ap-stats-icon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #fbe9e6;
    color: #c2410c;
}
.ap-stats-icon svg { width: 17px; height: 17px; }
.ap-stat {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 22px;
    border-left: 1px solid #ececec;
    color: inherit;
    text-decoration: none;
    border-radius: 10px;
    transition: background 200ms;
}
.ap-stat:hover { background: #faf7f2; color: inherit; }
.ap-stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ap-stat-label { font: 500 13px var(--font); color: #6b6b6b; }
.ap-stat-info {
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
    border: 1.5px solid #9a9a9a;
    border-radius: 50%;
    font: 700 10px/1 Georgia, serif;
    color: #8a8a8a;
    cursor: help;
    flex: 0 0 auto;
}
.ap-stat-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ap-stat-value { font: 700 30px/1 var(--font); letter-spacing: -.5px; color: #141414; }
.ap-stat-value small { font-size: 15px; font-weight: 600; margin-right: 2px; letter-spacing: 0; }
.ap-stat.is-alert .ap-stat-value { color: #c62828; }
.ap-trend { display: flex; flex-direction: column; align-items: flex-end; font: 11px/1.35 var(--font); color: #8a8a8a; text-align: right; }
.ap-trend b { font-size: 12px; font-weight: 700; }
.ap-trend.is-up b { color: #2563eb; }
.ap-trend.is-down b { color: #dc2626; }
.ap-trend.is-flat b { color: #6b7280; }

/* Panels with tables */
.ap-panel {
    padding: 20px 22px;
    border-radius: 14px;
    background: #fbf8f3;
    color: #222;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .3);
}
.ap-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.ap-panel h2 { margin: 0; font: 700 24px "Times New Roman", Times, serif; color: #111; }
.ap-panel h2 .ap-link { margin-left: 10px; font: 600 13px var(--font); }
.ap-panel code { background: #f0e8dc; padding: 1px 6px; border-radius: 4px; }
.ap-empty { margin: 0; color: #666; }
.ap-hint { margin: 0; font-size: 13px; color: #777; }
.ap-link { color: #8a6328; font-weight: 600; text-decoration: none; }
.ap-link:hover { color: #3c2405; text-decoration: underline; }

.ap-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ap-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14px; }
.ap-table th {
    padding: 10px 12px;
    background: #f0e8dc;
    color: #3c2405;
    font-size: 12px;
    letter-spacing: .8px;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}
.ap-table td { padding: 12px; border-bottom: 1px solid #ece4d8; vertical-align: top; }
.ap-table tbody tr:hover { background: #fffdf9; }
.ap-table small { color: #888; }
.ap-table .nowrap { white-space: nowrap; }
.ap-table .pre { white-space: pre-line; min-width: 200px; }
.ap-table .ap-addr { min-width: 160px; }
.ap-table form { margin: 0; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.ap-thumb { width: 44px; height: 56px; object-fit: cover; border-radius: 6px; display: block; }

.ap-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.ap-status.is-new { background: #fff1d6; color: #8a5a00; }
.ap-status.is-delivered { background: #e3f3e4; color: #2e7d32; }
.ap-stock { font-weight: 700; }
.ap-stock.is-out { color: #b3261e; }

.ap-small-btn {
    height: 32px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: var(--brown);
    color: #fff;
    font: 600 13px var(--font);
    cursor: pointer;
    white-space: nowrap;
    transition: background 200ms, transform 200ms;
}
.ap-small-btn:hover { background: #5a3610; transform: translateY(-1px); }
.ap-text-btn {
    border: 0;
    background: none;
    color: #8a6328;
    font: 600 12px var(--font);
    text-decoration: underline;
    cursor: pointer;
}

/* Order status tabs */
.ap-tabs { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.ap-tab {
    padding: 7px 18px;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 95, .55);
    color: var(--cream);
    font: 700 15px "Times New Roman", Times, serif;
    text-decoration: none;
    transition: background 200ms, color 200ms;
}
.ap-tab:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.ap-tab.is-active { background: var(--gold); border-color: var(--gold); color: var(--brown-deep); }

/* Gallery */
.ap-upload { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.ap-upload-pick {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 240px;
    padding: 10px 14px;
    border: 2px dashed #cdbfae;
    border-radius: 12px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
}
.ap-upload-pick input { max-width: 100%; font-size: 13px; }
.ap-upload-pick span { font-size: 12px; color: #777; }
.ap-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
    margin-top: 18px;
}
.ap-photo { margin: 0; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .12); }
.ap-photo img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: #f0e8dc; }
.ap-photo figcaption { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 6px; }
.ap-photo code { font-size: 11px; overflow-wrap: anywhere; }
.ap-copy {
    align-self: flex-start;
    padding: 3px 10px;
    border: 1px solid #cdbfae;
    border-radius: 999px;
    background: #fbf7f1;
    font: 600 12px var(--font);
    cursor: pointer;
}
.ap-copy:hover { background: var(--gold); border-color: var(--gold); }

/* ---------- Tablet & phone ---------- */
@media (max-width: 900px) {
    .ap-top { padding: 12px 16px; }
    .ap-top-right { flex: 1; justify-content: flex-end; }
    .ap-search { width: auto; flex: 1; max-width: 420px; }
    .ap-shell { grid-template-columns: 1fr; margin: 0 12px 12px; }
    .ap-side {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 14px;
        border-right: 0;
        border-bottom: 2px solid var(--cream);
        text-align: left;
    }
    .ap-avatar { width: 46px; height: 46px; margin: 0; flex: 0 0 auto; }
    .ap-side-name { display: none; }
    .ap-nav { flex: 1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
    .ap-nav-btn { height: 40px; padding: 0 10px; font-size: 14px; white-space: nowrap; }
    .ap-head { padding: 18px 16px; }
    .ap-head h1 { font-size: 24px; }
    .ap-body { padding: 16px; }
}
@media (max-width: 560px) {
    .ap-side { align-items: flex-start; }
    .ap-nav { grid-template-columns: 1fr 1fr; }
    .ap-logo { font-size: 24px; }
    .ap-top-right { width: 100%; }
    .ap-logout span { display: none; }
    .ap-logout { padding: 0 12px; }
    .ap-select select { min-width: 0; font-size: 17px; }
    .ap-panel { padding: 16px; }
}


/* =====================================================
   ADD PRODUCT FORM
   ===================================================== */
.pf { margin: 0; padding-bottom: 10px; }
.pf-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.pf-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.pf-card {
    padding: 22px 24px;
    border-radius: 16px;
    background: #fbf8f3;
    color: #222;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .28);
}
.pf-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #ece2d3;
    font: 700 21px "Times New Roman", Times, serif;
    color: #1a1208;
}
.pf-title span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(180deg, #e9cf8f, var(--gold));
    color: var(--brown-deep);
    font: 700 12px var(--font);
}
.pf-field { margin-bottom: 16px; }
.pf-field:last-child { margin-bottom: 0; }
.pf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pf-field label,
.pf-label {
    display: block;
    margin-bottom: 7px;
    font: 700 15px "Times New Roman", Times, serif;
    color: #3c2405;
    letter-spacing: .2px;
}
.pf-field label em, .pf-label em, .pf-drop em { color: #b3261e; font-style: normal; }
.pf-field label small { font: 400 12px var(--font); color: #8a7a6a; }
.pf-help { display: block; margin-top: 6px; font-size: 12px; color: #8a7a6a; }

.pf input[type=text],
.pf input[type=number],
.pf textarea {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #e2d6c4;
    border-radius: 10px;
    background: #fff;
    color: #1a1208;
    font: 15px var(--font);
    transition: border-color 200ms, box-shadow 200ms;
}
.pf textarea { height: auto; min-height: 120px; padding: 12px 14px; line-height: 1.6; resize: vertical; }
.pf input:focus, .pf textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(212, 175, 95, .25); }
.pf input::placeholder, .pf textarea::placeholder { color: #b3a594; }
.pf .is-invalid { border-color: #d64545 !important; box-shadow: 0 0 0 4px rgba(214, 69, 69, .18) !important; }

/* Money inputs */
.pf-money { position: relative; }
.pf-money span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font: 600 14px var(--font); color: #8a6328; }
.pf-money input { padding-left: 46px !important; }

/* Colours */
.pf-colors { display: flex; flex-direction: column; gap: 8px; }
.pf-color { display: flex; gap: 8px; }
.pf-icon-btn {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border: 1px solid #e2d6c4;
    border-radius: 10px;
    background: #fff;
    color: #3c2405;
    font: 600 20px/1 var(--font);
    cursor: pointer;
    transition: background 200ms, border-color 200ms;
}
.pf-icon-btn:hover { background: #f3e7cf; border-color: var(--gold); }
.pf-add {
    margin-top: 10px;
    padding: 0;
    border: 0;
    background: none;
    color: #8a6328;
    font: 700 13px var(--font);
    cursor: pointer;
}
.pf-add:hover { color: #3c2405; text-decoration: underline; }

/* Stock stepper */
.pf-stepper { display: inline-flex; gap: 8px; }
.pf-stepper input { width: 96px !important; text-align: center; font-weight: 700 !important; }

/* Size / badge chips */
.pf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-chip { position: relative; margin: 0; cursor: pointer; }
.pf-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pf-chip span {
    display: grid;
    place-items: center;
    min-width: 50px;
    height: 40px;
    padding: 0 14px;
    border: 1px solid #e2d6c4;
    border-radius: 10px;
    background: #fff;
    font: 700 15px "Times New Roman", Times, serif;
    color: #3c2405;
    transition: background 200ms, border-color 200ms, color 200ms, transform 150ms;
}
.pf-chip:hover span { border-color: var(--gold); transform: translateY(-1px); }
.pf-chip input:checked + span { background: var(--brown); border-color: var(--brown); color: #fff; }
.pf-chip.is-radio input:checked + span { background: linear-gradient(180deg, #e9cf8f, var(--gold)); border-color: var(--gold); color: var(--brown-deep); }
.pf-chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(212, 175, 95, .5); }

/* Photo drop boxes */
.pf-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pf-drop {
    position: relative;
    display: grid;
    place-items: center;
    aspect-ratio: 3 / 4;
    margin: 0;
    border: 2px dashed #d6c6ae;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 200ms, background 200ms;
}
.pf-drop:hover, .pf-drop.is-over { border-color: var(--gold); background: #fffaf0; }
.pf-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2; }
.pf-drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pf-drop-text { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px; text-align: center; font: 700 14px var(--font); color: #3c2405; }
.pf-drop-text b {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-bottom: 4px;
    border-radius: 50%;
    border: 1.5px solid #3c2405;
    font: 400 24px/1 var(--font);
}
.pf-drop-text small { font: 400 11px var(--font); color: #8a7a6a; }
.pf-drop.has-file .pf-drop-text { display: none; }
.pf-drop.has-file::after {
    content: "Change";
    position: absolute;
    right: 8px;
    bottom: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(26, 18, 8, .75);
    color: #fff;
    font: 600 11px var(--font);
}

/* Live preview in the gold frame */
.pf-preview-card { background: linear-gradient(180deg, #4a2c0b, var(--brown-deep)); color: var(--cream); }
.pf-preview-card .pf-title { color: var(--cream); border-color: rgba(212, 175, 95, .3); }
.pf-preview { text-align: center; }
.pf-frame {
    position: relative;
    width: min(240px, 100%);
    aspect-ratio: 564 / 805;
    margin: 0 auto 14px;
}
.pf-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../img/core-img/gold-frame.png") center / 100% 100% no-repeat;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45));
    pointer-events: none;
}
.pf-frame-photo,
.pf-frame-empty {
    position: absolute;
    left: 19%;
    top: 20.8%;
    width: 62%;
    height: 61.4%;
    clip-path: ellipse(50% 50% at 50% 50%);
    background: #f3efe9;
    object-fit: cover;
}
.pf-frame-empty { display: grid; place-items: center; font: italic 14px "Times New Roman", serif; color: #a39383; }
.pf-frame-empty[hidden], .pf-frame-photo[hidden] { display: none; }
.pf-badge {
    position: absolute;
    left: 0;
    top: 6%;
    z-index: 2;
    padding: 3px 10px;
    background: #0315ff;
    color: #fff;
    font: 700 12px var(--font);
}
.pf-badge.is-sale { background: #dc0345; }
.pf-badge[hidden] { display: none; }
.pf-pv-brand { margin: 0; font: 700 11px var(--font); letter-spacing: 1.5px; text-transform: uppercase; color: #bfae9c; }
.pf-pv-name { margin: 4px 0; font: 700 19px "Times New Roman", Times, serif; color: #fff; overflow-wrap: anywhere; }
.pf-pv-price { margin: 0; font: 700 15px var(--font); color: #fff; }
.pf-pv-price s { color: #a99a8d; font-weight: 500; margin-right: 6px; }
.pf-pv-price s[hidden] { display: none; }

/* Save bar */
.pf-actions {
    position: sticky;
    bottom: 12px;
    z-index: 5;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(42, 23, 8, .92);
    border: 1px solid rgba(212, 175, 95, .45);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
    backdrop-filter: blur(6px);
}
.pf-reset {
    height: 44px;
    padding: 0 20px;
    border: 1px solid rgba(243, 235, 225, .4);
    border-radius: 999px;
    background: transparent;
    color: var(--cream);
    font: 600 14px var(--font);
    cursor: pointer;
}
.pf-reset:hover { background: rgba(255, 255, 255, .08); }
.pf-save {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 46px;
    padding: 0 28px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #ecd497, var(--gold));
    color: var(--brown-deep);
    font: 700 17px "Times New Roman", Times, serif;
    letter-spacing: .6px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 0 #8a6328, 0 10px 20px rgba(0, 0, 0, .35);
    transition: transform 150ms, box-shadow 150ms;
}
.pf-save svg { width: 18px; height: 18px; }
.pf-save:hover { transform: translateY(-2px); box-shadow: 0 6px 0 #8a6328, 0 14px 24px rgba(0, 0, 0, .4); }
.pf-save:active { transform: translateY(2px); box-shadow: 0 2px 0 #8a6328, 0 6px 12px rgba(0, 0, 0, .3); }
.pf-save.is-busy { opacity: .7; pointer-events: none; }

.ap-flash a { color: #fff; font-weight: 700; margin-left: 6px; }

/* ---------- Responsive: stat strip + form ---------- */
@media (max-width: 1100px) {
    .ap-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; padding: 16px 8px; }
    .ap-stats-label { grid-column: 1 / -1; padding: 0 14px 6px; }
    .ap-stat:nth-of-type(odd) { border-left: 0; }
    .pf-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .ap-stat { padding: 6px 12px; }
    .ap-stat-value { font-size: 24px; }
    .ap-trend { align-items: flex-start; text-align: left; }
    .pf-card { padding: 18px 16px; }
    .pf-row { grid-template-columns: 1fr; }
    .pf-actions { justify-content: stretch; }
    .pf-actions button { flex: 1; justify-content: center; }
}


/* =====================================================
   SHIPPING FORM (orders table)
   ===================================================== */
.ap-table form.ap-ship { display: grid; grid-template-columns: 1fr; gap: 8px; min-width: 200px; white-space: normal; }
.ap-ship label { display: flex; flex-direction: column; gap: 3px; margin: 0; }
.ap-ship label span { font-size: 10px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: #8a7a6a; }
.ap-ship select,
.ap-ship input {
    height: 32px;
    padding: 0 10px;
    border: 1px solid #e2d6c4;
    border-radius: 8px;
    background: #fff;
    font: 13px var(--font);
    color: #1a1208;
}
.ap-ship select:focus, .ap-ship input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 175, 95, .25); }
.ap-ship-status { font-weight: 700 !important; }
.ap-ship-status.is-new { background: #fff1d6 !important; color: #8a5a00 !important; }
.ap-ship-status.is-packed { background: #ede4ff !important; color: #5b3fa8 !important; }
.ap-ship-status.is-shipped { background: #e1efff !important; color: #1d5fb8 !important; }
.ap-ship-status.is-delivered { background: #e3f3e4 !important; color: #2e7d32 !important; }
.ap-ship-actions { display: flex; align-items: center; gap: 10px; }
.ap-status.is-packed { background: #ede4ff; color: #5b3fa8; }
.ap-status.is-shipped { background: #e1efff; color: #1d5fb8; }

/* Shipping form sits on its own line under each order */
.ap-table tr.ap-ship-row td { padding-top: 0; border-bottom: 2px solid #e6dccd; }
.ap-table tr.ap-ship-row:hover { background: transparent; }
.ap-table form.ap-ship {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #f3ece1;
}
.ap-ship label { flex: 0 1 190px; }
.ap-ship label:nth-of-type(3) { flex: 1 1 220px; }
.ap-ship-actions { height: 32px; }

.ap-ship-status.is-paid { background: #e0f2f1 !important; color: #00695c !important; }
.ap-status.is-paid { background: #e0f2f1; color: #00695c; }
.ap-ship label:first-of-type { flex-basis: 220px; }


/* =====================================================
   ADD PRODUCT — refined "sheet" layout (pf2)
   ===================================================== */
.pf2-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 28px; align-items: start; }

/* Left column: frame uploader + caption */
.pf2-media { position: sticky; top: 20px; text-align: center; }
.pf-drop.pf2-frame {
    display: block;
    aspect-ratio: auto;
    border: 0;
    background: transparent;
    overflow: visible;
    border-radius: 0;
}
.pf-drop.pf2-frame:hover, .pf-drop.pf2-frame.is-over { background: transparent; }
.pf2-frame .pf-frame { display: block; width: 260px; margin: 0 auto; transition: transform 300ms; }
.pf2-frame:hover .pf-frame { transform: scale(1.02); }
.pf2-frame .pf-frame-photo { position: absolute; inset: auto; left: 19%; top: 20.8%; width: 62%; height: 61.4%; object-fit: cover; }
.pf2-frame .pf-frame-empty { flex-direction: column; gap: 6px; font: italic 15px "Times New Roman", Times, serif; color: #8a7a6a; display: flex; align-items: center; justify-content: center; }
.pf2-frame .pf-frame-empty b {
    display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
    border: 1.5px solid #8a7a6a; font: 400 24px/1 var(--font); font-style: normal;
}
.pf2-frame.has-file::after { right: 50%; transform: translateX(50%); bottom: 6px; }
.pf2-frame.is-invalid .pf-frame-empty { color: #d64545; }
.pf2-frame.is-invalid .pf-frame-empty b { border-color: #d64545; }
.pf2-frame.is-invalid { box-shadow: none !important; }
.pf2-caption { margin: 6px 0 18px; }
.pf2-caption .pf-pv-brand { color: #bfae9c; }

.pf-drop.pf2-second {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: auto;
    height: 74px;
    border: 1px dashed rgba(239, 233, 225, .45);
    border-radius: 12px;
    background: rgba(255, 255, 255, .04);
    color: var(--cream);
}
.pf-drop.pf2-second:hover { background: rgba(255, 255, 255, .08); border-color: var(--cream); }
.pf2-second .pf-drop-text { flex-direction: row; gap: 12px; color: var(--cream); font: 700 15px "Times New Roman", Times, serif; text-align: left; }
.pf2-second .pf-drop-text b { width: 32px; height: 32px; margin: 0; border-color: var(--cream); font-size: 20px; }
.pf2-second .pf-drop-text small { display: block; color: #cdbfb2; font: 400 12px var(--font); }
.pf2-second img { object-fit: cover; }
.pf2-note { margin: 10px 0 0; font-size: 12px; color: #bfae9c; }

/* Right column: one cream sheet */
.pf2-sheet {
    padding: 8px 36px 30px;
    border-radius: 18px;
    background: #fbf8f3;
    color: #1a1208;
    box-shadow: 0 16px 34px rgba(0, 0, 0, .3);
}
.pf2-sec { padding: 26px 0 8px; border-bottom: 1px solid #ece2d3; }
.pf2-sec:last-child { border-bottom: 0; }
.pf2-sec h3 {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 0 0 18px;
    font: 700 22px "Times New Roman", Times, serif;
    color: #1a1208;
}
.pf2-sec h3 span { font: italic 400 18px "Times New Roman", Times, serif; color: #b08a4a; }

.pf2-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
.pf2-row-3 { grid-template-columns: 1fr 1fr auto; }
.pf2-field { display: block; margin: 0 0 20px; }
.pf2-field > span:first-child {
    display: block;
    margin-bottom: 6px;
    font: 700 11px var(--font);
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #8a7a6a;
}
.pf2-field > span:first-child small { margin-left: 4px; font-weight: 400; letter-spacing: .3px; text-transform: none; }
.pf2-field em { color: #b3261e; font-style: normal; }

/* underline inputs */
.pf2 .pf2-field input[type=text],
.pf2 .pf2-field input[type=number],
.pf2 .pf2-field textarea {
    width: 100%;
    height: 42px;
    padding: 0 2px;
    border: 0;
    border-bottom: 1.5px solid #dccdb7;
    border-radius: 0;
    background: transparent;
    color: #1a1208;
    font: 18px "Times New Roman", Times, serif;
    box-shadow: none;
    transition: border-color 200ms;
}
.pf2 .pf2-field input:focus,
.pf2 .pf2-field textarea:focus { outline: none; border-bottom-color: #8a6328; box-shadow: none; }
.pf2 .pf2-name input[type=text] { height: 52px; font-size: 28px; font-weight: 700; }
.pf2 .pf2-field textarea {
    height: auto;
    min-height: 130px;
    padding: 12px 14px;
    border: 1.5px solid #e6dac8;
    border-radius: 12px;
    background: #fff;
    line-height: 1.6;
    resize: vertical;
}
.pf2 .pf2-field textarea:focus { border-color: #8a6328; }
.pf2 input::placeholder, .pf2 textarea::placeholder { color: #c2b39f; font-style: italic; }

.pf2-money { display: flex; align-items: center; gap: 8px; border-bottom: 1.5px solid #dccdb7; }
.pf2-money:focus-within { border-bottom-color: #8a6328; }
.pf2-money b { font: 700 14px var(--font); color: #8a6328; }
.pf2 .pf2-money input[type=number] { border: 0 !important; }

.pf2-stepper { display: inline-flex; align-items: center; gap: 6px; height: 42px; }
.pf2-stepper button {
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid #dccdb7; background: #fff; color: #3c2405;
    font: 600 18px/1 var(--font); cursor: pointer; transition: background 200ms, border-color 200ms;
}
.pf2-stepper button:hover { background: #f3e7cf; border-color: var(--gold); }
.pf2 .pf2-stepper input[type=number] { width: 56px; text-align: center; font-weight: 700; -moz-appearance: textfield; }
.pf2-stepper input::-webkit-outer-spin-button, .pf2-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* segmented badge control */
.pf2-seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: #f1e9dc; }
.pf2-seg label { margin: 0; cursor: pointer; }
.pf2-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pf2-seg span { display: block; padding: 8px 18px; border-radius: 999px; font: 700 15px "Times New Roman", Times, serif; color: #6b5a48; transition: background 200ms, color 200ms; }
.pf2-seg input:checked + span { background: #3c2405; color: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.pf2-seg input:focus-visible + span { outline: 2px solid var(--gold); }
.pf2-help { display: block; margin-top: 8px; font-size: 12px; color: #8a7a6a; }

/* colour tags */
.pf2-tags {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
    min-height: 46px; padding: 6px 0; border-bottom: 1.5px solid #dccdb7; cursor: text;
}
.pf2-tags:focus-within { border-bottom-color: #8a6328; }
.pf2-tag {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 6px 5px 14px; border-radius: 999px;
    background: #3c2405; color: #fff; font: 700 14px "Times New Roman", Times, serif;
}
.pf2-tag button {
    width: 20px; height: 20px; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .18); color: #fff; font: 14px/1 var(--font); cursor: pointer;
}
.pf2-tag button:hover { background: #b3261e; }
.pf2 .pf2-tags input[type=text] { flex: 1; min-width: 180px; width: auto; height: 32px; border: 0 !important; }

@media (max-width: 1100px) {
    .pf2-grid { grid-template-columns: 1fr; }
    .pf2-media { position: static; max-width: 360px; margin: 0 auto; }
}
@media (max-width: 600px) {
    .pf2-sheet { padding: 4px 18px 20px; }
    .pf2-row, .pf2-row-3 { grid-template-columns: 1fr; }
    .pf2 .pf2-name input[type=text] { font-size: 22px; }
}

/* =====================================================
   ORDERS TABLE
   ===================================================== */
.ot-table { min-width: 760px; }
.ot-table td { vertical-align: middle; padding: 16px 12px; }
.ot-table td small { display: block; margin-top: 2px; font-size: 12px; color: #8a7a6a; }
.ot-no { font-size: 15px; letter-spacing: .3px; }
.ot-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.ot-pill.is-pending { background: #fff1d6; color: #8a5a00; }
.ot-pill.is-approved { background: #e3f3e4; color: #2e7d32; }
.ot-pill.is-new { background: #f1ece5; color: #8a7a6a; }
.ot-pill.is-packed { background: #ede4ff; color: #5b3fa8; }
.ot-pill.is-shipped { background: #e1efff; color: #1d5fb8; }
.ot-pill.is-delivered { background: #e3f3e4; color: #2e7d32; }
.ot-action-col { text-align: right; }
.ot-view {
    display: inline-block; padding: 8px 16px; border-radius: 999px;
    background: var(--brown); color: #fff !important; font: 600 13px var(--font);
    text-decoration: none !important; white-space: nowrap; transition: background 200ms, transform 200ms;
}
.ot-view:hover { background: #5a3610; transform: translateY(-1px); }

/* =====================================================
   ORDER DETAILS PAGE
   ===================================================== */
.od-tools { display: flex; align-items: center; gap: 10px; }
.od-back { margin-right: 8px; color: #e6dbcf; font: 700 15px "Times New Roman", Times, serif; text-decoration: none; }
.od-back:hover { color: #fff; text-decoration: underline; }
.od-icon {
    display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
    border: 1px solid rgba(239, 233, 225, .55); border-radius: 12px;
    background: transparent; color: var(--cream); cursor: pointer; transition: background 200ms, color 200ms;
}
.od-icon svg { width: 24px; height: 24px; }
.od-icon:hover { background: var(--cream); color: var(--brown-deep); }

.od { color: var(--cream); font-family: "Times New Roman", Times, serif; }
.od-section { padding: 22px 0; border-bottom: 2px solid rgba(239, 233, 225, .85); }
.od-section:first-child { padding-top: 4px; }
.od-section:last-child { border-bottom: 0; }
.od-h { margin: 0 0 12px; font: 700 26px "Times New Roman", Times, serif; color: #fff; text-transform: uppercase; letter-spacing: .5px; }
fieldset .od-h { padding: 0; }

.od-info dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 28px; margin: 0; }
.od-info dt { font: 700 12px var(--font); letter-spacing: 1.4px; text-transform: uppercase; color: #cdbfb2; }
.od-info dd { margin: 3px 0 0; font-size: 19px; color: #fff; overflow-wrap: anywhere; }
.od-info dd a { color: #fff; }
.od-info .od-wide { grid-column: 1 / -1; }

.od-two { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; }
.od-box { padding: 16px 18px; border-radius: 6px; background: #fff; color: #1a1208; min-height: 140px; }
.od-items { list-style: none; margin: 0 0 8px; padding: 0; }
.od-items li { display: flex; justify-content: space-between; gap: 14px; padding: 5px 0; font-size: 17px; }
.od-items small { color: #8a7a6a; }
.od-sum { display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px dashed #ddd; font-size: 17px; }
.od-total { font-weight: 700; font-size: 19px; }
.od-paid-by { margin: 8px 0 0; font-size: 14px !important; color: #8a7a6a !important; }
.od-receipt { display: flex; align-items: center; justify-content: center; }
.od-receipt img { display: block; max-width: 100%; max-height: 260px; border-radius: 4px; box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.od-pdf { font: 700 17px "Times New Roman", Times, serif; color: #3c2405; text-decoration: underline; }

.od-ship-grid { display: grid; grid-template-columns: auto 1fr; gap: 24px 40px; margin-bottom: 20px; }
.od-ship fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.od-seg { display: inline-flex; flex-wrap: wrap; padding: 4px; gap: 4px; border-radius: 999px; background: rgba(0, 0, 0, .25); border: 1px solid rgba(239, 233, 225, .25); }
.od-seg label { margin: 0; cursor: pointer; }
.od-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.od-seg span { display: block; padding: 9px 18px; border-radius: 999px; font: 700 15px "Times New Roman", Times, serif; color: #e6dbcf; transition: background 200ms, color 200ms; white-space: nowrap; }
.od-seg input:checked + span { background: var(--cream); color: var(--brown-deep); }
.od-seg input:focus-visible + span { outline: 2px solid var(--gold); }
.od-hint { margin: 8px 0 0; font-size: 14px !important; color: #bfae9c !important; }
.od-ship-grid fieldset:not(:first-child) .od-seg input:checked + span { background: #efe0bd; }

.od-ship-fields { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 18px 24px; max-width: 760px; }
.od-ship-fields label { margin: 0; }
.od-ship-fields label > span { display: block; margin-bottom: 6px; font: 700 18px "Times New Roman", Times, serif; color: #fff; }
.od-ship-fields select,
.od-ship-fields input {
    width: 100%; height: 46px; padding: 0 14px;
    border: 1px solid rgba(239, 233, 225, .4); border-radius: 6px;
    background: #fff; color: #1a1208; font: 17px "Times New Roman", Times, serif;
}
.od-ship-fields select:focus, .od-ship-fields input:focus { outline: 3px solid rgba(212, 175, 95, .55); outline-offset: 1px; }
.od-save-row { display: flex; align-items: center; justify-content: flex-end; gap: 18px; margin-top: 24px; flex-wrap: wrap; }
.od-test { color: #efe0bd; font: 700 15px "Times New Roman", Times, serif; }
.od-test:hover { color: #fff; }
.od-save {
    height: 50px; padding: 0 34px; border: 0; border-radius: 999px;
    background: linear-gradient(180deg, #ecd497, var(--gold)); color: var(--brown-deep);
    font: 700 17px "Times New Roman", Times, serif; letter-spacing: .8px; text-transform: uppercase; cursor: pointer;
    box-shadow: 0 4px 0 #8a6328, 0 10px 20px rgba(0, 0, 0, .35); transition: transform 150ms, box-shadow 150ms;
}
.od-save:hover { transform: translateY(-2px); }
.od-save:active { transform: translateY(2px); box-shadow: 0 2px 0 #8a6328; }

.od-pdf-copy { padding: 24px; background: #3c2405; width: 760px; }

@media (max-width: 900px) {
    .od-info dl { grid-template-columns: 1fr 1fr; }
    .od-two { grid-template-columns: 1fr; }
    .od-ship-grid { grid-template-columns: 1fr; }
    .od-tools .od-back { display: none; }
}
@media (max-width: 560px) {
    .od-info dl { grid-template-columns: 1fr; }
    .od-ship-fields { grid-template-columns: 1fr; }
    .od-h { font-size: 21px; }
    .od-seg span { padding: 8px 12px; font-size: 14px; }
    .od-save { width: 100%; }
}

@media print {
    .ap-top, .ap-side, .od-tools, .od-save-row, .od-test { display: none !important; }
    body.admin-panel { background: #fff !important; }
    .ap-shell { display: block; margin: 0; box-shadow: none; background: #3c2405; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.pf2-frame .pf-frame-empty[hidden],
.pf2-frame .pf-frame-photo[hidden] { display: none !important; }
.od-items li span:last-child { white-space: nowrap; }

/* =====================================================
   ORDER DETAILS — card layout (ox)
   ===================================================== */
.ox { color: var(--cream); }
.ox-intro { margin-bottom: 18px; }
.ox-hello { margin: 0 0 8px; font: 400 22px "Times New Roman", Times, serif; color: #e6dbcf; }
.ox-hello strong { color: #fff; font-weight: 700; }
.ox-sub { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }

.ox-card,
.ox-strip,
.ox-item {
    background: #fbf8f3;
    color: #1a1208;
    border: 1px solid #e9dfd0;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .22);
}

/* summary strip */
.ox-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0 0 22px;
    padding: 0;
}
.ox-strip > div { padding: 16px 20px; border-left: 1px solid #ece2d3; }
.ox-strip > div:first-child { border-left: 0; }
.ox-strip dt { margin-bottom: 6px; font: 600 12px var(--font); color: #8a7a6a; }
.ox-strip dd { margin: 0; font: 700 17px "Times New Roman", Times, serif; color: #1a1208; overflow-wrap: anywhere; }
.ox-strip dd small { display: block; font: 400 12px var(--font); color: #8a7a6a; margin-top: 2px; }
.ox-muted { color: #9a8b7d !important; font-weight: 400; }

.ox-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.ox-main, .ox-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* item cards */
.ox-item {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) auto 110px;
    align-items: center;
    gap: 18px;
    padding: 12px 20px 12px 12px;
}
.ox-thumb { width: 76px; height: 76px; border-radius: 10px; overflow: hidden; background: #efe6da; }
.ox-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ox-item-info h3 { margin: 0; font: 700 19px "Times New Roman", Times, serif; color: #1a1208; }
.ox-item-info h3 a { color: #1a1208; }
.ox-item-info h3 a:hover { color: #8a6328; text-decoration: underline; }
.ox-item-info p { margin: 4px 0 0; font: 13px var(--font); color: #8a7a6a; }
.ox-qty { font: 13px var(--font); color: #8a7a6a; white-space: nowrap; }
.ox-qty b { display: inline-grid; place-items: center; min-width: 30px; height: 30px; margin-left: 6px; border-radius: 50%; background: #f1e9dc; color: #1a1208; font-size: 14px; }
.ox-price { text-align: right; font: 700 18px "Times New Roman", Times, serif; white-space: nowrap; }

/* side cards */
.ox-card { padding: 18px 20px; }
.ox-totals div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font: 14px var(--font); color: #6b5a48; }
.ox-totals strong { color: #1a1208; font: 700 16px "Times New Roman", Times, serif; }
.ox-totals .ox-total { margin-top: 8px; padding-top: 14px; border-top: 1px solid #e3d7c5; color: #1a1208; font-weight: 700; }
.ox-totals .ox-total strong { font-size: 21px; }
.ox-label { margin: 0 0 6px; font: 600 12px var(--font); color: #8a7a6a; }
.ox-value { margin: 0; font: 16px/1.55 "Times New Roman", Times, serif; color: #1a1208; }
.ox-value a { color: #1a1208; }
.ox-addr hr { margin: 14px 0; border: 0; border-top: 1px solid #ece2d3; }

.ox-receipt-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; height: 48px; margin-top: 4px;
    border: 0; border-radius: 999px;
    background: var(--brown); color: #fff;
    font: 700 16px "Times New Roman", Times, serif; letter-spacing: .5px; cursor: pointer;
    transition: background 200ms, transform 200ms;
}
.ox-receipt-btn svg { width: 20px; height: 20px; }
.ox-receipt-btn:hover { background: #5a3610; transform: translateY(-1px); }

/* manage card */
.ox-manage { margin-top: 8px; padding: 22px 24px; }
.ox-h { margin: 0 0 16px; font: 700 22px "Times New Roman", Times, serif; color: #1a1208; }
.ox-row { display: flex; flex-wrap: wrap; gap: 18px 28px; margin-bottom: 18px; }
.ox-row fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.ox-row legend, .ox-field > span {
    display: block; margin-bottom: 8px; padding: 0;
    font: 600 12px var(--font); color: #8a7a6a;
}
.ox-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: #f1e9dc; }
.ox-seg label { margin: 0; cursor: pointer; }
.ox-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.ox-seg span { display: block; padding: 8px 18px; border-radius: 999px; font: 700 15px "Times New Roman", Times, serif; color: #6b5a48; white-space: nowrap; transition: background 200ms, color 200ms; }
.ox-seg input:checked + span { background: #3c2405; color: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.ox-seg input:focus-visible + span { outline: 2px solid var(--gold); }

.ox-ship { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); }
.ox-field { margin: 0; }
.ox-field select,
.ox-field input {
    width: 100%; height: 46px; padding: 0 14px;
    border: 1px solid #e2d6c4; border-radius: 10px;
    background: #fff; color: #1a1208; font: 16px "Times New Roman", Times, serif;
    transition: border-color 200ms, box-shadow 200ms;
}
.ox-field select:focus, .ox-field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(212, 175, 95, .25); }
.ox-actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid #ece2d3; }
.ox-note { flex: 1 1 260px; margin: 0; font: 13px var(--font); color: #8a7a6a; }
.ox-test { color: #8a6328; font: 700 14px var(--font); }
.ox-save {
    height: 48px; padding: 0 30px; border: 0; border-radius: 999px;
    background: linear-gradient(180deg, #ecd497, var(--gold)); color: var(--brown-deep);
    font: 700 16px "Times New Roman", Times, serif; letter-spacing: .8px; text-transform: uppercase; cursor: pointer;
    box-shadow: 0 4px 0 #8a6328, 0 8px 16px rgba(0, 0, 0, .2); transition: transform 150ms;
}
.ox-save:hover { transform: translateY(-2px); }
.ox-save:active { transform: translateY(2px); box-shadow: 0 2px 0 #8a6328; }

/* receipt pop-up */
.ox-modal {
    width: min(720px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: #fbf8f3;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.ox-modal::backdrop { background: rgba(20, 10, 3, .7); }
.ox-modal-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 18px; border-bottom: 1px solid #ece2d3;
    font: 700 17px "Times New Roman", Times, serif; color: #1a1208;
}
.ox-modal-head span { display: flex; align-items: center; gap: 14px; }
.ox-modal-head a { font: 600 13px var(--font); color: #8a6328; }
.ox-modal-close { width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f1e9dc; font: 22px/1 var(--font); cursor: pointer; }
.ox-modal-close:hover { background: #e6d9c4; }
.ox-modal-body { padding: 16px; display: flex; justify-content: center; background: #f4eee5; }
.ox-modal-body img { max-width: 100%; max-height: calc(100vh - 160px); border-radius: 6px; }
.ox-modal-body iframe { width: 100%; height: calc(100vh - 170px); border: 0; background: #fff; }

.od-pdf-copy.ox { padding: 24px; background: #3c2405; width: 980px; }

@media (max-width: 1100px) {
    .ox-grid { grid-template-columns: 1fr; }
    .ox-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (max-width: 700px) {
    .ox-strip { grid-template-columns: 1fr 1fr; }
    .ox-strip > div:nth-child(3) { border-left: 0; }
    .ox-strip > div:nth-child(n+3) { border-top: 1px solid #ece2d3; }
    .ox-item { grid-template-columns: 60px minmax(0, 1fr) auto; gap: 12px; }
    .ox-thumb { width: 60px; height: 60px; }
    .ox-qty { grid-column: 2; }
    .ox-price { grid-column: 3; grid-row: 1 / span 2; }
    .ox-ship { grid-template-columns: 1fr; }
    .ox-save { width: 100%; }
}
@media print {
    .ox-actions, .ox-receipt { display: none !important; }
}
@media (max-width: 700px) {
    .ox-row { flex-direction: column; }
    .ox-row fieldset, .ox-seg { width: 100%; }
    .ox-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border-radius: 14px; }
    .ox-seg span { padding: 9px 6px; text-align: center; border-radius: 10px; font-size: 14px; }
}

/* =====================================================
   ORDER DETAILS — one classic sheet
   ===================================================== */
a.od-icon { text-decoration: none; }
.ox-sheet {
    padding: 34px 38px 30px;
    background: #fbf8f3;
    color: #1a1208;
    border: 1px solid #d9ccb8;
    border-radius: 4px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, .3);
    outline: 1px solid #e7dccb;
    outline-offset: -8px;
}
.ox-sheet .ox-card,
.ox-sheet .ox-strip,
.ox-sheet .ox-item { background: transparent; border: 0; border-radius: 0; box-shadow: none; }

.ox-sheet .ox-intro { margin-bottom: 22px; padding-bottom: 18px; border-bottom: 2px solid #1a1208; }
.ox-sheet .ox-hello { color: #6b5a48; font-size: 20px; }
.ox-sheet .ox-hello strong { color: #1a1208; font-size: 26px; }

.ox-sheet .ox-strip { margin-bottom: 26px; border-bottom: 1px solid #d9ccb8; }
.ox-sheet .ox-strip > div { padding: 2px 18px 16px; border-left: 1px solid #e3d7c5; }
.ox-sheet .ox-strip > div:first-child { padding-left: 0; border-left: 0; }

.ox-sheet .ox-grid { gap: 0; grid-template-columns: minmax(0, 1fr) 320px; }
.ox-sheet .ox-main { gap: 0; padding-right: 30px; border-right: 1px solid #e3d7c5; }
.ox-sheet .ox-side { gap: 0; padding-left: 30px; }

.ox-sheet .ox-item { padding: 14px 0; border-bottom: 1px solid #ece2d3; }
.ox-sheet .ox-item:first-child { padding-top: 0; }
.ox-sheet .ox-thumb { border-radius: 2px; }

.ox-sheet .ox-card { padding: 0 0 18px; margin-bottom: 18px; border-bottom: 1px solid #ece2d3; }
.ox-sheet .ox-side .ox-card:last-child { border-bottom: 0; margin-bottom: 0; }
.ox-sheet .ox-manage { margin-top: 26px; padding: 22px 0 0; border-top: 2px solid #1a1208; border-bottom: 0; margin-bottom: 0; }

.ox-sheet .ox-seg { border-radius: 0; background: transparent; border: 1px solid #1a1208; padding: 0; gap: 0; }
.ox-sheet .ox-seg span { border-radius: 0; border-left: 1px solid #1a1208; }
.ox-sheet .ox-seg label:first-child span { border-left: 0; }
.ox-sheet .ox-seg input:checked + span { background: #1a1208; color: #fff; box-shadow: none; }
.ox-sheet .ox-field select,
.ox-sheet .ox-field input { border-radius: 0; border-color: #bfb09a; }

/* square brown buttons */
.ox-sheet .ox-save {
    height: 48px; padding: 0 30px;
    border-radius: 0;
    background: #3c2405; color: #fff;
    box-shadow: none;
    font: 700 15px "Times New Roman", Times, serif; letter-spacing: 1.5px;
    transition: background 200ms;
}
.ox-sheet .ox-save:hover { background: #1a1208; transform: none; }
.ox-sheet .ox-save:active { transform: translateY(1px); box-shadow: none; }
.ox-sheet .ox-receipt-btn { border-radius: 0; background: transparent; color: #1a1208; border: 1px solid #1a1208; }
.ox-sheet .ox-receipt-btn:hover { background: #1a1208; color: #fff; transform: none; }

@media (max-width: 1100px) {
    .ox-sheet .ox-main { padding-right: 0; border-right: 0; }
    .ox-sheet .ox-side { padding-left: 0; margin-top: 26px; padding-top: 22px; border-top: 2px solid #1a1208; display: grid; gap: 0 30px; }
    .ox-sheet .ox-side .ox-card { border-bottom: 0; }
}
@media (max-width: 700px) {
    .ox-sheet { padding: 22px 16px; outline: 0; }
    .ox-sheet .ox-strip > div { padding: 12px 12px 12px 0; }
    .ox-sheet .ox-strip > div:nth-child(odd) { border-left: 0; }
    .ox-sheet .ox-seg { border-radius: 0; }
    .ox-sheet .ox-seg span { border-radius: 0; }
}

/* View details button centred */
.ot-action-col { text-align: center !important; }

/* Profile picture (click to change) */
.ap-avatar-form { margin: 0; }
label.ap-avatar {
    position: relative; display: block; width: 86px; height: 86px; margin: 0 auto;
    border-radius: 50%; overflow: hidden; cursor: pointer; color: var(--cream);
}
label.ap-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; border: 3px solid var(--cream); box-sizing: border-box; }
label.ap-avatar input { position: absolute; inset: 0; opacity: 0; cursor: pointer; z-index: 2; }
.ap-avatar-edit {
    position: absolute; inset: 0; display: grid; place-items: center;
    background: rgba(26, 18, 8, .55); color: #fff; opacity: 0; transition: opacity 200ms; border-radius: 50%;
}
.ap-avatar-edit svg { width: 26px; height: 26px; }
label.ap-avatar:hover .ap-avatar-edit, label.ap-avatar:focus-within .ap-avatar-edit { opacity: 1; }
@media (max-width: 900px) {
    label.ap-avatar { width: 46px; height: 46px; margin: 0; }
    .ap-avatar-edit svg { width: 18px; height: 18px; }
}

/* Photo placeholder when a product photo can't be found */
.ox-thumb { position: relative; display: grid; place-items: center; color: #b9a58a; }
.ox-thumb svg { width: 34px; height: 34px; }
.ox-thumb img { position: absolute; inset: 0; z-index: 1; }

/* =====================================================
   v9 — POLISH: flat sidebar, cleaner header, more breathing room
   ===================================================== */

/* ---- Sidebar ---- */
.ap-shell { grid-template-columns: 220px minmax(0, 1fr); }
.ap-side {
    padding: 40px 18px 30px;
    border-right: 1px solid rgba(243, 235, 225, .18);
    background: rgba(0, 0, 0, .12);
}
.ap-side-name {
    margin: 12px 0 36px;
    padding-bottom: 26px;
    border-bottom: 1px solid rgba(243, 235, 225, .14);
    font: 600 14px var(--font);
    letter-spacing: .6px;
    color: #d8cdc1;
}
.ap-nav { gap: 6px; }

/* inactive: transparent, sits on the brown */
.ap-nav-btn {
    justify-content: flex-start;
    gap: 14px;
    height: 46px;
    padding: 0 16px;
    border-radius: 8px;
    background: transparent;
    color: #d8cdc1;
    font: 600 13px var(--font);
    letter-spacing: 1.6px;
    box-shadow: none;
    transition: background 200ms ease, color 200ms ease;
}
.ap-nav-btn svg { width: 17px; height: 17px; color: currentColor; opacity: .85; }
.ap-nav-btn:hover {
    background: rgba(243, 235, 225, .08);
    color: #fff;
    transform: none;
    box-shadow: none;
}
.ap-nav-btn:active { transform: none; box-shadow: none; background: rgba(243, 235, 225, .14); }

/* active: solid cream, dark brown text */
.ap-nav-btn.is-active,
.ap-nav-btn.is-active:hover {
    background: var(--cream);
    color: var(--brown-deep);
    box-shadow: none;
}
.ap-nav-btn.is-active svg { color: var(--brown); opacity: 1; }
.ap-nav-btn:focus-visible { outline: 2px solid var(--cream); outline-offset: 2px; }

/* ---- Page header ---- */
.ap-head {
    min-height: 96px;
    padding: 26px 40px 24px 54px;
    border-bottom: 1px solid rgba(243, 235, 225, .18);
}
.ap-head h1 {
    font: 700 34px "Times New Roman", Times, serif;
    text-transform: none;
    letter-spacing: .3px;
}

/* ---- Body spacing ---- */
.ap-body { padding: 36px 40px 56px 54px; }
.ap-stats { margin-bottom: 36px; padding: 26px 14px; }
.ap-stat { gap: 16px; padding: 10px 24px; }
.ap-stats-label { padding: 0 26px 0 16px; }

.ap-panel { padding: 30px 32px 22px; }
.ap-panel-head { align-items: center; margin-bottom: 22px; }
.ap-panel-tools { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ap-table th { padding: 14px 16px; }
.ap-table td { padding: 18px 16px; vertical-align: middle; }

/* ---- Filters (header on Products, inside the Latest orders card on Dashboard) ---- */
.ap-filters { gap: 10px; }
.ap-select select {
    height: 38px;
    min-width: 150px;
    padding: 0 36px 0 14px;
    border: 1px solid #ddd2c2;
    border-radius: 8px;
    background-color: #fff;
    color: #2a1708;
    font: 500 14px var(--font);
    text-transform: none;
    box-shadow: none;
    transition: border-color 200ms;
}
.ap-select select:hover { border-color: #b9a58a; }
.ap-select select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.ap-select option { font-size: 14px; }
.ap-filters-inline .ap-select select { background-color: #fffdf9; }

@media (max-width: 900px) {
    .ap-shell { grid-template-columns: 1fr; }
    .ap-side { padding: 14px; background: rgba(0, 0, 0, .12); }
    .ap-side { border-right: 0; border-bottom: 1px solid rgba(243, 235, 225, .18); }
    .ap-nav-btn { justify-content: center; padding: 0 10px; letter-spacing: 1px; }
    .ap-head { min-height: 0; padding: 18px 16px; }
    .ap-body { padding: 20px 16px 32px; }
    .ap-stats { padding: 18px 8px; margin-bottom: 24px; }
    .ap-panel { padding: 22px 18px; }
    .ap-panel-tools { width: 100%; justify-content: space-between; }
}
@media (max-width: 560px) {
    .ap-select select { min-width: 0; font-size: 14px; }
    .ap-filters-inline { width: 100%; }
    .ap-filters-inline .ap-select { flex: 1; }
    .ap-filters-inline .ap-select select { width: 100%; }
}

/* ---------- Paging (Orders & Products lists) ---------- */
.ap-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 20px 4px 6px;
}
.ap-pager-info { font-size: 13px; color: #8a7a6a; }
.ap-pager-links { display: flex; align-items: center; gap: 6px; }
.ap-page {
    display: grid;
    place-items: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #e3d7c5;
    border-radius: 8px;
    background: #fff;
    color: #3c2405;
    font: 600 14px var(--font);
    text-decoration: none;
    transition: background 180ms, border-color 180ms;
}
a.ap-page:hover { background: #f3ece1; border-color: #b9a58a; color: #3c2405; }
.ap-page.is-current { background: #3c2405; border-color: #3c2405; color: #fff; }
.ap-page.is-off { opacity: .35; }
.ap-page-gap { padding: 0 4px; color: #8a7a6a; }

/* ---------- Save product: cream, no gold (matches the active sidebar item) ---------- */
.pf-actions { border-color: rgba(243, 235, 225, .18); }
.pf-save,
.pf-save:hover,
.pf-save:active {
    height: 46px;
    padding: 0 30px;
    border: 1px solid #f3ebe1;
    border-radius: 8px;
    background: #f3ebe1;
    color: #2a1708;
    font: 600 14px var(--font);
    letter-spacing: 1.6px;
    box-shadow: none;
    transform: none;
    transition: background 200ms, color 200ms;
}
.pf-save:hover { background: #ffffff; }
.pf-save:active { background: #e6dccd; }
.pf-save:focus-visible { outline: 2px solid #f3ebe1; outline-offset: 3px; }
.pf-reset { height: 46px; border-radius: 8px; }

/* =====================================================
   COLLECTIONS (Products -> Collections tab, list controls, add form)
   ===================================================== */
.pf2 .pf2-field select#pf-collection {
    width: 100%;
    height: 42px;
    padding: 0 28px 0 2px;
    border: 0;
    border-bottom: 1.5px solid #dccdb7;
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%233c2405' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 4px center / 11px 8px;
    color: #1a1208;
    font: 18px "Times New Roman", Times, serif;
    cursor: pointer;
}
.pf2 .pf2-field select#pf-collection:focus { outline: none; border-bottom-color: #8a6328; }

.cl-btn {
    height: 36px;
    padding: 0 16px;
    border: 1px solid #d6c8b3;
    border-radius: 8px;
    background: #fff;
    color: #3c2405;
    font: 600 13px var(--font);
    cursor: pointer;
    transition: background 180ms, border-color 180ms, color 180ms;
}
.cl-btn:hover { background: #f3ece1; border-color: #b9a58a; }
.cl-btn-dark { background: #3c2405; border-color: #3c2405; color: #fff; }
.cl-btn-dark:hover { background: #2a1708; border-color: #2a1708; color: #fff; }
.cl-btn-dark:disabled { opacity: .35; cursor: not-allowed; }
.cl-btn-del { color: #b3261e; }
.cl-btn-del:hover { background: #fdecea; border-color: #e7a59e; color: #b3261e; }

.cl-add { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 24px; }
.cl-add input {
    flex: 1;
    min-width: 220px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid #ddd2c2;
    border-radius: 8px;
    background: #fff;
    font: 15px var(--font);
}
.cl-add input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.cl-add .cl-btn { height: 42px; padding: 0 22px; }

.cl-table { min-width: 560px; }
.cl-pos-col { width: 90px; }
.cl-act-col { width: 1%; white-space: nowrap; text-align: right; }
.cl-inline { display: inline-flex !important; margin-left: 6px !important; }
.cl-pos, .cl-name {
    height: 38px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    font: 15px var(--font);
    color: #1a1208;
    transition: border-color 180ms, background 180ms;
}
.cl-pos { width: 64px; text-align: center; }
.cl-name { width: 100%; max-width: 360px; font: 700 17px "Times New Roman", Times, serif; }
.cl-pos:hover, .cl-name:hover { border-color: #e3d7c5; }
.cl-pos:focus, .cl-name:focus { outline: none; border-color: #8a6328; background: #fff; }

.cl-howto { margin-top: 26px; padding: 20px 22px; border-radius: 10px; background: #f3ece1; }
.cl-howto h3 { margin: 0 0 10px; font: 700 18px "Times New Roman", Times, serif; color: #2a1708; }
.cl-howto ol { margin: 0; padding-left: 20px; font-size: 14px; line-height: 1.9; color: #4a3b2d; }

/* product list: tick boxes, per-row collection dropdown, bulk bar */
.cl-check-col { width: 36px; }
.cl-check-col input { width: 17px; height: 17px; accent-color: #3c2405; cursor: pointer; }
.ap-table form.cl-row-form { display: block; }
.cl-row-select {
    height: 34px;
    max-width: 180px;
    padding: 0 30px 0 10px;
    border: 1px solid #e3d7c5;
    border-radius: 999px;
    -webkit-appearance: none;
    appearance: none;
    background: #f3ece1 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%233c2405' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 11px center / 9px 6px;
    color: #3c2405;
    font: 600 13px var(--font);
    cursor: pointer;
}
.cl-row-select.is-none { background-color: #fff; color: #9a8b7d; font-weight: 500; }
.cl-row-select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }

.cl-bulk {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px dashed #d6c8b3;
    border-radius: 10px;
}
.cl-bulk-count { margin-right: auto; font-size: 13px; color: #6b5a48; }
.cl-bulk-count b { color: #2a1708; }
.cl-bulk select {
    height: 36px;
    min-width: 190px;
    padding: 0 12px;
    border: 1px solid #ddd2c2;
    border-radius: 8px;
    background: #fff;
    font: 14px var(--font);
    color: #2a1708;
}
@media (max-width: 560px) {
    .cl-bulk-count { width: 100%; }
    .cl-bulk select { flex: 1; min-width: 0; }
}

/* Live preview uses the rectangular gold frame too */
.pf-frame { aspect-ratio: 680 / 904; }
.pf-frame::after { background-image: url("../img/core-img/gold-frame-rect.png"); }
.pf-frame-photo,
.pf-frame-empty,
.pf2-frame .pf-frame-photo { left: 16.3%; top: 12.6%; width: 67.4%; height: 74.8%; clip-path: none; background: #efe6da; }

/* =====================================================
   GALLERY — browse-only product catalogue
   ===================================================== */
.gl-tabs { flex-wrap: wrap; }
.gl-panel { padding: 28px; min-height: calc(100vh - 290px); }
.gl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 26px;
}
.gl-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 14px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(42, 23, 8, .08);
    transition: transform 250ms ease, box-shadow 250ms ease;
}
.gl-card:hover { color: inherit; transform: translateY(-4px); box-shadow: 0 16px 34px rgba(42, 23, 8, .18); }
.gl-img {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #efe6da;
}
.gl-img img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; transition: transform 600ms ease; }
.gl-card:hover .gl-img img { transform: scale(1.04); }
.gl-badge, .gl-out {
    position: absolute;
    top: 12px;
    padding: 4px 11px;
    border-radius: 999px;
    font: 700 11px var(--font);
    letter-spacing: .8px;
    text-transform: uppercase;
}
.gl-badge { left: 12px; background: #efe6da; color: #2a1708; }
.gl-out { right: 12px; background: #b3261e; color: #fff; }
.gl-info { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; }
.gl-col { font: 600 11px var(--font); letter-spacing: 1.6px; text-transform: uppercase; color: #8a6328; }
.gl-name { font: 700 19px/1.25 "Times New Roman", Times, serif; color: #1a1208; }
.gl-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-top: 2px; }
.gl-price { font: 600 15px var(--font); color: #2a1708; }
.gl-price s { margin-right: 4px; font-weight: 400; color: #a39383; }
.gl-stock { font-size: 12px; color: #8a7a6a; }
@media (max-width: 560px) {
    .gl-panel { padding: 16px; }
    .gl-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
    .gl-name { font-size: 16px; }
    .gl-info { padding: 12px; }
}

/* No gold frame in the admin preview either: plain portrait photo */
.pf-frame { aspect-ratio: 4 / 5; overflow: hidden; border-radius: 6px; background: #efe6da; box-shadow: 0 10px 24px rgba(0, 0, 0, .3); }
.pf-frame::after { display: none; }
.pf-frame-photo,
.pf-frame-empty,
.pf2-frame .pf-frame-photo { left: 0; top: 0; width: 100%; height: 100%; }

/* More photos (extra gallery for the product page) */
.pf2-more { margin-top: 14px; padding: 14px; border: 1px dashed rgba(239, 233, 225, .45); border-radius: 12px; }
.pf2-more-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.pf2-more-head span { font: 700 15px "Times New Roman", Times, serif; color: var(--cream); }
.pf2-more-head small { font-size: 12px; color: #cdbfb2; }
.pf2-more-head b { color: var(--cream); }
.pf2-more-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; border-radius: 8px; }
.pf2-more-grid.is-over { outline: 2px dashed var(--cream); outline-offset: 4px; }
.pf2-more-item, .pf2-more-add {
    position: relative;
    aspect-ratio: 4 / 5;
    margin: 0;
    overflow: hidden;
    border-radius: 6px;
}
.pf2-more-item { background: #efe6da; cursor: grab; box-shadow: 0 4px 10px rgba(0, 0, 0, .25); }
.pf2-more-item.is-drag { opacity: .4; }
.pf2-more-item img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.pf2-more-item button {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(26, 15, 6, .75);
    color: #fff;
    font: 16px/22px Arial, sans-serif;
    cursor: pointer;
}
.pf2-more-item button:hover { background: #b3261e; }
.pf2-more-add {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 1px dashed rgba(239, 233, 225, .5);
    color: var(--cream);
    font-size: 12px;
    cursor: pointer;
    transition: background 200ms;
}
.pf2-more-add:hover { background: rgba(255, 255, 255, .08); }
.pf2-more-add[hidden] { display: none; }
.pf2-more-add b { font-size: 22px; font-weight: 400; line-height: 1; }
.pf2-more-add input { position: absolute; width: 1px; height: 1px; opacity: 0; }

/* =====================================================
   LOGIN / REGISTER — linen theme (matches the shop)
   ===================================================== */
body.admin-auth {
    background: #ece5da url("../img/bg-img/linen-bg.jpg?v=2") left top / 640px auto repeat;
    color: #2a1708;
}
body.admin-auth::before {   /* soft veil so the card stands out */
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(ellipse at center, rgba(240, 234, 225, .15), rgba(120, 95, 70, .18));
    pointer-events: none;
}
.auth-back {
    top: 22px;
    right: auto;
    left: 22px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border: 1px solid rgba(60, 36, 5, .35);
    border-radius: 0;
    background: rgba(251, 248, 243, .7);
    backdrop-filter: blur(4px);
    color: #3c2405;
    font: 600 12px "Poppins", var(--font);
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: background 200ms, color 200ms, border-color 200ms;
}
.auth-back:hover { background: #3c2405; border-color: #3c2405; color: #f3ebe1; }

.auth-card {
    max-width: 420px;
    padding: 0 40px 34px;
    border-radius: 2px;
    background: #fbf8f3;
    border: 1px solid #e3d7c5;
    box-shadow: 0 30px 60px rgba(42, 23, 8, .2), 0 2px 0 #e3d7c5;
    backdrop-filter: none;
    overflow: hidden;
}
.auth-card::before {   /* lace strip across the top, like the shop navbar */
    content: "";
    display: block;
    height: 64px;
    margin: 0 -40px 30px;
    background: #2a1708 url("../img/bg-img/lace-bg.jpg") center / 420px auto repeat;
    border-bottom: 1px solid #1a0f06;
}
.auth-logo { display: block; width: 150px; margin: -82px auto 18px; position: relative; filter: brightness(0) invert(.94) sepia(.15); }
.auth-card h1 {
    font: 700 30px "Times New Roman", Times, serif;
    letter-spacing: .4px;
    color: #2a1708;
}
.auth-sub {
    margin: 8px 0 28px;
    font: italic 16px "Times New Roman", Times, serif;
    color: #7a6553;
}
.auth-card label {
    margin-bottom: 6px;
    font: 600 11px var(--font);
    letter-spacing: 1.8px;
    text-transform: uppercase;
    color: #6b5544;
}
.auth-card input {
    height: 44px;
    margin-bottom: 20px;
    padding: 0 2px;
    border: 0;
    border-bottom: 1.5px solid #d8cab5;
    border-radius: 0;
    background: transparent;
    color: #1a1208;
    font: 18px "Times New Roman", Times, serif;
}
.auth-card input::placeholder { color: #b9a893; font-style: italic; }
.auth-card input:focus { border-bottom-color: #3c2405; box-shadow: none; }

.auth-btn {
    height: 48px;
    margin-top: 8px;
    border-radius: 0;
    background: #3c2405;
    color: #f3ebe1;
    font: 600 13px/48px var(--font);
    letter-spacing: 2.5px;
    text-transform: uppercase;
}
.auth-btn:hover { background: #2a1708; color: #fff; transform: none; }
.auth-btn-ghost {
    background: transparent;
    color: #3c2405;
    border: 1px solid #3c2405;
    line-height: 46px;
}
.auth-btn-ghost:hover { background: #3c2405; color: #f3ebe1; }
.auth-divider { color: #9a8573; font: italic 14px "Times New Roman", Times, serif; margin: 22px 0; }
.auth-divider::before,
.auth-divider::after { background: #e3d7c5; }

.auth-msg { border-radius: 0; background: #f3ece1; color: #4a3b2d; border-left: 3px solid #b9a58a; }
.auth-msg.is-error { background: #fbeceb; color: #9b2c22; border-left-color: #b3261e; }
.auth-msg.is-ok { background: #edf4ea; color: #2f5d2a; border-left-color: #4b8a43; }
.auth-msg code { color: #2a1708; }

@media (max-width: 480px) {
    .auth-back { top: 14px; left: 14px; padding: 7px 14px; }
    .auth-card { padding: 0 24px 28px; }
    .auth-card::before { margin: 0 -24px 28px; }
}
.auth-card::before { height: 88px; margin-bottom: 30px; }
.auth-logo { width: 112px; margin: -101px auto 43px; }

/* =====================================================
   COLLECTION CARDS (cover photo + homepage banner settings)
   ===================================================== */
.cl-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 22px; }
.cl-card {
    display: flex;
    flex-direction: column;
    margin: 0;
    overflow: hidden;
    border: 1px solid #e3d7c5;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(42, 23, 8, .06);
}
.cl-card.is-home { border-color: #3c2405; box-shadow: 0 0 0 1px #3c2405, 0 10px 24px rgba(42, 23, 8, .12); }
.cl-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 7;
    margin: 0;
    overflow: hidden;
    background: #efe6da;
    cursor: pointer;
}
.cl-cover input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cl-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 500ms; }
.cl-cover:hover img { transform: scale(1.03); }
.cl-cover-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font: italic 16px "Times New Roman", Times, serif;
    color: #8a7a6a;
}
.cl-cover-empty[hidden] { display: none; }
.cl-cover-empty b { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 4px; border: 1px solid #b9a58a; border-radius: 50%; font: 400 22px var(--font); font-style: normal; }
.cl-cover-empty small { font: 12px var(--font); font-style: normal; color: #a39383; }
.cl-cover-change {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(26, 15, 6, .7);
    color: #fff;
    font: 600 12px var(--font);
    opacity: 0;
    transition: opacity 200ms;
}
.cl-cover:hover .cl-cover-change,
.cl-cover.is-new .cl-cover-change { opacity: 1; }
.cl-cover.is-new .cl-cover-change { background: #8a6328; }
.cl-home-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 11px;
    border-radius: 999px;
    background: #3c2405;
    color: #f3ebe1;
    font: 700 11px var(--font);
    letter-spacing: 1px;
    text-transform: uppercase;
}
.cl-card-body { display: flex; flex-direction: column; gap: 14px; padding: 18px 20px 18px; }
.cl-card-row { display: grid; grid-template-columns: 1fr 80px; gap: 14px; }
.cl-field { display: flex; flex-direction: column; gap: 4px; margin: 0; }
.cl-field span { font: 700 10px var(--font); letter-spacing: 1.4px; text-transform: uppercase; color: #8a7a6a; }
.cl-field input {
    height: 36px;
    padding: 0 2px;
    border: 0;
    border-bottom: 1.5px solid #e3d7c5;
    background: transparent;
    color: #1a1208;
    font: 16px "Times New Roman", Times, serif;
}
.cl-field-name input { font-weight: 700; font-size: 19px; }
.cl-field-pos input { text-align: center; }
.cl-field input:focus { outline: none; border-bottom-color: #3c2405; }
.cl-switch { display: flex; align-items: center; gap: 10px; margin: 2px 0 0; font: 600 14px var(--font); color: #2a1708; cursor: pointer; }
.cl-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cl-switch-ui { position: relative; flex: 0 0 40px; height: 22px; border-radius: 999px; background: #d8cab5; transition: background 200ms; }
.cl-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform 200ms; }
.cl-switch input:checked + .cl-switch-ui { background: #3c2405; }
.cl-switch input:checked + .cl-switch-ui::after { transform: translateX(18px); }
.cl-switch input:focus-visible + .cl-switch-ui { outline: 2px solid var(--gold); outline-offset: 2px; }
.cl-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid #f0e8dc; }
.cl-card-btns { display: flex; gap: 8px; }
.cl-howto p { margin: 0 0 16px; font-size: 14px; line-height: 1.8; color: #4a3b2d; }
@media (max-width: 560px) { .cl-cards { grid-template-columns: 1fr; } }
.cl-card-row { grid-template-columns: minmax(0, 1fr) 64px; }
.cl-field { min-width: 0; }
.cl-field input { width: 100%; min-width: 0; }

/* Cover preview follows the saved framing */
.cl-cover img { transform: scale(var(--z, 1)); }
.cl-cover:hover img { transform: scale(calc(var(--z, 1) * 1.03)); }
.cl-card.is-dirty { border-color: #8a6328; box-shadow: 0 0 0 1px #8a6328; }
.cl-card.is-dirty .cl-card-foot .cl-btn-dark { background: #8a6328; border-color: #8a6328; }
.cl-frame-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 40px;
    border: 0;
    border-bottom: 1px solid #f0e8dc;
    background: #f7f2ea;
    color: #3c2405;
    font: 600 13px var(--font);
    cursor: pointer;
    transition: background .2s ease;
}
.cl-frame-btn:hover { background: #efe6da; }
.cl-frame-btn svg { width: 17px; height: 17px; }

/* =====================================================
   BANNER FRAMING EDITOR (dialog)
   ===================================================== */
.fx-dialog {
    width: min(1060px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    padding: 0;
    border: 0;
    border-radius: 16px;
    background: #fbf8f3;
    color: #2a1708;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.fx-dialog::backdrop { background: rgba(26, 15, 6, .65); backdrop-filter: blur(3px); }
.fx-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 26px 0; }
.fx-head h2 { margin: 0; font: 700 26px "Times New Roman", Times, serif; color: #1a1208; }
.fx-x { width: 36px; height: 36px; border: 1px solid #e3d7c5; border-radius: 50%; background: #fff; font: 22px/1 Arial, sans-serif; color: #2a1708; cursor: pointer; }
.fx-x:hover { background: #3c2405; color: #fff; }
.fx-hint { margin: 6px 26px 18px; font-size: 13px; color: #7a6553; }
.fx-stage { display: grid; grid-template-columns: minmax(0, 1fr) 190px; gap: 20px; align-items: end; padding: 0 26px; }
.fx-label { display: block; margin-bottom: 6px; font: 700 10px var(--font); letter-spacing: 1.5px; text-transform: uppercase; color: #8a7a6a; }
.fx-frame {
    position: relative;
    overflow: hidden;
    background: #1a0f06;
    cursor: grab;
    touch-action: none;
    user-select: none;
    box-shadow: 0 10px 24px rgba(42, 23, 8, .2);
}
.fx-frame.is-drag { cursor: grabbing; }
.fx-frame-d { aspect-ratio: 2 / 1; border-radius: 6px; }
.fx-frame-m { aspect-ratio: 9 / 16; border-radius: 14px; border: 4px solid #2a1708; }
.fx-frame img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.fx-safe {   /* where the title + Shop now sit on the homepage */
    position: absolute;
    left: 4%;
    bottom: 8%;
    width: 40%;
    height: 34%;
    border: 1.5px dashed rgba(255, 255, 255, .7);
    background: linear-gradient(to top, rgba(0, 0, 0, .35), transparent);
    pointer-events: none;
}
.fx-frame-m .fx-safe { left: 5%; width: 80%; bottom: 6%; height: 26%; }
.fx-grid {   /* rule-of-thirds guide */
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, transparent 33.2%, rgba(255, 255, 255, .25) 33.3%, transparent 33.5%, transparent 66.5%, rgba(255, 255, 255, .25) 66.6%, transparent 66.8%),
        linear-gradient(to bottom, transparent 33.2%, rgba(255, 255, 255, .25) 33.3%, transparent 33.5%, transparent 66.5%, rgba(255, 255, 255, .25) 66.6%, transparent 66.8%);
    pointer-events: none;
}
.fx-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 20px 26px 0; }
.fx-zoom { display: flex; align-items: center; gap: 10px; flex: 1; max-width: 520px; margin: 0; }
.fx-zoom > span { font: 700 11px var(--font); letter-spacing: 1.5px; text-transform: uppercase; color: #6b5544; }
.fx-zoom button { width: 32px; height: 32px; flex: 0 0 32px; border: 1px solid #e3d7c5; border-radius: 50%; background: #fff; font-size: 18px; color: #2a1708; cursor: pointer; }
.fx-zoom button:hover { background: #3c2405; color: #fff; }
.fx-zoom input { flex: 1; accent-color: #3c2405; }
.fx-zoom b { min-width: 46px; text-align: right; font: 700 14px var(--font); }
.fx-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 22px; padding: 16px 26px; border-top: 1px solid #ece2d3; background: #f3ece1; }
.fx-foot small { color: #6b5544; font-size: 13px; }
.fx-foot span { display: flex; gap: 8px; }
.fx-foot .cl-btn { height: 40px; padding: 0 22px; }
@media (max-width: 720px) {
    .fx-stage { grid-template-columns: 1fr 120px; gap: 12px; padding: 0 16px; }
    .fx-head, .fx-controls, .fx-foot { padding-left: 16px; padding-right: 16px; }
    .fx-hint { margin-left: 16px; margin-right: 16px; }
}

/* Sharpness check in the framing editor */
.fx-quality { margin-left: auto; padding: 6px 12px; border-radius: 999px; font: 600 12px var(--font); }
.fx-quality:empty { display: none; }
.fx-quality::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: currentColor; }
.fx-quality.is-good { background: #edf4ea; color: #2f5d2a; }
.fx-quality.is-ok { background: #fbf3e2; color: #8a5a12; }
.fx-quality.is-bad { background: #fbeceb; color: #9b2c22; }

/* =====================================================
   EDIT PRODUCT
   ===================================================== */
.pe-col { width: 1%; white-space: nowrap; text-align: right; }
.pe-col > * { vertical-align: middle; }
.pe-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    border: 1px solid #3c2405;
    border-radius: 8px;
    background: #3c2405;
    color: #f3ebe1;
    font: 600 13px var(--font);
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}
.pe-btn:hover { background: #fff; color: #3c2405; }
.pe-btn svg { width: 15px; height: 15px; }
.pe-open {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-left: 6px;
    border: 1px solid #e3d7c5;
    border-radius: 8px;
    color: #6b5544;
    transition: background .2s ease, color .2s ease;
}
.pe-open:hover { background: #f3ece1; color: #2a1708; }
.pe-open svg { width: 16px; height: 16px; }
.pe-name { color: #1a1208; font-weight: 600; text-decoration: none; }
.pe-name:hover { color: #8a6328; text-decoration: underline; }

.pf-editbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 16px;
    padding: 12px 18px;
    border-radius: 10px;
    background: rgba(243, 235, 225, .1);
    border: 1px solid rgba(243, 235, 225, .25);
    color: #e6dbcf;
    font-size: 14px;
}
.pf-editbar b { color: #fff; }
.pf-editbar .ap-link { color: #e8d3a8; }
.pf2-note-top { margin: 0 0 12px; text-align: center; }
.pf2-remove { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; font-size: 13px; color: #e6dbcf; cursor: pointer; }
.pf2-remove input { accent-color: #b3261e; }
a.pf-reset { display: inline-flex; align-items: center; text-decoration: none; }
a.pf-reset:hover { color: var(--cream); }
.pf2-more-item.is-saved { cursor: default; }

/* Move bar: only shown when products are ticked (no dashed box) */
.cl-bulk[hidden] { display: none; }
.cl-bulk { border: 0; background: #f3ece1; }
.pf-badge { left: 10px; top: 10px; padding: 4px 11px; border-radius: 999px; background: #efe6da; color: #2a1708; font: 700 11px var(--font); letter-spacing: 1px; text-transform: uppercase; }
.pf-badge.is-sale { background: #c9a96e; color: #24140a; }

/* =====================================================
   SHIPPING
   ===================================================== */
.sh-form { display: flex; flex-direction: column; gap: 24px; }
.sh-regions { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.sh-region { padding: 22px 24px; border: 1px solid #e3d7c5; border-radius: 12px; background: #fff; }
.sh-region h3 { margin: 0; font: 700 20px "Times New Roman", Times, serif; color: #1a1208; }
.sh-sub { margin: 4px 0 18px; font-size: 13px; color: #8a7a6a; }
.sh-field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; }
.sh-field > span:first-child { font: 700 10px var(--font); letter-spacing: 1.4px; text-transform: uppercase; color: #8a7a6a; }
.sh-money { display: flex; align-items: center; gap: 8px; border-bottom: 1.5px solid #e3d7c5; }
.sh-money b { font: 600 14px var(--font); color: #8a6328; }
.sh-money input { flex: 1; min-width: 0; height: 40px; border: 0; background: transparent; font: 18px "Times New Roman", Times, serif; color: #1a1208; }
.sh-money input:focus { outline: none; }
.sh-money:focus-within { border-bottom-color: #3c2405; }
.sh-money-sm { max-width: 200px; }
.sh-money-sm input { height: 34px; font-size: 16px; }
.sh-table td { vertical-align: middle; }
.sh-howto h3 { margin: 0 0 10px; font: 700 18px "Times New Roman", Times, serif; color: #2a1708; }
.sh-howto ol { margin: 0 0 10px; padding-left: 20px; font-size: 14px; line-height: 1.9; color: #4a3b2d; }
.sh-howto p { margin: 0; font-size: 13px; color: #6b5544; }
.sh-actions { position: sticky; bottom: 12px; }
@media (max-width: 760px) { .sh-regions { grid-template-columns: 1fr; } }

/* =====================================================
   OVERVIEW METRICS — business style
   ===================================================== */
.ap-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    padding: 0 !important;
    border: 1px solid #e3d7c5;
    border-radius: 12px !important;
    background: #fbf8f3 !important;
    box-shadow: 0 1px 2px rgba(42, 23, 8, .06) !important;
    overflow: hidden;
}
.ap-stats-label {
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 16px 26px !important;
    border-bottom: 1px solid #e3d7c5;
    background: #f3ece1;
    font: 700 11px var(--font) !important;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #2a1708 !important;
}
.ap-stats-label::after {
    content: "Last 7 days vs. the week before";
    margin-left: auto;
    font: 500 12px var(--font);
    letter-spacing: 0;
    text-transform: none;
    color: #8a7a6a;
}
.ap-stats-icon { width: 24px !important; height: 24px !important; border-radius: 6px !important; background: #3c2405 !important; color: #f3ebe1 !important; align-self: center; }
.ap-stats-icon svg { width: 14px !important; height: 14px !important; }

.ap-stat {
    position: relative;
    gap: 14px !important;
    padding: 22px 26px 24px !important;
    border-left: 1px solid #ece2d3 !important;
    border-radius: 0 !important;
    transition: background .2s ease;
}
.ap-stats-label + .ap-stat { border-left: 0 !important; }
.ap-stat::before {   /* accent bar on hover */
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 2px;
    background: #3c2405;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .3s ease;
}
.ap-stat:hover { background: #fff !important; }
.ap-stat:hover::before { transform: scaleX(1); }
.ap-stat-label { font: 600 11px var(--font) !important; letter-spacing: 1.6px; text-transform: uppercase; color: #8a7a6a !important; }
.ap-stat-info { width: 15px !important; height: 15px !important; border-color: #cbbfae !important; color: #a39383 !important; font-size: 9px !important; }
.ap-stat-row { flex-direction: column; align-items: flex-start !important; gap: 10px !important; }
.ap-stat-value {
    font: 600 34px/1 var(--font) !important;
    letter-spacing: -1px !important;
    font-variant-numeric: tabular-nums;
    color: #1a1208 !important;
}
.ap-stat-value small { font-size: 14px !important; font-weight: 600 !important; color: #8a7a6a; margin-right: 4px !important; letter-spacing: 0; }
.ap-stat.is-alert .ap-stat-value { color: #9b2c22 !important; }
.ap-trend { flex-direction: row !important; align-items: center !important; gap: 8px; text-align: left !important; font-size: 12px !important; color: #8a7a6a !important; }
.ap-trend b {
    padding: 3px 8px;
    border-radius: 999px;
    font: 700 11px var(--font) !important;
    letter-spacing: .3px;
    white-space: nowrap;
}
.ap-trend.is-up b   { background: #e8f1e5; color: #2f5d2a !important; }
.ap-trend.is-down b { background: #f8e6e4; color: #9b2c22 !important; }
.ap-trend.is-flat b { background: #efe8de; color: #6b5544 !important; }

@media (max-width: 1100px) { .ap-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } .ap-stat:nth-of-type(odd) { border-left: 0 !important; } .ap-stat { border-top: 1px solid #ece2d3; } }
@media (max-width: 560px) {
    .ap-stats { grid-template-columns: 1fr !important; }
    .ap-stat { border-left: 0 !important; }
    .ap-stats-label::after { display: none; }
}

/* =====================================================
   DATE RANGE + SALES CHART
   ===================================================== */
.ap-stats { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
.ap-stats-label::after { content: none !important; }
.ap-stats-range { margin-left: auto; font: 500 12px var(--font); font-style: normal; letter-spacing: 0; text-transform: none; color: #8a7a6a; }
.ap-stat-value { font-size: 30px !important; }

.dr { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 14px 0 22px; position: relative; z-index: 5; }
.dr-chips { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid #e3d7c5; border-radius: 999px; background: #fbf8f3; }
.dr-chip { padding: 7px 14px; border-radius: 999px; font: 600 12px var(--font); color: #6b5544 !important; text-decoration: none !important; white-space: nowrap; transition: background .2s, color .2s; }
.dr-chip:hover { background: #efe6da; color: #2a1708 !important; }
.dr-chip.is-on { background: #3c2405; color: #f3ebe1 !important; }
.dr-more { position: relative; }
.dr-more summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border: 1px solid #e3d7c5; border-radius: 999px; background: #fbf8f3; font: 600 12px var(--font); color: #2a1708; cursor: pointer; }
.dr-more summary::-webkit-details-marker { display: none; }
.dr-more summary svg { width: 15px; height: 15px; }
.dr-more[open] summary { border-color: #3c2405; }
.dr-pop { position: absolute; top: calc(100% + 8px); right: 0; width: 300px; padding: 18px; display: grid; gap: 12px; border: 1px solid #e3d7c5; border-radius: 12px; background: #fbf8f3; box-shadow: 0 14px 34px rgba(42, 23, 8, .14); }
.dr-pop label { display: grid; gap: 5px; margin: 0; }
.dr-pop label span { font: 600 10px var(--font); letter-spacing: 1.5px; text-transform: uppercase; color: #8a7a6a; }
.dr-pop input, .dr-pop select { width: 100%; height: 38px; padding: 0 10px; border: 1px solid #ddd0bd; border-radius: 8px; background: #fff; font: 500 13px var(--font); color: #2a1708; }
.dr-pop input:focus, .dr-pop select:focus { outline: none; border-color: #3c2405; }
.dr-range { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dr-btns { display: flex; justify-content: flex-end; align-items: center; gap: 14px; margin-top: 4px; }
.dr-clear { font: 600 12px var(--font); color: #8a7a6a !important; }
.dr-apply { height: 36px; padding: 0 20px; border: 0; border-radius: 999px; background: #3c2405; color: #f3ebe1; font: 600 12px var(--font); letter-spacing: .5px; cursor: pointer; }
.dr-apply:hover { background: #2a1708; }
.dr-pop small { font: 400 11px var(--font); color: #a39383; }

.ap-panel-head h2 small { margin-left: 8px; font: 500 12px var(--font); letter-spacing: 0; text-transform: none; color: #a39383; }
.sc-total { font: 600 20px var(--font); color: #1a1208; font-variant-numeric: tabular-nums; }
.sc-total small { font: 500 12px var(--font); color: #8a7a6a; margin-left: 6px; }
.sc-chart { display: grid; grid-template-columns: auto 1fr; gap: 12px; height: 230px; padding: 8px 4px 0; }
.sc-grid { display: flex; flex-direction: column; justify-content: space-between; padding-bottom: 24px; font: 500 10px var(--font); color: #a39383; text-align: right; white-space: nowrap; }
.sc-bars { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 3px; align-items: end; border-bottom: 1px solid #e3d7c5;
    background: repeating-linear-gradient(to top, transparent 0, transparent calc(50% - 1px), #efe6da calc(50% - 1px), #efe6da 50%); background-size: 100% calc(100% - 24px); background-repeat: no-repeat; }
.sc-bar { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 24px; }
.sc-bar i { display: block; width: 100%; max-width: 38px; margin: 0 auto; border-radius: 4px 4px 0 0; background: #3c2405; opacity: .85; transition: opacity .2s, background .2s; }
.sc-bar:hover i { opacity: 1; background: #8a5a2b; }
.sc-bar span { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); font: 500 10px var(--font); color: #8a7a6a; white-space: nowrap; }
.ot-export { margin-left: auto; display: inline-flex !important; align-items: center; gap: 6px; }
.ot-export svg { width: 15px; height: 15px; }

@media (max-width: 1280px) { .ap-stats { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (max-width: 760px) {
    .ap-stats { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .ap-stats-range { display: none; }
    .dr-pop { width: min(300px, calc(100vw - 32px)); }
    .sc-chart { height: 180px; }
    .sc-bar span { display: none; }
    .ot-export { margin-left: 0; }
}
@media (max-width: 1280px) {
    .ap-stat { border-left: 0 !important; border-top: 1px solid #ece2d3; box-shadow: inset -1px 0 #ece2d3; }
}
.dr-pop *, .dr-pop { box-sizing: border-box; }
@media (max-width: 760px) {
    .dr-chips { border-radius: 14px; }
    .ap-stat-value { font-size: 24px !important; }
    .ap-stat { padding: 18px 16px 20px !important; }
}

/* ---------- Date picker + sales chart: refined ---------- */
.sc-panel { margin-bottom: 30px; }
.dr-pop {
    width: 340px; padding: 20px 20px 18px; gap: 14px;
    border-radius: 14px; border-color: #e6dccd;
    box-shadow: 0 18px 40px rgba(42, 23, 8, .18), 0 2px 6px rgba(42, 23, 8, .06);
}
.dr-title { margin: 0; font: 700 16px "Times New Roman", Times, serif; color: #1a1208; }
.dr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dr-row-my { grid-template-columns: 1.35fr 1fr; }
.dr-pop label { min-width: 0; }
.dr-pop label span { font-size: 9.5px; letter-spacing: 1.4px; }
.dr-pop input, .dr-pop select {
    height: 38px; padding: 0 10px; min-width: 0;
    border: 1px solid #e3d7c5; border-radius: 8px; background: #fff;
    font: 500 13px var(--font); color: #2a1708;
    transition: border-color .2s, box-shadow .2s;
}
.dr-pop select {
    -webkit-appearance: none; appearance: none; padding-right: 28px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%238a7a6a' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center / 12px;
}
.dr-pop input:focus, .dr-pop select:focus { border-color: #3c2405; box-shadow: 0 0 0 3px rgba(60, 36, 5, .08); }
.dr-pop input::-webkit-calendar-picker-indicator { opacity: .5; cursor: pointer; }
.dr-or { display: flex; align-items: center; gap: 10px; margin: 2px 0 -2px; font: 500 11px var(--font); color: #a39383; }
.dr-or::before, .dr-or::after { content: ""; flex: 1; height: 1px; background: #ece2d3; }
.dr-btns { margin-top: 2px; padding-top: 14px; border-top: 1px solid #ece2d3; justify-content: space-between; }
.dr-clear { text-decoration: none !important; }
.dr-clear:hover { color: #2a1708 !important; }
.dr-apply { height: 36px; padding: 0 24px; }

.sc-chart { height: 240px; gap: 14px; padding: 6px 0 0; }
.sc-grid { padding-bottom: 26px; line-height: 1; }
.sc-grid span:first-child { margin-top: -5px; }
.sc-grid span:last-child { margin-bottom: -5px; }
.sc-bars { position: relative; border-bottom: 0; background: none; gap: 4px; }
.sc-bars::before {   /* 3 guide lines: top, middle, baseline */
    content: ""; position: absolute; left: 0; right: 0; top: 0; bottom: 26px; pointer-events: none;
    border-top: 1px dashed #ece2d3; border-bottom: 1px solid #d9cbb6;
    background: linear-gradient(#ece2d3, #ece2d3) left 50% / 100% 1px no-repeat;
}
.sc-bar { padding-bottom: 26px; z-index: 1; }
.sc-bar i { max-width: 22px; border-radius: 5px 5px 0 0; background: linear-gradient(#5a3a17, #3c2405); opacity: .9; }
.sc-bar span { bottom: 6px; }
@media (max-width: 760px) {
    .dr-pop { width: min(340px, calc(100vw - 32px)); }
    .sc-chart { height: 190px; }
    .sc-bar span { display: none; }
    .sc-bar, .sc-grid { padding-bottom: 0; }
    .sc-bars::before { bottom: 0; }
}
.ap-stat { justify-content: flex-start !important; }

/* =====================================================
   ORDER DETAILS — tidy on tablet & phone
   ===================================================== */
@media (max-width: 1100px) {
    .ox-sheet .ox-grid { grid-template-columns: minmax(0, 1fr); }
    .ox-sheet .ox-side { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (max-width: 700px) {
    .ox-sheet { padding: 22px 18px 26px; }
    .ox-sheet .ox-intro { margin-bottom: 16px; padding-bottom: 14px; }
    .ox-sheet .ox-hello { font-size: 17px; }
    .ox-sheet .ox-hello strong { font-size: 22px; }
    .ox-sheet .ox-strip dd { font-size: 15px; }

    /* item: picture on the left, name on top, qty + price underneath */
    .ox-sheet .ox-item {
        grid-template-columns: 64px minmax(0, 1fr) auto;
        grid-template-areas: "thumb info info" "thumb qty price";
        gap: 6px 14px; align-items: center;
    }
    .ox-sheet .ox-thumb { grid-area: thumb; width: 64px; height: 80px; align-self: start; }
    .ox-sheet .ox-item-info { grid-area: info; min-width: 0; }
    .ox-sheet .ox-item-info h3 { font-size: 17px; line-height: 1.25; overflow-wrap: anywhere; }
    .ox-sheet .ox-qty { grid-area: qty; grid-column: auto; }
    .ox-sheet .ox-qty b { min-width: 24px; height: 24px; font-size: 12px; }
    .ox-sheet .ox-price { grid-area: price; grid-column: auto; grid-row: auto; font-size: 17px; }

    /* manage order */
    .ox-sheet .ox-manage { margin-top: 20px; padding-top: 18px; }
    .ox-sheet .ox-h { font-size: 20px; margin-bottom: 14px; }
    .ox-sheet .ox-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
    .ox-sheet .ox-row fieldset, .ox-sheet .ox-field { width: 100%; min-width: 0; }
    .ox-sheet .ox-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: 100%; }
    .ox-sheet .ox-seg label { min-width: 0; }
    .ox-sheet .ox-seg span { padding: 11px 4px; font-size: 14px; text-align: center; white-space: nowrap; }
    .ox-sheet .ox-field select, .ox-sheet .ox-field input { width: 100%; height: 46px; font-size: 16px; box-sizing: border-box; }
    .ox-sheet .ox-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; justify-items: stretch; }
    .ox-sheet .ox-note { flex: none; text-align: left; }
    .ox-sheet .ox-test { text-align: center; }
    .ox-sheet .ox-save { width: 100%; }

    /* totals, address, receipt: one under another */
    .ox-sheet .ox-side { display: block; margin-top: 22px; padding-top: 18px; }
    .ox-sheet .ox-side .ox-card { padding: 0 0 16px; margin-bottom: 16px; border-bottom: 1px solid #ece2d3; }
    .ox-sheet .ox-side .ox-card:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
    .ox-sheet .ox-value { font-size: 15px; overflow-wrap: anywhere; }
    .ox-sheet .ox-receipt-btn { height: 46px; font-size: 15px; }
}
