/* สไตล์เว็บสาธารณะและหน้าสมาชิก (/ และ /account)
   สีเป็นชุดกลางชั่วคราว — เปลี่ยนที่ตัวแปร --brand-* และ --accent-* เมื่อได้ CI ของสมาคม */

:root {
  --brand-900: #1b2433;
  --brand-800: #243044;
  --brand-700: #2e3b52;
  --brand-600: #3a4a66;
  --accent-500: #3d7cc9;
  --accent-400: #5b93d6;
  --accent-300: #b9d3f0;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --line: #e2e6eb;
  --line-strong: #cdd4dd;
  --text: #0d1b2a;
  --text-2: #4a5a6a;
  --text-3: #76858f;
  --on-dark: #ffffff;
  --on-dark-2: #b8c4d6;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(10, 28, 51, .06), 0 8px 24px -12px rgba(10, 28, 51, .18);
  --shadow-lg: 0 24px 60px -24px rgba(6, 18, 35, .45);
  --wrap: 1180px;
  --font-display: 'IBM Plex Sans Thai', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans Thai', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070f1b;
    --surface: #0d1826;
    --surface-2: #101e2f;
    --line: #1c2c40;
    --line-strong: #27394f;
    --text: #e8eef5;
    --text-2: #a9bacb;
    --text-3: #7d8fa3;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px -14px rgba(0, 0, 0, .7);
  }
  :root:not([data-theme="light"]) .notice-ok {
    background: #122a1e; color: #7ddba5;
  }
  :root:not([data-theme="light"]) .notice-error {
    background: #2c1512; color: #f4a29a;
  }
  :root:not([data-theme="light"]) .notice-warn {
    background: #2b2210; color: #e9c46a;
  }
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%; scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%; display: block;
}
a {
  color: inherit; text-decoration: none;
}
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent-500);
  outline-offset: 2px;
  border-radius: 4px;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: .005em;
  line-height: 1.25;
  margin: 0;
}
.wrap {
  width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 20px;
}
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--brand-900);
  color: var(--on-dark);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.header-bar {
  display: flex; align-items: center; gap: 18px; height: 64px;
}
.brand {
  display: flex; align-items: center; gap: 11px; margin-right: auto;
}
.brand-crest {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--accent-500), var(--accent-400));
  color: #ffffff;
  font-family: var(--font-display); font-weight: 800; font-size: 17px;
  border-radius: 9px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45);
}
.brand-text {
  display: flex; flex-direction: column; line-height: 1.25; min-width: 0;
}
.brand-name {
  font-family: var(--font-body); font-size: 14.5px; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 44vw;
}
.brand-sub {
  font-family: var(--font-display); font-size: 11px; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; color: var(--accent-300);
}
.brand-sub.th {
  font-family: var(--font-body); font-size: 12px; letter-spacing: normal; text-transform: none;
}
.site-nav {
  display: flex; align-items: center; gap: 4px;
}
.site-nav a {
  position: relative;
  padding: 9px 13px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--on-dark-2);
  border-radius: 8px;
  transition: color .15s, background .15s;
}
.site-nav a:hover {
  color: #fff; background: rgba(255, 255, 255, .07);
}
.site-nav a[aria-current="page"] {
  color: #fff;
}
.site-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 2px;
  height: 2px; background: var(--accent-500); border-radius: 2px;
}
.nav-cta {
  margin-left: 8px; padding: 8px 15px !important;
  border: 1px solid rgba(255, 255, 255, .22); color: #fff !important;
  font-weight: 600 !important;
}
.nav-cta:hover {
  background: var(--accent-500) !important; border-color: var(--accent-500); color: #ffffff !important;
}
.nav-toggle {
  display: none; background: none; border: 1px solid rgba(255, 255, 255, .2);
  color: #fff; border-radius: 8px; padding: 7px 10px; cursor: pointer; font-size: 15px;
}
@media (max-width: 900px) {
  .nav-toggle {
    display: block;
  }
  .site-nav {
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--brand-800); padding: 10px 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    display: none;
  }
  .site-nav.is-open {
    display: flex;
  }
  .site-nav a {
    padding: 11px 12px; font-size: 15px;
  }
  .site-nav a[aria-current="page"]::after {
    display: none;
  }
  .site-nav a[aria-current="page"] {
    background: rgba(255, 255, 255, .1);
  }
  .nav-cta {
    margin: 6px 0 0; text-align: center;
  }
}
.eyebrow {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  color: var(--accent-300); font-weight: 600; margin-bottom: 14px; font-size: 11.5px;
}
.eyebrow::before {
  content: ""; width: 26px; height: 2px; background: var(--accent-500); flex: none;
}
.eyebrow .latin {
  letter-spacing: .2em; text-transform: uppercase;
}
.eyebrow .th {
  letter-spacing: normal; color: var(--on-dark-2); font-size: 12.5px;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; border: 1px solid transparent;
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .08s;
  background: var(--surface); color: var(--text); border-color: var(--line);
}
.btn:hover {
  background: var(--surface-2);
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--accent-500); border-color: var(--accent-500); color: #ffffff;
}
.btn-primary:hover {
  background: var(--accent-400);
}
.btn-ghost {
  background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .24); color: #fff;
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, .16);
}
.btn-sm {
  padding: 7px 13px; font-size: 13px;
}
main {
  padding-bottom: 72px;
}
.page-head {
  background: var(--brand-900); color: #fff; padding: clamp(28px, 4vw, 44px) 0;
}
.page-head h1 {
  font-size: clamp(27px, 4.4vw, 40px); font-weight: 800;
}
.page-head p {
  margin: 8px 0 0; color: var(--on-dark-2); font-size: 14.5px;
}
.table-scroll {
  overflow-x: auto;
}
.empty {
  padding: 40px 20px; text-align: center; color: var(--text-3);
  background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius);
}
.empty strong {
  display: block; color: var(--text-2); font-size: 15px; margin-bottom: 4px;
}
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.note-box {
  border-left: 3px solid var(--accent-500); background: var(--surface);
  padding: 13px 16px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 13px; color: var(--text-2); border: 1px solid var(--line); border-left-width: 3px;
}
.muted {
  color: var(--text-3);
}
.small {
  font-size: 13px;
}
.nowrap {
  white-space: nowrap;
}
.site-footer {
  background: var(--brand-900); color: var(--on-dark-2); padding: 44px 0 28px; font-size: 13.5px;
}
.footer-grid {
  display: grid; gap: 28px; grid-template-columns: 1.6fr 1fr 1fr;
}
.site-footer h4 {
  font-family: var(--font-body); font-size: 11px; letter-spacing: .15em; text-transform: uppercase;
  color: #fff; margin-bottom: 12px; font-weight: 700;
}
.site-footer a:hover {
  color: #fff;
}
.site-footer ul {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 7px;
}
.footer-bottom {
  margin-top: 30px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; font-size: 12.5px;
}
@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
}
.panel + .panel {
  margin-top: 18px;
}
.panel > h2 {
  font-size: 19px; margin-bottom: 4px;
}
.panel > h2 + p {
  margin-top: 0; color: var(--text-3); font-size: 13.5px;
}
.stack {
  display: grid; gap: 14px;
}
.form-row {
  display: grid; gap: 13px; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
}
label.field {
  display: flex; flex-direction: column; gap: 5px; font-size: 14px;
}
label.field > span {
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
}
label.check {
  display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; color: var(--text-2);
}
label.check input {
  margin-top: 3px;
}
input[type=text], input[type=email], input[type=date], input[type=number], input[type=search], input[type=tel], select, textarea {
  width: 100%; padding: 10px 12px; font: inherit; color: inherit;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(22, 54, 90, .12); outline: none;
}
.otp-input {
  font-family: var(--font-display); font-size: 30px; letter-spacing: .38em;
  text-align: center; font-weight: 700;
}
.notice {
  padding: 12px 15px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 16px;
}
.notice-ok {
  background: #e6f4ec; color: #17683c;
}
.notice-error {
  background: #fdecea; color: #b42318;
}
.notice-warn {
  background: #fff4e0; color: #97640f;
}
.member-card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 17px; background: var(--surface-2);
}
.member-card h3 {
  font-family: var(--font-body); font-size: 15.5px; font-weight: 600;
}
.member-card ul {
  padding-left: 17px; margin: 9px 0; font-size: 13.5px;
}
.cards {
  display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
}
.ok {
  color: #17683c;
}
.warn {
  color: #97640f;
}
.page-narrow {
  max-width: 460px; margin-inline: auto;
}
.section-pad {
  padding-top: clamp(26px, 4vw, 40px);
}
