:root {
  --red: #d32f2f;
  --red-dark: #9a1414;
  --text: #1a1a1a;
  --muted: #6b6f76;
  --border: #d9dce1;
  --bg: #f5f6f8;
  --card: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
}

.brand-panel {
  background:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.12), transparent 40%),
    linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: #fff;
  display: flex;
  align-items: flex-end;
  padding: 64px;
}
.brand-content h2 { font-size: 2.6rem; margin: 0 0 12px; }
.brand-content p { font-size: 1.15rem; opacity: .9; margin: 0; max-width: 28ch; }

.form-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border-radius: 14px;
  padding: 40px 36px;
  box-shadow: 0 10px 30px rgba(0,0,0,.07);
}

.logo { height: 48px; display: block; margin-bottom: 28px; }
h1 { margin: 0 0 6px; font-size: 1.6rem; }
.subtitle { margin: 0 0 24px; color: var(--muted); }

label { display: block; font-size: .9rem; font-weight: 600; margin: 14px 0 6px; }

input[type="email"], input[type="password"], input[type="text"] {
  width: 100%;
  padding: 11px 12px;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(211,47,47,.15); }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 90px; }
.toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--red); font-weight: 600; cursor: pointer; padding: 6px 8px;
}

.row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin: 16px 0 20px; }
.check { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; }
.link, footer a { color: var(--red); text-decoration: none; font-size: .9rem; }
.link:hover, footer a:hover { text-decoration: underline; }

.btn-primary, .btn-secondary {
  width: 100%; padding: 12px; font-size: 1rem; font-weight: 600; border-radius: 8px; cursor: pointer;
  transition: background .15s, opacity .15s;
}
.btn-primary { background: var(--red); color: #fff; border: none; }
.btn-primary:hover { background: var(--red-dark); }
.btn-primary:disabled { opacity: .7; cursor: wait; }
.btn-secondary { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #f0f1f3; }

.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 20px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.error { color: var(--red-dark); background: #fdecea; border-radius: 8px; padding: 10px 12px; font-size: .9rem; margin: 0 0 16px; }

.success { text-align: center; }
.check-circle {
  width: 64px; height: 64px; margin: 8px auto 16px; border-radius: 50%;
  background: #e8f5e9; color: #2e7d32; font-size: 2rem; display: grid; place-items: center;
}
.success p { color: var(--muted); margin-bottom: 24px; }

footer { margin-top: 24px; color: var(--muted); font-size: .85rem; }

.demo-badge {
  position: absolute; top: 16px; right: 16px;
  background: #fff3cd; color: #7a5b00; font-size: .75rem; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
}

[hidden] { display: none !important; }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .brand-panel { display: none; }
  .demo-badge { position: static; margin-bottom: 16px; }
  .form-panel { justify-content: flex-start; padding-top: 24px; }
  .card { padding: 32px 24px; }
}
