:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #07110f;
  color: #e8fff4;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top right, #0c3a2a 0, #07110f 42%); }
main { width: min(1080px, calc(100% - 32px)); margin: 0 auto; padding: 56px 0 96px; }
header { margin-bottom: 28px; }
.eyebrow { color: #55f0a6; letter-spacing: .16em; font-size: 12px; font-weight: 800; }
h1 { margin: 8px 0; font-size: clamp(40px, 7vw, 76px); line-height: .98; letter-spacing: -.055em; }
header > p:last-child { color: #a4c8b5; max-width: 760px; line-height: 1.7; }
.panel { background: rgba(12, 29, 24, .88); border: 1px solid #204d3a; border-radius: 18px; padding: 24px; margin-top: 18px; box-shadow: 0 22px 80px rgba(0,0,0,.24); }
.live-panel { position: sticky; top: 12px; z-index: 10; backdrop-filter: blur(14px); }
form { display: grid; gap: 12px; }
label { color: #bce4ce; font-weight: 700; margin-top: 8px; }
textarea, select { width: 100%; border: 1px solid #2b664d; border-radius: 10px; background: #06100d; color: #e8fff4; padding: 12px; font: 13px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
input[type="number"] { width: 110px; border: 1px solid #2b664d; border-radius: 10px; background: #06100d; color: #e8fff4; padding: 10px 12px; font: 13px ui-monospace, SFMono-Regular, Consolas, monospace; }
textarea:focus, select:focus { outline: 2px solid #38db8d; outline-offset: 2px; }
.batch-options { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid #245a45; border-radius: 12px; background: rgba(5, 18, 13, .45); }
.batch-options label { margin-top: 0; }
.batch-options p { margin: 0; color: #80a995; font-size: 12px; line-height: 1.55; }
.account-info { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 14px; margin: 10px 0 6px; padding: 10px 12px; border: 1px solid #2b664d; border-radius: 10px; background: rgba(32, 106, 77, .22); }
.account-info-label { color: #9bc9b1; font-size: 12px; }
.account-info strong { color: #66f1af; font: 700 14px ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.account-id { color: #6fa78b; font: 12px ui-monospace, SFMono-Regular, Consolas, monospace; }
.gopay-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 8px; }
.gopay-grid > div { display: grid; gap: 8px; padding: 14px; border: 1px solid #245a45; border-radius: 12px; background: rgba(5, 18, 13, .55); }
.gopay-grid label { margin-top: 0; }
.gopay-button { margin-top: 0; background: #f4c95d; color: #241b05; }
button { margin-top: 10px; border: 0; border-radius: 10px; padding: 14px 18px; background: #41e697; color: #052117; font-weight: 900; cursor: pointer; }
button:disabled { opacity: .5; cursor: wait; }
.form-actions { display: flex; gap: 10px; align-items: stretch; }
.form-actions button { flex: 1; }
.stop-button { background: #8a4248; color: #fff; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.section-title h2 { margin: 0; }
.section-title span { color: #6fa78b; font: 12px ui-monospace, monospace; }
.progress { margin-top: 18px; padding: 14px; border: 1px solid #244e3c; border-radius: 12px; background: #07130f; }
.progress-meta { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 9px; }
.progress-meta strong { color: #66f1af; font: 800 14px ui-monospace, SFMono-Regular, Consolas, monospace; }
.progress-meta span { color: #9bc9b1; font-size: 13px; text-align: right; }
.progress-track { height: 12px; overflow: hidden; border-radius: 999px; background: #10261d; box-shadow: inset 0 0 0 1px #1f4635; }
.progress-fill { position: relative; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #20bf78, #62f5b0); transition: width .45s ease; }
.progress.running .progress-fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.38) 46%, transparent 72%); transform: translateX(-100%); animation: progress-scan 1.25s linear infinite; }
.progress.success { border-color: #2a8f61; }
.progress.failed { border-color: #87353c; }
.progress.failed .progress-fill { background: #ff6b74; }
@keyframes progress-scan { to { transform: translateX(100%); } }
.live-summary { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; color: #8fc5a8; font: 12px ui-monospace, monospace; }
.events { display: grid; gap: 10px; max-height: 360px; overflow-y: auto; overscroll-behavior: contain; padding: 8px 8px 8px 20px; margin: 12px 0 0; border: 1px solid #173c2c; border-radius: 12px; background: rgba(3, 12, 9, .55); }
.event { padding: 10px 12px; border-left: 3px solid #5e8873; background: #081712; }
.event.success { border-left-color: #41e697; }
.event.failed { border-left-color: #ff6b74; }
.event span, .event strong { display: block; }
.event span { color: #749c88; font: 11px ui-monospace, monospace; margin-bottom: 4px; }
.event-error { display: block; margin-top: 8px; color: #ff9ca3; font: 12px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.event-details { margin-top: 8px; color: #d08a90; }
.event-details summary, .raw-details summary { cursor: pointer; color: #7ac89d; font-size: 12px; }
.batch-live-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.batch-account-card { min-width: 0; padding: 16px; border: 1px solid #2b664d; border-radius: 14px; background: linear-gradient(145deg, rgba(7, 30, 21, .92), rgba(4, 16, 12, .9)); transition: border-color .2s, background .2s; }
.batch-account-card.running { border-color: #2b664d; }
.batch-account-card.waiting { border-color: #b28a3e; background: linear-gradient(145deg, rgba(80, 57, 18, .32), rgba(12, 12, 6, .92)); }
.batch-account-card.waiting .batch-account-status { color: #f4d68c; background: rgba(219, 170, 72, .15); }
.batch-account-card.success { border-color: #32d78a; background: linear-gradient(145deg, rgba(13, 72, 46, .62), rgba(4, 21, 14, .94)); }
.batch-account-card.failed { border-color: #8d3e45; background: linear-gradient(145deg, rgba(72, 20, 25, .34), rgba(20, 7, 9, .92)); }
.batch-account-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.batch-account-head > div { min-width: 0; display: grid; gap: 4px; }
.batch-account-head strong { color: #d9ffea; }
.batch-account-email { color: #79a98f; font: 11px ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.batch-account-status { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; color: #b4e6ca; background: rgba(53, 180, 122, .16); font-size: 11px; font-weight: 800; }
.batch-account-card.failed .batch-account-status { color: #ffadb3; background: rgba(255, 107, 116, .13); }
.batch-account-progress { height: 7px; margin: 13px 0 10px; overflow: hidden; border-radius: 999px; background: #10261d; }
.batch-account-progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #20bf78, #62f5b0); transition: width .35s ease; }
.batch-account-card.failed .batch-account-progress i { background: #ff6b74; }
.batch-account-message { min-height: 38px; margin: 0; color: #aed3bd; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.batch-account-links { display: grid; gap: 8px; margin-top: 12px; }
.batch-account-links:empty { display: none; }
.batch-account-links > div { display: flex; gap: 8px; align-items: center; }
.batch-account-links a { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 8px; color: #062117; background: #41e697; font-size: 12px; font-weight: 900; text-align: center; text-decoration: none; }
.batch-account-links button { min-height: 34px; margin: 0; padding: 7px 10px; color: #bce4ce; background: transparent; border: 1px solid #2b664d; font-size: 12px; }
.batch-account-logs { margin-top: 12px; border-top: 1px solid #1f4a38; padding-top: 10px; }
.batch-account-logs summary { display: flex; justify-content: space-between; gap: 12px; color: #77bd96; cursor: pointer; font-size: 12px; }
.batch-account-logs ol { display: grid; gap: 7px; max-height: 250px; margin: 10px 0 0; padding: 0; overflow-y: auto; list-style: none; }
.batch-account-logs li { padding: 8px 9px; border-left: 2px solid #537663; background: rgba(3, 14, 10, .72); }
.batch-account-logs li.success { border-left-color: #41e697; }
.batch-account-logs li.failed { border-left-color: #ff6b74; }
.batch-account-logs li span, .batch-account-logs li strong, .batch-account-logs li code { display: block; }
.batch-account-logs li span { color: #688d7a; font: 10px ui-monospace, monospace; }
.batch-account-logs li strong { margin-top: 3px; color: #c9e7d6; font-size: 12px; }
.batch-account-logs li code { margin-top: 5px; color: #ff9ca3; font: 11px/1.45 ui-monospace, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.events-details { margin-top: 18px; }
.events-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; user-select: none; }
.events-summary::-webkit-details-marker { display: none; }
.events-summary::before { content: "▸"; color: #66f1af; margin-right: 8px; display: inline-block; width: 1em; }
.events-details[open] .events-summary::before { content: "▾"; }
.events-summary h2 { margin: 0; display: inline; }
.events-summary span { color: #6fa78b; font: 12px ui-monospace, monospace; }
.muted { color: #739682; }
.result-hint { margin: 8px 0 2px; color: #8fc5a8; line-height: 1.6; }
.links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.result-link-card { min-width: 0; display: grid; gap: 12px; padding: 16px; border: 1px solid #245a45; border-radius: 14px; background: linear-gradient(145deg, rgba(7, 30, 21, .9), rgba(4, 16, 12, .86)); box-shadow: 0 10px 30px rgba(0,0,0,.14); }
.result-link-card.primary { border-color: #38c98a; background: linear-gradient(145deg, rgba(18, 80, 53, .6), rgba(4, 22, 15, .92)); }
.result-link-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.result-link-title { min-width: 0; color: #d8ffea; font-size: 14px; overflow-wrap: anywhere; }
.result-link-badge { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; color: #9fe8bf; background: rgba(53, 180, 122, .16); font-size: 11px; font-weight: 800; }
.result-link-preview { display: block; min-height: 42px; max-height: 72px; overflow: hidden; color: #81cfa3; font: 12px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; word-break: break-word; }
.result-link-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.result-link-open { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; padding: 8px 12px; border-radius: 9px; color: #042117; background: #41e697; font-size: 12px; font-weight: 900; text-decoration: none; }
.result-link-copy { min-height: 36px; padding: 8px 12px; font-size: 12px; }
.completion-box { margin-top: 18px; padding: 16px; border: 1px solid #2b664d; border-radius: 12px; background: rgba(32, 106, 77, .12); }
.completion-box h3 { margin: 0 0 8px; }
.completion-box p { margin: 0 0 12px; color: #a4c8b5; line-height: 1.6; }
.completion-box input { width: 100%; border: 1px solid #2b664d; border-radius: 10px; background: #06100d; color: #e8fff4; padding: 12px; font: 13px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; }
.completion-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.secondary-button { background: transparent; color: #bce4ce; border: 1px solid #2b664d; }
.raw-details { margin-top: 14px; }
pre { max-height: 360px; overflow: auto; background: #050b09; border-radius: 10px; padding: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.hidden { display: none; }
.success { color: #41e697 !important; }
.failed { color: #ff6b74 !important; }
@media (max-width: 720px) { .gopay-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .links, .batch-live-grid { grid-template-columns: 1fr; } }
@media (max-width: 620px) { main { width: min(100% - 20px, 1080px); padding-top: 30px; } .panel { padding: 16px; } .live-panel { position: static; } .events { max-height: 300px; } .result-link-card { padding: 14px; } }
