/* Shared auth UI styles — single source of truth for the whole member area.
   Change --accent once and every page follows (SPEC Bagian 3.5). */
:root {
  --accent: #2f6df6;
  --accent-hover: #245bd6;
  --accent-ring: rgba(47, 109, 246, 0.28);
  --bg: #f5f6f8;
  --card: #ffffff;
  --border: #e2e5ea;
  --text: #1f2430;
  --muted: #6b7280;
  --error: #d64545;
  --success: #1f9d63;
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --card: #171a20;
    --border: #2a2f38;
    --text: #e8eaed;
    --muted: #9aa1ac;
  }
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.auth-header {
  padding: 20px 24px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.auth-header a { color: inherit; text-decoration: none; }

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 26px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.auth-card h1 {
  font-size: 21px;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.auth-card .subtitle {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 20px;
  line-height: 1.5;
}

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}
.field input[aria-invalid="true"] { border-color: var(--error); }

.field-error {
  color: var(--error);
  font-size: 12.5px;
  margin-top: 5px;
  min-height: 1em;
}

button.primary {
  width: 100%;
  padding: 11px 16px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.12s;
}
button.primary:hover:not(:disabled) { background: var(--accent-hover); }
button.primary:disabled { opacity: 0.65; cursor: not-allowed; }

.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: none;
}
button.primary.loading .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-message {
  font-size: 13.5px;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  line-height: 1.5;
  display: none;
}
.form-message.show { display: block; }
.form-message.error { color: var(--error); background: rgba(214, 69, 69, 0.1); }
.form-message.success { color: var(--success); background: rgba(31, 157, 99, 0.1); }

.auth-links {
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--muted);
  text-align: center;
  line-height: 1.8;
}
.auth-links a { color: var(--accent); text-decoration: none; font-weight: 500; }
.auth-links a:hover { text-decoration: underline; }

.auth-footer {
  padding: 18px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 420px) {
  .auth-card { padding: 22px 18px; border-radius: 10px; }
  .auth-card h1 { font-size: 19px; }
}
