@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;600&display=swap");

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

:root {
  --blue:        #2e3191;
  --blue-dim:    #eef0fc;
  --green:       #16a34a;
  --green-dim:   #f0fdf4;
  --red:         #dc2626;
  --red-dim:     #fef2f2;
  --amber:       #d97706;
  --amber-dim:   #fffbeb;
  --bg:          #f0f2f8;
  --surface:     #ffffff;
  --border:      #e2e5f0;
  --text:        #0f172a;
  --text-2:      #64748b;
  --text-3:      #94a3b8;
}

body {
  background: var(--bg);
  font-family: 'Noto Sans Thai', system-ui, -apple-system, sans-serif;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Navbar ─────────────────────────────── */
.navbar {
  height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
}
.navbar-logo { height: 28px; width: auto; }

/* ── Page wrapper ────────────────────────── */
.page { padding: 28px 18px 60px; }

/* ── Card ────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(15,23,42,0.06), 0 6px 24px rgba(15,23,42,0.05);
  max-width: 440px;
  margin: 0 auto;
  overflow: hidden;
}
.card-body { padding: 28px 24px; }

/* ── Profile ─────────────────────────────── */
.profile-top {
  text-align: center;
  padding-bottom: 22px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.profile-avatar {
  width: 76px; height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  display: block;
  margin: 0 auto 12px;
}
.profile-name { font-size: 17px; font-weight: 600; line-height: 1.3; }
.profile-sub  { font-size: 12px; color: var(--text-3); margin-top: 3px; }

/* ── Info rows ───────────────────────────── */
.info-rows { margin-bottom: 22px; }
.info-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}
.info-row:last-child { border-bottom: none; }
.info-label { font-size: 11px; color: var(--text-3); width: 88px; flex-shrink: 0; text-transform: uppercase; letter-spacing: 0.04em; padding-top: 2px; }
.info-value { font-size: 15px; font-weight: 500; color: var(--text); }

/* ── Form ────────────────────────────────── */
.form-brand { margin-bottom: 28px; }
.form-brand-logo { height: 32px; margin-bottom: 18px; display: block; }
.form-title { font-size: 22px; font-weight: 600; margin-bottom: 4px; }
.form-sub   { font-size: 13px; color: var(--text-2); line-height: 1.65; }

.field { margin-bottom: 16px; }
.field-label {
  display: block;
  font-size: 11px; font-weight: 600;
  color: var(--text-2);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 7px;
}
.field-input {
  width: 100%; height: 48px; padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 15px; font-family: 'Noto Sans Thai', sans-serif;
  color: var(--text); background: var(--surface);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
}
.field-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(46,49,145,0.1);
}

/* ── Consent ──────────────────────────────── */
.consent {
  display: flex; gap: 11px; align-items: flex-start;
  background: var(--blue-dim);
  border-radius: 10px;
  padding: 13px 14px;
  margin-bottom: 22px;
}
.consent input[type="checkbox"] {
  width: 17px; height: 17px;
  margin-top: 2px; flex-shrink: 0;
  accent-color: var(--blue); cursor: pointer;
}
.consent-text { font-size: 12px; color: var(--text-2); line-height: 1.75; cursor: pointer; }

/* ── Buttons ──────────────────────────────── */
.btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 50px;
  border: none; border-radius: 12px;
  font-size: 15px; font-weight: 500; font-family: 'Noto Sans Thai', sans-serif;
  cursor: pointer; color: #fff;
  transition: opacity 0.15s, transform 0.1s;
  -webkit-appearance: none;
  text-decoration: none;
}
.btn:active { opacity: 0.88; transform: scale(0.985); }
.btn-primary { background: var(--blue); }
.btn-success { background: var(--green); }
.btn-danger  { background: var(--red); }

/* ── Loading screen ───────────────────────── */
.loader {
  position: fixed; inset: 0;
  background: var(--surface);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0;
}
.loader-logo   { height: 36px; margin-bottom: 40px; }
.loader-text   { font-size: 13px; color: var(--text-3); margin-top: 18px; }
.spinner {
  width: 34px; height: 34px;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Status pages ─────────────────────────── */
.status-page {
  min-height: calc(100vh - 56px);
  display: flex; align-items: center; justify-content: center;
  padding: 32px 20px;
}
.status-card {
  background: var(--surface);
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(15,23,42,0.06), 0 6px 24px rgba(15,23,42,0.05);
  max-width: 340px; width: 100%;
  padding: 40px 28px;
  text-align: center;
}
.status-icon {
  width: 68px; height: 68px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 22px;
}
.status-icon svg { width: 30px; height: 30px; stroke-width: 2.2; }
.icon-success { background: var(--green-dim);  color: var(--green); }
.icon-error   { background: var(--red-dim);    color: var(--red);   }
.icon-warning { background: var(--amber-dim);  color: var(--amber); }
.icon-lock    { background: var(--blue-dim);   color: var(--blue);  }
.icon-bye     { background: #f1f5f9;            color: var(--text-2);}
.status-title { font-size: 19px; font-weight: 600; margin-bottom: 10px; }
.status-body  { font-size: 13px; color: var(--text-2); line-height: 1.85; }
