:root {
  color-scheme: light;
  --background: #f6f7fc;
  --surface: #fff;
  --text: #16192e;
  --muted: #57617a;
  --line: #e6e8f2;
  --brand: #5745d6;
  --brand-hover: #4735be;
  --brand-light: #eeebff;
  --focus: #7765f0;
  font-family: "Segoe UI", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  line-height: 1.55;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--text); background: var(--background); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, p { margin: 0; }
svg { display: block; width: 20px; height: 20px; flex: none; }
.muted { color: var(--muted); }
.button { display: inline-flex; gap: 8px; justify-content: center; align-items: center; min-height: 42px; padding: 9px 15px; border: 1px solid transparent; border-radius: 9px; font-size: .875rem; font-weight: 650; white-space: nowrap; }
.button svg { width: 17px; height: 17px; }
.primary { color: #fff; background: var(--brand); }
.primary:hover:not(:disabled) { background: var(--brand-hover); }
.secondary { border-color: var(--line); background: var(--surface); }
.secondary:hover:not(:disabled), .quiet:hover { background: var(--background); border-color: #dcdff0; }
.quiet { color: var(--muted); background: transparent; }
.icon-button { width: 36px; height: 36px; border: 1px solid transparent; border-radius: 8px; display: inline-grid; place-items: center; color: var(--muted); background: transparent; }
.icon-button:hover:not(:disabled) { background: var(--background); border-color: var(--line); }
.icon-button svg { width: 18px; height: 18px; }

.workspace { min-height: 100vh; display: grid; grid-template-columns: 218px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; padding: 29px 16px 16px; background: #fff; border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; font-size: 1.125rem; font-weight: 760; letter-spacing: .07em; }
.sidebar .brand { margin: 0 12px 38px; }
.brand-icon { width: 38px; height: 38px; display: grid; place-items: center; color: #fff; border-radius: 11px; background: linear-gradient(145deg, #7966f2, #4e3ac8); box-shadow: 0 5px 8px #5846d334; }
.brand-icon svg { width: 22px; height: 22px; }
.sidebar nav { display: grid; gap: 6px; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; min-height: 47px; padding: 10px 13px; border-radius: 9px; color: var(--muted); font-size: .9375rem; font-weight: 600; }
.sidebar nav a svg { width: 18px; height: 18px; }
.sidebar nav a:hover { background: var(--background); }
.sidebar nav a[aria-current="page"] { color: #4936c0; background: var(--brand-light); }
.sidebar-foot { display: flex; gap: 10px; align-items: center; margin-top: auto; padding: 15px 9px 3px; border-top: 1px solid var(--line); font-size: .875rem; font-weight: 650; }
.sidebar-foot small { display: block; font-weight: 400; color: var(--muted); }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #eeebff; color: #604bd6; }
.avatar svg { width: 18px; height: 18px; }
.topbar { display: flex; justify-content: space-between; align-items: center; min-height: 70px; padding: 0 32px; border-bottom: 1px solid var(--line); background: #fff; }
.breadcrumbs { display: flex; align-items: center; gap: 10px; font-size: .875rem; color: var(--muted); }
.breadcrumbs svg { width: 14px; height: 14px; color: #8790a8; }
.breadcrumbs strong { color: var(--text); }
.main-content { max-width: 1520px; margin: 0 auto; padding: 27px 32px 38px; }

.hero { position: relative; isolation: isolate; overflow: hidden; min-height: 224px; display: flex; align-items: center; padding: 32px 38px; border-radius: 16px; color: white; background: radial-gradient(ellipse at 92% 70%, #6552d4 0%, transparent 49%), linear-gradient(112deg, #27205f 0%, #36277f 63%, #4f3caa 100%); }
.hero-copy { position: relative; z-index: 1; }
.hero h1, .page-head h1 { font-size: clamp(1.625rem, 2.6vw, 2.2rem); letter-spacing: .02em; font-weight: 740; line-height: 1.25; }
.hero p { margin: 13px 0 22px; color: #eeebff; }
.hero-button { color: #4834ba; background: #fff; box-shadow: 0 4px 15px #1e12593d; }
.hero-button:hover { background: #efecff; }
.hero-art { position: absolute; right: 7%; bottom: 0; width: 290px; height: 100%; pointer-events: none; }
.orbit { position: absolute; width: 360px; height: 360px; border: 1px solid #b5a6ff32; border-radius: 50%; top: -70px; right: -82px; }
.orbit-two { width: 298px; height: 298px; top: -39px; right: -51px; }
.art-ticket { position: absolute; border-radius: 18px; }
.art-ticket-back { top: 47px; right: 47px; width: 176px; height: 118px; transform: rotate(12deg); background: linear-gradient(125deg, #af9ff6, #7659e0); box-shadow: 0 13px 24px #2a1a7370; border: 1px solid #cfc4ff75; }
.art-ticket-front { right: 64px; top: 65px; width: 188px; height: 121px; display: flex; align-items: center; gap: 14px; padding: 18px; transform: rotate(-13deg); background: linear-gradient(126deg, #fbfaff, #ded5ff); color: #5540c8; box-shadow: 0 12px 29px #25156a70; }
.art-ticket-icon { display: grid; width: 75px; height: 75px; place-items: center; border-radius: 13px; background: #ffffff9c; }
.art-ticket-icon svg { width: 53px; height: 53px; stroke-width: 1.45; }
.art-line { align-self: stretch; border: 0; border-left: 2px dashed #a99be4; }
.art-check { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #fff; background: #6450d9; }
.art-check svg { width: 22px; height: 22px; }
.spark { position: absolute; color: #ded6ff; line-height: 1; }
.spark-one { top: 36px; right: 25px; font-size: 1.75rem; }
.spark-two { bottom: 38px; right: 20px; font-size: 1.15rem; }
.spark-three { top: 35px; left: 34px; font-size: 1.25rem; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin: 18px 0; }
.stat { display: flex; align-items: center; gap: 13px; min-height: 97px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.stat-icon { display: grid; place-items: center; flex: 0 0 42px; height: 42px; border-radius: 11px; }
.stat-icon.violet { color: #644bd3; background: #eee8ff; }
.stat-icon.mint { color: #198168; background: #dff6ed; }
.stat-icon.azure { color: #2c6dd1; background: #e5efff; }
.stat-icon.amber { color: #9c5c15; background: #fff0d9; }
.stat div > span { display: block; font-size: .875rem; color: var(--muted); }
.stat strong { display: block; font-size: clamp(1.2rem, 2vw, 1.75rem); font-weight: 730; line-height: 1.3; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.panel { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.panel-head, .page-head { display: flex; gap: 14px; align-items: center; justify-content: space-between; }
.panel-head { padding: 17px 21px; }
.panel-head h2 { font-size: 1.125rem; white-space: nowrap; }
.page-head { margin: 4px 0 23px; }
.page-head p { margin-top: 8px; color: var(--muted); }
.record-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar { display: flex; gap: 9px; }
input, select, textarea { width: 100%; min-width: 0; border: 1px solid #dce0ee; border-radius: 8px; padding: 9px 11px; color: var(--text); background: white; }
input, select { min-height: 41px; }
input::placeholder, textarea::placeholder { color: #6c758d; }
textarea { resize: vertical; }
.search, .select-wrap { position: relative; color: var(--muted); font-size: .875rem; }
.search { width: 205px; }
.search > span, .select-wrap > span { position: absolute; display: grid; place-items: center; height: 100%; pointer-events: none; }
.search > span { left: 11px; }
.search svg, .select-wrap svg { width: 16px; height: 16px; }
.search input { padding-left: 34px; }
.select-wrap { max-width: 190px; }
.select-wrap > span { top: 0; right: 10px; }
.select-wrap select { appearance: none; padding-right: 31px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: .875rem; text-align: left; }
.activity-table { min-width: 760px; }
.record-table { min-width: 800px; }
.data-table th { padding: 13px 16px; color: #4d5771; white-space: nowrap; background: #f7f8fc; font-weight: 620; }
.data-table th small { color: #626e8a; font-size: .75rem; font-weight: 400; }
.data-table td { padding: 14px 16px; border-top: 1px solid #eceef5; vertical-align: middle; }
.data-table td:first-child, .data-table th:first-child { padding-left: 21px; }
.data-table td:last-child, .data-table th:last-child { padding-right: 21px; }
.data-table tbody tr:hover:not(:has(.empty-cell)) { background: #fcfbff; }
.activity-name { display: flex; align-items: center; gap: 10px; min-width: 135px; }
.activity-name div { max-width: 245px; overflow-wrap: anywhere; }
.activity-name small { display: block; margin-top: 2px; color: var(--muted); font-size: .8125rem; }
.activity-mark { display: grid; place-items: center; flex: 0 0 36px; height: 36px; border-radius: 9px; background: #ede9ff; color: #5a45c8; font-weight: 700; }
.badge { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 4px 9px; border-radius: 99px; background: #edf0f6; color: #536079; font-size: .8125rem; font-weight: 620; }
.badge span { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.active { background: #e5f7ed; color: #137350; }
.badge.upcoming { background: #e8efff; color: #325db0; }
.badge.paused { background: #fff0d9; color: #87500d; }
.badge.sold_out { background: #f1eaff; color: #6745a3; }
.date-range { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.date-range time { display: block; }
.inventory { min-width: 90px; max-width: 135px; white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.inventory strong { color: var(--text); }
progress { appearance: none; display: block; margin-top: 6px; width: 100%; height: 5px; border: 0; border-radius: 6px; overflow: hidden; background: #edeafb; color: var(--brand); }
progress::-webkit-progress-bar { background: #edeafb; }
progress::-webkit-progress-value { border-radius: 6px; background: #7b65e8; }
progress::-moz-progress-bar { border-radius: 6px; background: #7b65e8; }
.row-actions { display: flex; gap: 9px; white-space: nowrap; }
.link-button { border: 0; background: transparent; color: #513bc6; padding: 5px 2px; font-weight: 620; }
.link-button:hover { text-decoration: underline; }
.link-button.subtle { color: var(--muted); }
.record-table code { display: inline-block; padding: 4px 7px; border-radius: 5px; white-space: nowrap; background: #f0ecff; color: #4b39a8; }
.record-table td:nth-child(5) { white-space: nowrap; }
.data-table td.empty-cell { padding: 0; }
.empty-state { display: grid; justify-items: center; gap: 7px; padding: 34px 16px 36px; text-align: center; }
.empty-state strong { font-size: 1rem; }
.empty-state p { color: var(--muted); }
.empty-state .button { margin-top: 6px; min-height: 37px; padding-block: 6px; }
.empty-icon { width: 45px; height: 45px; display: grid; place-items: center; color: #6049d7; border-radius: 13px; background: #efeaff; margin-bottom: 4px; }
.empty-icon svg { width: 23px; height: 23px; }
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 11px 21px; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.pagination > div { display: flex; align-items: center; gap: 8px; }

dialog { width: min(460px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); color: var(--text); background: var(--surface); border: 1px solid #e4e3f1; border-radius: 16px; padding: 0; box-shadow: 0 22px 85px #17113c38; }
dialog::backdrop { background: #1f193d85; }
.drawer { width: min(946px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; border-radius: 16px 0 0 16px; }
.editor-form { display: flex; flex-direction: column; height: 100%; }
.dialog-head, .dialog-foot { display: flex; align-items: center; gap: 12px; padding: 17px 23px; flex: none; }
.dialog-head { justify-content: space-between; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 1.22rem; }
.dialog-head p { margin-top: 3px; color: var(--muted); font-size: .875rem; overflow-wrap: anywhere; }
.dialog-foot { justify-content: flex-end; border-top: 1px solid var(--line); }
.editor-body { display: grid; grid-template-columns: minmax(248px, .84fr) minmax(0, 1.16fr); flex: 1; min-height: 0; overflow-y: auto; }
.editor-preview { align-self: stretch; min-width: 0; padding: 20px; background: #f4f3fa; border-right: 1px solid var(--line); text-align: center; }
.editor-preview h3 { margin: 0 0 14px; color: var(--muted); font-size: .875rem; font-weight: 650; }
.phone-preview { width: min(100%, 268px); height: min(54vh, 480px); min-height: 260px; margin: 0 auto; border: 5px solid #29243d; border-radius: 23px; overflow: auto; background: #fbfaff; box-shadow: 0 10px 25px #2a24442b; scrollbar-width: thin; }
.phone-title { position: sticky; top: 0; z-index: 1; padding: 12px 11px; background: #fff; border-bottom: 1px solid var(--line); font-size: .875rem; font-weight: 700; overflow-wrap: anywhere; }
.phone-preview img { display: block; width: 100%; height: auto; }
.preview-placeholder { display: grid; justify-items: center; align-content: center; gap: 10px; min-height: 179px; margin: 12px; padding: 12px; border: 1px dashed #cfc6ef; border-radius: 10px; color: #594a83; background: #f2eeff; font-size: .8125rem; }
.preview-placeholder svg { width: 26px; height: 26px; }
.preview-coupon { margin: 12px 10px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: .8125rem; overflow-wrap: anywhere; }
.editor-fields { display: grid; align-content: start; gap: 15px; min-width: 0; padding: 20px 23px; }
.image-field { display: flex; align-items: center; gap: 9px; }
.image-field input { font-size: .875rem; }
.image-field input::file-selector-button { margin-right: 8px; border: 0; padding: 4px 8px; border-radius: 5px; color: #4e3ab5; background: var(--brand-light); cursor: pointer; }
.image-field .link-button { white-space: nowrap; padding-inline: 5px; }
.field { display: grid; gap: 5px; }
.field label, .field legend, .qr-body label, .login-card label { font-size: .875rem; font-weight: 650; }
.field label span, .field legend span { color: #b42843; }
.field small { font-size: .8125rem; color: var(--muted); font-weight: 400; }
.time-fields { grid-template-columns: 5rem minmax(0, 1fr); align-items: center; margin: 0; padding: 4px 0 0; min-width: 0; border: 0; }
.time-fields legend { padding: 0; }
.time-fields label { font-weight: 400; color: var(--muted); }
.form-note { display: flex; align-items: flex-start; gap: 9px; padding: 9px 11px; color: #4f3aac; background: #f1edff; border-radius: 8px; font-size: .875rem; }
.form-error { color: #a32139; font-size: .875rem; }
.qr-body { padding: 17px 23px 20px; }
.qr-frame { width: 202px; min-height: 202px; display: grid; place-items: center; margin: 0 auto 11px; text-align: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.qr-frame img { display: block; }
.qr-instruction { text-align: center; color: var(--muted); margin-bottom: 14px; }
.qr-body .form-note { margin-bottom: 12px; }
.copy-field { display: flex; gap: 8px; margin-top: 5px; }
.copy-field input { color: var(--muted); font-size: .875rem; }
.qr-foot .button { width: 100%; }
.toast { position: fixed; z-index: 3; right: 24px; bottom: 24px; max-width: calc(100vw - 48px); padding: 12px 17px; border-radius: 9px; background: #282146; color: #fff; box-shadow: 0 8px 23px #25214138; }
.app-loading { padding: 30px; color: var(--muted); text-align: center; }
.login-layout, .claim-layout { min-height: 100svh; display: grid; place-items: center; padding: 22px; background: radial-gradient(ellipse at 20% 0%, #ece6ff, transparent 52%), var(--background); }
.login-card, .claim-card { width: min(100%, 420px); padding: 29px; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: 0 13px 44px #2c245b12; }
.login-card h1 { margin: 22px 0 5px; font-size: 1.5rem; }
.login-card form { display: grid; gap: 9px; margin-top: 23px; }
.login-card button { margin-top: 5px; }

.claim-layout { align-items: start; padding-top: clamp(29px, 13svh, 100px); }
.claim-card { overflow: hidden; text-align: center; padding: 0; }
.claim-heading { padding: 27px 20px 23px; color: #fff; background: radial-gradient(ellipse at 90% 15%, #7057dd, transparent 56%), linear-gradient(120deg, #342677, #4b36ab); }
.claim-heading .brand { justify-content: center; font-size: 1rem; }
.claim-heading .brand-icon { width: 30px; height: 30px; background: #ffffff28; box-shadow: none; }
.claim-heading .brand-icon svg { width: 18px; height: 18px; }
.claim-heading h1 { font-size: 1.45rem; margin-top: 11px; overflow-wrap: anywhere; }
.claim-actions { padding: 23px 18px; }
.claim-message h2, .activity-details h2, .receipt-content h2 { font-size: 1.16rem; }
.claim-message p, .activity-details p { color: var(--muted); margin-top: 6px; overflow-wrap: anywhere; }
.claim-message p:empty { display: none; }
.claim-message .retry { margin-top: 14px; }
.activity-details { padding: 17px 21px 23px; text-align: left; border-top: 1px solid var(--line); }
.activity-details p { white-space: pre-wrap; }
.gift-action { display: inline-grid; justify-items: center; align-items: center; gap: 4px; width: min(100%, 230px); padding: 10px 18px 16px; border: 1px solid #d9cffb; border-radius: 20px; color: #42258d; background: radial-gradient(ellipse at 50% 47%, #fff 6%, #efe7ff 75%); box-shadow: 0 6px 18px #37247017; font-size: 1.125rem; font-weight: 750; }
.gift-action:hover:not(:disabled) { border-color: #9f8ee9; }
.gift-action[aria-busy="true"] { opacity: 1; cursor: wait; }
.gift-art { position: relative; isolation: isolate; display: block; width: 128px; height: 105px; font-size: 16px; }
.gift-art::before { content: ''; position: absolute; inset: auto 15% 3% 15%; height: 12%; border-radius: 50%; background: #5d469f45; filter: blur(5px); }
.gift-base, .gift-lid { position: absolute; border-radius: .35em; filter: drop-shadow(0 3px 4px #33236326); }
.gift-base { left: 18%; top: 44%; width: 64%; height: 46%; background: linear-gradient(90deg, transparent 42%, #f3c779 42% 58%, transparent 58%), linear-gradient(115deg, #8962ea, #5831b3); box-shadow: inset 0 3px 8px #32216548; }
.gift-lid { z-index: 1; left: 12%; top: 32%; width: 76%; height: 19%; background: linear-gradient(90deg, transparent 43%, #ffdaa0 43% 57%, transparent 57%), linear-gradient(120deg, #b99af9, #744bd1); transform-origin: 80% 82%; }
.gift-bow { position: absolute; left: 44%; top: -64%; width: 12%; height: 76%; border-radius: 35%; background: #ffce82; }
.gift-bow::before, .gift-bow::after { position: absolute; content: ''; inset: auto 60% 18% auto; width: 165%; height: 105%; border-radius: 70% 55% 25% 65%; border: max(2px, .27em) solid #f2bf70; transform: rotate(26deg); }
.gift-bow::after { inset: auto auto 18% 60%; transform: scaleX(-1) rotate(26deg); }
.gift-action.is-opened .gift-lid { transform: translateY(-25%) rotate(15deg); }
.gift-action.is-opening .gift-lid { animation: lift-lid .44s cubic-bezier(.22,.8,.36,1) both; }
.gift-action.is-opening .gift-base { animation: press-box .44s ease-out both; }
@keyframes lift-lid {
  0%, 22% { transform: translateY(0) rotate(-3deg); }
  69% { transform: translateY(-88%) rotate(21deg); }
  100% { transform: translateY(-25%) rotate(15deg); }
}
@keyframes press-box {
  28% { transform: translateY(5%) scale(1.06, .93); }
  67% { transform: translateY(-3%) scale(.98, 1.04); }
}
.claim-inline-error { margin-top: 9px; color: #a32139; font-size: .875rem; }
.receipt-dialog { width: min(390px, calc(100vw - 26px)); }
.receipt-dialog::backdrop { background: #211537ac; }
.receipt-content { position: relative; padding: 25px 18px 20px; text-align: center; }
.receipt-close { position: absolute; top: 8px; right: 8px; }
.claim-mark { display: grid; place-items: center; width: 45px; height: 45px; margin: 0 auto 8px; color: #137350; background: #e5f7ed; border-radius: 50%; }
.claim-mark svg { width: 24px; height: 24px; }
.receipt-dialog.is-pending .claim-mark { color: #513bc6; background: #eeebff; }
.coupon-result { margin-top: 17px; padding: 15px 10px; border: 1px dashed #b8aaf3; border-radius: 11px; background: #f7f4ff; }
.coupon-result strong { display: block; overflow-wrap: anywhere; }
.coupon-result code { display: block; margin: 9px 0 12px; font-size: clamp(.91rem, 5vw, 1.28rem); font-weight: 720; letter-spacing: .02em; color: #4a35b3; }
.claim-time { color: var(--muted); font-size: .875rem; margin-top: 12px; }
.claim-layout.has-poster { min-height: 100svh; padding: 0; background: #f6f7fc; }
.has-poster .claim-card { width: min(100%, 540px); padding-bottom: 118px; border: 0; border-radius: 0; box-shadow: none; }
.has-poster .claim-heading { padding: 14px 18px; color: var(--text); background: #fff; }
.has-poster .claim-heading .brand { display: none; }
.has-poster .claim-heading h1 { margin: 0; font-size: 1.1rem; }
.claim-poster { display: block; width: 100%; height: auto; }
.has-poster .claim-actions { position: fixed; z-index: 2; left: 50%; bottom: max(12px, env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(calc(100% - 24px), 420px); padding: 0; }
.has-poster .gift-action { display: flex; justify-content: center; gap: 6px; width: 100%; padding: 1px 11px; min-height: 59px; border: 0; border-radius: 14px; color: #fff; background: linear-gradient(120deg, #5d45ca, #45268f); box-shadow: 0 5px 25px #24104765; }
.has-poster .gift-action:hover:not(:disabled) { background: linear-gradient(120deg, #5137bd, #3c207f); }
.has-poster .gift-art { width: 66px; height: 54px; font-size: 10px; }
.has-poster .claim-message, .has-poster .claim-inline-error { padding: 10px 11px; border-radius: 11px; background: #fff; box-shadow: 0 4px 18px #24104736; }
.has-poster .claim-inline-error { margin-top: 5px; }

@media (prefers-reduced-motion: reduce) {
  .gift-action.is-opening .gift-lid, .gift-action.is-opening .gift-base { animation: none; }
}

.merchant-layout { min-height: 100svh; background: radial-gradient(ellipse at 20% 0%, #eae1ff, transparent 54%), var(--background); }
.merchant-main { width: min(100%, 510px); margin: 0 auto; padding: 16px 14px 32px; }
.merchant-heading { position: relative; padding: 22px; border-radius: 15px; color: #fff; background: linear-gradient(135deg, #312266, #5f43c6); }
.merchant-heading .brand { font-size: .95rem; }
.merchant-heading .brand-icon { width: 31px; height: 31px; background: #ffffff2a; box-shadow: none; }
.merchant-heading h1 { margin-top: 12px; line-height: 1.2; font-size: 1.6rem; }
.merchant-heading > button { position: absolute; top: 17px; right: 17px; background: #ffffff26; color: #fff; }
.merchant-panel { margin-top: 12px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.merchant-panel h2 { font-size: 1.14rem; }
.merchant-form { display: grid; gap: 11px; margin-top: 12px; }
.merchant-form input { min-height: 46px; }
.merchant-code { font-family: ui-monospace, Consolas, monospace; }
.merchant-error { margin-top: 10px; }
.merchant-result-head { display: flex; gap: 8px; align-items: flex-start; justify-content: space-between; }
.merchant-result-head h2 { overflow-wrap: anywhere; }
.merchant-result dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 12px; margin: 13px 0; font-size: .875rem; }
.merchant-result dl dt { color: var(--muted); }
.merchant-result dl dd { margin: 0; overflow-wrap: anywhere; }
.merchant-result dl code { color: #4934a6; }
.merchant-result > button { width: 100%; margin-top: 5px; }
.merchant-feedback { color: #137350; padding: 8px 10px; border-radius: 7px; background: #e5f7ed; }

@media (max-width: 1150px) {
  .workspace { grid-template-columns: 175px minmax(0, 1fr); }
  .topbar { padding-inline: 20px; }
  .main-content { padding-inline: 20px; }
  .hero-art { right: 1%; }
  .stat { padding-inline: 12px; gap: 8px; }
}

@media (max-width: 890px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; border: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { margin: 0; }
  .sidebar nav { display: flex; }
  .sidebar-foot { display: none; }
  .topbar { min-height: 54px; }
}

@media (max-width: 660px) {
  .hero { min-height: 196px; padding: 23px 19px; }
  .hero-art { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-block: 12px; }
  .stat { min-height: 80px; }
  .panel-head { align-items: flex-start; flex-direction: column; padding: 14px; }
  .toolbar { width: 100%; }
  .data-table:has(.empty-cell) { min-width: 100%; }
  .data-table:has(.empty-cell) thead { display: none; }
  .search { flex: 1; width: auto; min-width: 0; }
  .select-wrap { max-width: 45%; }
  .main-content { padding: 13px 11px 25px; }
  .topbar, .sidebar { padding-inline: 12px; }
  .sidebar nav a { padding-inline: 9px; min-height: 42px; gap: 6px; font-size: .875rem; }
  .sidebar nav a svg { width: 15px; height: 15px; }
  .drawer { border-radius: 0; }
  .dialog-head, .dialog-foot, .editor-fields { padding-inline: 15px; }
  .editor-body { display: flex; flex-direction: column; }
  .editor-fields { order: -1; }
  .editor-preview { border-right: 0; border-top: 1px solid var(--line); }
  .page-head { gap: 8px; flex-wrap: wrap; }
  .page-head p { font-size: .875rem; }
}
