:root {
    --bg-color: #140208;
    --glass-bg: rgba(28, 10, 18, 0.8);
    --glass-border: rgba(140, 60, 80, 0.3);
    --text-main: #F5EDE0;
    --text-muted: #D8CDB8;
    --gold-accent: #B8963E;
    --gold-light: #D4AF55;
    --burgundy-deep: #3D0E1E;
    --burgundy-mid: #5C1A2E;
    --burgundy-light: #8B2E4A;
    --price-bg: rgba(201, 168, 76, 0.14);
    --price-color: #C9A84C;
    --minicard-bg: rgba(50, 18, 32, 0.45);
    --field-bg: rgba(50, 18, 32, 0.55);
    --field-border: rgba(140, 60, 80, 0.45);
    --field-border-strong: rgba(140, 60, 80, 0.65);
    --field-focus-ring: rgba(184, 150, 62, 0.3);
    --field-shadow: inset 0 1px 0 rgba(245, 237, 224, 0.06);
    --font-display: 'Playfair Display', Georgia, serif;
    --font-ui: 'Montserrat', 'Segoe UI', system-ui, sans-serif;
    --font-serif-mobile: Georgia, 'Times New Roman', serif;
    --app-bg-wash: radial-gradient(circle at 50% 18%, rgba(99, 31, 52, 0.42), transparent 58%);
    --app-bg-base: linear-gradient(180deg, var(--bg-color) 0%, var(--bg-color) 100%);
    --surface-glass: var(--glass-sheen), linear-gradient(160deg, rgba(50, 18, 32, 0.55), rgba(10, 6, 4, 0.35)), var(--glass-bg);
    --surface-glass-soft: linear-gradient(160deg, rgba(245, 237, 224, 0.06), rgba(245, 237, 224, 0.02) 24%, transparent 50%), var(--minicard-bg);
    --surface-field: var(--field-bg);
    --surface-active: var(--gold-foil-soft);
    --line-soft: var(--glass-border);
    --line-strong: var(--field-border-strong);
    --shadow-glass: 0 18px 38px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(245, 237, 224, 0.05);
    --shadow-raised: 0 16px 30px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(245, 237, 224, 0.07);
    --shadow-modal: 0 24px 56px rgba(0, 0, 0, 0.56), inset 0 1px 0 rgba(245, 237, 224, 0.06);
    --status-success: #76e0a7;
    --status-success-bg: rgba(118, 224, 167, 0.15);
    --status-warning: var(--gold-light);
    --status-warning-bg: rgba(212, 175, 85, 0.16);
    --status-danger: #d96a7c;
    --status-danger-bg: rgba(201, 65, 85, 0.18);
    --motion-ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
    --motion-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --motion-ease-soft: cubic-bezier(0.22, 1, 0.36, 1);
    --motion-fast: 180ms;
    --motion-medium: 320ms;
    --motion-slow: 620ms;
    --transition-bounce: transform var(--motion-medium) var(--motion-ease-spring), opacity var(--motion-medium) var(--motion-ease-premium), box-shadow var(--motion-medium) var(--motion-ease-premium), border-color var(--motion-fast) ease, background var(--motion-medium) var(--motion-ease-premium);
    --transition-smooth: transform var(--motion-medium) var(--motion-ease-premium), opacity var(--motion-medium) var(--motion-ease-premium), box-shadow var(--motion-medium) var(--motion-ease-premium), border-color var(--motion-fast) ease, background var(--motion-medium) var(--motion-ease-premium), color var(--motion-fast) ease;
    --ui-entry-duration: 620ms;
    --ui-entry-delay: 72ms;
    --ui-entry-ease: var(--motion-ease-premium);
    --bg-surface: #140810;
    --bg-card: rgba(28, 10, 18, 0.92);
    --bg-elevated: rgba(50, 18, 32, 0.55);
    --border-glow: rgba(180, 140, 80, 0.15);
    --text-faint: rgba(216, 205, 184, 0.3);
    --font-mono: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    --gold-foil: linear-gradient(105deg, #8A6D2E 0%, #B8963E 18%, #F4E9C8 38%, #D4AF55 50%, #F4E9C8 62%, #B8963E 82%, #8A6D2E 100%);
    --gold-foil-soft: linear-gradient(135deg, #D4AF55, #B8963E 55%, #8A6D2E);
    --glass-sheen: linear-gradient(160deg, rgba(245, 237, 224, 0.12) 0%, rgba(245, 237, 224, 0.04) 22%, transparent 46%);
    --glass-tint: linear-gradient(160deg, rgba(50, 18, 32, 0.55), rgba(10, 6, 4, 0.55));
}

@keyframes foilSweep {
    to {
        background-position: 220% center;
    }
}

body.light-mode {
    --bg-color: #F5EDE0;
    --glass-bg: rgba(255, 251, 243, 0.82);
    --glass-border: rgba(140, 60, 80, 0.28);
    --text-main: #2A1520;
    --text-muted: #6E5C52;
    --gold-accent: #8A6D2E;
    --gold-light: #B8963E;
    --price-bg: rgba(184, 150, 62, 0.14);
    --price-color: #8A6D2E;
    --minicard-bg: rgba(61, 14, 30, 0.04);
    --field-bg: rgba(245, 237, 224, 0.95);
    --field-border: rgba(140, 60, 80, 0.35);
    --field-border-strong: rgba(140, 60, 80, 0.55);
    --field-focus-ring: rgba(138, 109, 46, 0.25);
    --field-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    --app-bg-wash: radial-gradient(circle at 22% 12%, rgba(140, 60, 80, 0.1), transparent 32vw);
    --app-bg-base: linear-gradient(180deg, var(--bg-color) 0%, var(--bg-color) 100%);
    --surface-glass: linear-gradient(145deg, rgba(255, 253, 247, 0.88), rgba(245, 237, 224, 0.72)), var(--glass-bg);
    --surface-glass-soft: linear-gradient(145deg, rgba(255, 253, 247, 0.68), rgba(245, 237, 224, 0.46)), var(--minicard-bg);
    --surface-active: linear-gradient(135deg, #B8963E, #8A6D2E);
    --shadow-glass: 0 12px 26px rgba(61, 14, 30, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.82);
    --shadow-raised: 0 14px 30px rgba(61, 14, 30, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.86);
    --shadow-modal: 0 24px 52px rgba(61, 14, 30, 0.20), inset 0 1px 0 rgba(255, 255, 255, 0.86);
    --status-success: #1F7A4D;
    --status-success-bg: rgba(31, 122, 77, 0.12);
    --status-warning: var(--gold-accent);
    --status-warning-bg: rgba(184, 150, 62, 0.16);
    --status-danger: #A33246;
    --status-danger-bg: rgba(163, 50, 70, 0.12);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    scrollbar-gutter: auto;
    background: var(--bg-color);
    overflow-x: hidden;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    background-image:
        radial-gradient(ellipse at 50% 22%, rgba(120, 28, 52, 0.72) 0%, rgba(90, 18, 38, 0.38) 36%, transparent 62%),
        radial-gradient(circle at 14% 55%, rgba(80, 16, 34, 0.58), transparent 44%),
        radial-gradient(circle at 86% 72%, rgba(60, 12, 28, 0.62), transparent 48%),
        radial-gradient(ellipse at 50% 100%, rgba(40, 8, 18, 0.80), transparent 54%),
        linear-gradient(180deg, #1A0510 0%, #0F020A 52%, #0A0208 100%);
    background-size: 170% 130%, 190% 180%, 190% 180%, 160% 100%, 100% 100%;
    background-position: 50% 0%, 0% 100%, 100% 100%, 50% 100%, 0 0;
    background-repeat: no-repeat;
    animation: burgundyDrift 32s ease-in-out infinite alternate;
    color: var(--text-main);
    transition: background-color 0.45s ease, color 0.45s ease;
    line-height: 1.4;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    min-height: 100dvh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 5dvh;
    overflow-x: hidden;
    overflow-y: scroll;
    position: relative;
}

body::before,
body::after {
    content: '';
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    pointer-events: none;
}

body::before {
    position: fixed;
    inset: 0;
    width: 100%;
    height: clamp(340px, 46dvh, 520px);
    z-index: 0;
    background-image:
        linear-gradient(180deg, rgba(14, 2, 8, 0.15) 0%, rgba(18, 4, 10, 0.78) 100%),
        radial-gradient(circle at 50% 30%, rgba(99, 31, 52, 0.65), transparent 60%),
        url('../images/backgrounds/metropolis-hero.webp');
    background-size: cover, cover, cover;
    background-position: center top, center top, center top;
    background-repeat: no-repeat;
    opacity: 0.98;
    transform: translateZ(0);
    transform-origin: center top;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 50%, rgba(0, 0, 0, 0.85) 68%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 50%, rgba(0, 0, 0, 0.85) 68%, transparent 100%);
}

body::before {
    height: clamp(340px, 46dvh, 500px);
    background-size: cover, cover, cover;
    background-position: center top, center top, center top;
    transform: translateZ(0);
}

body::after {
    bottom: 0;
    z-index: 1;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(18, 4, 10, 0.18) 22%, rgba(22, 5, 12, 0.52) 48%, rgba(16, 3, 9, 0.88) 72%, #100208 100%),
        radial-gradient(ellipse at 50% 18%, rgba(212, 175, 55, 0.06), transparent 46%),
        radial-gradient(circle at 18% 38%, rgba(92, 26, 46, 0.28), transparent 38%),
        radial-gradient(circle at 82% 58%, rgba(139, 46, 74, 0.18), transparent 36%),
        radial-gradient(ellipse at 50% 100%, rgba(61, 14, 30, 0.72), transparent 52%);
    background-size: 100% 100%, 100% 100%, 170% 170%, 180% 180%, 150% 130%;
    background-position: 0 0, 0 0, 0% 30%, 100% 60%, 50% 100%;
    background-repeat: no-repeat;
    animation: burgundyVeilDrift 38s ease-in-out infinite alternate;
    mix-blend-mode: normal;
}

@keyframes burgundyDrift {
    0% {
        background-position: 50% 0%, 0% 100%, 100% 100%, 50% 100%, 0 0;
    }

    33% {
        background-position: 36% 14%, 42% 68%, 58% 78%, 50% 100%, 0 0;
    }

    66% {
        background-position: 62% 8%, 14% 82%, 84% 52%, 50% 100%, 0 0;
    }

    100% {
        background-position: 48% 4%, 28% 76%, 72% 64%, 50% 100%, 0 0;
    }
}

@keyframes burgundyVeilDrift {
    0% {
        background-position: 0 0, 0 0, 0% 30%, 100% 60%, 50% 100%;
    }

    33% {
        background-position: 0 0, 0 0, 22% 46%, 76% 44%, 42% 100%;
    }

    66% {
        background-position: 0 0, 0 0, 8% 68%, 88% 28%, 58% 100%;
    }

    100% {
        background-position: 0 0, 0 0, 18% 58%, 72% 52%, 48% 100%;
    }
}

body.search-active::before {
    opacity: 0.48;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.86) 34%, rgba(0, 0, 0, 0.38) 50%, transparent 66%);
    mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.86) 34%, rgba(0, 0, 0, 0.38) 50%, transparent 66%);
}

body.search-active::after {
    background: linear-gradient(180deg, rgba(16, 3, 9, 0.00) 0%, rgba(18, 4, 10, 0.38) 18%, rgba(14, 3, 8, 0.90) 42%, rgba(12, 2, 7, 1) 100%);
    animation: none;
}

@media (prefers-reduced-motion: reduce) {

    body,
    body::after {
        animation: none;
    }
}

input,
button,
select,
textarea {
    font-family: 'Montserrat', sans-serif;
}

@keyframes premiumRevealUp {
    0% {
        opacity: 0;
        transform: translate3d(0, 22px, 0) scale(0.985);
        filter: blur(8px);
    }

    58% {
        opacity: 1;
        filter: blur(0);
    }

    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
        filter: blur(0);
    }
}

@keyframes premiumCardSheen {
    0% {
        transform: translate3d(-132%, -18%, 0) rotate(18deg);
        opacity: 0;
    }

    32% {
        opacity: 0.52;
    }

    100% {
        transform: translate3d(132%, 18%, 0) rotate(18deg);
        opacity: 0;
    }
}

@keyframes premiumToastLift {
    0% {
        transform: translate(-50%, 118%) scale(0.98);
        opacity: 0;
        filter: blur(6px);
    }

    62% {
        transform: translate(-50%, -4px) scale(1.01);
        opacity: 1;
        filter: blur(0);
    }

    100% {
        transform: translate(-50%, 0) scale(1);
        opacity: 1;
        filter: blur(0);
    }
}

@keyframes fadeSlideUp {
    0% {
        opacity: 0;
        transform: translateY(24px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    animation: premiumRevealUp 0.66s var(--motion-ease-premium) both;
}

.search-container {
    animation: premiumRevealUp 0.66s var(--motion-ease-premium) 0.08s both;
}

.premium-topbar {
    animation: premiumRevealUp 0.5s var(--motion-ease-premium) 0.12s both;
}

header,
.search-container,
.premium-topbar,
.theme-toggle,
.admin-btn,
.logout-btn,
.session-user-card {
    will-change: transform, opacity;
}

@keyframes buttonTapPulse {
    0% {
        transform: translateY(0) scale(1);
    }

    42% {
        transform: translateY(1px) scale(0.965);
    }

    100% {
        transform: translateY(-1px) scale(1);
    }
}

@keyframes menuItemIn {
    0% {
        opacity: 0;
        transform: translateY(-8px) scale(0.985);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.motion-interactive {
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
}

.motion-interactive::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: radial-gradient(circle at var(--motion-x, 50%) var(--motion-y, 50%), rgba(255, 232, 168, 0.22), rgba(212, 175, 55, 0.08) 24%, transparent 55%);
    opacity: 0;
    transform: scale(0.94);
    transition: opacity var(--motion-fast) ease, transform var(--motion-medium) var(--motion-ease-premium);
    mix-blend-mode: screen;
}

.motion-interactive:hover::after,
.motion-interactive:focus-visible::after {
    opacity: 0.78;
    transform: scale(1);
}

.motion-interactive:active {
    transform: translateY(1px) scale(0.985);
}

button.is-tapping,
.button-tap {
    animation: buttonTapPulse 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.app-shell {
    width: min(92vw, 680px);
    position: relative;
    z-index: 12;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    isolation: isolate;
    margin-top: 12dvh;
}

body .featured-panel {
    position: relative;
    padding-top: .35rem;
}

body .featured-panel::after {
    content: "Catálogo visual real · botellas transparentes";
    display: block;
    text-align: center;
    margin: -.15rem 0 .25rem;
    color: rgba(255, 232, 162, .68);
    font-size: .58rem;
    letter-spacing: .11em;
    text-transform: uppercase;
    font-weight: 900;
}

body .featured-card {
    flex-basis: clamp(112px, 29vw, 146px);
    min-height: 202px;
}

body .featured-photo {
    height: 178px;
    filter: drop-shadow(0 22px 18px rgba(0, 0, 0, .42));
}

.app-shell::before {
    content: '';
    position: absolute;
    inset: -18px -14px;
    border-radius: 34px;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0));
    border: 1px solid rgba(212, 175, 55, 0.08);
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.18);
    opacity: 0.45;
    z-index: -1;
}

header {
    margin-top: 0;
    margin-bottom: 0.45rem;
    text-align: center;
    z-index: 10;
}

.grape-logo-wrap {
    width: auto;
    display: flex;
    justify-content: flex-start;
    position: fixed;
    top: max(0.34rem, env(safe-area-inset-top));
    left: max(0.42rem, env(safe-area-inset-left));
    margin: 0;
    pointer-events: none;
    perspective: 520px;
    z-index: 30;
}

.grape-logo {
    width: clamp(56px, 12vw, 76px);
    height: auto;
    overflow: visible;
    filter:
        drop-shadow(0 9px 20px rgba(25, 9, 35, 0.62)) drop-shadow(0 0 18px rgba(212, 175, 55, 0.26));
    transform-origin: 46% 2%;
    animation: grapeWind 3.9s ease-in-out infinite;
}

.grape-logo .vine-stem,
.grape-logo .vine-curl {
    stroke: #8f7a2e;
    stroke-width: 4;
    stroke-linecap: round;
    fill: none;
}

.grape-logo .leaf {
    fill: url(#grapeLeafGradient);
    stroke: rgba(243, 229, 171, 0.32);
    stroke-width: 1.2;
    transform-origin: 52px 23px;
    animation: leafFlutter 4.2s ease-in-out infinite;
}

.grape-logo .grape {
    fill: url(#grapeGradient);
    stroke: rgba(255, 255, 255, 0.16);
    stroke-width: 1;
}

.grape-logo .shine {
    fill: rgba(255, 255, 255, 0.34);
}

.grape-logo .g1 {
    animation: grapeBob 3.4s ease-in-out infinite;
    transform-origin: 45px 49px;
}

.grape-logo .g2 {
    animation: grapeBob 3.7s ease-in-out 0.16s infinite;
    transform-origin: 62px 51px;
}

.grape-logo .g3 {
    animation: grapeBob 3.5s ease-in-out 0.32s infinite;
    transform-origin: 79px 49px;
}

.grape-logo .g4 {
    animation: grapeBob 3.9s ease-in-out 0.10s infinite;
    transform-origin: 52px 68px;
}

.grape-logo .g5 {
    animation: grapeBob 3.45s ease-in-out 0.28s infinite;
    transform-origin: 69px 70px;
}

.grape-logo .g6 {
    animation: grapeBob 3.8s ease-in-out 0.46s infinite;
    transform-origin: 60px 88px;
}

@keyframes grapeWind {

    0%,
    100% {
        transform: rotate(-4deg) translate3d(-1px, 0, 0);
    }

    28% {
        transform: rotate(5.2deg) translate3d(3px, 1.8px, 0);
    }

    58% {
        transform: rotate(-2.6deg) translate3d(-2px, -1px, 0);
    }

    78% {
        transform: rotate(2.2deg) translate3d(1px, 1px, 0);
    }
}

@keyframes grapeBob {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    42% {
        transform: translate(2.8px, -3.4px) scale(1.038);
    }

    70% {
        transform: translate(-1.2px, 1.6px) scale(0.992);
    }
}

@keyframes leafFlutter {

    0%,
    100% {
        transform: rotate(-4deg) scale(1);
    }

    50% {
        transform: rotate(8deg) scale(1.04);
    }
}

.title-cava {
    color: var(--gold-accent);
    line-height: 1;
    text-shadow: 0 0 12px rgba(212, 175, 55, 0.18);
    transition: var(--transition-smooth);
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.8vw;
    margin-bottom: -0.5rem;
}

.stock-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: clamp(1.45rem, 4.1vw, 2.85rem);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cava-text {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1.45rem, 4.1vw, 2.85rem);
}

.title-metropolis {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2rem, 5.8vw, 3.55rem);
    letter-spacing: 0.18em;
    font-weight: 700;
    color: #ffffff;
    padding: 0 4vw;
    text-shadow:
        0 0 8px #d4af37,
        0 0 20px rgba(212, 175, 55, 0.8),
        0 0 35px rgba(212, 175, 55, 0.4);
    margin-top: 0.15rem;
}

.search-container {
    width: 100%;
    max-width: 680px;
    position: relative;
    z-index: 20;
    padding: 1.35rem 0 1.45rem;
    display: flex;
    flex-direction: column;
    isolation: isolate;
}

.search-container>* {
    position: relative;
    z-index: 1;
}

body.search-active .search-container::after {
    content: '';
    position: absolute;
    left: -6vw;
    right: -6vw;
    top: 4.9rem;
    height: 78dvh;
    pointer-events: none;
    z-index: 0;
    background:
        linear-gradient(180deg, rgba(5, 6, 9, 0) 0%, rgba(5, 6, 9, 0.38) 10%, rgba(6, 7, 10, 0.76) 28%, rgba(7, 8, 11, 0.88) 78%, rgba(7, 8, 11, 0.18) 100%);
    filter: blur(18px);
    opacity: 0.96;
}

.update-notice-banner {
    display: none;
    width: 100%;
    margin: 0 0 0.7rem 0;
    padding: 0.72rem 0.82rem;
    border-radius: 14px;
    border: 1px solid rgba(212, 175, 55, 0.24);
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.11), rgba(212, 175, 55, 0.06));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: var(--text-main);
    text-align: left;
    gap: 0.38rem;
}

.update-notice-banner.show {
    display: grid;
}

.update-notice-title {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--gold-accent);
    text-transform: uppercase;
}

.update-notice-title-text {
    min-width: 0;
    flex: 1 1 auto;
}

.update-notice-progress {
    flex: 0 0 auto;
    padding: 0.15rem 0.42rem;
    border-radius: 999px;
    border: 1px solid rgba(184, 150, 62, 0.35);
    background: rgba(184, 150, 62, 0.1);
    color: var(--gold-light);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    letter-spacing: 0.08em;
    line-height: 1;
}

.update-notice-text {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.79rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--text-main);
}

.update-notice-btn {
    justify-self: start;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    border: 1px solid rgba(212, 175, 55, 0.38);
    background: rgba(212, 175, 55, 0.18);
    color: #ffe8a8;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-radius: 10px;
    padding: 0.38rem 0.62rem;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.update-notice-btn .update-btn-label {
    line-height: 1;
}

.update-notice-btn .update-btn-loader {
    width: 14px;
    height: 14px;
    display: inline-block;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.update-notice-btn .update-btn-loader-track {
    fill: none;
    stroke: rgba(255, 232, 168, 0.25);
    stroke-width: 2.1;
}

.update-notice-btn .update-btn-loader-arc {
    fill: none;
    stroke: rgba(255, 232, 168, 0.98);
    stroke-width: 2.1;
    stroke-linecap: round;
    stroke-dasharray: 18 32;
    transform-origin: 12px 12px;
}

.update-notice-btn .update-btn-loader-dot {
    fill: rgba(255, 232, 168, 0.98);
    transform-origin: 12px 12px;
}

.update-notice-btn.is-loading .update-btn-loader {
    opacity: 1;
    transform: scale(1);
}

.update-notice-btn.is-loading .update-btn-loader-arc {
    animation: updateLoaderSpin 0.8s linear infinite;
}

.update-notice-btn.is-loading .update-btn-loader-dot {
    animation: updateLoaderPulse 0.92s ease-in-out infinite;
}

@keyframes updateLoaderSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes updateLoaderPulse {

    0%,
    100% {
        opacity: 0.28;
        transform: scale(0.82);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

.update-notice-btn:hover {
    background: rgba(212, 175, 55, 0.34);
    border-color: rgba(212, 175, 55, 0.74);
    transform: translateY(-0.5px);
}

.update-notice-btn:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

.update-notice-highlights {
    margin-top: 0.2rem;
}

.update-notice-highlights-title {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 232, 168, 0.95);
}

.update-notice-highlights-list {
    margin: 0.26rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.16rem;
}

.update-notice-highlights-list li {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.74rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--text-main);
    opacity: 0.95;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 0.9rem;
}

.search-icon {
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    fill: var(--text-muted);
}

#searchInput {
    width: 100%;
    padding: 1.2rem 1rem 1.2rem 2rem;
    font-size: 1.3rem;
    font-family: 'Montserrat', sans-serif;
    background: var(--field-bg);
    border: 1px solid var(--field-border);
    border-radius: 30px;
    color: var(--text-main);
    outline: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), var(--field-shadow);
    transition: var(--transition-smooth);
}

#searchInput:hover {
    border-color: var(--field-border-strong);
}

#searchInput:focus {
    border-color: var(--gold-accent);
    box-shadow: 0 0 0 3px var(--field-focus-ring), 0 10px 28px rgba(212, 175, 55, 0.18), var(--field-shadow);
}

#searchInput:focus-visible {
    outline: none;
}

#searchInput::placeholder {
    color: var(--text-muted);
    font-weight: 300;
}

.ref-stats {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-bottom: 0.7rem;
}

.ref-count {
    min-width: min(100%, 146px);
    text-align: left;
    margin-bottom: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
    letter-spacing: 0.06em;
    font-weight: 400;
    order: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.78rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
    backdrop-filter: blur(8px);
}

.ref-count span {
    color: var(--gold-accent);
    font-weight: 700;
}

.ref-count-pending span {
    color: var(--text-muted);
    font-weight: 700;
}

.ref-count.ref-count-located {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 0.84rem;
    letter-spacing: 0.05em;
}

.ref-count.ref-count-located span {
    color: #53d66f;
    font-weight: 700;
}

.filter-bar {
    width: 100%;
    margin-top: 0.45rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.filter-restaurant-row {
    width: 100%;
    display: grid;
    grid-template-columns: 1.38fr 0.68fr 0.88fr 1.02fr 0.86fr;
    gap: 0.42rem;
    align-items: center;
    overflow: visible;
    padding: 0.06rem 0 0.18rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.filter-restaurant-row::-webkit-scrollbar {
    display: none;
}

.filter-pill {
    min-width: 0;
    width: 100%;
    height: 40px;
    padding: 0 0.86rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-muted);
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(0.62rem, 2.2vw, 1rem);
    font-weight: 700;
    letter-spacing: 0.012em;
    line-height: 1.14;
    cursor: pointer;
    transition: all 0.25s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
    text-align: center;
}

.filter-pill:active {
    transform: scale(0.95);
}

.filter-pill.active {
    background: var(--gold-accent);
    color: #111;
    border-color: var(--gold-accent);
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.3);
}

.modal-actions::-webkit-scrollbar,
.consume-actions::-webkit-scrollbar,
.edit-actions::-webkit-scrollbar {
    display: none;
}

#searchResults {
    position: absolute;
    top: 100%;
    left: -0.04rem;
    right: -0.04rem;
    background: transparent;
    max-height: min(64vh, 620px);
    overflow-y: auto;
    display: none;
    z-index: 9999;
    padding: 0.58rem 0.04rem 4.5rem;
    border: 1px solid transparent;
    border-top: 0;
    border-radius: 0 0 24px 24px;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.24) 2%, rgba(0, 0, 0, 0.86) 6%, #000 12%, #000 100%);
    mask-image: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.24) 2%, rgba(0, 0, 0, 0.86) 6%, #000 12%, #000 100%);
}

#searchResults::-webkit-scrollbar {
    display: none;
}

body.search-active .home-insights {
    opacity: 0;
    visibility: hidden;
    filter: none;
    transform: translateY(18px) scale(0.972);
    pointer-events: none;
}

body.search-active .home-insights::before {
    content: '';
    position: absolute;
    inset: -2.5rem -0.8rem auto;
    height: 7.5rem;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(5, 6, 9, 0), rgba(5, 6, 9, 0.28) 48%, rgba(5, 6, 9, 0));
    filter: blur(18px);
}

.search-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    justify-content: stretch;
    align-items: center;
    column-gap: 0.74rem;
    padding: 0.68rem 0.86rem;
    margin-bottom: 0.48rem;
    background:
        radial-gradient(ellipse at 14% 24%, rgba(212, 175, 55, 0.072), transparent 44%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(212, 175, 55, 0.026)),
        rgba(13, 14, 18, 0.54);
    border: 1px solid rgba(212, 175, 55, 0.20);
    border-radius: 22px;
    cursor: pointer;
    transition: transform var(--motion-medium) var(--motion-ease-premium), background var(--motion-medium) var(--motion-ease-premium), border-color var(--motion-fast) ease, box-shadow var(--motion-medium) var(--motion-ease-premium), opacity var(--motion-fast) ease;
    animation: premiumRevealUp 0.48s var(--motion-ease-premium) both;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), inset 0 -18px 38px rgba(0, 0, 0, 0.18), 0 14px 28px rgba(0, 0, 0, 0.13);
    overflow: hidden;
    min-width: 0;
    backdrop-filter: blur(14px) saturate(1.12);
    -webkit-backdrop-filter: blur(14px) saturate(1.12);
}

.search-item:first-child {
    margin-top: 0;
}

.search-item:nth-child(2) {
    animation-delay: 34ms;
}

.search-item:nth-child(3) {
    animation-delay: 68ms;
}

.search-item:nth-child(4) {
    animation-delay: 102ms;
}

.search-item:nth-child(5) {
    animation-delay: 136ms;
}

.search-item:hover {
    transform: translate3d(0, -2px, 0) scale(1.006);
    border-color: rgba(212, 175, 55, 0.36);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.055), inset 0 -18px 38px rgba(0, 0, 0, 0.18), 0 20px 36px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(212, 175, 55, 0.07);
}

.search-item:active {
    transform: translate3d(0, 1px, 0) scale(0.992);
}

.search-result-summary {
    margin: 0.32rem 0.12rem 0.88rem;
    padding: 0.66rem 0.9rem;
    border-radius: 16px;
    color: var(--text-muted);
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    text-align: center;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(212, 175, 55, 0.16);
}

.search-item::before {
    content: '';
    position: absolute;
    inset: -44% auto -44% -34%;
    width: 48%;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255, 232, 168, 0.13), transparent);
    opacity: 0;
    transform: translate3d(-132%, -18%, 0) rotate(18deg);
}

.search-item:hover::before {
    animation: premiumCardSheen 900ms var(--motion-ease-premium) both;
}

.home-insights {
    width: 100%;
    display: grid;
    gap: 0.78rem;
    margin-top: 0.12rem;
    padding-bottom: 2.4rem;
    transition: opacity 0.22s ease, filter 0.22s ease, transform 0.22s ease;
}

.home-panel {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid rgba(212, 175, 55, 0.18);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(212, 175, 55, 0.035)),
        rgba(15, 15, 20, 0.62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 18px 38px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.home-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 12% 0%, rgba(184, 150, 62, 0.12), transparent 34%),
        linear-gradient(120deg, rgba(245, 237, 224, 0.06), transparent 34%);
    opacity: 0.8;
}

body .home-panel:not(.featured-panel)::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gold-foil);
    background-size: 220% auto;
    opacity: 0.55;
    z-index: 2;
    pointer-events: none;
    animation: foilSweep 7s linear infinite;
}

body.light-mode .home-panel:not(.featured-panel)::after {
    opacity: 0.7;
}

.home-panel>* {
    position: relative;
    z-index: 1;
}

.home-panel-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.82rem 0.9rem 0.38rem;
}

.home-panel-kicker {
    font-family: var(--font-mono);
    font-size: 0.64rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold-accent);
    font-weight: 500;
}

.home-panel-title {
    margin-top: 0.12rem;
    font-size: 1rem;
    line-height: 1.08;
    font-weight: 800;
    color: var(--text-main);
}

.home-panel-note {
    font-size: 0.68rem;
    color: rgba(245, 232, 196, 0.72);
    font-weight: 650;
    text-align: right;
}

.featured-panel,
.inventory-value-panel {
    overflow: hidden;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.featured-panel::before,
.inventory-value-panel::before {
    display: none;
}

.featured-panel .home-panel-head {
    padding: 0.34rem 0.12rem 0.2rem;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.featured-panel .home-panel-note {
    display: none;
}

.inventory-value-panel .home-panel-head {
    padding: 0.2rem 0.08rem 0.22rem;
    align-items: flex-start;
}

.inventory-value-panel .home-panel-kicker,
.inventory-value-panel .home-panel-note {
    display: none;
}

.featured-row {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    gap: 0.72rem;
    padding: 0.92rem 0.08rem 1.06rem;
    overflow-x: auto;
    overflow-y: visible;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: auto;
    touch-action: pan-x;
    cursor: grab;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
}

.featured-row::-webkit-scrollbar {
    display: none;
}

.featured-row.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
}

.featured-row.carousel-ready {
    will-change: scroll-position;
}

.featured-row:hover .featured-card,
.featured-row:focus-within .featured-card,
.featured-row.is-dragging .featured-card {
    animation-play-state: paused;
}

.featured-card {
    flex: 0 0 clamp(92px, 27vw, 126px);
    min-height: 166px;
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.22rem;
    padding: 0.08rem 0.02rem 0.16rem;
    border: 0;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    animation: bottleFloatSlow 10s ease-in-out infinite;
    transform: translateZ(0);
}

.featured-card::before,
.featured-card::after {
    content: '';
    position: absolute;
    pointer-events: none;
    z-index: -1;
}

.featured-card::before {
    width: 108%;
    height: 58%;
    left: 50%;
    top: 10%;
    transform: translateX(-50%);
    border-radius: 50%;
    background:
        radial-gradient(ellipse at 50% 52%,
            var(--bottle-aura-core, rgba(255, 244, 190, 0.22)) 0%,
            var(--bottle-aura-soft, rgba(212, 175, 55, 0.15)) 24%,
            var(--bottle-aura, rgba(212, 175, 55, 0.10)) 42%,
            rgba(0, 0, 0, 0) 66%);
    filter: blur(22px);
    opacity: 0.28;
}

.featured-card::after {
    width: 86%;
    height: 14%;
    left: 50%;
    bottom: 2.35rem;
    transform: translateX(-50%);
    border-radius: 999px;
    background: radial-gradient(ellipse at 50% 50%, var(--bottle-aura-soft, rgba(212, 175, 55, 0.12)) 0%, rgba(0, 0, 0, 0) 68%);
    filter: blur(14px);
    opacity: 0.16;
}

.featured-card:nth-child(3n + 2) {
    animation-delay: -2.4s;
}

.featured-card:nth-child(3n) {
    animation-delay: -5.2s;
}

.featured-photo {
    width: 100%;
    height: 152px;
    position: relative;
    z-index: 2;
    object-fit: contain;
    object-position: center bottom;
    border-radius: 0;
    background: transparent;
    image-rendering: auto;
    filter: drop-shadow(0 15px 13px rgba(0, 0, 0, 0.34));
    transform: translateZ(0);
    transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1), filter 220ms ease;
}

.featured-card:hover .featured-photo,
.featured-card:focus-visible .featured-photo {
    transform: translate3d(0, -4px, 0) scale(1.025);
    filter: drop-shadow(0 20px 18px rgba(0, 0, 0, 0.42));
}

.bottle-aura-red {
    --bottle-aura: rgba(116, 0, 35, 0.42);
    --bottle-aura-soft: rgba(160, 22, 65, 0.24);
    --bottle-aura-core: rgba(255, 96, 132, 0.20);
}

.bottle-aura-white {
    --bottle-aura: rgba(255, 238, 143, 0.34);
    --bottle-aura-soft: rgba(255, 249, 199, 0.26);
    --bottle-aura-core: rgba(255, 255, 232, 0.26);
}

.bottle-aura-champagne {
    --bottle-aura: rgba(242, 190, 70, 0.40);
    --bottle-aura-soft: rgba(255, 222, 116, 0.28);
    --bottle-aura-core: rgba(255, 235, 166, 0.24);
}

.bottle-aura-rose {
    --bottle-aura: rgba(255, 38, 150, 0.38);
    --bottle-aura-soft: rgba(255, 95, 184, 0.24);
    --bottle-aura-core: rgba(255, 169, 218, 0.22);
}

.bottle-aura-champagne-rose {
    --bottle-aura: rgba(255, 154, 196, 0.34);
    --bottle-aura-soft: rgba(255, 205, 222, 0.26);
    --bottle-aura-core: rgba(255, 226, 236, 0.22);
}

.bottle-aura-amber {
    --bottle-aura: rgba(255, 151, 55, 0.34);
    --bottle-aura-soft: rgba(255, 197, 108, 0.24);
    --bottle-aura-core: rgba(255, 221, 159, 0.22);
}

.featured-meta {
    display: none;
}

.featured-name {
    display: -webkit-box;
    width: 100%;
    min-height: 2.16em;
    max-height: 2.16em;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: #fff7df;
    font-size: clamp(0.58rem, 2.1vw, 0.68rem);
    line-height: 1.08;
    font-weight: 850;
    letter-spacing: -0.025em;
    text-align: center;
    text-shadow:
        0 1px 4px rgba(0, 0, 0, 0.82),
        0 0 8px var(--bottle-aura-soft, rgba(212, 175, 55, 0.22)),
        0 0 14px var(--bottle-aura, rgba(212, 175, 55, 0.20));
}

.featured-price,
.item-price,
.service-chip-value.is-price,
.est-mobile-field-value.is-price,
.est-table .pvp-cell,
.alt-item-price:not(.alt-item-price-na) {
    color: var(--price-color) !important;
    font-weight: 950;
    text-shadow:
        0 0 9px rgba(201, 168, 76, 0.36),
        0 0 18px rgba(201, 168, 76, 0.18);
}

.featured-price {
    font-size: 0.66rem;
    letter-spacing: 0.01em;
}

@keyframes bottleFloatSlow {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-4px) scale(1.012);
    }
}

.inventory-value-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.56rem;
    padding: 0.18rem 0.08rem 0.52rem;
}

.inventory-value-card {
    position: relative;
    min-height: 126px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0.74rem 0.62rem;
    border-radius: 19px;
    border: 1px solid rgba(212, 175, 55, 0.22);
    background:
        linear-gradient(145deg, rgba(16, 15, 13, 0.12), rgba(4, 5, 7, 0.34)),
        linear-gradient(145deg, rgba(83, 214, 111, 0.10), rgba(212, 175, 55, 0.06)),
        linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(212, 175, 55, 0.035));
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 16px 28px rgba(0, 0, 0, 0.20);
    isolation: isolate;
}

.inventory-value-photo {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.74;
    transform: scale(1.03);
    filter: saturate(1.08) contrast(1.04);
    pointer-events: none;
}

.inventory-value-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.18), transparent 30%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.00), rgba(0, 0, 0, 0.42));
    opacity: 0.62;
    pointer-events: none;
}

.inventory-value-card::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05), inset 0 -34px 54px rgba(0, 0, 0, 0.54);
    pointer-events: none;
}

.inventory-value-card.is-bodega {
    background:
        linear-gradient(145deg, rgba(10, 10, 9, 0.18), rgba(3, 4, 5, 0.40)),
        radial-gradient(circle at 18% 0%, rgba(212, 175, 55, 0.18), transparent 36%),
        linear-gradient(145deg, rgba(83, 214, 111, 0.11), rgba(14, 13, 16, 0.74));
}

.inventory-value-card.is-total-stock {
    background:
        linear-gradient(145deg, rgba(5, 14, 8, 0.08), rgba(2, 3, 3, 0.38)),
        radial-gradient(circle at 16% 0%, rgba(83, 214, 111, 0.22), transparent 34%),
        radial-gradient(circle at 88% 16%, rgba(212, 175, 55, 0.24), transparent 38%),
        linear-gradient(145deg, rgba(20, 24, 18, 0.86), rgba(8, 8, 10, 0.82));
    border-color: rgba(83, 214, 111, 0.26);
}

.inventory-value-card.is-total-stock .inventory-value-label::after {
    content: '';
}

.inventory-value-amount {
    position: relative;
    z-index: 2;
    font-size: clamp(1.08rem, 5vw, 1.42rem);
    line-height: 1;
    font-weight: 950;
    color: var(--price-color);
    text-shadow: 0 0 10px rgba(201, 168, 76, 0.38), 0 2px 10px rgba(0, 0, 0, 0.52);
}

.inventory-value-label {
    position: relative;
    z-index: 2;
    margin-top: 0.34rem;
    font-size: 0.68rem;
    line-height: 1.1;
    color: rgba(255, 243, 212, 0.92);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.62);
}

.inventory-value-detail {
    position: relative;
    z-index: 2;
    margin-top: 0.16rem;
    font-size: 0.6rem;
    color: rgba(255, 243, 212, 0.76);
    font-weight: 760;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.56);
}

.ops-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0.42rem 0.72rem 0.82rem;
}

.ops-card {
    padding: 0.62rem 0.54rem;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ops-value {
    font-size: 1.02rem;
    font-weight: 900;
    color: var(--gold-light);
    line-height: 1;
}

.ops-label {
    margin-top: 0.26rem;
    font-size: 0.58rem;
    line-height: 1.18;
    color: rgba(245, 232, 196, 0.74);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.heatmap-list {
    display: grid;
    gap: 0.45rem;
    padding: 0.42rem 0.72rem 0.88rem;
}

.heatmap-row {
    display: grid;
    grid-template-columns: 82px 1fr 42px;
    align-items: center;
    gap: 0.52rem;
    font-size: 0.7rem;
    color: var(--text-main);
    font-weight: 800;
}

.heatmap-track {
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.heatmap-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7a1b36, #d4af37, #53d66f);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.22);
}

.heatmap-percent {
    color: var(--text-muted);
    text-align: right;
    font-size: 0.66rem;
}

body.light-mode {
    background-image:
        radial-gradient(circle at 18% 12%, rgba(196, 151, 55, 0.13), transparent 30vw),
        radial-gradient(circle at 86% 2%, rgba(128, 27, 54, 0.08), transparent 26vw),
        linear-gradient(180deg, #fffdf8 0%, #f7efe2 100%);
    background-size: auto;
    background-position: 0 0;
    animation: none;
}

body.light-mode::before {
    background-image:
        linear-gradient(180deg, rgba(255, 253, 247, 0.52) 0%, rgba(255, 253, 247, 0.38) 36%, rgba(248, 239, 223, 0.72) 76%, rgba(248, 239, 223, 0.98) 100%),
        radial-gradient(circle at 50% 16%, rgba(212, 175, 55, 0.10), transparent 34%),
        url('../images/backgrounds/metropolis-hero.webp');
    opacity: 0.72;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 44%, rgba(0, 0, 0, 0.74) 64%, rgba(0, 0, 0, 0.26) 86%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 44%, rgba(0, 0, 0, 0.74) 64%, rgba(0, 0, 0, 0.26) 86%, transparent 100%);
}

body.light-mode::after {
    background:
        linear-gradient(180deg, rgba(255, 253, 247, 0.00) 0%, rgba(255, 253, 247, 0.20) 18%, rgba(251, 245, 234, 0.66) 45%, rgba(248, 239, 223, 0.96) 78%, rgba(247, 239, 226, 1) 100%),
        radial-gradient(ellipse at 50% 20%, rgba(212, 175, 55, 0.055), transparent 48%),
        radial-gradient(circle at 12% 42%, rgba(128, 27, 54, 0.045), transparent 36%);
    animation: none;
}

body.light-mode.search-active::before {
    opacity: 0.38;
}

body.light-mode.search-active::after {
    background: linear-gradient(180deg, rgba(255, 253, 247, 0.08) 0%, rgba(251, 245, 234, 0.70) 28%, rgba(248, 239, 223, 0.98) 58%, rgba(247, 239, 226, 1) 100%);
}

body.light-mode.search-active .search-container::after {
    display: none;
}

body.light-mode .session-user-card {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(250, 244, 232, 0.78));
    color: #2b251c;
    border-color: rgba(140, 60, 80, 0.24);
    box-shadow: 0 10px 24px rgba(100, 72, 25, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

body.light-mode .session-user-card:hover,
body.light-mode .session-user-card[aria-expanded="true"] {
    background: linear-gradient(135deg, rgba(255, 250, 235, 0.98), rgba(239, 222, 185, 0.72));
    border-color: rgba(140, 60, 80, 0.42);
}

body.light-mode .user-menu-panel {
    background: linear-gradient(145deg, rgba(255, 253, 247, 0.97), rgba(246, 236, 218, 0.94));
    border-color: rgba(140, 60, 80, 0.22);
    box-shadow: 0 18px 42px rgba(100, 72, 25, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

body.light-mode .admin-btn {
    background: rgba(255, 255, 255, 0.62);
    color: #2b251c;
    border-color: rgba(140, 60, 80, 0.16);
}

body.light-mode .update-notice-banner {
    background: linear-gradient(145deg, rgba(255, 253, 247, 0.84), rgba(247, 236, 211, 0.70));
    border-color: rgba(140, 60, 80, 0.22);
    box-shadow: 0 14px 30px rgba(100, 72, 25, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

body.light-mode .update-notice-progress,
body.light-mode .update-notice-highlights-title {
    color: #8A6D2E;
}

body.light-mode .update-notice-btn {
    background: linear-gradient(135deg, #8A6D2E, #B8963E);
    color: #1f180b;
    border-color: rgba(129, 92, 10, 0.42);
    box-shadow: 0 8px 18px rgba(138, 109, 46, 0.20);
}

body.light-mode .ref-count,
body.light-mode .filter-pill {
    background: rgba(255, 253, 247, 0.78);
    border-color: rgba(140, 60, 80, 0.22);
    box-shadow: 0 8px 22px rgba(113, 81, 21, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

body.light-mode #searchInput {
    background: linear-gradient(135deg, rgba(255, 253, 247, 0.92), rgba(246, 236, 218, 0.78));
    border-color: rgba(140, 60, 80, 0.26);
    box-shadow: 0 10px 24px rgba(100, 72, 25, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

body.light-mode .search-icon {
    fill: rgba(90, 72, 38, 0.72);
}

body.light-mode .featured-photo {
    filter: drop-shadow(0 12px 12px rgba(88, 65, 30, 0.24));
}

body.light-mode .featured-name {
    color: rgba(43, 36, 26, 0.86);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.78), 0 0 8px rgba(138, 109, 46, 0.10);
}

body.light-mode #searchResults {
    background: transparent;
    box-shadow: none;
}

body.light-mode .search-item,
body.light-mode .home-panel {
    background:
        radial-gradient(circle at 8% 0%, rgba(212, 175, 55, 0.10), transparent 32%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(250, 244, 232, 0.82));
    border-color: rgba(140, 60, 80, 0.22);
    box-shadow: 0 18px 38px rgba(100, 72, 25, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.light-mode .home-panel::before {
    background: radial-gradient(circle at 12% 0%, rgba(138, 109, 46, 0.10), transparent 36%),
        linear-gradient(120deg, rgba(255, 255, 255, 0.62), transparent 34%);
    opacity: 0.65;
}

body.light-mode .featured-panel {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

body.light-mode .inventory-value-panel {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.light-mode .featured-card,
body.light-mode .ops-card,
body.light-mode .menu-theme-row,
body.light-mode .service-chip {
    background: rgba(255, 255, 255, 0.68);
    border-color: rgba(140, 60, 80, 0.16);
    box-shadow: 0 10px 24px rgba(100, 72, 25, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

body.light-mode .inventory-value-card {
    background:
        radial-gradient(circle at 18% 2%, rgba(255, 255, 255, 0.90), transparent 42%),
        linear-gradient(180deg, rgba(255, 253, 247, 0.36), rgba(244, 236, 219, 0.50)),
        linear-gradient(145deg, rgba(212, 175, 55, 0.08), rgba(83, 214, 111, 0.04));
    background-size: cover;
    background-position: center;
    border-color: rgba(140, 60, 80, 0.11);
    box-shadow: 0 10px 20px rgba(100, 72, 25, 0.08);
}

body.light-mode .inventory-value-photo {
    opacity: 0.56;
    filter: saturate(0.98) contrast(0.98);
}

body.light-mode .inventory-value-card::before {
    background:
        radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.56), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(112, 86, 38, 0.08));
    opacity: 0.62;
}

body.light-mode .inventory-value-card::after {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(86, 58, 18, 0.10));
    box-shadow: none;
}

body.light-mode .inventory-value-card.is-bodega,
body.light-mode .inventory-value-card.is-total-stock {
    border-color: rgba(140, 60, 80, 0.22);
}

body.light-mode .featured-card {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

body.light-mode .wine-photo-frame,
body.light-mode .modal-wine-photo {
    background: radial-gradient(circle at 50% 12%, rgba(212, 175, 55, 0.18), rgba(255, 255, 255, 0.72) 48%, rgba(246, 236, 218, 0.82));
    border-color: rgba(140, 60, 80, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 10px 22px rgba(100, 72, 25, 0.10);
}

body.light-mode .wine-photo-frame.has-transparent-bottle,
body.light-mode .modal-wine-photo.has-transparent-bottle {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

body.light-mode .home-panel-note,
body.light-mode .featured-meta,
body.light-mode .ops-label,
body.light-mode .item-pod,
body.light-mode .item-price-label,
body.light-mode .heatmap-percent,
body.light-mode .menu-theme-subtitle {
    color: rgba(59, 50, 37, 0.68);
}

body.light-mode .ops-value {
    color: #8A6D2E;
}

body.light-mode .inventory-value-amount {
    color: #8A6D2E;
    text-shadow: 0 0 8px rgba(138, 109, 46, 0.16), 0 2px 8px rgba(255, 255, 255, 0.62);
}

body.light-mode .inventory-value-label {
    color: rgba(43, 36, 26, 0.76);
    text-shadow: none;
}

body.light-mode .inventory-value-detail {
    color: rgba(43, 36, 26, 0.70);
    text-shadow: none;
}

body.light-mode .modal-card::before {
    display: none;
}

body.light-mode .ops-grid {
    gap: 0.38rem;
    padding: 0.34rem 0.56rem 0.68rem;
}

body.light-mode .ops-card {
    padding: 0.54rem 0.42rem;
    border-radius: 13px;
    border-color: rgba(140, 60, 80, 0.10);
    box-shadow: 0 6px 14px rgba(100, 72, 25, 0.06);
}

body.light-mode .alt-item-btn {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 0.64rem;
    padding: 0.54rem 0.62rem;
    border-color: rgba(140, 60, 80, 0.08);
    background: linear-gradient(145deg, rgba(255, 253, 247, 0.72), rgba(236, 225, 204, 0.54));
    box-shadow: 0 8px 18px rgba(100, 72, 25, 0.07);
}

body.light-mode .alt-item-photo,
body.light-mode .alt-item-photo.wine-photo-frame,
body.light-mode .alt-item-photo.has-transparent-bottle {
    width: 58px;
    height: 78px;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

body.light-mode .alt-item-photo::before,
body.light-mode .alt-item-photo::after {
    display: none !important;
}

body.light-mode .alt-item-photo img {
    width: 100%;
    height: 100%;
    transform: none;
    filter: drop-shadow(0 9px 10px rgba(88, 65, 30, 0.20));
}

body.light-mode .alt-item-photo:not(.has-transparent-bottle) img {
    mix-blend-mode: multiply;
    opacity: 0.94;
}

body.light-mode .heatmap-track {
    background: rgba(171, 139, 76, 0.16);
    border-color: rgba(140, 60, 80, 0.16);
}

body.light-mode .heatmap-fill {
    background: linear-gradient(90deg, #8b1e3f, #c7982d, #3ca86c);
    box-shadow: 0 0 10px rgba(138, 109, 46, 0.14);
}

body.light-mode .item-location {
    color: #2c2418;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.28), rgba(255, 250, 235, 0.76));
    border-color: rgba(140, 60, 80, 0.34);
    box-shadow: 0 4px 12px rgba(100, 72, 25, 0.08);
}

body.light-mode .item-stock-pill,
body.light-mode .item-order-pill {
    color: rgba(43, 36, 26, 0.78);
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(140, 60, 80, 0.16);
}

body.light-mode .item-order-pill {
    color: #A33246;
    background: linear-gradient(135deg, rgba(255, 245, 230, 0.92), rgba(255, 214, 191, 0.82));
    border-color: rgba(164, 48, 54, 0.30);
    box-shadow: 0 8px 18px rgba(164, 48, 54, 0.10);
}

body.light-mode .search-item.needs-order {
    border-color: rgba(164, 48, 54, 0.28);
}

body.light-mode .modal-overlay {
    background: rgba(40, 31, 22, 0.34);
}

body.light-mode .modal-card {
    background: linear-gradient(180deg, #fffdf8, #f7efe2);
    box-shadow: 0 24px 52px rgba(80, 58, 25, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.75);
}

body.light-mode .modal-identity {
    background:
        radial-gradient(circle at 9% 18%, rgba(212, 175, 55, 0.13), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.76), rgba(246, 236, 218, 0.56));
    border-color: rgba(140, 60, 80, 0.18);
}

body.light-mode .modal-dock,
body.light-mode .modal-tab-intro,
body.light-mode .metric-card,
body.light-mode .est-mobile-item,
body.light-mode .edit-form {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(248, 238, 219, 0.62));
    border-color: rgba(140, 60, 80, 0.18);
    box-shadow: 0 10px 22px rgba(100, 72, 25, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

body.light-mode .detail-box,
body.light-mode .terroir-box {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.50), rgba(248, 238, 219, 0.28));
    border: 0;
    box-shadow: none;
}

body.light-mode .modal-dock-btn.active {
    color: #2b251c;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.36), rgba(255, 250, 235, 0.82));
}

body.light-mode .modal-dock-btn,
body.light-mode .metric-label,
body.light-mode .metric-note {
    color: rgba(59, 50, 37, 0.68);
}

body.light-mode .service-chip-value.is-location {
    color: #6f4f10;
}

@media (prefers-reduced-motion: reduce) {

    .featured-card,
    .grape-logo,
    .grape-logo .grape,
    .grape-logo .leaf {
        animation: none !important;
    }
}

.search-item:active {
    background: rgba(212, 175, 55, 0.18);
    transform: translate3d(0, 1px, 0) scale(0.992);
}

.item-info {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    flex: 1;
    min-width: 0;
}

.item-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.02rem;
    font-weight: 760;
    color: var(--text-main);
    line-height: 1.18;
    letter-spacing: -0.018em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-service-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.24rem;
    min-width: 0;
}

.grape-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.1rem;
}

.search-item .grape-tags {
    gap: 0.22rem;
    max-height: none;
    overflow: visible;
}

.search-item .grape-tag:nth-child(n+4) {
    display: inline-block;
}

.grape-tag {
    display: inline-block;
    padding: 0.18rem 0.45rem;
    border-radius: 8px;
    font-size: 0.68rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    cursor: default;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.grape-tag.iberica-tinta {
    background: linear-gradient(135deg, #E53935 0%, #D32626 100%);
}

.grape-tag.iberica-tinta.s2 {
    background: linear-gradient(135deg, #F44336 0%, #E53935 100%);
}

.grape-tag.iberica-tinta.s3 {
    background: linear-gradient(135deg, #FF6F6F 0%, #F44336 100%);
}

.grape-tag.burgundy {
    background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
}

.grape-tag.burgundy.s2 {
    background: linear-gradient(135deg, #9333EA 0%, #7C3AED 100%);
}

.grape-tag.burgundy.s3 {
    background: linear-gradient(135deg, #A855F7 0%, #9333EA 100%);
}

.grape-tag.italiana {
    background: linear-gradient(135deg, #C23030 0%, #B71C1C 100%);
}

.grape-tag.italiana.s2 {
    background: linear-gradient(135deg, #D32626 0%, #C23030 100%);
}

.grape-tag.italiana.s3 {
    background: linear-gradient(135deg, #E53935 0%, #D32626 100%);
}

.grape-tag.aromatico {
    background: linear-gradient(135deg, #F9A825 0%, #F57F17 100%);
}

.grape-tag.aromatico.s2 {
    background: linear-gradient(135deg, #FBC02D 0%, #F9A825 100%);
}

.grape-tag.aromatico.s3 {
    background: linear-gradient(135deg, #FDD835 0%, #FBC02D 100%);
}

.grape-tag.novamundo {
    background: linear-gradient(135deg, #8B1538 0%, #5F0F1D 100%);
}

.grape-tag.novamundo.s2 {
    background: linear-gradient(135deg, #A91D3A 0%, #8B1538 100%);
}

.grape-tag.novamundo.s3 {
    background: linear-gradient(135deg, #C81E4E 0%, #A91D3A 100%);
}

.grape-tag.espumoso {
    background: linear-gradient(135deg, #EC407A 0%, #D81B60 100%);
}

.grape-tag.espumoso.s2 {
    background: linear-gradient(135deg, #F06292 0%, #EC407A 100%);
}

.grape-tag.espumoso.s3 {
    background: linear-gradient(135deg, #F48FB1 0%, #F06292 100%);
}

.badge-row {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    margin-top: 0.05rem;
    min-width: 0;
    flex-wrap: wrap;
}

.badge {
    font-family: var(--font-mono);
    font-size: 0.56rem;
    font-weight: 600;
    text-transform: uppercase;
    padding: 0.26rem 0.58rem;
    border-radius: 999px;
    letter-spacing: 0.22em;
    color: #111;
}

.item-region {
    font-size: 0.78rem;
    color: var(--text-muted);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-type-badge {
    align-self: flex-end;
    border-radius: 8px;
    padding: 0.18rem 0.42rem;
    font-size: 0.56rem;
    line-height: 1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.22);
}

.item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 0.18rem;
    flex-shrink: 0;
    margin-left: 0;
    min-width: 0;
    max-width: 34vw;
    padding-top: 0.05rem;
}

.item-price-label {
    font-size: 0.52rem;
    line-height: 1;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(245, 232, 196, 0.58);
    font-weight: 850;
    white-space: nowrap;
}

.item-price {
    font-family: 'Montserrat', sans-serif;
    font-weight: 950;
    color: var(--price-color);
    font-size: clamp(1.02rem, 4.05vw, 1.24rem);
    letter-spacing: -0.02em;
    line-height: 0.96;
    white-space: nowrap;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-stock-pill,
.item-order-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    padding: 0.16rem 0.38rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.045);
    color: rgba(245, 232, 196, 0.82);
    font-size: 0.58rem;
    font-weight: 820;
    line-height: 1;
    white-space: nowrap;
}

.item-order-pill {
    border-color: rgba(255, 111, 97, 0.52);
    background: linear-gradient(135deg, rgba(139, 30, 63, 0.38), rgba(212, 175, 55, 0.20));
    color: #ffe8b2;
    box-shadow: 0 0 16px rgba(139, 30, 63, 0.20);
    letter-spacing: 0.04em;
}

.search-item.needs-order {
    border-color: rgba(255, 111, 97, 0.28);
}

.item-location {
    font-size: 0.84rem;
    color: var(--text-main);
    font-weight: 820;
    letter-spacing: 0.035em;
    font-family: 'Montserrat', monospace;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.34), rgba(180, 135, 25, 0.18));
    border: 1px solid rgba(237, 201, 94, 0.72);
    padding: 0.22rem 0.54rem;
    border-radius: 999px;
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    justify-content: flex-start;
    width: fit-content;
    max-width: 100%;
    min-width: 0;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.15);
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.14;
}

.search-item-bodega .item-info {
    gap: 0.14rem;
}

.search-item-bodega .item-title {
    -webkit-line-clamp: 3;
    line-clamp: 3;
}

.search-item-bodega .item-location {
    font-size: 0.8rem;
    padding: 0.16rem 0.46rem;
}

.item-pod {
    font-size: 0.68rem;
    color: rgba(245, 232, 196, 0.78);
    font-family: 'Montserrat', monospace;
    opacity: 0.9;
    letter-spacing: 0.5px;
}

.item-format {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 400;
}

.wine-photo-frame {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
    position: relative;
    isolation: isolate;
}

.wine-photo-frame::after {
    content: '';
    position: absolute;
    left: 9%;
    right: 9%;
    bottom: 2%;
    height: 18%;
    pointer-events: none;
    border-radius: 999px;
    background: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.44) 0%, rgba(0, 0, 0, 0.22) 42%, transparent 72%);
    filter: blur(7px);
    opacity: 0.72;
    z-index: 0;
}

.wine-photo-frame img {
    width: 108%;
    height: 108%;
    object-fit: contain;
    object-position: center bottom;
    display: block;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.42));
    transform: translateY(1px) scale(1.035);
    transform-origin: center bottom;
}

.wine-photo-frame.has-transparent-bottle {
    overflow: visible;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.wine-photo-frame.has-transparent-bottle::after {
    display: block;
}

.wine-photo-frame.has-transparent-bottle::before {
    content: '';
    position: absolute;
    inset: 24% 26% 18%;
    border-radius: 999px;
    background: radial-gradient(ellipse at center, var(--bottle-aura, rgba(212, 175, 55, 0.22)) 0%, var(--bottle-aura-soft, rgba(212, 175, 55, 0.12)) 38%, transparent 72%);
    filter: blur(14px);
    opacity: 0.12;
    pointer-events: none;
    z-index: 0;
}

.wine-photo-frame.has-transparent-bottle img {
    position: relative;
    z-index: 1;
    filter:
        drop-shadow(0 10px 12px rgba(0, 0, 0, 0.40)) drop-shadow(0 0 4px var(--bottle-aura-soft, rgba(212, 175, 55, 0.10)));
}

.wine-photo-frame.is-missing {
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.08), rgba(255, 255, 255, 0.03));
}

.wine-photo-fallback {
    font-size: 1.4rem;
    opacity: 0.72;
    filter: grayscale(0.2);
}

.search-item-photo {
    width: 92px;
    height: 136px;
    align-self: center;
    justify-self: center;
    border-radius: 18px;
    margin: -0.5rem 0 -0.48rem -0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-item-photo img {
    width: 112%;
    height: 112%;
    max-width: none;
    max-height: none;
    object-fit: contain;
    object-position: center center;
    transform: translateX(0) translateY(0) scale(1.04);
    transform-origin: center center;
}

.search-item-photo.has-transparent-bottle img {
    width: 122%;
    height: 122%;
    max-width: none;
    transform: translateX(0) translateY(0) scale(1.04);
    transform-origin: center center;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.25s ease;
}

.modal-card {
    width: 90%;
    max-width: 540px;
    background: var(--bg-color);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 1.9rem;
    position: relative;
    isolation: isolate;
    transform: translateY(18px) scale(0.985);
    opacity: 0;
    transition: transform 0.42s var(--motion-ease-premium), opacity 0.28s ease, box-shadow 0.42s var(--motion-ease-premium);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.5);
    max-height: 90dvh;
    overflow-x: hidden;
    overflow-y: auto;
}

.modal-card::before {
    display: none;
}

.modal-card::after {
    content: '';
    position: absolute;
    left: -24%;
    top: -36%;
    width: 42%;
    height: 172%;
    pointer-events: none;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(255, 232, 168, 0.11), transparent);
    opacity: 0;
    transform: translate3d(-130%, 0, 0) rotate(19deg);
    z-index: 0;
}

.modal-overlay.active .modal-card::after {
    animation: premiumCardSheen 1.12s var(--motion-ease-premium) 120ms both;
}

.modal-card>* {
    position: relative;
    z-index: 1;
}

.modal-overlay.active .modal-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.btn-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    z-index: 2;
}

.btn-close:hover {
    color: var(--gold-accent);
    transform: scale(1.1);
}

.modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    line-height: 1.3;
    color: var(--text-main);
    margin: 1rem 0 0.5rem 0;
    padding-right: 20px;
}

.modal-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.modal-identity {
    display: grid;
    grid-template-columns: 154px minmax(0, 1fr);
    gap: 1.08rem;
    align-items: center;
    margin: 0.2rem 0 1rem;
    padding: 0.76rem 1.6rem 0.76rem 0.76rem;
    border-radius: 20px;
    background:
        radial-gradient(circle at 9% 18%, rgba(212, 175, 55, 0.18), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.042), rgba(0, 0, 0, 0.12));
    border: 1px solid rgba(212, 175, 55, 0.13);
}

.modal-identity .modal-title {
    margin-top: 0.55rem;
}

.modal-identity .modal-subtitle {
    margin-bottom: 0;
}

.modal-photo-frame {
    width: 166px;
    min-height: 210px;
}

.modal-wine-photo {
    width: 158px;
    height: 206px;
    border-radius: 18px;
    margin: 0 auto;
}

.alt-item-btn {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 0.52rem;
}

.alt-item-photo {
    width: 40px;
    height: 56px;
    border-radius: 10px;
}

.alt-item-copy {
    min-width: 0;
}

.modal-grapes {
    margin: 0.5rem 0 0;
}

.modal-identity .modal-grapes .grape-tags {
    justify-content: flex-start;
    gap: 0.36rem;
    margin-top: 0.18rem;
}

.modal-identity .modal-grapes .grape-tag {
    font-size: 0.74rem;
    padding: 0.32rem 0.56rem;
    border-radius: 10px;
    font-weight: 850;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.10) inset, 0 0 14px rgba(160, 22, 65, 0.30), 0 8px 16px rgba(0, 0, 0, 0.28);
}

.service-snapshot {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.48rem;
    margin: 0 0 1.05rem;
}

.service-chip {
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 14px;
    background: linear-gradient(150deg, rgba(212, 175, 55, 0.105), rgba(255, 255, 255, 0.035));
    padding: 0.56rem 0.62rem;
    min-width: 0;
}

.service-chip-label {
    display: block;
    font-size: 0.58rem;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.105em;
    color: var(--text-muted);
    margin-bottom: 0.16rem;
}

.service-chip-value {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.98rem;
    line-height: 1.08;
    font-weight: 900;
    color: var(--text-main);
    overflow-wrap: anywhere;
}

.service-chip-value.is-price {
    color: var(--price-color);
    font-size: 1.08rem;
}

.service-chip-value.is-location {
    font-size: 0.86rem;
    color: #fff2bc;
}

.service-chip.is-focus {
    border-color: rgba(212, 175, 55, 0.42);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035), 0 10px 20px rgba(0, 0, 0, 0.16);
}

.service-chip.is-order-alert {
    border-color: rgba(255, 177, 66, 0.72);
    background: linear-gradient(150deg, rgba(255, 177, 66, 0.22), rgba(114, 16, 35, 0.18));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06), 0 10px 22px rgba(114, 16, 35, 0.22);
}

.service-chip-value.is-order-alert {
    color: #ffd37a;
}

.modal-dock {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.36rem;
    padding: 0.28rem;
    margin: 0 0 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.16);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(0, 0, 0, 0.14));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.025), 0 10px 22px rgba(0, 0, 0, 0.16);
}

.modal-dock-btn {
    appearance: none;
    border: 0;
    border-radius: 999px;
    min-height: 34px;
    padding: 0 0.52rem;
    background: transparent;
    color: var(--text-muted);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.modal-dock-btn.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.28), rgba(212, 175, 55, 0.12));
    color: var(--text-main);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18), inset 0 0 0 1px rgba(255, 232, 168, 0.18);
}

.modal-tab-panel[hidden] {
    display: none !important;
}

.modal-tab-panel.active {
    animation: modalPanelIn 0.18s ease both;
    padding-bottom: 0.24rem;
}

@keyframes modalPanelIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-tab-intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.7rem;
    margin: 0 0 0.72rem;
    padding: 0.76rem 0.82rem;
    border-radius: 16px;
    border: 1px solid rgba(212, 175, 55, 0.14);
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.09), rgba(255, 255, 255, 0.035));
}

.modal-tab-kicker {
    display: block;
    margin-bottom: 0.16rem;
    color: var(--gold-accent);
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.modal-tab-intro h3 {
    margin: 0;
    font-size: 0.98rem;
    color: var(--text-main);
}

.modal-tab-intro p {
    margin: 0;
    max-width: 54%;
    font-size: 0.72rem;
    line-height: 1.34;
    color: var(--text-muted);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.58rem;
}

.metric-card {
    padding: 0.78rem;
    border-radius: 16px;
    border: 1px solid rgba(212, 175, 55, 0.14);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(0, 0, 0, 0.12));
}

.metric-label {
    display: block;
    margin-bottom: 0.18rem;
    color: var(--text-muted);
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.metric-value {
    display: block;
    color: var(--text-main);
    font-size: 1rem;
    font-weight: 900;
    line-height: 1.16;
}

.metric-note {
    grid-column: 1 / -1;
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.38;
}

.metrics-sales-card {
    grid-column: 1 / -1;
    padding: 0.86rem;
    border-radius: 18px;
    border: 1px solid rgba(118, 224, 167, 0.2);
    background:
        radial-gradient(circle at 14% 10%, rgba(118, 224, 167, 0.13), transparent 34%),
        linear-gradient(145deg, rgba(18, 52, 36, 0.32), rgba(0, 0, 0, 0.16));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 10px 24px rgba(0, 0, 0, 0.16);
}

.metrics-sales-head {
    display: flex;
    justify-content: space-between;
    gap: 0.7rem;
    align-items: flex-end;
    margin-bottom: 0.7rem;
}

.metrics-sales-title {
    display: block;
    color: #8ef4bf;
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.metrics-sales-subtitle {
    display: block;
    margin-top: 0.16rem;
    color: var(--text-main);
    font-size: 0.98rem;
    font-weight: 900;
}

.metrics-sales-period {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.metrics-sales-bar {
    position: relative;
    display: flex;
    height: 16px;
    overflow: hidden;
    border-radius: 999px;
    border: 1px solid rgba(143, 244, 191, 0.22);
    background: rgba(255, 255, 255, 0.06);
}

.metrics-sales-fill {
    min-width: 0;
    transition: width 0.32s ease;
}

.metrics-sales-fill.sold {
    background: linear-gradient(90deg, #53e88f, #9dffbf);
    box-shadow: 0 0 18px rgba(83, 232, 143, 0.35);
}

.metrics-sales-fill.remaining {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.11), rgba(212, 175, 55, 0.16));
}

.metrics-sales-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.46rem 0.72rem;
    margin-top: 0.62rem;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 750;
}

.metrics-sales-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 0.28rem;
    border-radius: 999px;
    vertical-align: 0.02em;
}

.metrics-sales-dot.sold {
    background: #73f2a4;
    box-shadow: 0 0 10px rgba(115, 242, 164, 0.7);
}

.metrics-sales-dot.remaining {
    background: rgba(212, 175, 55, 0.52);
}

.metrics-day-bars {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.34rem;
    align-items: end;
    min-height: 58px;
    margin-top: 0.78rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.metrics-day-bar {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.24rem;
    min-width: 0;
    color: var(--text-muted);
    font-size: 0.55rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.metrics-day-bar span:first-child {
    display: block;
    min-height: 8px;
    border-radius: 999px 999px 4px 4px;
    background: linear-gradient(180deg, #9dffbf, #35c976);
    box-shadow: 0 0 14px rgba(83, 232, 143, 0.24);
}

.metrics-sales-empty {
    margin-top: 0.58rem;
    color: var(--text-muted);
    font-size: 0.68rem;
    line-height: 1.34;
}

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

.modal-tab-intro {
    flex-direction: column;
    gap: 0.34rem;
}

.modal-tab-intro p {
    max-width: none;
}

.metrics-grid {
    grid-template-columns: 1fr;
}

.modal-grapes .grape-tag {
    font-size: 0.74rem;
    padding: 0.3rem 0.5rem;
}

.details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.detail-box {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(212, 175, 55, 0.025));
    border: 0;
    border-radius: 14px;
    padding: 0.74rem 0.72rem;
    text-align: center;
    box-shadow: none;
}

.detail-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-bottom: 0.3rem;
}

.detail-value {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.03rem;
    color: var(--text-main);
    font-weight: 600;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.24;
}

.terroir-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
    margin-bottom: 1.2rem;
}

.terroir-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--gold-accent);
    margin-bottom: 0.66rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.terroir-box {
    background: linear-gradient(135deg, rgba(184, 150, 62, 0.05), rgba(140, 60, 80, 0.03));
    border: 0;
    border-radius: 14px;
    padding: 0.74rem 0.72rem;
    text-align: center;
    box-shadow: none;
}

.terroir-box .detail-value {
    font-size: 0.9rem;
    line-height: 1.42;
    white-space: pre-line;
    text-align: left;
}

.cata-block {
    margin-bottom: 1.08rem;
}

.cata-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--gold-accent);
    margin-bottom: 0.58rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cata-box {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0.12rem 0.04rem 0;
    box-shadow: none;
}

.cata-value {
    font-size: 0.87rem;
    line-height: 1.42;
    color: var(--text-main);
    font-weight: 520;
    white-space: pre-line;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.28);
}

.cata-critics {
    margin-top: 0.62rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.34rem;
}

.alt-block {
    margin-bottom: 1rem;
}

.alt-label {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--gold-accent);
    margin-bottom: 0.52rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Editorial: marcador losango + filete de foil que atravessa a linha das seções */
.terroir-label::before,
.cata-label::before,
.alt-label::before {
    content: '';
    flex: 0 0 auto;
    width: 5px;
    height: 5px;
    transform: rotate(45deg);
    background: var(--gold-foil);
    background-size: 200% auto;
    border-radius: 1px;
    box-shadow: 0 0 5px rgba(212, 175, 85, 0.35);
}

.terroir-label::after,
.cata-label::after,
.alt-label::after {
    content: '';
    flex: 1 1 auto;
    height: 1px;
    background: var(--gold-foil);
    background-size: 200% auto;
    opacity: 0.5;
    -webkit-mask-image: linear-gradient(90deg, #000, #000 55%, transparent);
    mask-image: linear-gradient(90deg, #000, #000 55%, transparent);
}

.alt-list {
    display: grid;
    gap: 0.34rem;
}

.alt-item-btn {
    width: 100%;
    border-radius: 11px;
    border: 1px solid rgba(212, 175, 55, 0.18);
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.09), rgba(0, 0, 0, 0.18));
    color: var(--text-main);
    text-align: left;
    padding: 0.52rem 0.58rem;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.alt-item-btn:hover {
    border-color: rgba(212, 175, 55, 0.44);
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.16), rgba(0, 0, 0, 0.2));
    transform: translateY(-1px);
}

.alt-item-btn:active {
    transform: scale(0.99);
}

.alt-item-title {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.26;
    color: var(--text-main);
}

.alt-item-meta {
    margin-top: 0.16rem;
    font-size: 0.7rem;
    font-weight: 520;
    color: var(--text-muted);
    line-height: 1.28;
}

.alt-item-price {
    color: var(--price-color);
    font-weight: 950;
}

.alt-item-price-na {
    color: var(--text-muted);
    font-weight: 560;
}

.critic-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.46rem;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #131313;
    background: linear-gradient(135deg, rgba(237, 201, 94, 0.98), rgba(212, 175, 55, 0.95));
    border: 1px solid rgba(255, 245, 209, 0.45);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.critics-expanded {
    margin-top: 0.46rem;
    display: grid;
    gap: 0.26rem;
}

.critic-row {
    border-radius: 9px;
    padding: 0.36rem 0.48rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    border: 1px solid rgba(212, 175, 55, 0.14);
    background: rgba(0, 0, 0, 0.18);
}

.critic-row.is-na {
    opacity: 0.78;
}

.critic-name {
    font-size: 0.67rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
}

.critic-value {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-main);
    text-align: right;
}

.est-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.2rem;
    table-layout: fixed;
}

.est-table th {
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gold-accent);
    padding: 0.5rem 0.3rem;
    border-bottom: 1px solid var(--glass-border);
    text-align: center;
}

.est-table td {
    font-size: 0.93rem;
    color: var(--text-main);
    padding: 0.5rem 0.32rem;
    text-align: center;
    border-bottom: 1px solid rgba(140, 60, 80, 0.16);
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.2;
}

.est-table .row-label {
    font-size: 0.69rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: left;
    font-weight: 600;
}

.est-table .pvp-cell {
    font-weight: 900;
    color: var(--price-color);
    font-size: 1.08rem;
}

.est-table .loc-cell {
    font-family: var(--font-mono);
    font-weight: 700;
    letter-spacing: 0.04em;
    font-size: 0.9rem;
}


.premium-topbar {
    position: fixed;
    top: max(14px, env(safe-area-inset-top));
    left: max(14px, env(safe-area-inset-left));
    right: auto;
    z-index: 120;
    display: inline-flex;
    align-items: center;
    padding: 0;
    border-radius: 999px;
    background: transparent;
    animation: slideFromLeft var(--ui-entry-duration) var(--ui-entry-ease) var(--ui-entry-delay) both;
}

.user-menu-wrap {
    position: relative;
}

@keyframes dropToPlace {
    0% {
        transform: translateY(-26px) scale(0.96);
    }

    60% {
        transform: translateY(2px) scale(1.005);
    }

    100% {
        transform: translateY(0) scale(1);
    }
}

@keyframes slideFromRight {
    0% {
        transform: translateX(28px) scale(0.97);
    }

    70% {
        transform: translateX(-1px) scale(1.002);
    }

    100% {
        transform: translateX(0) scale(1);
    }
}

@keyframes slideFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-28px) scale(0.97);
    }

    70% {
        opacity: 1;
        transform: translateX(1px) scale(1.002);
    }

    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes riseFromBottom {
    0% {
        transform: translateY(18px) scale(0.965);
    }

    65% {
        transform: translateY(-1px) scale(1.002);
    }

    100% {
        transform: translateY(0) scale(1);
    }
}

@keyframes dropFromTopCard {
    0% {
        opacity: 0;
        transform: translate(-50%, -26px) scale(0.97);
    }

    70% {
        opacity: 1;
        transform: translate(-50%, 1px) scale(1.002);
    }

    100% {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
    }
}

.theme-toggle {
    width: 58px;
    height: 34px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.22);
    cursor: pointer;
    z-index: 1;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
    padding: 0;
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.theme-toggle:hover {
    border-color: rgba(212, 175, 55, 0.48);
    box-shadow: 0 8px 22px rgba(212, 175, 55, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

#toggleCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

.session-user-card {
    appearance: none;
    border: 1px solid rgba(212, 175, 55, 0.24);
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    border-radius: 10px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.03)),
        rgba(12, 11, 14, 0.52);
    color: #C9A84C;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.28),
        0 0 0 0.5px rgba(212, 175, 55, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.07);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.session-user-card::before {
    content: none;
}

.session-user-card::after {
    content: none;
}

.session-user-card .menu-icon-svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #C9A84C;
    transition: opacity 0.18s ease;
}

.session-user-card:hover,
.session-user-card[aria-expanded="true"] {
    border-color: rgba(212, 175, 55, 0.52);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.14), rgba(255, 255, 255, 0.04));
    box-shadow:
        0 6px 18px rgba(212, 175, 55, 0.18),
        0 0 0 0.5px rgba(212, 175, 55, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.09);
    transform: translateY(-1px);
}

.user-menu-panel {
    position: absolute;
    top: calc(100% + 9px);
    right: 0;
    left: auto;
    width: 246px;
    padding: 9px;
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.18);
    background: linear-gradient(145deg, rgba(14, 13, 16, 0.97), rgba(31, 24, 30, 0.94));
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(18px) saturate(1.15);
    -webkit-backdrop-filter: blur(18px) saturate(1.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.975);
    transform-origin: top right;
    transition: opacity 0.24s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.24s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.user-menu-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.admin-btn,
.checklist-btn,
.users-btn,
.logs-btn,
.logout-btn {
    width: 100%;
    min-height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.045);
    color: var(--text-main);
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 0 13px;
    margin: 0;
    transition: background 0.22s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.22s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease;
}

.admin-btn::before,
.checklist-btn::before,
.users-btn::before,
.logs-btn::before,
.logout-btn::before {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(212, 175, 55, 0.14);
    font-size: 1.05rem;
    line-height: 1;
    flex: 0 0 auto;
}

.admin-btn::before {
    content: '◇';
    color: var(--gold-light);
}

.checklist-btn::before {
    content: '✓';
    color: #cfeecb;
}

.users-btn::before {
    content: '◉';
    color: var(--gold-light);
}

.logs-btn::before {
    content: '◷';
    color: #d8c7ff;
}

.logout-btn::before {
    content: '↩';
    color: #f2c1bc;
}

.logout-btn {
    margin-top: 6px;
    color: var(--text-muted);
}

.admin-btn:hover,
.checklist-btn:hover,
.users-btn:hover,
.logs-btn:hover,
.logout-btn:hover {
    border-color: rgba(212, 175, 55, 0.38);
    background: rgba(212, 175, 55, 0.13);
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.user-menu-panel.open .admin-btn,
.user-menu-panel.open .checklist-btn,
.user-menu-panel.open .users-btn,
.user-menu-panel.open .logs-btn,
.user-menu-panel.open .logout-btn,
.user-menu-panel.open .menu-theme-row {
    animation: menuItemIn 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.user-menu-panel.open .checklist-btn {
    animation-delay: 25ms;
}

.user-menu-panel.open .users-btn {
    animation-delay: 50ms;
}

.user-menu-panel.open .logs-btn {
    animation-delay: 75ms;
}

.user-menu-panel.open .menu-theme-row {
    animation-delay: 100ms;
}

.user-menu-panel.open .logout-btn {
    animation-delay: 125ms;
}

.menu-theme-row {
    margin-top: 7px;
    padding: 8px 10px;
    min-height: 48px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    background: rgba(255, 255, 255, 0.035);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.menu-theme-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.menu-theme-title {
    color: var(--text-main);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.menu-theme-subtitle {
    color: var(--text-muted);
    font-size: 0.62rem;
    font-weight: 600;
}

.user-menu-panel .theme-toggle {
    flex: 0 0 auto;
    width: 54px;
    height: 32px;
}

.theme-toggle:focus-visible,
.session-user-card:focus-visible,
.logout-btn:focus-visible,
.logs-btn:focus-visible,
.admin-btn:focus-visible,
.filter-pill:focus-visible,
.btn-edit:focus-visible,
.btn-consume:focus-visible,
.btn-save:focus-visible,
.btn-cancel:focus-visible,
.btn-close:focus-visible {
    outline: none;
    border-color: var(--gold-accent);
    box-shadow: 0 0 0 3px var(--field-focus-ring), 0 0 20px rgba(212, 175, 55, 0.2);
}

@media (prefers-reduced-motion: reduce) {

    .search-item,
    .premium-topbar,
    .theme-toggle,
    .logout-btn,
    .admin-btn,
    .btn-edit,
    .btn-consume,
    .btn-save,
    .btn-cancel,
    .btn-close,
    .modal-overlay,
    .modal-card,
    .motion-interactive,
    .sync-toast {
        transition: none !important;
    }

    .premium-topbar,
    .theme-toggle,
    .admin-btn,
    .checklist-btn,
    .users-btn,
    .logs-btn,
    .logout-btn,
    .session-user-card,
    header,
    .search-container,
    button.is-tapping,
    .button-tap,
    .search-item,
    .modal-card::after,
    .home-panel::after,
    .sync-toast {
        animation: none !important;
    }

    .motion-interactive::after {
        display: none;
    }
}

.b-tinto {
    background: #800020;
    color: #FFF;
}

.b-branco {
    background: #E5C158;
}

.b-rosado {
    background: #E08D79;
}

.b-espumoso {
    background: #D4AF37;
}

.b-generoso {
    background: #C97B1A;
    color: #FFF;
}

.b-dulce {
    background: #8B6914;
    color: #FFF;
}

.edit-form {
    display: none;
    margin-top: 1rem;
}

.edit-form.visible {
    display: block;
}

.edit-field {
    padding: 0.7rem;
    border-radius: 8px;
    border: 1px solid var(--field-border);
    background: var(--field-bg);
    color: var(--text-main);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    width: 100%;
    box-shadow: var(--field-shadow);
}

.edit-field:hover {
    border-color: var(--field-border-strong);
}

.edit-field:focus {
    outline: none;
    border-color: var(--gold-accent);
    box-shadow: 0 0 0 3px var(--field-focus-ring), var(--field-shadow);
}

.edit-field:focus-visible {
    outline: none;
}

.edit-section-title {
    font-size: 0.69rem;
    color: var(--gold-accent);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 0.8rem;
    margin-bottom: 0.3rem;
    font-weight: 700;
}

.edit-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
}

.edit-row .edit-field {
    flex: 1;
}

.edit-actions {
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
    margin-top: 0.8rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.btn-cancel {
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    border: 1px solid var(--glass-border);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
}

.btn-save {
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    border: none;
    background: var(--gold-accent);
    color: #111;
    font-weight: 700;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
}

.btn-edit {
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-main);
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
}

.modal-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.7rem;
    margin-top: 0.35rem;
    flex-wrap: wrap;
    overflow: visible;
}

.modal-actions-primary {
    margin: -0.18rem 0 0.86rem;
    padding: 0.52rem;
    border-radius: 16px;
    border: 1px solid rgba(212, 175, 55, 0.16);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.052), rgba(212, 175, 55, 0.04)),
        rgba(0, 0, 0, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.modal-actions-primary .btn-edit {
    flex: 1 1 100%;
    width: 100%;
    min-height: 36px;
    border-radius: 999px;
    padding-inline: 0.86rem;
}

.consume-actions {
    display: grid;
    grid-template-columns: 44px repeat(3, minmax(0, 1fr));
    grid-template-areas:
        "qty cava bodega transfer";
    align-items: stretch;
    column-gap: 0.48rem;
    row-gap: 0.38rem;
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    overflow: visible;
}

.consume-qty {
    grid-area: qty;
    width: 44px;
    min-width: 0;
    height: 42px;
    border-radius: 10px;
    border: 1px solid var(--field-border);
    background: var(--field-bg);
    color: var(--text-main);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
    padding: 0 4px;
    outline: none;
    cursor: pointer;
    box-shadow: var(--field-shadow);
    transition: var(--transition-smooth);
    flex: 0 0 auto;
}

.consume-qty:hover {
    border-color: var(--field-border-strong);
}

.consume-qty:focus {
    border-color: var(--gold-accent);
    box-shadow: 0 0 0 3px var(--field-focus-ring), var(--field-shadow);
}

.consume-qty:focus-visible {
    outline: none;
}

.btn-consume {
    width: 100%;
    min-width: 0;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(201, 65, 85, 0.5);
    background: var(--status-danger-bg);
    color: var(--status-danger);
    cursor: pointer;
    font-size: clamp(0.624rem, 2.314vw, 0.806rem);
    font-weight: 850;
    letter-spacing: 0.012em;
    line-height: 1.06;
    text-transform: uppercase;
    padding: 0 4px;
    text-align: center;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    white-space: normal;
    text-wrap: balance;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(61, 14, 30, 0.32);
    flex: 1 1 0;
}

.btn-consume .btn-line {
    display: block;
    width: 100%;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
}

.btn-consume.btn-consume-cava {
    grid-area: cava;
}

.btn-consume.btn-consume-cava:hover {
    background: rgba(201, 65, 85, 0.3);
    border-color: rgba(217, 106, 124, 0.6);
    box-shadow: 0 6px 18px rgba(61, 14, 30, 0.42);
}

.btn-consume.btn-consume-bodega {
    grid-area: bodega;
    border-color: rgba(201, 65, 85, 0.5);
    background: var(--status-danger-bg);
    color: var(--status-danger);
    box-shadow: 0 4px 14px rgba(61, 14, 30, 0.32);
}

.btn-consume.btn-consume-bodega:hover {
    background: rgba(201, 65, 85, 0.3);
    border-color: rgba(217, 106, 124, 0.6);
    box-shadow: 0 6px 18px rgba(61, 14, 30, 0.42);
}

.btn-consume.btn-transfer-bodega {
    grid-area: transfer;
    justify-self: stretch;
    width: 100%;
    min-width: 0;
    border-color: rgba(118, 224, 167, 0.5);
    background: linear-gradient(135deg, rgba(118, 224, 167, 0.2), rgba(31, 122, 77, 0.18));
    color: var(--status-success);
    box-shadow: 0 4px 14px rgba(12, 98, 59, 0.28);
}

.btn-consume.btn-transfer-bodega:hover {
    background: linear-gradient(135deg, rgba(118, 224, 167, 0.28), rgba(31, 122, 77, 0.24));
    border-color: rgba(118, 224, 167, 0.68);
    box-shadow: 0 6px 18px rgba(12, 98, 59, 0.4);
}

.btn-consume.btn-transfer-bodega:disabled {
    opacity: 0.52;
    cursor: not-allowed;
    filter: grayscale(0.35);
}

.internal-order-card {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 0.68rem;
    margin: -0.28rem 0 0.76rem;
    padding: 0.78rem;
    border-radius: 18px;
    border: 1px solid rgba(212, 175, 55, 0.24);
    background:
        radial-gradient(circle at 12% 0%, rgba(212, 175, 55, 0.16), transparent 42%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.062), rgba(212, 175, 55, 0.045)),
        rgba(9, 9, 11, 0.76);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.052), 0 10px 26px rgba(0, 0, 0, 0.22);
}

.internal-order-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.internal-order-kicker {
    color: var(--gold-accent);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.internal-order-copy strong {
    color: var(--text-main);
    font-size: clamp(0.86rem, 2.9vw, 1rem);
    line-height: 1.12;
}

.internal-order-copy small {
    color: var(--text-muted);
    font-size: clamp(0.68rem, 2.35vw, 0.78rem);
    line-height: 1.28;
}

.internal-order-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(112px, 0.38fr);
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
}

.internal-order-qty-cascade {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    overflow: hidden;
    border-radius: 15px;
    border: 1px solid rgba(212, 175, 55, 0.24);
    background: rgba(255, 255, 255, 0.045);
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    align-items: stretch;
}

.internal-order-qty-title {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #f6d778;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.56rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-right: 1px solid rgba(212, 175, 55, 0.16);
    background: rgba(212, 175, 55, 0.06);
}

.internal-order-qty-buttons {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: stretch;
    gap: 0.26rem;
    padding: 0.28rem;
}

.internal-order-qty-chip {
    min-width: 0;
    padding: 0.28rem 0.18rem;
    border-radius: 11px;
    border: 1px solid rgba(246, 215, 120, 0.22);
    background: rgba(255, 255, 255, 0.052);
    color: #f9e7aa;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: clamp(0.68rem, 2.4vw, 0.78rem);
    line-height: 1;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.06rem;
    transition: all 0.18s ease;
}

.internal-order-qty-chip span {
    font-size: 0.44rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: rgba(249, 231, 170, 0.68);
    white-space: nowrap;
}

.internal-order-qty-chip:hover,
.internal-order-qty-chip.active {
    border-color: rgba(246, 215, 120, 0.78);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.26), rgba(123, 84, 20, 0.24));
    color: #fff4c8;
    transform: translateY(-1px);
}

.internal-order-qty-chip.is-box {
    min-width: 0;
}

.internal-order-card-with-qty {
    padding: 0.72rem;
    gap: 0.56rem;
}

.internal-order-copy strong {
    font-size: clamp(0.95rem, 4.4vw, 1.08rem);
}

.internal-order-copy small {
    font-size: 0.72rem;
    max-width: 92%;
}

.internal-order-actions {
    grid-template-columns: 1fr;
    gap: 0.48rem;
}

.internal-order-qty-cascade {
    min-height: 44px;
    grid-template-columns: 44px minmax(0, 1fr);
}

.internal-order-qty-title {
    font-size: 0.54rem;
    letter-spacing: 0.08em;
}

.internal-order-qty-buttons {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.22rem;
    padding: 0.24rem;
}

.internal-order-qty-chip {
    border-radius: 10px;
    min-height: 38px;
    padding: 0.22rem 0.1rem;
}

.internal-order-qty-chip span {
    font-size: 0.4rem;
}

.btn-internal-order {
    width: 100%;
    min-height: 42px;
    flex-direction: row;
    gap: 0.24rem;
    border-radius: 13px;
}

.btn-internal-order {
    min-width: 104px;
    min-height: 46px;
    border-radius: 14px;
    border: 1px solid rgba(212, 175, 55, 0.54);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.22), rgba(123, 84, 20, 0.22));
    color: #f6d778;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(0.68rem, 2.45vw, 0.78rem);
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1.05;
    text-transform: uppercase;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    box-shadow: 0 6px 18px rgba(159, 112, 28, 0.22);
    transition: all 0.22s ease;
}

.btn-internal-order:hover {
    border-color: rgba(212, 175, 85, 0.7);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.32), rgba(123, 84, 20, 0.3));
    box-shadow: 0 8px 22px rgba(159, 112, 28, 0.34);
    transform: translateY(-1px);
}

.btn-internal-order .btn-line {
    display: block;
    white-space: nowrap;
}

.consume-feedback {
    margin-top: 0.5rem;
    min-height: 1.1rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.sync-toast {
    position: fixed;
    left: 50%;
    bottom: max(18px, env(safe-area-inset-bottom));
    transform: translate(-50%, 120%);
    z-index: 1300;
    min-width: 200px;
    max-width: min(92vw, 420px);
    padding: 11px 16px;
    border-radius: 12px;
    border: 1px solid rgba(95, 218, 134, 0.5);
    background: rgba(20, 112, 53, 0.95);
    color: #e9fff1;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.02em;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.sync-toast.show {
    transform: translate(-50%, 0);
    opacity: 1;
    animation: premiumToastLift 0.48s var(--motion-ease-premium) both;
}

.update-notice-banner {
    margin-bottom: 0.58rem;
    padding: 0.62rem 0.64rem;
}

.update-notice-title {
    font-size: 0.72rem;
}

.update-notice-text {
    font-size: 0.76rem;
}

.update-notice-btn {
    font-size: 0.66rem;
    padding: 0.36rem 0.56rem;
}

.update-notice-btn .update-btn-loader {
    width: 13px;
    height: 13px;
}

.update-notice-highlights-title {
    font-size: 0.64rem;
}

.update-notice-highlights-list li {
    font-size: 0.68rem;
}

.title-cava {
    gap: 1vw;
    margin-bottom: -0.3rem;
}

.grape-logo-wrap {
    margin: -0.75rem 0 0.08rem;
}

.grape-logo {
    width: clamp(68px, 22vw, 92px);
}

.stock-text {
    font-size: 7.5vw;
    letter-spacing: 0.05em;
}

.cava-text {
    font-size: 7.5vw;
}

.title-metropolis {
    font-size: 10vw;
    letter-spacing: 0.12em;
    padding: 0 18px;
    text-shadow: 0 0 6px #d4af37, 0 0 15px rgba(212, 175, 55, 0.8), 0 0 25px rgba(212, 175, 55, 0.4);
}

.modal-card {
    width: 95%;
    max-height: 92dvh;
    padding: 1.08rem 0.92rem 1rem;
    border-radius: 20px;
}

.modal-card::before {
    inset: 6px 6px 8px;
    border-radius: 14px;
}

.modal-title {
    font-size: clamp(1.08rem, 4.85vw, 1.36rem);
    margin: 0.62rem 0 0.28rem 0;
}

.modal-subtitle {
    font-size: 0.72rem;
    margin-bottom: 0;
}

.modal-grapes {
    margin: 0.4rem 0 0;
}

.modal-identity .modal-grapes .grape-tags {
    gap: 0.24rem;
}

.modal-identity .modal-grapes .grape-tag {
    font-size: 0.62rem;
    padding: 0.24rem 0.42rem;
    border-radius: 9px;
}

.details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.48rem;
    margin-bottom: 0.84rem;
}

.terroir-grid {
    grid-template-columns: 1fr;
    gap: 0.48rem;
    margin-bottom: 0.84rem;
}

.detail-box,
.terroir-box {
    padding: 0.58rem 0.52rem;
}

.detail-label {
    font-size: 0.58rem;
    letter-spacing: 1px;
}

.detail-value {
    font-size: 0.82rem;
}

.terroir-label {
    margin-bottom: 0.46rem;
}

.terroir-box .detail-value {
    font-size: 0.74rem;
    line-height: 1.24;
}

.cata-label {
    font-size: 0.6rem;
    margin-bottom: 0.4rem;
}

.cata-box {
    padding: 0.62rem 0.58rem;
}

.cata-value {
    font-size: 0.78rem;
    line-height: 1.32;
}

.alt-item-btn {
    padding: 0.46rem 0.5rem;
}

.alt-item-title {
    font-size: 0.74rem;
}

.alt-item-meta {
    font-size: 0.64rem;
}

.critic-chip {
    font-size: 0.6rem;
    padding: 0.16rem 0.38rem;
}

.critic-name {
    font-size: 0.6rem;
}

.critic-value {
    font-size: 0.7rem;
}

.est-table {
    display: none;
}


#searchInput {
    font-size: 1rem;
    padding: 1rem 1rem 1rem 2rem;
}

body {
    padding-top: 5dvh;
}

.premium-topbar {
    top: max(10px, env(safe-area-inset-top));
    left: max(10px, env(safe-area-inset-left));
    right: auto;
}

.session-user-card {
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0;
}

.theme-toggle {
    width: 52px;
    height: 32px;
}

.user-menu-panel {
    width: min(218px, calc(100vw - 24px));
    right: 0;
    left: auto;
}

.logout-btn,
.admin-btn {
    min-height: 38px;
    font-size: 0.76rem;
}

.filter-bar {
    width: 100%;
    margin-left: 0;
    padding: 0;
}

.filter-restaurant-row {
    width: 100%;
    display: grid;
    grid-template-columns: 1.38fr 0.68fr 0.88fr 1.02fr 0.86fr;
    gap: 0.24rem;
    overflow: visible;
    padding: 0.06rem 0 0.18rem;
}

.filter-pill {
    min-width: 0;
    width: 100%;
    height: 36px;
    border-radius: 16px;
    padding: 0 0.16rem;
    font-size: clamp(0.58rem, 2.25vw, 0.86rem);
    letter-spacing: 0;
}

.modal-actions {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: 0.45rem;
}

.consume-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 44px repeat(3, minmax(0, 1fr));
    grid-template-areas: "qty cava bodega transfer";
    column-gap: 0.48rem;
    row-gap: 0.38rem;
}

.consume-qty,
.btn-consume,
.btn-edit {
    width: 100%;
    min-width: 0;
}

.btn-edit {
    align-self: stretch;
    height: 35px;
    padding: 0 0.68rem;
    font-size: 0.84rem;
}

body {
    padding-top: 5dvh;
}

.filter-bar {
    padding: 0;
}

.filter-restaurant-row {
    grid-template-columns: 1.44fr 0.66fr 0.86fr 1.02fr 0.82fr;
    gap: 0.16rem;
}

.filter-pill {
    height: 34px;
    border-radius: 14px;
    padding: 0 0.08rem;
    font-size: clamp(0.54rem, 2.72vw, 0.78rem);
    letter-spacing: -0.01em;
}

#searchResults {
    max-height: 61vh;
    padding-bottom: 5.2rem;
}

.home-insights {
    gap: 0.62rem;
    margin-top: -0.05rem;
}

.home-panel {
    border-radius: 18px;
}

.home-panel-head {
    padding: 0.68rem 0.68rem 0.28rem;
}

.home-panel-title {
    font-size: 0.9rem;
}

.home-panel-note {
    font-size: 0.58rem;
}

.featured-row {
    gap: 0.42rem;
    padding: 0.74rem 0.52rem 0.98rem;
}

.featured-card {
    flex-basis: clamp(100px, 30vw, 122px);
    min-height: 158px;
    padding: 0.04rem 0 0.14rem;
    border-radius: 0;
}

.featured-photo {
    height: 128px;
}

.featured-name {
    font-size: 0.62rem;
}

.ops-grid {
    gap: 0.34rem;
    padding: 0.34rem 0.52rem 0.64rem;
}

.ops-card {
    padding: 0.5rem 0.4rem;
}

.ops-value {
    font-size: 0.9rem;
}

.ops-label {
    font-size: 0.5rem;
}

.heatmap-list {
    padding: 0.34rem 0.52rem 0.68rem;
}

.heatmap-row {
    grid-template-columns: 74px 1fr 36px;
    gap: 0.38rem;
    font-size: 0.62rem;
}

.modal-card {
    width: 94%;
    padding: 0.98rem 0.82rem 0.9rem;
}

.search-item {
    grid-template-columns: 74px minmax(0, 1fr) minmax(58px, auto);
    column-gap: 0.42rem;
    padding: 0.58rem 0.58rem;
    align-items: center;
}

.search-item-photo {
    width: 74px;
    height: 112px;
    border-radius: 16px;
    margin: -0.38rem 0 -0.36rem -0.42rem;
}

.search-item-photo img {
    width: 116%;
    height: 116%;
    transform: translateX(0) translateY(0) scale(1.03);
    transform-origin: center center;
}

.search-item-photo.has-transparent-bottle img {
    width: 124%;
    height: 124%;
    transform: translateX(0) translateY(0) scale(1.03);
    transform-origin: center center;
}

.search-item-bodega .item-location {
    font-size: 0.76rem;
    padding: 0.15rem 0.38rem;
    letter-spacing: 0.025em;
}

.item-right {
    max-width: 28vw;
    gap: 0.15rem;
}

.item-price-label {
    font-size: 0.48rem;
    letter-spacing: 0.075em;
}

.item-price {
    font-size: clamp(0.9rem, 3.65vw, 1.04rem);
    letter-spacing: -0.025em;
}

.item-stock-pill {
    font-size: 0.54rem;
    padding: 0.14rem 0.32rem;
}

.modal-identity {
    grid-template-columns: 124px minmax(0, 1fr);
    gap: 0.56rem;
    padding: 0.72rem 1.02rem 0.72rem 0.56rem;
    margin-bottom: 0.75rem;
}

.modal-photo-frame {
    width: 132px;
    min-height: 174px;
}

.modal-wine-photo {
    width: 126px;
    height: 170px;
    border-radius: 15px;
}

.service-snapshot {
    gap: 0.34rem;
}

.service-chip {
    padding: 0.46rem 0.42rem;
    border-radius: 12px;
}

.service-chip-label {
    font-size: 0.5rem;
    letter-spacing: 0.07em;
}

.service-chip-value,
.service-chip-value.is-price {
    font-size: 0.82rem;
}

.service-chip-value.is-location {
    font-size: 0.72rem;
}

.consume-qty {
    min-width: 0;
    height: 36px;
    font-size: 0.84rem;
    padding: 0 3px;
}

.btn-consume {
    min-width: 0;
    height: 36px;
    font-size: clamp(0.559rem, 2.288vw, 0.728rem);
    padding: 0 3px;
    letter-spacing: 0.002em;
    line-height: 1.03;
}

.consume-actions {
    grid-template-columns: 44px repeat(3, minmax(0, 1fr));
    grid-template-areas: "qty cava bodega transfer";
    column-gap: 0.44rem;
    row-gap: 0.38rem;
}

.est-mobile-item {
    grid-template-columns: minmax(72px, 0.88fr) repeat(2, minmax(0, 1fr));
    gap: 0.3rem;
    padding: 0.36rem;
}

.est-mobile-name {
    font-size: 0.62rem;
}

.est-mobile-field-label {
    font-size: 0.52rem;
}

.est-mobile-field-value {
    font-size: 0.72rem;
}

.est-mobile-field-value.is-price {
    font-size: 0.8rem;
}

.modal-card {
    padding: 0.92rem 0.76rem 0.84rem;
}

.consume-actions {
    column-gap: 0.34rem;
    row-gap: 0.34rem;
    grid-template-columns: 42px repeat(3, minmax(0, 1fr));
    grid-template-areas: "qty cava bodega transfer";
}

.consume-qty {
    min-width: 0;
    font-size: 0.82rem;
}

.btn-consume {
    min-width: 0;
    font-size: clamp(0.481rem, 2.184vw, 0.65rem);
    padding: 0 2px;
    letter-spacing: 0;
}

body {
    padding-top: 5dvh;
}

.modal-card {
    max-height: 94dvh;
    padding: 0.9rem 0.8rem 0.82rem;
}

.modal-title {
    margin-top: 0.62rem;
}

.details-grid,
.terroir-grid {
    margin-bottom: 0.72rem;
}

.terroir-box .detail-value {
    line-height: 1.18;
}

.consume-feedback {
    margin-top: 0.34rem;
}

body.keyboard-open {
    padding-top: 2dvh;
}

body.keyboard-open header {
    display: none;
}


#smartActionsArea {
    width: 100%;
    margin-bottom: 0.86rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.btn-smart-action {
    width: 100%;
    height: 44px;
    border-radius: 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.btn-smart-consume {
    border: 1px solid rgba(201, 65, 85, 0.5);
    background: linear-gradient(135deg, rgba(201, 65, 85, 0.26), rgba(92, 26, 46, 0.24));
    color: var(--status-danger);
    box-shadow: 0 4px 14px rgba(61, 14, 30, 0.32);
}

.btn-smart-consume:hover {
    background: linear-gradient(135deg, rgba(201, 65, 85, 0.36), rgba(92, 26, 46, 0.32));
    border-color: rgba(217, 106, 124, 0.65);
    box-shadow: 0 6px 18px rgba(61, 14, 30, 0.42);
    transform: translateY(-1px);
}

.btn-smart-transfer {
    border: 1px solid rgba(118, 224, 167, 0.5);
    background: linear-gradient(135deg, rgba(118, 224, 167, 0.2), rgba(31, 122, 77, 0.18));
    color: var(--status-success);
    box-shadow: 0 4px 14px rgba(12, 98, 59, 0.28);
}

.btn-smart-transfer:hover {
    background: linear-gradient(135deg, rgba(118, 224, 167, 0.28), rgba(31, 122, 77, 0.24));
    border-color: rgba(118, 224, 167, 0.68);
    box-shadow: 0 6px 18px rgba(12, 98, 59, 0.4);
    transform: translateY(-1px);
}

.btn-smart-disabled {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
}

.search-item.status-warning {
    border-color: rgba(212, 175, 55, 0.55) !important;
    box-shadow:
        inset 0 0 10px rgba(212, 175, 55, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 14px 28px rgba(0, 0, 0, 0.2) !important;
}

.search-item.status-warning:hover {
    border-color: rgba(212, 175, 55, 0.8) !important;
    box-shadow:
        inset 0 0 15px rgba(212, 175, 55, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 20px 36px rgba(0, 0, 0, 0.3) !important;
}

.search-item.status-critical {
    border-color: rgba(239, 68, 68, 0.45) !important;
    background:
        radial-gradient(ellipse at 14% 24%, rgba(239, 68, 68, 0.08), transparent 44%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(239, 68, 68, 0.04)),
        rgba(22, 12, 14, 0.72) !important;
    box-shadow:
        inset 0 0 10px rgba(239, 68, 68, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 14px 28px rgba(0, 0, 0, 0.2) !important;
}

.search-item.status-critical:hover {
    border-color: rgba(239, 68, 68, 0.7) !important;
    background:
        radial-gradient(ellipse at 14% 24%, rgba(239, 68, 68, 0.12), transparent 44%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(239, 68, 68, 0.06)),
        rgba(30, 14, 18, 0.78) !important;
    box-shadow:
        inset 0 0 15px rgba(239, 68, 68, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 20px 36px rgba(0, 0, 0, 0.3) !important;
}

.search-item {
    position: relative !important;
    overflow: hidden !important;
    padding: 0 !important;
    display: block !important;
}

.swipe-underlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, rgba(168, 19, 19, 0.85) 0%, rgba(220, 38, 38, 0.95) 100%);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 24px;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 850;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    pointer-events: none;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.2s ease;
    border-radius: 22px;
}

.swipe-underlay span::after {
    content: ' ⬇';
    font-size: 1.1rem;
    margin-left: 6px;
    display: inline-block;
}

.search-item-content {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    column-gap: 0.74rem !important;
    align-items: center !important;
    width: 100% !important;
    height: 100% !important;
    position: relative;
    z-index: 2;
    background: transparent;
    padding: 0.68rem 0.86rem !important;
    box-sizing: border-box;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.search-item-content {
    grid-template-columns: 74px minmax(0, 1fr) minmax(58px, auto) !important;
    column-gap: 0.42rem !important;
    padding: 0.58rem 0.58rem !important;
}

.service-mode-btn::before {
    content: '⚡' !important;
    color: #f6d778 !important;
}

.service-mode-btn.service-active {
    border-color: rgba(246, 215, 120, 0.7) !important;
    background: rgba(212, 175, 55, 0.18) !important;
    color: #ffffff !important;
}

body {
    perspective: 1200px !important;
    overflow-x: hidden !important;
    background:
        radial-gradient(circle at 14% 78%, rgba(212, 175, 55, 0.12) 0 1px, transparent 2px),
        radial-gradient(circle at 76% 58%, rgba(212, 175, 55, 0.10) 0 1px, transparent 2px),
        radial-gradient(circle at 88% 8%, rgba(212, 175, 55, 0.08) 0 1px, transparent 2px),
        radial-gradient(ellipse at 50% 28%, rgba(63, 0, 24, 0.58), transparent 44%),
        linear-gradient(180deg, rgb(7, 0, 5) 0%, rgb(28, 0, 12) 34%, rgb(9, 0, 6) 72%, rgb(6, 0, 4) 100%) !important;
}

.app-shell {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), border-radius 0.4s ease, box-shadow 0.4s ease !important;
    transform-origin: right center !important;
    backface-visibility: hidden !important;
}

.premium-topbar {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

body.menu-open-body {
    overflow: hidden !important;
}

body.menu-open-body .app-shell {
    transform: translate3d(280px, 0, -200px) rotateY(-15deg) !important;
    border-radius: 24px !important;
    box-shadow:
        0 25px 55px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.06) !important;
    pointer-events: none !important;
    cursor: pointer !important;
}

body.menu-open-body .premium-topbar {
    transform: translate3d(0, 0, 0) !important;
    transform-origin: left center !important;
    pointer-events: none !important;
    filter: brightness(0.55);
}

.user-menu-panel {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    right: auto !important;
    width: 280px !important;
    height: 100vh !important;
    background: linear-gradient(180deg, rgba(15, 14, 18, 0.96), rgba(9, 8, 10, 0.98)) !important;
    border: none !important;
    border-right: 1px solid rgba(212, 175, 55, 0.16) !important;
    box-shadow: 15px 0 40px rgba(0, 0, 0, 0.4) !important;
    backdrop-filter: blur(20px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(20px) saturate(1.2) !important;
    padding: 2.5rem 1.2rem !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.8rem !important;
    z-index: 1000 !important;
    transform: translate3d(-100%, 0, 0) !important;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1) !important;
    visibility: visible !important;
    opacity: 1 !important;
    box-sizing: border-box !important;
    transform-origin: center center !important;
    border-radius: 0 !important;
}

.user-menu-panel.open {
    transform: translate3d(0, 0, 0) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.menu-profile-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 0.5rem;
    margin-bottom: 0.2rem;
}

.menu-profile-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(123, 84, 20, 0.25));
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: #f6d778;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.menu-profile-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.menu-profile-name {
    color: var(--text-main);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-profile-role {
    color: var(--text-muted);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.68rem;
    letter-spacing: 0.02em;
}

.menu-divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(184, 150, 62, 0.22), transparent);
    margin-bottom: 0.6rem;
    width: 100%;
}

html {
    background: var(--bg-color) !important;
}

body {
    perspective: none !important;
    background:
        radial-gradient(circle at 14% 78%, rgba(212, 175, 55, 0.12) 0 1px, transparent 2px),
        radial-gradient(circle at 76% 58%, rgba(212, 175, 55, 0.10) 0 1px, transparent 2px),
        radial-gradient(circle at 88% 8%, rgba(212, 175, 55, 0.08) 0 1px, transparent 2px),
        radial-gradient(ellipse at 50% 28%, rgba(63, 0, 24, 0.58), transparent 44%),
        linear-gradient(180deg, rgb(7, 0, 5) 0%, rgb(28, 0, 12) 34%, rgb(9, 0, 6) 72%, rgb(6, 0, 4) 100%) !important;
    color: var(--text-main) !important;
    font-family: var(--font-ui) !important;
    line-height: 1.42;
    min-height: 100dvh;
    height: 100dvh;
    padding-top: 5dvh;
    overflow-x: hidden !important;
    overscroll-behavior-y: contain;
}

body::before {
    height: clamp(330px, 45dvh, 520px);
    background-image:
        linear-gradient(180deg, rgba(0, 0, 0, 0.10), rgba(0, 0, 0, 0.84)),
        radial-gradient(circle at 50% 24%, rgba(212, 175, 55, 0.10), transparent 46%),
        url('../images/backgrounds/metropolis-hero.webp');
    background-size: cover;
    background-position: center top;
    opacity: 0.92;
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 54%, rgba(0, 0, 0, 0.70) 72%, transparent 100%);
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 54%, rgba(0, 0, 0, 0.70) 72%, transparent 100%);
    transform: none !important;
    transform-origin: right center !important;
    backface-visibility: hidden;
    will-change: transform, filter;
    transition:
        transform var(--motion-medium) var(--motion-ease-premium),
        filter var(--motion-fast) ease,
        opacity var(--motion-fast) ease !important;
}

body::after {
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, var(--bg-color) 76%, var(--bg-color) 100%),
        radial-gradient(ellipse at 50% 18%, rgba(212, 175, 55, 0.045), transparent 48%);
    transform: none !important;
    transform-origin: right center !important;
    backface-visibility: hidden;
    will-change: transform, filter;
    transition:
        transform var(--motion-medium) var(--motion-ease-premium),
        filter var(--motion-fast) ease,
        opacity var(--motion-fast) ease !important;
}

body.light-mode::before {
    background-image:
        linear-gradient(180deg, rgba(253, 251, 247, 0.50), rgba(253, 251, 247, 0.92)),
        radial-gradient(circle at 50% 16%, rgba(184, 134, 11, 0.13), transparent 38%),
        url('../images/backgrounds/metropolis-hero.webp');
    opacity: 0.66;
}

body.light-mode::after {
    background:
        linear-gradient(180deg, rgba(253, 251, 247, 0) 0%, var(--bg-color) 76%, var(--bg-color) 100%),
        radial-gradient(ellipse at 50% 18%, rgba(184, 134, 11, 0.055), transparent 48%);
}

body .app-shell {
    width: min(92vw, 680px);
    gap: 0.72rem;
    transform: none !important;
    transform-origin: center !important;
    backface-visibility: hidden !important;
    transition:
        transform var(--motion-medium) var(--motion-ease-premium),
        border-radius var(--motion-medium) ease,
        box-shadow var(--motion-medium) ease,
        opacity var(--motion-fast) ease,
        filter var(--motion-fast) ease !important;
}

body .app-shell::before {
    inset: -16px -12px;
    border-radius: 28px;
    border-color: rgba(140, 60, 80, 0.22);
    background: linear-gradient(180deg, rgba(245, 237, 224, 0.05), transparent 72%);
    box-shadow: var(--shadow-glass);
}

body.menu-open-body .app-shell,
body.menu-open-body .premium-topbar {
    pointer-events: none !important;
    filter: brightness(0.74);
}

body.menu-open-body::before,
body.menu-open-body::after {
    transform: translate3d(280px, 0, -180px) rotateY(-14deg) scale(0.965) !important;
    filter: brightness(0.74);
}

body.menu-open-body {
    perspective: 1200px !important;
    perspective-origin: left center;
}

body.menu-open-body .app-shell {
    transform: translate3d(280px, 0, -180px) rotateY(-14deg) scale(0.965) !important;
    transform-origin: right center !important;
    border-radius: 24px !important;
    box-shadow:
        0 24px 54px rgba(0, 0, 0, 0.48),
        0 0 0 1px rgba(255, 255, 255, 0.06) !important;
}

body.menu-open-body .premium-topbar {
    transform: translate3d(0, 0, 0) !important;
    transform-origin: left center !important;
    filter: brightness(0.55);
}

body header {
    margin-bottom: 0.36rem;
}

body .title-cava {
    color: var(--gold-accent);
    font-family: var(--font-ui);
    text-shadow: 0 0 12px rgba(212, 175, 55, 0.18);
}

body .stock-text {
    font-family: var(--font-ui);
    font-weight: 800;
    letter-spacing: 0.05em;
}

body .cava-text {
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 400;
}

body .title-metropolis {
    color: var(--text-main);
    text-shadow:
        0 0 8px var(--gold-accent),
        0 0 20px rgba(184, 150, 62, 0.5);
}

body .premium-topbar {
    left: max(14px, env(safe-area-inset-left)) !important;
    right: auto !important;
    transform: none !important;
    transform-origin: left center !important;
    transition:
        transform var(--motion-medium) var(--motion-ease-premium),
        opacity var(--motion-fast) ease,
        filter var(--motion-fast) ease !important;
}

body .theme-toggle,
body .admin-btn,
body .checklist-btn,
body .users-btn,
body .logs-btn,
body .logout-btn,
body .menu-theme-row {
    border-color: var(--glass-border) !important;
    background: var(--surface-glass-soft) !important;
    color: var(--text-main) !important;
    box-shadow: var(--field-shadow) !important;
    font-family: var(--font-ui) !important;
}

body .session-user-card {
    border-color: rgba(212, 175, 55, 0.28) !important;
    background:
        linear-gradient(135deg, rgba(212, 175, 55, 0.10), rgba(255, 255, 255, 0.04)),
        rgba(10, 9, 12, 0.58) !important;
    color: #C9A84C !important;
    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.32),
        0 0 0 0.5px rgba(212, 175, 55, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    padding: 0 !important;
    border-radius: 11px !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
}

body .session-user-card:hover,
body .session-user-card[aria-expanded="true"] {
    border-color: rgba(212, 175, 55, 0.52) !important;
    background:
        linear-gradient(135deg, rgba(212, 175, 55, 0.18), rgba(255, 255, 255, 0.06)),
        rgba(10, 9, 12, 0.48) !important;
    box-shadow:
        0 6px 20px rgba(212, 175, 55, 0.20),
        0 0 0 0.5px rgba(212, 175, 55, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

body .session-user-card .menu-icon-svg {
    color: #C9A84C !important;
    width: 17px !important;
    height: 17px !important;
}

body .session-user-card:active,
body .theme-toggle:active,
body .admin-btn:active,
body .checklist-btn:active,
body .users-btn:active,
body .logs-btn:active,
body .logout-btn:active {
    transform: translateY(1px) scale(0.985) !important;
    border-color: var(--field-border-strong) !important;
}

body .user-menu-panel {
    background: linear-gradient(180deg, var(--glass-bg), var(--bg-color)) !important;
    border-right-color: var(--glass-border) !important;
    box-shadow: 15px 0 38px rgba(0, 0, 0, 0.38), inset 1px 0 0 rgba(255, 255, 255, 0.05) !important;
    color: var(--text-main) !important;
}

body .menu-profile-avatar {
    background: var(--surface-glass-soft);
    border-color: var(--glass-border);
    color: var(--gold-light);
}

body .menu-profile-name,
body .menu-theme-title {
    color: var(--text-main);
}

body .menu-profile-role,
body .menu-theme-subtitle {
    color: var(--text-muted);
}

body .search-container {
    padding: 1.18rem 0 1.35rem;
}

body.search-active .search-container::after {
    background: linear-gradient(180deg, transparent 0%, var(--bg-color) 40%, var(--bg-color) 100%);
    filter: blur(16px);
    opacity: 0.94;
}

body.light-mode.search-active .search-container::after {
    display: block;
    background: linear-gradient(180deg, rgba(253, 251, 247, 0) 0%, var(--bg-color) 36%, var(--bg-color) 100%);
}

body .search-input-wrapper {
    margin-bottom: 0.82rem;
}

body .search-icon {
    fill: var(--text-muted);
}

body #searchInput {
    min-height: 58px;
    padding: 1rem 1rem 1rem 2.08rem;
    border-radius: 30px;
    border-color: var(--field-border);
    background: var(--surface-field);
    color: var(--text-main);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18), var(--field-shadow);
    font-family: var(--font-ui);
    font-size: 1rem;
    transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, background var(--motion-fast) ease;
}

body #searchInput:focus {
    border-color: var(--gold-accent);
    box-shadow: 0 0 0 3px var(--field-focus-ring), 0 12px 28px rgba(212, 175, 55, 0.16), var(--field-shadow);
}

body #searchInput::placeholder {
    color: var(--text-muted);
    opacity: 0.82;
}

body .update-notice-banner,
body .home-panel,
body .search-result-summary {
    border-color: var(--glass-border);
    background: var(--surface-glass);
    color: var(--text-main);
    box-shadow: var(--shadow-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body .update-notice-title,
body .update-notice-highlights-title,
body .home-panel-kicker,
body .modal-tab-kicker,
body .edit-section-title,
body .alt-label,
body .cata-label,
body .terroir-label,
body .internal-order-kicker {
    color: var(--gold-accent) !important;
}

body .update-notice-text,
body .update-notice-highlights-list li,
body .home-panel-title {
    color: var(--text-main);
}

body .home-panel-note {
    color: var(--text-muted);
}

body .update-notice-btn,
body .modal-dock-btn.active,
body .btn-save {
    border-color: var(--gold-accent) !important;
    background: var(--surface-active) !important;
    color: var(--bg-color) !important;
    box-shadow: 0 8px 22px rgba(184, 150, 62, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.36) !important;
}

body .update-notice-btn:active,
body .filter-pill:active,
body .modal-dock-btn:active,
body .btn-save:active,
body .btn-edit:active,
body .btn-cancel:active {
    transform: translateY(1px) scale(0.975) !important;
}

body .filter-restaurant-row {
    gap: 0.32rem;
}

body .filter-pill {
    height: 38px;
    border-radius: 19px;
    border-color: var(--glass-border);
    background: var(--glass-bg);
    color: var(--text-muted);
    box-shadow: var(--field-shadow);
    transition: transform var(--motion-fast) ease, border-color var(--motion-fast) ease, background var(--motion-fast) ease, color var(--motion-fast) ease;
}

body #searchResults {
    background: transparent;
    border-color: transparent;
    padding-bottom: 5rem;
    scrollbar-width: none;
}

body .search-item {
    border: 1px solid var(--glass-border) !important;
    border-radius: 22px !important;
    background: var(--surface-glass) !important;
    box-shadow: var(--shadow-raised) !important;
    backdrop-filter: blur(12px) saturate(1.08);
    -webkit-backdrop-filter: blur(12px) saturate(1.08);
    animation: none !important;
    transition: transform var(--motion-fast) ease, border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, opacity var(--motion-fast) ease !important;
}

body .search-item::before {
    display: none;
}

body .search-item:active {
    transform: translateY(1px) scale(0.992) !important;
    border-color: var(--field-border-strong) !important;
}

body .search-item-content {
    background: transparent;
    transition: transform var(--motion-fast) var(--motion-ease-soft);
}

body .search-item:active .search-item-content {
    transform: translateX(-2px);
}

body .item-title,
body .featured-name,
body .modal-title,
body .metric-value,
body .detail-value,
body .cata-value,
body .internal-order-copy strong {
    color: var(--text-main) !important;
}

body .item-pod,
body .item-price-label,
body .item-stock-pill,
body .item-order-pill,
body .featured-meta,
body .modal-subtitle,
body .detail-label,
body .metric-label,
body .metric-note,
body .alt-item-meta,
body .internal-order-copy small {
    color: var(--text-muted) !important;
}

body .item-location,
body .service-chip-value.is-location {
    color: var(--gold-light) !important;
}

body .featured-price,
body .item-price,
body .service-chip-value.is-price,
body .est-mobile-field-value.is-price,
body .est-table .pvp-cell,
body .alt-item-price:not(.alt-item-price-na),
body .inventory-value-amount {
    color: var(--price-color) !important;
    text-shadow:
        0 0 9px rgba(201, 168, 76, 0.3),
        0 0 18px rgba(201, 168, 76, 0.12) !important;
}

body .featured-panel,
body .inventory-value-panel {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

body .featured-row {
    gap: 0.56rem;
    padding: 0.78rem 0.56rem 1rem;
    scroll-behavior: auto;
    -webkit-mask-image: none;
    mask-image: none;
}

body .featured-card {
    flex-basis: clamp(104px, 29vw, 132px);
    min-height: 172px;
    padding-inline: 0.12rem;
    animation: none !important;
    transform: none !important;
    transition: transform var(--motion-fast) ease;
}

body .featured-card:active {
    transform: translateY(1px) scale(0.985) !important;
}

body .featured-photo {
    height: 148px;
    transition: transform var(--motion-fast) ease, filter var(--motion-fast) ease;
    filter: drop-shadow(0 15px 13px rgba(0, 0, 0, 0.34));
}

body .featured-name {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
}

body .featured-card:active .featured-photo {
    transform: translateY(-2px) scale(1.012);
}

body .home-panel {
    border-radius: 22px;
}

body .service-chip,
body .metric-card,
body .detail-box,
body .terroir-box,
body .alt-item-btn,
body .edit-form,
body .internal-order-card,
body .est-mobile-item,
body .internal-order-qty-cascade,
body .internal-order-qty-chip {
    border-color: var(--glass-border) !important;
    background: var(--surface-glass-soft) !important;
    box-shadow: var(--field-shadow) !important;
}

body .ops-value {
    color: var(--gold-light);
}

body .inventory-value-card {
    border-color: var(--glass-border);
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.06), rgba(0, 0, 0, 0.52)),
        var(--surface-glass) !important;
    box-shadow: var(--shadow-raised);
}

body .inventory-value-card.is-total-stock {
    border-color: rgba(118, 224, 167, 0.3);
}

body .inventory-value-card::before {
    background:
        radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.14), transparent 30%),
        linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.46));
}

body .inventory-value-card::after {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), inset 0 -34px 54px rgba(0, 0, 0, 0.48);
}

body .heatmap-track {
    background: var(--minicard-bg);
    border-color: var(--glass-border);
}

body .heatmap-fill {
    background: linear-gradient(90deg, var(--burgundy-light), var(--gold-accent), var(--status-success));
    box-shadow: 0 0 12px rgba(184, 150, 62, 0.22);
}

body .search-item.status-warning {
    border-color: rgba(212, 175, 55, 0.58) !important;
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.16), var(--shadow-raised) !important;
}

body .search-item.status-critical {
    border-color: rgba(201, 65, 85, 0.5) !important;
    background:
        radial-gradient(ellipse at 14% 24%, rgba(201, 65, 85, 0.1), transparent 44%),
        var(--surface-glass) !important;
}

body .swipe-underlay {
    background: linear-gradient(90deg, rgba(92, 26, 46, 0.9), rgba(201, 65, 85, 0.92));
    color: var(--text-main);
    border-radius: 22px;
}

body #wineModal.modal-overlay,
body #wineModal {
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

body.light-mode #wineModal.modal-overlay,
body.light-mode #wineModal {
    background: rgba(40, 31, 22, 0.34);
}

body #wineModal .modal-card {
    width: min(94vw, 540px);
    max-height: min(92dvh, 820px);
    padding: clamp(0.92rem, 3.6vw, 1.35rem);
    border-radius: 22px;
    border-color: var(--glass-border);
    background:
        radial-gradient(circle at 14% 0%, rgba(184, 150, 62, 0.13), transparent 34%),
        var(--surface-glass) !important;
    box-shadow: var(--shadow-modal);
    transform: translateY(14px) scale(0.985);
    transition: transform var(--t-modal, 320ms) var(--motion-ease-premium), opacity var(--motion-fast) ease !important;
    overscroll-behavior: contain;
    scrollbar-width: none;
}

body #wineModal .modal-card::-webkit-scrollbar {
    display: none;
}

body #wineModal.active .modal-card {
    transform: translateY(0) scale(1);
}

body #wineModal .modal-card::after {
    content: '';
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    width: auto;
    height: 2px;
    pointer-events: none;
    border-radius: 22px 22px 0 0;
    background: var(--gold-foil);
    background-size: 220% auto;
    opacity: 0.55;
    transform: none;
    z-index: 2;
    animation: foilSweep 7s linear infinite;
}

body #wineModal .btn-close {
    top: 0.74rem;
    right: 0.78rem;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: var(--surface-glass-soft);
    color: var(--text-muted);
    font-size: 1rem;
    display: grid;
    place-items: center;
}

body #wineModal .btn-close:active {
    transform: scale(0.94);
    color: var(--gold-light);
}

body #wineModal .modal-identity {
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 0.72rem;
    margin: 0.14rem 0 0.82rem;
    padding: 0.72rem 2.2rem 0.72rem 0.58rem;
    border-radius: 19px;
    border-color: var(--glass-border);
    background:
        radial-gradient(circle at 9% 18%, rgba(184, 150, 62, 0.16), transparent 34%),
        var(--surface-glass-soft);
    box-shadow: var(--field-shadow);
}

body #wineModal .modal-title {
    margin: 0.46rem 0 0.25rem;
    padding-right: 0;
    font-family: var(--font-display);
    font-size: clamp(1.18rem, 5.2vw, 1.72rem);
    line-height: 1.08;
    text-wrap: balance;
}

body #wineModal .modal-subtitle {
    font-size: 0.76rem;
    line-height: 1.3;
}

body #wineModal .modal-photo-frame {
    width: 132px;
    min-height: 174px;
}

body #wineModal .modal-wine-photo {
    width: 126px;
    height: 170px;
    border-radius: 16px;
}

body #wineModal .badge,
body .critic-chip {
    border: 1px solid var(--glass-border);
    background: var(--surface-active);
    color: var(--bg-color);
    box-shadow: var(--field-shadow);
}

body #wineModal .modal-dock {
    gap: 0.28rem;
    padding: 0.24rem;
    margin-bottom: 0.78rem;
    border-color: var(--glass-border);
    background: var(--surface-glass-soft);
    box-shadow: var(--field-shadow);
}

body #wineModal .modal-dock-btn {
    min-height: 36px;
    border-radius: 999px;
    color: var(--text-muted);
    font-family: var(--font-ui);
    transition: transform var(--motion-fast) ease, background var(--motion-fast) ease, color var(--motion-fast) ease;
}

body #wineModal .modal-tab-intro {
    border-color: var(--glass-border);
    background: var(--surface-glass-soft);
    box-shadow: var(--field-shadow);
}

body #wineModal .service-snapshot {
    gap: 0.4rem;
}

body #wineModal .service-chip {
    border-radius: 14px;
    padding: 0.52rem 0.54rem;
}

body #wineModal .service-chip-label,
body #wineModal .metric-label,
body #wineModal .detail-label,
body #wineModal .est-mobile-field-label {
    color: var(--text-muted) !important;
}

body #wineModal .details-grid,
body #wineModal .terroir-grid,
body #wineModal .metrics-grid {
    gap: 0.52rem;
    margin-bottom: 0.84rem;
}

body #wineModal .detail-box,
body #wineModal .terroir-box,
body #wineModal .metric-card {
    border-radius: 14px;
    padding: 0.62rem;
}

body #wineModal .cata-box {
    background: transparent;
    border: 0;
    padding: 0.08rem 0.02rem 0;
}

body #wineModal .alt-list {
    gap: 0.4rem;
}

body #wineModal .alt-item-btn {
    border-radius: 13px;
    padding: 0.54rem 0.58rem;
}

body #wineModal .alt-item-btn:active,
body #wineModal .internal-order-qty-chip:active,
body #wineModal .btn-internal-order:active,
body .btn-smart-action:active,
body .btn-consume:active {
    transform: translateY(1px) scale(0.985) !important;
}

body #wineModal .est-mobile-item {
    min-height: auto !important;
    border-radius: 18px !important;
}

body #wineModal .est-mobile-name {
    color: var(--gold-accent) !important;
}

body #wineModal .est-mobile-field {
    border-color: var(--glass-border) !important;
    background: var(--minicard-bg) !important;
    box-shadow: var(--field-shadow) !important;
}

body #wineModal .est-mobile-field-value {
    color: var(--text-main) !important;
}

body #wineModal .modal-actions-primary,
body #wineModal .internal-order-card {
    border-radius: 18px;
    border-color: var(--glass-border);
    background: var(--surface-glass-soft);
    box-shadow: var(--field-shadow);
}

body #wineModal .btn-edit,
body #wineModal .btn-cancel,
body #wineModal .consume-qty,
body #wineModal .edit-field {
    border-color: var(--field-border);
    background: var(--field-bg);
    color: var(--text-main);
    box-shadow: var(--field-shadow);
}

body #wineModal .btn-consume,
body .btn-smart-consume {
    border-color: rgba(201, 65, 85, 0.5);
    background: var(--status-danger-bg);
    color: var(--status-danger);
    box-shadow: 0 6px 16px rgba(61, 14, 30, 0.35);
    transition: transform var(--motion-fast) ease, border-color var(--motion-fast) ease, background var(--motion-fast) ease;
}

body #wineModal .btn-transfer-bodega,
body .btn-smart-transfer {
    border-color: rgba(118, 224, 167, 0.45);
    background: var(--status-success-bg);
    color: var(--status-success);
    box-shadow: 0 6px 16px rgba(118, 224, 167, 0.14);
}

body #wineModal .btn-internal-order,
body #wineModal .internal-order-qty-chip.active {
    border-color: var(--gold-accent);
    background: var(--surface-active);
    color: var(--bg-color);
}

body .sync-toast {
    border-color: rgba(118, 224, 167, 0.4);
    background: var(--glass-bg);
    color: var(--text-main);
    box-shadow: var(--shadow-raised);
}

body {
    padding-top: 5dvh;
}

body .app-shell {
    width: min(93vw, 430px);
}

body .stock-text,
body .cava-text {
    font-size: clamp(1.58rem, 7.4vw, 2.15rem);
}

body .title-metropolis {
    font-size: clamp(2rem, 9.3vw, 3rem);
    letter-spacing: 0.12em;
}

body .filter-restaurant-row {
    gap: 0.22rem;
}

body .filter-pill {
    height: 36px;
    border-radius: 16px;
    padding: 0 0.18rem;
    font-size: clamp(0.58rem, 2.25vw, 0.86rem);
}

body #wineModal .modal-card {
    width: 94vw;
    max-height: 93dvh;
}

body #wineModal .modal-identity {
    grid-template-columns: 120px minmax(0, 1fr);
    padding: 0.66rem 2rem 0.66rem 0.52rem;
}

body #wineModal .modal-photo-frame {
    width: 124px;
    min-height: 164px;
}

body #wineModal .modal-wine-photo {
    width: 118px;
    height: 160px;
}

body #wineModal .service-snapshot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body #wineModal .consume-actions {
    grid-template-columns: 42px repeat(3, minmax(0, 1fr));
    column-gap: 0.38rem;
}

body #wineModal .btn-consume {
    height: 38px;
    font-size: clamp(0.54rem, 2.25vw, 0.72rem);
    letter-spacing: 0;
}

body #wineModal .modal-identity {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 0.5rem;
}

body #wineModal .modal-photo-frame {
    width: 108px;
    min-height: 146px;
}

body #wineModal .modal-wine-photo {
    width: 104px;
    height: 142px;
}

body #wineModal .modal-title {
    font-size: clamp(1.04rem, 4.9vw, 1.24rem);
}

@media (prefers-reduced-motion: reduce) {

    body .featured-card,
    body .search-item,
    body .app-shell,
    body .premium-topbar,
    body #wineModal .modal-card,
    body #wineModal .modal-tab-panel.active,
    body .sync-toast {
        animation: none !important;
        transition-duration: 0.001ms !important;
        transform: none !important;
    }
}

body .home-insights.home-board {
    display: block;
    --board-radius: 18px;
    --board-pad-x: 0.95rem;
    --board-hairline: rgba(212, 175, 55, 0.18);
    --board-shadow:
        0 2px 6px rgba(0, 0, 0, 0.22),
        0 14px 30px rgba(0, 0, 0, 0.26),
        0 32px 64px -24px rgba(0, 0, 0, 0.5);
}

body .board-tabs {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.3rem;
    padding: 0 0.55rem;
    align-items: stretch;
    margin-bottom: 0.55rem;
    border-bottom: 1px solid var(--board-hairline);
}

body .board-tabs .filter-pill {
    position: relative;
    height: 40px;
    width: 100%;
    min-width: 0;
    padding: 0 0.3rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text-muted);
    font-size: clamp(0.56rem, 2.3vw, 0.72rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: color 0.28s var(--motion-ease-premium);
}

body .board-tabs .filter-pill::before {
    content: '';
    position: absolute;
    left: 18%;
    right: 18%;
    bottom: 0;
    height: 2px;
    background: var(--gold-foil);
    background-size: 220% auto;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: center bottom;
    transition: transform 0.32s var(--motion-ease-premium), opacity 0.24s ease;
}

body .board-tabs .filter-pill.active {
    background: transparent;
    border-color: transparent;
    color: var(--gold-light);
    box-shadow: none;
    font-weight: 800;
    letter-spacing: 0.15em;
}

body .board-tabs .filter-pill.active::before {
    opacity: 1;
    transform: scaleX(1);
    animation: foilSweep 8s linear infinite;
}

body .board-tabs .filter-pill:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--field-focus-ring);
}

body .board-frame {
    position: relative;
    z-index: 1;
    border: 1px solid var(--board-hairline);
    border-radius: var(--board-radius);
    background: linear-gradient(180deg, rgba(26, 10, 18, 0.78), rgba(12, 4, 9, 0.88));
    box-shadow: var(--board-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

body .board-frame::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    z-index: 2;
    pointer-events: none;
    background: var(--gold-foil);
    background-size: 220% auto;
    animation: foilSweep 9s linear infinite;
    opacity: 0.55;
}

body .board-stage {
    position: relative;
    isolation: isolate;
    min-height: 232px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body .board-stage::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: var(--stage-photo, none);
    background-size: cover;
    background-position: center 38%;
    filter: saturate(1.16) contrast(1.04);
}

body .board-stage::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(ellipse 78% 58% at 50% 22%, rgba(255, 214, 150, 0.10), transparent 60%),
        radial-gradient(ellipse 90% 26% at 50% 88%, rgba(0, 0, 0, 0.5), transparent 70%),
        radial-gradient(ellipse 120% 120% at 50% 18%, transparent 40%, rgba(46, 12, 24, 0.62) 100%),
        linear-gradient(180deg, rgba(20, 2, 8, 0.2) 0%, rgba(20, 2, 8, 0.34) 48%, rgba(16, 3, 9, 0.85) 100%);
}

body .board-stage .featured-row {
    position: relative;
    z-index: 1;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}

body .board-stage .featured-card {
    min-height: 186px;
    filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.38));
}

body .board-stage .featured-card::before {
    opacity: 0.18;
}

body .board-stage .featured-card::after {
    width: 58%;
    height: 9px;
    bottom: 3.05rem;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(0, 0, 0, 0.55), transparent 68%);
    filter: blur(5px);
    opacity: 0.55;
}

body .board-stage .featured-photo {
    filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.45));
}

body .board-stage .featured-name {
    font-weight: 700;
    letter-spacing: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

body .board-stage .featured-meta {
    display: flex;
    justify-content: center;
    align-items: baseline;
}

body .board-stage .featured-meta>span:first-child {
    display: none;
}

body .board-service-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.7rem;
    padding: 0.85rem var(--board-pad-x) 0.3rem;
}

body .service-badge {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    color: var(--gold-light);
    box-shadow: none;
}

body .service-badge-kicker {
    font-family: var(--font-mono);
    font-size: 0.54rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    font-weight: 700;
    color: rgba(201, 168, 76, 0.7);
}

body .service-badge-title {
    font-family: var(--font-display);
    font-size: 1.02rem;
    font-weight: 600;
    font-style: italic;
    letter-spacing: 0.01em;
    color: var(--text-main);
}

body .service-value {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
    min-width: 0;
    text-align: right;
}

body .service-value-count {
    font-family: var(--font-mono);
    font-size: 0.56rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(245, 237, 224, 0.6);
}

body .service-value-amount {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 7.6vw, 2.35rem);
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--price-color);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

body .board-frame .ops-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
    margin: 0.55rem var(--board-pad-x) 0;
    padding: 0.6rem 0 0.5rem;
    border-top: 1px solid var(--board-hairline);
}

body .board-frame .ops-card {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0.2rem 0.1rem;
    text-align: center;
    position: relative;
}

body .board-frame .ops-card+.ops-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 16%;
    bottom: 16%;
    width: 1px;
    background: linear-gradient(180deg, transparent, var(--board-hairline), transparent);
}

body .board-frame .ops-value {
    font-family: var(--font-display);
    font-size: clamp(1.45rem, 6.6vw, 1.9rem);
    line-height: 1;
    font-weight: 700;
    color: rgba(214, 188, 130, 0.86);
    text-shadow: none;
    letter-spacing: 0.01em;
}

body .board-frame .ops-card.is-lead .ops-value {
    color: var(--gold-light);
    font-weight: 700;
    text-shadow: none;
}

body .board-frame .ops-label {
    margin-top: 0.35rem;
    font-size: 0.58rem;
    line-height: 1.25;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 600;
    color: rgba(245, 237, 224, 0.66);
}

body .board-frame .ops-card.is-lead .ops-label {
    color: rgba(245, 237, 224, 0.92);
}

body .board-heatline {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem;
    margin: 0 var(--board-pad-x);
    padding: 0.7rem 0 0.95rem;
    border-top: 1px solid var(--board-hairline);
}

body .board-heatline .heatline-label {
    display: flex;
    flex-direction: column;
    gap: 0.08rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-main);
    white-space: nowrap;
    line-height: 1.1;
}

body .board-heatline .heatline-sub {
    font-family: var(--font-mono);
    font-size: 0.56rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: rgba(245, 237, 224, 0.5);
}

body .board-heatline .heatmap-track {
    height: 12px;
    border-radius: 999px;
    background: rgba(20, 8, 14, 0.6);
    border: 1px solid var(--board-hairline);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

body .board-heatline .heatmap-fill {
    background: linear-gradient(90deg, var(--burgundy-light), var(--gold-accent));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

body .board-heatline .heatmap-percent {
    min-width: 42px;
    font-family: var(--font-mono);
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: right;
    color: var(--price-color);
    text-shadow: none;
}

body.light-mode .home-insights.home-board {
    --board-hairline: rgba(138, 109, 46, 0.28);
    --board-shadow:
        0 2px 6px rgba(61, 14, 30, 0.08),
        0 14px 30px rgba(61, 14, 30, 0.12),
        0 32px 64px -24px rgba(61, 14, 30, 0.22);
}

body.light-mode .board-tabs .filter-pill {
    background: transparent;
    border-color: transparent;
    color: rgba(59, 50, 37, 0.6);
}

body.light-mode .board-tabs .filter-pill.active {
    color: var(--gold-accent);
}

body.light-mode .board-tabs .filter-pill::before {
    background: var(--gold-foil-soft);
    animation: none;
}

body.light-mode .board-frame {
    background: linear-gradient(180deg, rgba(255, 253, 247, 0.92), rgba(245, 237, 224, 0.88));
    box-shadow: var(--board-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

body.light-mode .board-frame::before {
    background: var(--gold-foil-soft);
    animation: none;
    opacity: 0.7;
}

body.light-mode .board-stage .featured-name {
    color: #fff7df;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

body.light-mode .board-stage .featured-price {
    color: #C9A84C !important;
}

body.light-mode .service-badge-kicker {
    color: rgba(138, 109, 46, 0.8);
}

body.light-mode .service-badge-title {
    color: rgba(59, 50, 37, 0.92);
}

body.light-mode .service-value-count {
    color: rgba(59, 50, 37, 0.62);
}

body.light-mode .service-value-amount {
    text-shadow: 0 1px 2px rgba(138, 109, 46, 0.25);
}

body.light-mode .board-frame .ops-value {
    color: rgba(122, 95, 44, 0.72);
    text-shadow: none;
}

body.light-mode .board-frame .ops-card.is-lead .ops-value {
    color: var(--gold-accent);
    text-shadow: none;
}

body.light-mode .board-frame .ops-label {
    color: rgba(59, 50, 37, 0.62);
}

body.light-mode .board-frame .ops-card.is-lead .ops-label {
    color: rgba(59, 50, 37, 0.84);
}

body.light-mode .board-heatline .heatline-sub {
    color: rgba(59, 50, 37, 0.5);
}

body.light-mode .board-heatline .heatmap-track {
    background: rgba(61, 14, 30, 0.1);
}

body.light-mode .board-heatline .heatmap-percent {
    color: #8A6D2E;
    text-shadow: none;
}

body .home-insights.home-board {
    --board-radius: 16px;
    --board-pad-x: 0.8rem;
}

body .board-tabs {
    gap: 0.18rem;
    padding: 0 0.4rem;
}

body .board-tabs .filter-pill {
    height: 36px;
    font-size: clamp(0.5rem, 2.6vw, 0.62rem);
    letter-spacing: 0.08em;
    padding: 0 0.15rem;
}

body .board-tabs .filter-pill.active {
    letter-spacing: 0.09em;
}

body .board-tabs .filter-pill::before {
    left: 12%;
    right: 12%;
}

body .board-service-row {
    padding: 0.75rem var(--board-pad-x) 0.25rem;
}

body .service-value-amount {
    font-size: clamp(1.6rem, 8.2vw, 2rem);
}

body .board-frame .ops-value {
    font-size: clamp(1.25rem, 6.8vw, 1.55rem);
}

body .board-heatline {
    padding: 0.6rem 0 0.8rem;
    gap: 0.55rem;
}

body .board-heatline .heatmap-percent {
    font-size: 0.78rem;
    min-width: 38px;
}

@media (prefers-reduced-motion: reduce) {

    body .board-frame::before,
    body .board-tabs .filter-pill::before {
        animation: none !important;
        transition: none !important;
    }
}

body .app-shell::before {
    border: 1px solid rgba(140, 60, 80, 0.26);
    background:
        linear-gradient(180deg, rgba(245, 237, 224, 0.055), transparent 64%),
        radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, 0.055), transparent 56%);
    box-shadow:
        var(--shadow-glass),
        inset 0 0 0 1px rgba(212, 175, 55, 0.05);
}

body.light-mode .app-shell::before {
    border-color: rgba(140, 60, 80, 0.30);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.50), transparent 64%),
        radial-gradient(ellipse at 50% 0%, rgba(184, 150, 62, 0.07), transparent 56%);
    box-shadow:
        var(--shadow-glass),
        inset 0 0 0 1px rgba(138, 109, 46, 0.08);
}

body .app-shell::after {
    content: '';
    position: absolute;
    top: -17px;
    left: 50%;
    transform: translateX(-50%);
    width: min(58%, 320px);
    height: 2px;
    border-radius: 999px;
    background: var(--gold-foil);
    background-size: 220% auto;
    background-position: 0% center;
    animation: foilSweep 8.5s linear infinite;
    box-shadow: 0 0 14px rgba(212, 175, 55, 0.38);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
    pointer-events: none;
    z-index: -1;
}

body.light-mode .app-shell::after {
    box-shadow: 0 0 10px rgba(138, 109, 46, 0.26);
}

body header::before {
    content: 'Carta de Vinos Premium';
    display: block;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.56rem;
    font-weight: 600;
    letter-spacing: 0.42em;
    text-indent: 0.42em;
    text-transform: uppercase;
    color: rgba(212, 175, 55, 0.60);
    text-shadow: none;
    margin-bottom: 0.55rem;
}

body.light-mode header::before {
    color: rgba(138, 109, 46, 0.78);
}

body header::after {
    content: '';
    display: block;
    width: min(64%, 300px);
    height: 5px;
    margin: 0.6rem auto 0;
    background:
        radial-gradient(circle at 50% 50%, var(--gold-light) 0 1.4px, transparent 2.6px),
        linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.55) 24%, rgba(212, 175, 55, 0.55) 76%, transparent);
    background-repeat: no-repeat;
    background-size: 100% 100%, 100% 1px;
    background-position: center, center;
}

body.light-mode header::after {
    background:
        radial-gradient(circle at 50% 50%, var(--gold-accent) 0 1.4px, transparent 2.6px),
        linear-gradient(90deg, transparent, rgba(138, 109, 46, 0.48) 24%, rgba(138, 109, 46, 0.48) 76%, transparent);
    background-repeat: no-repeat;
    background-size: 100% 100%, 100% 1px;
    background-position: center, center;
}

body .cava-text {
    background: var(--gold-foil);
    background-size: 220% auto;
    background-position: 0% center;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    text-shadow: none;
    animation: foilSweep 9.5s linear infinite;
}

body.light-mode .cava-text {
    background: var(--gold-foil-soft);
    -webkit-background-clip: text;
    background-clip: text;
    animation: none;
}

body .app-shell>header {
    animation: premiumRevealUp 0.62s var(--motion-ease-premium) 0.10s both;
}

body .app-shell>.search-container {
    animation: premiumRevealUp 0.62s var(--motion-ease-premium) 0.20s both;
}

body .app-shell>.home-insights {
    animation: premiumRevealUp 0.62s var(--motion-ease-premium) 0.30s both;
}

body header::before {
    font-size: 0.50rem;
    letter-spacing: 0.34em;
    text-indent: 0.34em;
}

body .app-shell::after {
    width: 66%;
}

@media (prefers-reduced-motion: reduce) {

    body .app-shell::after,
    body .cava-text,
    body .app-shell>header,
    body .app-shell>.search-container,
    body .app-shell>.home-insights {
        animation: none !important;
    }
}

/* ── Stock tab · Editorial redesign ─────────────────────────────────────── */

/* 1. Tab-intro sem box — header tipográfico com hairline de foil */
body #wineModal #modalPanelStock .modal-tab-intro {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    padding: 0 0 0.62rem;
    border-bottom: 1px solid var(--board-hairline, rgba(212, 175, 55, 0.16));
}

/* 2. Cards de estabelecimento — grid redesenhado */
body #wineModal .est-mobile-item {
    grid-template-columns: repeat(3, 1fr) !important;
    grid-template-areas:
        "name name name"
        "pvp  stock alert"
        "loc  loc   loc" !important;
    gap: 0.38rem !important;
    padding: 0.52rem 0.52rem 0.46rem !important;
    min-height: auto !important;
    overflow: visible !important;
}

/* Nome do estabelecimento: kicker mono + losango + hairline de foil */
body #wineModal .est-mobile-name {
    grid-area: name;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0 0.44rem;
    margin-bottom: 0.12rem;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    border-bottom: 1px solid rgba(212, 175, 55, 0.14) !important;
    box-shadow: none !important;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-align: left;
    justify-content: flex-start;
}

body #wineModal .est-mobile-name::before {
    content: '';
    flex: 0 0 auto;
    width: 5px;
    height: 5px;
    transform: rotate(45deg);
    background: var(--gold-foil);
    background-size: 200% auto;
    border-radius: 1px;
    box-shadow: 0 0 5px rgba(212, 175, 85, 0.35);
}

body #wineModal .est-mobile-name::after {
    content: '';
    flex: 1 1 auto;
    height: 1px;
    background: var(--gold-foil);
    background-size: 200% auto;
    opacity: 0.45;
    -webkit-mask-image: linear-gradient(90deg, #000, #000 55%, transparent);
    mask-image: linear-gradient(90deg, #000, #000 55%, transparent);
}

/* Grid-areas dos campos de cada card */
body #wineModal .est-mobile-field--pvp {
    grid-area: pvp;
}

body #wineModal .est-mobile-field--stock {
    grid-area: stock;
}

body #wineModal .est-mobile-field--alert {
    grid-area: alert;
}

body #wineModal .est-mobile-field--location {
    grid-area: loc;
}

/* Labels dos campos em mono */
body #wineModal .est-mobile-field-label {
    font-family: var(--font-mono);
    letter-spacing: 0.14em;
}

/* 3. Internal-order-kicker — mono + losango + filete de foil */
body #wineModal .internal-order-kicker {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 0.14rem;
}

body #wineModal .internal-order-kicker::before {
    content: '';
    flex: 0 0 auto;
    width: 5px;
    height: 5px;
    transform: rotate(45deg);
    background: var(--gold-foil);
    background-size: 200% auto;
    border-radius: 1px;
    box-shadow: 0 0 5px rgba(212, 175, 85, 0.35);
}

body #wineModal .internal-order-kicker::after {
    content: '';
    flex: 1 1 auto;
    height: 1px;
    background: var(--gold-foil);
    background-size: 200% auto;
    opacity: 0.45;
    -webkit-mask-image: linear-gradient(90deg, #000, #000 55%, transparent);
    mask-image: linear-gradient(90deg, #000, #000 55%, transparent);
}

/* 4. Edit-section-title — mono (consistência) */
body #wineModal .edit-section-title {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    font-weight: 500;
}

/* ============================================================
   ABA MÉTRICAS — EDITORIAL
   De-greening total + numerais Playfair + kicker de foil.
   Classes .metric- e .metrics- são exclusivas desta aba;
   intro escopado a #modalPanelMetrics. Sem ripple, sem !important.
   ============================================================ */

/* 1. Tab-intro → header tipográfico (paridade com Stock) */
body #wineModal #modalPanelMetrics .modal-tab-intro {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    padding: 0 0 0.62rem;
    border-bottom: 1px solid var(--board-hairline, rgba(212, 175, 55, 0.16));
}

/* 2. KPI tiles → um único card-livro de linhas (label · numeral)
   O grid vira a moldura; cada .metric-card vira uma linha com filete de
   foil entre elas. O .metrics-sales-card (irmão, grid-column 1/-1) fica
   intacto: as regras de linha são excluídas dele por :not(). */
body #wineModal #modalMetricsGrid.metrics-grid {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0.2rem 0.86rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: var(--surface-glass-soft);
    box-shadow: var(--field-shadow);
}

body #wineModal #modalMetricsGrid > .metric-card {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.9rem;
    padding: 0.62rem 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body #wineModal #modalMetricsGrid > .metric-card + .metric-card {
    border-top: 1px solid var(--board-hairline, rgba(212, 175, 55, 0.16)) !important;
}

body #wineModal #modalMetricsGrid > .metric-card .metric-label {
    margin-bottom: 0;
    font-family: var(--font-mono);
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0.14em;
}

body #wineModal #modalMetricsGrid > .metric-card .metric-value {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.22rem;
    line-height: 1;
    letter-spacing: 0.01em;
    text-align: right;
    white-space: nowrap;
}

/* O card de vendas vira a "seção gráfico" da mesma superfície: perde a
   caixa própria e se separa das linhas de KPI por um filete de foil. */
body #wineModal #modalMetricsGrid > .metrics-sales-card {
    margin: 0.2rem -0.86rem 0;
    padding: 0.86rem 0.86rem 0;
    border: 0;
    border-top: 1px solid var(--board-hairline, rgba(212, 175, 55, 0.16));
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

/* 3. Sales card → de-green + kicker editorial */
body #wineModal .metrics-sales-card {
    border-color: var(--glass-border);
    background:
        radial-gradient(circle at 14% 8%, rgba(212, 175, 85, 0.10), transparent 38%),
        var(--surface-glass-soft);
    box-shadow: var(--field-shadow);
}

body #wineModal .metrics-sales-title {
    display: inline-flex;
    align-items: center;
    gap: 0.44rem;
    color: var(--gold-accent);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.2em;
}

body #wineModal .metrics-sales-title::before {
    content: '';
    width: 5px;
    height: 5px;
    transform: rotate(45deg);
    background: var(--gold-foil);
    background-size: 200% auto;
    border-radius: 1px;
    box-shadow: 0 0 5px rgba(212, 175, 85, 0.35);
}

body #wineModal .metrics-sales-subtitle {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.12rem;
    letter-spacing: 0.01em;
}

body #wineModal .metrics-sales-period {
    font-family: var(--font-mono);
    letter-spacing: 0.1em;
}

body #wineModal .metrics-sales-bar {
    border-color: rgba(212, 175, 55, 0.22);
}

body #wineModal .metrics-sales-fill.sold {
    background: var(--gold-foil);
    background-size: 200% auto;
    box-shadow: none;
}

body #wineModal .metrics-sales-fill.remaining {
    background: rgba(140, 60, 80, 0.18);
}

body #wineModal .metrics-sales-dot.sold {
    background: var(--gold-foil);
    background-size: 200% auto;
    box-shadow: none;
}

body #wineModal .metrics-sales-dot.remaining {
    background: transparent;
    box-shadow: inset 0 0 0 1.5px rgba(212, 175, 55, 0.5);
}

/* sparkline 7 dias → colunas de foil sob hairline de foil */
body #wineModal .metrics-day-bars {
    border-top-color: var(--board-hairline, rgba(212, 175, 55, 0.16));
}

body #wineModal .metrics-day-bar {
    font-family: var(--font-mono);
}

body #wineModal .metrics-day-bar span:first-child {
    background: var(--gold-foil);
    background-size: 200% auto;
    box-shadow: none;
    opacity: 0.92;
}

/* ============================================================
   RESUMEN — CARDS ÚNICOS (details · terroir · alternativas)
   Mesmo princípio da aba Métricas: o grid/lista vira UMA moldura
   glass e cada filho vira uma linha separada por filete de foil.
   Os boxes perdem caixa própria; precisam de !important para vencer
   a camada polish (body .detail-box/.terroir-box/.alt-item-btn).
   ============================================================ */

/* --- moldura comum dos três cards --- */
body #wineModal .details-grid,
body #wineModal .terroir-grid,
body #wineModal .alt-list {
    grid-template-columns: 1fr;
    gap: 0;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: var(--surface-glass-soft);
    box-shadow: var(--field-shadow);
    overflow: hidden;
}

body #wineModal .details-grid,
body #wineModal .terroir-grid {
    padding: 0.2rem 0.86rem;
}

body #wineModal .alt-list {
    padding: 0.1rem 0.72rem;
}

/* 1. DETAILS → linhas label (mono, esq.) · valor (Playfair, dir.) */
body #wineModal .details-grid > .detail-box {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.9rem;
    text-align: left !important;
    padding: 0.6rem 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body #wineModal .details-grid > .detail-box + .detail-box {
    border-top: 1px solid var(--board-hairline, rgba(212, 175, 55, 0.16)) !important;
}

body #wineModal .details-grid > .detail-box .detail-label {
    flex: 0 0 auto;
    margin-bottom: 0;
}

body #wineModal .details-grid > .detail-box .detail-value {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 1.02rem;
    line-height: 1.12;
    text-align: right;
}

/* 2. TERROIR → linhas com rótulo em coluna fixa + texto descritivo */
body #wineModal .terroir-grid > .terroir-box {
    display: grid;
    grid-template-columns: 3.6rem 1fr;
    align-items: baseline;
    gap: 0.9rem;
    text-align: left !important;
    padding: 0.62rem 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body #wineModal .terroir-grid > .terroir-box + .terroir-box {
    border-top: 1px solid var(--board-hairline, rgba(212, 175, 55, 0.16)) !important;
}

body #wineModal .terroir-grid > .terroir-box .detail-label {
    margin-bottom: 0;
}

/* 3. ALTERNATIVAS → cada vinho vira uma linha (foto + título + meta) */
body #wineModal .alt-list > .alt-item-btn {
    padding: 0.6rem 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body #wineModal .alt-list > .alt-item-btn + .alt-item-btn {
    border-top: 1px solid var(--board-hairline, rgba(212, 175, 55, 0.16)) !important;
}

body #wineModal .alt-list > .alt-item-btn:hover {
    transform: none;
    border-color: transparent !important;
    background: rgba(212, 175, 85, 0.07) !important;
}

/* ─────────────────────────────────────────────────────────────────────────
   Topbar + menu de usuario · Editorial de Luxo redesign
   Drawer = masthead editorial + indice de gestion + linha de tema.
   CSS-only, mobile-first. Comportamento preservado no JS (open/close,
   avatar/nome/role, gating por permissao, canvas do tema).
   ───────────────────────────────────────────────────────────────────────── */

/* Hamburguer: plate harmonizado com aresta de foil ----------------------- */
body .session-user-card {
    position: relative;
    border-color: rgba(212, 175, 55, 0.34) !important;
}
body .session-user-card::after {
    content: '';
    position: absolute;
    left: 8px;
    right: 8px;
    top: 3px;
    height: 1.5px;
    border-radius: 2px;
    background: var(--gold-foil);
    opacity: 0.45;
    pointer-events: none;
}

/* Drawer: token local de filete + assinatura de foil no topo ------------- */
body .user-menu-panel {
    --menu-filete: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.24) 16%, rgba(212, 175, 55, 0.1) 82%, transparent);
    padding: 2.45rem 1.15rem 1.5rem !important;
    gap: 0.6rem !important;
}
body .user-menu-panel::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background: var(--gold-foil);
    opacity: 0.92;
    pointer-events: none;
}

/* Masthead: medalhao de foil + nome Playfair + role como kicker ---------- */
body .user-menu-panel .menu-profile-header {
    gap: 13px;
    padding-bottom: 0.7rem;
    margin-bottom: 0;
}
body .user-menu-panel .menu-divider {
    display: none;
}
body .menu-profile-avatar {
    position: relative;
    border: 0;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 32%, rgba(140, 60, 80, 0.55), rgba(18, 6, 11, 0.92));
    color: var(--gold-light);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.14rem;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
body .menu-profile-avatar::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    padding: 1.5px;
    background: var(--gold-foil);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}
body .user-menu-panel .menu-profile-name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.06rem;
    letter-spacing: 0.01em;
    line-height: 1.12;
    margin-bottom: 4px;
    color: var(--text-main);
}

/* Kicker editorial: mono + losango de foil + filete que atravessa -------- */
body .user-menu-panel .menu-section-label,
body .user-menu-panel .menu-profile-role {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gold-accent);
    white-space: nowrap;
    overflow: hidden;
}
body .user-menu-panel .menu-section-label {
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    margin: 0.15rem 0 0.05rem;
}
body .user-menu-panel .menu-profile-role {
    font-size: 0.56rem;
    letter-spacing: 0.16em;
}
body .user-menu-panel .menu-section-label::before,
body .user-menu-panel .menu-profile-role::before {
    content: '';
    flex: 0 0 auto;
    width: 6px;
    height: 6px;
    transform: rotate(45deg);
    background: var(--gold-foil);
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.4);
}
body .user-menu-panel .menu-section-label::after,
body .user-menu-panel .menu-profile-role::after {
    content: '';
    flex: 1 1 10px;
    min-width: 10px;
    height: 1px;
    background: var(--menu-filete);
}

/* Indice de gestion: moldura unica, cada linha com seu proprio filete ---- */
body .user-menu-panel .menu-actions {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    background: var(--surface-glass-soft);
    box-shadow: var(--field-shadow);
    overflow: hidden;
}
body .user-menu-panel .menu-actions .admin-btn {
    position: relative;
    width: 100%;
    min-height: 47px;
    margin: 0;
    padding: 0 0.95rem;
    gap: 0.62rem;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--text-main) !important;
    font-family: var(--font-ui) !important;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.035em;
}
body .user-menu-panel .menu-actions .admin-btn::before {
    width: 1.2rem;
    min-width: 1.2rem;
    height: auto;
    flex: 0 0 auto;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--gold-light) !important;
    font-size: 0.95rem !important;
    line-height: 1;
    text-align: center;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.18);
    transition: color 0.2s ease, text-shadow 0.2s ease;
}
body .user-menu-panel .menu-actions .admin-btn::after {
    content: '';
    position: absolute;
    left: 0.95rem;
    right: 0.7rem;
    bottom: 0;
    height: 1px;
    background: var(--menu-filete);
    pointer-events: none;
}
body .user-menu-panel .menu-actions .admin-btn:last-child::after {
    opacity: 0;
}
body .user-menu-panel .menu-actions .admin-btn:hover {
    background: rgba(212, 175, 55, 0.07) !important;
    transform: none !important;
    box-shadow: none !important;
}
body .user-menu-panel .menu-actions .admin-btn:hover::before {
    color: #f4e9c8 !important;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}
body .user-menu-panel .menu-actions .admin-btn:active {
    transform: none !important;
}
body .user-menu-panel .menu-actions .service-mode-btn.service-active {
    background: rgba(212, 175, 55, 0.15) !important;
    color: var(--gold-light) !important;
}
body .user-menu-panel .menu-actions .service-mode-btn.service-active::before {
    color: #f4e9c8 !important;
}

/* Linha de tema: kicker mono em cima, valor embaixo; toggle com aro foil - */
body .user-menu-panel .menu-theme-row {
    margin-top: 0.05rem;
    padding: 10px 12px !important;
    border-radius: 14px !important;
    border: 1px solid var(--glass-border) !important;
    background: var(--surface-glass-soft) !important;
    box-shadow: var(--field-shadow) !important;
}
body .user-menu-panel .menu-theme-subtitle {
    order: 1;
    margin-bottom: 2px;
    font-family: var(--font-mono);
    font-size: 0.54rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--gold-accent);
}
body .user-menu-panel .menu-theme-title {
    order: 2;
    font-family: var(--font-ui);
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 0.01em;
    color: var(--text-main);
}
body .user-menu-panel .theme-toggle {
    border: 1px solid rgba(212, 175, 55, 0.3) !important;
    background: rgba(18, 6, 11, 0.4) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
    border-radius: 999px !important;
}

/* Push 3D mantido — dim harmonizado para tom vinico + halo burgundy ------ */
body.menu-open-body .app-shell {
    filter: brightness(0.58) saturate(1.06);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(212, 175, 55, 0.1),
        -44px 0 90px -34px rgba(61, 14, 30, 0.62) !important;
}
body.menu-open-body .premium-topbar {
    filter: brightness(0.5) saturate(1.06);
}

/* Light mode — espelha o editorial em creme/vinho ----------------------- */
body.light-mode .user-menu-panel {
    --menu-filete: linear-gradient(90deg, transparent, rgba(138, 109, 46, 0.34) 16%, rgba(138, 109, 46, 0.12) 82%, transparent);
}
body.light-mode .menu-profile-avatar {
    background: radial-gradient(circle at 50% 32%, rgba(140, 60, 80, 0.16), rgba(247, 239, 226, 0.95));
    color: var(--gold-accent);
}
body.light-mode .user-menu-panel .menu-actions .admin-btn::before {
    color: var(--gold-accent) !important;
    text-shadow: none;
}
body.light-mode .user-menu-panel .menu-actions .admin-btn:hover::before {
    color: #6e5320 !important;
}
body.light-mode .user-menu-panel .theme-toggle {
    border-color: rgba(140, 60, 80, 0.28) !important;
    background: rgba(255, 253, 247, 0.6) !important;
}