:root {
  --navy: #14243c;
  --blue: #2463eb;
  --blue-dark: #194bb8;
  --blue-soft: #edf3ff;
  --ink: #192b43;
  --muted: #5e6c80;
  --line: #e2e8f0;
  --page: #f5f7fb;
  --card: #fff;
  --green: #147754;
  --green-soft: #eaf7f1;
  --amber: #965700;
  --red: #b42338;
  --radius: 14px;
  --shadow: 0 6px 24px #20375406;
  --ease: 160ms ease;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: var(--ink);
  background: var(--page);
  font-size: 16px;
  line-height: 1.6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
a,
input,
textarea {
  outline-offset: 3px;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 1px solid var(--blue);
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}
button {
  transition:
    background var(--ease),
    border-color var(--ease),
    box-shadow var(--ease);
}
button:active:not(:disabled),
.button:active {
  filter: brightness(0.93);
}
a:hover {
  color: var(--blue);
}
svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
.icon-defs {
  display: none;
}
.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 30;
  padding: 10px 20px;
  background: var(--card);
}
.skip-link:focus {
  top: 10px;
}
.workspace {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
}
/* Keep private navigation hidden until the server-backed session is known. */
body:not([data-session="member"]) .sidebar,
body:not([data-session="member"]) .mobile-nav,
body:not([data-session="member"]) .portal-footer,
body[data-page="auth"] .sidebar,
body[data-page="auth"] .mobile-nav,
body[data-page="auth"] .portal-footer {
  display: none;
}
body:not([data-session="member"]) .workspace-main,
body[data-page="auth"] .workspace-main {
  width: 100%;
  margin-left: 0;
}
.guest-brand,
.auth-home,
.auth-copyright {
  display: none;
}
body:not([data-session="member"]) .guest-brand,
body[data-page="auth"] .guest-brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 11px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
}
.guest-brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
body:not([data-session="member"]) .breadcrumb,
body:not([data-session="member"]) .mobile-brand {
  display: none;
}
.sidebar {
  width: 252px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 32px 20px 22px;
  position: fixed;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 5;
}
.brand {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 17px;
  font-weight: 750;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.brand-mark {
  background: var(--blue);
  color: white;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -2px;
  padding-right: 2px;
  flex-shrink: 0;
}
.brand small {
  display: block;
  font-size: 10px;
  letter-spacing: 1.4px;
  color: var(--muted);
  font-weight: 500;
  margin-top: 2px;
}
.nav-label {
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--muted);
  margin: 42px 14px 14px;
}
.main-nav {
  display: grid;
  gap: 8px;
}
.main-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  border-radius: 9px;
  padding: 11px 15px;
  color: #4c5d75;
  font-size: 15px;
  font-weight: 550;
}
.main-nav a.active {
  background: var(--blue-soft);
  color: var(--blue);
}
.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-left: auto;
  display: none;
}
.active .nav-dot {
  display: block;
}
.sidebar-note {
  margin-top: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 15px;
  background: #fafcff;
}
.sidebar-note svg {
  color: var(--blue);
  display: block;
  margin-bottom: 12px;
}
.sidebar-note strong {
  font-size: 13px;
}
.sidebar-note p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
  margin: 8px 0 13px;
}
.sidebar-note a {
  font-size: 12px;
  color: var(--blue);
  display: flex;
  justify-content: space-between;
}
.back-site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin: 26px 14px 0;
}
.back-site svg {
  width: 15px;
  height: 15px;
}
.workspace-main {
  width: calc(100% - 252px);
  margin-left: 252px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.topbar {
  height: 80px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  gap: 16px;
}
.breadcrumb {
  font-size: 13px;
  color: var(--muted);
}
.breadcrumb span {
  margin: 0 14px;
  color: #9aa6b8;
}
.account-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
}
.account-nav button {
  border: 0;
  background: none;
  color: var(--muted);
  min-height: 44px;
  padding: 0 6px;
}
.user-chip {
  display: flex;
  gap: 8px;
  align-items: center;
  max-width: 220px;
  overflow-wrap: anywhere;
}
.user-chip svg {
  width: 28px;
  height: 28px;
  background: var(--blue-soft);
  padding: 5px;
  border-radius: 50%;
  color: var(--blue);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 10px 20px;
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.button:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
  color: #fff;
}
.button.secondary {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}
.button.secondary:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.button.small {
  min-height: 38px;
  padding: 7px 15px;
  font-size: 13px;
}
.button.full {
  width: 100%;
}
.button.danger {
  background: white;
  color: var(--red);
  border-color: #efc5ce;
}
.mobile-brand,
.mobile-nav {
  display: none;
}
main {
  padding: 36px 40px 24px;
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
  flex: 1;
  outline: none;
}
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}
.eyebrow {
  color: var(--blue);
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 750;
  margin: 0 0 10px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 28px;
  line-height: 1.4;
  letter-spacing: -0.7px;
  margin-bottom: 8px;
}
h2 {
  font-size: 19px;
  line-height: 1.4;
  margin-bottom: 8px;
}
h3 {
  font-size: 17px;
  line-height: 1.5;
  margin-bottom: 6px;
}
.subtext,
.muted {
  color: var(--muted);
}
.subtext {
  font-size: 14px;
  margin: 0;
}
.hero {
  border: 1px solid #dfe7f5;
  background: #edf3ff;
  position: relative;
  border-radius: 18px;
  padding: 34px 36px;
  margin-bottom: 30px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 270px;
  gap: 24px;
}
.hero h1 {
  text-wrap: balance;
  max-inline-size: 22em;
  font-size: 32px;
  margin-bottom: 12px;
  line-height: 1.5;
}
.hero h1 em {
  font-style: normal;
  color: var(--blue);
}
.hero p {
  font-size: 14px;
  color: #52637e;
  max-width: 500px;
  line-height: 1.9;
}
.hero-badges {
  display: flex;
  gap: 20px;
  font-size: 12px;
  color: #385779;
  flex-wrap: wrap;
  margin-top: 24px;
}
.hero-badges span {
  display: flex;
  align-items: center;
  gap: 5px;
}
.hero-badges svg {
  width: 16px;
  height: 16px;
}
.hero-graphic {
  align-self: center;
  justify-self: end;
  position: relative;
  width: 240px;
  height: 180px;
}
.graphic-window {
  position: absolute;
  top: 12px;
  left: 6px;
  width: 208px;
  height: 150px;
  border: 1px solid #c6d5ec;
  background: #fff;
  border-radius: 10px;
  box-shadow: 12px 16px 0 #d9e5fc;
  transform: rotate(-4deg);
  padding: 13px;
}
.window-dots {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.window-dots i {
  width: 4px;
  height: 4px;
  background: #a7b6cf;
  border-radius: 50%;
}
.graphic-ad {
  margin-top: 12px;
  height: 40px;
  border: 1px solid #96b6fa;
  border-radius: 4px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 12px;
  font-weight: 650;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.graphic-lines {
  height: 26px;
  margin-top: 12px;
  background: repeating-linear-gradient(
    to bottom,
    #e6ebf2 0,
    #e6ebf2 3px,
    transparent 3px,
    transparent 11px
  );
  width: 65%;
}
.graphic-tag {
  position: absolute;
  bottom: 0;
  right: 0;
  background: var(--navy);
  border: 4px solid #edf3ff;
  border-radius: 10px;
  padding: 11px 15px;
  color: #fff;
  font-size: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
}
.graphic-tag svg {
  color: #85d8b9;
}
.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.section-title {
  display: flex;
  gap: 10px;
  align-items: center;
}
.section-title h2 {
  margin: 0;
}
.count {
  font-size: 12px;
  background: #e7edf5;
  border-radius: 6px;
  color: #54647b;
  padding: 2px 7px;
}
.tabs {
  display: flex;
  gap: 6px;
}
.tabs button {
  border: 1px solid transparent;
  background: transparent;
  padding: 8px 15px;
  min-height: 40px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
}
.tabs button[aria-pressed="true"] {
  background: #fff;
  border-color: var(--line);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.product {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: border-color var(--ease);
}
.product:hover {
  border-color: #b3c8ed;
}
.placement {
  height: 158px;
  background: #f9fafc;
  border-bottom: 1px solid var(--line);
  padding: 24px 32px;
  display: grid;
  place-items: center;
  position: relative;
}
.placement .mini-page {
  width: 100%;
  max-width: 240px;
  height: 112px;
  border: 1px solid #d9e0eb;
  background: #fff;
  border-radius: 5px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  box-shadow: 0 2px 4px #122c4910;
}
.mini-header {
  height: 7px;
  border-radius: 2px;
  background: #e8edf5;
  width: 45%;
  margin-bottom: 2px;
}
.mini-banner {
  height: 16px;
  background: #e9edf3;
  border-radius: 2px;
}
.mini-content {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 7px;
  flex: 1;
}
.mini-lines {
  background: repeating-linear-gradient(
    to bottom,
    #e9edf3 0,
    #e9edf3 4px,
    transparent 4px,
    transparent 9px
  );
}
.mini-side {
  background: #eff2f7;
  border-radius: 2px;
}
.mini-ad {
  background: #dbe8ff !important;
  border: 1px dashed #6799f4;
  position: relative;
  border-radius: 2px !important;
  display: grid;
  place-items: center;
  color: #285dbe;
  font-size: 9px;
  font-weight: 700;
}
.mini-ad:after {
  content: "AD";
  font-size: 9px;
  line-height: 1;
}
.mini-text {
  height: 8px;
  background: #e9edf3;
  border-radius: 2px;
  margin: 2px 0;
}
.product-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.product-top h3 {
  font-size: 16px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  line-height: 1.5;
  padding: 4px 8px;
  border-radius: 5px;
  background: #eef1f5;
  color: #526178;
  white-space: nowrap;
}
.badge.green {
  color: var(--green);
  background: var(--green-soft);
}
.badge.blue {
  color: #2454ac;
  background: #ebf2ff;
}
.badge.amber {
  color: var(--amber);
  background: #fff4de;
}
.badge.red {
  color: var(--red);
  background: #fff0f2;
}
.description {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
  margin: 8px 0 14px;
  min-height: 43px;
}
.product-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 11px;
  color: #596b82;
  margin-bottom: 20px;
}
.product-specs span {
  border: 1px solid var(--line);
  padding: 3px 7px;
  border-radius: 4px;
}
.product-bottom {
  margin-top: auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #eef1f6;
  padding-top: 18px;
}
.price {
  font-size: 24px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  letter-spacing: -0.8px;
}
.price small {
  font-size: 12px;
  letter-spacing: 0;
  font-weight: 500;
  color: var(--muted);
  margin-left: 3px;
}
.price.unset {
  font-size: 17px;
  letter-spacing: 0;
}
.inventory {
  font-size: 10px;
  color: var(--muted);
  margin: 7px 0 0;
}
.inventory b {
  font-weight: 600;
  color: var(--ink);
}
.flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 25px 0 4px;
}
.flow-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.step-number {
  font-size: 11px;
  background: #e9eef7;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #52709b;
  font-weight: 700;
}
.flow-item strong {
  display: block;
  font-size: 12px;
}
.flow-item p {
  font-size: 11px;
  color: var(--muted);
  margin: 4px 0;
}
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  padding: 28px;
}
.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 24px;
  align-items: start;
}
.summary {
  position: sticky;
  top: 24px;
}
.summary h2 {
  font-size: 16px;
  margin-bottom: 22px;
}
.summary dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  font-size: 13px;
  margin: 22px 0;
}
.summary dt {
  color: var(--muted);
}
.summary dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}
.summary-total {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}
.summary .price {
  color: var(--blue);
  font-size: 27px;
}
.summary-note {
  font-size: 12px;
  color: var(--muted);
  margin: 18px 0 0;
  line-height: 1.8;
}
.stepper {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin: 0 0 24px;
  font-size: 12px;
  color: var(--muted);
}
.stepper span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.stepper .current {
  color: var(--blue);
  font-weight: 650;
}
.form-section + .form-section {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 28px;
}
.form-section h2 {
  font-size: 16px;
  margin-bottom: 18px;
}
.field {
  margin-bottom: 20px;
}
.field label {
  font-size: 13px;
  font-weight: 650;
  display: block;
  margin-bottom: 8px;
}
.field label small {
  color: var(--muted);
  font-weight: 400;
}
.field input:not([type="checkbox"]),
.field textarea {
  width: 100%;
  border: 1px solid #c6cfdd;
  border-radius: 7px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
  min-height: 46px;
  font-size: 14px;
}
.field input:hover,
.field textarea:hover {
  border-color: #94a9c9;
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--red);
}
.field textarea {
  resize: vertical;
  min-height: 110px;
}
.hint {
  font-size: 11px;
  color: var(--muted);
  margin: 6px 0 0;
}
.field-error {
  font-size: 12px;
  color: var(--red);
  margin-top: 5px;
  display: block;
}
.periods {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.period {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 14px 8px;
  background: #fff;
  text-align: center;
  min-height: 86px;
}
.period[aria-pressed="true"] {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue);
  background: #f6f9ff;
}
.period strong {
  display: block;
  font-size: 15px;
}
.period span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}
.upload-box {
  display: block;
  border: 1px dashed #aebed5;
  border-radius: 10px;
  background: #fafcff;
  padding: 22px;
  text-align: center;
}
.upload-box svg {
  margin: 0 auto 6px;
  display: block;
  color: var(--blue);
}
.upload-box input {
  border: 0 !important;
  padding: 8px !important;
  min-height: 44px !important;
  font-size: 12px !important;
}
.upload-box input::file-selector-button {
  border: 1px solid #b9c8de;
  background: white;
  color: var(--blue);
  border-radius: 5px;
  padding: 7px 10px;
  margin-right: 10px;
  cursor: pointer;
}
.preview {
  max-height: 130px;
  max-width: 100%;
  object-fit: contain;
  display: block;
  margin: 12px auto 0;
  border-radius: 5px;
}
.preview[hidden] {
  display: none;
}
.agreement {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
}
.agreement input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
  margin: 3px 0;
  flex-shrink: 0;
}
.agreement a,
.text-link {
  color: var(--blue);
}
.form-actions {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 24px;
  flex-wrap: wrap;
}
.form-actions .hint {
  flex: 1;
}
.inline-note {
  border-radius: 8px;
  padding: 13px 15px;
  background: var(--blue-soft);
  font-size: 12px;
  color: #365681;
  margin: 16px 0;
}
.inline-note.warning {
  background: #fff7e9;
  color: #805414;
}
.inline-note.error {
  background: #fff0f2;
  color: var(--red);
}
body[data-page="auth"] {
  background: #f6f8fc;
}
body[data-page="auth"] .topbar {
  width: 100%;
  max-width: 1280px;
  height: 96px;
  flex-shrink: 0;
  margin: 0 auto;
  padding: 0 48px;
  border: 0;
  background: transparent;
}
body[data-page="auth"] .breadcrumb,
body[data-page="auth"] .mobile-brand,
body[data-page="auth"] .account-nav {
  display: none;
}
body[data-page="auth"] .auth-home {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  color: var(--muted);
  font-size: 13px;
  transition: color var(--ease);
}
.auth-home svg {
  width: 15px;
  height: 15px;
}
body[data-page="auth"] .auth-home:hover {
  color: var(--blue);
}
body[data-page="auth"] main {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: none;
  padding: 24px 24px 40px;
}
.auth-layout {
  width: 100%;
  max-width: 460px;
}
.auth-card {
  padding: 32px 36px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 40px #20375408;
}
.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  margin-bottom: 28px;
  background: #f0f3f8;
  border-radius: 10px;
}
.auth-tabs a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 16px;
  color: var(--muted);
  border-radius: 7px;
  font-size: 15px;
  font-weight: 600;
  transition: color var(--ease), background var(--ease), box-shadow var(--ease);
}
.auth-tabs a:hover {
  color: var(--blue);
  background: #ffffff80;
}
.auth-tabs a[aria-current="page"] {
  color: var(--blue);
  background: var(--card);
  box-shadow: 0 1px 4px #2037540f;
}
.auth-heading {
  margin-bottom: 26px;
}
.auth-heading h1 {
  margin: 0 0 7px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.5px;
}
.auth-heading p {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}
body[data-page="auth"] .auth-copyright {
  display: block;
  padding: 0 20px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.password-input {
  position: relative;
}
.password-input input {
  padding-right: 60px !important;
}
.password-input button {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  min-width: 50px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}
.auth-foot {
  font-size: 13px;
  text-align: center;
  color: var(--muted);
  margin: 24px 0 0;
}
.auth-foot a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  color: var(--blue);
  font-weight: 600;
}
.auth-foot svg {
  width: 15px;
  height: 15px;
}
.cards-list {
  display: grid;
  gap: 18px;
}
.ad-card {
  padding: 24px;
}
.ad-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.ad-card-head h2 {
  font-size: 17px;
  margin-bottom: 4px;
}
.ad-title {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 0;
}
.ad-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
  background: #f8fafc;
  border-radius: 8px;
  padding: 18px;
  margin: 20px 0;
  font-size: 13px;
}
.ad-meta small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 5px;
}
.ad-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}
.orders-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
.orders-table th {
  background: #fafbfd;
  color: #68768a;
  font-weight: 500;
  text-align: left;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}
.orders-table td {
  padding: 20px;
  border-bottom: 1px solid #eef2f7;
}
.orders-table tr:last-child td {
  border-bottom: 0;
}
.orders-table .order-number {
  font-size: 10px;
  color: var(--muted);
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
}
.orders-table .button {
  font-size: 12px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
  font-size: 12px;
  color: var(--muted);
  margin-top: 22px;
}
.pagination button {
  min-width: 44px;
  min-height: 40px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 5px 12px;
  color: var(--ink);
}
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 320px;
  padding: 32px;
}
.empty > svg {
  width: 48px;
  height: 48px;
  color: #7294c8;
  margin-bottom: 20px;
  stroke-width: 1.3;
}
.empty h2 {
  font-size: 19px;
}
.empty p {
  font-size: 13px;
  color: var(--muted);
  max-width: 380px;
  margin-bottom: 24px;
}
.status-hero {
  text-align: center;
  padding: 36px 24px;
  background: #f0f5ff;
  border: 1px solid #dfe8fa;
  border-radius: var(--radius);
  margin-bottom: 24px;
}
.status-hero > svg {
  width: 52px;
  height: 52px;
  background: white;
  border-radius: 50%;
  padding: 13px;
  color: var(--blue);
  margin-bottom: 14px;
}
.status-hero.success {
  background: #eff8f3;
  border-color: #d4ebdd;
}
.status-hero.success > svg {
  color: var(--green);
}
.status-hero.warning {
  background: #fff7e9;
  border-color: #f5e5c7;
}
.status-hero h1 {
  font-size: 25px;
}
.status-hero p {
  font-size: 13px;
  color: var(--muted);
  margin: 0 auto;
  max-width: 560px;
}
.channels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.channels button {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  min-height: 50px;
}
.channels button[aria-pressed="true"] {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-soft);
}
.detail-list {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 16px;
  font-size: 13px;
  margin: 20px 0;
}
.detail-list dt {
  color: var(--muted);
}
.detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.rules {
  max-width: 860px;
  margin: auto;
}
.rules p,
.rules li {
  font-size: 14px;
  color: var(--muted);
  line-height: 2;
}
.rules h2 {
  margin-top: 28px;
}
.rules h2:first-of-type {
  margin-top: 0;
}
.portal-footer {
  padding: 25px 40px 30px;
  font-size: 11px;
  color: #68768c;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.portal-footer span {
  margin-right: auto;
}
.loading-panel {
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--muted);
  font-size: 13px;
  gap: 15px;
}
.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 2px solid #dce6f7;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.notice {
  position: fixed;
  right: 28px;
  bottom: 24px;
  z-index: 100;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 8px 36px #14243c24;
  border-radius: 10px;
  max-width: min(460px, calc(100vw - 32px));
  padding: 15px 14px 15px 20px;
  font-size: 13px;
  display: flex;
  gap: 14px;
  align-items: center;
}
.notice[hidden] {
  display: none;
}
.notice button {
  border: 0;
  background: transparent;
  color: white;
  font-size: 22px;
  min-width: 32px;
  min-height: 32px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.no-wrap {
  white-space: nowrap;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (min-width: 1600px) {
  main {
    padding-top: 42px;
  }
  .products {
    gap: 24px;
  }
  .placement {
    height: 175px;
  }
  .hero {
    padding: 40px;
  }
}
@media (max-width: 1200px) {
  .sidebar {
    width: 220px;
    padding: 28px 15px 20px;
  }
  .brand {
    font-size: 15px;
  }
  .brand-mark {
    width: 33px;
    height: 33px;
  }
  .workspace-main {
    margin-left: 220px;
    width: calc(100% - 220px);
  }
  main {
    padding: 28px;
  }
  .topbar {
    padding: 0 28px;
  }
  .products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero {
    grid-template-columns: 1fr 200px;
    padding: 28px;
  }
  .hero-graphic {
    transform: scale(0.85);
    transform-origin: center right;
    width: 200px;
  }
  .hero h1 {
    font-size: 28px;
  }
  .two-column {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 20px;
  }
  .panel {
    padding: 24px;
  }
  .orders-table th,
  .orders-table td {
    padding: 15px;
  }
  .portal-footer {
    padding-left: 28px;
    padding-right: 28px;
  }
}
@media (max-width: 900px) {
  .sidebar {
    display: none;
  }
  .workspace-main {
    margin: 0;
    width: 100%;
  }
  .topbar {
    height: 70px;
  }
  .breadcrumb {
    display: none;
  }
  .mobile-brand {
    display: flex;
    gap: 9px;
    align-items: center;
    font-weight: 700;
    font-size: 16px;
  }
  .mobile-nav {
    display: flex;
    background: white;
    border-bottom: 1px solid var(--line);
    padding: 0 28px;
    gap: 32px;
  }
  .mobile-nav a {
    min-height: 48px;
    display: flex;
    align-items: center;
    border-bottom: 2px solid transparent;
    font-size: 13px;
    color: var(--muted);
  }
  .mobile-nav a.active {
    color: var(--blue);
    border-bottom-color: var(--blue);
    font-weight: 600;
  }
  .sidebar-note {
    display: none;
  }
  .two-column {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
  .periods {
    gap: 8px;
  }
}
@media (max-width: 650px) {
  main {
    padding: 24px 18px 18px;
  }
  .topbar {
    padding: 0 18px;
  }
  .account-nav {
    gap: 10px;
    font-size: 12px;
  }
  .account-nav .button {
    padding: 7px 12px;
    min-height: 40px;
  }
  .user-chip {
    max-width: 160px;
    font-size: 12px;
  }
  .mobile-brand {
    font-size: 15px;
  }
  .mobile-brand .brand-mark {
    width: 29px;
    height: 29px;
    font-size: 22px;
  }
  .mobile-nav {
    padding: 0 18px;
    gap: 28px;
  }
  .hero {
    padding: 25px 22px;
    display: block;
    margin-bottom: 26px;
  }
  .hero h1 {
    font-size: 25px;
    line-height: 1.6;
    letter-spacing: -0.5px;
  }
  .hero p {
    font-size: 12px;
    margin-bottom: 0;
  }
  .hero-graphic {
    display: none;
  }
  .hero-badges {
    gap: 12px;
    margin-top: 18px;
    font-size: 11px;
  }
  .hero-badges span:last-child {
    display: none;
  }
  .section-bar {
    align-items: flex-start;
    gap: 14px;
    flex-direction: column;
    margin-bottom: 16px;
  }
  .section-title h2 {
    font-size: 18px;
  }
  .tabs {
    width: 100%;
    gap: 8px;
  }
  .tabs button {
    flex: 1;
    min-height: 44px;
  }
  .products {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .placement {
    height: 150px;
    padding: 20px 45px;
  }
  .placement .mini-page {
    height: 110px;
  }
  .product-body {
    padding: 20px;
  }
  .product-top h3 {
    font-size: 17px;
  }
  .description {
    font-size: 13px;
    min-height: auto;
  }
  .product-specs {
    font-size: 11px;
    margin-bottom: 16px;
  }
  .inventory {
    font-size: 11px;
  }
  .product-bottom .button {
    min-height: 44px;
    font-size: 13px;
  }
  .flow {
    grid-template-columns: 1fr;
    gap: 17px;
    padding-top: 26px;
  }
  .flow-item strong {
    font-size: 13px;
  }
  .flow-item p {
    font-size: 12px;
    margin-top: 3px;
  }
  .portal-footer {
    padding: 20px 18px 28px;
    gap: 15px;
    font-size: 10px;
  }
  .portal-footer span {
    width: 100%;
  }
  .two-column {
    grid-template-columns: 1fr;
  }
  .summary {
    position: static;
    order: -1;
    padding: 22px;
  }
  .summary h2 {
    margin-bottom: 10px;
  }
  .summary dl {
    margin: 12px 0;
    gap: 10px;
  }
  .summary-note {
    margin-top: 12px;
  }
  .summary-total {
    padding-top: 13px;
  }
  .panel {
    padding: 23px 20px;
  }
  .page-head {
    gap: 12px;
  }
  .page-head h1 {
    font-size: 24px;
  }
  .page-head .button {
    font-size: 12px;
    padding: 9px 12px;
  }
  .subtext {
    font-size: 13px;
  }
  .stepper {
    gap: 14px;
    font-size: 10px;
  }
  .stepper span {
    gap: 6px;
  }
  .step-number {
    width: 24px;
    height: 24px;
  }
  body[data-page="auth"] .topbar {
    height: 80px;
    padding: 0 20px;
  }
  body[data-page="auth"] .guest-brand {
    font-size: 15px;
    gap: 9px;
  }
  body[data-page="auth"] .guest-brand .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 24px;
  }
  body[data-page="auth"] .auth-home {
    font-size: 12px;
  }
  body[data-page="auth"] main {
    padding: 12px 18px 32px;
    align-items: flex-start;
  }
  .auth-card {
    padding: 24px 22px;
    border-radius: 14px;
  }
  .auth-tabs {
    margin-bottom: 24px;
  }
  .auth-heading {
    margin-bottom: 24px;
  }
  .auth-heading h1 {
    font-size: 24px;
  }
  .field input:not([type="checkbox"]),
  .field textarea {
    font-size: 16px;
    min-height: 48px;
  }
  .period {
    padding: 12px 7px;
    min-height: 84px;
  }
  .period strong {
    font-size: 14px;
  }
  .period span {
    font-size: 11px;
  }
  .field label {
    font-size: 14px;
  }
  .hint {
    font-size: 12px;
  }
  .agreement {
    font-size: 12px;
  }
  .form-actions .button {
    width: 100%;
  }
  .ad-meta {
    grid-template-columns: 1fr;
    gap: 16px;
    font-size: 13px;
  }
  .ad-meta > div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
  }
  .ad-meta small {
    margin: 0;
  }
  .ad-card {
    padding: 22px 18px;
  }
  .ad-card-actions .button {
    min-height: 44px;
  }
  .orders-table thead {
    display: none;
  }
  .table-wrap {
    border: 0;
    background: transparent;
    overflow: visible;
  }
  .orders-table,
  .orders-table tbody {
    display: block;
  }
  .orders-table tr {
    display: block;
    padding: 17px 18px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 14px;
  }
  .orders-table td {
    padding: 7px 0;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
    border: 0 !important;
    text-align: right;
  }
  .orders-table td:before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    text-align: left;
    flex-shrink: 0;
  }
  .orders-table td:first-child {
    display: block;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line) !important;
    margin-bottom: 7px;
  }
  .orders-table td:first-child:before {
    display: none;
  }
  .order-number {
    font-weight: 400;
    font-size: 10px !important;
  }
  .orders-table td:last-child {
    padding-top: 12px;
  }
  .orders-table td:last-child .button {
    width: 100%;
    min-height: 44px;
  }
  .orders-table td:last-child:before {
    display: none;
  }
  .status-hero {
    padding: 28px 18px;
  }
  .status-hero h1 {
    font-size: 23px;
  }
  .detail-list {
    grid-template-columns: 90px 1fr;
    gap: 14px;
    font-size: 12px;
  }
  .channels {
    grid-template-columns: 1fr 1fr;
  }
  .channels button {
    min-height: 48px;
  }
  .notice {
    bottom: 16px;
    right: 16px;
  }
  .rules p,
  .rules li {
    font-size: 13px;
  }
  .rules ol {
    padding-left: 20px;
  }
  .pagination {
    justify-content: center;
  }
  .empty {
    padding: 28px 20px;
    min-height: 300px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
  .spinner {
    border-top-color: var(--blue);
    border-right-color: var(--blue);
  }
}

.captcha-row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.captcha-row input {
  min-width: 0;
  width: 100%;
  text-transform: uppercase;
}
.captcha-row button {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #f7faff;
  flex-shrink: 0;
  padding: 0;
  height: 50px;
}
.captcha-row img {
  display: block;
}
@media (max-width: 650px) {
  .button.small,
  .account-nav .button,
  .pagination button {
    min-height: 44px;
  }
  .captcha-row {
    gap: 8px;
  }
  .captcha-row img {
    width: 136px;
  }
}

.user-chip > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
