:root {
    --bg: #fff5f8;
    --bg-2: #ffe8f0;
    --surface: #ffffff;
    --ink: #3d2a35;
    --muted: #8a6b78;
    --accent: #e85d8e;
    --accent-2: #7b6cff;
    --accent-3: #56c4b0;
    --accent-4: #f0a04b;
    --line: #f3c9d8;
    --danger: #e85a5a;
    --ok: #3cb371;
    --warn: #ffe9a8;
    --pastel-pink: #ffd6e5;
    --pastel-lilac: #ddd6ff;
    --pastel-mint: #c9f2e6;
    --pastel-peach: #ffe0c2;
    --pastel-yellow: #fff3b0;
    --pastel-green: #c8efd4;
    --pastel-blue: #cfe8ff;
    --pastel-red: #ff6b8a;
    --shadow: 0 8px 24px rgba(232, 93, 142, 0.14);
    --radius: 14px;
    --font: "Segoe UI", "Trebuchet MS", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* Garante ocultação mesmo com display:grid em .stack / .mini-form / .panel */
[hidden] {
    display: none !important;
}
body {
    font-family: var(--font);
    color: var(--ink);
    background:
        radial-gradient(circle at 0% 0%, #ffd6e8 0%, transparent 42%),
        radial-gradient(circle at 100% 0%, #d8d0ff 0%, transparent 40%),
        radial-gradient(circle at 50% 100%, #c9f5ea 0%, transparent 45%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
    min-height: 100vh;
}

a { color: var(--accent-2); text-decoration: none; }
ul { margin: 0; padding-left: 1.1rem; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
    display: flex; justify-content: space-between; align-items: center;
    gap: .75rem; padding: .9rem 1rem;
    background: linear-gradient(90deg, #fff0f6, #f3efff);
    border-bottom: 2px solid var(--line);
    position: sticky; top: 0; z-index: 20;
}
.brand {
    display: flex;
    align-items: center;
}
.brand-logo {
    height: 40px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    display: block;
}
.topbar-meta { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .85rem; color: var(--muted); }

.nav-bar {
    display: flex; gap: .5rem; overflow-x: auto; padding: .75rem 1rem;
    background: rgba(255,255,255,.75); border-bottom: 2px solid var(--line);
}
.nav-bar a {
    white-space: nowrap;
    padding: .65rem 1rem !important;
    border-radius: 12px !important;
    font-size: .9rem !important;
    font-weight: 800 !important;
    border: 2px solid transparent !important;
    color: var(--ink) !important;
    background: #fff !important;
    box-shadow: 0 3px 10px rgba(0,0,0,.06);
}
.nav-bar a:nth-child(1) { background: var(--pastel-lilac) !important; }
.nav-bar a:nth-child(2) { background: var(--pastel-pink) !important; }
.nav-bar a:nth-child(3) { background: var(--pastel-mint) !important; }
.nav-bar a:nth-child(4) { background: var(--pastel-peach) !important; }
.nav-bar a:nth-child(5) { background: var(--pastel-blue) !important; }
.nav-bar a:nth-child(6) { background: var(--pastel-yellow) !important; }
.nav-bar a:nth-child(7) { background: #e8f5e9 !important; }
.nav-bar a:nth-child(8) { background: #f3e5f5 !important; }
.nav-bar a:nth-child(n+9) { background: #eceff1 !important; }
.nav-bar a.active {
    color: #fff !important;
    border-color: transparent !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,.12);
}
.nav-bar a:nth-child(1).active { background: #7b6cff !important; }
.nav-bar a:nth-child(2).active { background: #e85d8e !important; }
.nav-bar a:nth-child(3).active { background: #2eb89a !important; }
.nav-bar a:nth-child(4).active { background: #e8913a !important; }
.nav-bar a:nth-child(5).active { background: #3b8ddd !important; }
.nav-bar a:nth-child(6).active { background: #d4a017 !important; }
.nav-bar a:nth-child(7).active { background: #43a047 !important; }
.nav-bar a:nth-child(8).active { background: #8e24aa !important; }
.nav-bar a:nth-child(n+9).active { background: #546e7a !important; }

.content { width: min(1100px, 100%); margin: 0 auto; padding: 1rem; flex: 1; }

.card, .panel {
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
}
.stack { display: grid; gap: 1rem; }
.row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.grid-2 { display: grid; gap: .75rem; }

label { display: grid; gap: .35rem; font-size: .9rem; color: var(--muted); }
input, select, textarea {
    font: inherit; border-radius: 10px; border: 1.5px solid var(--line);
    padding: .7rem .8rem; background: #fff; color: var(--ink);
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus {
    outline: 2px solid rgba(232, 93, 142, .35); outline-offset: 1px;
}

button {
    font: inherit;
    border-radius: 10px;
    border: 1.5px solid var(--line);
    padding: .55rem .9rem;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
}

.btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    background: linear-gradient(135deg, #e85d8e, #c94b9a) !important;
    color: #fff !important;
    border: none !important;
    cursor: pointer;
    padding: .6rem 1rem !important;
    border-radius: 10px !important;
    font-weight: 700 !important;
    font-size: .9rem !important;
    line-height: 1.2 !important;
    min-height: 40px;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-ghost {
    background: #fff !important;
    color: #e85d8e !important;
    border: 2px solid #f3c9d8 !important;
}
.btn-small {
    padding: .4rem .75rem !important;
    font-size: .8rem !important;
    min-height: 34px;
}
.btn-danger { background: linear-gradient(135deg, #ff6b8a, #e85a5a) !important; color: #fff !important; }
.btn-ok { background: linear-gradient(135deg, #56c4b0, #3cb371) !important; color: #fff !important; }

.btn-icon,
a.btn-icon {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    padding: 0 !important;
    border-radius: 11px !important;
    background: var(--pastel-pink) !important;
    border: 2px solid #f3c9d8 !important;
    color: #c23d74 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    flex-shrink: 0;
    text-decoration: none !important;
}
.btn-icon svg,
a.btn-icon svg {
    width: 18px !important;
    height: 18px !important;
    display: block !important;
    stroke: currentColor !important;
    fill: none !important;
    stroke-width: 2.2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}
.btn-icon.danger,
a.btn-icon.danger {
    background: #ffe0e4 !important;
    border-color: #ffb3bf !important;
    color: #d9364f !important;
}
.btn-icon.mint { background: var(--pastel-mint) !important; border-color: #9fe0cf !important; color: #1f8f7a !important; }
.btn-icon.lilac { background: var(--pastel-lilac) !important; border-color: #c4bbff !important; color: #5a4fd6 !important; }
.btn-icon.peach { background: var(--pastel-peach) !important; border-color: #ffc894 !important; color: #c56f1a !important; }

.btn-add {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    background: linear-gradient(135deg, #7b6cff, #9a8cff) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 11px !important;
    padding: .45rem .85rem !important;
    font-weight: 800 !important;
    font-size: .85rem !important;
    min-height: 38px;
    cursor: pointer;
}
.btn-add .plus { font-size: 1.15rem; line-height: 1; font-weight: 900; }

.inline-form { display: inline; margin: 0; }

.alert { padding: .85rem 1rem; border-radius: 12px; margin-bottom: 1rem; }
.alert-success { background: #e8f7ee; color: var(--ok); border: 1px solid #b7e0c4; }
.alert-error { background: #fdeceb; color: var(--danger); border: 1px solid #f3c1bd; }
.error-text { color: var(--danger); font-size: .85rem; }

.login-page {
    min-height: 100vh; display: grid; place-items: center; padding: 1rem;
    background:
        linear-gradient(135deg, rgba(232,93,142,.18), transparent 45%),
        radial-gradient(circle at 80% 10%, rgba(123,108,255,.25), transparent 35%),
        var(--bg);
}
.login-box { width: min(420px, 100%); }
.login-box h1 {
    margin: 0 0 .25rem; font-size: 1.9rem;
    background: linear-gradient(90deg, #e85d8e, #7b6cff);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login-box p { margin: 0 0 1.2rem; color: var(--muted); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .7rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; font-size: .92rem; }
th { color: var(--muted); font-weight: 650; }

.calendar { display: grid; gap: .5rem; }
.calendar-head, .calendar-week {
    display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .4rem;
}
.calendar-head span {
    text-align: center; font-size: .75rem; color: var(--muted); font-weight: 700; padding: .25rem;
}
.day-cell {
    min-height: 92px; background: #fff; border: 1.5px solid var(--line);
    border-radius: 12px; padding: .4rem; display: flex; flex-direction: column; gap: .25rem;
}
.day-cell.out { opacity: .45; }
.day-cell.today { border-color: #e85d8e; box-shadow: inset 0 0 0 1px #e85d8e; background: #fff5f9; }
.day-num { font-size: .8rem; font-weight: 700; }
.order-chip {
    display: block; border-radius: 8px; padding: .2rem .35rem; color: #fff;
    font-size: .68rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.order-chip.urgent { box-shadow: inset 0 0 0 2px #ff6b8a; }
.order-chip.alert { outline: 2px solid #ff6b8a; background: var(--pastel-red) !important; }
.order-chip.done, .order-chip.status-pronto { background: #a8d5b5 !important; color: #1a4d2e !important; }
.order-chip.status-fazendo { background: var(--pastel-yellow) !important; color: #6b5a12 !important; }

.calendar-nav { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; }
.calendar-nav label { min-width: 90px; }

.day-agenda-wrap { display: grid; gap: .75rem; }
.day-agenda {
    position: relative;
    max-height: calc(100vh - 210px);
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: auto;
    border: 2px solid var(--line);
    border-radius: 14px;
    background: #fffafc;
    padding: .25rem .75rem;
}
.day-agenda .hour-row {
    display: grid; grid-template-columns: 64px 1fr; gap: .75rem;
    border-bottom: 1px solid #f3d7e2; padding: .65rem 0;
    min-height: 64px;
}
.day-agenda .hour-row.current-hour {
    background: linear-gradient(90deg, #ffe4ef, #efeaff);
    border-left: 4px solid #e85d8e;
    padding-left: .5rem;
    border-radius: 8px;
}
.hour-time { color: var(--muted); font-size: .85rem; font-weight: 700; }
.hour-orders { display: grid; gap: .4rem; }
.hour-order {
    border-radius: 10px; padding: .55rem .7rem; color: #fff;
}
.hour-order.urgent { box-shadow: inset 0 0 0 2px #ff6b8a; }
.hour-order.alert, .order-card.alert { background: var(--pastel-red) !important; color: #fff !important; }
.hour-order.status-fazendo { background: var(--pastel-yellow) !important; color: #6b5a12 !important; }
.hour-order.status-pronto, .hour-order.done { background: #a8d5b5 !important; color: #1a4d2e !important; }

.overlay {
    position: fixed; inset: 0; background: rgba(40, 20, 35, .5);
    display: none; align-items: flex-end; justify-content: center; z-index: 40; padding: 1rem;
}
.overlay.open { display: flex; }
.overlay-panel {
    width: min(720px, 100%); max-height: 90vh; overflow: auto;
    background: var(--surface); border-radius: 18px; padding: 1rem; box-shadow: var(--shadow);
    border: 2px solid var(--line);
}
.lightbox {
    position: fixed; inset: 0; background: rgba(20, 12, 18, .88);
    display: none; align-items: center; justify-content: center; z-index: 60; padding: 1rem;
}
.lightbox.open { display: flex; }
.lightbox img {
    max-width: min(96vw, 900px) !important;
    max-height: 88vh !important;
    width: auto !important;
    height: auto !important;
    border-radius: 12px;
    object-fit: contain;
}
.lightbox-close {
    position: absolute; top: 1rem; right: 1rem;
    width: 40px !important; height: 40px !important;
    border-radius: 50% !important; border: none !important;
    background: #fff !important; color: var(--ink) !important;
    display: inline-flex !important; align-items: center; justify-content: center;
    cursor: pointer; padding: 0 !important;
}
.lightbox-close svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.4; }

.switch-group { display: flex; flex-wrap: wrap; gap: .5rem; }
.switch-group label {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 999px; background: #fff;
}
.range-row, .flavor-row, .kit-group-row, .swap-row {
    display: grid; gap: .5rem; grid-template-columns: 1fr; margin-bottom: .5rem;
    align-items: center;
}
.price-box {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    padding: .85rem;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: #fffafc;
}
.range-card {
    display: block;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: .65rem;
    background: #fff;
    margin-bottom: .55rem;
}
.range-card .range-fields {
    display: grid;
    gap: .5rem;
    grid-template-columns: 1fr;
    align-items: end;
}
.range-card .range-fields label {
    margin: 0;
    font-size: .82rem;
    color: var(--muted);
    font-weight: 700;
}
.range-card .range-fields input {
    margin-top: .25rem;
}
.range-card .range-remove {
    display: flex;
    align-items: end;
    justify-content: flex-end;
}
.variant-option-card {
    border: 1.5px solid var(--line);
    border-radius: 12px;
    padding: .85rem;
    background: #fff;
    margin-bottom: .65rem;
}
.kit-measure-cell {
    display: grid;
    gap: .35rem;
}
.kit-measure-cell select,
.kit-measure-cell input {
    width: 100%;
}
.badge {
    display: inline-block; padding: .2rem .5rem; border-radius: 999px;
    font-size: .75rem; font-weight: 700; background: var(--pastel-pink);
}
.badge.warn { background: var(--warn); }
.badge.ok { background: var(--pastel-mint); color: var(--ok); }
.badge.danger { background: #ffe0e4; color: var(--danger); }
.badge.delivery-badge { background: #dce9ff; color: #1d4f91; font-weight: 800; }
.badge.pickup-badge { background: #ffe8c7; color: #8a4b00; font-weight: 800; }
.prod-filter-tabs { margin: .25rem 0 .5rem; }

.status-tag {
    display: inline-block;
    padding: .28rem .7rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .02em;
    border: 2px solid transparent;
    white-space: nowrap;
}
.status-tag.prod-aguardando { background: #fff3d6; color: #9a6b00; border-color: #f0d48a; }
.status-tag.prod-fazendo { background: #ffe8c7; color: #8a4b00; border-color: #f0c27a; }
.status-tag.prod-pronto { background: #dcf5e4; color: #1c7a40; border-color: #93dcae; }
.status-tag.del-aguardando { background: #f0f0f0; color: #555; border-color: #d0d0d0; }
.status-tag.del-em-transito { background: #dcecff; color: #1651a0; border-color: #9cc4f5; }
.status-tag.del-entregue { background: #dcf5e4; color: #1c7a40; border-color: #93dcae; }
.status-tag.status-highlight {
    box-shadow: 0 0 0 2px #1651a0;
    animation: status-pulse 1.6s ease-in-out infinite;
}
@keyframes status-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}

.erp-search-select { position: relative; }
.erp-search-select input[type="search"],
.erp-search-select input[type="text"] {
    width: 100%;
}
.erp-search-select .erp-ss-list {
    position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 2px);
    max-height: 220px; overflow: auto;
    background: #fff; border: 1.5px solid var(--line); border-radius: 12px;
    box-shadow: 0 8px 24px rgba(45, 27, 36, .12);
    display: none;
}
.erp-search-select.open .erp-ss-list { display: block; }
.erp-search-select .erp-ss-option {
    padding: .65rem .85rem; cursor: pointer; border: none; background: transparent;
    width: 100%; text-align: left; font: inherit; color: inherit;
}
.erp-search-select .erp-ss-option:hover,
.erp-search-select .erp-ss-option.active { background: #fff0f5; }
.erp-search-select .erp-ss-empty {
    padding: .65rem .85rem; color: var(--muted); font-size: .9rem;
}

.order-card {
    border: 1.5px solid var(--line); border-radius: 14px; padding: 1rem; background: #fffafc;
}
.order-card.aguardando { background: #fff; }
.order-card.fazendo { background: var(--pastel-yellow); }
.order-card.pronto { background: var(--pastel-green); }
.order-card.urgent { box-shadow: inset 0 0 0 2px #ff6b8a; }
.late-banner {
    position: sticky; top: 56px; z-index: 15;
    background: #fff1f0; border: 1px solid #f3c1bd; color: var(--danger);
    border-radius: 12px; padding: .85rem 1rem; margin-bottom: 1rem;
}

.wa-btn {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 50% !important;
    border: none !important;
    background: #25D366 !important;
    color: #fff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    padding: 0 !important;
    flex: 0 0 auto;
    line-height: 0 !important;
    text-decoration: none !important;
}
.wa-btn svg,
a.wa-btn svg {
    width: 18px !important;
    height: 18px !important;
    display: block !important;
    fill: #fff !important;
    stroke: none !important;
    color: #fff !important;
}
.wa-btn svg path,
a.wa-btn svg path {
    fill: #fff !important;
    stroke: none !important;
}
.wa-phone-row {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    flex-wrap: wrap;
}

.thumb-row {
    display: flex !important;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: flex-start;
}
img.thumb,
.thumb,
.thumb-row img,
#order-images-preview img,
.product-list img,
.order-card img.thumb {
    width: 64px !important;
    height: 64px !important;
    max-width: 64px !important;
    max-height: 64px !important;
    border-radius: 10px !important;
    object-fit: cover !important;
    border: 2px solid var(--line) !important;
    cursor: pointer;
    background: #fff;
    display: block !important;
}
.thumb.compact,
.thumb-row img.compact {
    width: 48px !important;
    height: 48px !important;
    max-width: 48px !important;
    max-height: 48px !important;
}

.type-chip, .list-item-row, .user-list-row {
    display: flex; align-items: center; justify-content: space-between; gap: .5rem;
    padding: .7rem .85rem; border: 1.5px solid var(--line); border-radius: 12px;
    background: linear-gradient(180deg, #fff, #fff7fa);
}
.type-list, .kit-list, .product-list, .user-list { display: grid; gap: .5rem; }

.mini-form {
    display: grid; gap: .6rem; padding: .85rem;
    border: 2px dashed #f3c9d8; border-radius: 12px;
    background: #fff5f9;
}

.client-name-link {
    background: none !important; border: none !important; padding: 0 !important;
    color: #e85d8e !important; font: inherit; font-weight: 700; cursor: pointer; text-align: left;
}

.pagination { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: 1rem; }
.pagination a, .pagination span {
    padding: .4rem .7rem; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}

.kit-view-panel { gap: 1.1rem; }
.kit-view-price {
    margin-top: .35rem; font-weight: 800; color: #e85d8e; font-size: 1.1rem;
}
.kit-view-section-title {
    display: block; margin-bottom: .55rem; color: var(--muted); font-size: .85rem;
}
.kit-view-items { display: grid; gap: .45rem; }
.kit-view-item {
    display: flex; justify-content: space-between; align-items: center; gap: .75rem;
    padding: .7rem .85rem; border: 1.5px solid var(--line); border-radius: 12px;
    background: linear-gradient(180deg, #fff, #fff7fa);
}
.kit-view-meta { color: var(--muted); font-size: .8rem; margin-top: .15rem; }
.kit-view-swap { justify-content: flex-start; flex-wrap: wrap; }

.order-cancelled {
    opacity: .45; pointer-events: none; position: relative; filter: grayscale(.35);
}
.order-cancelled-wrap { opacity: .75; }
.cancelled-overlay, .cancelled-banner {
    background: rgba(60, 20, 30, .72); color: #fff; font-weight: 800;
    text-align: center; padding: .85rem 1rem; border-radius: 12px;
    letter-spacing: .02em;
}
.cancelled-overlay {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    z-index: 2; border-radius: inherit;
}

.fee-box { display: grid; gap: .5rem; }
.fee-box.disabled input { opacity: .45; pointer-events: none; }

.field-hint {
    font-size: .75rem;
    color: var(--muted);
}
.file-pick-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
}

@media (min-width: 768px) {
    .grid-2 { grid-template-columns: 1fr 1fr; }
    .range-row:not(.range-card), .flavor-row { grid-template-columns: 1fr 1fr 1fr auto; }
    .range-card .range-fields { grid-template-columns: 1fr 1fr 1fr auto; }
    .kit-group-row { grid-template-columns: 1fr 1fr minmax(160px, 200px) auto; }
    .swap-row { grid-template-columns: 1fr 1fr auto; }
    .overlay { align-items: center; }
    .day-cell { min-height: 110px; }
    .content { padding: 1.5rem; }
}

@media (min-width: 1024px) {
    .calendar-head span { font-size: .85rem; }
    .order-chip { font-size: .72rem; }
}

@media print {
    @page { margin: 12mm; size: auto; }
    .top-bar, .topbar, .nav-bar, .no-print, .btn, .btn-icon, .btn-add, .btn-ghost { display: none !important; }
    body { background: #fff !important; color: #111 !important; }
    .app-shell, .content { padding: 0 !important; margin: 0 !important; max-width: 100% !important; width: 100% !important; }
    .panel, .order-card { box-shadow: none !important; border: 1px solid #ccc !important; background: #fff !important; break-inside: avoid; }
    .report-print-area { break-inside: avoid; }
    .report-letterhead { display: block !important; border-bottom: 2px solid #333; padding-bottom: .75rem; margin-bottom: 1rem; }
    .report-letterhead h1 { margin: 0; font-size: 1.35rem; color: #111 !important; }
    .report-letterhead p { margin: .25rem 0 0; color: #444 !important; font-size: .9rem; }
    .report-meta { color: #333 !important; font-size: .9rem; margin-bottom: 1rem; }
    .report-table { width: 100%; border-collapse: collapse; }
    .report-table th, .report-table td { border: 1px solid #bbb; padding: .45rem .5rem; font-size: .85rem; color: #111 !important; }
    .report-table th { background: #f0f0f0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .report-kpi { border: 1px solid #bbb !important; padding: .65rem .75rem; margin-bottom: .5rem; }
    .report-kpi strong { color: #111 !important; }
}

.report-letterhead { display: none; }
.report-kpi { background: #fffafc; }


/* ===== Extras usados nas telas (rastreio, login, formulários) ===== */
.login-hero { text-align: center; margin-bottom: 1rem; }
.login-hero img {
    width: 88px; height: 88px; border-radius: 22px;
    box-shadow: 0 8px 24px rgba(232, 93, 142, 0.25);
    object-fit: cover;
}
.type-name { font-weight: 700; }
.status-tags-row {
    display: flex; flex-wrap: wrap; gap: .4rem; align-items: center;
}
.filling-row {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: .65rem;
    margin-bottom: .5rem;
}
.flavor-split { gap: .5rem; }
.flavor-qty-row { align-items: center; }

.delivery-status-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 1.15rem;
    border-radius: 14px;
    font-weight: 800;
}
.delivery-status-banner .status-label {
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.delivery-status-banner .status-meta {
    font-size: .85rem;
    font-weight: 600;
    opacity: .85;
}
.delivery-status-banner.status-pendente {
    background: #fff3d6; color: #9a6b00; border: 2px solid #f0d48a;
}
.delivery-status-banner.status-em_transito {
    background: #dcecff; color: #1651a0; border: 2px solid #9cc4f5;
}
.delivery-status-banner.status-entregue {
    background: #dcf5e4; color: #1c7a40; border: 2px solid #93dcae;
}
.delivery-status-pill {
    display: inline-block;
    padding: .35rem .8rem;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.delivery-status-pill.status-pendente {
    background: #fff3d6; color: #9a6b00; border: 2px solid #f0d48a;
}
.delivery-status-pill.status-em_transito {
    background: #dcecff; color: #1651a0; border: 2px solid #9cc4f5;
}
.delivery-status-pill.status-entregue {
    background: #dcf5e4; color: #1c7a40; border: 2px solid #93dcae;
}

/* ===== Produção (confeiteiro / doceira / salgadeira) ===== */
.production-order {
    gap: 1.25rem;
}
.prod-order-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.prod-order-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}
.prod-order-title {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.25;
}
.prod-order-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}
.prod-badge-lg {
    font-size: 1.05rem !important;
    padding: .55rem .9rem !important;
}
.prod-order-info {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    padding: 1rem;
    background: #fff7fb;
    border: 1.5px solid var(--line);
    border-radius: 12px;
}
.prod-info-row,
.prod-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .6rem;
    align-items: baseline;
    font-size: .95rem;
    line-height: 1.45;
}
.prod-info-label,
.prod-meta-label {
    color: var(--muted);
    font-weight: 700;
    flex: 0 0 auto;
}
.prod-info-value,
.prod-meta-value {
    color: var(--ink);
    font-weight: 600;
    flex: 1 1 auto;
    min-width: 0;
    word-break: break-word;
}
.prod-note {
    padding: .85rem 1rem;
    border-radius: 12px;
    background: #fff8ef;
    border: 1.5px dashed #f0c9a0;
    font-size: .95rem;
    line-height: 1.45;
}
.prod-section-label {
    margin: .35rem 0 .15rem;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--muted);
}
.prod-block {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.1rem !important;
}
.prod-block-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .75rem;
    flex-wrap: wrap;
}
.prod-block-title-wrap {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    min-width: 0;
    flex: 1 1 180px;
}
.prod-block-kicker {
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
}
.prod-block-title {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.3;
    word-break: break-word;
}
.prod-block-qty {
    font-size: .9rem;
    font-weight: 700;
    color: var(--ink);
}
.prod-block-items {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.prod-block-item {
    background: rgba(255, 255, 255, .8);
    border: 1.5px solid rgba(243, 201, 216, .85);
    border-radius: 12px;
    padding: .9rem 1rem;
}
.prod-block.aguardando .prod-block-item { background: #fff; }
.prod-block.fazendo .prod-block-item { background: rgba(255, 255, 255, .55); border-color: #f0d48a; }
.prod-block.pronto .prod-block-item { background: rgba(255, 255, 255, .55); border-color: #93dcae; }
.prod-item-body {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.prod-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .55rem;
    flex-wrap: wrap;
}
.prod-item-name {
    font-size: 1.05rem;
    line-height: 1.35;
}
.prod-item-meta {
    display: flex;
    flex-direction: column;
    gap: .45rem;
}
.prod-meta-obs .prod-meta-value {
    font-weight: 600;
}
.prod-actions {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    align-items: stretch;
    padding-top: .25rem;
}
.prod-actions form {
    margin: 0;
    width: 100%;
}
.prod-actions .btn {
    width: 100%;
    min-height: 48px !important;
    font-size: 1rem !important;
    padding: .75rem 1rem !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}
.prod-btn-start {
    background: linear-gradient(135deg, #7b6cff, #5a4fd6) !important;
}
.prod-btn-finish {
    font-weight: 800 !important;
}
.prod-btn-correct {
    border-color: #f0c27a !important;
    color: #8a4b00 !important;
    background: #fff8ef !important;
}
.prod-btn-undo-start {
    min-height: 42px !important;
    font-size: .85rem !important;
}
.prod-empty {
    color: var(--muted);
    text-align: center;
}
.production-list .order-card {
    transition: transform .12s ease, box-shadow .12s ease;
}
.production-list a.order-card:active {
    transform: scale(.99);
}
.production-list .order-card-main {
    display: flex;
    flex-direction: column;
    gap: .45rem;
}
.production-list .order-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
}
.production-list .order-time {
    font-size: 1.15rem;
    padding: .45rem .85rem;
    font-weight: 800;
}
@media (min-width: 640px) {
    .prod-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
    .prod-actions form {
        width: auto;
        flex: 1 1 160px;
    }
    .prod-actions .btn {
        width: 100%;
    }
}

/* ===== Admin Home (painel) ===== */
.admin-home {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding-bottom: 5.5rem;
}
.ah-hero {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.1rem 1.1rem 1.2rem;
    border-radius: 20px;
    background: linear-gradient(145deg, #5a3d4c 0%, #3d2a35 55%, #2a1c24 100%);
    color: #fff;
    box-shadow: 0 12px 30px rgba(61, 42, 53, .28);
}
.ah-hero-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .75rem;
}
.ah-date {
    margin: 0 0 .35rem;
    font-size: .78rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: rgba(255,255,255,.72);
    font-weight: 700;
}
.ah-greeting {
    margin: 0;
    font-size: clamp(1.45rem, 5vw, 1.85rem);
    line-height: 1.2;
    font-weight: 800;
}
.ah-notify-wrap { position: relative; flex: 0 0 auto; }
.ah-notify-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,.22);
    background: rgba(255,255,255,.1);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    padding: 0;
}
.ah-notify-btn svg { width: 22px; height: 22px; }
.ah-notify-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: .68rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #3d2a35;
}
.ah-notify-panel {
    position: absolute;
    top: calc(100% + .55rem);
    right: 0;
    width: min(300px, 78vw);
    background: #fff;
    color: var(--ink);
    border: 1.5px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
    padding: .85rem;
    display: grid;
    gap: .55rem;
    z-index: 30;
}
.ah-notify-panel a {
    display: block;
    font-size: .88rem;
    color: var(--ink);
    padding: .45rem .5rem;
    border-radius: 10px;
    background: #fff7fb;
}
.ah-notify-panel a:hover { background: var(--pastel-pink); }
.ah-notify-empty { color: var(--muted); font-size: .88rem; }
.ah-notify-all { font-weight: 700; color: var(--accent-2) !important; }

.ah-summary {
    display: grid;
    gap: .85rem;
    padding: 1rem;
    border-radius: 18px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.14);
}
.ah-summary-label {
    display: block;
    font-size: .75rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: rgba(255,255,255,.7);
    font-weight: 700;
    margin-bottom: .3rem;
}
.ah-summary-value {
    display: block;
    font-size: clamp(1.7rem, 7vw, 2.15rem);
    line-height: 1.1;
    color: #ffd6a8;
    font-weight: 800;
}
.ah-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
}
.ah-kpi {
    background: rgba(0,0,0,.18);
    border-radius: 12px;
    padding: .65rem .45rem;
    text-align: center;
}
.ah-kpi-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.1;
}
.ah-kpi-label {
    display: block;
    margin-top: .2rem;
    font-size: .7rem;
    color: rgba(255,255,255,.75);
    font-weight: 700;
}

.ah-section { display: grid; gap: .75rem; }
.ah-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
}
.ah-section-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
}
.ah-link {
    font-weight: 800;
    color: var(--accent);
    font-size: .9rem;
}

.ah-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .7rem;
}
.ah-action {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    padding: .9rem .85rem;
    border-radius: 16px;
    background: #fff;
    border: 1.5px solid var(--line);
    box-shadow: 0 6px 16px rgba(232, 93, 142, .08);
    color: inherit;
    min-height: 88px;
}
.ah-action-primary {
    background: linear-gradient(135deg, #e85d8e, #c94b9a);
    border-color: transparent;
    color: #fff;
    grid-column: 1 / -1;
}
.ah-action-primary .ah-action-icon {
    background: rgba(255,255,255,.2);
    color: #fff;
    border-color: transparent;
}
.ah-action-primary small { color: rgba(255,255,255,.88); }
.ah-action-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff5f8;
    border: 1.5px solid var(--line);
    color: var(--accent-2);
    flex: 0 0 auto;
}
.ah-action-icon svg { width: 20px; height: 20px; }
.ah-action-text { display: grid; gap: .15rem; min-width: 0; }
.ah-action-text strong { font-size: .98rem; line-height: 1.25; }
.ah-action-text small { color: var(--muted); font-size: .78rem; line-height: 1.3; }
.ah-action-primary .ah-action-text strong,
.ah-action-primary .ah-action-text small { color: rgba(255,255,255,.92); }

.ah-orders { display: grid; gap: .65rem; }
.ah-order {
    display: flex;
    gap: .65rem;
    align-items: stretch;
    padding: .95rem;
    border-radius: 16px;
    background: #fff;
    border: 1.5px solid var(--line);
    color: inherit;
    box-shadow: 0 4px 14px rgba(232, 93, 142, .07);
}
.ah-order-link {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    flex: 1;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}
.ah-order-edit {
    align-self: center;
    flex: 0 0 auto;
}
.ah-order.is-urgent { box-shadow: inset 0 0 0 2px #ff6b8a; }
.ah-order.is-alert { background: #fff8f0; }
.ah-order-id {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--pastel-blue);
    color: #1d4f91;
    font-weight: 800;
    font-size: .78rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.ah-order-main { flex: 1; min-width: 0; display: grid; gap: .35rem; }
.ah-order-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .5rem;
    flex-wrap: wrap;
}
.ah-order-client { font-size: 1rem; line-height: 1.25; }
.ah-order-summary { color: var(--muted); font-size: .88rem; }
.ah-order-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
}
.ah-order-time {
    margin-left: auto;
    font-weight: 800;
    font-size: .95rem;
    color: var(--ink);
}
.ah-empty {
    padding: 1.1rem;
    border-radius: 14px;
    background: #fff;
    border: 1.5px dashed var(--line);
    color: var(--muted);
    text-align: center;
}
.ah-more { width: 100%; }

.ah-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: .15rem;
    padding: .45rem .35rem calc(.45rem + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.96);
    border-top: 2px solid var(--line);
    backdrop-filter: blur(8px);
}
.ah-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .15rem;
    min-height: 52px;
    border-radius: 12px;
    color: var(--muted);
    font-size: .68rem;
    font-weight: 800;
    text-decoration: none;
}
.ah-bottom-nav a svg { width: 22px; height: 22px; }
.ah-bottom-nav a.active {
    color: var(--accent);
    background: #fff0f5;
}

@media (min-width: 720px) {
    .ah-actions { grid-template-columns: repeat(3, 1fr); }
    .ah-action-primary { grid-column: auto; }
    .ah-summary-value { font-size: 2.2rem; }
}
@media (min-width: 980px) {
    .admin-home { gap: 1.4rem; }
    .ah-actions { grid-template-columns: repeat(3, 1fr); }
    .ah-bottom-nav {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: min(1100px, calc(100% - 2rem));
        max-width: 1100px;
        border-radius: 18px 18px 0 0;
        border: 2px solid var(--line);
        border-bottom: none;
        box-shadow: 0 -8px 24px rgba(61,42,53,.08);
    }
}

/* ——— Nova Venda / Novo Pedido ——— */
.order-create {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 6.5rem;
}
.oc-head {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}
.oc-head h2 {
    margin: 0;
    font-size: 1.45rem;
    line-height: 1.2;
}
.oc-head p {
    margin: 0;
    color: var(--muted);
    font-size: .9rem;
}
.oc-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.oc-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}
.oc-step {
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: var(--shadow);
    display: grid;
    gap: .85rem;
}
.oc-step-head {
    display: flex;
    align-items: center;
    gap: .65rem;
}
.oc-step-head[data-oc-toggle] {
    cursor: pointer;
    user-select: none;
}
.oc-step-head-text {
    flex: 1;
    min-width: 0;
}
.oc-step-toggle {
    margin-left: auto;
    flex: 0 0 auto;
}
.oc-step-toggle .oc-ico-expand {
    display: none !important;
}
.oc-step-toggle .oc-ico-minimize {
    display: block !important;
}
.oc-step.is-collapsed .oc-step-toggle .oc-ico-minimize {
    display: none !important;
}
.oc-step.is-collapsed .oc-step-toggle .oc-ico-expand {
    display: block !important;
}
.oc-step.is-collapsed {
    gap: 0;
}
.oc-step-body {
    display: grid;
    gap: .85rem;
}
.oc-step.is-collapsed > .oc-step-body {
    display: none !important;
}
.oc-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e85d8e, #c94b9a);
    color: #fff;
    font-size: .8rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}
.oc-step-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--ink);
}
.oc-step-sub {
    margin: 0;
    font-size: .8rem;
    color: var(--muted);
    font-weight: 600;
}
.oc-type-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
}
.oc-type-tabs .btn {
    width: 100%;
    min-height: 48px;
}
.oc-client-results {
    display: grid;
    gap: .45rem;
}
.oc-client-results .btn {
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    min-height: 48px;
}
.oc-selected-client {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .65rem .85rem;
    border-radius: 12px;
    background: #dcf5e4;
    color: #1c7a40;
    font-weight: 800;
    font-size: .95rem;
}
.oc-actions-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: .5rem;
}
.oc-actions-row .btn {
    width: 100%;
    min-height: 46px;
}
.oc-product-card {
    border: 1.5px solid var(--line);
    border-radius: 14px;
    padding: .85rem;
    background: #fffafc;
    display: grid;
    gap: .75rem;
}
.oc-product-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .5rem;
    flex-wrap: wrap;
}
.oc-product-card-head strong {
    font-size: 1.02rem;
    line-height: 1.3;
}
.oc-fields {
    display: grid;
    gap: .65rem;
}
.oc-totals-panel {
    background: linear-gradient(160deg, #fff8ef, #ffe8f0);
    border: 2px solid var(--line);
    border-radius: 16px;
    padding: 1rem;
    display: grid;
    gap: .75rem;
}
.oc-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .75rem;
    font-size: .95rem;
}
.oc-total-row.em {
    font-size: 1.15rem;
    font-weight: 800;
    padding-top: .35rem;
    border-top: 1.5px dashed #f0c9a0;
}
.oc-total-meta {
    display: grid;
    gap: .25rem;
    font-size: .78rem;
    color: var(--muted);
}
.oc-submit-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    padding: .65rem 1rem calc(.65rem + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.97);
    border-top: 2px solid var(--line);
    display: flex;
    gap: .5rem;
    box-shadow: 0 -6px 20px rgba(61,42,53,.08);
}
.oc-submit-bar .btn {
    flex: 1;
    min-height: 48px;
    font-size: 1rem;
}
.oc-submit-bar .oc-remaining {
    display: none;
}
@media (min-width: 640px) {
    .oc-actions-row {
        grid-template-columns: repeat(3, 1fr);
    }
    .oc-type-tabs {
        grid-template-columns: repeat(2, minmax(140px, 220px));
    }
}
.oc-item-summary {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    padding: .85rem;
    border: 1.5px solid var(--line);
    border-radius: 14px;
    background: #fff;
}
.oc-item-summary-main { min-width: 0; flex: 1; }
.oc-item-summary-line { color: var(--muted); font-size: .85rem; margin-top: .2rem; }
.oc-item-meta { color: var(--muted); font-size: .8rem; margin-top: .35rem; }
.oc-item-summary-actions {
    display: inline-flex;
    gap: .35rem;
    flex: 0 0 auto;
}
@media (min-width: 900px) {
    .order-create { padding-bottom: 1.5rem; }
    .oc-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 320px;
        gap: 1.25rem;
        align-items: start;
    }
    .oc-totals-panel {
        position: sticky;
        top: 1rem;
    }
    .oc-submit-bar {
        position: static;
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
        margin-top: .25rem;
    }
    .oc-submit-bar .oc-remaining {
        display: none;
    }
}

/* ——— Catálogo: Produtos / Kits (v2) ——— */
.catalog-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-bottom: 1rem;
}
.cat-hero {
    display: grid;
    gap: .85rem;
    padding: 1.1rem;
    border-radius: 20px;
    background: linear-gradient(145deg, #5a3d4c, #3d2a35 58%, #2a1c24);
    color: #fff;
    box-shadow: 0 12px 28px rgba(61,42,53,.18);
}
.cat-hero h1 {
    margin: 0;
    font-size: 1.55rem;
    line-height: 1.2;
    font-weight: 800;
}
.cat-hero p {
    margin: 0;
    color: rgba(255,255,255,.78);
    font-size: .9rem;
}
.cat-hero-actions {
    display: grid;
    gap: .5rem;
}
.cat-hero-actions .btn,
.cat-hero-actions .btn-add {
    width: 100%;
    min-height: 46px;
    justify-content: center;
}
.cat-hero .btn-ghost {
    background: rgba(255,255,255,.12) !important;
    color: #fff !important;
    border-color: rgba(255,255,255,.35) !important;
}
.cat-toolbar {
    display: grid;
    gap: .9rem;
}
.cat-search {
    position: relative;
}
.cat-search input {
    width: 100%;
    min-height: 48px;
    padding-left: 2.6rem;
    border-radius: 14px;
}
.cat-search-icon {
    position: absolute;
    left: .9rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--muted);
    pointer-events: none;
}
.cat-filters {
    display: flex;
    gap: .55rem;
    overflow-x: auto;
    padding: .35rem .35rem .7rem;
    margin: 0 -.1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    scroll-padding-inline: .5rem;
}
.cat-filters::-webkit-scrollbar {
    height: 6px;
}
.cat-filters::-webkit-scrollbar-thumb {
    background: #f0a8c0;
    border-radius: 999px;
}
.cat-filter {
    flex: 0 0 auto;
    border: 1.5px solid var(--line);
    background: #fff;
    color: var(--ink);
    border-radius: 999px;
    padding: .5rem 1rem;
    font-weight: 800;
    font-size: .8rem;
    min-height: 40px;
    cursor: pointer;
}
.cat-filter.active {
    background: #e85d8e;
    border-color: #e85d8e;
    color: #fff;
}
.filling-card {
    border: 1.5px solid #f3c9d8;
    border-radius: 14px;
    padding: .85rem;
    margin-bottom: .65rem;
    background: #fffafc;
    gap: .7rem !important;
}
.filling-price-block {
    display: grid;
    gap: .55rem;
    padding: .75rem;
    border-radius: 12px;
    border: 1.5px solid var(--line);
    background: #fff;
}
.filling-kit-block {
    border-color: #f0c9a0;
    background: #fff8ef;
}
.filling-price-title {
    font-size: .92rem;
}
.catalog-card {
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 18px;
    padding: 1rem;
    box-shadow: var(--shadow);
    display: grid;
    gap: .85rem;
}
.catalog-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
}
.catalog-head h2 {
    margin: 0;
    font-size: 1.2rem;
}
.catalog-head p {
    margin: .25rem 0 0;
    color: var(--muted);
    font-size: .85rem;
}
.catalog-list {
    display: grid;
    gap: .6rem;
}
.catalog-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .9rem;
    border: 1.5px solid var(--line);
    border-radius: 16px;
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.catalog-row:hover {
    border-color: #f0a8c0;
    box-shadow: 0 6px 16px rgba(232,93,142,.08);
}
.catalog-row[hidden] { display: none !important; }
.catalog-row-main {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
}
.catalog-row-text { min-width: 0; }
.catalog-row-text strong {
    display: block;
    font-size: 1.02rem;
    line-height: 1.3;
}
.catalog-row-text span {
    color: var(--muted);
    font-size: .8rem;
}
.catalog-row-badges {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    margin-top: .35rem;
}
.catalog-row-actions {
    display: inline-flex;
    gap: .35rem;
    flex: 0 0 auto;
}
.type-chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.type-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem .55rem .45rem .8rem;
    border-radius: 999px;
    background: #fff0f5;
    border: 1.5px solid var(--line);
    font-weight: 800;
    font-size: .85rem;
}
.catalog-empty {
    text-align: center;
    padding: 1.4rem 1rem;
    border: 1.5px dashed var(--line);
    border-radius: 14px;
    color: var(--muted);
}
.catalog-form-shell {
    display: grid;
    gap: 1rem;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}
.catalog-form-shell .catalog-form,
.catalog-form-shell .form-section,
.catalog-form-shell .price-box,
.catalog-form-shell .filling-card,
.catalog-form-shell .filling-price-block,
.catalog-form-shell .range-card,
.catalog-form-shell .variant-option-card {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}
.catalog-form-shell input,
.catalog-form-shell select,
.catalog-form-shell textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.catalog-form-shell .switch-group {
    max-width: 100%;
}
.catalog-form-shell .switch-group label {
    max-width: 100%;
    white-space: normal;
}
.catalog-form-shell .range-card .range-fields {
    grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 768px) {
    .catalog-form-shell .range-card .range-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .catalog-form-shell .range-card .range-remove {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}
@media (min-width: 1200px) {
    .catalog-form-shell .range-card .range-fields {
        grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    }
    .catalog-form-shell .range-card .range-remove {
        grid-column: auto;
        justify-content: flex-end;
    }
}
.cat-steps {
    display: flex;
    gap: .4rem;
    overflow-x: auto;
    padding-bottom: .2rem;
}
.cat-step-tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border: 1.5px solid var(--line);
    background: #fff;
    border-radius: 999px;
    padding: .45rem .8rem;
    font-weight: 800;
    font-size: .78rem;
    color: var(--muted);
    cursor: pointer;
    min-height: 40px;
}
.cat-step-tab .n {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f3c9d8;
    color: #c23d74;
    font-size: .72rem;
}
.cat-step-tab.active {
    border-color: #e85d8e;
    color: var(--ink);
    background: #fff0f5;
}
.cat-step-tab.active .n {
    background: #e85d8e;
    color: #fff;
}
.cat-step-tab.done .n {
    background: #3cb371;
    color: #fff;
}
.form-section {
    display: grid;
    gap: .85rem;
    padding: 1rem;
    border: 1.5px solid var(--line);
    border-radius: 16px;
    background: linear-gradient(180deg, #fffafc 0%, #fff 60%);
}
.form-section-head {
    display: flex;
    align-items: flex-start;
    gap: .7rem;
    flex-wrap: wrap;
}
.form-section-head > div { flex: 1; min-width: 140px; }
.form-section-head .btn-add {
    margin-left: auto;
}
.form-section-head h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
}
.form-section-head p {
    margin: .2rem 0 0;
    color: var(--muted);
    font-size: .85rem;
}
.form-section-n {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e85d8e;
    color: #fff;
    font-size: .8rem;
    font-weight: 800;
    flex: 0 0 auto;
}
.thumb-fallback {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #ffe8f0;
    color: #c23d74;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    flex: 0 0 auto;
}
.catalog-form {
    gap: 1rem !important;
}
.cat-browse[hidden] { display: none !important; }
.catalog-form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
    position: sticky;
    bottom: .5rem;
    z-index: 12;
    padding: .65rem;
    background: rgba(255,255,255,.96);
    border: 1.5px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(61,42,53,.1);
}
.catalog-form-actions .btn {
    width: 100%;
    min-height: 46px;
}
.catalog-form-actions .btn-wide {
    grid-column: 1 / -1;
}
.charge-extras-box {
    border: 1.5px solid #f0c9a0;
    border-radius: 14px;
    padding: .9rem;
    background: #fff8ef;
    display: grid;
    gap: .55rem;
}
.kit-item-card {
    border: 1.5px solid var(--line);
    border-radius: 14px;
    padding: .85rem;
    background: #fffafc;
    display: grid;
    gap: .65rem;
    margin-bottom: .55rem;
}
.kit-item-card .kit-item-grid {
    display: grid;
    gap: .55rem;
}
.kit-item-card .kit-item-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
}
.swap-card {
    border: 1.5px solid var(--line);
    border-radius: 14px;
    padding: .85rem;
    background: #fff;
    display: grid;
    gap: .55rem;
    margin-bottom: .55rem;
}
.cat-browse[hidden],
.catalog-form-focus[hidden] { display: none !important; }
.cat-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem;
}
.cat-stat {
    background: rgba(255,255,255,.12);
    border-radius: 12px;
    padding: .65rem .75rem;
}
.cat-stat strong {
    display: block;
    font-size: 1.25rem;
}
.cat-stat span {
    font-size: .75rem;
    color: rgba(255,255,255,.75);
}
@media (min-width: 640px) {
    .cat-hero-actions {
        grid-template-columns: auto auto;
        justify-content: start;
    }
    .cat-hero-actions .btn,
    .cat-hero-actions .btn-add { width: auto; }
    .cat-stats { grid-template-columns: repeat(3, 1fr); max-width: 420px; }
    .kit-item-card .kit-item-grid {
        grid-template-columns: 1fr 1fr;
    }
    .kit-item-card .kit-measure-wrap {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: .55rem;
    }
}
@media (min-width: 900px) {
    .cat-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 1.1rem;
        align-items: start;
    }
    .cat-layout > * {
        min-width: 0;
        max-width: 100%;
    }
    .cat-layout.form-open {
        grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
    }
    .catalog-form-shell {
        position: sticky;
        top: .75rem;
        max-height: calc(100vh - 1.5rem);
        overflow-x: hidden;
        overflow-y: auto;
    }
    .catalog-form-actions {
        position: sticky;
        bottom: 0;
    }
}

