/* ================================================================
   auth.css — Authentication pages (login, register, etc.)
   Used by: app/Views/layouts/auth.php
   ================================================================ */

:root {
  --font-body:    "Sarabun", sans-serif;
  --font-heading: 'Noto Sans Thai', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── Base ─────────────────────────────────────────────────────── */
body {
  font-family: var(--font-body);
  font-size: 16px;
  color: #2c2c2c;
  background: #f5f0ec;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── Layout ────────────────────────────────────────────────────── */
.page {
  width: 100%;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.panel-form {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 20px;
  padding: 48px 40px 52px;
  box-shadow: 0 8px 40px rgba(61, 44, 44, .10);
}

.form-wrap {
  animation: slideUp .45s cubic-bezier(.22,1,.36,1) both;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── Brand header ──────────────────────────────────────────────── */
.mobile-brand {
  text-align: center;
  margin-bottom: 36px;
}

.mobile-brand-name {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: #3d2c2c;
  display: block;
  margin-bottom: 6px;
}

.mobile-brand-sub {
  font-size: 14px;
  color: #b09898;
}

/* ─── Section heading ───────────────────────────────────────────── */
.section-heading {
  font-size: 22px;
  font-weight: 600;
  color: #2c2c2c;
  margin-bottom: 8px;
  line-height: 1.4;
}

.section-sub {
  font-size: 15px;
  color: #888;
  font-weight: 400;
  margin-bottom: 32px;
  line-height: 1.7;
}

/* ─── Error ─────────────────────────────────────────────────────── */
.error-box {
  background: #fff5f5;
  border: 1px solid #ffd5d5;
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  color: #c0392b;
  margin-bottom: 28px;
  text-align: center;
  line-height: 1.6;
}

/* ─── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 17px 20px;
  border-radius: 14px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .15s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  letter-spacing: .2px;
}

.btn:active { transform: scale(.975); }

.btn-line {
  background: #06C755;
  color: #fff;
  margin-bottom: 14px;
  box-shadow: 0 4px 16px rgba(6, 199, 85, .22);
}

.btn-line:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(6, 199, 85, .28);
  color: #fff;
}

.btn-google {
  background: #f7f3f1;
  color: #2c2c2c;
  border: 1.5px solid #e8e0db;
}

.btn-google:hover {
  transform: translateY(-2px);
  background: #f0ebe7;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
  color: #2c2c2c;
  border-color: #ddd5cf;
}

.btn-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

/* ─── Divider ───────────────────────────────────────────────────── */
.or-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 4px 0 14px;
}

.or-divider hr {
  flex: 1;
  border: none;
  border-top: 1px solid #ede8e4;
}

.or-divider span {
  font-size: 13px;
  color: #bbb;
  white-space: nowrap;
}

/* ─── Note & Back ───────────────────────────────────────────────── */
.note {
  margin-top: 28px;
  font-size: 13px;
  color: #b5a8a2;
  text-align: center;
  line-height: 1.9;
  padding: 0 4px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 24px;
  font-size: 14px;
  color: #b5a8a2;
  text-decoration: none;
  transition: color .15s;
}

.back-link:hover { color: #c97878; }

.back-wrap { text-align: center; }

/* ─── Form fields (admin login) ─────────────────────────────────── */
.auth-field {
  margin-bottom: 20px;
}

.auth-field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 6px;
}

.auth-field input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 15px;
  color: #2c2c2c;
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.auth-field input:focus {
  border-color: #c97878;
  box-shadow: 0 0 0 3px rgba(201, 120, 120, .15);
}

.btn-admin {
  background: #c97878;
  color: #fff;
  margin-top: 8px;
  box-shadow: 0 4px 16px rgba(201, 120, 120, .25);
}

.btn-admin:hover {
  transform: translateY(-2px);
  background: #b86868;
  box-shadow: 0 8px 22px rgba(201, 120, 120, .32);
  color: #fff;
}

/* ─── Responsive ────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .panel-form {
    padding: 36px 24px 40px;
    border-radius: 16px;
  }
}
