:root {
  --ink: #202235;
  --muted: #737b93;
  --paper: #fbf7ef;
  --paper-glow-one: #ffd39d;
  --paper-glow-two: #d7f5e2;
  --surface: rgba(255, 255, 255, .86);
  --surface-soft: rgba(255, 255, 255, .62);
  --input: #fff;
  --orange: #f46f2d;
  --orange-dark: #c94616;
  --deep: #242841;
  --mint: #b8f5db;
  --line: rgba(37, 43, 70, .14);
  --field-line: #c9cfe0;
  --focus: #ffdfcc;
  --subtle-text: #505872;
  --art-one: #ffad73;
  --art-two: #ffd3b2;
  --art-glow: rgba(244, 111, 45, .25);
  --pattern: #29304b;
  --success: #146642;
  --error: #9a311c;
  --error-soft: #ffe1d8;
  --shadow: var(--ink);
}

* { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 9% 5%, var(--paper-glow-one) 0, transparent 26rem),
    radial-gradient(circle at 90% 0, var(--paper-glow-two) 0, transparent 27rem),
    var(--paper);
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .13;
  content: "";
  background-image: radial-gradient(var(--pattern) .65px, transparent .65px);
  background-size: 12px 12px;
}

/* Six operator-selectable landing skins share the same accessible flow and copy. */
body[data-theme="fox_dark"] {
  --ink: #f7eee7; --muted: #abb2c7; --paper: #0d1020; --paper-glow-one: #412014; --paper-glow-two: #191d3d;
  --surface: rgba(22, 27, 46, .9); --surface-soft: rgba(24, 29, 49, .72); --input: #151a2d;
  --orange: #ff762f; --orange-dark: #ffac79; --deep: #ff762f; --mint: #243e45; --line: rgba(235, 239, 255, .16);
  --field-line: #444c69; --focus: rgba(255, 118, 47, .22); --subtle-text: #d1d5e3; --art-one: #fb6a2a;
  --art-two: #ffbd54; --art-glow: rgba(255, 91, 32, .35); --pattern: #cbd2ea; --success: #9ae8be; --error: #ffb9aa; --error-soft: #48282b; --shadow: #080a13;
}
body[data-theme="green_dark"] {
  --ink: #f1fff4; --muted: #b1d6ba; --paper: #032719; --paper-glow-one: #057a3d; --paper-glow-two: #013c2d;
  --surface: rgba(4, 71, 42, .9); --surface-soft: rgba(17, 101, 59, .68); --input: #06472d;
  --orange: #9ae823; --orange-dark: #c8ff6e; --deep: #29a951; --mint: #c5f49b; --line: rgba(224, 255, 225, .19);
  --field-line: #67bf78; --focus: rgba(154, 232, 35, .24); --subtle-text: #d4f4d6; --art-one: #2fd35f;
  --art-two: #a7ed4a; --art-glow: rgba(57, 216, 102, .35); --pattern: #e3ffe6; --success: #d3ff9c; --error: #ffcbc2; --error-soft: #572e2b; --shadow: #011a10;
}
body[data-theme="violet_dark"] {
  --ink: #f4f0ff; --muted: #b4aecf; --paper: #090b1d; --paper-glow-one: #28104d; --paper-glow-two: #0b1744;
  --surface: rgba(20, 23, 54, .92); --surface-soft: rgba(21, 24, 57, .74); --input: #11152e;
  --orange: #7950ff; --orange-dark: #b9a7ff; --deep: #6741e9; --mint: #292b59; --line: rgba(226, 219, 255, .17);
  --field-line: #4d4a82; --focus: rgba(121, 80, 255, .25); --subtle-text: #d5d0ea; --art-one: #7b4dff;
  --art-two: #b7a4ff; --art-glow: rgba(108, 67, 255, .42); --pattern: #d8cfff; --success: #a9ecda; --error: #ffc0dc; --error-soft: #4d294d; --shadow: #050610;
}
body[data-theme="telegram_light"] {
  --ink: #172b4d; --muted: #6f839d; --paper: #f5fbff; --paper-glow-one: #ccecff; --paper-glow-two: #d9edff;
  --surface: rgba(255, 255, 255, .9); --surface-soft: rgba(242, 249, 255, .76); --input: #fff;
  --orange: #229ed9; --orange-dark: #147bb6; --deep: #229ed9; --mint: #d1efff; --line: rgba(23, 83, 130, .14);
  --field-line: #b8d7ec; --focus: #d5efff; --subtle-text: #4f7193; --art-one: #30a8ef;
  --art-two: #9dd9ff; --art-glow: rgba(34, 158, 217, .28); --pattern: #2473a4; --success: #167a57; --error: #be4b3b; --error-soft: #ffe2df; --shadow: #1c6f9f;
}
body[data-theme="telegram_dark"] {
  --ink: #edf5ff; --muted: #aebfd2; --paper: #101a2b; --paper-glow-one: #113c58; --paper-glow-two: #1a2e55;
  --surface: rgba(25, 39, 60, .91); --surface-soft: rgba(29, 46, 70, .76); --input: #17263c;
  --orange: #37aee2; --orange-dark: #8cd9ff; --deep: #188bc5; --mint: #1b4454; --line: rgba(226, 242, 255, .16);
  --field-line: #3e5a78; --focus: rgba(55, 174, 226, .23); --subtle-text: #d2e0ee; --art-one: #35a9e8;
  --art-two: #90d8ff; --art-glow: rgba(43, 163, 223, .35); --pattern: #d2e5f6; --success: #92e7c8; --error: #ffb9b2; --error-soft: #482c35; --shadow: #080f1b;
}

.shell { position: relative; width: min(1060px, calc(100% - 32px)); margin: 0 auto; padding: 64px 0 70px; }
.hero { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(180px, 280px); gap: 22px; align-items: center; margin-bottom: 31px; }
.hero__fox {
  display: grid; flex: 0 0 auto; place-items: center; width: 78px; height: 78px; border: 3px solid var(--ink);
  border-radius: 28px 28px 28px 6px; font-size: 0; background: var(--orange); box-shadow: 7px 7px 0 var(--shadow); transform: rotate(-4deg);
}
.hero__fox::before { content: "🦊"; font-size: 46px; }
body[data-theme^="telegram"] .hero__fox { border-radius: 50%; box-shadow: 0 7px 18px var(--art-glow); transform: none; }
body[data-theme^="telegram"] .hero__fox::before { content: "➤"; color: #fff; font-size: 42px; transform: rotate(-28deg) translateX(2px); }
body[data-theme="green_dark"] .hero__fox { border-color: #d4ff9d; border-radius: 50%; box-shadow: 0 10px 28px var(--art-glow); transform: none; }
body[data-theme="green_dark"] .hero__fox::before { content: "✦"; color: #f6ffe5; font-size: 38px; }
.eyebrow { margin: 0 0 7px; color: var(--orange-dark); font-size: .71rem; font-weight: 850; letter-spacing: .15em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 7px; font-size: clamp(2rem, 6vw, 3.8rem); letter-spacing: -.065em; line-height: .93; }
h2 { margin-bottom: 0; font-size: 1.35rem; letter-spacing: -.035em; }
.intro { max-width: 580px; margin-bottom: 0; color: var(--subtle-text); line-height: 1.5; }
.landing-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; margin-top: 18px; }
.landing-button { text-decoration: none; }
.landing-link { color: var(--ink); font-size: .8rem; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }

.hero__visual { position: relative; min-height: 166px; overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: linear-gradient(145deg, var(--surface), var(--surface-soft)); box-shadow: 0 16px 36px var(--art-glow); }
.hero__visual::before { position: absolute; right: -39px; bottom: -62px; width: 180px; height: 180px; border-radius: 50%; content: ""; background: var(--art-glow); filter: blur(3px); }
.visual-window { position: absolute; top: 24px; left: 28px; width: 147px; height: 92px; padding: 19px 13px; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--input); box-shadow: 10px 10px 0 var(--art-glow); transform: rotate(-7deg); }
.visual-window span { display: block; width: 58%; height: 7px; margin-bottom: 9px; border-radius: 99px; background: var(--art-two); }
.visual-window span:nth-child(2) { width: 82%; background: var(--art-one); }
.visual-window span:nth-child(3) { width: 43%; }
.visual-window i { position: absolute; right: 10px; bottom: 9px; width: 43px; height: 31px; border-right: 5px solid var(--art-one); border-top: 5px solid var(--art-one); transform: skewY(-27deg); }
.visual-window b { position: absolute; top: 8px; right: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.visual-message { position: absolute; right: 21px; width: 87px; height: 27px; border-radius: 15px 15px 4px 15px; background: var(--art-one); box-shadow: 0 6px 15px var(--art-glow); }
.visual-message--one { top: 33px; }
.visual-message--two { top: 69px; right: 44px; width: 64px; background: var(--art-two); }
.visual-chart { position: absolute; right: 24px; bottom: 20px; width: 110px; height: 38px; overflow: hidden; border-bottom: 3px solid var(--art-two); }
.visual-chart i { position: absolute; inset: 11px 3px 0; border-top: 5px solid var(--art-one); transform: skewY(-20deg) rotate(-3deg); }
body[data-theme^="telegram"] .visual-window { border-radius: 10px; transform: rotate(5deg); }
body[data-theme^="telegram"] .visual-message { border-radius: 15px 15px 15px 4px; }
body[data-theme="green_dark"] .hero__visual { background: linear-gradient(145deg, rgba(12, 130, 66, .88), rgba(2, 55, 36, .95)); }
body[data-theme="green_dark"] .visual-window { border-color: rgba(239, 255, 223, .36); border-radius: 18px; box-shadow: 10px 10px 0 rgba(2, 40, 25, .32); transform: rotate(-4deg); }
body[data-theme="green_dark"] .visual-message { border-radius: 15px 15px 15px 4px; }

.auth-section { margin: 0 0 16px; padding: 21px 0 0; }
.auth-section h2 { margin: 0 0 6px; font-size: 1.55rem; letter-spacing: -.04em; }
.auth-section p:not(.eyebrow) { max-width: 600px; margin-bottom: 0; color: var(--subtle-text); font-size: .9rem; line-height: 1.5; }
.local-badge { align-self: start; padding: 8px 10px; border: 1px solid var(--ink); border-radius: 99px; color: var(--ink); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-decoration: none; white-space: nowrap; background: var(--input); }
.local-badge span { display: inline-block; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: #20a56d; }
.card { border: 2px solid var(--ink); border-radius: 24px; background: var(--surface); box-shadow: 8px 8px 0 var(--shadow); }
body[data-theme^="telegram"] .card { border-color: var(--line); border-radius: 20px; box-shadow: 0 18px 42px var(--art-glow); }
body[data-theme="green_dark"] .card { border-color: rgba(224, 255, 225, .26); box-shadow: 0 20px 48px var(--art-glow); }
.wizard-card { padding: 30px; }
.steps { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 25px; padding-bottom: 23px; border-bottom: 1px dashed var(--line); }
.step { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: .78rem; font-weight: 760; }
.step b { display: grid; place-items: center; width: 25px; height: 25px; border: 1.5px solid currentColor; border-radius: 50%; font-size: .72rem; }
.step.is-active, .step.is-done { color: var(--ink); }
.step.is-active b { color: #fff; border-color: var(--orange); background: var(--orange); }
.step.is-done b { color: var(--ink); background: var(--mint); }
.status-line { min-height: 22px; margin-bottom: 17px; color: var(--subtle-text); font-size: .93rem; }
.status-line.is-error { color: var(--error); }
.status-line.is-waiting::before { display: inline-block; width: .65rem; height: .65rem; margin-right: .55rem; border: 2px solid var(--art-two); border-top-color: var(--orange); border-radius: 50%; vertical-align: -1px; content: ""; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth-form { display: grid; gap: 10px; max-width: 560px; }
.auth-form label, .batch-form label { font-size: .86rem; font-weight: 800; }
.field-with-icon { display: flex; align-items: center; gap: 10px; padding: 0 13px; border: 1.5px solid var(--field-line); border-radius: 13px; background: var(--input); transition: .16s border-color, .16s box-shadow; }
.field-with-icon:focus-within { border-color: var(--orange); box-shadow: 0 0 0 3px var(--focus); }
.field-with-icon span { color: var(--orange-dark); font-weight: 900; }
.field-with-icon input { width: 100%; padding: 15px 0; border: 0; outline: 0; color: var(--ink); font: inherit; font-size: 1.05rem; background: transparent; }
.hint { margin: 0; color: var(--muted); font-size: .78rem; line-height: 1.45; }
.button { width: fit-content; margin-top: 8px; padding: 13px 18px; border: 2px solid var(--ink); border-radius: 12px; color: #fff; cursor: pointer; font: inherit; font-weight: 800; background: var(--deep); box-shadow: 3px 3px 0 var(--orange); transition: transform .13s, box-shadow .13s; }
body[data-theme^="telegram"] .button { border-color: transparent; border-radius: 12px; box-shadow: none; }
body[data-theme="green_dark"] .button { border-color: #d5ff9a; border-radius: 99px; color: #07331c; background: linear-gradient(135deg, #c9ff69, #5fd556); box-shadow: 0 8px 18px rgba(1, 42, 22, .32); }
.button:hover { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--orange); }
body[data-theme^="telegram"] .button:hover { box-shadow: 0 7px 18px var(--art-glow); transform: translateY(-1px); }
body[data-theme="green_dark"] .button:hover { box-shadow: 0 11px 24px var(--art-glow); transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .6; }
.code-actions { display: flex; flex-wrap: wrap; gap: 8px 13px; align-items: center; margin-top: 1px; }
.text-action { margin: 0; padding: 0; border: 0; color: var(--orange-dark); cursor: pointer; font: inherit; font-size: .79rem; font-weight: 750; background: transparent; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.text-action:hover { color: var(--orange); }
.text-action:disabled { color: var(--muted); cursor: not-allowed; text-decoration: none; }
.code-attempts { color: var(--muted); font-size: .74rem; }
.batch-form { display: grid; max-width: 560px; gap: 10px; margin-top: 21px; padding-top: 20px; border-top: 1px dashed var(--line); }
.batch-form summary { cursor: pointer; color: var(--subtle-text); font-size: .8rem; font-weight: 800; }
.batch-form:not([open]) > :not(summary) { display: none; }
.batch-form textarea { width: 100%; resize: vertical; padding: 11px 13px; border: 1.5px solid var(--field-line); border-radius: 12px; outline: 0; color: var(--ink); font: inherit; background: var(--input); }
.batch-form textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px var(--focus); }

.success-screen, .error-screen { position: relative; display: grid; min-height: 100vh; place-items: center; padding: 32px 16px; }
.success-card, .error-card { width: min(540px, 100%); padding: 42px 34px; border: 3px solid var(--ink); border-radius: 30px; text-align: center; background: var(--surface); box-shadow: 10px 10px 0 var(--shadow); }
body[data-theme^="telegram"] .success-card, body[data-theme^="telegram"] .error-card { border-color: var(--line); box-shadow: 0 18px 42px var(--art-glow); }
body[data-theme="green_dark"] .success-card, body[data-theme="green_dark"] .error-card { border-color: rgba(224, 255, 225, .26); box-shadow: 0 20px 48px var(--art-glow); }
.success-card__fox, .error-card__fox { display: grid; place-items: center; width: 70px; height: 70px; margin: 0 auto 25px; border: 3px solid var(--ink); border-radius: 25px 25px 25px 7px; font-size: 0; background: var(--orange); box-shadow: 6px 6px 0 var(--shadow); transform: rotate(-4deg); }
.success-card__fox::before, .error-card__fox::before { content: "🦊"; font-size: 40px; }
body[data-theme^="telegram"] .success-card__fox, body[data-theme^="telegram"] .error-card__fox { border-radius: 50%; box-shadow: 0 7px 18px var(--art-glow); transform: none; }
body[data-theme="green_dark"] .success-card__fox, body[data-theme="green_dark"] .error-card__fox { border-color: #d4ff9d; border-radius: 50%; box-shadow: 0 8px 22px var(--art-glow); transform: none; }
body[data-theme^="telegram"] .success-card__fox::before, body[data-theme^="telegram"] .error-card__fox::before { content: "➤"; color: #fff; font-size: 36px; transform: rotate(-28deg) translateX(2px); }
body[data-theme="green_dark"] .success-card__fox::before, body[data-theme="green_dark"] .error-card__fox::before { content: "✦"; color: #f6ffe5; font-size: 34px; }
.success-card__check, .error-card__mark { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 13px; border-radius: 50%; font-size: 1.5rem; font-weight: 900; }
.success-card__check { color: var(--success); background: var(--mint); }
.error-card__mark { color: var(--error); background: var(--error-soft); }
.success-card h1, .error-card h1 { margin: 0 0 13px; font-size: clamp(2rem, 9vw, 3.6rem); }
.success-card p:not(.eyebrow), .error-card p:not(.eyebrow) { max-width: 390px; margin: 0 auto; color: var(--subtle-text); line-height: 1.55; }
.success-card .button, .error-card .button { margin-top: 27px; }
.refresh { margin-left: auto; padding: 9px 11px; border: 1.5px solid var(--ink); border-radius: 9px; color: var(--ink); cursor: pointer; font: inherit; font-size: .75rem; font-weight: 800; background: transparent; }
.is-hidden { display: none !important; }
.security-note { display: flex; gap: 12px; align-items: flex-start; margin: 29px 0 45px; padding: 14px 17px; border-left: 3px solid var(--orange); color: var(--subtle-text); background: var(--surface-soft); }
.security-note span { color: var(--orange-dark); }
.security-note p { margin-bottom: 0; font-size: .8rem; line-height: 1.5; }
.security-note code, .success code { padding: 1px 4px; border-radius: 4px; color: var(--orange-dark); background: var(--focus); }
.history__heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 14px; }
.refresh { margin-left: 0; }
.jobs { display: grid; gap: 9px; }
.job { display: flex; gap: 16px; align-items: center; padding: 13px 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.job__phone { font-weight: 800; }
.job__meta { flex: 1; color: var(--muted); font-size: .76rem; }
.job__open { padding: 5px 7px; border: 0; color: var(--subtle-text); cursor: pointer; font: inherit; font-size: .7rem; font-weight: 800; background: transparent; }
.tag { padding: 5px 7px; border-radius: 20px; color: var(--subtle-text); font-size: .68rem; font-weight: 850; background: var(--surface-soft); }
.tag.authorized { color: var(--success); background: var(--mint); }
.tag.failed, .tag.expired { color: var(--error); background: var(--error-soft); }
.empty { color: var(--muted); font-size: .9rem; }

@media (max-width: 800px) { .hero { grid-template-columns: auto minmax(0, 1fr); }.hero__visual { display: none; } }
@media (max-width: 640px) {
  .shell { padding-top: 35px; }.hero { gap: 15px; }.hero__fox { width: 60px; height: 60px; border-radius: 21px 21px 21px 6px; }
  .hero__fox::before { font-size: 34px; }.wizard-card { padding: 20px; }.steps { gap: 4px; }.step span { display: none; }
  .step { flex: 1; }.step b { width: 28px; height: 28px; }.success-card { padding: 34px 22px; }.job { flex-wrap: wrap; gap: 7px; }
  .job__meta { flex-basis: 65%; }.tag { margin-left: auto; }
}
