/* auth/public/css/style.css */

:root {
  --auth-bg: #f3efe7;
  --auth-bg-alt: #edf1f5;
  --auth-surface: rgba(255, 255, 255, 0.86);
  --auth-surface-strong: #ffffff;
  --auth-border: rgba(15, 23, 42, 0.08);
  --auth-text: #172033;
  --auth-muted: #64748b;
  --auth-accent: #b45309;
  --auth-accent-strong: #92400e;
  --auth-success: #047857;
  --auth-danger: #b91c1c;
  --auth-shadow: 0 1rem 2.5rem rgba(15, 23, 42, 0.1);
}

body {
  font-family: "Sarabun", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--auth-text);
  background:
    radial-gradient(circle at top left, rgba(180, 83, 9, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(15, 23, 42, 0.06), transparent 24%),
    linear-gradient(180deg, var(--auth-bg) 0%, #f6f7f9 42%, var(--auth-bg-alt) 100%);
  min-height: 100vh;
}

body.bg-light {
  background:
    radial-gradient(circle at top left, rgba(180, 83, 9, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(15, 23, 42, 0.06), transparent 24%),
    linear-gradient(180deg, var(--auth-bg) 0%, #f6f7f9 42%, var(--auth-bg-alt) 100%) !important;
}

.login-card {
  width: 100%;
  max-width: 430px;
  border-radius: 18px;
  background: var(--auth-surface-strong);
  box-shadow: var(--auth-shadow);
  border: 1px solid var(--auth-border);
}

.card {
  border-radius: 18px;
  border: 1px solid var(--auth-border);
  background-color: var(--auth-surface);
  backdrop-filter: blur(8px);
  box-shadow: var(--auth-shadow);
}

.app-logo {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--auth-accent) 0%, var(--auth-accent-strong) 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 24px;
}

.profile-img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-placeholder {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--auth-accent) 0%, var(--auth-accent-strong) 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
}

.system-card {
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.system-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 1rem 2rem rgba(15, 23, 42, 0.12);
}

.table th {
  color: var(--auth-muted);
  font-size: 0.875rem;
  font-weight: 600;
}

.badge {
  border-radius: 999px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--auth-accent) 0%, var(--auth-accent-strong) 100%);
  border-color: var(--auth-accent-strong);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background: linear-gradient(135deg, var(--auth-accent-strong) 0%, #78350f 100%);
  border-color: #78350f;
}

.btn-outline-primary {
  color: var(--auth-accent-strong);
  border-color: rgba(180, 83, 9, 0.35);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background: rgba(180, 83, 9, 0.08);
  color: var(--auth-accent-strong);
  border-color: rgba(180, 83, 9, 0.5);
}

.btn-outline-secondary {
  color: var(--auth-muted);
  border-color: rgba(100, 116, 139, 0.35);
}

.btn-outline-danger {
  color: var(--auth-danger);
  border-color: rgba(185, 28, 28, 0.35);
}

.btn-outline-success {
  color: var(--auth-success);
  border-color: rgba(4, 120, 87, 0.35);
}

.text-muted {
  color: var(--auth-muted) !important;
}

.alert {
  border-radius: 16px;
  border: 1px solid var(--auth-border);
}

/* =====================================================
   Consent checkbox (custom div-based)
   ===================================================== */
.consent-box {
  background: #fefaf5;
  border: 1px solid rgba(180, 83, 9, 0.18);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.15s;
}

.consent-box:hover {
  border-color: rgba(180, 83, 9, 0.38);
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  user-select: none;
  pointer-events: none;
}

.consent-checkmark {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border-radius: 5px;
  border: 2px solid rgba(15, 23, 42, 0.25);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}

.consent-checkmark svg {
  width: 12px;
  height: 12px;
  color: #fff;
  opacity: 0;
  transition: opacity 0.15s;
}

.consent-checkmark.is-checked {
  background: var(--auth-accent);
  border-color: var(--auth-accent);
}

.consent-checkmark.is-checked svg {
  opacity: 1;
}

.consent-text {
  font-size: 13px;
  line-height: 1.55;
  color: var(--auth-muted);
  pointer-events: auto;
}

.consent-link {
  color: var(--auth-accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent-link:hover {
  color: var(--auth-accent-strong);
}