@font-face {
  font-family: 'LINE Seed Sans TH';
  src: url('/fonts/LINESeedSansTH_W_Th.woff2') format('woff2');
  font-weight: 100;
  font-display: swap;
}
@font-face {
  font-family: 'LINE Seed Sans TH';
  src: url('/fonts/LINESeedSansTH_W_Rg.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'LINE Seed Sans TH';
  src: url('/fonts/LINESeedSansTH_W_Bd.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'LINE Seed Sans TH';
  src: url('/fonts/LINESeedSansTH_W_XBd.woff2') format('woff2');
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: 'LINE Seed Sans TH';
  src: url('/fonts/LINESeedSansTH_W_He.woff2') format('woff2');
  font-weight: 900;
  font-display: swap;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'LINE Seed Sans TH', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

input, button, select, textarea, option {
  font-family: inherit;
}

.auth-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

.auth-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.auth-logo { font-size: 48px; margin-bottom: 8px; }
.auth-title { font-size: 22px; color: #1f2937; margin-bottom: 4px; }
.auth-subtitle { font-size: 14px; color: #6b7280; margin-bottom: 24px; }

.btn {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-google {
  background: #fff;
  color: #1f2937;
  border: 1px solid #d1d5db;
  margin-bottom: 20px;
}
.btn-google:hover { background: #f9fafb; }

.btn-primary { background: #667eea; color: #fff; }
.btn-primary:hover { background: #5a6fd6; }

.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; }

.google-icon { flex-shrink: 0; }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #9ca3af;
  font-size: 13px;
  margin: 4px 0 20px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.email-form { display: flex; flex-direction: column; gap: 12px; }

.email-form input {
  padding: 12px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 15px;
  width: 100%;
  outline: none;
  transition: border-color 0.2s;
}
.email-form input:focus { border-color: #667eea; }

.auth-alt { margin-top: 16px; font-size: 14px; color: #6b7280; }
.auth-alt a { color: #667eea; text-decoration: none; font-weight: 600; }
.auth-alt a:hover { text-decoration: underline; }

.error-box {
  background: #fee2e2;
  color: #b91c1c;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  text-align: left;
}

.hidden { display: none !important; }

.auth-note {
  background: #f3f4f6;
  border-radius: 8px;
  padding: 16px;
  font-size: 14px;
  color: #374151;
  line-height: 1.6;
  text-align: left;
}
.auth-muted { color: #9ca3af; font-size: 12px; margin-top: 4px; }

.logo-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-badge {
  font-size: 120px;
  line-height: 1;
  color: #fff;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  user-select: none;
}

/* �� Admin / Backend �� */
.admin-body {
  display: flex;
  min-height: 100vh;
  background: #f3f4f6;
  font-family: 'LINE Seed Sans TH', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.admin-sidebar {
  width: 220px;
  background: #1f2937;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  flex-shrink: 0;
}
.admin-logo {
  font-size: 40px;
  text-align: center;
  margin-bottom: 20px;
}
.admin-nav { display: flex; flex-direction: column; flex: 1; }
.admin-nav a {
  color: #cbd5e1;
  text-decoration: none;
  padding: 12px 24px;
  font-size: 15px;
  transition: background 0.2s;
}
.admin-nav a:hover { background: #374151; }
.admin-nav a.active { background: #4f46e5; color: #fff; }
.admin-who { padding: 16px 24px; font-size: 14px; color: #9ca3af; border-top: 1px solid #374151; }
.admin-who small { color: #6b7280; }

.admin-main { flex: 1; padding: 24px 32px; }
.admin-header { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.admin-header h1 { font-size: 24px; color: #111827; }
.admin-badge { background: #4f46e5; color: #fff; padding: 4px 10px; border-radius: 20px; font-size: 12px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: 12px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.stat-num { font-size: 28px; font-weight: 700; color: #1f2937; }
.stat-label { font-size: 13px; color: #6b7280; margin-top: 4px; }

.admin-placeholder { color: #6b7280; background: #fff; padding: 24px; border-radius: 8px; }
.admin-table { width: 100%; background: #fff; border-collapse: collapse; border-radius: 8px; overflow: hidden; }
.admin-table th, .admin-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid #e5e7eb; font-size: 14px; }
.admin-table th { background: #f9fafb; color: #374151; font-weight: 600; }
.admin-table .empty { text-align: center; color: #9ca3af; padding: 24px; }

.toolbar { margin-bottom: 16px; display: flex; justify-content: flex-end; gap: 10px; align-items: center; }
.toolbar .btn { width: auto; padding: 10px 18px; }

.input {
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: #1f2937;
}
.input:focus { outline: none; border-color: #667eea; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.badge-green { background: #d1fae5; color: #047857; }
.badge-amber { background: #fef3c7; color: #b45309; }
.badge-grey { background: #e5e7eb; color: #4b5563; }
.muted { color: #6b7280; font-size: 13px; }

.stat-num { font-size: 26px; }

@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
