@font-face {
  font-family: 'system';
  src: local('Segoe UI');
}

:root {
  --ink: #10182c;
  --paper: #f3f6fc;
  --paper-dim: #e6ecf7;
  --blue: #14428f;
  --blue-dark: #0a2c63;
  --gold: #f0a830;
  --line: #cfd9ec;
  --error: #c23b30;
  --input-bg: #ffffff;
  --muted: #5b6478;
  --muted-soft: #767f94;
  --muted-faint: #97a0b5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8ecf5;
    --paper: #0d1420;
    --paper-dim: #131b28;
    --gold: #f0b84a;
    --line: #2b3750;
    --error: #e2574a;
    --input-bg: #1a2333;
    --muted: #a9b4cf;
    --muted-soft: #93a0bd;
    --muted-faint: #7c88a5;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--paper);
  color: var(--ink);
}

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

/* ---------- painel de marca ---------- */
.brand {
  position: relative;
  background: radial-gradient(120% 140% at 15% 0%, #1c4d9c 0%, var(--blue-dark) 55%, #071c40 100%);
  color: #e7edf9;
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.brand-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(231,237,249,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(231,237,249,0.06) 1px, transparent 1px),
    radial-gradient(rgba(240,168,48,0.5) 1px, transparent 1px);
  background-size: 34px 34px, 34px 34px, 68px 68px;
  mask-image: radial-gradient(circle at 20% 20%, black, transparent 70%);
}

.brand-content {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.brand-logo {
  width: 190px;
  max-width: 46vw;
  filter: drop-shadow(0 12px 30px rgba(0,0,0,0.25));
}
.brand-logo svg { width: 100%; height: auto; display: block; }

.brand-name {
  display: block;
  margin-top: 22px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.32em;
  color: #dbe5f8;
}

.brand-footer {
  position: relative;
  font-size: 12px;
  color: #8194bd;
  border-top: 1px solid rgba(231,237,249,0.15);
  padding-top: 18px;
}

/* ---------- painel de acesso ---------- */
.access {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  background: var(--paper);
}

.access-box {
  width: 100%;
  max-width: 360px;
}

.access-label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 700;
}

.access h1 {
  margin: 6px 0 4px;
  font-size: 32px;
  font-weight: 600;
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--ink);
}

.access-sub {
  margin: 0 0 28px;
  font-size: 13.5px;
  color: var(--muted);
}

form { display: flex; flex-direction: column; }

label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

input[type="text"],
input[type="password"] {
  border: 1px solid var(--line);
  background: var(--input-bg);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 18px;
  color: var(--ink);
  font-family: inherit;
  transition: border-color 0.15s cubic-bezier(.22,.8,.28,1), box-shadow 0.15s cubic-bezier(.22,.8,.28,1);
}

input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(20,66,143,0.14);
}

.remember {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  font-weight: 400;
  color: var(--muted);
  cursor: pointer;
}

.remember input { width: 15px; height: 15px; accent-color: var(--blue); }

button[type="submit"] {
  position: relative;
  overflow: hidden;
  background: var(--blue);
  color: #f3f6fc;
  border: none;
  border-radius: 14px;
  padding: 13px 16px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.15s cubic-bezier(.22,.8,.28,1), transform 0.15s cubic-bezier(.22,.8,.28,1), box-shadow 0.15s cubic-bezier(.22,.8,.28,1);
}

button[type="submit"]:hover { background: var(--blue-dark); box-shadow: 0 6px 18px rgba(20,66,143,0.3); }
button[type="submit"]:active { transform: scale(0.96); box-shadow: none; }
button[type="submit"]:disabled { opacity: 0.6; cursor: default; }

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  transform: scale(0);
  opacity: 0.9;
  pointer-events: none;
  animation: ripple-expand 500ms cubic-bezier(.22,.8,.28,1) forwards;
}
@keyframes ripple-expand {
  to { transform: scale(2.6); opacity: 0; }
}

.error {
  min-height: 18px;
  color: var(--error);
  font-size: 13px;
  margin: 12px 0 0;
}

.help {
  margin-top: 22px;
  font-size: 12.5px;
  color: var(--muted-soft);
}

.access-footnote {
  margin-top: 40px;
  font-size: 11px;
  color: var(--muted-faint);
}

@media (max-width: 860px) {
  .screen { grid-template-columns: 1fr; }
  .brand { padding: 40px 28px; min-height: 260px; }
  .brand-tagline { font-size: 20px; margin-top: 24px; }
  .brand-points { display: none; }
  .access { padding: 32px 24px; }
}
