:root {
  color-scheme: light;
  --ink: #17213a;
  --muted: #596681;
  --line: #e0e6f0;
  --canvas: #f3f6fb;
  --blue: #244bc4;
  --navy: #101b37;
  --white: #fff;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
button, select, input { font: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid #6c8fff; outline-offset: 3px; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .57; }
h1, h2, h3, p { margin: 0; }
.brand { display: inline-flex; gap: 12px; align-items: center; text-decoration: none; font-weight: 760; font-size: 1.4rem; width: fit-content; }
.mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 12px; background: #355be0; color: #fff; font-size: 24px; }
.welcome { display: grid; min-height: 100dvh; grid-template-columns: 1fr 1fr; }
.intro { padding: clamp(32px, 7vw, 112px); color: #f5f7ff; background: radial-gradient(ellipse at 70% 72%, #243d82, #111b38 62%); display: flex; flex-direction: column; justify-content: space-between; gap: 72px; }
.intro-main { max-width: 550px; }
.eyebrow { color: #5263a0; text-transform: uppercase; font-weight: 720; font-size: .79rem; letter-spacing: .12em; margin-bottom: 12px; }
.intro .eyebrow { color: #a5baff; }
.intro h1 { font-size: clamp(2.5rem, 5vw, 5.2rem); letter-spacing: -.055em; line-height: 1.04; margin-bottom: 22px; max-width: 11ch; }
.intro-main > p:not(.eyebrow) { color: #c9d4f1; font-size: 1.13rem; max-width: 36ch; }
.flow { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.flow span { display: flex; align-items: center; gap: 8px; border: 1px solid #6880be; border-radius: 999px; padding: 8px 13px; font-size: .9rem; }
.flow i { width: 8px; height: 8px; border-radius: 50%; background: #92afff; }
.intro-foot { color: #c0cdef; font-size: .89rem; }
.sign-in { display: grid; place-items: center; padding: 32px; }
.auth-card { max-width: 432px; width: 100%; padding: 36px; border: 1px solid var(--line); background: #fff; border-radius: 21px; box-shadow: 0 16px 42px #192a5d0c; }
.auth-card h2 { font-size: 1.8rem; letter-spacing: -.035em; }
.auth-card > p { color: var(--muted); margin: 7px 0 22px; }
label { display: grid; gap: 6px; font-size: .9rem; color: #263552; font-weight: 630; }
form label { margin-bottom: 13px; }
input:not([type=checkbox]), select { min-width: 0; color: var(--ink); width: 100%; border: 1px solid #ccd7e8; border-radius: 9px; background: #fff; padding: 9px 11px; height: 42px; font-weight: 440; font-size: .94rem; }
select { appearance: none; padding-right: 26px; background: linear-gradient(45deg, transparent 50%, #596681 50%) right 13px center / 5px 5px no-repeat, linear-gradient(135deg, #596681 50%, transparent 50%) right 8px center / 5px 5px no-repeat, white; }
input[readonly] { background: #f7f9fd; }
.primary, .subtle { border: 1px solid transparent; border-radius: 9px; font-size: .92rem; font-weight: 675; padding: 9px 15px; min-height: 40px; white-space: normal; }
.primary { background: var(--blue); color: #fff; }
.primary:hover:not(:disabled) { background: #173da9; }
.subtle { background: #fff; color: #243b77; border-color: #cdd8ef; }
.subtle:hover:not(:disabled) { background: #edf2ff; }
.auth-card .primary { width: 100%; margin-top: 5px; }
.link-button { background: none; border: 0; padding: 5px 0; font-size: .9rem; font-weight: 680; color: var(--blue); text-align: left; }
.link-button:hover { text-decoration: underline; }
.message { color: #1d684d; font-size: .875rem; margin-top: 8px; }
.message:empty { display: none; }
.message.error { color: #a12c3c; }
.auth-card > .link-button { margin-top: 17px; }
.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100dvh; }
.nav { background: var(--navy); color: #f7f8ff; display: flex; flex-direction: column; gap: 39px; padding: 28px 18px; position: sticky; top: 0; height: 100dvh; }
.nav .brand { margin-left: 9px; }
.nav nav { display: grid; gap: 5px; }
.nav nav a { display: flex; align-items: center; color: #ccdaff; gap: 12px; text-decoration: none; border-radius: 9px; padding: 10px 12px; font-size: .92rem; }
.nav nav a span { width: 20px; text-align: center; }
.nav nav a:hover, .nav nav [aria-current] { color: white; background: #304675; }
.account { display: grid; grid-template-columns: 35px minmax(0, 1fr); gap: 9px 10px; align-items: center; margin-top: auto; padding: 16px 3px 4px; border-top: 1px solid #3c4a6b; }
.avatar { color: #e6ecff; background: #2b4277; display: grid; place-items: center; width: 35px; height: 35px; border-radius: 50%; font-weight: 730; }
.account strong, .account small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.account strong { font-size: .9rem; }
.account small { font-size: .79rem; color: #b6c4e7; }
.account .link-button { color: #cbd9ff; grid-column: 2; justify-self: start; padding: 0; }
.workspace { padding: 40px 42px 60px; }
.workspace-inner { max-width: 1230px; margin: auto; }
.top, .section-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.top h1 { font-size: clamp(2rem,4vw,3rem); line-height: 1.1; letter-spacing: -.05em; overflow-wrap: anywhere; }
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; background: #e7edff; color: #244395; border-radius: 999px; font-weight: 700; font-size: .82rem; white-space: nowrap; }
.badge::before { content: ''; width: 7px; height: 7px; background: currentColor; border-radius: 100%; }
.badge.active, .status.processed { background: #e1f4eb; color: #155e45; }
.stats { margin-top: 25px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.stats article, .card, .mode-card { border: 1px solid var(--line); background: #fff; border-radius: 15px; }
.stats article { padding: 16px 18px; }
.stats span, .stats small { display: block; color: var(--muted); font-size: .86rem; }
.stats strong { display: block; font-size: 2rem; line-height: 1.35; letter-spacing: -.055em; }
.section-title { margin: 27px 0 12px; }
.section-title h2 { font-size: 1.38rem; letter-spacing: -.024em; }
.integration-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0,1.1fr); gap: 16px; align-items: stretch; }
.card { padding: 21px; min-width: 0; }
.card-head { display: flex; gap: 11px; align-items: center; margin-bottom: 16px; }
.card-head h3, .mode-card h3 { font-size: 1.13rem; }
.card-head p, .card > p, .mode-copy p { color: var(--muted); font-size: .91rem; }
.brand-icon, .status-icon { width: 41px; height: 41px; flex: 0 0 auto; display: grid; place-items: center; font-weight: 770; border-radius: 11px; }
.tilda { color: #293040; background: #ebedf3; }
.cloud, .status-icon { color: #244bc4; background: #e8efff; }
.card > label { margin-top: 14px; }
.card > p.hint { color: var(--muted); margin-top: 12px; font-size: .83rem; }
.copy-field { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px; }
.copy-field button { padding-inline: 8px; font-size: .82rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 11px; }
.actions { display: flex; }
.mode-card { margin-top: 15px; display: flex; padding: 16px 19px; align-items: center; gap: 13px; flex-wrap: wrap; }
.mode-copy { flex: 1 1 260px; }
.mode-controls { display: grid; gap: 6px; justify-items: start; }
.check { display: flex; align-items: center; gap: 7px; font-size: .86rem; }
.check input { width: 16px; height: 16px; accent-color: var(--blue); }
.journal { padding: 0; }
.journal > .message { margin: 10px 18px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: .9rem; }
th { color: var(--muted); font-weight: 660; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td small { display: block; margin-top: 4px; color: var(--muted); }
td:last-child { overflow-wrap: anywhere; }
.status { display: inline-block; padding: 3px 8px; border-radius: 8px; color: #283f91; background: #eef2ff; font-weight: 650; font-size: .82rem; white-space: nowrap; }
.status.failed, .status.review { background: #fff0e5; color: #893b18; }
.empty { padding: 24px; text-align: center; }
.empty p { color: var(--muted); font-size: .91rem; margin-top: 3px; }
@media (max-width: 1080px) {
  .shell { grid-template-columns: 205px minmax(0,1fr); }
  .workspace { padding: 32px 24px 48px; }
  .integration-grid { grid-template-columns: 1fr; }
}
@media (max-width: 690px) {
  .welcome, .shell { display: block; }
  .intro { padding: 24px; gap: 29px; }
  .intro h1 { max-width: none; }
  .intro-foot { display: none; }
  .flow { margin-top: 20px; }
  .sign-in { padding: 20px; }
  .auth-card { padding: 24px; }
  .nav { min-height: 0; height: auto; position: static; gap: 10px; padding: 12px; }
  .nav nav { display: flex; flex-wrap: wrap; gap: 0; }
  .nav nav a { padding-block: 6px; }
  .account { grid-template-columns: 35px minmax(0, 1fr) auto; padding-top: 8px; }
  .account .link-button { grid-column: 3; }
  .workspace { padding: 23px 13px 36px; }
  .top { align-items: start; flex-wrap: wrap; }
  .stats { gap: 6px; }
  .stats article { padding: 9px; }
  .stats small { display: none; }
  .stats span { font-size: .79rem; }
  .card { padding: 14px; }
  .journal { padding: 0; }
  th, td { padding: 8px; }
}
@media (max-width: 365px) { .form-grid { grid-template-columns: 1fr; } }
