:root {
  color-scheme: light;
  --bg: #faf8f5;
  --surface: #ffffff;
  --ink: #19171f;
  --muted: #686272;
  --line: #e5ded6;
  --violet: #7c3aed;
  --violet-strong: #5b21b6;
  --yellow: #f6c944;
  --teal: #0f766e;
  --teal-soft: #dff5ef;
  --danger: #b42318;
  --danger-soft: #fff1f0;
  --shadow: 0 22px 70px rgba(31, 24, 55, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.08), transparent 34%),
    linear-gradient(315deg, rgba(15, 118, 110, 0.12), transparent 38%),
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 42px;
  align-items: center;
  padding: 40px 0;
}

.brand-panel {
  min-height: 640px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 42px 0;
}

.brand-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(124, 58, 237, 0.25);
}

.brand-name {
  font-size: 18px;
  font-weight: 800;
}

.brand-copy {
  max-width: 610px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 22px;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.94;
  font-weight: 900;
  letter-spacing: 0;
}

.brand-copy p:last-child {
  max-width: 520px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.status-strip {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  padding: 10px 14px;
  color: var(--muted);
  font-size: 14px;
  backdrop-filter: blur(10px);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--yellow);
}

.status-dot.online {
  background: var(--teal);
}

.auth-panel {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(229, 222, 214, 0.9);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 24px;
  backdrop-filter: blur(18px);
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 20px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f5f0eb;
}

.tab {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.tab.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(31, 24, 55, 0.08);
}

.form {
  display: grid;
  gap: 16px;
}

.form-heading {
  margin-bottom: 2px;
}

.form-heading h2 {
  margin-bottom: 6px;
  font-size: 25px;
  line-height: 1.2;
}

.form-heading p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  color: #3d3846;
  font-size: 13px;
  font-weight: 800;
}

input {
  width: 100%;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  outline: none;
  padding: 0 14px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

input:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.12);
}

.primary-btn,
.secondary-btn {
  min-height: 52px;
  border-radius: 8px;
  border: 0;
  font-weight: 900;
}

.primary-btn {
  margin-top: 4px;
  background: var(--violet);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(124, 58, 237, 0.26);
}

.primary-btn:hover {
  background: var(--violet-strong);
}

.secondary-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0 16px;
}

.banner {
  margin-bottom: 16px;
  border-radius: 8px;
  padding: 12px 14px;
  background: var(--teal-soft);
  color: #115e59;
  font-size: 14px;
  line-height: 1.45;
}

.banner.error {
  background: var(--danger-soft);
  color: var(--danger);
}

.banner.warning {
  background: #fff7d6;
  color: #755300;
}

.account-box {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.account-box span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.account-box strong {
  display: block;
  margin-top: 4px;
  word-break: break-word;
}

[hidden] {
  display: none !important;
}

@media (max-width: 860px) {
  .shell {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
    padding: 24px 0;
  }

  .brand-panel {
    min-height: 0;
    gap: 44px;
    padding: 8px 0 0;
  }

  h1 {
    font-size: 42px;
    line-height: 1;
  }

  .brand-copy p:last-child {
    font-size: 16px;
  }

  .status-strip {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .shell {
    width: min(100% - 24px, 430px);
  }

  .auth-panel {
    padding: 16px;
  }

  .tabs {
    grid-template-columns: 1fr;
  }

  .account-box {
    align-items: stretch;
    flex-direction: column;
  }
}
