:root {
  --primary: #2563eb;
  --primary-700: #1d4ed8;
  --ink: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #f5f7fb;
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

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

/* ---------- Panel merek ---------- */
.brand {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 600px at 10% 0%, #2c5ff0 0%, transparent 60%),
              radial-gradient(900px 700px at 100% 100%, #0e7490 0%, transparent 55%),
              linear-gradient(160deg, #0b1d4f 0%, #10276b 55%, #0b1b45 100%);
}
.brand .net { position: absolute; inset: 0; width: 100%; height: 100%; color: #93c5fd; opacity: .35; stroke-width: 1; }
.brand .net circle { animation: pulse 4s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.brand .net circle:nth-child(3n) { animation-delay: 1.3s; }
.brand .net circle:nth-child(3n+1) { animation-delay: 2.6s; }
@keyframes pulse { 0%,100% { opacity: .5; transform: scale(1); } 50% { opacity: 1; transform: scale(1.6); } }
.brand-inner { position: relative; height: 100%; display: flex; flex-direction: column; padding: 48px 56px; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo strong { display: block; font-size: 20px; letter-spacing: .08em; }
.logo span { display: block; font-size: 13px; color: #bfdbfe; }
.pitch { margin-top: auto; margin-bottom: auto; max-width: 520px; }
.pitch h1 { font-size: clamp(30px, 3.4vw, 44px); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 16px; font-weight: 800; }
.pitch p { font-size: 17px; line-height: 1.6; color: #dbeafe; margin: 0 0 28px; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li {
  padding: 10px 16px; border-radius: 999px; font-size: 14px; color: #dbeafe;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); backdrop-filter: blur(6px);
}
.chips b { color: #fff; font-size: 16px; margin-right: 4px; }
.foot { color: #93c5fd; font-size: 12px; }

/* ---------- Panel form ---------- */
.panel { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.card { width: 100%; max-width: 410px; animation: rise .45s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.card-head h2 { font-size: 28px; letter-spacing: -.02em; margin: 0 0 8px; }
.card-head p { color: var(--muted); margin: 0 0 28px; line-height: 1.55; }
.badge-lock {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px;
  background: #e0ecff; color: var(--primary);
}
.badge-lock svg { width: 26px; height: 26px; }

.alert {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
  font-size: 14px; margin-bottom: 20px; animation: shake .4s ease-in-out;
}
.alert.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
@keyframes shake { 20%,60% { transform: translateX(-6px); } 40%,80% { transform: translateX(6px); } }

.form { display: grid; gap: 18px; }
.field > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.control {
  display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 14px;
  background: #fff; border: 1.5px solid var(--border); border-radius: 12px; color: #94a3b8;
  transition: border-color .15s, box-shadow .15s;
}
.control:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37,99,235,.14); color: var(--primary); }
.control input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 15px; color: var(--ink); }
.reveal { border: 0; background: none; padding: 6px; margin-right: -6px; color: #94a3b8; cursor: pointer; border-radius: 8px; display: grid; }
.reveal:hover { color: var(--ink); background: #f1f5f9; }
.reveal.on { color: var(--primary); }
[hidden] { display: none !important; }
.caps, .meter-label, .match { display: block; font-size: 12.5px; margin-top: 8px; color: var(--warning); }

.btn {
  margin-top: 6px; height: 52px; border: 0; border-radius: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 700; font-size: 15.5px; color: #fff;
  background: linear-gradient(180deg, #3b82f6, var(--primary-700));
  box-shadow: 0 10px 24px -10px rgba(37,99,235,.7), inset 0 1px 0 rgba(255,255,255,.2);
  transition: transform .1s, box-shadow .15s, filter .15s;
}
.btn:hover { filter: brightness(1.06); box-shadow: 0 14px 28px -10px rgba(37,99,235,.8); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .75; cursor: progress; }
.btn .spin { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.hint { text-align: center; color: var(--muted); font-size: 13.5px; margin-top: 26px; }
.hint a { color: var(--primary); text-decoration: none; font-weight: 600; }
.hint a:hover { text-decoration: underline; }

/* Kekuatan sandi */
.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.meter i { height: 5px; border-radius: 3px; background: var(--border); transition: background .2s; }
.meter[data-score="1"] i:nth-child(-n+1) { background: var(--danger); }
.meter[data-score="2"] i:nth-child(-n+2) { background: var(--warning); }
.meter[data-score="3"] i:nth-child(-n+3) { background: #65a30d; }
.meter[data-score="4"] i { background: var(--success); }
.meter-label { color: var(--muted); }
.rules { list-style: none; margin: -6px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.rules li { display: flex; align-items: center; gap: 8px; }
.rules li::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #cbd5e1; flex: none;
  transition: all .15s;
}
.rules li.ok { color: var(--success); }
.rules li.ok::before {
  border-color: var(--success); background: var(--success)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/10px no-repeat;
}
.match.ok { color: var(--success); }
.match.bad { color: var(--danger); }

@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .brand-inner { padding: 28px 24px 32px; }
  .pitch { margin: 28px 0 0; }
  .pitch h1 { font-size: 26px; }
  .pitch p { font-size: 15px; margin-bottom: 18px; }
  .foot { display: none; }
  .panel { align-items: flex-start; padding: 32px 16px 48px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before { animation: none !important; transition: none !important; }
}
