/* =========================================================
   RYVIA 3D
   Main styles
   ========================================================= */


/* =========================================================
   1. VARIABLES
   ========================================================= */

:root {
    --bg: #07110a;
    --bg2: #0a1710;

    --panel: #0d1c12;
    --panel2: #102418;

    --line: rgba(255, 255, 255, 0.08);

    --text: #f4fff6;
    --muted: rgba(244, 255, 246, 0.52);

    --green: #b8ff3c;
    --green2: #52d273;
    --green3: #1c8f50;

    --danger: #ff6b6b;

    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);

    --radius: 24px;
}


/* =========================================================
   2. GLOBAL
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    min-height: 100vh;
    overflow-x: hidden;

    background:
        radial-gradient(
            circle at 75% 5%,
            rgba(91, 255, 118, 0.09),
            transparent 25%
        ),
        linear-gradient(
            180deg,
            #07110a 0%,
            #08130b 55%,
            #061008 100%
        );

    color: var(--text);

    font-family:
        Nunito,
        system-ui,
        sans-serif;
}

button,
input,
select,
textarea {
    font: inherit;
}

.hidden {
    display: none !important;
}

.shell {
    width: min(1400px, calc(100% - 40px));
    margin: auto;
}

.page-shell {
    padding: 48px 0 90px;
}

.accent {
    color: var(--green);
}

.muted {
    color: rgba(255, 255, 255, 0.28);
}


/* =========================================================
   3. BACKGROUND AMBIENT LIGHTS
   ========================================================= */

.ambient {
    position: fixed;

    border-radius: 50%;

    filter: blur(100px);

    pointer-events: none;

    z-index: -1;
}

.ambient-a {
    width: 420px;
    height: 420px;

    top: 10%;
    right: -120px;

    background: rgba(84, 255, 94, 0.06);
}

.ambient-b {
    width: 300px;
    height: 300px;

    bottom: 10%;
    left: -120px;

    background: rgba(0, 255, 186, 0.04);
}


/* =========================================================
   4. HEADER / NAVIGATION
   ========================================================= */

.topbar {
    position: sticky;

    top: 0;

    z-index: 50;

    background: rgba(7, 17, 10, 0.82);

    backdrop-filter: blur(18px);

    border-bottom: 1px solid var(--line);
}

.nav-row {
    height: 68px;

    display: flex;
    align-items: center;

    gap: 24px;
}


/* Logo */

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 0;
    background: none;
    color: white;
    font-family: "Exo 2";
    cursor: pointer;
    text-align: left;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 12px;
    filter: drop-shadow(0 8px 18px rgba(184, 255, 60, 0.12));
}

.brand-mark img {
    width: 100%;
    height: 100%;
    display: block;
}

.brand-copy {
    display: grid;
    gap: 1px;
    line-height: 1;
}

.brand-name {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.brand-tagline {
    color: var(--muted);
    font-family: "Nunito";
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    white-space: nowrap;
}


/* Desktop navigation */

.desktop-nav {
    display: flex;
    gap: 6px;
}

.nav-link,
.btn {
    border: 1px solid transparent;
    border-radius: 13px;

    cursor: pointer;

    transition: 0.22s ease;
}

.nav-link {
    padding: 10px 14px;

    background: transparent;

    color: rgba(255, 255, 255, 0.45);

    font-weight: 700;
}

.nav-link:hover,
.nav-link.is-active {
    background: rgba(184, 255, 60, 0.08);

    color: var(--green);

    border-color: rgba(184, 255, 60, 0.16);
}


/* Right-side navigation buttons */

.nav-actions {
    margin-left: auto;

    display: flex;
    align-items: center;

    gap: 8px;
}


/* =========================================================
   LANGUAGE SELECTOR
   ========================================================= */

.language-menu {
    position: relative;
}


/* Main language button */

.language-button {
    min-width: 92px;

    display: flex;
    align-items: center;

    gap: 9px;

    padding: 8px 11px;

    border: 1px solid var(--line);
    border-radius: 13px;

    background: rgba(255, 255, 255, 0.035);

    color: rgba(255, 255, 255, 0.78);

    font-size: 12px;
    font-weight: 800;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.language-button:hover {
    background: rgba(255, 255, 255, 0.07);

    border-color: rgba(184, 255, 60, 0.22);

    color: white;
}

.language-chevron {
    margin-left: auto;

    color: rgba(255, 255, 255, 0.35);

    font-size: 10px;

    transition: transform 0.2s ease;
}

.language-button.is-open .language-chevron {
    transform: rotate(180deg);
}


/* Dropdown */

.language-dropdown {
    position: absolute;

    top: calc(100% + 10px);
    right: 0;

    z-index: 100;

    width: 190px;

    padding: 7px;

    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;

    background: rgba(10, 23, 16, 0.97);

    backdrop-filter: blur(18px);

    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.45);

    animation: languageMenuIn 0.18s ease;
}

@keyframes languageMenuIn {
    from {
        opacity: 0;

        transform:
            translateY(-5px)
            scale(0.98);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }
}


/* Language item */

.language-option {
    width: 100%;

    display: grid;

    grid-template-columns: 27px 1fr auto;

    align-items: center;

    gap: 10px;

    padding: 10px;

    border: 1px solid transparent;
    border-radius: 11px;

    background: transparent;

    color: rgba(255, 255, 255, 0.65);

    text-align: left;

    cursor: pointer;

    transition:
        background 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease;
}

.language-option:hover {
    background: rgba(255, 255, 255, 0.055);

    color: white;
}

.language-option.is-active {
    border-color: rgba(184, 255, 60, 0.14);

    background: rgba(184, 255, 60, 0.08);

    color: var(--green);
}

.language-option small {
    color: rgba(255, 255, 255, 0.25);

    font-size: 9px;
    font-weight: 800;
}


/* =========================================================
   FLAGS
   ========================================================= */

.flag {
    width: 25px;
    height: 17px;

    position: relative;
    display: inline-block;
    flex-shrink: 0;

    overflow: hidden;
    border-radius: 4px;

    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.14),
        0 2px 6px rgba(0, 0, 0, 0.22);

    background: transparent;
}

.flag::before {
    content: "";

    position: absolute;
    inset: -1px;

    border-radius: inherit;
}


/* Russia */

.flag-ru::before {
    background: linear-gradient(
        to bottom,
        #ffffff 0%,
        #ffffff 33.34%,
        #0c47b7 33.34%,
        #0c47b7 66.67%,
        #d52b1e 66.67%,
        #d52b1e 100%
    );
}


/* Estonia */

.flag-est::before {
    background: linear-gradient(
        to bottom,
        #0072ce 0%,
        #0072ce 33.34%,
        #111111 33.34%,
        #111111 66.67%,
        #ffffff 66.67%,
        #ffffff 100%
    );
}


/* England */

.flag-eng::before {
    background:
        linear-gradient(
            to right,
            transparent 0%,
            transparent 39%,
            #ce1126 39%,
            #ce1126 61%,
            transparent 61%,
            transparent 100%
        ),
        linear-gradient(
            to bottom,
            transparent 0%,
            transparent 39%,
            #ce1126 39%,
            #ce1126 61%,
            transparent 61%,
            transparent 100%
        ),
        #ffffff;
}


/* =========================================================
   5. BUTTONS
   ========================================================= */

.btn {
    padding: 10px 15px;

    font-weight: 800;
}

.btn-primary {
    background: var(--green);

    color: #0c1b0e;

    box-shadow: 0 10px 30px rgba(184, 255, 60, 0.12);
}

.btn-primary:hover {
    transform: translateY(-1px);

    background: #cbff6d;

    box-shadow: 0 14px 36px rgba(184, 255, 60, 0.18);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.03);

    border-color: var(--line);

    color: rgba(255, 255, 255, 0.68);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.07);

    color: white;
}

.btn-large {
    padding: 15px 21px;
}

.full {
    width: 100%;
}


/* =========================================================
   6. PAGE VIEWS
   ========================================================= */

.view {
    display: none;
}

.view.is-visible {
    display: block;

    animation: pageIn 0.35s ease;
}

@keyframes pageIn {
    from {
        opacity: 0;

        transform: translateY(8px);
    }

    to {
        opacity: 1;

        transform: none;
    }
}


/* =========================================================
   7. HERO SECTION
   ========================================================= */

.hero {
    min-height: 560px;

    display: grid;

    grid-template-columns: 1.05fr 0.95fr;

    align-items: center;

    gap: 52px;
}

.eyebrow,
.section-kicker {
    font-family: "Exo 2";

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 0.16em;

    color: var(--green);
}

.eyebrow {
    margin-bottom: 20px;

    display: flex;
    align-items: center;

    gap: 8px;
}


/* Green pulse indicator */

.pulse-dot,
.online-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--green);

    box-shadow: 0 0 0 0 rgba(184, 255, 60, 0.5);

    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    70% {
        box-shadow: 0 0 0 10px rgba(184, 255, 60, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(184, 255, 60, 0);
    }
}


h1,
h2,
h3,
strong {
    font-family: "Exo 2", sans-serif;
}

.hero h1 {
    max-width: 800px;

    margin: 0 0 24px;

    font-size: clamp(46px, 6vw, 82px);

    line-height: 0.98;
}

.hero p {
    max-width: 680px;

    font-size: 19px;

    line-height: 1.65;

    color: var(--muted);
}

.hero-actions {
    display: flex;

    gap: 10px;

    margin: 30px 0;
}


/* Hero statistics */

.trust-row {
    display: flex;
    flex-wrap: wrap;

    gap: 28px;

    margin-top: 30px;
}

.trust-row div {
    display: flex;
    flex-direction: column;
}

.trust-row strong {
    color: white;

    font-size: 15px;
}

.trust-row span {
    margin-top: 3px;

    color: rgba(255, 255, 255, 0.35);

    font-size: 12px;
}


/* Hero image */

.hero-visual {
    position: relative;

    perspective: 1100px;
}

.hero-image-card {
    position: relative;

    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;

    box-shadow: var(--shadow);

    transform:
        rotateY(-5deg)
        rotateX(2deg);

    transition: transform 0.35s ease;
}

.hero-image-card:hover {
    transform:
        rotateY(0)
        rotateX(0)
        translateY(-4px);
}

.hero-image-card img {
    display: block;

    width: 100%;
    height: 500px;

    object-fit: cover;

    filter:
        saturate(0.7)
        contrast(1.08)
        brightness(0.78);
}

.image-overlay {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    padding: 60px 28px 28px;

    display: flex;
    flex-direction: column;

    gap: 8px;

    background: linear-gradient(
        transparent,
        rgba(4, 13, 7, 0.95)
    );
}

.mini-badge {
    align-self: flex-start;

    padding: 5px 8px;

    border: 1px solid rgba(184, 255, 60, 0.3);
    border-radius: 999px;

    background: rgba(7, 17, 10, 0.55);

    color: var(--green);

    font-size: 10px;

    letter-spacing: 0.13em;
}


/* Hero scanner */

.scanner-line {
    position: absolute;

    left: 8%;
    right: 8%;

    height: 1px;

    background: linear-gradient(
        90deg,
        transparent,
        var(--green),
        transparent
    );

    box-shadow: 0 0 18px var(--green);

    pointer-events: none;

    animation: scan 4s ease-in-out infinite;
}

@keyframes scan {
    0%,
    100% {
        top: 15%;

        opacity: 0.1;
    }

    50% {
        top: 80%;

        opacity: 0.9;
    }
}


/* =========================================================
   8. FEATURES
   ========================================================= */

.feature-strip {
    margin: 25px 0 90px;

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 14px;
}

.feature-strip article {
    display: flex;

    gap: 13px;

    padding: 22px;

    border: 1px solid var(--line);
    border-radius: 18px;

    background: rgba(255, 255, 255, 0.025);
}

.feature-strip small {
    display: block;

    margin-top: 4px;

    color: var(--muted);
}

.feature-icon {
    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    border-radius: 12px;

    background: rgba(184, 255, 60, 0.08);

    color: var(--green);
}


/* =========================================================
   9. GENERAL SECTIONS
   ========================================================= */

.section {
    margin: 95px 0;
}

.section-heading {
    margin-bottom: 26px;

    display: flex;

    align-items: end;
    justify-content: space-between;

    gap: 40px;
}

.section-heading.compact {
    align-items: center;
}

.section-heading h1,
.section-heading h2 {
    margin: 8px 0 0;

    font-size: clamp(30px, 4vw, 48px);
}

.section-heading p {
    max-width: 560px;

    line-height: 1.65;

    color: var(--muted);
}


/* =========================================================
   10. CATEGORY CARDS
   ========================================================= */

.category-grid {
    display: grid;

    grid-template-columns: repeat(5, 1fr);

    gap: 14px;
}

.category-card {
    position: relative;

    overflow: hidden;

    min-height: 235px;

    padding: 22px;

    border: 1px solid var(--line);
    border-radius: 20px;

    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.035),
        rgba(255, 255, 255, 0.018)
    );

    color: white;

    text-align: left;

    cursor: pointer;

    transition: 0.25s ease;
}

.category-card::before {
    content: "";

    position: absolute;

    inset: auto -30% -70% 20%;

    height: 170px;

    background: radial-gradient(
        circle,
        rgba(84, 255, 94, 0.16),
        transparent 65%
    );

    transition: 0.25s;
}

.category-card:hover {
    transform: translateY(-7px);

    border-color: rgba(184, 255, 60, 0.28);

    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.category-card:hover::before {
    transform: scale(1.4);
}

.category-icon {
    position: relative;

    width: 58px;
    height: 58px;

    margin-bottom: 34px;

    display: grid;
    place-items: center;

    overflow: hidden;

    border: 1px solid rgba(203, 255, 93, 0.72);
    border-radius: 17px;

    background:
        radial-gradient(
            circle at 30% 18%,
            rgba(255, 255, 255, 0.36),
            transparent 34%
        ),
        linear-gradient(
            145deg,
            #c7ff38 0%,
            #9aea37 48%,
            #4cb851 100%
        );

    color: #07140c;

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.38),
        inset 0 -8px 18px rgba(8, 61, 24, 0.18),
        0 0 0 2px rgba(6, 20, 11, 0.46),
        0 10px 24px rgba(91, 224, 91, 0.18);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        filter 0.25s ease;
}

.category-icon::before {
    content: "";

    position: absolute;
    inset: 2px;

    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;

    pointer-events: none;
}

.category-icon::after {
    content: "";

    position: absolute;
    top: -18%;
    left: -15%;

    width: 80%;
    height: 48%;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.16);
    filter: blur(10px);
    transform: rotate(-14deg);

    pointer-events: none;
}

.category-icon-svg {
    position: relative;
    z-index: 1;

    width: 35px;
    height: 35px;

    display: block;

    color: #07140c;

    filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.12));

    transition: transform 0.25s ease;
}

.category-icon-cut {
    fill: none;
    stroke: rgba(183, 255, 72, 0.72);
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.category-icon-hole {
    fill: #9fea3d;
}

.category-card:hover .category-icon {
    transform: translateY(-2px) scale(1.045);

    filter: saturate(1.06) brightness(1.04);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.42),
        inset 0 -8px 18px rgba(8, 61, 24, 0.16),
        0 0 0 2px rgba(6, 20, 11, 0.50),
        0 13px 30px rgba(119, 255, 81, 0.25);
}

.category-card:hover .category-icon-svg {
    transform: scale(1.04);
}

.category-card h3 {
    margin: 0 0 9px;

    font-size: 17px;
}

.category-card p {
    margin: 0;

    color: var(--muted);

    font-size: 13px;

    line-height: 1.5;
}

.category-arrow {
    position: absolute;

    top: 20px;
    right: 20px;

    color: rgba(255, 255, 255, 0.25);
}


/* =========================================================
   11. INTERACTIVE 3D LAB
   ========================================================= */

.interactive-lab {
    display: grid;
    grid-template-columns: 0.82fr 1.18fr;
    align-items: stretch;
    gap: 42px;

    padding: 36px;
    overflow: hidden;

    border: 1px solid rgba(184, 255, 60, 0.14);
    border-radius: 30px;

    background:
        radial-gradient(
            circle at 12% 48%,
            rgba(184, 255, 60, 0.055),
            transparent 38%
        ),
        linear-gradient(
            135deg,
            rgba(184, 255, 60, 0.04),
            rgba(255, 255, 255, 0.018)
        );
}

.lab-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.lab-copy h2 {
    margin: 9px 0 12px;
    max-width: 620px;
    font-size: clamp(34px, 3.3vw, 50px);
    line-height: 1.08;
}

.lab-copy > p {
    max-width: 610px;
    margin: 0 0 25px;

    color: var(--muted);
    line-height: 1.65;
}

.demo-control-group {
    margin-bottom: 18px;
}

.demo-control-label {
    display: block;
    margin-bottom: 9px;

    color: rgba(255, 255, 255, 0.34);

    font-family: "Exo 2", sans-serif;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.model-type-chips,
.material-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.model-type-chip,
.material-chip {
    padding: 9px 13px;

    border: 1px solid var(--line);
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.035);
    color: var(--muted);

    font-weight: 700;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.model-type-chip:hover,
.material-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(184, 255, 60, 0.22);
    color: rgba(255, 255, 255, 0.82);
}

.model-type-chip.is-active,
.material-chip.is-active {
    border-color: transparent;
    background: var(--green);
    color: #0a170d;
}

.demo-specs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;

    margin: 7px 0 22px;
}

.demo-specs > div {
    min-width: 0;
    padding: 12px 13px;

    border: 1px solid rgba(255, 255, 255, 0.065);
    border-radius: 13px;

    background: rgba(0, 0, 0, 0.12);
}

.demo-specs small,
.demo-specs strong {
    display: block;
}

.demo-specs small {
    margin-bottom: 3px;
    color: rgba(255, 255, 255, 0.28);
    font-size: 10px;
}

.demo-specs strong {
    overflow: hidden;
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.demo-specs .demo-price {
    color: var(--green);
    font-size: 15px;
}

#demoContinueOrder {
    align-self: flex-start;
}


/* 3D preview stage */

.model-stage {
    position: relative;
    min-height: 470px;
    overflow: hidden;

    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 24px;

    background:
        radial-gradient(
            circle at 50% 44%,
            rgba(94, 255, 101, 0.08),
            transparent 28%
        ),
        #050d07;

    cursor: grab;
    touch-action: none;
    user-select: none;
}

.model-stage:active {
    cursor: grabbing;
}

.model-grid {
    position: absolute;
    inset: 39% -30% -45% -30%;

    background-image:
        linear-gradient(
            rgba(184, 255, 60, 0.075) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(184, 255, 60, 0.075) 1px,
            transparent 1px
        );

    background-size: 54px 54px;

    transform:
        perspective(650px)
        rotateX(66deg)
        scale(1.35);

    transform-origin: center top;

    opacity: 0.48;
    pointer-events: none;
}

.demo-canvas {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    z-index: 2;

    pointer-events: none;
}


/* Real customer model inside the home-page preview stage. */
.home-real-model-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
}

.home-real-model-viewer {
    position: absolute;
    inset: 0;
}

.home-real-model-viewer canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: grab;
    touch-action: none;
}

.home-real-model-viewer canvas:active {
    cursor: grabbing;
}

.home-model-switcher {
    position: absolute;
    left: 50%;
    bottom: 44px;
    z-index: 4;

    display: flex;
    align-items: center;
    gap: 9px;

    padding: 6px 8px;
    border: 1px solid rgba(184, 255, 60, 0.16);
    border-radius: 999px;

    background: rgba(3, 12, 6, 0.82);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);

    transform: translateX(-50%);
}

.home-model-switcher.hidden {
    display: none;
}

.home-model-arrow {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.035);
    color: rgba(255, 255, 255, 0.82);

    font: 800 17px/1 "Exo 2", sans-serif;
    cursor: pointer;

    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.home-model-arrow:hover:not(:disabled) {
    border-color: rgba(184, 255, 60, 0.34);
    background: rgba(184, 255, 60, 0.09);
    color: var(--green);
    transform: translateY(-1px);
}

.home-model-arrow:disabled {
    opacity: 0.38;
    cursor: wait;
}

.home-model-counter {
    min-width: 48px;
    color: rgba(255, 255, 255, 0.58);
    text-align: center;
    font: 800 10px "Exo 2", sans-serif;
    letter-spacing: 0.08em;
}

.stage-glow {
    position: absolute;
    left: 50%;
    top: 48%;

    width: 270px;
    height: 150px;

    z-index: 1;

    border-radius: 50%;

    background: rgba(184, 255, 60, 0.07);
    filter: blur(42px);

    transform: translate(-50%, -50%);
    pointer-events: none;
}

.stage-hud {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 16px;

    z-index: 3;

    display: flex;
    justify-content: space-between;

    color: rgba(255, 255, 255, 0.35);

    font: 800 10px "Exo 2", sans-serif;
    letter-spacing: 0.15em;

    pointer-events: none;
}

.stage-hint {
    position: absolute;
    top: 16px;
    right: 18px;

    z-index: 3;

    padding: 6px 8px;

    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 999px;

    background: rgba(0, 0, 0, 0.18);
    color: rgba(255, 255, 255, 0.24);

    font: 700 9px "Exo 2", sans-serif;
    letter-spacing: 0.11em;

    pointer-events: none;
}

/* =========================================================
   12. EXAMPLES / WORKS
   ========================================================= */

.works-track {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 14px;
}

.work-card {
    position: relative;

    min-height: 360px;

    overflow: hidden;

    border: 1px solid var(--line);
    border-radius: 22px;

    background: #0d1710;
}

.work-card img {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;

    filter:
        saturate(0.7)
        brightness(0.65);

    transition: 0.5s ease;
}

.work-card:hover img {
    transform: scale(1.06);

    filter:
        saturate(0.9)
        brightness(0.7);
}

.work-card .work-meta {
    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    padding: 80px 20px 20px;

    background: linear-gradient(
        transparent,
        rgba(4, 12, 6, 0.96)
    );
}

.work-card .work-meta small {
    color: var(--green);
}

.work-card h3 {
    margin: 6px 0;
}

.work-card p {
    margin: 0;

    color: var(--muted);

    font-size: 12px;
}


/* =========================================================
   13. REVIEWS
   ========================================================= */

.review-preview,
.review-list {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 14px;
}

.review-card {
    padding: 20px;

    border: 1px solid var(--line);
    border-radius: 20px;

    background: rgba(255, 255, 255, 0.025);
}

.review-head {
    display: flex;
    align-items: center;

    gap: 10px;
}

.avatar {
    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: linear-gradient(
        135deg,
        var(--green),
        var(--green3)
    );

    color: #07110a;

    font-weight: 900;
}

.stars {
    color: #d8ff75;

    letter-spacing: 2px;
}

.review-card p {
    color: var(--muted);

    line-height: 1.55;
}

.review-photo {
    width: 72px;
    height: 72px;

    border-radius: 13px;

    object-fit: cover;
}

.text-link {
    border: 0;

    background: none;

    color: var(--green);

    cursor: pointer;
}


/* =========================================================
   14. ORDER PAGE
   ========================================================= */

.order-header,
.account-head {
    display: flex;

    justify-content: space-between;
    align-items: end;

    gap: 30px;

    margin-bottom: 28px;
}

.order-header h1,
.account-head h1 {
    margin: 7px 0 0;

    font-size: 44px;
}


/* Order steps */

.steps {
    display: flex;

    gap: 8px;
}

.step {
    display: flex;
    align-items: center;

    gap: 7px;

    padding: 8px 11px;

    border: 1px solid var(--line);
    border-radius: 999px;

    color: rgba(255, 255, 255, 0.28);

    font-size: 12px;
}

.step.is-active {
    border-color: rgba(184, 255, 60, 0.25);

    background: rgba(184, 255, 60, 0.07);

    color: var(--green);
}


/* Order layout */

.order-layout {
    display: grid;
    grid-template-columns: 285px minmax(0, 1fr);
    align-items: start;
    gap: 20px;
    width: 100%;
}

.order-layout.single-column {
    grid-template-columns: 1fr;
}


/* Calculator */

.calculator-card {
    position: sticky;

    top: 90px;

    padding: 21px;

    border: 1px solid rgba(184, 255, 60, 0.2);
    border-radius: 22px;

    background: linear-gradient(
        180deg,
        rgba(184, 255, 60, 0.07),
        rgba(255, 255, 255, 0.02)
    );

    box-shadow: var(--shadow);
}

.calculator-title {
    display: flex;
    align-items: center;

    gap: 10px;
}

.calculator-title small,
.calculator-title strong {
    display: block;
}

.calculator-title small {
    color: var(--green);

    font-size: 10px;

    letter-spacing: 0.14em;
}

.calculator-title strong {
    font-size: 13px;
}

.calc-price {
    margin: 22px 0 7px;

    color: var(--green);

    font:
        800 38px "Exo 2";
}

.calc-note {
    color: var(--muted);

    font-size: 12px;

    line-height: 1.5;
}

.calc-breakdown {
    margin-top: 15px;
    padding-top: 14px;

    display: grid;

    gap: 8px;

    border-top: 1px solid var(--line);
}

.calc-breakdown div,
.confirm-row {
    display: flex;

    justify-content: space-between;

    gap: 12px;

    color: var(--muted);

    font-size: 12px;
}


/* Order content */

.order-panel {
    min-width: 0;
}

.order-step {
    display: none;
}

.order-step.is-visible {
    display: block;

    animation: pageIn 0.25s ease;
}

.order-step h2 {
    font-size: 30px;
}

.order-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    width: 100%;
    align-items: stretch;
}


/* =========================================================
   15. FORMS
   ========================================================= */

.form-grid {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 14px;
}

.form-card,
.confirm-card,
.review-form-card,
.rating-summary,
.order-summary-card,
.chat-card,
.admin-chat-card,
.client-list {
    border: 1px solid var(--line);
    border-radius: 20px;

    background: rgba(255, 255, 255, 0.025);
}

.form-card {
    padding: 18px;
}

.span-2 {
    grid-column: span 2;
}

.form-card label {
    display: grid;

    gap: 8px;
}

.form-card label > span,
.modal-card label > span {
    color: var(--muted);

    font-size: 12px;
    font-weight: 700;
}

.form-card input,
.form-card select,
.form-card textarea,
.modal-card input,
.review-form-card textarea,
.chat-form input {
    width: 100%;

    padding: 12px 13px;

    border: 1px solid var(--line);
    border-radius: 12px;

    outline: 0;

    background: #08130b;

    color: white;
}

.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus,
.modal-card input:focus,
.review-form-card textarea:focus,
.chat-form input:focus {
    border-color: rgba(184, 255, 60, 0.45);

    box-shadow:
        0 0 0 3px rgba(184, 255, 60, 0.05);
}

.three-fields {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 12px;
}


/* File upload */

.dropzone {
    display: flex !important;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    padding: 30px;

    border: 1px dashed rgba(184, 255, 60, 0.24);
    border-radius: 16px;

    background: rgba(184, 255, 60, 0.025);

    text-align: center;

    cursor: pointer;
}

.dropzone:hover {
    background: rgba(184, 255, 60, 0.05);
}

.drop-icon {
    color: var(--green);

    font-size: 34px;
}

.dropzone small {
    color: var(--muted);
}

.compact-drop {
    padding: 18px;
}


/* Form cards */

.card-title-row {
    display: flex;

    align-items: center;
    justify-content: space-between;

    margin-bottom: 14px;
}

.card-title-row small {
    color: var(--green);

    font-size: 10px;

    letter-spacing: 0.14em;
}

.card-title-row h3 {
    margin: 4px 0 0;
}

.required-badge {
    padding: 5px 7px;

    border: 1px solid rgba(184, 255, 60, 0.2);
    border-radius: 999px;

    color: var(--green);

    font-size: 10px;
}

.form-actions {
    display: flex;

    justify-content: flex-end;

    gap: 10px;

    margin-top: 16px;
}


/* Confirmation */

.confirm-card {
    padding: 25px;
}

.confirm-list {
    display: grid;

    gap: 10px;

    margin: 22px 0;
}

.confirm-row {
    padding-bottom: 10px;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.05);
}

.security-note {
    display: flex;

    gap: 12px;

    padding: 14px;

    border: 1px solid rgba(255, 188, 64, 0.14);
    border-radius: 13px;

    background: rgba(255, 188, 64, 0.06);

    color: #f5d88b;

    font-size: 12px;
}


/* Order success */

.order-success {
    padding: 80px 20px;

    text-align: center;
}

.success-icon {
    width: 68px;
    height: 68px;

    margin: 0 auto 18px;

    display: grid;
    place-items: center;

    border: 1px solid rgba(184, 255, 60, 0.25);
    border-radius: 22px;

    background: rgba(184, 255, 60, 0.1);

    color: var(--green);

    font-size: 30px;
}


/* =========================================================
   16. REVIEWS PAGE
   ========================================================= */

.reviews-layout {
    display: grid;

    grid-template-columns: 220px 1fr;

    align-items: start;

    gap: 18px;
}

.rating-summary {
    position: sticky;

    top: 90px;

    padding: 28px;

    text-align: center;
}

.rating-summary strong {
    font-size: 54px;
}

.review-form-card {
    margin-bottom: 16px;
    padding: 22px;
}

.review-form-card h3 {
    margin-top: 0;
}

.star-input {
    display: flex;

    gap: 5px;

    margin: 10px 0;
}

.star-input button {
    padding: 0;

    border: 0;

    background: none;

    color: rgba(255, 255, 255, 0.15);

    font-size: 27px;

    cursor: pointer;
}

.star-input button.is-on {
    color: var(--green);
}

.review-list {
    grid-template-columns: 1fr;
}


/* =========================================================
   17. ACCOUNT
   ========================================================= */

.account-head {
    align-items: center;
}


/* Demo role switch */

.demo-switch {
    display: flex;
    align-items: center;

    gap: 6px;

    padding: 5px;

    border: 1px solid var(--line);
    border-radius: 13px;
}

.demo-switch span {
    padding: 0 5px;

    color: var(--muted);

    font-size: 10px;
}

.demo-switch button {
    padding: 7px 10px;

    border: 0;
    border-radius: 9px;

    background: transparent;

    color: var(--muted);

    cursor: pointer;
}

.demo-switch button.is-active {
    background: var(--green);

    color: #07110a;

    font-weight: 800;
}


/* User order */

.order-summary-card {
    margin-bottom: 14px;
    padding: 18px;

    display: flex;

    align-items: center;
    justify-content: space-between;
}

.order-summary-card small,
.order-summary-card p {
    color: var(--muted);
}

.order-summary-card h3 {
    margin: 5px 0;
}

.status-badge {
    padding: 7px 9px;

    border-radius: 999px;

    font-size: 11px;
}

.status-badge.printing {
    border:
        1px solid rgba(78, 148, 255, 0.2);

    background: rgba(78, 148, 255, 0.11);

    color: #87b9ff;
}


/* =========================================================
   18. CHAT
   ========================================================= */

.chat-card {
    overflow: hidden;
}

.chat-head,
.admin-chat-head {
    padding: 15px 17px;

    display: flex;

    align-items: center;
    justify-content: space-between;

    border-bottom: 1px solid var(--line);
}

.messages {
    height: 420px;

    overflow: auto;

    padding: 18px;

    display: flex;
    flex-direction: column;

    gap: 10px;
}

.message {
    max-width: 75%;

    padding: 11px 13px;

    border: 1px solid var(--line);
    border-radius: 16px;

    background: rgba(255, 255, 255, 0.05);

    font-size: 13px;
}

.message.mine {
    margin-left: auto;

    border-color: rgba(184, 255, 60, 0.16);

    background: rgba(184, 255, 60, 0.09);
}

.message small {
    display: block;

    margin-top: 5px;

    color: rgba(255, 255, 255, 0.25);

    font-size: 10px;

    text-align: right;
}

.chat-form {
    display: flex;

    gap: 8px;

    padding: 13px;

    border-top: 1px solid var(--line);
}


/* =========================================================
   19. ADMIN PANEL
   ========================================================= */

.admin-grid {
    display: grid;

    grid-template-columns: 330px 1fr;

    gap: 14px;
}

.client-list {
    overflow: hidden;
}

.client-row {
    width: 100%;

    padding: 15px;

    border: 0;
    border-bottom: 1px solid var(--line);

    background: transparent;

    color: white;

    text-align: left;

    cursor: pointer;
}

.client-row:hover,
.client-row.is-active {
    background: rgba(184, 255, 60, 0.055);
}

.client-row small {
    color: var(--muted);
}

.admin-chat-card {
    overflow: hidden;
}

.order-detail-toggle {
    width: 100%;

    padding: 9px;

    border: 0;
    border-bottom: 1px solid var(--line);

    background: rgba(255, 255, 255, 0.02);

    color: var(--muted);

    cursor: pointer;
}

.order-detail-panel {
    padding: 14px;

    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 8px;

    border-bottom: 1px solid var(--line);
}

.order-detail-panel div {
    color: var(--muted);

    font-size: 11px;
}


/* =========================================================
   20. AUTH MODAL
   ========================================================= */

.modal-backdrop {
    position: fixed;

    inset: 0;

    z-index: 80;

    display: grid;
    place-items: center;

    padding: 20px;

    background: rgba(0, 0, 0, 0.68);

    backdrop-filter: blur(10px);
}

.modal-card {
    position: relative;

    width: min(430px, 100%);

    padding: 28px;

    border: 1px solid var(--line);
    border-radius: 24px;

    background: #0b1b10;

    box-shadow: var(--shadow);
}

.modal-card h2 {
    margin: 8px 0 20px;

    font-size: 28px;
}

.modal-card form {
    display: grid;

    gap: 13px;
}

.modal-card label {
    display: grid;

    gap: 7px;
}

.modal-close {
    position: absolute;

    top: 13px;
    right: 15px;

    border: 0;

    background: none;

    color: var(--muted);

    font-size: 25px;

    cursor: pointer;
}

.form-hint {
    color: var(--muted);

    font-size: 11px;

    line-height: 1.45;
}


/* =========================================================
   21. TOAST
   ========================================================= */

.toast {
    position: fixed;

    right: 20px;
    bottom: 20px;

    z-index: 100;

    padding: 12px 15px;

    border: 1px solid rgba(184, 255, 60, 0.2);
    border-radius: 12px;

    background: #102418;

    box-shadow: var(--shadow);

    font-size: 13px;

    opacity: 0;

    pointer-events: none;

    transform: translateY(20px);

    transition: 0.25s;
}

.toast.show {
    opacity: 1;

    transform: none;
}


/* =========================================================
   22. FOOTER
   ========================================================= */

.footer {
    padding: 30px 0;

    border-top: 1px solid var(--line);

    color: var(--muted);
}

.footer-grid {
    display: grid;

    grid-template-columns: 2fr 1fr 1fr;

    gap: 20px;
}

.footer strong {
    color: white;
}

.footer p {
    margin: 4px 0;
}


/* =========================================================
   23. SCROLL REVEAL ANIMATION
   ========================================================= */

.reveal {
    opacity: 0;

    transform: translateY(18px);

    transition:
        opacity 0.6s ease,
        transform 0.6s ease;
}

.reveal.in-view {
    opacity: 1;

    transform: none;
}


/* =========================================================
   24. TABLET
   ========================================================= */

@media (max-width: 1100px) {

    .desktop-nav {
        display: none;
    }

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

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

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

    .hero-visual {
        max-width: 800px;
    }

    .interactive-lab {
        grid-template-columns: 1fr;
    }

    .order-layout {
        grid-template-columns: 1fr;
    }

    .calculator-card {
        position: relative;

        top: auto;
    }

    .admin-grid {
        grid-template-columns: 280px 1fr;
    }
}


/* =========================================================
   25. MOBILE
   ========================================================= */

@media (max-width: 760px) {

    .shell {
        width: min(100% - 24px, 1400px);
    }

    .page-shell {
        padding-top: 28px;
    }

    .nav-actions .btn:not(#accountBtn) {
        display: none;
    }

    .hero {
        min-height: auto;
    }

    .hero h1 {
        font-size: 44px;
    }

    .hero-image-card img {
        height: 360px;
    }

    .feature-strip,
    .category-grid,
    .order-categories,
    .works-track,
    .review-preview,
    .form-grid,
    .reviews-layout,
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: auto;
    }

    .three-fields {
        grid-template-columns: 1fr;
    }

    .section {
        margin: 65px 0;
    }

    .section-heading,
    .order-header,
    .account-head {
        align-items: flex-start;

        flex-direction: column;
    }

    .interactive-lab {
        padding: 22px;
        gap: 28px;
    }

    .demo-specs {
        grid-template-columns: 1fr;
    }

    .model-stage {
        min-height: 360px;
        height: 360px;
    }

    .steps {
        width: 100%;

        overflow: auto;
    }

    .step b {
        display: none;
    }

    .order-header h1,
    .account-head h1 {
        font-size: 34px;
    }

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

    .messages {
        height: 350px;
    }

    .admin-grid {
        display: block;
    }

    .client-list {
        margin-bottom: 14px;
    }

    .nav-row {
        gap: 10px;
    }

    .language-picker {
        margin-left: auto;
    }
}

/* =========================================================
   AUTH MODE SWITCH
   ========================================================= */

.auth-switch {
    display: flex;

    justify-content: center;
    align-items: center;

    gap: 6px;

    margin-top: 5px;

    color: var(--muted);

    font-size: 12px;
}

.auth-switch button {
    padding: 0;

    border: 0;

    background: transparent;

    color: var(--green);

    font-weight: 800;

    cursor: pointer;
}

.auth-switch button:hover {
    text-decoration: underline;
}

.order-panel,
.order-step,
#orderCategoryGrid {
    width: 100%;
}

.category-card {
    width: 100%;
    min-height: 260px;

    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.category-card h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

.category-card p {
    margin: 0;
    line-height: 1.55;
    flex-grow: 1;
}

@media (max-width: 1100px) {
    .order-layout {
        grid-template-columns: 1fr;
    }

    .order-categories {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 760px) {
    .order-categories {
        grid-template-columns: 1fr;
    }

    .category-card {
        min-height: 220px;
    }
}

/* =========================================================
   ORDER CATEGORY LAYOUT FIX
   Keeps the first order step full-width when the calculator
   is hidden and prevents narrow category cards.
   ========================================================= */

.order-layout.single-column,
.order-layout:has(#calculatorCard.hidden) {
    grid-template-columns: minmax(0, 1fr);
}

.order-layout.single-column .order-panel,
.order-layout:has(#calculatorCard.hidden) .order-panel {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
}

#orderCategoryGrid.order-categories {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

#orderCategoryGrid .category-card {
    width: 100%;
    min-width: 0;
    min-height: 250px;
}

#orderCategoryGrid .category-card h3,
#orderCategoryGrid .category-card p {
    overflow-wrap: anywhere;
}

@media (max-width: 1200px) {
    #orderCategoryGrid.order-categories {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 800px) {
    #orderCategoryGrid.order-categories {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 540px) {
    #orderCategoryGrid.order-categories {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   REAL ACCOUNT SESSION
   ========================================================= */

.account-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-identity > div {
    display: grid;
    gap: 2px;
    text-align: right;
}

.account-identity strong {
    color: var(--text);
    font-size: 14px;
}

.account-identity small {
    color: var(--muted);
    font-size: 12px;
}

#authSubmit:disabled {
    opacity: 0.62;
    cursor: wait;
}

@media (max-width: 760px) {
    .nav-actions #registerBtn,
    .nav-actions #logoutBtn {
        display: none;
    }

    .account-identity {
        width: 100%;
        justify-content: space-between;
    }

    .account-identity > div {
        text-align: left;
    }
}

@media (max-width: 760px) {
    .nav-actions #loginBtn,
    .nav-actions #accountBtn {
        display: inline-flex;
    }

    .nav-actions #loginBtn.hidden,
    .nav-actions #accountBtn.hidden {
        display: none;
    }
}

/* =========================================================
   REAL CLIENT ORDERS
   ========================================================= */

.client-orders-head {
    margin-bottom: 14px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}

.client-orders-head h2 {
    margin: 4px 0 0;
}

.client-orders-list {
    margin-bottom: 18px;

    display: grid;
    gap: 12px;
}

.order-summary-card.real-order {
    width: 100%;

    border: 1px solid var(--line);
    border-radius: 18px;

    background: rgba(255, 255, 255, 0.018);
}

.order-summary-card.real-order:hover {
    border-color: rgba(184, 255, 60, 0.22);
}

.order-summary-main {
    min-width: 0;
}

.order-summary-main p {
    margin: 0;
}

.order-summary-description {
    margin-top: 8px !important;

    max-width: 760px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.status-badge.status-new,
.status-badge.status-under-review,
.status-badge.status-awaiting-customer,
.status-badge.status-quote-ready,
.status-badge.status-accepted,
.status-badge.status-printing,
.status-badge.status-ready,
.status-badge.status-shipped,
.status-badge.status-completed,
.status-badge.status-cancelled {
    border: 1px solid rgba(184, 255, 60, 0.18);
    background: rgba(184, 255, 60, 0.08);
    color: var(--green);
}

.status-badge.status-cancelled {
    border-color: rgba(255, 107, 107, 0.2);
    background: rgba(255, 107, 107, 0.08);
    color: #ff9292;
}

.orders-empty,
.orders-loading,
.orders-error,
.chat-stage-note {
    padding: 22px;

    border: 1px solid var(--line);
    border-radius: 18px;

    color: var(--muted);
}

.orders-empty strong,
.orders-error strong {
    display: block;

    margin-bottom: 5px;

    color: var(--text);
}

.chat-disabled-card {
    opacity: 0.72;
}

.chat-stage-note {
    border: 0;
    border-radius: 0;
}

.success-order-id {
    display: block;

    margin: 8px 0 18px;

    color: var(--green);
    font-family: "Exo 2", sans-serif;
    letter-spacing: 0.08em;
}

@media (max-width: 700px) {
    .client-orders-head,
    .order-summary-card.real-order {
        align-items: stretch;
        flex-direction: column;
    }
}

/* =========================================================
   SECURE ORDER FILES
   ========================================================= */

.order-files-controls {
    margin-top: 12px;
}

.order-files-toggle {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 0.82rem;
}

.order-files-panel {
    margin-top: 10px;
    padding: 10px;

    display: grid;
    gap: 8px;

    border: 1px solid var(--line);
    border-radius: 14px;

    background: rgba(0, 0, 0, 0.12);
}

.order-file-row {
    min-width: 0;
    padding: 9px 10px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    border-radius: 10px;
    background: rgba(255, 255, 255, 0.025);
}

.order-file-row > div {
    min-width: 0;

    display: grid;
    gap: 3px;
}

.order-file-row strong,
.order-file-row small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-file-row small {
    color: var(--muted);
}

.order-file-download {
    flex-shrink: 0;
    min-height: 34px;
    padding: 7px 10px;
    font-size: 0.78rem;
}

@media (max-width: 620px) {
    .order-file-row {
        align-items: stretch;
        flex-direction: column;
    }

    .order-file-download {
        width: 100%;
    }
}

/* =========================================================
   REAL 3D MODEL VIEWER
   ========================================================= */

.model-preview-card {
    overflow: hidden;
}

.model-preview-head {
    margin-bottom: 14px;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.model-preview-head h3 {
    margin: 3px 0 4px;
}

.model-preview-status {
    color: var(--muted);
    font-size: 0.82rem;
}

.model-preview-reset {
    flex-shrink: 0;
}

.real-model-stage {
    width: 100%;
    min-height: 390px;
    position: relative;
    overflow: hidden;

    border: 1px solid rgba(184, 255, 60, 0.13);
    border-radius: 18px;

    background:
        radial-gradient(
            circle at 50% 45%,
            rgba(83, 168, 91, 0.16),
            rgba(4, 11, 6, 0.12) 45%,
            rgba(2, 7, 4, 0.72) 100%
        ),
        linear-gradient(
            180deg,
            rgba(13, 30, 18, 0.9),
            rgba(5, 13, 8, 0.96)
        );
}

.real-model-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;

    background-image:
        linear-gradient(
            rgba(184, 255, 60, 0.025) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(184, 255, 60, 0.025) 1px,
            transparent 1px
        );
    background-size: 32px 32px;
}

.real-model-stage canvas {
    width: 100%;
    height: 100%;
    min-height: inherit;
    position: relative;
    z-index: 1;
    display: block;
    cursor: grab;
    touch-action: none;
}

.real-model-stage canvas:active {
    cursor: grabbing;
}

.viewer-loading {
    position: absolute;
    inset: 0;

    display: grid;
    place-items: center;

    color: rgba(184, 255, 60, 0.36);
    font-family: "Exo 2", sans-serif;
    font-size: clamp(2rem, 8vw, 5rem);
    font-weight: 800;
    letter-spacing: 0.08em;
}

.model-analysis-grid {
    margin-top: 14px;

    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 9px;
}

.model-analysis-grid > div,
.remote-model-stats > div {
    min-width: 0;
    padding: 11px 12px;

    display: grid;
    gap: 4px;

    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
}

.model-analysis-grid small,
.remote-model-stats small {
    color: var(--muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.model-analysis-grid strong,
.remote-model-stats strong {
    overflow: hidden;
    color: var(--text);
    font-family: "Exo 2", sans-serif;
    text-overflow: ellipsis;
}

.model-analysis-grid.is-loading strong {
    opacity: 0.36;
}

.model-analysis-footer {
    margin-top: 12px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.model-analysis-footer small {
    max-width: 660px;
    color: var(--muted);
    line-height: 1.45;
}

.order-file-actions {
    flex-shrink: 0;

    display: flex;
    align-items: center;
    gap: 7px;
}

.order-file-preview {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 0.78rem;
}

.model-viewer-modal-card {
    width: min(980px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow: auto;
    padding: 20px;

    border: 1px solid rgba(184, 255, 60, 0.16);
    border-radius: 24px;
    background: rgba(8, 18, 11, 0.98);
    box-shadow: var(--shadow);
}

.model-viewer-modal-head {
    margin-bottom: 14px;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.model-viewer-modal-head h2 {
    margin: 4px 0 3px;
}

.model-viewer-modal-head p {
    margin: 0;
    color: var(--muted);
}

.modal-model-stage {
    min-height: min(56vh, 580px);
}

.remote-model-stats {
    margin-top: 12px;

    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
}

.model-viewer-modal-actions {
    margin-top: 14px;

    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

@media (max-width: 900px) {
    .model-analysis-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 620px) {
    .model-preview-head,
    .model-analysis-footer,
    .model-viewer-modal-head {
        align-items: stretch;
        flex-direction: column;
    }

    .real-model-stage {
        min-height: 300px;
    }

    .model-analysis-grid,
    .remote-model-stats {
        grid-template-columns: 1fr 1fr;
    }

    .model-analysis-footer .btn,
    .model-preview-reset {
        width: 100%;
    }

    .order-file-actions {
        width: 100%;
        flex-direction: column;
    }

    .order-file-preview,
    .order-file-download {
        width: 100%;
    }

    .model-viewer-modal-actions {
        flex-direction: column;
    }

    .model-viewer-modal-actions .btn {
        width: 100%;
    }
}

.order-file-row > .order-file-actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

@media (max-width: 620px) {
    .order-file-row > .order-file-actions {
        display: flex;
        align-items: stretch;
        flex-direction: column;
    }
}

/* =========================================================
   ORDER FILE RECOVERY / UPLOAD STATUS
   ========================================================= */

.order-file-list-inner {
    display: grid;
    gap: 8px;
}

.order-file-add-controls {
    margin-top: 8px;

    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.order-file-add-button {
    cursor: pointer;
}

.order-file-upload-status {
    min-height: 1.2em;
    color: var(--muted);
}

.order-files-empty-note {
    color: var(--muted);
}

.order-upload-notice {
    margin-top: 14px;
    padding: 12px 14px;

    border: 1px solid rgba(184, 255, 60, 0.16);
    border-radius: 14px;

    background: rgba(184, 255, 60, 0.06);
    color: var(--text);
    line-height: 1.5;
}

.order-upload-notice.is-warning {
    border-color: rgba(255, 199, 95, 0.26);
    background: rgba(255, 199, 95, 0.08);
}

.my-model-chip {
    border-color: rgba(184, 255, 60, 0.28);
}

@media (max-width: 620px) {
    .order-file-add-controls {
        flex-direction: column;
    }

    .order-file-add-controls .btn {
        width: 100%;
    }
}


/* =========================================================
   CLIENT ORDER CANCELLATION
   ========================================================= */

.order-summary-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.order-cancel-btn,
.order-cancel-confirm {
    min-height: 36px;

    border: 1px solid rgba(255, 107, 107, 0.28);
    border-radius: 12px;

    background: rgba(255, 107, 107, 0.07);
    color: #ff9a9a;

    font: inherit;
    font-weight: 800;

    cursor: pointer;

    transition:
        border-color 0.18s ease,
        background 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease;
}

.order-cancel-btn {
    padding: 8px 12px;
    font-size: 0.82rem;
}

.order-cancel-btn:hover,
.order-cancel-confirm:hover {
    border-color: rgba(255, 107, 107, 0.55);
    background: rgba(255, 107, 107, 0.13);
    color: #ffc0c0;
}

.order-cancel-btn:active,
.order-cancel-confirm:active {
    transform: translateY(1px);
}

.order-cancel-btn:disabled,
.order-cancel-confirm:disabled {
    opacity: 0.5;
    cursor: wait;
}

.cancel-order-modal-card {
    width: min(510px, 100%);
}

.cancel-order-modal-card h2 {
    margin-bottom: 12px;
}

.cancel-order-warning {
    margin: 0;

    color: var(--muted);
    line-height: 1.6;
}

.cancel-order-modal-actions {
    margin-top: 22px;

    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.order-cancel-confirm {
    padding: 10px 16px;
}

@media (max-width: 560px) {
    .cancel-order-modal-actions {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .cancel-order-modal-actions .btn,
    .order-cancel-confirm {
        width: 100%;
    }
}


/* =========================================================
   28. REVIEW FORM POLISH
   ========================================================= */

.review-form-card {
    padding: 26px;

    border-color: rgba(184, 255, 60, 0.13);

    background:
        radial-gradient(
            circle at 100% 0%,
            rgba(184, 255, 60, 0.045),
            transparent 34%
        ),
        rgba(255, 255, 255, 0.025);
}

.review-form-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 24px;

    margin-bottom: 18px;
}

.review-form-head h3 {
    margin: 0 0 5px;

    font-size: 21px;
}

.review-form-subtitle {
    margin: 0;

    color: var(--muted);

    font-size: 13px;
    line-height: 1.5;
}

.review-form-card .star-input {
    flex-shrink: 0;

    gap: 7px;

    margin: -2px 0 0;
}

.review-form-card .star-input button {
    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    border-radius: 9px;

    color: rgba(255, 255, 255, 0.18);

    font-size: 29px;
    line-height: 1;

    transition:
        color 150ms ease,
        transform 150ms ease,
        background 150ms ease;
}

.review-form-card .star-input button:hover {
    transform: translateY(-1px) scale(1.04);

    background: rgba(184, 255, 60, 0.06);

    color: rgba(216, 255, 117, 0.65);
}

.review-form-card .star-input button.is-on {
    color: var(--green);
}

.review-form-card textarea {
    min-height: 150px;
    padding: 16px 17px;

    border-radius: 16px;

    background: rgba(3, 13, 7, 0.78);

    font: inherit;
    line-height: 1.55;

    resize: vertical;
}

.review-form-card textarea::placeholder {
    color: rgba(255, 255, 255, 0.32);
}

.review-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 18px;

    margin-top: 15px;
}

.review-photo-picker {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 12px;
}

.review-photo-input {
    position: absolute;

    width: 1px;
    height: 1px;

    overflow: hidden;

    clip: rect(0 0 0 0);
    clip-path: inset(50%);

    white-space: nowrap;
}

.review-photo-button {
    min-height: 46px;
    padding: 0 16px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    flex-shrink: 0;

    border: 1px solid var(--line);
    border-radius: 13px;

    background: rgba(255, 255, 255, 0.035);

    color: rgba(255, 255, 255, 0.78);

    font-size: 14px;
    font-weight: 800;

    cursor: pointer;

    transition:
        border-color 150ms ease,
        background 150ms ease,
        color 150ms ease,
        transform 150ms ease;
}

.review-photo-button:hover {
    transform: translateY(-1px);

    border-color: rgba(184, 255, 60, 0.3);

    background: rgba(184, 255, 60, 0.07);

    color: white;
}

.review-photo-input:focus-visible + .review-photo-button {
    outline: 2px solid rgba(184, 255, 60, 0.65);
    outline-offset: 3px;
}

.review-photo-plus {
    width: 22px;
    height: 22px;

    display: grid;
    place-items: center;

    border-radius: 7px;

    background: rgba(184, 255, 60, 0.11);

    color: var(--green);

    font-size: 19px;
    font-weight: 500;
    line-height: 1;
}

.review-photo-meta {
    max-width: 360px;

    overflow: hidden;

    color: rgba(255, 255, 255, 0.38);

    font-size: 12px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.review-submit-btn {
    min-width: 175px;
    min-height: 46px;

    flex-shrink: 0;
}

@media (max-width: 720px) {
    .review-form-card {
        padding: 20px;
    }

    .review-form-head,
    .review-form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .review-form-card .star-input {
        margin-top: 4px;
    }

    .review-photo-picker {
        align-items: flex-start;
        flex-direction: column;
    }

    .review-photo-meta {
        max-width: 100%;
    }

    .review-submit-btn,
    .review-photo-button {
        width: 100%;
    }
}


/* =========================================================
   REAL ORDER CHAT · v0.7.0
   ========================================================= */

.client-chat-head,
.admin-chat-head {
    gap: 16px;
}

.chat-head-title,
.admin-chat-head > div {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.chat-head-title small,
.admin-chat-head small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.chat-order-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.chat-order-tools select {
    max-width: 280px;
    min-width: 190px;
    padding: 9px 34px 9px 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    outline: 0;
    background: #08130b;
    color: var(--text);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.chat-order-tools select:focus {
    border-color: rgba(184, 255, 60, 0.42);
    box-shadow: 0 0 0 3px rgba(184, 255, 60, 0.05);
}

.chat-order-tools select:disabled {
    opacity: 0.48;
    cursor: not-allowed;
}

.chat-refresh-btn {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.025);
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition:
        border-color 160ms ease,
        color 160ms ease,
        background 160ms ease,
        transform 160ms ease;
}

.chat-refresh-btn:hover:not(:disabled) {
    border-color: rgba(184, 255, 60, 0.28);
    background: rgba(184, 255, 60, 0.055);
    color: var(--green);
    transform: rotate(14deg);
}

.chat-refresh-btn:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

.chat-card .messages,
.admin-chat-card .messages {
    position: relative;
    height: 390px;
    min-height: 260px;
    background:
        radial-gradient(circle at 80% 10%, rgba(184, 255, 60, 0.025), transparent 34%),
        rgba(0, 0, 0, 0.075);
    scrollbar-width: thin;
    scrollbar-color: rgba(184, 255, 60, 0.18) transparent;
}

.message {
    width: fit-content;
    min-width: 86px;
    max-width: min(76%, 680px);
    padding: 10px 12px 8px;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.message.mine {
    border-bottom-right-radius: 6px;
}

.message:not(.mine) {
    border-bottom-left-radius: 6px;
}

.message-sender {
    display: block;
    margin-bottom: 4px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.03em;
}

.message.mine .message-sender {
    color: rgba(184, 255, 60, 0.72);
}

.message-body {
    color: var(--text);
    line-height: 1.48;
}

.message small {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.34);
}

.chat-empty-state {
    width: min(100%, 520px);
    min-height: 100%;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 28px;
    color: var(--muted);
    text-align: center;
    line-height: 1.5;
}

.chat-empty-state strong {
    color: var(--text);
}

.chat-error-state {
    color: #ff9292;
}

.chat-form {
    align-items: center;
    background: rgba(255, 255, 255, 0.012);
}

.chat-form input {
    min-width: 0;
    height: 44px;
}

.chat-form input:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.chat-send-btn,
.chat-form .btn[type="submit"] {
    min-width: 48px;
    height: 44px;
    padding-inline: 15px;
    flex-shrink: 0;
}

.admin-list-state {
    min-height: 120px;
    display: grid;
    place-items: center;
    padding: 22px;
    color: var(--muted);
    text-align: center;
}

.client-row {
    display: grid;
    gap: 5px;
}

.client-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.admin-chat-count {
    min-width: 24px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    padding: 0 7px;
    border: 1px solid rgba(184, 255, 60, 0.14);
    border-radius: 999px;
    background: rgba(184, 255, 60, 0.055);
    color: var(--green);
    font-size: 10px;
    font-weight: 800;
}

.client-row-preview {
    display: block;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.48);
    font-size: 11px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.order-detail-panel {
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

.admin-order-description {
    grid-column: 1 / -1;
}

@media (max-width: 760px) {
    .client-chat-head,
    .admin-chat-head {
        align-items: stretch;
        flex-direction: column;
    }

    .chat-order-tools {
        width: 100%;
    }

    .chat-order-tools select {
        max-width: none;
        min-width: 0;
        flex: 1;
    }

    .chat-card .messages,
    .admin-chat-card .messages {
        height: 340px;
    }

    .message {
        max-width: 88%;
    }
}

/* =========================================================
   ADMIN ORDER CONTROL PANEL — v0.8.0
   ========================================================= */

.admin-order-controls {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-bottom: 1px solid var(--line);
    background:
        linear-gradient(
            180deg,
            rgba(184, 255, 60, 0.035),
            rgba(255, 255, 255, 0.012)
        );
}

.admin-order-controls:empty {
    display: none;
}

.admin-control-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.admin-control-title-row > div {
    display: grid;
    gap: 4px;
}

.admin-control-title-row strong {
    font-family: "Exo 2", sans-serif;
    font-size: 18px;
}

.admin-assigned-note {
    color: rgba(255, 255, 255, 0.52);
}

.admin-control-grid {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    gap: 12px;
    align-items: end;
}

.admin-control-field {
    display: grid;
    gap: 7px;
}

.admin-control-field > span {
    color: rgba(255, 255, 255, 0.82);
    font-size: 12px;
    font-weight: 800;
}

.admin-control-field > small {
    color: rgba(255, 255, 255, 0.42);
    font-size: 10px;
    line-height: 1.45;
}

.admin-control-field select,
.admin-price-input-wrap {
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.24);
}

.admin-control-field select {
    width: 100%;
    padding: 0 12px;
    color: var(--text);
    outline: none;
}

.admin-control-field select:focus,
.admin-price-input-wrap:focus-within {
    border-color: rgba(184, 255, 60, 0.42);
    box-shadow: 0 0 0 3px rgba(184, 255, 60, 0.055);
}

.admin-control-field select:disabled,
.admin-price-input-wrap:has(input:disabled) {
    opacity: 0.55;
}

.admin-price-input-wrap {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.admin-price-input-wrap > span {
    padding-left: 13px;
    color: var(--green);
    font-weight: 900;
}

.admin-price-input-wrap input {
    width: 100%;
    min-width: 0;
    height: 42px;
    padding: 0 12px 0 6px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 800;
}

.admin-control-save {
    min-width: 150px;
    min-height: 44px;
}

.admin-control-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.admin-accept-order-btn {
    min-width: 190px;
}

.admin-order-files {
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.012);
}

.admin-order-files .order-file-list-inner {
    display: grid;
    gap: 8px;
}

.admin-order-files .order-file-row {
    background: rgba(0, 0, 0, 0.18);
}

.client-order-prices {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    margin-top: 8px;
}

.client-order-prices span {
    color: rgba(255, 255, 255, 0.46);
    font-size: 12px;
}

.client-order-prices strong {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border: 1px solid rgba(184, 255, 60, 0.18);
    border-radius: 999px;
    background: rgba(184, 255, 60, 0.06);
    color: var(--green);
    font-size: 12px;
}

@media (max-width: 760px) {
    .admin-control-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-control-grid {
        grid-template-columns: 1fr;
    }

    .admin-control-save,
    .admin-accept-order-btn,
    .admin-control-actions .btn {
        width: 100%;
    }
}

/* =========================================================
   REAL REVIEWS · v0.9.0
   ========================================================= */

.review-order-field {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.review-order-field > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.review-order-field select {
    width: 100%;
    min-height: 48px;
    padding: 0 42px 0 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    outline: 0;
    background: #08130b;
    color: white;
    font: inherit;
    cursor: pointer;
}

.review-order-field select:focus {
    border-color: rgba(184, 255, 60, 0.45);
    box-shadow: 0 0 0 3px rgba(184, 255, 60, 0.05);
}

.review-form-card#reviewFormLocked {
    display: grid;
    gap: 12px;
}

.review-form-card#reviewFormLocked.hidden {
    display: none;
}

.review-form-card#reviewFormLocked h3,
.review-form-card#reviewFormLocked p {
    margin: 0;
}

.review-photo-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 14px;
}

.review-photo-link {
    display: block;
    width: 82px;
    height: 82px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.025);
}

.review-photo-grid .review-photo {
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: cover;
    transition: transform 160ms ease;
}

.review-photo-link:hover .review-photo {
    transform: scale(1.045);
}

.review-head-copy {
    min-width: 0;
}

.review-date {
    margin-left: auto;
    align-self: flex-start;
    color: rgba(255, 255, 255, 0.35);
    font-size: 11px;
    white-space: nowrap;
}

.reviews-empty {
    grid-column: 1 / -1;
    padding: 24px;
    border: 1px dashed rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    color: var(--muted);
    text-align: center;
}

.rating-summary .stars {
    min-height: 22px;
}

@media (max-width: 560px) {
    .review-date {
        display: none;
    }

    .review-photo-link {
        width: 72px;
        height: 72px;
    }
}

/* =========================================================
   ACCOUNT VERIFICATION / PASSWORD RECOVERY
   ========================================================= */

.auth-text-action {
    justify-self: start;

    padding: 0;

    border: 0;

    background: transparent;

    color: var(--green);

    font: inherit;
    font-size: 12px;
    font-weight: 800;

    cursor: pointer;
}

.auth-text-action:hover {
    text-decoration: underline;
}

.auth-text-action:disabled {
    opacity: 0.55;
    cursor: wait;
}

.account-action-card {
    width: min(470px, 100%);
}

.account-action-text {
    margin: -8px 0 20px;

    color: var(--muted);

    font-size: 13px;
    line-height: 1.65;
}

.auth-dev-action {
    display: grid;

    gap: 8px;

    margin-top: 18px;
    padding: 14px;

    border: 1px dashed rgba(184, 255, 60, 0.35);
    border-radius: 14px;

    background: rgba(184, 255, 60, 0.06);

    color: var(--muted);

    font-size: 12px;
    line-height: 1.5;
}

.auth-dev-action strong {
    color: var(--green);
    letter-spacing: 0.08em;
}

.auth-dev-action a {
    width: fit-content;

    color: var(--green);

    font-weight: 800;
    text-decoration: none;
}

.auth-dev-action a:hover {
    text-decoration: underline;
}

/* =========================================================
   ADMIN MFA — v1.1.0
   ========================================================= */

.admin-security-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  padding: 22px 24px;
  border: 1px solid rgba(164, 255, 93, 0.16);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(164, 255, 93, 0.07), rgba(255, 255, 255, 0.025));
}

.admin-security-card h2 {
  margin: 5px 0 7px;
  font-size: 20px;
}

.admin-security-card p {
  margin: 0;
  color: var(--muted, #9ea5a0);
}

.admin-security-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}

.mfa-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: #a8afaa;
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.mfa-status-badge.is-enabled {
  border-color: rgba(164, 255, 93, 0.34);
  color: var(--accent, #a4ff5d);
  background: rgba(164, 255, 93, 0.08);
}

.danger-ghost {
  border-color: rgba(255, 108, 108, 0.22) !important;
  color: #ff9d9d !important;
}

.admin-mfa-modal-card {
  width: min(560px, calc(100vw - 28px));
}

.admin-mfa-setup {
  display: grid;
  gap: 14px;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid rgba(164, 255, 93, 0.16);
  border-radius: 16px;
  background: rgba(164, 255, 93, 0.045);
}

.admin-mfa-setup.hidden {
  display: none;
}

.mfa-setup-step strong {
  display: block;
  margin-bottom: 4px;
}

.mfa-setup-step p {
  margin: 0;
  color: var(--muted, #9ea5a0);
  font-size: 13px;
}

.mfa-secret-field {
  display: grid;
  gap: 8px;
}

.mfa-secret-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.mfa-secret-row code,
.mfa-uri-details code {
  overflow-wrap: anywhere;
  word-break: break-word;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  color: #e8f1ea;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.mfa-secret-row code {
  display: flex;
  align-items: center;
  flex: 1;
  padding: 10px 12px;
  letter-spacing: 0.08em;
}

.mfa-uri-details {
  color: var(--muted, #9ea5a0);
  font-size: 13px;
}

.mfa-uri-details summary {
  cursor: pointer;
  margin-bottom: 8px;
}

.mfa-uri-details code {
  display: block;
  padding: 10px 12px;
  max-height: 100px;
  overflow: auto;
}

.mfa-recovery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 18px 0;
}

.mfa-recovery-grid code {
  padding: 10px 12px;
  border: 1px solid rgba(164, 255, 93, 0.13);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  color: #eef8ef;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.04em;
}

#adminMfaRecoveryModal .btn + .btn {
  margin-top: 10px;
}

@media (max-width: 760px) {
  .admin-security-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-security-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .mfa-secret-row {
    flex-direction: column;
  }

  .mfa-recovery-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   38. READY-MADE CATALOG (v1.6.0)
   ========================================================= */

.catalog-view {
  position: relative;
  min-height: 65vh;
}

.catalog-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 12px 0 26px;
}

.catalog-hero h1 {
  margin: 8px 0 10px;
  max-width: 800px;
  font-family: "Exo 2", sans-serif;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.catalog-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.catalog-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 11px 15px;
  border: 1px solid rgba(184, 255, 60, 0.18);
  border-radius: 999px;
  background: rgba(184, 255, 60, 0.06);
  color: rgba(234, 255, 221, 0.8);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.catalog-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 16px rgba(184, 255, 60, 0.75);
}

.catalog-status-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 2px 0 26px;
}

.catalog-status-bar > div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(11, 27, 17, 0.66);
  color: rgba(239, 255, 241, 0.68);
}

.catalog-status-bar strong {
  color: var(--green);
  font-size: 21px;
}

.catalog-status-icon {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 9px;
  background: rgba(184, 255, 60, 0.11);
  color: var(--green);
  font-weight: 900;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.catalog-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.085);
  border-radius: 24px;
  background:
    radial-gradient(circle at 90% -10%, rgba(184, 255, 60, 0.09), transparent 36%),
    linear-gradient(180deg, rgba(15, 34, 22, 0.98), rgba(7, 18, 11, 0.98));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.catalog-card:hover {
  transform: translateY(-4px);
  border-color: rgba(184, 255, 60, 0.22);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.catalog-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(184, 255, 60, 0.13), transparent 45%),
    #08130c;
}

.catalog-card-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 320ms ease, filter 320ms ease;
}

.catalog-card:hover .catalog-card-media img {
  transform: scale(1.035);
}

.catalog-card-media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 42%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(6, 16, 10, 0.72));
}

.catalog-photo-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: rgba(184, 255, 60, 0.45);
  font-family: "Exo 2", sans-serif;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.05em;
}

.catalog-photo-nav {
  position: absolute;
  z-index: 3;
  top: 50%;
  width: 34px;
  height: 34px;
  padding: 0;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  background: rgba(4, 12, 7, 0.72);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.catalog-photo-nav:hover {
  border-color: rgba(184, 255, 60, 0.35);
  color: var(--green);
}

.catalog-photo-prev { left: 12px; }
.catalog-photo-next { right: 12px; }

.catalog-photo-count {
  position: absolute;
  z-index: 3;
  right: 12px;
  bottom: 12px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(4, 12, 7, 0.72);
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.catalog-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  padding: 19px;
}

.catalog-card-topline,
.catalog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.catalog-stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(184, 255, 60, 0.08);
  color: rgba(225, 255, 210, 0.75);
  font-size: 12px;
  font-weight: 800;
}

.catalog-stock-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.catalog-stock-badge.is-empty {
  background: rgba(255, 107, 107, 0.08);
  color: rgba(255, 210, 210, 0.75);
}

.catalog-stock-badge.is-empty::before {
  background: var(--danger);
}

.catalog-card-price {
  color: var(--green);
  font-family: "Exo 2", sans-serif;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.catalog-card h3 {
  margin: 0;
  color: var(--text);
  font-family: "Exo 2", sans-serif;
  font-size: 22px;
  line-height: 1.15;
}

.catalog-card-description {
  display: -webkit-box;
  overflow: hidden;
  min-height: 67px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.catalog-card-footer {
  margin-top: auto;
  padding-top: 4px;
}

.catalog-order-btn {
  flex: 1;
}

.catalog-admin-edit-btn {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.035);
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
}

.catalog-admin-edit-btn:hover {
  border-color: rgba(184, 255, 60, 0.28);
  color: var(--green);
}

.catalog-empty {
  display: grid;
  place-items: center;
  min-height: 340px;
  padding: 42px;
  border: 1px dashed rgba(184, 255, 60, 0.17);
  border-radius: 24px;
  text-align: center;
  background: rgba(11, 27, 17, 0.35);
}

.catalog-empty-mark {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin-bottom: 16px;
  border: 1px solid rgba(184, 255, 60, 0.18);
  border-radius: 24px;
  background: rgba(184, 255, 60, 0.07);
  color: var(--green);
  font-family: "Exo 2", sans-serif;
  font-size: 25px;
  font-weight: 800;
}

.catalog-empty h3 { margin: 0 0 7px; }
.catalog-empty p { margin: 0; color: var(--muted); }

.catalog-admin-fab {
  position: fixed;
  z-index: 35;
  right: 28px;
  bottom: 28px;
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  background: linear-gradient(145deg, #c9ff45, #66d96f);
  color: #071108;
  box-shadow: 0 18px 44px rgba(76, 217, 100, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: transform 170ms ease, box-shadow 170ms ease;
}

.catalog-admin-fab span {
  transform: translateY(-2px);
  font-size: 38px;
  font-weight: 500;
  line-height: 1;
}

.catalog-admin-fab:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 22px 52px rgba(76, 217, 100, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.catalog-deleted-panel {
  margin-top: 38px;
  padding: 22px;
  border: 1px solid rgba(255, 107, 107, 0.12);
  border-radius: 22px;
  background: rgba(42, 17, 17, 0.22);
}

.catalog-deleted-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.catalog-deleted-head h2 { margin: 5px 0 0; }
.catalog-deleted-head p { max-width: 580px; margin: 0; color: var(--muted); }

.catalog-deleted-list {
  display: grid;
  gap: 10px;
}

.catalog-deleted-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 14px 15px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.16);
}

.catalog-deleted-item strong { display: block; }
.catalog-deleted-item small { color: var(--muted); }
.catalog-purge-countdown { color: rgba(255, 188, 188, 0.68); font-size: 12px; }

.catalog-admin-modal-card {
  width: min(940px, calc(100vw - 34px));
  max-height: min(90vh, 900px);
  overflow: auto;
}

.catalog-modal-lead {
  margin: -4px 0 20px;
  color: var(--muted);
  line-height: 1.55;
}

.catalog-admin-form-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(340px, 1.1fr);
  gap: 22px;
}

.catalog-photo-editor {
  min-width: 0;
}

.catalog-photo-editor > input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.catalog-photo-drop {
  display: grid;
  place-items: center;
  min-height: 265px;
  padding: 26px;
  border: 1px dashed rgba(184, 255, 60, 0.25);
  border-radius: 19px;
  background:
    radial-gradient(circle at 50% 12%, rgba(184, 255, 60, 0.11), transparent 42%),
    rgba(6, 17, 10, 0.66);
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.catalog-photo-drop:hover {
  border-color: rgba(184, 255, 60, 0.48);
  background: rgba(14, 35, 20, 0.74);
}

.catalog-photo-drop-icon {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  margin-bottom: 10px;
  border-radius: 19px;
  background: linear-gradient(145deg, #c8ff43, #5bd46c);
  color: #071108;
  font-size: 30px;
  box-shadow: 0 13px 28px rgba(89, 218, 107, 0.18);
}

.catalog-photo-drop strong { font-size: 16px; }
.catalog-photo-drop small { margin-top: 7px; color: var(--muted); }

.catalog-photo-previews {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.catalog-photo-preview {
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: #071108;
}

.catalog-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-edit-photo-note {
  margin: 10px 0 0;
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(255, 207, 85, 0.06);
  color: rgba(255, 228, 160, 0.65);
  font-size: 12px;
  line-height: 1.45;
}

.catalog-fields {
  display: grid;
  gap: 14px;
}

.catalog-fields label,
.catalog-order-quantity-field {
  display: grid;
  gap: 7px;
  color: rgba(242, 255, 244, 0.76);
  font-size: 13px;
  font-weight: 700;
}

.catalog-fields input,
.catalog-fields textarea,
.catalog-order-quantity-field input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 13px;
  outline: none;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  padding: 12px 13px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.catalog-fields textarea { resize: vertical; min-height: 155px; }

.catalog-fields input:focus,
.catalog-fields textarea:focus,
.catalog-order-quantity-field input:focus {
  border-color: rgba(184, 255, 60, 0.34);
  box-shadow: 0 0 0 3px rgba(184, 255, 60, 0.06);
}

.catalog-number-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.catalog-admin-form-actions,
.catalog-delete-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
}

.catalog-form-spacer { flex: 1; }

.catalog-order-modal-card {
  width: min(620px, calc(100vw - 34px));
}

.catalog-order-product {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 17px;
  align-items: center;
  margin: 12px 0 18px;
}

.catalog-order-image {
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background: rgba(184, 255, 60, 0.05);
}

.catalog-order-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-order-product h2 { margin: 0 0 7px; }
.catalog-order-product p { margin: 0; color: var(--muted); line-height: 1.48; }

.catalog-order-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 15px;
}

.catalog-order-summary > div {
  display: grid;
  gap: 4px;
  padding: 12px 13px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 13px;
  background: rgba(0, 0, 0, 0.15);
}

.catalog-order-summary span { color: var(--muted); font-size: 12px; }
.catalog-order-summary strong { font-size: 17px; }

.catalog-quantity-control {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  gap: 7px;
}

.catalog-quantity-control button {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

.catalog-quantity-control button:hover {
  border-color: rgba(184, 255, 60, 0.28);
  color: var(--green);
}

.catalog-order-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin: 18px 0 6px;
  padding-top: 17px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.catalog-order-total span { color: var(--muted); }
.catalog-order-total strong {
  color: var(--green);
  font-family: "Exo 2", sans-serif;
  font-size: 31px;
}

.catalog-order-note {
  margin: 0 0 17px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.48;
}

.catalog-delete-modal-card {
  width: min(500px, calc(100vw - 34px));
}

.catalog-delete-modal-card p {
  color: var(--muted);
  line-height: 1.55;
}

.catalog-delete-actions { justify-content: flex-end; }
.catalog-delete-confirm {
  background: linear-gradient(145deg, #ff7c7c, #dc5050);
  color: #180707;
}

@media (max-width: 1050px) {
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .catalog-admin-form-grid { grid-template-columns: 1fr; }
  .catalog-photo-drop { min-height: 210px; }
}

@media (max-width: 760px) {
  .catalog-hero,
  .catalog-deleted-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .catalog-status-bar { grid-template-columns: 1fr; }
  .catalog-grid { grid-template-columns: 1fr; }
  .catalog-number-row { grid-template-columns: 1fr; }
  .catalog-order-product { grid-template-columns: 100px 1fr; }
  .catalog-order-summary { grid-template-columns: 1fr; }
  .catalog-deleted-item { grid-template-columns: 1fr; }
  .catalog-admin-fab { right: 18px; bottom: 18px; width: 60px; height: 60px; }
}

/* =========================================================
   39. MOBILE APP NAVIGATION
   Keeps all primary views, including the ready-made catalog,
   reachable when the desktop navigation collapses.
   ========================================================= */

.mobile-app-nav {
    display: none;
}

@media (max-width: 1100px) {
    body {
        padding-bottom: 84px;
    }

    .mobile-app-nav {
        position: fixed;
        z-index: 180;
        left: 50%;
        bottom: 14px;
        transform: translateX(-50%);
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        width: min(calc(100% - 28px), 640px);
        padding: 7px;
        gap: 5px;
        border: 1px solid rgba(174, 255, 80, 0.16);
        border-radius: 22px;
        background: rgba(5, 17, 10, 0.92);
        box-shadow: 0 18px 55px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.04);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    .mobile-app-nav__item {
        min-width: 0;
        min-height: 58px;
        padding: 7px 5px;
        border: 0;
        border-radius: 16px;
        background: transparent;
        color: rgba(226, 239, 229, 0.58);
        font: inherit;
        font-size: 11px;
        font-weight: 800;
        line-height: 1.12;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        transition: background .2s ease, color .2s ease, transform .2s ease;
    }

    .mobile-app-nav__item:hover,
    .mobile-app-nav__item.is-active {
        color: #eaffcf;
        background: linear-gradient(180deg, rgba(167, 255, 60, 0.16), rgba(92, 212, 92, 0.08));
    }

    .mobile-app-nav__item:active {
        transform: translateY(1px);
    }

    .mobile-app-nav__icon {
        font-size: 20px;
        line-height: 1;
        color: #a9ff3d;
    }
}

@media (max-width: 520px) {
    .mobile-app-nav {
        bottom: 8px;
        width: calc(100% - 16px);
        border-radius: 18px;
    }

    .mobile-app-nav__item {
        min-height: 54px;
        font-size: 10px;
    }
}

@media (max-width: 1100px) {
    .catalog-admin-fab {
        z-index: 190;
        bottom: 96px;
    }
}

@media (max-width: 520px) {
    .catalog-admin-fab {
        right: 14px;
        bottom: 82px;
        width: 58px;
        height: 58px;
        border-radius: 19px;
    }
}

/* =========================================================
   40. THEME SWITCHER + LIGHT THEME (v1.6.1)
   Dark remains the default. The selected theme is persisted
   in localStorage and restored by theme-init.js before paint.
   ========================================================= */


:root[data-theme="dark"] {
    color-scheme: dark;
}

:root[data-theme="light"] {
    color-scheme: light;
}

.theme-toggle {
    width: 56px;
    height: 38px;
    padding: 4px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text);
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(184, 255, 60, 0.28);
    background: rgba(184, 255, 60, 0.07);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 3px;
}

.theme-toggle__track {
    position: relative;
    width: 46px;
    height: 28px;
    display: block;
    overflow: hidden;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(184, 255, 60, 0.12), rgba(82, 210, 115, 0.06));
    box-shadow: inset 0 0 0 1px rgba(184, 255, 60, 0.1);
}

.theme-toggle__thumb {
    position: absolute;
    z-index: 1;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 8px;
    background: linear-gradient(145deg, #caff49, #6fdc6c);
    box-shadow: 0 4px 11px rgba(49, 139, 71, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transform: translateX(18px);
    transition: transform .26s cubic-bezier(.2,.8,.2,1), background .2s ease, box-shadow .2s ease;
}

.theme-toggle__sun,
.theme-toggle__moon {
    position: absolute;
    z-index: 2;
    top: 7px;
    width: 14px;
    height: 14px;
    display: grid;
    place-items: center;
    pointer-events: none;
    transition: color .2s ease, opacity .2s ease;
}

.theme-toggle__sun { left: 7px; color: rgba(244, 255, 246, 0.38); }
.theme-toggle__moon { right: 7px; color: #102017; }

.theme-toggle svg {
    width: 14px;
    height: 14px;
    display: block;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-toggle__moon svg path {
    fill: currentColor;
    stroke: none;
}

:root[data-theme="light"] {
    --bg: #f5f8f3;
    --bg2: #eef5ec;
    --panel: #ffffff;
    --panel2: #f6faf4;
    --line: rgba(25, 61, 37, 0.12);
    --text: #17251b;
    --muted: rgba(23, 37, 27, 0.58);
    --green: #3f8f34;
    --green2: #45aa61;
    --green3: #187846;
    --danger: #d64f55;
    --shadow: 0 22px 65px rgba(38, 73, 47, 0.13);
}

:root[data-theme="light"] .theme-toggle {
    border-color: rgba(28, 76, 41, 0.14);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 8px 24px rgba(37, 73, 46, 0.08);
}

:root[data-theme="light"] .theme-toggle__track {
    background: linear-gradient(135deg, rgba(255, 204, 85, 0.22), rgba(119, 209, 93, 0.12));
    box-shadow: inset 0 0 0 1px rgba(63, 143, 52, 0.12);
}

:root[data-theme="light"] .theme-toggle__thumb {
    transform: translateX(0);
    background: linear-gradient(145deg, #fff5a8, #b8ee6e);
    box-shadow: 0 4px 11px rgba(122, 152, 64, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

:root[data-theme="light"] .theme-toggle__sun { color: #5e6c19; }
:root[data-theme="light"] .theme-toggle__moon { color: rgba(23, 37, 27, 0.34); }

:root[data-theme="light"] body {
    background:
        radial-gradient(circle at 82% 2%, rgba(112, 209, 95, 0.17), transparent 27%),
        radial-gradient(circle at 8% 35%, rgba(188, 235, 114, 0.14), transparent 24%),
        linear-gradient(180deg, #f8faf6 0%, #f4f8f2 52%, #edf5eb 100%);
    color: var(--text);
}

:root[data-theme="light"] .ambient-a {
    background: rgba(91, 196, 98, 0.12);
}

:root[data-theme="light"] .ambient-b {
    background: rgba(92, 197, 154, 0.09);
}

:root[data-theme="light"] .topbar {
    background: rgba(248, 251, 247, 0.86);
    border-bottom-color: rgba(27, 65, 39, 0.1);
    box-shadow: 0 8px 30px rgba(43, 79, 50, 0.045);
}

:root[data-theme="light"] .brand,
:root[data-theme="light"] .trust-row strong,
:root[data-theme="light"] .footer strong,
:root[data-theme="light"] .client-row {
    color: var(--text);
}

:root[data-theme="light"] .muted,
:root[data-theme="light"] .trust-row span,
:root[data-theme="light"] .demo-control-label,
:root[data-theme="light"] .demo-specs small,
:root[data-theme="light"] .step,
:root[data-theme="light"] .message small,
:root[data-theme="light"] .review-date,
:root[data-theme="light"] .client-row-preview,
:root[data-theme="light"] .admin-assigned-note,
:root[data-theme="light"] .admin-control-field > small,
:root[data-theme="light"] .client-order-prices span,
:root[data-theme="light"] .review-photo-meta {
    color: rgba(23, 37, 27, 0.48);
}

:root[data-theme="light"] .nav-link {
    color: rgba(23, 37, 27, 0.58);
}

:root[data-theme="light"] .nav-link:hover,
:root[data-theme="light"] .nav-link.is-active {
    color: #347d2c;
    background: rgba(87, 166, 63, 0.09);
    border-color: rgba(62, 143, 52, 0.15);
}

:root[data-theme="light"] .brand-mark {
    border-color: rgba(67, 144, 54, 0.22);
    background: linear-gradient(145deg, rgba(190, 241, 115, 0.28), rgba(75, 178, 95, 0.13));
    color: #397f32;
}

:root[data-theme="light"] .language-button {
    border-color: rgba(27, 67, 39, 0.12);
    background: rgba(255, 255, 255, 0.72);
    color: rgba(23, 37, 27, 0.76);
    box-shadow: 0 6px 20px rgba(42, 76, 50, 0.045);
}

:root[data-theme="light"] .language-button:hover {
    background: #ffffff;
    border-color: rgba(63, 143, 52, 0.22);
    color: var(--text);
}

:root[data-theme="light"] .language-chevron {
    color: rgba(23, 37, 27, 0.38);
}

:root[data-theme="light"] .language-dropdown {
    border-color: rgba(27, 67, 39, 0.12);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 20px 50px rgba(40, 73, 47, 0.14);
}

:root[data-theme="light"] .language-option {
    color: rgba(23, 37, 27, 0.68);
}

:root[data-theme="light"] .language-option:hover {
    color: var(--text);
    background: rgba(54, 123, 47, 0.06);
}

:root[data-theme="light"] .language-option.is-active {
    color: #347d2c;
    border-color: rgba(63, 143, 52, 0.14);
    background: rgba(84, 164, 61, 0.09);
}

:root[data-theme="light"] .language-option small {
    color: rgba(23, 37, 27, 0.35);
}

:root[data-theme="light"] .btn-primary {
    border-color: rgba(57, 128, 44, 0.14);
    background: linear-gradient(145deg, #c6f263, #79d45e);
    color: #173018;
    box-shadow: 0 11px 27px rgba(80, 155, 67, 0.17);
}

:root[data-theme="light"] .btn-primary:hover {
    background: linear-gradient(145deg, #d4fa78, #88dc69);
    box-shadow: 0 14px 34px rgba(80, 155, 67, 0.22);
}

:root[data-theme="light"] .btn-ghost,
:root[data-theme="light"] .catalog-admin-edit-btn,
:root[data-theme="light"] .chat-refresh-btn,
:root[data-theme="light"] .review-photo-button {
    border-color: rgba(27, 67, 39, 0.12);
    background: rgba(255, 255, 255, 0.72);
    color: rgba(23, 37, 27, 0.7);
}

:root[data-theme="light"] .btn-ghost:hover,
:root[data-theme="light"] .catalog-admin-edit-btn:hover,
:root[data-theme="light"] .chat-refresh-btn:hover:not(:disabled),
:root[data-theme="light"] .review-photo-button:hover {
    background: #ffffff;
    color: var(--text);
    border-color: rgba(63, 143, 52, 0.22);
}

:root[data-theme="light"] .feature-strip article,
:root[data-theme="light"] .review-card,
:root[data-theme="light"] .form-card,
:root[data-theme="light"] .confirm-card,
:root[data-theme="light"] .review-form-card,
:root[data-theme="light"] .rating-summary,
:root[data-theme="light"] .order-summary-card,
:root[data-theme="light"] .chat-card,
:root[data-theme="light"] .admin-chat-card,
:root[data-theme="light"] .client-list {
    border-color: rgba(27, 67, 39, 0.11);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 14px 36px rgba(40, 75, 48, 0.06);
}

:root[data-theme="light"] .feature-icon {
    background: rgba(82, 166, 68, 0.1);
}

:root[data-theme="light"] .category-card {
    border-color: rgba(29, 73, 42, 0.12);
    background:
        radial-gradient(circle at 13% 10%, rgba(170, 232, 94, 0.17), transparent 35%),
        linear-gradient(160deg, rgba(255,255,255,.96), rgba(241,248,238,.92));
    color: var(--text);
    box-shadow: 0 14px 40px rgba(41, 77, 48, 0.07);
}

:root[data-theme="light"] .category-card::before {
    background: radial-gradient(circle, rgba(102, 192, 75, 0.13), transparent 68%);
}

:root[data-theme="light"] .category-card:hover {
    border-color: rgba(74, 158, 58, 0.24);
    box-shadow: 0 20px 50px rgba(41, 77, 48, 0.11);
}

:root[data-theme="light"] .category-arrow {
    color: rgba(23, 37, 27, 0.34);
}

:root[data-theme="light"] .interactive-lab {
    border-color: rgba(26, 67, 39, 0.11);
    background:
        radial-gradient(circle at 85% 15%, rgba(116, 207, 91, 0.13), transparent 28%),
        linear-gradient(145deg, rgba(255,255,255,.94), rgba(239,247,237,.9));
    box-shadow: 0 20px 55px rgba(40, 76, 48, 0.08);
}

:root[data-theme="light"] .model-type-chip,
:root[data-theme="light"] .material-chip {
    border-color: rgba(27, 67, 39, 0.12);
    background: rgba(255, 255, 255, 0.72);
    color: rgba(23, 37, 27, 0.6);
}

:root[data-theme="light"] .model-type-chip:hover,
:root[data-theme="light"] .material-chip:hover {
    color: var(--text);
    border-color: rgba(63, 143, 52, 0.22);
}

:root[data-theme="light"] .model-type-chip.is-active,
:root[data-theme="light"] .material-chip.is-active {
    background: linear-gradient(145deg, #c6f263, #79d45e);
    color: #173018;
}

:root[data-theme="light"] .demo-specs > div,
:root[data-theme="light"] .order-files-panel,
:root[data-theme="light"] .order-file-row,
:root[data-theme="light"] .model-analysis-grid > div,
:root[data-theme="light"] .remote-model-stats > div,
:root[data-theme="light"] .catalog-order-summary > div,
:root[data-theme="light"] .catalog-deleted-item {
    border-color: rgba(27, 67, 39, 0.1);
    background: rgba(246, 250, 244, 0.92);
}

:root[data-theme="light"] .demo-specs strong {
    color: rgba(23, 37, 27, 0.8);
}

/* The 3D canvas and photographic cards intentionally remain dark in light mode:
   they act as media/workspace surfaces and keep geometry contrast predictable. */
:root[data-theme="light"] .model-stage,
:root[data-theme="light"] .real-model-stage,
:root[data-theme="light"] .modal-model-stage,
:root[data-theme="light"] .work-card,
:root[data-theme="light"] .catalog-card-media,
:root[data-theme="light"] .catalog-photo-preview {
    color-scheme: dark;
}

:root[data-theme="light"] .home-model-switcher {
    border-color: rgba(184, 255, 60, 0.18);
    background: rgba(6, 19, 10, 0.88);
}

:root[data-theme="light"] .work-card .work-meta,
:root[data-theme="light"] .image-overlay {
    color: #f4fff6;
}

:root[data-theme="light"] .work-card .work-meta p,
:root[data-theme="light"] .image-overlay p {
    color: rgba(244, 255, 246, 0.7);
}

:root[data-theme="light"] .review-card {
    background: linear-gradient(155deg, rgba(255,255,255,.94), rgba(244,249,242,.9));
}

:root[data-theme="light"] .stars {
    color: #629728;
}

:root[data-theme="light"] .step.is-active,
:root[data-theme="light"] .required-badge,
:root[data-theme="light"] .dropzone,
:root[data-theme="light"] .success-icon,
:root[data-theme="light"] .order-upload-notice,
:root[data-theme="light"] .auth-dev-action,
:root[data-theme="light"] .catalog-hero-badge,
:root[data-theme="light"] .catalog-empty-mark {
    border-color: rgba(63, 143, 52, 0.18);
    background: rgba(86, 169, 65, 0.08);
}

:root[data-theme="light"] .calculator-card {
    border-color: rgba(69, 153, 56, 0.2);
    background: linear-gradient(180deg, rgba(196, 239, 119, 0.17), rgba(255, 255, 255, 0.85));
    box-shadow: 0 18px 45px rgba(47, 86, 54, 0.08);
}

:root[data-theme="light"] .form-card input,
:root[data-theme="light"] .form-card select,
:root[data-theme="light"] .form-card textarea,
:root[data-theme="light"] .modal-card input,
:root[data-theme="light"] .review-form-card textarea,
:root[data-theme="light"] .chat-form input,
:root[data-theme="light"] .chat-order-tools select,
:root[data-theme="light"] .review-order-field select,
:root[data-theme="light"] .admin-control-field select,
:root[data-theme="light"] .admin-price-input-wrap,
:root[data-theme="light"] .catalog-fields input,
:root[data-theme="light"] .catalog-fields textarea,
:root[data-theme="light"] .catalog-order-quantity-field input {
    border-color: rgba(27, 67, 39, 0.13);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}

:root[data-theme="light"] .form-card input::placeholder,
:root[data-theme="light"] .form-card textarea::placeholder,
:root[data-theme="light"] .modal-card input::placeholder,
:root[data-theme="light"] .review-form-card textarea::placeholder,
:root[data-theme="light"] .chat-form input::placeholder,
:root[data-theme="light"] .catalog-fields input::placeholder,
:root[data-theme="light"] .catalog-fields textarea::placeholder {
    color: rgba(23, 37, 27, 0.35);
}

:root[data-theme="light"] .security-note {
    border-color: rgba(177, 125, 28, 0.2);
    background: rgba(255, 190, 64, 0.1);
    color: #7b5811;
}

:root[data-theme="light"] .message {
    border-color: rgba(27, 67, 39, 0.11);
    background: #f1f6ef;
}

:root[data-theme="light"] .message.mine {
    border-color: rgba(65, 145, 54, 0.16);
    background: linear-gradient(145deg, rgba(204, 240, 138, 0.32), rgba(226, 247, 213, 0.72));
}

:root[data-theme="light"] .message-sender,
:root[data-theme="light"] .admin-control-field > span {
    color: rgba(23, 37, 27, 0.72);
}

:root[data-theme="light"] .client-row:hover,
:root[data-theme="light"] .client-row.is-active {
    background: rgba(78, 155, 61, 0.07);
}

:root[data-theme="light"] .order-detail-toggle,
:root[data-theme="light"] .chat-form,
:root[data-theme="light"] .admin-order-controls,
:root[data-theme="light"] .admin-order-files {
    background: rgba(246, 250, 244, 0.7);
}

:root[data-theme="light"] .modal-backdrop {
    background: rgba(25, 42, 30, 0.38);
}

:root[data-theme="light"] .modal-card,
:root[data-theme="light"] .model-viewer-modal-card {
    border-color: rgba(27, 67, 39, 0.13);
    background: rgba(253, 255, 252, 0.98);
    box-shadow: 0 28px 85px rgba(26, 56, 34, 0.18);
}

:root[data-theme="light"] .toast {
    border-color: rgba(63, 143, 52, 0.2);
    background: rgba(253, 255, 252, 0.98);
    color: var(--text);
    box-shadow: 0 18px 45px rgba(35, 69, 42, 0.14);
}

:root[data-theme="light"] .review-form-card {
    background:
        radial-gradient(circle at 90% 10%, rgba(171, 231, 97, 0.16), transparent 30%),
        rgba(255, 255, 255, 0.92);
}

:root[data-theme="light"] .review-form-card .star-input button {
    color: rgba(23, 37, 27, 0.2);
}

:root[data-theme="light"] .review-form-card .star-input button.is-on {
    color: #659d2c;
}

:root[data-theme="light"] .review-photo-plus {
    background: rgba(79, 158, 61, 0.1);
}

:root[data-theme="light"] .chat-card .messages,
:root[data-theme="light"] .admin-chat-card .messages {
    background:
        linear-gradient(rgba(79, 158, 61, 0.025), rgba(79, 158, 61, 0.025)),
        rgba(249, 252, 248, 0.8);
}

:root[data-theme="light"] .admin-price-input-wrap input {
    color: var(--text);
}

:root[data-theme="light"] .admin-order-files .order-file-row {
    background: rgba(240, 246, 238, 0.86);
}

:root[data-theme="light"] .client-order-prices strong {
    background: rgba(79, 158, 61, 0.08);
}

:root[data-theme="light"] .admin-security-card {
    border-color: rgba(77, 158, 64, 0.17);
    background: linear-gradient(135deg, rgba(190, 236, 116, 0.17), rgba(255, 255, 255, 0.82));
}

:root[data-theme="light"] .mfa-status-badge {
    background: rgba(28, 65, 40, 0.055);
}

:root[data-theme="light"] .mfa-status-badge.is-enabled {
    background: rgba(80, 159, 63, 0.1);
}

:root[data-theme="light"] .admin-mfa-setup {
    background: rgba(177, 229, 106, 0.11);
}

:root[data-theme="light"] .mfa-secret-row code,
:root[data-theme="light"] .mfa-uri-details code,
:root[data-theme="light"] .mfa-recovery-grid code {
    background: #edf4e9;
    color: #24402a;
}

:root[data-theme="light"] .catalog-status-bar > div {
    border-color: rgba(29, 72, 41, 0.1);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 10px 28px rgba(40, 76, 48, 0.045);
}

:root[data-theme="light"] .catalog-status-icon {
    background: rgba(79, 158, 61, 0.1);
}

:root[data-theme="light"] .catalog-card {
    border-color: rgba(28, 69, 40, 0.11);
    background:
        radial-gradient(circle at 85% 0%, rgba(177, 233, 103, 0.14), transparent 32%),
        linear-gradient(165deg, rgba(255,255,255,.97), rgba(242,248,240,.94));
    box-shadow: 0 18px 48px rgba(39, 74, 46, 0.075);
}

:root[data-theme="light"] .catalog-card:hover {
    border-color: rgba(72, 155, 57, 0.23);
    box-shadow: 0 24px 58px rgba(39, 74, 46, 0.12);
}

:root[data-theme="light"] .catalog-stock-badge {
    background: rgba(74, 157, 59, 0.09);
    color: #44733a;
}

:root[data-theme="light"] .catalog-stock-badge.is-empty {
    background: rgba(214, 79, 85, 0.08);
    color: #9e4b50;
}

:root[data-theme="light"] .catalog-empty {
    border-color: rgba(69, 151, 56, 0.17);
    background: rgba(255, 255, 255, 0.6);
}

:root[data-theme="light"] .catalog-deleted-panel {
    border-color: rgba(190, 82, 82, 0.14);
    background: rgba(255, 239, 239, 0.62);
}

:root[data-theme="light"] .catalog-purge-countdown {
    color: #a25353;
}

:root[data-theme="light"] .catalog-photo-drop {
    border-color: rgba(69, 151, 56, 0.24);
    background:
        radial-gradient(circle at 50% 12%, rgba(175, 230, 99, 0.19), transparent 42%),
        rgba(249, 252, 247, 0.94);
}

:root[data-theme="light"] .catalog-photo-drop:hover {
    border-color: rgba(69, 151, 56, 0.42);
    background: rgba(242, 249, 239, 0.98);
}

:root[data-theme="light"] .catalog-edit-photo-note {
    background: rgba(255, 195, 70, 0.12);
    color: #7b5a1d;
}

:root[data-theme="light"] .catalog-fields label,
:root[data-theme="light"] .catalog-order-quantity-field {
    color: rgba(23, 37, 27, 0.74);
}

:root[data-theme="light"] .catalog-quantity-control button {
    border-color: rgba(27, 67, 39, 0.12);
    background: rgba(246, 250, 244, 0.95);
}

:root[data-theme="light"] .catalog-order-total {
    border-top-color: rgba(27, 67, 39, 0.1);
}

:root[data-theme="light"] .mobile-app-nav {
    border-color: rgba(54, 126, 47, 0.15);
    background: rgba(250, 253, 249, 0.92);
    box-shadow: 0 18px 48px rgba(40, 75, 47, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

:root[data-theme="light"] .mobile-app-nav__item {
    color: rgba(23, 37, 27, 0.57);
}

:root[data-theme="light"] .mobile-app-nav__item:hover,
:root[data-theme="light"] .mobile-app-nav__item.is-active {
    color: #2e7029;
    background: linear-gradient(180deg, rgba(185, 234, 111, 0.25), rgba(99, 190, 82, 0.09));
}

:root[data-theme="light"] .mobile-app-nav__icon {
    color: #438d37;
}

@media (max-width: 760px) {
    .theme-toggle {
        width: 50px;
        height: 36px;
    }

    .theme-toggle__track {
        width: 42px;
        height: 26px;
    }

    .theme-toggle__thumb {
        width: 20px;
        height: 20px;
    }

    :root:not([data-theme="light"]) .theme-toggle__thumb {
        transform: translateX(16px);
    }

    .theme-toggle__sun,
    .theme-toggle__moon {
        top: 6px;
        width: 13px;
        height: 13px;
    }

    .theme-toggle__sun { left: 6px; }
    .theme-toggle__moon { right: 6px; }
}

@media (max-width: 520px) {
    .nav-actions { gap: 5px; }
    .language-button { min-width: 78px; padding-inline: 8px; }
    .theme-toggle { width: 44px; padding-inline: 2px; }
    .theme-toggle__track { width: 38px; }
    :root:not([data-theme="light"]) .theme-toggle__thumb { transform: translateX(12px); }
}


/* =========================================================
   41. LIGHT THEME POLISH + THEME CONTROL (v1.6.2)
   Improves contrast, gives the light theme its own visual
   language and refines the theme switch without changing
   the dark theme layout or application behavior.
   ========================================================= */

/* Refined compact segmented theme switch. */
.theme-toggle {
    width: 70px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
}

.theme-toggle:hover {
    transform: translateY(-1px);
    background: transparent;
    box-shadow: none;
}

.theme-toggle__track {
    position: relative;
    width: 66px;
    height: 34px;
    overflow: visible;
    border: 1px solid rgba(184, 255, 60, 0.13);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.018)),
        #0a160e;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.045),
        0 8px 22px rgba(0,0,0,.18);
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.theme-toggle:hover .theme-toggle__track {
    border-color: rgba(184, 255, 60, 0.28);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.06),
        0 10px 26px rgba(0,0,0,.22),
        0 0 0 3px rgba(184,255,60,.035);
}

.theme-toggle__thumb {
    top: 3px;
    left: 3px;
    width: 26px;
    height: 26px;
    border: 1px solid rgba(184,255,60,.18);
    border-radius: 50%;
    background: linear-gradient(145deg, #203225, #102018);
    box-shadow:
        0 5px 13px rgba(0,0,0,.32),
        inset 0 1px 0 rgba(255,255,255,.08);
    transform: translateX(32px);
}

.theme-toggle__sun,
.theme-toggle__moon {
    top: 9px;
    width: 16px;
    height: 16px;
}

.theme-toggle__sun { left: 9px; color: rgba(222, 237, 224, 0.38); }
.theme-toggle__moon { right: 9px; color: #caff6b; }

.theme-toggle svg {
    width: 16px;
    height: 16px;
    stroke-width: 1.9;
}

/* A softer, deliberately designed light palette. */
:root[data-theme="light"] {
    --bg: #f2f5ef;
    --bg2: #e9f0e7;
    --panel: #ffffff;
    --panel2: #f6f9f4;
    --line: rgba(36, 67, 44, 0.13);
    --text: #18231b;
    --muted: rgba(35, 53, 40, 0.64);
    --green: #4a8f38;
    --green2: #57ad68;
    --green3: #26784c;
    --shadow: 0 22px 62px rgba(44, 73, 50, 0.12);
}

:root[data-theme="light"] body {
    background:
        radial-gradient(circle at 88% 3%, rgba(142, 205, 95, 0.20), transparent 25%),
        radial-gradient(circle at 8% 38%, rgba(104, 184, 123, 0.10), transparent 24%),
        linear-gradient(rgba(55, 96, 62, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(55, 96, 62, 0.025) 1px, transparent 1px),
        linear-gradient(180deg, #f9faf7 0%, #f3f7f1 48%, #edf3ea 100%);
    background-size: auto, auto, 42px 42px, 42px 42px, auto;
    color: var(--text);
}

:root[data-theme="light"] .topbar {
    background: rgba(252, 253, 250, 0.89);
    border-bottom-color: rgba(36, 67, 44, 0.10);
    box-shadow: 0 8px 28px rgba(45, 72, 50, 0.055);
}

/* Switch state in light mode. */
:root[data-theme="light"] .theme-toggle {
    border: 0;
    background: transparent;
    box-shadow: none;
}

:root[data-theme="light"] .theme-toggle__track {
    border-color: rgba(54, 103, 59, 0.16);
    background:
        linear-gradient(180deg, rgba(255,255,255,.92), rgba(239,244,235,.92)),
        #eef3eb;
    box-shadow:
        inset 0 1px 0 #fff,
        0 8px 20px rgba(54, 82, 58, 0.10);
}

:root[data-theme="light"] .theme-toggle:hover .theme-toggle__track {
    border-color: rgba(79, 143, 65, 0.32);
    box-shadow:
        inset 0 1px 0 #fff,
        0 10px 26px rgba(54, 82, 58, 0.13),
        0 0 0 3px rgba(79,143,65,.045);
}

:root[data-theme="light"] .theme-toggle__thumb {
    transform: translateX(0);
    border-color: rgba(196, 154, 45, 0.16);
    background: linear-gradient(145deg, #fff8cc, #f1dc79);
    box-shadow:
        0 5px 13px rgba(126, 109, 54, 0.18),
        inset 0 1px 0 rgba(255,255,255,.95);
}

:root[data-theme="light"] .theme-toggle__sun { color: #7b641d; }
:root[data-theme="light"] .theme-toggle__moon { color: rgba(46, 61, 49, 0.38); }

/* Light-theme typography: explicit enough that no pale dark-theme
   text can disappear on white surfaces. Dark media exceptions follow. */
:root[data-theme="light"] main h1,
:root[data-theme="light"] main h2,
:root[data-theme="light"] main h3,
:root[data-theme="light"] main h4,
:root[data-theme="light"] main strong,
:root[data-theme="light"] main label {
    color: var(--text);
}

:root[data-theme="light"] .hero p,
:root[data-theme="light"] .section-heading p,
:root[data-theme="light"] .lab-copy > p,
:root[data-theme="light"] .catalog-hero p,
:root[data-theme="light"] .catalog-card-description,
:root[data-theme="light"] .catalog-empty p,
:root[data-theme="light"] .catalog-deleted-head p,
:root[data-theme="light"] .catalog-modal-lead,
:root[data-theme="light"] .catalog-order-product p,
:root[data-theme="light"] .catalog-order-note,
:root[data-theme="light"] .reviews-empty,
:root[data-theme="light"] .orders-empty,
:root[data-theme="light"] .orders-loading,
:root[data-theme="light"] .chat-stage-note {
    color: rgba(35, 53, 40, 0.64);
}

:root[data-theme="light"] .section-kicker,
:root[data-theme="light"] .eyebrow {
    color: #477d35;
}

/* A small visual identity for the light theme rather than a plain white inversion. */
:root[data-theme="light"] .hero-copy {
    position: relative;
    overflow: hidden;
    padding: 34px 36px;
    border: 1px solid rgba(53, 95, 59, 0.12);
    border-radius: 28px;
    background:
        radial-gradient(circle at 96% 6%, rgba(174, 222, 103, 0.20), transparent 28%),
        linear-gradient(145deg, rgba(255,255,255,.96), rgba(246,249,243,.88));
    box-shadow:
        0 22px 58px rgba(45, 74, 51, 0.085),
        inset 0 1px 0 rgba(255,255,255,.95);
}

:root[data-theme="light"] .hero-copy::after {
    content: "";
    position: absolute;
    width: 150px;
    height: 150px;
    right: -72px;
    bottom: -88px;
    border: 22px solid rgba(89, 157, 69, 0.055);
    border-radius: 50%;
    pointer-events: none;
}

:root[data-theme="light"] .eyebrow {
    width: fit-content;
    margin-bottom: 18px;
    padding: 7px 10px;
    border: 1px solid rgba(79, 143, 65, 0.13);
    border-radius: 999px;
    background: rgba(104, 177, 78, 0.07);
}

:root[data-theme="light"] .trust-row {
    padding-top: 18px;
    border-top: 1px solid rgba(44, 79, 50, 0.09);
}

:root[data-theme="light"] .feature-strip article {
    position: relative;
    overflow: hidden;
    background: linear-gradient(155deg, rgba(255,255,255,.96), rgba(245,249,242,.90));
    box-shadow: 0 12px 30px rgba(45, 76, 51, 0.055);
}

:root[data-theme="light"] .feature-strip article::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, transparent, rgba(79, 151, 61, .32), transparent);
}

:root[data-theme="light"] .feature-strip small {
    color: rgba(35, 53, 40, 0.57);
}

:root[data-theme="light"] .section-heading:not(.compact) {
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(42, 78, 49, 0.085);
}

:root[data-theme="light"] .category-card,
:root[data-theme="light"] .catalog-card,
:root[data-theme="light"] .review-card,
:root[data-theme="light"] .form-card,
:root[data-theme="light"] .order-summary-card,
:root[data-theme="light"] .chat-card,
:root[data-theme="light"] .admin-chat-card {
    box-shadow:
        0 16px 42px rgba(45, 77, 51, 0.07),
        inset 0 1px 0 rgba(255,255,255,.9);
}

:root[data-theme="light"] .category-card:hover,
:root[data-theme="light"] .catalog-card:hover {
    transform: translateY(-4px);
}

:root[data-theme="light"] .category-card p {
    color: rgba(35, 53, 40, 0.60);
}

:root[data-theme="light"] .catalog-hero {
    align-items: center;
    margin-bottom: 16px;
    padding: 28px 30px;
    border: 1px solid rgba(50, 91, 56, 0.11);
    border-radius: 26px;
    background:
        radial-gradient(circle at 92% 15%, rgba(168, 219, 96, 0.18), transparent 28%),
        linear-gradient(145deg, rgba(255,255,255,.96), rgba(243,248,240,.91));
    box-shadow: 0 18px 48px rgba(46, 77, 51, 0.075);
}

/* These were pale-on-dark in v1.6.1 and could effectively disappear. */
:root[data-theme="light"] .catalog-hero-badge {
    border-color: rgba(72, 139, 58, 0.18);
    background: rgba(96, 171, 72, 0.09);
    color: #3f7435;
}

:root[data-theme="light"] .catalog-status-bar > div {
    color: rgba(34, 53, 39, 0.72);
}

:root[data-theme="light"] .catalog-status-bar strong,
:root[data-theme="light"] .catalog-status-icon,
:root[data-theme="light"] .catalog-card-price,
:root[data-theme="light"] .catalog-order-total strong,
:root[data-theme="light"] .success-order-id,
:root[data-theme="light"] .accent {
    color: #4a8738;
}

:root[data-theme="light"] .catalog-deleted-item small,
:root[data-theme="light"] .catalog-order-summary span,
:root[data-theme="light"] .catalog-order-total span,
:root[data-theme="light"] .review-order-field > span {
    color: rgba(35, 53, 40, 0.57);
}

:root[data-theme="light"] .catalog-admin-fab,
:root[data-theme="light"] .catalog-photo-drop-icon {
    color: #102015;
}

/* General controls and secondary labels. */
:root[data-theme="light"] .star-input button,
:root[data-theme="light"] .review-form-card .star-input button {
    color: rgba(46, 64, 49, 0.23);
}

:root[data-theme="light"] .status-badge.status-new,
:root[data-theme="light"] .status-badge.status-under-review,
:root[data-theme="light"] .status-badge.status-awaiting-customer,
:root[data-theme="light"] .status-badge.status-quote-ready,
:root[data-theme="light"] .status-badge.status-accepted,
:root[data-theme="light"] .status-badge.status-printing,
:root[data-theme="light"] .status-badge.status-ready,
:root[data-theme="light"] .status-badge.status-shipped,
:root[data-theme="light"] .status-badge.status-completed {
    border-color: rgba(74, 143, 56, 0.18);
    background: rgba(82, 156, 63, 0.08);
    color: #477d36;
}

:root[data-theme="light"] .status-badge.status-cancelled,
:root[data-theme="light"] .order-cancel-btn,
:root[data-theme="light"] .order-cancel-confirm,
:root[data-theme="light"] .chat-error-state {
    color: #a84f54;
}

/* Preserve white text on deliberately dark media/workspace surfaces. */
:root[data-theme="light"] .work-card h3,
:root[data-theme="light"] .work-card strong,
:root[data-theme="light"] .image-overlay strong,
:root[data-theme="light"] .model-stage strong,
:root[data-theme="light"] .real-model-stage strong,
:root[data-theme="light"] .modal-model-stage strong {
    color: #f4fff6;
}

:root[data-theme="light"] .home-model-arrow { color: rgba(255,255,255,.82); }
:root[data-theme="light"] .home-model-counter { color: rgba(255,255,255,.62); }
:root[data-theme="light"] .stage-hud { color: rgba(255,255,255,.42); }
:root[data-theme="light"] .stage-hint { color: rgba(255,255,255,.34); }
:root[data-theme="light"] .catalog-photo-nav { color: #fff; }
:root[data-theme="light"] .catalog-photo-count { color: rgba(255,255,255,.82); }

@media (max-width: 980px) {
    :root[data-theme="light"] .hero-copy {
        padding: 28px;
    }

    :root[data-theme="light"] .catalog-hero {
        padding: 24px;
    }
}

@media (max-width: 760px) {
    .theme-toggle {
        width: 62px;
        height: 36px;
    }

    .theme-toggle__track {
        width: 58px;
        height: 32px;
    }

    .theme-toggle__thumb {
        width: 24px;
        height: 24px;
        transform: translateX(28px);
    }

    :root[data-theme="light"] .theme-toggle__thumb {
        transform: translateX(0);
    }

    .theme-toggle__sun,
    .theme-toggle__moon {
        top: 8px;
        width: 15px;
        height: 15px;
    }

    .theme-toggle__sun { left: 8px; }
    .theme-toggle__moon { right: 8px; }

    :root[data-theme="light"] .hero-copy,
    :root[data-theme="light"] .catalog-hero {
        padding: 22px;
        border-radius: 22px;
    }
}

@media (max-width: 520px) {
    .theme-toggle {
        width: 56px;
    }

    .theme-toggle__track {
        width: 52px;
    }

    .theme-toggle__thumb {
        transform: translateX(22px);
    }

    :root[data-theme="light"] .theme-toggle__thumb {
        transform: translateX(0);
    }
}


/* RYVIA 3D brand responsive polish */
@media (max-width: 720px) {
    .brand-tagline { display: none; }
    .brand-name { font-size: 18px; }
    .brand-mark { width: 34px; height: 34px; }
}
