:root {
  --ink: #19182b;
  --muted: #57566d;
  --line: #e2e1eb;
  --accent: #5044be;
  --canvas: #f3f5fa;
  --surface: #fff;
  --surface-subtle: #f7f8fc;
  --selection: #efedff;
  --selection-text: #40359c;
  --accent-hover: #4135a9;
  --notice: #84391d;
}
[hidden] { display: none !important; }
body { background: var(--canvas); }
.bar { background: var(--surface); color: var(--ink); border-color: var(--line); }
.bar nav { justify-content: flex-start; gap: 14px; }
.bar .brand { font-size: 1.2rem; }
.product-name { color: var(--muted); border-left: 1px solid var(--line); padding-left: 14px; }
#theme { margin-inline-start: auto; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
.button { justify-content: center; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.button.primary { background: var(--accent); border-color: var(--accent); color: white; }
.button.primary:hover { background: var(--accent-hover); box-shadow: none; }
:focus-visible { outline: 3px solid #8275fc; outline-offset: 3px; }
#main { padding-block: 26px 56px; }
#notice { color: var(--notice); margin-bottom: 12px; font-weight: 650; }
#notice:empty { display: none; }

.welcome { display: grid; grid-template-columns: minmax(0, 1.13fr) minmax(0, .87fr); gap: 18px; align-items: stretch; }
.intro {
  background: radial-gradient(ellipse at 95% 10%, #3c317a 0, transparent 66%), #211b46;
  color: white;
  border-radius: 24px;
  padding: clamp(26px, 4.5vw, 54px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.intro h1 { max-width: 16ch; font-size: clamp(2.2rem, 4.5vw, 4.25rem); margin-bottom: 20px; }
.intro h1 em { font-style: normal; color: #c8beff; }
.intro .lead { max-width: 40ch; color: #e8e4fa; }
.intro-actions { display: flex; align-items: center; gap: 14px 20px; flex-wrap: wrap; margin-top: 28px; }
.intro-actions .button { color: white; background: #ffffff18; border-color: #bdb3ff; }
.intro-link { color: #e8e4fa; font-weight: 650; text-underline-offset: 4px; }

.card { background: var(--surface); color: var(--ink); border-color: var(--line); border-radius: 18px; box-shadow: 0 12px 35px #25224a0a; }
.auth { padding: clamp(21px, 4vw, 38px); display: flex; flex-direction: column; justify-content: center; }
.auth h2 { font-size: clamp(1.75rem, 3vw, 2.4rem); margin-top: 4px; }
.auth p { margin-top: 6px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 22px; }
.auth .tabs { background: var(--canvas); padding: 4px; border: 1px solid var(--line); border-radius: 12px; }
.tabs button { min-height: 44px; border: 1px solid transparent; color: var(--muted); border-radius: 8px; background: transparent; padding: 6px 12px; }
.auth .tabs button { flex: 1 1 auto; }
.tabs button[aria-current="page"] { color: var(--selection-text); border-color: var(--line); background: var(--selection); font-weight: 750; }
form { display: grid; gap: 14px; margin-top: 20px; }
form label { display: grid; gap: 5px; font-weight: 650; }
form small, .form-note { font-weight: 400; font-size: .89rem; color: var(--muted); }
input, select, textarea { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; background: var(--surface); color: var(--ink); }
textarea { resize: vertical; }
form button { justify-self: start; }
.auth form button { justify-self: stretch; margin-top: 4px; }

#view h2 { font-size: 1.55rem; margin-bottom: 8px; }
#view .grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); }
.module-head { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: baseline; }
.status { border-radius: 20px; background: var(--selection); padding: 3px 10px; color: var(--selection-text); font-size: .8rem; font-weight: 700; }
.content { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.55fr); align-items: start; gap: 18px; }
.records { display: grid; gap: 12px; margin-top: 14px; }
.record { border-top: 1px solid var(--line); padding-top: 12px; overflow-wrap: anywhere; }
.record h3 { font-size: 1.05rem; }
.record p { white-space: pre-wrap; }
.record select { margin-top: 10px; max-width: 180px; }

@media (max-width: 760px) {
  .welcome, .content { grid-template-columns: 1fr; }
  .welcome { padding-top: 0; }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #edecfa;
  --muted: #b3b3cc;
  --line: #373950;
  --canvas: #161725;
  --surface: #202234;
  --surface-subtle: #272a40;
  --selection: #383260;
  --selection-text: #dad3ff;
  --accent: #6455d9;
  --accent-hover: #5648c5;
  --notice: #ffc6a8;
}
body:has(#workspace:not([hidden])) #main { width: min(calc(100% - 36px), 1450px); }
#workspace { display: grid; grid-template-columns: minmax(205px, 235px) minmax(0, 1fr); gap: 22px; align-items: start; }
.sidebar { position: sticky; top: 16px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.company-card { display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px 5px 16px; margin-bottom: 10px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; line-height: 1.35; }
.company-card p { font-size: .78rem; margin-top: 4px; }
.company-mark { width: 42px; aspect-ratio: 1; border-radius: 10px; background: var(--selection); color: var(--selection-text); display: grid; place-items: center; font-size: .87rem; font-weight: 750; overflow: hidden; }
.company-mark img { width: 100%; height: 100%; object-fit: contain; background: white; }
#navigation { display: grid; margin: 0; }
#navigation button { text-align: left; }
.workspace-main { min-width: 0; }
.workspace-main #view > h2 { font-size: clamp(1.8rem, 3vw, 2.55rem); margin-bottom: 14px; }
#view > p { margin-bottom: 16px; }
#view .content { grid-template-columns: minmax(0, 1fr); }
.content > .card, .settings-card { padding: clamp(14px, 2.4vw, 24px); min-width: 0; }
.content > .card form { max-width: 560px; }
.queue-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.stat { display: grid; gap: 3px; text-align: left; padding: 10px 12px; background: var(--surface-subtle); border: 1px solid var(--line); color: var(--muted); border-radius: 10px; line-height: 1.35; }
.stat[aria-pressed="true"] { background: var(--selection); color: var(--selection-text); border-color: currentColor; }
.stat span { font-size: .8rem; font-weight: 650; }
.stat strong { font-size: 1.45rem; color: var(--ink); }
input[type="search"] { max-width: 330px; }
.table-scroll { overflow-x: auto; margin-top: 14px; }
table { width: 100%; min-width: 460px; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 11px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
th { background: var(--surface-subtle); color: var(--muted); font-weight: 650; }
td:first-child { width: 48%; }
td:last-child { width: 134px; }
td summary { font-weight: 650; cursor: pointer; }
td p { margin-top: 6px; white-space: pre-wrap; }
td select { padding: 4px 6px; }
.settings-card { max-width: 680px; }
.settings-logo { width: 72px; aspect-ratio: 1; object-fit: contain; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: white; margin-top: 14px; }
.check-label { display: flex; align-items: center; gap: 9px; }
.check-label input { width: auto; }
@media (max-width: 760px) {
  #workspace { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .sidebar { position: static; }
  #navigation { display: flex; flex-wrap: wrap; }
  .queue-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 450px) {
  .bar nav { gap: 8px; }
  .product-name { display: none; }
}

#product-details { margin-top: clamp(30px, 5vw, 58px); }
.product-section { scroll-margin-top: 20px; }
.product-section h2 { font-size: clamp(1.65rem, 3vw, 2.45rem); margin-bottom: 8px; }
.sample-grid, .payment-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.sample-grid { margin-top: 18px; }
.sample-card { margin: 0; padding: clamp(12px, 2vw, 22px); }
.sample-card h3 { margin-bottom: 12px; }
.sample-card img, .sample-card video { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); }
.sample-card video { aspect-ratio: 3 / 2; background: #211b46; }
.sample-card figcaption, .sample-card details { margin-top: 10px; font-size: .88rem; color: var(--muted); }
.sample-card summary { cursor: pointer; }
.payment-panel { margin-top: 26px; padding: clamp(18px, 4vw, 36px); }
.payment-panel ol { display: grid; gap: 12px; margin: 0; padding-inline-start: 22px; color: var(--muted); }
.payment-panel strong { color: var(--ink); }
.payment-panel .button { margin-top: 16px; }
@media (max-width: 760px) {
  .sample-grid, .payment-panel { grid-template-columns: minmax(0, 1fr); }
}
