:root {
  --auth-ink: #111827;
  --auth-muted: #6b7280;
  --auth-border: #e2e7ed;
  --auth-teal: #0f9f9a;
  --auth-teal-dark: #087f7b;
}

html { min-width: 320px; background: #fff; }
body { min-height: 100vh; color: var(--auth-ink); background: #fff; }
button, a, input { -webkit-tap-highlight-color: transparent; }

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(450px, 42%) minmax(0, 58%);
}

.auth-panel {
  min-width: 0;
  min-height: 100vh;
  padding: clamp(26px, 4vw, 52px) clamp(28px, 5vw, 76px) 26px;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--auth-ink);
  text-decoration: none;
}

.brand-logo { width: 42px; height: 42px; border-radius: 11px; object-fit: contain; }
.brand-copy { display: flex; flex-direction: column; }
.brand-copy strong { font-size: 18px; line-height: 1.15; letter-spacing: -0.02em; }
.brand-copy small {
  margin-top: 2px;
  color: #89929f;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-card { width: min(100%, 430px); margin: auto; padding: 54px 0 40px; }
.auth-heading { margin-bottom: 30px; }
.auth-kicker {
  display: block;
  margin-bottom: 7px;
  color: var(--auth-teal-dark);
  font-size: 12px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-heading h1 {
  margin: 0;
  color: var(--auth-ink);
  font-size: clamp(32px, 3.2vw, 42px);
  line-height: 1.14;
  letter-spacing: -0.045em;
}

.auth-heading p { margin: 10px 0 0; color: var(--auth-muted); font-size: 14px; line-height: 1.65; }
.form-field { margin-bottom: 18px; }
.form-field[hidden] { display: none; }
.form-field label {
  display: block;
  margin-bottom: 8px;
  color: #303946;
  font-size: 12px;
  font-weight: 600;
}

.form-field > input,
.password-field input {
  width: 100%;
  height: 50px;
  margin: 0;
  padding: 0 15px;
  border: 1px solid var(--auth-border);
  border-radius: 11px;
  outline: none;
  color: var(--auth-ink);
  background: #fff;
  font-size: 13px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-field input::placeholder { color: #a8b0bb; }
.form-field input:hover { border-color: #c5cdd7; }
.form-field input:focus { border-color: var(--auth-teal); box-shadow: 0 0 0 4px rgba(15, 159, 154, 0.11); }
.password-field { position: relative; }
.password-field input { padding-right: 50px; }

.password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  color: #7a8491;
  background: transparent;
  cursor: pointer;
}

.password-toggle:hover { color: var(--auth-teal-dark); background: #f2f8f8; }
.password-toggle:focus-visible, .mode-switch:focus-visible, .brand:focus-visible { outline: 2px solid var(--auth-teal); outline-offset: 2px; }
.password-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle .eye-hidden, .password-toggle[aria-pressed="true"] .eye-visible { display: none; }
.password-toggle[aria-pressed="true"] .eye-hidden { display: block; }
.result-message { min-height: 20px; margin: 2px 0 14px; color: #7b8491; font-size: 11px; line-height: 1.55; }

.primary-button {
  width: 100%;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid var(--auth-ink);
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #fff;
  background: var(--auth-ink);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.12);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.primary-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.primary-button:hover { transform: translateY(-1px); background: #2b3442; box-shadow: 0 11px 24px rgba(17, 24, 39, 0.16); }
.primary-button:focus-visible { outline: 3px solid rgba(15, 159, 154, 0.32); outline-offset: 2px; }
.primary-button:disabled { cursor: wait; opacity: 0.7; transform: none; }

.mode-switch {
  width: 100%;
  margin-top: 17px;
  padding: 4px;
  border: 0;
  color: var(--auth-muted);
  background: transparent;
  font-size: 12px;
  cursor: pointer;
}

.mode-switch strong { color: var(--auth-teal-dark); font-weight: 700; }
.forgot-link {
  display: block;
  margin: -6px 0 12px auto;
  padding: 2px 0;
  border: 0;
  color: var(--auth-teal-dark);
  background: transparent;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.forgot-link:hover { text-decoration: underline; text-underline-offset: 3px; }
#loginForm[hidden], .verify-panel[hidden] { display: none; }
.verify-text { margin: 0 0 12px; color: var(--auth-ink); font-size: 13px; line-height: 1.6; }
.verify-panel .mode-switch { margin-top: 10px; }
.forgot-link:focus-visible { outline: 2px solid var(--auth-teal); outline-offset: 2px; }
.forgot-link[hidden] { display: none; }
.mode-switch:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.support-note {
  margin: 30px 0 0;
  padding-top: 21px;
  border-top: 1px solid #edf0f3;
  text-align: center;
  color: #8a939f;
  font-size: 11px;
}

.support-note strong { color: #485565; font-weight: 600; }
.auth-footer { margin: 0; color: #a2a9b3; font-size: 9px; }

.showcase-panel {
  min-width: 0;
  min-height: 100vh;
  padding: clamp(38px, 5vw, 76px);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 85% 7%, rgba(30, 187, 178, 0.14), transparent 27%), radial-gradient(circle at 7% 94%, rgba(70, 196, 189, 0.1), transparent 29%), #f3f8f8;
}

.showcase-panel::before, .showcase-panel::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(15, 159, 154, 0.1);
  border-radius: 50%;
  pointer-events: none;
}

.showcase-panel::before { width: 420px; height: 420px; top: -260px; right: -120px; }
.showcase-panel::after { width: 270px; height: 270px; bottom: -180px; left: -90px; }
.showcase-content { width: min(100%, 710px); position: relative; z-index: 1; }

.showcase-badge {
  width: fit-content;
  padding: 7px 11px;
  border: 1px solid #d7ece9;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--auth-teal-dark);
  background: rgba(255, 255, 255, 0.75);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.showcase-badge i, .live-pill i { width: 6px; height: 6px; border-radius: 50%; background: #17af79; box-shadow: 0 0 0 3px rgba(23, 175, 121, 0.13); }
.showcase-content > h2 { margin: 17px 0 0; color: var(--auth-ink); font-size: clamp(37px, 4.4vw, 61px); line-height: 1.08; letter-spacing: -0.055em; }
.showcase-content > h2 em { color: var(--auth-teal); font-style: normal; }
.showcase-lead { max-width: 570px; margin: 16px 0 27px; color: #64717e; font-size: 14px; line-height: 1.7; }

.dashboard-preview {
  padding: clamp(18px, 2.3vw, 27px);
  border: 1px solid rgba(214, 224, 228, 0.9);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 70px rgba(36, 74, 81, 0.12);
  backdrop-filter: blur(12px);
}

.preview-topbar, .chart-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.preview-topbar > div, .chart-heading > div { display: flex; flex-direction: column; }
.preview-topbar span, .chart-heading small { color: #8c96a2; font-size: 9px; }
.preview-topbar strong { margin-top: 2px; font-size: 14px; }

.live-pill {
  padding: 5px 9px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #34715a !important;
  background: #edf9f3;
  font-size: 9px !important;
  font-weight: 700;
}

.live-pill i { width: 5px; height: 5px; }
.preview-metrics { margin-top: 18px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.preview-metrics article {
  min-width: 0;
  padding: 13px;
  border: 1px solid #edf0f3;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
}

.metric-symbol { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px; display: grid; place-items: center; }
.metric-symbol svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.metric-symbol--teal { color: #087f7b; background: #e4f7f5; }
.metric-symbol--green { color: #197544; background: #e9f7ee; }
.metric-symbol--violet { color: #6247aa; background: #f0ebfb; }
.preview-metrics article div { min-width: 0; display: grid; grid-template-columns: 1fr auto; align-items: end; }
.preview-metrics small { grid-column: 1 / -1; color: #7d8794; font-size: 8px; font-weight: 600; }
.preview-metrics strong { margin-top: 3px; overflow: hidden; font-size: clamp(12px, 1.4vw, 17px); line-height: 1.2; letter-spacing: -0.035em; white-space: nowrap; text-overflow: ellipsis; }
.preview-metrics em { margin-left: 5px; color: #159464; font-size: 7px; font-style: normal; font-weight: 700; }

.chart-card { margin-top: 9px; padding: 15px 17px 10px; border-radius: 12px; background: #f8fafb; }
.chart-heading strong { margin-top: 2px; font-size: 12px; }
.chart-heading > span { color: #168960; font-size: 9px; font-weight: 700; }
.chart {
  height: 88px;
  margin-top: 12px;
  padding: 0 3px;
  border-bottom: 1px solid #e6eaee;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: clamp(8px, 2vw, 18px);
}

.chart span { height: var(--height); border-radius: 5px 5px 1px 1px; background: #c9dfdd; }
.chart span:nth-child(4), .chart span:nth-child(6) { background: #8fc9c4; }
.chart span.active { background: var(--auth-teal); }
.chart-labels { padding-top: 6px; display: grid; grid-template-columns: repeat(7, 1fr); gap: clamp(8px, 2vw, 18px); color: #a1a9b2; font-size: 7px; text-align: center; }
.showcase-benefits { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 16px 25px; color: #596775; font-size: 10px; font-weight: 600; }
.showcase-benefits span { display: flex; align-items: center; gap: 7px; }
.showcase-benefits i { width: 17px; height: 17px; border-radius: 50%; display: grid; place-items: center; color: var(--auth-teal-dark); background: #dff3f1; font-size: 9px; font-style: normal; }
.preview-note { margin: 11px 0 0; color: #9aa3ad; font-size: 8px; }

@media (max-width: 1120px) {
  .auth-layout { grid-template-columns: minmax(410px, 46%) minmax(0, 54%); }
  .auth-panel { padding-inline: 45px; }
  .showcase-panel { padding-inline: 42px; }
  .preview-metrics { grid-template-columns: 1fr 1fr; }
  .preview-metrics article:last-child { display: none; }
}

@media (max-width: 820px) {
  .auth-layout { min-height: 100vh; display: flex; flex-direction: column; }
  .auth-panel { min-height: auto; padding: 25px 22px 28px; }
  .auth-card { padding: 54px 0 28px; }
  .auth-footer { text-align: center; }
  .showcase-panel { min-height: auto; padding: 45px 22px 50px; }
  .showcase-content { width: min(100%, 600px); }
  .showcase-content > h2 { font-size: clamp(34px, 9vw, 48px); }
}

@media (max-width: 520px) {
  .brand-logo { width: 38px; height: 38px; }
  .auth-card { padding-top: 44px; }
  .auth-heading { margin-bottom: 25px; }
  .auth-heading h1 { font-size: 34px; }
  .showcase-panel { padding-top: 38px; }
  .showcase-lead { font-size: 13px; }
  .dashboard-preview { padding: 15px; border-radius: 16px; }
  .preview-metrics { grid-template-columns: 1fr; }
  .preview-metrics article:nth-child(2) { display: none; }
  .preview-metrics strong { font-size: 17px; }
  .chart { height: 78px; gap: 9px; }
  .chart-labels { gap: 9px; }
  .showcase-benefits { gap: 11px 17px; }
}

@media (max-height: 760px) and (min-width: 821px) {
  .auth-panel, .showcase-panel { padding-top: 25px; padding-bottom: 20px; }
  .auth-card { padding-top: 28px; padding-bottom: 20px; }
  .auth-heading { margin-bottom: 21px; }
  .form-field { margin-bottom: 13px; }
  .showcase-content > h2 { font-size: clamp(34px, 4vw, 50px); }
  .showcase-lead { margin: 10px 0 16px; }
  .dashboard-preview { padding: 18px; }
  .chart { height: 68px; }
  .showcase-benefits { margin-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
