/* Heaven Door V — shared styles */
:root {
  --bg: #f5f3ef; --surface: #ffffff; --surface2: #f0ede8;
  --border: #e0dbd2; --border2: #c8c2b8;
  --text: #1c1a17; --muted: #7a7570;
  --accent: #1a4a2e; --accent2: #2d7a4f; --accent-light: #e8f2ec;
  --amber: #7a3d00; --amber-light: #fdf3e4;
  --blue: #0a3060; --blue-light: #e8f0f8;
  --red: #7a1a1a; --red-light: #fdf0f0;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: -apple-system, "Segoe UI", "Noto Sans Thai", sans-serif;
  line-height: 1.6; padding: 0;
}
header {
  background: var(--text); color: #fff;
  padding: 14px 24px; display: flex; align-items: center; justify-content: space-between;
}
header h1 { font-size: 18px; font-weight: 600; }
header nav a { color: #a0d0a0; margin-left: 18px; text-decoration: none; font-size: 13px; }
header nav a:hover { color: #fff; }
main { max-width: 1100px; margin: 24px auto; padding: 0 18px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 18px; margin-bottom: 16px;
}
.card h2 { font-size: 16px; margin-bottom: 12px; }
.profile-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: 8px;
}
.profile-row .emoji { font-size: 22px; }
.profile-row .info { flex: 1; }
.profile-row .info .name { font-weight: 600; font-size: 13px; }
.profile-row .info .label { font-size: 11px; color: var(--muted); }
.profile-row .toggle {
  width: 44px; height: 24px; border-radius: 12px; cursor: pointer;
  background: #ccc; position: relative; transition: background 0.2s;
}
.profile-row .toggle.on { background: var(--accent2); }
.profile-row .toggle::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 20px; height: 20px; background: #fff; border-radius: 50%;
  transition: left 0.2s;
}
.profile-row .toggle.on::after { left: 22px; }
.btn {
  display: inline-block; padding: 8px 16px; border-radius: 6px;
  font-size: 13px; cursor: pointer; border: 1px solid var(--border2);
  background: var(--surface); color: var(--text); text-decoration: none;
}
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn:hover { background: var(--surface2); }
.btn.primary:hover { background: var(--accent2); }
input, select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border);
  border-radius: 5px; font-family: inherit; font-size: 13px;
  background: var(--surface2);
}
label { font-size: 11px; color: var(--muted); margin-bottom: 4px; display: block; text-transform: uppercase; letter-spacing: 0.5px; }
.field { margin-bottom: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th { background: var(--text); color: #fff; padding: 8px; text-align: left; }
td { padding: 8px; border-bottom: 1px solid var(--border); }
tr:hover { background: var(--surface2); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; }
.badge.green { background: var(--accent-light); color: var(--accent); }
.badge.amber { background: var(--amber-light); color: var(--amber); }
.badge.blue { background: var(--blue-light); color: var(--blue); }
.badge.red { background: var(--red-light); color: var(--red); }
.notice {
  background: var(--blue-light); color: var(--blue);
  border: 1px solid #a0c0e0; padding: 10px 14px; border-radius: 6px;
  font-size: 12.5px; margin-bottom: 14px;
}
.error {
  background: var(--red-light); color: var(--red);
  border: 1px solid #e0a8a8; padding: 10px 14px; border-radius: 6px;
  font-size: 12.5px; margin-bottom: 14px;
}
.success {
  background: var(--accent-light); color: var(--accent);
  border: 1px solid #a8cdb8; padding: 10px 14px; border-radius: 6px;
  font-size: 12.5px; margin-bottom: 14px;
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.muted { color: var(--muted); font-size: 12px; }
hr { border: none; border-top: 1px solid var(--border); margin: 14px 0; }
