:root {
  color-scheme: dark;
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
  background: #10151d;
  color: #f4f7fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --surface: #171e28;
  --surface-raised: #1d2632;
  --border: rgba(185, 203, 222, 0.12);
  --muted: #96a2b2;
  --teal: #28c6b3;
  --teal-light: #83e3d6;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 18% 30%, rgba(35, 116, 115, 0.12), transparent 35%),
    radial-gradient(ellipse at 88% 82%, rgba(32, 90, 139, 0.12), transparent 32%),
    #10151d;
}

button, input { font: inherit; }
button { color: inherit; }

.app-shell {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 7.2%;
}

.topbar {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(185, 203, 222, 0.08);
}

.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand-mark {
  display: grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 1px solid rgba(74, 219, 198, 0.35);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(40, 198, 179, 0.22), rgba(40, 198, 179, 0.06));
  color: var(--teal-light);
  font: 800 28px/1 'Manrope', sans-serif;
  box-shadow: 0 5px 22px rgba(18, 189, 167, 0.08);
}
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font: 800 19px/1.1 'Manrope', sans-serif; letter-spacing: -0.8px; }
.brand-copy > span { color: #8794a3; font-size: 8px; font-weight: 700; letter-spacing: 1.8px; }

.api-status {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.025);
  color: #aeb9c8;
  font-size: 11px;
  font-weight: 600;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #e9b85c; box-shadow: 0 0 11px currentColor; }
.api-status[data-state='online'] .status-dot { background: #42d39b; }
.api-status[data-state='offline'] .status-dot { background: #fa7373; }

.main-layout {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
  align-items: center;
  gap: clamp(50px, 9vw, 150px);
  padding: 58px 0 64px;
}

.intro-panel { position: relative; max-width: 540px; padding: 5px 0 12px; }
.eyebrow { display: flex; align-items: center; gap: 10px; color: var(--teal-light); font-size: 10px; font-weight: 700; letter-spacing: 2px; }
.eyebrow-line { width: 24px; height: 1px; background: var(--teal); }
h1 {
  position: relative;
  z-index: 1;
  margin: 20px 0 17px;
  font: 800 clamp(40px, 5vw, 64px)/1.12 'Manrope', sans-serif;
  letter-spacing: -3.5px;
}
h1 span { color: var(--teal-light); }
.intro-text { max-width: 420px; margin: 0; color: #9ca9b8; font-size: 14px; line-height: 1.8; }
.feature-list { display: grid; gap: 20px; margin-top: 39px; }
.feature-item { display: flex; align-items: center; gap: 13px; }
.feature-icon { display: grid; width: 39px; height: 39px; flex: 0 0 39px; place-items: center; border: 1px solid rgba(94, 215, 196, 0.15); border-radius: 12px; background: rgba(40, 198, 179, 0.07); }
.feature-icon svg { width: 19px; height: 19px; stroke: #63d4c2; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; }
.feature-item strong, .feature-item small { display: block; }
.feature-item strong { font-size: 12px; font-weight: 600; }
.feature-item small { margin-top: 3px; color: #818d9c; font-size: 11px; }
.decor { position: absolute; z-index: 0; border: 1px solid rgba(94, 215, 196, 0.06); border-radius: 50%; pointer-events: none; }
.decor-one { top: 25px; right: -6px; width: 134px; height: 134px; }
.decor-two { top: 46px; right: 15px; width: 92px; height: 92px; }

.login-card {
  position: relative;
  z-index: 1;
  padding: 35px 34px 24px;
  border: 1px solid rgba(190, 208, 226, 0.12);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(30, 39, 51, 0.97), rgba(22, 29, 39, 0.98));
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.25), inset 0 1px rgba(255, 255, 255, 0.035);
}
.card-heading { display: flex; align-items: center; gap: 13px; }
.card-icon { display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid rgba(74, 219, 198, 0.2); border-radius: 14px; background: rgba(40, 198, 179, 0.1); }
.card-icon svg { width: 23px; height: 23px; stroke: var(--teal-light); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.card-kicker { margin: 0 0 3px; color: #7f8c9d; font-size: 9px; font-weight: 700; letter-spacing: 1.6px; }
.card-heading h2 { margin: 0; font: 700 21px/1.3 'Manrope', sans-serif; letter-spacing: -0.5px; }
.card-description { margin: 20px 0 24px; color: #9ca9b8; font-size: 12px; }
.field-group { margin-top: 17px; }
.field-group label { display: block; margin-bottom: 8px; color: #d4dce6; font-size: 11px; font-weight: 600; }
.label-row { display: flex; align-items: center; justify-content: space-between; }
.label-row label { margin-bottom: 8px; }
.text-button { margin: -4px 0 4px; padding: 4px 0; border: 0; background: transparent; color: var(--teal-light); cursor: pointer; font-size: 10px; font-weight: 600; }
.text-button:hover { color: #c2fff5; }
.input-wrap { position: relative; }
.input-icon { position: absolute; top: 50%; left: 14px; width: 17px; height: 17px; transform: translateY(-50%); stroke: #778597; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.6; pointer-events: none; }
.input-wrap input, .captcha-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(174, 194, 216, 0.13);
  border-radius: 10px;
  outline: none;
  background: rgba(8, 13, 20, 0.27);
  color: #f4f7fb;
  font-size: 12px;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}
.input-wrap input { padding: 0 14px 0 42px; }
.input-wrap input::placeholder, .captcha-input::placeholder { color: #697586; }
.input-wrap input:focus, .captcha-input:focus { border-color: rgba(63, 206, 185, 0.72); background: rgba(8, 13, 20, 0.45); box-shadow: 0 0 0 3px rgba(40, 198, 179, 0.1); }

.captcha-panel { margin-top: 20px; padding: 15px; border: 1px solid rgba(40, 198, 179, 0.2); border-radius: 12px; background: rgba(20, 133, 120, 0.07); }
.captcha-heading { display: flex; align-items: center; justify-content: space-between; }
.captcha-label { color: var(--teal-light); font-size: 8px; font-weight: 700; letter-spacing: 1.2px; }
.captcha-heading h3 { margin: 4px 0 0; font-size: 12px; }
.captcha-number { color: rgba(131, 227, 214, 0.55); font: 700 19px 'Manrope', sans-serif; }
.captcha-help { margin: 9px 0 12px; color: #a2adbb; font-size: 10px; line-height: 1.5; }
.captcha-image-frame { display: grid; min-height: 58px; place-items: center; margin-bottom: 10px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 7px; background: #f6f7f8; }
.captcha-image-frame img { display: block; max-width: 100%; max-height: 100px; object-fit: contain; }
.captcha-input { min-height: 42px; padding: 0 12px; letter-spacing: 2px; }

.result-message { margin-top: 15px; padding: 11px 12px; border: 1px solid transparent; border-radius: 9px; font-size: 11px; line-height: 1.55; }
.result-message[data-state='success'] { border-color: rgba(66, 211, 155, 0.23); background: rgba(66, 211, 155, 0.08); color: #8ce5be; }
.result-message[data-state='error'] { border-color: rgba(250, 115, 115, 0.25); background: rgba(250, 115, 115, 0.08); color: #ffaaaa; }
.result-message[data-state='info'] { border-color: rgba(233, 184, 92, 0.2); background: rgba(233, 184, 92, 0.07); color: #f0ce88; }

.submit-button {
  display: flex;
  width: 100%;
  min-height: 49px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 23px;
  border: 1px solid rgba(143, 245, 224, 0.36);
  border-radius: 10px;
  background: linear-gradient(105deg, #1ea997, #25bba6);
  box-shadow: 0 8px 24px rgba(24, 173, 153, 0.16), inset 0 1px rgba(255, 255, 255, 0.14);
  color: #071c1a;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: transform 150ms ease, filter 150ms ease, opacity 150ms ease;
}
.submit-button:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.08); }
.submit-button:active:not(:disabled) { transform: translateY(0); }
.submit-button:disabled { cursor: wait; opacity: 0.72; }
.button-arrow { width: 17px; height: 17px; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.button-spinner { display: none; width: 15px; height: 15px; border: 2px solid rgba(7, 28, 26, 0.25); border-top-color: #071c1a; border-radius: 50%; animation: spin 700ms linear infinite; }
.submit-button.is-loading .button-spinner { display: inline-block; }
.submit-button.is-loading .button-arrow { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.api-access { margin-top: 17px; color: #8491a0; font-size: 10px; }
.api-access summary { width: fit-content; cursor: pointer; color: #9eabba; font-weight: 600; }
.api-access summary:hover { color: var(--teal-light); }
.api-access label { display: block; margin: 12px 0 6px; color: #cbd5e0; font-weight: 600; }
.api-access input { width: 100%; min-height: 40px; padding: 0 11px; border: 1px solid rgba(174, 194, 216, 0.13); border-radius: 8px; outline: none; background: rgba(8, 13, 20, 0.27); color: #f4f7fb; font-size: 11px; }
.api-access input:focus { border-color: rgba(63, 206, 185, 0.72); box-shadow: 0 0 0 3px rgba(40, 198, 179, 0.1); }
.api-access small { display: block; margin-top: 6px; color: #778394; font-size: 9px; line-height: 1.5; }
.mode-toggle { display: flex; gap: 6px; margin-bottom: 22px; padding: 4px; border: 1px solid var(--border); border-radius: 11px; background: rgba(8, 13, 20, 0.27); }
.mode-tab { flex: 1; min-height: 36px; border: 0; border-radius: 8px; background: transparent; color: #8794a3; cursor: pointer; font-size: 11px; font-weight: 700; transition: background 150ms ease, color 150ms ease; }
.mode-tab:hover { color: #d4dce6; }
.mode-tab.is-active { background: linear-gradient(105deg, #1ea997, #25bba6); color: #071c1a; }

.bulk-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 14px;
  border: 1px solid rgba(174, 194, 216, 0.13);
  border-radius: 10px;
  outline: none;
  resize: vertical;
  background: rgba(8, 13, 20, 0.27);
  color: #f4f7fb;
  font-family: 'DM Sans', monospace;
  font-size: 12px;
  line-height: 1.6;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}
.bulk-textarea::placeholder { color: #697586; }
.bulk-textarea:focus { border-color: rgba(63, 206, 185, 0.72); background: rgba(8, 13, 20, 0.45); box-shadow: 0 0 0 3px rgba(40, 198, 179, 0.1); }
.bulk-hint { display: block; margin-top: 7px; color: #778394; font-size: 10px; }

.bulk-actions { display: flex; align-items: center; gap: 14px; margin-top: 20px; }
.bulk-actions .submit-button { margin-top: 0; }
.bulk-stop { color: #ffaaaa; white-space: nowrap; }
.bulk-stop:hover { color: #ffd0d0; }

.bulk-progress { margin: 14px 0 0; color: #9ca9b8; font-size: 11px; }

.bulk-results { margin-top: 16px; max-height: 280px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; }
.bulk-results table { width: 100%; border-collapse: collapse; font-size: 11px; }
.bulk-results th { position: sticky; top: 0; padding: 8px 10px; border-bottom: 1px solid var(--border); background: #1d2632; color: #9ca9b8; text-align: left; font-weight: 700; }
.bulk-results td { padding: 8px 10px; border-bottom: 1px solid rgba(185, 203, 222, 0.06); color: #d4dce6; }
.bulk-results tr:last-child td { border-bottom: 0; }
.row-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.row-status[data-state='pending'] { color: #96a2b2; }
.row-status[data-state='checking'] { color: #e9b85c; }
.row-status[data-state='success'] { color: #42d39b; }
.row-status[data-state='failed'] { color: #fa7373; }
.row-status[data-state='captcha_required'] { color: #83e3d6; }
.row-status[data-state='error'] { color: #fa7373; }
.status-dot-mini { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }

.card-footer { display: flex; align-items: center; justify-content: center; gap: 7px; margin-top: 19px; color: #778394; font-size: 9px; }

.add-row-forms details { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-top: 14px; }
.add-row-forms summary { cursor: pointer; color: var(--teal-light); font-weight: 700; }
.bulk-results table { table-layout: fixed; }
.bulk-results td, .bulk-results th { overflow-wrap: break-word; }
.lock-mini { color: #4ccab4; font-size: 8px; text-shadow: 0 0 8px rgba(76, 202, 180, 0.6); }
.page-footer { display: flex; min-height: 58px; align-items: center; justify-content: space-between; border-top: 1px solid rgba(185, 203, 222, 0.08); color: #707c8b; font-size: 10px; }
.footer-divider { width: 3px; height: 3px; border-radius: 50%; background: #46515e; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

:focus-visible { outline: 2px solid var(--teal-light); outline-offset: 3px; }

@media (min-width: 1400px) {
  .app-shell { padding-right: 9%; padding-left: 9%; }
  .main-layout { gap: 13vw; }
}

@media (max-width: 900px) {
  .app-shell { padding-right: 5%; padding-left: 5%; }
  .main-layout { grid-template-columns: minmax(0, 1fr) minmax(330px, 410px); gap: 36px; }
  h1 { font-size: clamp(39px, 6vw, 54px); letter-spacing: -2.7px; }
  .decor-one { right: 4px; }
}

@media (max-width: 700px) {
  .app-shell { min-height: 100svh; padding: 0 22px; }
  .topbar { min-height: 72px; }
  .brand-mark { width: 35px; height: 35px; border-radius: 11px; font-size: 25px; }
  .brand-copy strong { font-size: 17px; }
  .api-status { min-height: 31px; padding: 0 9px; font-size: 9px; }
  .main-layout { display: flex; flex-direction: column; align-items: stretch; gap: 27px; padding: 42px 0 38px; }
  .intro-panel { max-width: none; padding: 0; }
  .eyebrow { font-size: 9px; }
  h1 { margin: 14px 0 10px; font-size: clamp(38px, 10vw, 48px); letter-spacing: -2.5px; }
  .intro-text { max-width: 470px; font-size: 12px; line-height: 1.65; }
  .feature-list { display: none; }
  .decor-one { top: -7px; right: 3px; width: 82px; height: 82px; }
  .decor-two { top: 8px; right: 19px; width: 51px; height: 51px; }
  .login-card { width: 100%; max-width: 480px; align-self: center; padding: 27px 24px 21px; border-radius: 17px; }
  .card-description { margin: 15px 0 20px; }
  .page-footer { min-height: 51px; gap: 10px; font-size: 8px; }
}

@media (max-width: 380px) {
  .app-shell { padding-right: 16px; padding-left: 16px; }
  .main-layout { padding-top: 33px; }
  .login-card { padding-right: 18px; padding-left: 18px; }
  .api-status { gap: 6px; padding: 0 7px; font-size: 8px; }
  .page-footer { font-size: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
