/* Halaman auth tenant — login, lupa password.
 *
 * Hanya dimuat oleh `tenant_ui/auth/base.html`, jadi tidak menambah apa pun ke
 * halaman yang sudah masuk. Seluruh nilainya var(--…) dari tokens.css: tema
 * gelap ikut dengan sendirinya, tanpa satu pun aturan di sini tahu soal tema.
 */

.auth-body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
}

.auth-shell {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 14px; padding: 32px 16px;
}

.auth-card {
  width: 100%; max-width: 400px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* ------------------------------------------------------------------ Kepala */

.auth-head { text-align: center; margin-bottom: 22px; }

/* Slot identitas tenant. Saat engine media ada, <span> ini berganti <img>
   dengan ukuran yang sama — tata letak sekitarnya tidak perlu berubah. */
.auth-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; margin-bottom: 12px;
  border-radius: var(--radius-lg);
  background: var(--primary); color: #fff;
  font-size: 19px; font-weight: 700; letter-spacing: .5px;
}

.auth-head h1 {
  margin: 0; font-size: 18px; font-weight: 600; line-height: 1.35;
  overflow-wrap: anywhere;
}
.auth-sub { margin: 5px 0 0; font-size: 13px; color: var(--text-muted); }

/* ------------------------------------------------------------------- Form */

.auth-form .form-group { margin-bottom: 15px; }

/* Ikon kiri sudah diatur .input-icon di components.css; yang perlu di sini
   hanya ruang untuk tombol lihat-password di kanan. */
.auth-form .input-icon { position: relative; }
.auth-form .input-icon input { padding-right: 38px; }

.auth-peek {
  position: absolute; top: 0; right: 0;
  width: 36px; height: 100%;
  display: flex; align-items: center; justify-content: center;
  border: 0; background: none; color: var(--text-faint);
  cursor: pointer; font-size: 15px;
}
.auth-peek:hover { color: var(--text-muted); }

.auth-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  margin: 4px 0 18px; font-size: 13px;
}

.auth-check { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.auth-check input { width: 15px; height: 15px; accent-color: var(--primary); }

.auth-link { color: var(--primary-text); text-decoration: none; }
.auth-link:hover { text-decoration: underline; }

.auth-submit {
  width: 100%; justify-content: center;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; font-size: 14px;
}

.auth-help { margin: 0 0 14px; font-size: 13px; color: var(--text-muted); line-height: 1.6; }

/* ------------------------------------------------------------------- Lain */

.auth-foot { margin: 0; font-size: 12px; color: var(--text-faint); text-align: center; }

.auth-theme { position: fixed; top: 14px; right: 14px; }

@media (max-width: 480px) {
  .auth-shell { justify-content: flex-start; padding-top: 48px; }
  .auth-card { padding: 22px; border-radius: var(--radius); }
}

/* ------------------------------------------------------- Halaman galat */

/* templates/error.html memakai kerangka yang sama dengan halaman auth:
   satu kartu di tengah, tanpa sidebar dan tanpa menu — karena halaman galat
   justru sering muncul ketika keduanya tidak bisa dibangun. */
.error-card { max-width: 460px; text-align: center; }

.error-code {
  font-size: 46px; font-weight: 800; line-height: 1;
  color: var(--text-faint); letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}

.error-card h1 { margin: 12px 0 8px; font-size: 19px; font-weight: 600; }
.error-card .auth-help { margin-bottom: 20px; }

.error-actions {
  display: flex; gap: 8px; justify-content: center; flex-wrap: wrap;
}
.error-actions .btn { display: inline-flex; align-items: center; gap: 7px; }
