/* =============================================================================
   Grivenza Jewelry — admin stylesheet
   Design tokens mirror the storefront (assets/css/style.css) so the panel reads
   as part of the same brand: Cormorant Garamond display, Jost body, gold on ink.
   Tokens → base → shell → components → modules → responsive
   ========================================================================== */

/* ---------------------------------------------------------------- tokens */
:root {
    --ink: #101014;
    --ink-2: #1c1c22;
    --ink-soft: #5a5a63;
    --ink-faint: #8b8b93;
    --paper: #ffffff;
    --paper-2: #f6f4f0;
    --paper-3: #efece5;
    --gold: #9b8269;
    --gold-dark: #7d6954;
    --gold-tint: #f3eee8;
    --gold-soft: #d9cdbe;
    --btn: #292929;
    --btn-hover: #9b8269;
    --line: #e6e2da;
    --line-strong: #cdc7ba;
    --sale: #b4342c;
    --sale-tint: #fbeeed;
    --ok: #2c7a4b;
    --ok-tint: #eaf5ee;
    --info: #2f5d8a;
    --info-tint: #ecf2f8;
    --warn: #9a6b13;
    --warn-tint: #fdf3e2;

    --f-display: "Cormorant Garamond", Georgia, serif;
    --f-body: "Jost", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    --side: 264px;
    --gut: 24px;
    --r: 2px;
    --r-btn: 4px;
    --t: 200ms ease;
    --shadow: 0 10px 40px rgba(16, 16, 20, 0.08);
    --shadow-sm: 0 2px 8px rgba(16, 16, 20, 0.05);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* ---------------------------------------------------------------- base */
body {
    margin: 0;
    font-family: var(--f-body);
    font-weight: 300;
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--paper-2);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    cursor: pointer;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-family: var(--f-display);
    font-weight: 600;
    line-height: 1.15;
}

p {
    margin: 0 0 1em;
}

table {
    border-collapse: collapse;
    width: 100%;
}

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 24px 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.eyebrow {
    margin: 0 0 6px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold);
}

.muted {
    color: var(--ink-soft);
}

.faint {
    color: var(--ink-faint);
}

.tiny {
    font-size: 12px;
}

.mono {
    font-variant-numeric: tabular-nums;
}

.nowrap {
    white-space: nowrap;
}

.right {
    text-align: right;
}

.center {
    text-align: center;
}

/* =============================================================================
   Shell
   ========================================================================== */
.shell {
    display: flex;
    min-height: 100vh;
}

/* ---------------------------------------------------------------- sidebar */
.side {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--side);
    background: var(--ink);
    color: #efece5;
    display: flex;
    flex-direction: column;
    z-index: 60;
}

.side__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 22px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.side__mark {
    width: 38px;
    height: 38px;
    flex: none;
    display: grid;
    place-items: center;
    border: 1px solid var(--gold);
    color: var(--gold);
    font-family: var(--f-display);
    font-size: 19px;
    font-weight: 600;
}

.side__name {
    font-family: var(--f-display);
    font-size: 21px;
    letter-spacing: 0.02em;
    line-height: 1;
    display: block;
}

.side__tag {
    display: block;
    margin-top: 3px;
    font-size: 9px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--gold);
}

.side__scroll {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0 24px;
    scrollbar-width: thin;
}

.side__group {
    padding: 14px 22px 6px;
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(239, 236, 229, 0.38);
}

.side__link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 22px;
    font-size: 14px;
    color: rgba(239, 236, 229, 0.78);
    border-left: 2px solid transparent;
    transition:
        color var(--t),
        background var(--t),
        border-color var(--t);
}

.side__link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.04);
}

.side__link.is-on {
    color: #fff;
    background: rgba(155, 130, 105, 0.16);
    border-left-color: var(--gold);
}

.side__link svg {
    flex: none;
    opacity: 0.75;
}

.side__link.is-on svg {
    opacity: 1;
    color: var(--gold);
}

.side__link span {
    flex: 1;
}

.side__count {
    min-width: 20px;
    padding: 1px 6px;
    border-radius: 10px;
    background: var(--gold);
    color: var(--ink);
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.side__count--quiet {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.7);
}

.side__foot {
    padding: 14px 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
    color: rgba(239, 236, 229, 0.5);
}

.side__foot a {
    color: var(--gold);
}

/* ---------------------------------------------------------------- main */
.main {
    flex: 1;
    min-width: 0;
    margin-left: var(--side);
    display: flex;
    flex-direction: column;
}

.top {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 var(--gut);
    height: 66px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}

.top__burger {
    display: none;
    background: none;
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 8px;
    line-height: 0;
}

.top__title {
    flex: 1;
    min-width: 0;
}

.top__title h1 {
    font-size: 24px;
    letter-spacing: 0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top__title p {
    margin: 2px 0 0;
    font-size: 12.5px;
    color: var(--ink-soft);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: none;
}

.who {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-left: 14px;
    border-left: 1px solid var(--line);
}

.who__av {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gold-tint);
    color: var(--gold-dark);
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.04em;
}

.who__name {
    display: block;
    font-size: 13px;
    line-height: 1.25;
}

.who__role {
    display: block;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.page {
    flex: 1;
    padding: var(--gut) var(--gut) 64px;
    max-width: 1500px;
    width: 100%;
}

/* =============================================================================
   Components
   ========================================================================== */

/* ---------------------------------------------------------------- buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid var(--btn);
    border-radius: var(--r-btn);
    background: var(--btn);
    color: #fff;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition:
        background var(--t),
        border-color var(--t),
        color var(--t);
    white-space: nowrap;
}

.btn:hover {
    background: var(--btn-hover);
    border-color: var(--btn-hover);
}

.btn--gold {
    background: var(--gold);
    border-color: var(--gold);
}

.btn--gold:hover {
    background: var(--gold-dark);
    border-color: var(--gold-dark);
}

.btn--ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line-strong);
}

.btn--ghost:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.btn--danger {
    background: transparent;
    color: var(--sale);
    border-color: rgba(180, 52, 44, 0.4);
}

.btn--danger:hover {
    background: var(--sale);
    border-color: var(--sale);
    color: #fff;
}

.btn--sm {
    padding: 7px 12px;
    font-size: 11px;
}

.btn--xs {
    padding: 5px 9px;
    font-size: 10px;
    letter-spacing: 0.05em;
}

.btn--block {
    width: 100%;
}

.btn[disabled] {
    opacity: 0.45;
    pointer-events: none;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

/* Quiet icon button used inside tables */
.ibtn {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--paper);
    color: var(--ink-soft);
    transition: all var(--t);
}

.ibtn:hover {
    border-color: var(--gold);
    color: var(--gold-dark);
    background: var(--gold-tint);
}

.ibtn--danger:hover {
    border-color: var(--sale);
    color: var(--sale);
    background: var(--sale-tint);
}

/* ---------------------------------------------------------------- cards */
.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shadow-sm);
}

.card + .card {
    margin-top: var(--gut);
}

.card__head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}

.card__head h2,
.card__head h3 {
    font-size: 18px;
    flex: 1;
    min-width: 0;
}

.card__head p {
    margin: 2px 0 0;
    font-size: 12.5px;
    color: var(--ink-soft);
}

.card__body {
    padding: 20px;
}

.card__body--flush {
    padding: 0;
}

.card__foot {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-top: 1px solid var(--line);
    background: var(--paper-2);
}

/* ---------------------------------------------------------------- layout helpers */
.grid {
    display: grid;
    gap: var(--gut);
}

.grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid--kpi {
    grid-template-columns: repeat(auto-fit, minmax(212px, 1fr));
}

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: var(--gut);
    align-items: start;
}

.split--wide {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
}

.split--narrow {
    grid-template-columns: minmax(0, 1fr) 300px;
}

.stack {
    display: grid;
    gap: var(--gut);
}

/* ---------------------------------------------------------------- kpi */
.kpi {
    position: relative;
    padding: 18px 20px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.kpi::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 2px;
    background: var(--gold);
    opacity: 0.5;
}

.kpi__label {
    margin: 0;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.kpi__value {
    margin: 6px 0 0;
    font-family: var(--f-display);
    font-size: 30px;
    font-weight: 600;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
}

.kpi__meta {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--ink-soft);
}

.kpi__meta strong {
    font-weight: 500;
    color: var(--ink);
}

/* ---------------------------------------------------------------- tables */
.table-wrap {
    overflow-x: auto;
}

.tbl {
    min-width: 100%;
    font-size: 14px;
}

.tbl th {
    padding: 11px 14px;
    text-align: left;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-faint);
    background: var(--paper-2);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.tbl td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.tbl tbody tr:hover {
    background: #fbfaf8;
}

.tbl tbody tr:last-child td {
    border-bottom: 0;
}

.tbl__actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.tbl--fixed {
    table-layout: fixed;
}

.check {
    width: 16px;
    height: 16px;
    accent-color: var(--gold);
}

/* Product/entity cell with thumbnail */
.ent {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.ent__thumb {
    width: 46px;
    height: 46px;
    flex: none;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--paper-3);
    overflow: hidden;
}

.ent__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ent__thumb--lg {
    width: 64px;
    height: 64px;
}

.ent__body {
    min-width: 0;
}

.ent__title {
    display: block;
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ent__title:hover {
    color: var(--gold-dark);
}

.ent__sub {
    display: block;
    margin-top: 1px;
    font-size: 11.5px;
    color: var(--ink-faint);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Unread marker */
.dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 5px;
    border-radius: 50%;
    background: var(--gold);
    vertical-align: middle;
}

/* Initials badge for customer/admin rows */
.avatar {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: none;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--paper-3);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--ink-soft);
}

.avatar--sm {
    width: 34px;
    height: 34px;
    font-size: 11px;
}

.avatar--gold {
    border-color: var(--gold-soft);
    background: var(--gold-tint);
    color: var(--gold-dark);
}

/* ---------------------------------------------------------------- pills */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--paper-3);
    color: var(--ink-soft);
    white-space: nowrap;
}

.pill--ok {
    background: var(--ok-tint);
    color: var(--ok);
}

.pill--danger {
    background: var(--sale-tint);
    color: var(--sale);
}

.pill--warn {
    background: var(--warn-tint);
    color: var(--warn);
}

.pill--info {
    background: var(--info-tint);
    color: var(--info);
}

.pill--gold {
    background: var(--gold-tint);
    color: var(--gold-dark);
}

.pill--muted {
    background: var(--paper-3);
    color: var(--ink-faint);
}

.pill--dot::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* ---------------------------------------------------------------- forms */
.field {
    margin-bottom: 18px;
}

.field:last-child {
    margin-bottom: 0;
}

.field__label {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.field__label .req {
    color: var(--sale);
}

.field__hint {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--ink-faint);
    line-height: 1.45;
}

.field__error {
    margin: 6px 0 0;
    font-size: 12px;
    color: var(--sale);
}

.input,
.select,
.textarea {
    width: 100%;
    padding: 10px 12px;
    font: inherit;
    font-size: 14px;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--line-strong);
    border-radius: var(--r);
    transition:
        border-color var(--t),
        box-shadow var(--t);
}

.input:focus,
.select:focus,
.textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(155, 130, 105, 0.14);
}

.input[readonly] {
    background: var(--paper-2);
    color: var(--ink-soft);
}

.input.is-bad,
.select.is-bad,
.textarea.is-bad {
    border-color: var(--sale);
}

.textarea {
    min-height: 110px;
    resize: vertical;
    line-height: 1.55;
}

.textarea--code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 13px;
    min-height: 320px;
}

.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%235a5a63' stroke-width='1.4' d='M1 1.5 6 6.5l5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
}

.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .input {
    border-radius: var(--r) 0 0 var(--r);
}

.input-group__addon {
    display: grid;
    place-items: center;
    padding: 0 12px;
    font-size: 13px;
    color: var(--ink-soft);
    background: var(--paper-2);
    border: 1px solid var(--line-strong);
    border-left: 0;
    border-radius: 0 var(--r) var(--r) 0;
}

.input-group--pre .input {
    border-radius: 0 var(--r) var(--r) 0;
}

.input-group--pre .input-group__addon {
    border-left: 1px solid var(--line-strong);
    border-right: 0;
    border-radius: var(--r) 0 0 var(--r);
}

.file {
    width: 100%;
    padding: 9px 12px;
    font-size: 13px;
    background: var(--paper-2);
    border: 1px dashed var(--line-strong);
    border-radius: var(--r);
}

.file::file-selector-button {
    margin-right: 12px;
    padding: 6px 12px;
    font: inherit;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    background: var(--btn);
    border: 0;
    border-radius: var(--r);
    cursor: pointer;
}

.file::file-selector-button:hover {
    background: var(--gold);
}

/* Toggle switch */
.switch {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
}

.switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.switch__track {
    position: relative;
    width: 42px;
    height: 22px;
    flex: none;
    border-radius: 999px;
    background: var(--line-strong);
    transition: background var(--t);
}

.switch__track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform var(--t);
}

.switch input:checked + .switch__track {
    background: var(--gold);
}

.switch input:checked + .switch__track::after {
    transform: translateX(20px);
}

.switch input:focus-visible + .switch__track {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* Checkbox / radio lists */
.opts {
    display: grid;
    gap: 8px;
}

.opts--cols {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.opt {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    font-size: 13.5px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r);
    cursor: pointer;
    transition: all var(--t);
}

.opt:hover {
    border-color: var(--line-strong);
    background: #fbfaf8;
}

.opt:has(input:checked) {
    border-color: var(--gold);
    background: var(--gold-tint);
}

.opt span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.opt small {
    color: var(--ink-faint);
    font-size: 11px;
}

/* Form section header inside a card */
.fset {
    padding: 20px;
    border-bottom: 1px solid var(--line);
}

.fset:last-child {
    border-bottom: 0;
}

.fset__head {
    margin-bottom: 16px;
}

.fset__head h3 {
    font-size: 17px;
}

.fset__head p {
    margin: 3px 0 0;
    font-size: 12.5px;
    color: var(--ink-soft);
}

/* Bordered sub-block inside a card (addresses, quoted message bodies, notes) */
.panel {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--paper-2);
}

.panel + .panel {
    margin-top: 12px;
}

.panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 13.5px;
}

.panel--quote {
    border-left: 2px solid var(--gold);
    background: var(--paper);
    font-size: 14.5px;
    line-height: 1.75;
    white-space: pre-line;
}

/* Sticky save bar */
.savebar {
    position: sticky;
    bottom: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: var(--gut);
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid var(--line);
    border-radius: var(--r);
    box-shadow: 0 -6px 24px rgba(16, 16, 20, 0.07);
}

.savebar__note {
    flex: 1;
    min-width: 0;
    font-size: 12.5px;
    color: var(--ink-soft);
}

/* ---------------------------------------------------------------- filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
}

.filters__field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 150px;
}

.filters__field--grow {
    flex: 1;
    min-width: 220px;
}

.filters__field label {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.filters .input,
.filters .select {
    padding: 8px 12px;
    font-size: 13px;
}

.filters .select {
    padding-right: 32px;
}

/* ---------------------------------------------------------------- repeaters */
.rep {
    display: grid;
    gap: 12px;
}

.rep__row {
    position: relative;
    display: grid;
    gap: 12px;
    padding: 14px;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--r);
}

.rep__row.is-gone {
    display: none;
}

.rep__grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    align-items: end;
}

.rep__head {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.rep__head span {
    flex: 1;
}

.rep__x {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    flex: none;
    border: 1px solid var(--line-strong);
    border-radius: var(--r);
    background: var(--paper);
    color: var(--ink-soft);
    transition: all var(--t);
}

.rep__x:hover {
    border-color: var(--sale);
    background: var(--sale);
    color: #fff;
}

.rep__add {
    justify-self: start;
}

/* ---------------------------------------------------------------- media */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 14px;
}

.mfile {
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--paper);
    overflow: hidden;
}

.mfile__img {
    aspect-ratio: 1;
    background: var(--paper-3);
    position: relative;
}

.mfile__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mfile__body {
    padding: 9px 11px;
    border-top: 1px solid var(--line);
}

.mfile__name {
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mfile__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 5px;
    font-size: 11px;
    color: var(--ink-faint);
}

.mfile__acts {
    display: flex;
    gap: 5px;
}

.copy-path {
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--paper-2);
    color: var(--ink-soft);
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 7px;
    transition: all var(--t);
}

.copy-path:hover {
    border-color: var(--gold);
    color: var(--gold-dark);
    background: var(--gold-tint);
}

/* Image slot used in product/hero/content forms */
.slot {
    display: grid;
    gap: 10px;
    padding: 12px;
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: var(--r);
}

.slot__preview {
    aspect-ratio: 4 / 3;
    background: var(--paper-3)
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24' fill='none' stroke='%23cdc7ba' stroke-width='1.2'%3E%3Crect x='3' y='4' width='18' height='16'/%3E%3Cpath d='m6 16 4-4 3 3 2-2 3 3'/%3E%3C/svg%3E")
        center/40px no-repeat;
    border: 1px solid var(--line);
    border-radius: var(--r);
    overflow: hidden;
}

.slot__preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.slot__row {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Sortable image cards on the product form */
.imgs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

.imgcard {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--paper);
    overflow: hidden;
}

.imgcard.is-gone {
    display: none;
}

.imgcard__img {
    aspect-ratio: 1;
    background: var(--paper-3);
}

.imgcard__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.imgcard__body {
    display: grid;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid var(--line);
}

.imgcard__body .input {
    padding: 7px 10px;
    font-size: 12.5px;
}

.imgcard__row {
    display: flex;
    gap: 8px;
}

.imgcard__row .input {
    width: 74px;
    flex: none;
}

.imgcard__flag {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--ink);
    color: #fff;
    font-size: 9.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ---------------------------------------------------------------- chart */
.chart {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    height: 200px;
    padding: 0 2px;
}

.chart__col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    height: 100%;
    min-width: 0;
}

.chart__bar {
    width: 100%;
    max-width: 44px;
    min-height: 3px;
    background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
    border-radius: 2px 2px 0 0;
    position: relative;
    transition: opacity var(--t);
}

.chart__col:hover .chart__bar {
    opacity: 0.82;
}

.chart__bar[data-empty="1"] {
    background: var(--paper-3);
}

.chart__x {
    font-size: 10.5px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

/* Horizontal proportion bars (status breakdown, top sellers) */
.bars {
    display: grid;
    gap: 12px;
}

.bar__top {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 5px;
}

.bar__top span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bar__top strong {
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.bar__track {
    height: 6px;
    background: var(--paper-3);
    border-radius: 999px;
    overflow: hidden;
}

.bar__fill {
    height: 100%;
    background: var(--gold);
    border-radius: 999px;
}

/* ---------------------------------------------------------------- misc */
.flash {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 16px;
    margin-bottom: var(--gut);
    border: 1px solid var(--ok);
    border-left-width: 3px;
    border-radius: var(--r);
    background: var(--ok-tint);
    color: #1e5c37;
    font-size: 14px;
}

.flash--bad {
    border-color: var(--sale);
    background: var(--sale-tint);
    color: #8e2822;
}

.flash ul {
    margin: 4px 0 0;
    padding-left: 18px;
}

.flash p {
    margin: 0;
}

.empty {
    padding: 48px 24px;
    text-align: center;
}

.empty__mark {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--gold);
}

.empty h3 {
    font-size: 20px;
    margin-bottom: 6px;
}

.empty p {
    max-width: 380px;
    margin: 0 auto 18px;
    font-size: 13.5px;
    color: var(--ink-soft);
}

.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 14px 20px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--ink-soft);
}

.pager nav {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.pager a,
.pager span[aria-current],
.pager .disabled {
    display: grid;
    place-items: center;
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--paper);
    font-size: 13px;
    color: var(--ink);
}

.pager a:hover {
    border-color: var(--gold);
    color: var(--gold-dark);
}

.pager span[aria-current] {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.pager .disabled {
    color: var(--ink-faint);
    background: var(--paper-2);
}

.pager svg {
    width: 14px;
    height: 14px;
}

/* Tabs */
.tabs__nav {
    display: flex;
    gap: 2px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
    padding: 0 20px;
    background: var(--paper-2);
}

.tabs__btn {
    padding: 13px 16px;
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-soft);
    transition:
        color var(--t),
        border-color var(--t);
}

.tabs__btn:hover {
    color: var(--ink);
}

.tabs__btn.is-on {
    color: var(--ink);
    border-bottom-color: var(--gold);
}

.tabs__panel {
    display: none;
}

.tabs__panel.is-on {
    display: block;
}

/* Definition list */
.dl {
    display: grid;
    gap: 0;
    margin: 0;
}

.dl > div {
    display: flex;
    gap: 14px;
    align-items: baseline;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13.5px;
}

.dl > div:last-child {
    border-bottom: 0;
}

.dl dt {
    flex: none;
    width: 130px;
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.dl dd {
    margin: 0;
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

/* Rendered HTML preview (pages) */
.rte {
    padding: 20px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r);
    max-height: 460px;
    overflow-y: auto;
    font-size: 14.5px;
    line-height: 1.7;
}

.rte h3 {
    font-size: 19px;
    margin: 22px 0 8px;
}

.rte h3:first-child {
    margin-top: 0;
}

.rte a {
    color: var(--gold-dark);
    text-decoration: underline;
}

.rte ul,
.rte ol {
    padding-left: 22px;
}

/* Editor toolbar */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 8px;
    background: var(--paper-2);
    border: 1px solid var(--line-strong);
    border-bottom: 0;
    border-radius: var(--r) var(--r) 0 0;
}

.toolbar + .textarea {
    border-radius: 0 0 var(--r) var(--r);
}

.toolbar button {
    padding: 5px 10px;
    font-size: 11px;
    letter-spacing: 0.05em;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r);
    color: var(--ink-soft);
    transition: all var(--t);
}

.toolbar button:hover {
    border-color: var(--gold);
    color: var(--gold-dark);
    background: var(--gold-tint);
}

/* Timeline (activity) */
.feed {
    display: grid;
    gap: 0;
}

.feed__item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.feed__item:last-child {
    border-bottom: 0;
}

.feed__dot {
    width: 8px;
    height: 8px;
    flex: none;
    margin-top: 7px;
    border-radius: 50%;
    background: var(--gold);
}

.feed__body {
    flex: 1;
    min-width: 0;
    font-size: 13.5px;
}

.feed__meta {
    margin-top: 2px;
    font-size: 11.5px;
    color: var(--ink-faint);
}

/* Scrim + mobile drawer */
.scrim {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(16, 16, 20, 0.45);
    border: 0;
    padding: 0;
}

.scrim[hidden] {
    display: none;
}

/* Print (invoice) */
@media print {
    .side,
    .top,
    .no-print {
        display: none !important;
    }

    body {
        background: #fff;
    }

    .main {
        margin-left: 0;
    }

    .page {
        padding: 0;
    }

    .card {
        border: 0;
        box-shadow: none;
    }
}

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1180px) {
    .split,
    .split--narrow,
    .split--wide {
        grid-template-columns: minmax(0, 1fr);
    }

    .grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    :root {
        --gut: 16px;
    }

    .side {
        transform: translateX(-100%);
        transition: transform var(--t);
        box-shadow: var(--shadow);
    }

    .side.is-open {
        transform: none;
    }

    .main {
        margin-left: 0;
    }

    .top__burger {
        display: grid;
        place-items: center;
    }

    .grid--2,
    .grid--3 {
        grid-template-columns: minmax(0, 1fr);
    }

    .who__name,
    .who__role {
        display: none;
    }
}

@media (max-width: 620px) {
    .top {
        height: 60px;
    }

    .top__title h1 {
        font-size: 19px;
    }

    .top__title p {
        display: none;
    }

    .grid--4 {
        grid-template-columns: minmax(0, 1fr);
    }

    .kpi__value {
        font-size: 26px;
    }

    .savebar {
        flex-wrap: wrap;
    }

    .savebar__note {
        order: 3;
        flex-basis: 100%;
    }
}
