@import url('https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600&family=Space+Grotesk:wght@500;600&display=swap');

:root {
    --bg: #f4f5f7;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --surface-3: #f3f4f6;
    --text: #1b1f24;
    --muted: #6b7280;
    --accent: #0ea5a4;
    --accent-2: #f59e0b;
    --danger: #ef4444;
    --border: #d1d5db;
    --border-soft: #e5e7eb;
    --border-subtle: #eef2f7;
    --radius: 14px;
    --shadow: 0 10px 25px rgba(10, 20, 30, 0.08);
    --admin-sidebar-width: 258px;
    --admin-sidebar-collapsed-width: 86px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Public Sans', 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: background 0.2s ease, color 0.2s ease;
}

.bg-shape {
    position: fixed;
    inset: -20% -20% auto auto;
    height: 420px;
    width: 420px;
    background: radial-gradient(circle at 30% 30%, rgba(14, 165, 164, 0.18), transparent 60%);
    z-index: -1;
}

h1, h2, h3 {
    font-family: 'Space Grotesk', 'Public Sans', sans-serif;
    margin: 0 0 8px 0;
}

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

.main {
    padding: 10px;
    max-width: 1200px;
    margin: 0 auto;
}

.top-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    background: rgba(255, 255, 255, 0.9);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-soft);
}

.top-nav .brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid var(--border-soft);
    background: var(--surface);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-name {
    font-weight: 600;
    letter-spacing: 0.2px;
}

.brand-by {
    font-size: 11px;
    color: var(--muted);
}

.logo-actions {
    display: flex;
    justify-content: flex-start;
    margin: 8px 0 6px;
}

.form-feedback {
    font-size: 12px;
    color: var(--muted);
    align-self: center;
    min-height: 16px;
}

.form-feedback.success { color: var(--accent); }
.form-feedback.error { color: var(--danger); }
.form-feedback.loading { color: var(--muted); }

.nav-links {
    display: flex;
    gap: 14px;
    align-items: center;
}

.nav-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--muted);
}

.nav-links a:hover { color: var(--text); background: var(--surface-3); }

.nav-links a.is-active {
    color: var(--text);
    background: rgba(14, 165, 164, 0.12);
    background: color-mix(in srgb, var(--accent) 14%, var(--surface));
}

.nav-links .cta.is-active {
    background: #0d908f;
    background: color-mix(in srgb, var(--accent) 86%, #000 14%);
    color: #fff;
}

.nav-links .cta {
    color: #fff;
    background: var(--accent);
}

.nav-links .muted { color: var(--muted); }

.theme-switch {
    border: none;
    background: transparent;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.theme-switch-track {
    position: relative;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid var(--border-soft);
    background: var(--surface-3);
    transition: background 0.2s ease, border-color 0.2s ease;
}

.theme-switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.18);
    transition: transform 0.2s ease;
}

.theme-switch.is-dark .theme-switch-track {
    background: color-mix(in srgb, var(--accent) 22%, var(--surface-3));
    border-color: color-mix(in srgb, var(--accent) 50%, var(--border-soft));
}

.theme-switch.is-dark .theme-switch-thumb {
    transform: translateX(18px);
}

.theme-switch:hover .theme-switch-track {
    background: var(--surface-2);
}

.theme-switch:focus-visible {
    outline: none;
}

.theme-switch:focus-visible .theme-switch-track {
    box-shadow: 0 0 0 3px rgba(14, 165, 164, 0.22);
}

.nav-toggle {
    display: none;
    border: 1px solid var(--border-soft);
    background: var(--surface);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    align-items: center;
    justify-content: center;
    color: var(--text);
    cursor: pointer;
}

.nav-toggle svg {
    width: 18px;
    height: 18px;
}

.nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 55;
}

.nav-drawer {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 260px;
    background: var(--surface);
    box-shadow: var(--shadow);
    border-left: 1px solid var(--border-soft);
    padding: 80px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 60;
}

body.drawer-open .nav-drawer { transform: translateX(0); }
body.drawer-open .nav-backdrop {
    opacity: 1;
    pointer-events: auto;
}
body.drawer-open {
    overflow: hidden;
}

.nav-drawer-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    background: var(--surface-3);
    color: var(--text);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.nav-drawer a {
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--muted);
}

.nav-drawer a.is-active {
    color: var(--text);
    background: rgba(14, 165, 164, 0.12);
    background: color-mix(in srgb, var(--accent) 14%, var(--surface));
}

.nav-drawer .theme-switch {
    align-self: flex-start;
    margin-bottom: 2px;
}

.nav-link-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.nav-link-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 18px;
}

.nav-link-icon svg {
    width: 18px;
    height: 18px;
}

.admin-sidebar-toggle {
    display: none;
}

.admin-sidebar-toggle-text {
    white-space: nowrap;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.page-header .actions { display: flex; gap: 10px; }

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.status-toggle {
    display: flex;
    gap: 6px;
    align-items: center;
}

.status-btn.is-active {
    background: var(--accent);
    color: #fff;
}

.filters.sticky {
    position: sticky;
    top: 64px;
    background: var(--bg);
    padding: 8px 0;
    z-index: 5;
}

.search-row {
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
}

.search-row input {
    flex: 1;
}

.offer-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.offer-toggle-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.offer-toggle-icon svg {
    width: 16px;
    height: 16px;
}

.btn.ghost.offer-toggle.is-active,
.btn.ghost.offer-toggle.is-active:hover {
    background: var(--accent);
    color: #fff;
}

:root[data-theme='dark'] .btn.ghost.offer-toggle.is-active,
:root[data-theme='dark'] .btn.ghost.offer-toggle.is-active:hover {
    background: var(--accent);
    color: #fff;
}

.btn:disabled,
.btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.empty-state {
    padding: 10px 4px;
}

.min-order-hint {
    margin-top: 8px;
}

.cart-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    white-space: nowrap;
}

.cart-pill-icon svg { width: 18px; height: 18px; }

.cart-pill-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
}

.cart-count {
    background: #fff;
    color: var(--accent);
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 999px;
}

.cart-total { color: #fff; }

form .form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

form label:not(.switch):not(.checkbox):not(.benefit-scope-all) {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin: 2px 0 6px;
}

form > input:not([type='hidden']):not([type='checkbox']):not([type='radio']),
form > select,
form > textarea,
form > .inline,
form > .credentials-grid,
form > .checkbox-grid,
form > .modal-actions,
form > .muted,
form > .image-preview,
form > .logo-actions,
form > .form-feedback {
    margin-bottom: 10px;
}

form > :last-child {
    margin-bottom: 0;
}

.inline > div,
.credentials-grid > div,
.benefit-scope-grid > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

input, select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    background: var(--surface);
    color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(14, 165, 164, 0.12);
}

textarea { resize: vertical; }

.btn {
    padding: 10px 16px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
}

.btn.primary { background: var(--accent); color: #fff; }
.btn.ghost { background: var(--surface-3); color: var(--text); }

.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-subtle);
    animation: fadeInUp 0.4s ease;
}

body.is-login {
    min-height: 100vh;
    background:
        radial-gradient(circle at 12% 14%, rgba(14, 165, 164, 0.22), transparent 42%),
        linear-gradient(135deg, #eef4fb 0%, #f6f9fc 50%, #e9f1f8 100%);
}

body.is-login .bg-shape {
    inset: auto auto -140px -120px;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle at 60% 40%, rgba(14, 165, 164, 0.24), transparent 64%);
}

.main-login {
    min-height: 100vh;
    max-width: none;
    padding: 28px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth {
    width: min(460px, 100%);
}

.auth-card {
    padding: 26px;
    border-radius: 18px;
    background: var(--surface);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: blur(6px);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.login-brand-logo {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    border: 1px solid var(--border-soft);
    background: var(--surface);
    object-fit: contain;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.login-brand-logo-fallback {
    color: var(--accent);
    background: rgba(14, 165, 164, 0.14);
    background: color-mix(in srgb, var(--accent) 14%, var(--surface));
}

.login-brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.login-brand-copy span {
    font-size: 12px;
    color: var(--muted);
}

.auth-card h1 {
    margin-bottom: 6px;
}

.auth-form {
    margin-top: 10px;
}

.auth-form .btn {
    width: 100%;
    margin-top: 4px;
}

.product-list { display: flex; flex-direction: column; gap: 10px; }

.product-card {
    display: grid;
    grid-template-columns: 60px 1fr auto;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
}

.product-card.is-inactive {
    opacity: 0.7;
}

.admin-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    min-width: 200px;
}

.admin-actions .action-row {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.admin-actions .action-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.admin-actions label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--muted);
}

.admin-actions input {
    padding: 8px 10px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border-soft);
    background: var(--surface-2);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.icon-btn svg { width: 18px; height: 18px; }

.icon-btn.primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

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

.product-card img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    background: var(--surface-3);
}

.product-card.catalog-card {
    display: block;
    padding: 0;
    overflow: hidden;
}

.product-card.catalog-card .flip-card {
    perspective: 1000px;
    width: 100%;
}

.product-card.catalog-card .flip-inner {
    display: grid;
    transition: transform 0.45s ease;
    transform-style: preserve-3d;
    width: 100%;
}

.product-card.catalog-card.is-flipped .flip-inner {
    transform: rotateY(180deg);
}

.product-card.catalog-card .flip-face {
    grid-area: 1 / 1;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    display: grid;
    background: var(--surface);
    grid-template-columns: 60px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    width: 100%;
}

.product-card.catalog-card .flip-back {
    display: none;
    transform: rotateY(180deg);
    grid-template-columns: 1fr;
    align-items: stretch;
    width: 100%;
}

.product-card.catalog-card .product-meta,
.product-card.catalog-card .product-back-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    min-width: 0;
  	padding-left: 10px;
}

.product-card.catalog-card .product-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-height: 30px;
}

.product-card.catalog-card .flip-back .product-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.product-card.catalog-card .flip-back .chip {
    white-space: normal;
    max-width: 100%;
}


.product-card.catalog-card .info-toggle {
    display: none;
    width: 30px;
    height: 30px;
}

.product-thumb.has-image { cursor: zoom-in; }
.thumb.has-image { cursor: zoom-in; }

.status-inline {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 6px;
    font-size: 12px;
    color: var(--muted);
}

.status-inline .status-text { min-width: 56px; }

.stock-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stock-actions.is-dual {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

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

.stock-info {
    font-size: 14px;
    color: var(--muted);
}

.stock-buttons {
    display: flex;
    gap: 8px;
}

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

.qty-control {
    display: flex;
    align-items: center;
    gap: 6px;
}

.qty-control .qty {
    width: 80px;
    text-align: center;
}

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

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

.brand-order-input {
    width: 80px;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

.switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 44px;
    height: 24px;
}

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

.switch-slider {
    position: absolute;
    inset: 0;
    background: var(--border-soft);
    border-radius: 999px;
    transition: background 0.2s ease;
}

.switch-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background: var(--surface);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.2);
    transition: transform 0.2s ease;
}

.switch input:checked + .switch-slider {
    background: var(--accent);
}

.switch input:checked + .switch-slider::before {
    transform: translateX(20px);
}

.product-meta { display: flex; flex-direction: column; gap: 6px; }

.product-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chip {
    padding: 4px 8px;
    background: var(--surface-3);
    border-radius: 999px;
    font-size: 12px;
    color: var(--muted);
    border: none;
}

.benefit-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.benefit-badge {
    padding: 4px 8px;
    background: var(--accent-2);
    color: #fff;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.price-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.price-dual {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.price-item {
    display: flex;
    gap: 2px;
    line-height: 1.5;
    color: #14b7a5;
    font-weight: 800;
    font-size: 16px;
}

.price-note {
    font-size: 11px;
    color: var(--muted);
    float: left;
    padding-left: 5px;
    margin-left: 3px;
    line-height: 2.4;
    font-weight: 100;
    position: relative;
}

.price-note:before {
    content:"";
    display: table;
    width: 1px;
    height: 15px;
    background: #ffffff;
    position: absolute;
    top: 20%;
    bottom: 0;
    left: 0;
}

.price-inline {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
}

.price-old {
    font-size: 12px;
    color: var(--muted);
    text-decoration: line-through;
}

.price-new {
    font-weight: 600;
}

.discount-label {
    font-size: 12px;
    color: var(--muted);
}

.benefit-targets-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.benefit-scope {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.benefit-scope-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.benefit-scope-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.multi-select {
    min-height: 140px;
}

.accordion {
    border: 1px solid var(--surface-3);
    border-radius: 12px;
    padding: 12px 16px;
    margin-top: 12px;
    background: var(--surface-2);
}

.accordion > summary {
    cursor: pointer;
    font-weight: 600;
    list-style: none;
}

.accordion > summary::-webkit-details-marker {
    display: none;
}

.accordion > summary::after {
    content: '+';
    float: right;
    font-weight: 700;
}

.accordion[open] > summary::after {
    content: '−';
}

.accordion-body {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.credentials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.credentials-grid input {
    background: var(--surface-2);
}

.slider {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.carousel-block {
    margin-bottom: 12px;
}

.carousel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 6px 0;
}

.carousel-title {
    font-size: 13px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.carousel-controls {
    display: flex;
    gap: 6px;
}

.image-carousel {
    --items: 8;
    --gap: 10px;
    display: flex;
    gap: var(--gap);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 8px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
}

.image-carousel::-webkit-scrollbar {
    height: 6px;
}

.image-carousel::-webkit-scrollbar-thumb {
    background: var(--border-soft);
    border-radius: 999px;
}

.carousel-card {
    flex: 0 0 calc((100% - (var(--gap) * (var(--items) - 1))) / var(--items));
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    cursor: pointer;
    scroll-snap-align: start;
}

.carousel-card.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(14, 165, 164, 0.15);
}

.carousel-image {
    width: 100%;
    height: 44px;
    border-radius: 8px;
    background: var(--surface-3);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.carousel-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.carousel-label {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.group-title {
    margin: 12px 0 6px;
    font-weight: 600;
    color: var(--muted);
}

.list-loader { text-align: center; color: var(--muted); padding: 10px; }

.inline { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.table { display: flex; flex-direction: column; gap: 8px; }
.table .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; padding: 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border-subtle); }
.table .row.head { background: var(--surface-3); font-weight: 600; border-color: var(--border-soft); }

.thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 8px; }

.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 80;
}

.modal.open { display: flex; }

.modal-content {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    padding: 20px;
    border-radius: 16px;
    width: min(560px, 92vw);
    max-height: 90vh;
    overflow-y: auto;
}

.import-progress {
    display: grid;
    gap: 12px;
}

.progress-track {
    height: 12px;
    border-radius: 999px;
    background: var(--surface-3);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    transition: width 0.3s ease;
}

.progress-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
}

#importProgressDetails {
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    background: var(--surface-2);
    padding: 10px 12px;
    font-size: 13px;
    color: var(--text);
    max-height: 160px;
    overflow: auto;
}

#importProgressDetails.is-error {
    background: #fee2e2;
    border-color: #fecaca;
    color: #7f1d1d;
}

#importProgressDetails.is-warning {
    background: #fff3cd;
    border-color: #f4d186;
    color: #7a4b00;
}

#importProgressPercent {
    font-weight: 600;
    color: var(--text);
}

.mix-box-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin: 12px 0;
    font-size: 14px;
}

.mix-remaining {
    color: var(--muted);
    font-size: 13px;
}

.mix-box-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mix-filters {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 10px;
    margin: 10px 0;
}

.mix-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    background: var(--surface-2);
}

.mix-item-info {
    flex: 1;
}

.mix-item-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mix-item-qty input {
    width: 70px;
    text-align: center;
}

.mix-line {
    margin-top: 4px;
}

.image-preview {
    margin-bottom: 10px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    background: var(--surface-2);
    padding: 8px;
}

.image-preview img {
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    border-radius: 10px;
    display: block;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
}

.lightbox-content {
    position: relative;
    max-width: min(90vw, 900px);
    max-height: 90vh;
    z-index: 1;
    background: var(--surface);
    border-radius: 16px;
    padding: 14px;
    box-shadow: var(--shadow);
}

.lightbox-content img {
    display: block;
    max-width: 80vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
}

.lightbox-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: var(--surface-3);
    font-size: 20px;
    cursor: pointer;
}

.order-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}

.order-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 10px 0;
}

.order-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px;
    border-radius: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
}

.order-items.is-edit .order-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
}

.order-items.is-edit .order-item-main {
    min-width: 0;
}

.order-items.is-edit .order-item-qty {
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-items.is-edit .order-item-prices {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    min-width: 150px;
    text-align: right;
}

.order-items.is-edit .order-qty-control {
    display: flex;
    align-items: center;
    gap: 6px;
}

.order-items.is-edit .orderItemQty {
    width: 70px;
    text-align: center;
}

.order-item-main {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 180px;
}

.order-item-title { font-weight: 600; }
.order-item-brand { font-size: 12px; color: var(--muted); }

.order-item-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    align-items: center;
    text-align: right;
}

.order-item-meta label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--muted);
    text-align: left;
}

.order-item-meta input {
    width: 120px;
}

.order-total {
    font-weight: 600;
    text-align: right;
    margin-top: 8px;
}

.cart-drawer {
    position: fixed;
    inset: 0;
    z-index: 85;
    pointer-events: none;
}

.cart-drawer.open { pointer-events: auto; }

.cart-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cart-drawer.open .cart-drawer-backdrop { opacity: 1; }

.cart-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: min(360px, 90vw);
    background: var(--surface);
    box-shadow: var(--shadow);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
}

.cart-drawer.open .cart-drawer-panel { transform: translateX(0); }

.cart-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.cart-drawer-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    flex: 1;
}

.cart-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
}

.cart-row-title { font-weight: 600; }
.cart-row-subtotal { font-weight: 600; }

.cart-drawer-footer {
    padding: 16px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-drawer-total {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }

.flash { padding: 10px 12px; border-radius: 10px; background: #e0f2fe; color: #0c4a6e; margin-bottom: 10px; }
.flash.error { background: #fee2e2; color: #7f1d1d; }

.muted { color: var(--muted); font-size: 14px; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }

.cart-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }

.cart-table-head {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--surface-3);
    font-weight: 600;
}

.cart-row-card {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    align-items: center;
}

.cart-col.unit,
.cart-col.total {
    text-align: right;
}

.cart-col.total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.cart-line-unit {
    display: none;
    font-size: 12px;
    color: var(--muted);
}

.cart-col.qty {
    display: flex;
    justify-content: flex-start;
}

.cart-col.remove {
    display: flex;
    justify-content: flex-end;
}

.cart-grand-total {
    text-align: right;
    font-weight: 600;
    padding: 6px 2px 0;
}

.cart-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 10px;
}

.cart-mode-toggle .status-btn.is-active {
    background: var(--accent);
    color: #fff;
}

.cart-sheet {
    background: var(--surface);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 16px;
}

.sheet-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    margin-bottom: 12px;
}

.sheet-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sheet-field label {
    font-size: 12px;
    color: var(--muted);
}

.sheet-field input {
    min-width: 160px;
}

.sheet-feedback { min-height: 18px; flex-basis: 100%; }
.sheet-feedback.error { color: var(--danger); }

.sheet-table { display: flex; flex-direction: column; gap: 6px; }

.sheet-head,
.sheet-row {
    display: grid;
    grid-template-columns: 90px 120px 2fr 1fr 1fr 1fr 40px;
    gap: 10px;
    align-items: center;
}

.sheet-head {
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--surface-3);
    font-weight: 600;
}

.sheet-row {
    padding: 10px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border-subtle);
}

.sheet-col.code { font-variant-numeric: tabular-nums; }

.sheet-col.price,
.sheet-col.total {
    text-align: right;
}

.sheet-col.total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.sheet-line-unit {
    display: none;
    font-size: 12px;
    color: var(--muted);
}

.sheet-qty {
    width: 80px;
    text-align: center;
}

.sheet-alert {
    font-size: 12px;
    color: var(--accent-2);
}

.sheet-total {
    text-align: right;
    font-weight: 600;
    padding: 6px 2px 0;
}

.sheet-empty { padding: 8px 4px; }

.checkout-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 90;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px;
    overflow-y: auto;
}

.checkout-card {
    width: min(860px, 96vw);
    background: var(--surface);
    border-radius: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-subtle);
    padding: 20px;
}

.checkout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.checkout-table-head,
.checkout-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 10px;
    padding: 10px 12px;
    align-items: center;
}

.checkout-table-head {
    background: var(--surface-3);
    border-radius: 10px;
    font-weight: 600;
}

.checkout-row {
    border-bottom: 1px solid var(--border-subtle);
}

.checkout-row:last-child { border-bottom: none; }

.checkout-col.total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.checkout-line-unit {
    display: none;
    font-size: 12px;
    color: var(--muted);
}

.checkout-total {
    text-align: right;
    font-weight: 600;
    margin-top: 10px;
}

.checkout-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 12px;
}

body.checkout-open {
    overflow: hidden;
}

body.modal-open {
    overflow: hidden;
}

.hidden { display: none; }

.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin-bottom: 12px; }

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

:root[data-theme='dark'] {
    --bg: #0b1322;
    --surface: #101a2e;
    --surface-2: #152238;
    --surface-3: #1b2a43;
    --text: #e5edf8;
    --muted: #9db0c8;
    --accent: #14b8a6;
    --accent-2: #f59e0b;
    --danger: #f87171;
    --border: #31415b;
    --border-soft: #27364f;
    --border-subtle: #223049;
    --shadow: 0 18px 34px rgba(1, 7, 17, 0.6);
}

:root[data-theme='dark'] .bg-shape {
    background: radial-gradient(circle at 30% 30%, rgba(20, 184, 166, 0.25), transparent 60%);
}

:root[data-theme='dark'] body.is-login {
    background:
        radial-gradient(circle at 12% 14%, rgba(20, 184, 166, 0.2), transparent 42%),
        linear-gradient(135deg, #0b1322 0%, #121f36 52%, #101a2e 100%);
}

:root[data-theme='dark'] .top-nav {
    background: rgba(11, 19, 34, 0.88);
    background: color-mix(in srgb, var(--surface) 85%, transparent);
}

:root[data-theme='dark'] .auth-card,
:root[data-theme='dark'] .product-card,
:root[data-theme='dark'] .product-card.catalog-card .flip-face,
:root[data-theme='dark'] .table .row,
:root[data-theme='dark'] .modal-content,
:root[data-theme='dark'] .lightbox-content,
:root[data-theme='dark'] .checkout-card,
:root[data-theme='dark'] .cart-drawer-panel,
:root[data-theme='dark'] .cart-row-card,
:root[data-theme='dark'] .sheet-row {
    background: var(--surface);
    border-color: var(--border-subtle);
}

:root[data-theme='dark'] .table .row.head,
:root[data-theme='dark'] .cart-table-head,
:root[data-theme='dark'] .checkout-table-head,
:root[data-theme='dark'] .sheet-head,
:root[data-theme='dark'] .btn.ghost,
:root[data-theme='dark'] .icon-btn,
:root[data-theme='dark'] .chip,
:root[data-theme='dark'] .carousel-card,
:root[data-theme='dark'] .image-carousel,
:root[data-theme='dark'] .cart-row,
:root[data-theme='dark'] .order-item,
:root[data-theme='dark'] .cart-count,
:root[data-theme='dark'] .lightbox-close {
    background: var(--surface-3);
    border-color: var(--border-soft);
    color: var(--text);
}

:root[data-theme='dark'] .btn.ghost:hover,
:root[data-theme='dark'] .icon-btn:hover,
:root[data-theme='dark'] .nav-toggle:hover,
:root[data-theme='dark'] .nav-drawer-close:hover {
    background: var(--surface-2);
}

:root[data-theme='dark'] .carousel-image {
    background: var(--surface-2);
}

:root[data-theme='dark'] .cart-count {
    color: var(--accent);
}

:root[data-theme='dark'] .flash {
    background: #0f334f;
    color: #cce9ff;
}

:root[data-theme='dark'] .flash.error {
    background: #4a1d1d;
    color: #ffdede;
}

:root[data-theme='dark'] .nav-links .cta.is-active {
    background: #109d8e;
    background: color-mix(in srgb, var(--accent) 82%, #000 18%);
}

@media (min-width: 901px) {
    body.app-admin {
        padding-left: var(--admin-sidebar-width);
    }

    body.app-admin.admin-nav-collapsed {
        padding-left: var(--admin-sidebar-collapsed-width);
    }

    body.app-admin .top-nav.admin-side-nav {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: var(--admin-sidebar-width);
        z-index: 70;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 12px;
        padding: 14px 12px;
        border-right: 1px solid var(--border-soft);
        border-bottom: none;
        overflow: hidden auto;
        backdrop-filter: blur(8px);
    }

    body.app-admin.admin-nav-collapsed .top-nav.admin-side-nav {
        width: var(--admin-sidebar-collapsed-width);
    }

    body.app-admin .top-nav.admin-side-nav .brand {
        padding: 8px 10px;
        border-radius: 10px;
        background: var(--surface-2);
        border: 1px solid var(--border-subtle);
        min-height: 56px;
    }

    body.app-admin .top-nav.admin-side-nav .brand-logo {
        width: 34px;
        height: 34px;
    }

    body.app-admin .top-nav.admin-side-nav .brand-text {
        overflow: hidden;
    }

    body.app-admin .top-nav.admin-side-nav .brand-name {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    body.app-admin .top-nav.admin-side-nav .nav-toggle {
        display: none;
    }

    body.app-admin .top-nav.admin-side-nav .admin-sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        width: 100%;
        border: 1px solid var(--border-soft);
        background: var(--surface);
        color: var(--muted);
        border-radius: 10px;
        height: 40px;
        padding: 0 10px;
        cursor: pointer;
        transition: background 0.2s ease, color 0.2s ease;
    }

    body.app-admin .top-nav.admin-side-nav .admin-sidebar-toggle:hover {
        background: var(--surface-3);
        color: var(--text);
    }

    body.app-admin .top-nav.admin-side-nav .admin-sidebar-toggle-icon {
        width: 18px;
        height: 18px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 18px;
    }

    body.app-admin .top-nav.admin-side-nav .admin-sidebar-toggle-icon svg {
        width: 18px;
        height: 18px;
    }

    body.app-admin .top-nav.admin-side-nav .admin-nav-links {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    body.app-admin .top-nav.admin-side-nav .admin-nav-links .theme-switch {
        align-self: flex-start;
        margin: 2px 0 8px;
    }

    body.app-admin .top-nav.admin-side-nav .admin-nav-links .nav-link-item {
        width: 100%;
        min-height: 40px;
        padding: 10px 12px;
        border-radius: 10px;
        color: var(--muted);
    }

    body.app-admin .top-nav.admin-side-nav .admin-nav-links .nav-link-item.cta {
        margin-top: 6px;
        color: #fff;
    }

    body.app-admin .top-nav.admin-side-nav .admin-nav-links .nav-link-item.muted {
        margin-top: 4px;
    }

    body.app-admin .top-nav.admin-side-nav .admin-nav-links .nav-link-label {
        white-space: nowrap;
    }

    body.app-admin .main {
        max-width: none;
    }

    body.app-admin .nav-backdrop,
    body.app-admin .nav-drawer {
        display: none;
    }

    body.app-admin.admin-nav-collapsed .top-nav.admin-side-nav .brand {
        justify-content: center;
    }

    body.app-admin.admin-nav-collapsed .top-nav.admin-side-nav .brand-logo {
        margin: 0;
    }

    body.app-admin.admin-nav-collapsed .top-nav.admin-side-nav .brand-text,
    body.app-admin.admin-nav-collapsed .top-nav.admin-side-nav .admin-sidebar-toggle-text,
    body.app-admin.admin-nav-collapsed .top-nav.admin-side-nav .nav-link-label {
        display: none;
    }

    body.app-admin.admin-nav-collapsed .top-nav.admin-side-nav .admin-sidebar-toggle {
        justify-content: center;
        padding: 0;
    }

    body.app-admin.admin-nav-collapsed .top-nav.admin-side-nav .admin-nav-links .theme-switch {
        align-self: center;
    }

    body.app-admin.admin-nav-collapsed .top-nav.admin-side-nav .admin-nav-links .nav-link-item {
        justify-content: center;
        padding: 10px 0;
    }

    body.app-admin.admin-nav-collapsed .top-nav.admin-side-nav .admin-nav-links .nav-link-item .nav-link-icon {
        margin: 0;
    }

    body.app-admin.admin-nav-collapsed .top-nav.admin-side-nav .admin-sidebar-toggle-icon svg {
        transform: rotate(180deg);
    }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    .product-card.catalog-card .flip-inner { transition: none; }
}

@media (max-width: 900px) {
    body {
        overflow-x: hidden;
    }

    body.app-admin {
        padding-left: 0;
    }

    .nav-links { display: none; }
    .nav-toggle { display: inline-flex; }
    .nav-drawer {
        width: min(280px, 86vw);
        padding: 64px 12px 12px;
        gap: 6px;
    }

    .nav-drawer a {
        display: inline-flex;
        align-items: center;
        gap: 10px;
    }
    .nav-drawer a {
        padding: 8px 10px;
        border-radius: 8px;
    }
    .page-header { flex-direction: column; align-items: flex-start; }
    .main-login { padding: 20px 12px; }
    .product-card { grid-template-columns: 50px 1fr; }
    .product-card .actions { grid-column: span 2; }
    .product-card.catalog-card .flip-face { grid-template-columns: 50px 1fr; }
    .product-card.catalog-card .flip-front .actions { grid-column: span 2; }
    .product-card.catalog-card .flip-back { display: grid; }
    .product-card.catalog-card .flip-front .product-chips { display: none; }
    .product-card.catalog-card .info-toggle { display: inline-flex; }
    .product-card.catalog-card .flip-back { grid-template-columns: 1fr; }
    .product-card.catalog-card .flip-back .product-chips {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }
    .admin-actions { min-width: 0; }
    .image-carousel { --items: 3; }
    .search-row {
        display: grid;
        grid-template-columns: minmax(0, 30%) minmax(0, 70%);
        gap: 8px;
        align-items: stretch;
    }
    .search-row input {
        grid-column: 1 / -1;
    }
    .search-row .offer-toggle,
    .search-row .cart-pill {
        width: 100%;
        justify-content: center;
    }
    .search-row .offer-toggle {
        padding-left: 8px;
        padding-right: 8px;
    }
    .search-row .offer-toggle .offer-toggle-label {
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .search-row .cart-pill .cart-pill-text {
        display: none;
    }
    .cart-pill { justify-content: center; }
    .cart-table-head {
        grid-template-columns: 2fr 1fr 1fr auto;
    }
    .cart-table-head div:nth-child(4) { display: none; }
    .cart-table-head div:nth-child(5) { display: none; }
    .cart-table-head div:nth-child(3) {
        position: relative;
        color: transparent;
    }
    .cart-table-head div:nth-child(3)::after {
        content: 'Un/Total';
        color: var(--text);
        position: absolute;
        left: 0;
        top: 0;
    }
    .cart-row-card {
        grid-template-columns: 2fr 1fr 1fr auto;
        align-items: center;
    }
    .cart-col.unit { display: none; }
    .cart-col.total { text-align: right; }
    .cart-line-unit { display: block; }
    .cart-col.qty .qty-control .qty { width: 52px; }

    body[data-page='cart'] #cartListView {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 6px;
    }

    body[data-page='cart'] #cartList {
        min-width: 620px;
    }

    body[data-page='cart'] .cart-table-head,
    body[data-page='cart'] .cart-row-card {
        min-width: 620px;
    }
    .sheet-head,
    .sheet-row {
        grid-template-columns: 80px 2fr 1fr 40px;
    }
    .sheet-col.code,
    .sheet-col.price,
    .sheet-col.discount { display: none; }
    .sheet-line-unit { display: block; }
    .sheet-field input { min-width: 120px; }
    .checkout-table-head,
    .checkout-row {
        grid-template-columns: 2fr 1fr 1fr;
    }
    .checkout-table-head div:nth-child(4) { display: none; }
    .checkout-table-head div:nth-child(3) {
        position: relative;
        color: transparent;
    }
    .checkout-table-head div:nth-child(3)::after {
        content: 'Un/Total';
        color: var(--text);
        position: absolute;
        left: 0;
        top: 0;
    }
    .checkout-col.unit { display: none; }
    .checkout-line-unit { display: block; }
    .mix-filters { grid-template-columns: 1fr; }

    .modal {
        padding: 10px;
        align-items: flex-start;
    }

    .modal-content {
        width: 100%;
        max-width: 100%;
        max-height: calc(100vh - 20px);
        margin: 0;
        overflow-x: hidden;
    }

    .order-item {
        flex-direction: column;
        align-items: stretch;
    }

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

    .order-item-title,
    .order-item-brand {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .order-item-meta {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .order-item-meta > div {
        text-align: left;
    }

    .order-items.is-edit .order-item {
        grid-template-columns: 1fr;
    }

    .order-items.is-edit .order-item-qty {
        justify-content: flex-start;
    }

    .order-items.is-edit .order-item-prices {
        min-width: 0;
        align-items: flex-start;
        text-align: left;
    }
}

@media (max-width: 600px) {
    .inline { grid-template-columns: 1fr; }
    .auth-card { padding: 22px 18px; }
    .image-carousel { --items: 2; }

    .modal-content {
        padding: 14px;
        border-radius: 12px;
    }
}
