:root {
  --page: #f4f7fb;
  --panel: #ffffff;
  --panel-strong: #0f172a;
  --ink: #101828;
  --muted: #667085;
  --line: #d9e1ec;
  --blue: #2563eb;
  --teal: #14b8a6;
  --green: #16a34a;
  --amber: #f59e0b;
  --danger: #dc2626;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 14%, rgba(20, 184, 166, 0.18), transparent 28%),
    radial-gradient(circle at 84% 78%, rgba(37, 99, 235, 0.16), transparent 26%),
    var(--page);
  font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 1.05fr) minmax(340px, 420px);
  gap: 0;
  width: min(1040px, calc(100vw - 40px));
  margin: 0 auto;
  align-items: center;
}

.brand-panel,
.auth-panel {
  min-height: 560px;
}

.brand-panel {
  position: relative;
  overflow: hidden;
  background: var(--panel-strong);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  padding: 34px;
  box-shadow: var(--shadow);
}

.brand-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.28), rgba(20, 184, 166, 0.08)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 72px);
  pointer-events: none;
}

.brand-mark,
.brand-copy,
.signal-grid {
  position: relative;
  z-index: 1;
}

.brand-mark svg {
  width: 190px;
  height: auto;
  display: block;
}

.signal-grid {
  margin: 86px 0 74px;
  display: grid;
  grid-template-columns: repeat(4, minmax(52px, 1fr));
  gap: 14px;
  max-width: 410px;
}

.signal {
  height: 58px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  position: relative;
  overflow: hidden;
}

.signal::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 13px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
}

.signal.up {
  color: var(--green);
}

.signal.mid {
  color: var(--amber);
}

.signal.idle {
  color: #64748b;
}

.eyebrow {
  margin: 0 0 8px;
  color: #5b6f90;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-copy .eyebrow {
  color: #93c5fd;
}

.brand-copy h1,
.auth-header h2 {
  margin: 0;
  letter-spacing: 0;
}

.brand-copy h1 {
  font-size: 34px;
  line-height: 1.08;
}

.auth-panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 8px 8px 0;
  padding: 52px 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: var(--shadow);
}

.auth-header {
  margin-bottom: 28px;
}

.auth-header h2 {
  font-size: 28px;
  color: var(--ink);
}

.field {
  margin-bottom: 16px;
}

label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 650;
  color: #344054;
}

input {
  width: 100%;
  height: 46px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: var(--ink);
  padding: 0 13px;
  font: inherit;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

input::placeholder {
  color: #98a2b3;
}

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

button {
  width: 100%;
  height: 46px;
  margin-top: 6px;
  border: 0;
  border-radius: 8px;
  background: #1d4ed8;
  color: #fff;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.24);
}

button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

button:hover {
  background: #1e40af;
  transform: translateY(-1px);
}

button:disabled {
  cursor: wait;
  opacity: 0.74;
  transform: none;
}

.error {
  min-height: 22px;
  margin: 13px 0 0;
  color: var(--danger);
  font-size: 13px;
  font-weight: 650;
}

.auth-footer {
  margin-top: 26px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.auth-footer span {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.auth-footer p {
  margin: 0;
}

@media (max-width: 820px) {
  body {
    background: var(--page);
  }

  .login-shell {
    width: min(440px, calc(100vw - 28px));
    grid-template-columns: 1fr;
    padding: 28px 0;
  }

  .brand-panel {
    min-height: 220px;
    border-radius: 8px 8px 0 0;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 0;
    padding: 26px;
  }

  .brand-mark svg {
    width: 168px;
  }

  .signal-grid {
    display: none;
  }

  .brand-copy {
    margin-top: 34px;
  }

  .brand-copy h1 {
    font-size: 27px;
  }

  .auth-panel {
    min-height: auto;
    border-radius: 0 0 8px 8px;
    border-left: 1px solid var(--line);
    padding: 34px 24px 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
