@font-face {
    font-family: Inter;
    src: local('Inter');
    font-display: swap;
}
:root {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        sans-serif;
    color: #222834;
    background: #e9ecf2;
    --panel: #fff;
    --muted: #89909d;
    --border: #e6e9ef;
    --blue: #0000ff;
    --surface: #f3f5f8;
    --radius: 20px;
    font-synthesis: none;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
}
button,
input,
select,
textarea {
    font: inherit;
}
button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}
button {
    cursor: pointer;
}
button:disabled {
    cursor: wait;
    opacity: 0.5;
}
a {
    color: var(--blue);
    text-decoration: none;
}
button {
    color: inherit;
}
button:focus-visible,
a:focus-visible {
    outline: 3px solid #8585ff;
    outline-offset: 3px;
}
svg {
    width: 19px;
    height: 19px;
    stroke-width: 1.7;
    vertical-align: middle;
    flex-shrink: 0;
}
[hidden] {
    display: none !important;
}
.app-shell {
    max-width: 740px;
    min-height: 100dvh;
    margin: auto;
    background: #f4f5f8;
    padding: 0 22px calc(110px + env(safe-area-inset-bottom));
    box-shadow: 0 0 100px #3d485a08;
}
.header {
    min-height: 88px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 4px 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 30px;
    padding: calc(16px + env(safe-area-inset-top)) 0 12px;
}
.wordmark {
    grid-column: 1;
    grid-row: 1;
    width: max-content;
    font-size: 20px;
    letter-spacing: -1.2px;
    font-weight: 850;
    color: #222834;
}
.wordmark span {
    color: var(--blue);
}
.store-picker {
    grid-column: 1 / -1;
    grid-row: 2;
    min-width: 0;
    min-height: 44px;
    width: 100%;
    padding: 8px 0;
    border: 0;
    background: transparent;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.7px;
    line-height: 1.5;
    text-align: left;
    overflow-wrap: anywhere;
}
.store-picker span {
    min-width: 0;
}
.account {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    justify-self: end;
    font-size: 12px;
    color: var(--muted);
    line-height: 1.5;
    text-align: right;
    overflow-wrap: anywhere;
}
.account:empty {
    display: none;
}
.launch-mode .app-shell {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    max-width: none;
    padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom));
    background: radial-gradient(ellipse at 35% 15%, #0000ff06, transparent 65%), #f4f5f8;
    box-shadow: none;
}
.launch-mode .app-shell::before {
    content: '';
    position: absolute;
    z-index: -1;
    top: calc(50% - 310px);
    left: calc(50% - 10px);
    width: min(330px, 45vw);
    aspect-ratio: 1;
    border: 1px solid #0000ff0c;
    border-radius: 50%;
    pointer-events: none;
}
.launch-mode .header {
    display: none;
}
.launch-mode #screen {
    width: 100%;
    max-width: 420px;
}
.launch-card {
    padding: clamp(24px, 5vw, 34px) clamp(22px, 5vw, 30px) 26px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 28px;
    box-shadow: 0 24px 70px #22283414;
    text-align: center;
}
.launch-icon {
    display: grid;
    place-items: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 24px;
    border: 1px solid #0000ff14;
    border-radius: 20px;
    color: var(--blue);
    background: #f0f0ff;
}
.launch-icon svg {
    width: 28px;
    height: 28px;
}
.launch-card .launch-eyebrow {
    color: var(--blue);
    letter-spacing: 1.5px;
}
.launch-card h1 {
    max-width: 340px;
    margin: 0 auto 16px;
    font-size: clamp(28px, 6vw, 34px);
    line-height: 1.14;
    letter-spacing: -1.1px;
}
.launch-description {
    margin: 0 auto 26px;
    max-width: 330px;
    font-size: 14px;
}
.launch-actions {
    display: grid;
    gap: 10px;
}
.launch-actions a {
    min-height: 48px;
}
.launch-brand {
    display: inline-block;
    margin-top: 26px;
}
.access-loading {
    display: grid;
    justify-items: center;
    gap: 16px;
    padding: 24px 0;
    text-align: center;
}
.access-loading .loading {
    width: 32px;
    height: 32px;
    margin: 0;
    border-width: 3px;
}
.access-loading p {
    margin: 0;
    color: #222834;
    font-size: 15px;
    font-weight: 600;
}
.eyebrow {
    font-size: 10px;
    letter-spacing: 1.8px;
    color: var(--muted);
    font-weight: 650;
    margin: 0 0 10px;
}
h1 {
    font-size: 30px;
    line-height: 1.12;
    letter-spacing: -1px;
    margin: 0 0 12px;
    font-weight: 740;
}
h2 {
    font-size: 18px;
    letter-spacing: -0.4px;
    margin: 0;
}
h3 {
    font-size: 14px;
    margin: 0;
}
p {
    font-size: 14px;
    line-height: 1.6;
    margin: 10px 0;
    color: #737c8d;
}
.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
}
.subtitle {
    font-size: 12px;
    margin: 0;
    color: var(--muted);
}
.card {
    background: var(--panel);
    border: 1px solid #e8ebf0;
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 16px;
}
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}
.primary,
.secondary,
.danger,
.quiet,
.icon-button,
.chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    padding: 12px 16px;
    min-height: 44px;
    border: 0;
}
.primary {
    background: var(--blue);
    color: #fff;
}
.secondary {
    background: #f0f2f6;
    color: #303746;
}
.danger {
    background: #fff0f2;
    color: #b03850;
}
.quiet {
    background: transparent;
    color: var(--muted);
    padding: 8px;
}
.icon-button {
    padding: 9px;
    background: var(--surface);
    min-width: 40px;
    min-height: 40px;
}
.wide {
    width: 100%;
}
.row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.spread {
    justify-content: space-between;
}
.wrap {
    flex-wrap: wrap;
}
.muted {
    color: var(--muted);
}
.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 18px 0;
}
.stat {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
}
.stat label {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 12px;
}
.stat strong {
    font-size: 26px;
    letter-spacing: -0.8px;
}
.hero-stat {
    padding: 25px;
    background: #222a39;
    color: white;
    border: 0;
    grid-column: 1/-1;
}
.hero-stat strong {
    font-size: 42px;
}
.hero-stat label {
    color: #bbc2d0;
}
.mini-label {
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 1px;
    text-transform: uppercase;
}
.task {
    display: flex;
    gap: 15px;
    align-items: center;
    border: 0;
    background: transparent;
    width: 100%;
    text-align: left;
    padding: 16px 0;
    border-top: 1px solid var(--border);
}
.task:first-of-type {
    border-top: 0;
}
.task-icon {
    background: #ededff;
    color: var(--blue);
    border-radius: 12px;
    padding: 12px;
}
.task strong {
    display: block;
    font-size: 13px;
}
.task small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-top: 5px;
}
.task > svg:last-child {
    margin-left: auto;
    color: #9ba3b0;
}
nav {
    position: fixed;
    bottom: max(14px, env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    width: min(calc(100% - 28px), 690px);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: #fffefa;
    border: 1px solid #e6e9ef;
    border-radius: 19px;
    padding: 9px;
    box-shadow: 0 8px 32px #26314715;
    z-index: 5;
}
nav button {
    border: 0;
    background: transparent;
    padding: 7px 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: 9px;
    color: #9299a7;
    border-radius: 11px;
    min-height: 47px;
}
nav button.active {
    background: #eeeefe;
    color: var(--blue);
}
nav svg {
    width: 20px;
    height: 20px;
}
.toolbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.search {
    flex: 1;
    min-width: 140px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    padding: 12px 15px;
    font-size: 13px;
}
.filters {
    display: flex;
    gap: 6px;
    overflow: auto;
    margin: 0 0 18px;
    padding-bottom: 3px;
}
.chip {
    background: transparent;
    padding: 9px 13px;
    white-space: nowrap;
    min-height: 35px;
    border: 1px solid var(--border);
    font-size: 11px;
}
.chip.active {
    background: #222a39;
    color: #fff;
    border-color: #222a39;
}
.products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}
.products > .wide {
  grid-column: 1 / -1;
}
.product-tile {
    padding: 0;
    border: 0;
    text-align: left;
    background: transparent;
    position: relative;
}
.product-image {
    aspect-ratio: 4/5;
    background: #e8ebf0;
    border-radius: 17px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a7afbd;
    margin-bottom: 12px;
}
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-image svg {
    width: 34px;
    height: 34px;
}
.product-tile h3 {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    overflow-wrap: anywhere;
}
.product-meta {
    font-size: 11px;
    color: var(--muted);
    margin: 6px 0;
}
.product-price {
    font-size: 13px;
    font-weight: 700;
}
.badge {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    padding: 5px 8px;
    line-height: 1.3;
    border-radius: 8px;
    background: #eef1f6;
    color: #7d8797;
}
.badge.green {
    background: #e8f5ee;
    color: #337b57;
}
.badge.blue {
    background: #ececff;
    color: #3939c0;
}
.badge.orange {
    background: #fff4e2;
    color: #9a722f;
}
.badge.red {
    background: #ffeff2;
    color: #ae435a;
}
.product-tile > .badge {
    position: absolute;
    top: 9px;
    left: 9px;
}
.empty {
    text-align: center;
    padding: 50px 20px;
    color: var(--muted);
}
.empty > svg {
    width: 40px;
    height: 40px;
    color: #bac1ce;
    margin-bottom: 15px;
}
.empty h2 {
    color: #333b49;
    margin-bottom: 8px;
}
.empty .primary {
    margin-top: 20px;
}
.welcome {
    padding: 80px 0 40px;
}
.welcome h1 {
    font-size: 43px;
    line-height: 1.08;
    margin: 22px 0;
}
.brand-mark {
    font-size: 40px;
    color: white;
    background: var(--blue);
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    font-weight: 750;
    letter-spacing: -3px;
    margin-bottom: 35px;
}
.loading {
    width: 23px;
    height: 23px;
    border: 2px solid #d2d7e1;
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 24px 0;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
.back {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 12px;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 20px;
    min-height: 35px;
}
.cover {
    position: relative;
    aspect-ratio: 1;
    background: #e7eaf0;
    border-radius: 22px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.cover > svg {
    width: 60px;
    height: 60px;
    color: #a9b3c1;
}
.gallery {
    display: flex;
    gap: 9px;
    overflow: auto;
    margin-bottom: 25px;
}
.gallery button {
    min-width: 64px;
    width: 64px;
    height: 74px;
    background: #e4e8ee;
    border: 0;
    padding: 0;
    border-radius: 9px;
    overflow: hidden;
}
.gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.detail-price {
    font-size: 25px;
    font-weight: 750;
    letter-spacing: -0.5px;
    margin: 10px 0 20px;
}
.description {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.divider {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 22px 0;
}
.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 17px;
    font-size: 11px;
    font-weight: 600;
    color: #697486;
}
.field input,
.field select,
.field textarea {
    border: 1px solid var(--border);
    border-radius: 11px;
    padding: 13px;
    background: #f8f9fc;
    color: #303847;
    font-size: 14px;
    width: 100%;
    min-width: 0;
    font-weight: 400;
}
.field textarea {
    min-height: 90px;
    resize: vertical;
}
.field input:focus,
.field textarea:focus {
    outline: 2px solid #bfbfff;
    border-color: transparent;
}
.field input[type='file'] {
    font-size: 12px;
    padding: 12px;
}
.field small {
    font-size: 10px;
    font-weight: 400;
    color: var(--muted);
}
.field-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.error {
    background: #fff0f2;
    color: #ad3d51;
    padding: 13px;
    border-radius: 11px;
    font-size: 12px;
    line-height: 1.5;
    margin: 12px 0;
}
.note {
    background: #edf0f6;
    border-radius: 12px;
    font-size: 12px;
    color: #7a8495;
    padding: 14px;
    line-height: 1.6;
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.table th {
    text-align: left;
    font-size: 10px;
    color: var(--muted);
    font-weight: 500;
}
.table td,
.table th {
    padding: 13px 7px;
    border-bottom: 1px solid var(--border);
}
.table td:last-child,
.table th:last-child {
    text-align: right;
}
.order-row {
    width: 100%;
    border: 0;
    background: #fff;
    text-align: left;
    padding: 17px;
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.order-row strong {
    font-size: 13px;
}
.order-row p {
    font-size: 11px;
    margin: 5px 0;
}
.order-line {
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.order-line strong {
    font-size: 13px;
}
.order-line small {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-top: 6px;
}
.timeline {
    list-style: none;
    padding: 0;
}
.timeline li {
    position: relative;
    padding: 0 0 20px 23px;
    font-size: 12px;
}
.timeline li:before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    width: 7px;
    height: 7px;
    background: var(--blue);
    border-radius: 50%;
}
.timeline small {
    display: block;
    font-size: 10px;
    color: var(--muted);
    margin-top: 5px;
}
.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border: 0;
    background: transparent;
    border-bottom: 1px solid var(--border);
    padding: 17px 0;
    text-align: left;
    font-size: 12px;
}
.settings-row:last-child {
    border-bottom: 0;
}
.shop-choice {
    display: block;
    width: 100%;
    text-align: left;
    border: 1px solid var(--border);
    background: #f7f8fb;
    border-radius: 13px;
    padding: 17px;
    margin: 9px 0;
    font-weight: 600;
    font-size: 13px;
}
.shop-choice.selected {
    border-color: #b5b5ff;
    background: #ededff;
    color: var(--blue);
}
dialog {
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 26px;
    width: calc(100% - 28px);
    max-width: 490px;
    color: inherit;
    background: #fff;
    max-height: 90dvh;
}
dialog::backdrop {
    background: #1d273970;
    backdrop-filter: blur(4px);
}
dialog h2 {
    margin-bottom: 20px;
}
dialog .close {
    float: right;
    border: 0;
    background: #f0f2f6;
    border-radius: 50%;
    height: 32px;
    width: 32px;
    padding: 6px;
}
.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}
#toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    max-width: calc(100% - 32px);
    padding: 14px 20px;
    background: #242d3d;
    color: white;
    border-radius: 14px;
    z-index: 20;
    font-size: 13px;
    box-shadow: 0 5px 30px #0002;
}
.image-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.image-row .thumb {
    width: 45px;
    height: 50px;
    border-radius: 7px;
    background: #e7eaf0;
    object-fit: cover;
}
.image-row .grow {
    flex: 1;
    font-size: 11px;
    color: var(--muted);
}
.nowrap {
    white-space: nowrap;
}
.success {
    color: #337b57;
}
.small {
    font-size: 11px;
}
.badge-dot {
    width: 6px;
    height: 6px;
    display: inline-block;
    background: currentColor;
    border-radius: 50%;
    margin-right: 5px;
}
@media (min-width: 600px) {
    .app-shell {
        padding-left: 40px;
        padding-right: 40px;
    }
    .header {
        min-height: 95px;
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 20px;
    }
    .store-picker {
        grid-column: 2;
        grid-row: 1;
        justify-content: flex-end;
        text-align: right;
    }
    .account {
        grid-column: 3;
    }
    .products {
        gap: 22px;
    }
    .product-tile h3 {
        font-size: 15px;
    }
    .product-image {
        aspect-ratio: 4/4.6;
    }
    .stats {
        grid-template-columns: repeat(3, 1fr);
    }
    .hero-stat {
        grid-column: 1/-1;
    }
    .cover {
        max-height: 510px;
    }
    .welcome {
        padding-top: 100px;
    }
}
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        scroll-behavior: auto !important;
    }
}
