:root {
    color-scheme: light;
    --ink: #202834;
    --muted: #78808b;
    --deep: #202834;
    --brand: #ff6509;
    --brand-soft: #fff3e8;
    --brand-dark: #e95200;
    --line: #ebedf1;
    --paper: #fff;
    --radius: 24px;
    font: 16px/1.65 Inter, "Segoe UI", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid #ffae6b; outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1, h2 { line-height: 1.28; }
svg { flex: none; vertical-align: middle; }

.wrap { width: min(1180px, calc(100% - 56px)); margin-inline: auto; }
.public-head, .public-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.public-actions { display: flex; align-items: center; gap: 18px; }
.language-switcher { display: flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.language-switcher button { border: 0; border-radius: 7px; padding: 5px 8px; background: transparent; color: var(--muted); font-size: .82rem; font-weight: 700; white-space: nowrap; }
.language-switcher button:hover, .language-switcher button[aria-current="true"] { background: var(--brand-soft); color: var(--brand-dark); }
.public-head { min-height: 96px; }
.public-foot { padding-block: 26px; color: var(--muted); font-size: .875rem; }
.brand { display: inline-flex; align-items: center; gap: 11px; direction: ltr; width: max-content; font-size: 1.42rem; font-weight: 800; line-height: 1.05; }
.brand small { display: block; margin-top: 5px; font-size: .68rem; font-weight: 750; letter-spacing: .22em; color: var(--muted); }
.brand-mark, .panel-mark { display: inline-grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 13px; background: var(--brand-soft); color: var(--brand); }
.brand-mark { width: 36px; background: transparent; color: var(--brand); }
.brand-mark svg { width: 32px; height: 32px; stroke-width: 2.1; }
.brand-word { color: var(--brand); font-size: 1.7rem; font-weight: 900; letter-spacing: -.09em; }
.brand-word > span { color: var(--ink); }
.brand-word small { color: var(--muted); font-size: .56rem; letter-spacing: .2em; }
.text-link { padding-block: 7px; border-bottom: 1px solid #f2b18a; color: var(--brand-dark); font-size: .92rem; font-weight: 700; }
.text-link:hover { border-color: var(--brand-dark); }

.public-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 18px; align-items: stretch; }
.intro, .dash-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: radial-gradient(ellipse at 0% 100%, #ff954d 0, transparent 55%), linear-gradient(135deg, #e95200, #ff6509);
    color: #fff;
    border-radius: 30px;
}
.intro::before, .dash-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset-inline-end: -180px;
    bottom: -292px;
    width: 555px;
    height: 555px;
    border: 1px solid #fff7;
    border-radius: 50%;
    box-shadow: 0 0 0 36px #fff2, 0 0 0 72px #fff1, 0 0 0 108px #fff1, 0 0 0 144px #fff1;
}
.intro { min-height: 555px; display: flex; align-items: center; padding: clamp(32px, 5.5vw, 76px); }
.intro-inner { max-width: 540px; }
.eyebrow { display: flex; align-items: center; gap: 9px; color: #fff2e8; font-weight: 650; font-size: .9rem; }
.eyebrow span { display: inline-block; width: 8px; height: 8px; background: #ffe151; border-radius: 50%; box-shadow: 0 0 0 4px #ffe15140; }
.intro h1 { margin-top: 21px; font-size: clamp(2.65rem, 5vw, 4.65rem); letter-spacing: -.047em; }
.intro h1 em { font-style: normal; color: #ffe151; }
.intro-copy { color: #fff9f5; margin-top: 20px; font-size: 1.08rem; max-width: 390px; }
.intro-steps { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 36px; }
.intro-steps > div { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid #ffffff75; border-radius: 10px; color: #fff; font-size: .85rem; }
.intro-steps svg { width: 18px; height: 18px; color: #ffe151; }

.auth-panel, .card, .metric { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.auth-panel { padding: clamp(24px, 3.8vw, 48px); align-content: center; }
.auth-panel > .panel-mark { margin-bottom: 19px; }
.auth-panel h2 { font-size: 1.78rem; }
.auth-panel p, .card p { margin-top: 8px; color: var(--muted); }
.stack { display: grid; gap: 14px; margin-top: 22px; }
label { display: grid; gap: 6px; font-size: .91rem; font-weight: 650; }
input:not([type=hidden]), select { width: 100%; min-width: 0; min-height: 46px; padding-inline: 12px; border: 1px solid #dcdfe4; border-radius: 10px; background: #fafbfc; color: var(--ink); }
select { appearance: none; padding-inline-end: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23626b79' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.button { min-height: 44px; padding: 9px 16px; border: 1px solid transparent; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; text-align: center; font-weight: 700; font-size: .92rem; }
.button svg { width: 18px; height: 18px; }
.primary { background: var(--brand); color: #fff; }
.primary:hover { background: var(--brand-dark); }
.secondary { color: var(--brand-dark); border-color: #f3c8ad; background: #fff; }
.secondary:hover { background: var(--brand-soft); }
.white { color: var(--ink); background: #fff; }
.white:hover { background: #fff; }
.auth-panel .auth-foot { margin-top: 18px; font-size: .875rem; }
.auth-foot a { text-decoration: underline; }
.notice { margin-block: 13px; padding: 10px 15px; border: 1px solid #ffd8c3; border-radius: 11px; background: #fff6ef; color: #713c20; }
.notice.error { border-color: #e9bcbc; background: #fff2f0; color: #8e2c2c; }

.dashboard { display: grid; grid-template-columns: 244px minmax(0, 1fr); min-height: 100vh; }
.sidebar { display: flex; flex-direction: column; align-self: start; min-height: 100vh; position: sticky; top: 0; gap: 32px; padding: 26px 18px; background: #fff; border-inline-end: 1px solid var(--line); }
.sidebar .brand { margin: 4px 9px 0; }
.sidebar > .language-switcher { align-self: start; margin-inline-start: 8px; }
.sidebar nav { display: grid; gap: 6px; }
.sidebar nav a, .side-bottom button, .shop-link { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-radius: 10px; color: var(--muted); font-size: .9rem; font-weight: 650; }
.sidebar nav svg, .side-bottom svg { width: 19px; height: 19px; }
.sidebar nav a:hover, .sidebar nav [aria-current], .side-bottom a:hover, .side-bottom button:hover { background: var(--brand-soft); color: var(--brand-dark); }
.side-bottom { margin-top: auto; display: grid; gap: 6px; }
.side-bottom button { background: transparent; border: none; width: 100%; text-align: start; }
.workspace { width: min(1360px, 100%); margin-inline: auto; padding: 30px clamp(16px, 3vw, 48px); }
.dash-head, .section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.dash-head { margin-bottom: 24px; }
.dash-head h1 { font-size: clamp(1.45rem, 3vw, 2.15rem); }
.dash-head p, .muted { color: var(--muted); font-size: .86rem; }
.identity { display: flex; align-items: center; gap: 10px; }
.identity > span { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 50%; color: var(--brand-dark); background: var(--brand-soft); font-weight: 800; }
.identity small { display: block; color: var(--muted); font-size: .82rem; }
.dash-hero { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 30px; margin-bottom: 18px; }
.dash-hero h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); margin-block: 9px; }
.dash-hero p:last-child { color: #fff8f2; }
.section-head { margin-bottom: 13px; }
.section-head h2, .card h2 { font-size: 1.24rem; }
.period { display: flex; padding: 3px; border: 1px solid var(--line); background: #fff; border-radius: 10px; white-space: nowrap; }
.period a { padding: 4px 9px; font-size: .85rem; }
.period [aria-current] { background: var(--brand-soft); color: var(--brand-dark); border-radius: 7px; font-weight: 700; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.metric { padding: 16px; }
.metric p { margin-top: 12px; color: var(--muted); font-size: .9rem; }
.metric strong { font-size: clamp(1.1rem, 2.2vw, 1.65rem); }
.metric .panel-mark { width: 36px; height: 36px; }
.metric svg { width: 20px; height: 20px; }
.card { padding: clamp(15px, 2vw, 25px); margin-top: 15px; }
.chart { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; direction: ltr; }
.bar { display: grid; justify-items: center; gap: 4px; font-size: .82rem; color: var(--muted); }
.bar meter { display: block; width: min(100%, 84px); height: 19px; }
.bar meter::-webkit-meter-bar { background: #f3f4f6; border: 0; border-radius: 5px; }
.bar meter::-webkit-meter-optimum-value { background: var(--brand); border-radius: 5px; }
.bar meter::-moz-meter-bar { background: var(--brand); border-radius: 5px; }
.catalog-search { display: grid; grid-template-columns: minmax(0, 1fr) max-content; align-items: end; gap: 10px; margin-block: 20px; }
.catalog-search label { min-width: 0; }
.catalog-search input { text-align: start; }
.catalog-status { margin-block: 14px; color: var(--muted); font-size: .92rem; }
.catalog-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.catalog-product { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: transform .18s, box-shadow .18s; }
.catalog-product:hover { transform: translateY(-2px); box-shadow: 0 8px 24px #20283414; }
.catalog-visual { display: grid; place-items: center; aspect-ratio: 1.15; overflow: hidden; padding: 12px; background: linear-gradient(135deg, #fafbfc, #f3f4f6); }
.catalog-visual img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.catalog-image-empty { color: var(--brand); font-size: 1.25rem; font-weight: 850; }
.catalog-details { display: grid; gap: 8px; padding: 12px; }
.catalog-category { color: var(--muted); font-size: .82rem; }
.catalog-details h3 { display: -webkit-box; min-height: 3.2em; overflow: hidden; font-size: .9rem; line-height: 1.6; font-weight: 600; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.catalog-price { color: var(--brand-dark); font-size: 1.06rem; }
.catalog-actions { display: grid; grid-template-columns: 1fr; gap: 7px; padding: 0 12px 12px; }
.catalog-actions .button { width: 100%; min-height: 42px; font-size: .85rem; }
.catalog-pagination { justify-content: center; margin-top: 18px; }
.catalog-pagination[hidden] { display: none; }
.form-inline { display: grid; grid-template-columns: 1fr 1.8fr max-content; align-items: end; gap: 10px; }
.coupon-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 12px; }
.coupon-form .coupon-assignment { grid-column: span 2; }
.coupon-form > .button { justify-self: start; }
.coupon-table { min-width: 820px; }
.coupon-copy { min-width: 190px; }
.coupon-copy input { font-weight: 750; letter-spacing: .04em; }
.coupon-copy .button { min-width: 94px; flex: 0 0 auto; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.settings-grid .button, .invite-result { margin-top: 10px; }
.link-row { display: grid; grid-template-columns: 1fr 1.5fr; align-items: center; gap: 12px; padding-block: 13px; border-top: 1px solid var(--line); }
.link-row p { font-size: .86rem; }
.link-row a { text-decoration: underline; }
.copy-field { min-width: 0; display: flex; align-items: center; gap: 5px; }
.copy-field input { font-size: .83rem; }
.empty { padding: 22px 12px; border: 1px dashed #f3c8ad; border-radius: 12px; text-align: center; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; text-align: start; font-size: .9rem; }
th, td { padding: 10px; border-bottom: 1px solid var(--line); text-align: start; }
th { background: #fff6ef; color: var(--muted); white-space: nowrap; }
td small { color: var(--muted); display: block; }
.pill { display: inline-block; padding: 3px 8px; border-radius: 9999px; white-space: nowrap; font-size: .83rem; }
.pill.green { background: #def0e1; color: #226341; }
.pill.orange { background: #fceedb; color: #824317; }
.pill.gray { background: #edf0ed; color: #52625a; }
.pagination { display: flex; align-items: center; gap: 10px; padding-top: 16px; }
.dash-foot { font-size: .83rem; color: var(--muted); margin-top: 20px; }
.dash-foot span { margin-inline: 5px; }

@media (max-width: 1020px) {
    .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sidebar { min-height: 0; position: static; padding: 13px 16px; flex-direction: row; flex-wrap: wrap; gap: 12px; align-items: center; border-inline-end: 0; border-bottom: 1px solid var(--line); }
    .sidebar .brand { margin: 0; }
    .sidebar nav { display: flex; flex-wrap: wrap; gap: 2px; }
    .side-bottom { margin: 0; display: flex; flex-wrap: wrap; margin-inline-start: auto; }
    .dashboard { display: block; }
}
@media (max-width: 700px) {
    .wrap { width: calc(100% - 28px); }
    .public-head { min-height: 75px; }
    .public-layout { grid-template-columns: 1fr; gap: 12px; }
    .public-actions { flex-wrap: wrap; justify-content: end; gap: 7px; }
    .public-actions .text-link { font-size: .83rem; }
    .intro { min-height: 0; padding: 26px; border-radius: 22px; }
    .intro h1 { margin-top: 12px; font-size: clamp(2rem, 9vw, 3.1rem); }
    .intro-copy { margin-top: 12px; }
    .intro-steps { margin-top: 20px; gap: 6px; }
    .intro-steps > div { padding: 5px 8px; }
    .dashboard .sidebar nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
    .sidebar nav a { white-space: nowrap; padding-inline: 8px; }
    .sidebar .shop-link { display: none; }
    .workspace { padding-block: 18px; }
    .dash-hero { flex-direction: column; align-items: start; padding: 20px; }
    .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-inline, .link-row, .settings-grid, .coupon-form { grid-template-columns: 1fr; }
    .coupon-form .coupon-assignment { grid-column: auto; }
    .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .catalog-visual { aspect-ratio: 1.05; padding: 8px; }
    .catalog-details { gap: 6px; padding: 10px; }
    .catalog-actions { padding: 0 10px 10px; }
    .catalog-search { grid-template-columns: minmax(0, 1fr) max-content; }
    .settings-grid { gap: 0; }
    .section-head { flex-wrap: wrap; }
}

