/* =====================================================================
   PhuketJobs.com — design system (from "PhuketJobs Homepage.html" master design)
   Tokens → base → layout → components → responsive.
   Page-specific styles live in assets/css/pages/*.css
   ===================================================================== */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 500 700; font-stretch: 100%; font-display: swap;
  src: url("../fonts/bricolage-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 500 700; font-stretch: 100%; font-display: swap;
  src: url("../fonts/bricolage-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #F6F3EC; --ink: #0E2A33; --accent: #0B6E79; --accent-dark: #08515A; --white: #FFFFFF;
  --border: #E4DED1; --divider: #EEE9DE; --input: #CFC7B6; --outline: #D6CFBF; --dash: #BFB6A2;
  --muted: #4A5B60; --hint: #5E6E72; --text2: #3B4A4F; --body: #26363B;
  --soft: #FBFAF6; --chip: #F1EDE3; --tint: #E6EFEF; --tint2: #F2F8F8; --sand: #EAE4D6; --orange: #F0A35E;
  --on-dark: #C9D6D8; --on-dark2: #9FB3B6; --on-dark-link: #7FC7CE; --dark-line: #355761;
  --urgent-bg: #FBE3DC; --urgent: #9A2E1A; --ok-bg: #DDF1E4; --ok: #145A32; --warn-bg: #FFF4DB; --warn: #6B4A00;
  --note-bg: #FFF7E8; --note-line: #F0E2C4; --note: #6B5320; --info-bg: #E8ECF7; --info: #2A3D73; --dis-bg: #D9D3C6;
  --head: 'Bricolage Grotesque', 'IBM Plex Sans Thai', system-ui, sans-serif;
  --font: 'IBM Plex Sans Thai', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1240px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
/* boards: root font 16px and the font's own "normal" line height (IBM Plex Sans Thai ≈ 1.66, Bricolage ≈ 1.2) unless a rule sets one */
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: normal; }
a { color: var(--accent); } a:hover { color: var(--accent-dark); }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { margin: 0; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid rgba(11,110,121,.45); outline-offset: 2px; }
/* the hidden attribute must win over component display rules (.btn, .field, … set display) */
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
/* design boards use content-box containers: max-width = content width, padding 24px outside it */
.wrap { max-width: calc(var(--wrap) + 48px); margin: 0 auto; padding-left: 24px; padding-right: 24px; }
.wrap--1200 { max-width: 1248px; } .wrap--1320 { max-width: 1368px; }
.h-display { font-family: var(--head); font-weight: 700; }
.muted { color: var(--muted); } .hint { color: var(--hint); font-size: 13px; }
.tnum { font-variant-numeric: tabular-nums; }
html[lang="th"] .h-display, html[lang="th"] .h2, html[lang="th"] .page-h1 { font-family: var(--font); }

/* ---------- header ---------- */
.hdr { background: #fff; border-bottom: 1px solid var(--border); position: relative; z-index: 20; }
.hdr__in { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand__word { font-family: 'Bricolage Grotesque', sans-serif; font-size: 23px; font-weight: 700; letter-spacing: -0.5px; }
.brand__jobs { color: var(--accent); } .brand__jobs--dark { color: var(--on-dark-link); }
.brand__badge { font-size: 12px; font-weight: 600; color: var(--ink); background: var(--orange); padding: 3px 8px; border-radius: 6px; letter-spacing: .02em; }
.nav { display: flex; flex-wrap: wrap; gap: 4px; flex: 1 1 auto; }
.nav a { padding: 10px 14px; text-decoration: none; color: var(--ink); font-weight: 500; font-size: 15px; border-radius: 10px; }
.nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.nav a:hover { background: var(--soft); }
.hdr__right { display: flex; align-items: center; gap: 12px; }
.hdr__link { text-decoration: none; color: var(--ink); font-size: 15px; font-weight: 500; padding: 10px 6px; }
.hdr__menu { display: none; width: 44px; height: 44px; border: 1px solid var(--outline); border-radius: 10px; background: #fff; align-items: center; justify-content: center; cursor: pointer; }
.langsw { display: flex; border: 1px solid var(--outline); border-radius: 999px; padding: 3px; }
.langsw a { border: 0; border-radius: 999px; padding: 8px 14px; color: var(--muted); font-size: 14px; text-decoration: none; min-height: 36px; display: inline-flex; align-items: center; }
.langsw a[aria-current="true"] { background: var(--ink); color: #fff; font-weight: 600; }
.avatar { width: 36px; height: 36px; border-radius: 999px; background: var(--tint); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.usermenu { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 500; }
.hdr__link.usermenu { padding-top: 4px; padding-bottom: 4px; } /* avatar 36 + 8 = 44px target; header stays at the board height */

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; border: 1px solid transparent; cursor: pointer;
  font-size: 15px; font-weight: 600; padding: 11px 19px; border-radius: 10px; line-height: normal; min-height: 44px; background: none; }
/* boards: filled buttons have no border and outline buttons 1px less padding — here every .btn has a 1px border, so padding is 1px less than the board value */
.btn--primary { background: var(--accent); color: #fff; } .btn--primary:hover { background: var(--accent-dark); color: #fff; }
.btn--outline { border-color: var(--outline); color: var(--ink); background: #fff; } .btn--outline:hover { border-color: var(--ink); color: var(--ink); }
.btn--ink { border-color: var(--ink); color: var(--ink); background: #fff; }
.btn--light { background: var(--bg); color: var(--ink); } .btn--light:hover { background: #fff; color: var(--ink); }
.btn--ghost-dark { border-color: var(--dark-line); color: var(--bg); } .btn--ghost-dark:hover { color: #fff; border-color: var(--on-dark2); }
.btn--danger { border-color: #E3B4A8; color: var(--urgent); background: #fff; }
.btn--sm { font-size: 14px; padding: 8px 14px; border-radius: 8px; min-height: 38px; }
.btn--lg { font-size: 16px; padding: 13px 23px; border-radius: 12px; min-height: 52px; }
.btn--xl { font-size: 17px; padding: 0 36px; border-radius: 12px; min-height: 54px; }
.btn--block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--dis-bg); color: var(--hint); border-color: transparent; cursor: not-allowed; }
.icon-btn { width: 38px; height: 38px; border: 1px solid var(--outline); border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink); background: #fff; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- hero ---------- */
.hero { background: var(--ink); color: var(--bg); }
.hero__in { padding-top: 72px; padding-bottom: 64px; }
.eyebrow { margin: 0 0 14px; font-size: 15px; color: var(--orange); font-weight: 600; letter-spacing: .4px; text-transform: uppercase; }
.hero h1 { font-family: 'Bricolage Grotesque', var(--font); font-size: 60px; line-height: 1.04; font-weight: 700; letter-spacing: -1.5px; max-width: 820px; }
html[lang="th"] .hero h1 { font-family: var(--font); font-size: 56px; line-height: 1.3; letter-spacing: 0; max-width: 860px; }
.hero__sub { margin-top: 14px; font-size: 22px; color: var(--on-dark); font-weight: 500; }
.searchbar { margin-top: 36px; background: #fff; border-radius: 16px; padding: 10px; display: flex; flex-wrap: wrap; gap: 10px; max-width: 980px; color: var(--ink); }
.searchbar__f { display: flex; flex-direction: column; padding: 8px 14px; }
.searchbar__f--what { flex: 2 1 320px; } .searchbar__f--where { flex: 1 1 220px; }
.searchbar__f label { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .3px; text-transform: uppercase; }
.searchbar__f input, .searchbar__f select { border: 0; outline: none; font-size: 17px; color: var(--ink); padding: 6px 0; background: transparent; width: 100%; }
.searchbar__f select { cursor: pointer; }
.searchbar__sep { width: 1px; background: var(--border); margin: 8px 0; }
.searchbar__btn { flex: 0 0 auto; border: 0; border-radius: 12px; background: var(--accent); color: #fff; font-size: 17px; font-weight: 600; padding: 0 32px; min-height: 56px; cursor: pointer; }
.searchbar__btn:hover { background: var(--accent-dark); }
.chips { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.chips__label { font-size: 14px; color: var(--on-dark2); margin-right: 4px; }
.chip-dark { text-decoration: none; color: var(--bg); border: 1px solid var(--dark-line); border-radius: 999px; padding: 8px 14px; font-size: 14px; }
.chip-dark:hover { color: #fff; border-color: var(--on-dark2); }

/* ---------- sections ---------- */
.section { padding-top: 48px; padding-bottom: 24px; }
.section--first { padding-top: 64px; }
.section__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 24px; }
.h2 { font-family: var(--head); font-size: 34px; line-height: 1.3; font-weight: 700; }
.section__sub { margin-top: 6px; color: var(--muted); font-size: 16px; }
.see-all { font-weight: 600; font-size: 15px; padding: 10px 0; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.grid-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }

/* ---------- job card (board 00) ---------- */
.jcard { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.jcard--urgent { border: 2px solid var(--orange); padding: 19px; }
.jcard__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.jcard__id { display: flex; gap: 12px; align-items: center; min-width: 0; }
.logo-tile { width: 46px; height: 46px; border-radius: 10px; background: var(--tint); color: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; flex: 0 0 auto; overflow: hidden; }
.logo-tile img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.logo-tile--lg { width: 52px; height: 52px; border-radius: 12px; font-size: 18px; }
.logo-tile--xl { width: 96px; height: 96px; border-radius: 20px; font-size: 30px; }
.jcard h3 { font-size: 17px; font-weight: 600; line-height: 1.35; }
.jcard h3 a { color: var(--ink); text-decoration: none; } .jcard h3 a:hover { color: var(--accent); }
.jcard__alt { margin-top: 2px; font-size: 14px; color: var(--muted); }
.jcard__meta { font-size: 14px; color: var(--muted); }
.jcard__salary { font-size: 16px; font-weight: 600; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12.5px; padding: 4px 10px; border-radius: 6px; background: var(--tint); color: var(--accent-dark); }
.tag--type { background: var(--chip); color: var(--text2); }
.jcard__foot { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--divider); padding-top: 12px; margin-top: 2px; gap: 8px; flex-wrap: wrap; }
.jcard__posted { font-size: 13px; color: var(--hint); }
.jcard__actions { display: flex; gap: 8px; align-items: center; }
.badge { flex: 0 0 auto; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.badge--urgent { background: var(--urgent-bg); color: var(--urgent); }
.badge--ok { background: var(--ok-bg); color: var(--ok); }
.badge--warn { background: var(--warn-bg); color: var(--warn); }
.badge--info { background: var(--info-bg); color: var(--info); }
.badge--grey { background: var(--chip); color: #4A3F25; }
.badge--muted { background: var(--divider); color: var(--hint); }
.badge--pop { background: var(--orange); color: var(--ink); font-size: 11.5px; padding: 3px 8px; }

/* ---------- tiles ---------- */
.area-tile { text-decoration: none; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; display: flex; justify-content: space-between; align-items: center; color: var(--ink); gap: 10px; }
.area-tile:hover { border-color: var(--accent); color: var(--ink); }
.area-tile__name { font-size: 17px; font-weight: 600; display: block; }
.area-tile__alt { font-size: 14px; color: var(--muted); display: block; }
.area-tile__count { font-size: 13px; color: var(--accent); font-weight: 600; white-space: nowrap; }
.dept-tile { text-decoration: none; background: var(--sand); border-radius: 12px; padding: 20px; display: flex; flex-direction: column; gap: 4px; color: var(--ink); min-height: 72px; }
.dept-tile:hover { background: #E2DBCA; color: var(--ink); }
.dept-tile__name { font-size: 17px; font-weight: 600; } .dept-tile__alt { font-size: 14px; color: var(--muted); }

/* ---------- employer CTA card ---------- */
.cta-card { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 44px; display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.cta-card__main { flex: 1 1 460px; }
.cta-card__eyebrow { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--accent); letter-spacing: .4px; text-transform: uppercase; }
.cta-card h2 { font-family: var(--head); font-size: 38px; line-height: 1.25; }
.cta-card__p { margin-top: 14px; font-size: 17px; color: var(--text2); line-height: 1.6; }
.cta-card__btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.ticks { flex: 1 1 320px; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 14px; }
.ticks li { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; }
.tick { flex: 0 0 auto; width: 22px; height: 22px; }

/* ---------- footer ---------- */
.ftr { background: var(--ink); color: var(--on-dark); margin-top: 56px; }
.ftr__in { padding-top: 44px; padding-bottom: 44px; display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.ftr__brand { max-width: 320px; }
.ftr__brand .brand__word { font-size: 22px; color: var(--bg); }
.ftr__tag { margin-top: 10px; font-size: 14px; line-height: 1.6; }
.ftr__nav { display: flex; flex-wrap: wrap; gap: 48px; font-size: 14px; }
.ftr__col { display: flex; flex-direction: column; gap: 10px; }
.ftr__head { color: var(--bg); font-weight: 600; }
.ftr__col a { color: var(--on-dark); text-decoration: none; } .ftr__col a:hover { color: #fff; }
.ftr__bottom { border-top: 1px solid #284650; padding-top: 16px; padding-bottom: 20px; font-size: 13px; color: var(--on-dark2); }
.ftr--light { background: #fff; color: var(--muted); border-top: 1px solid var(--border); }
.ftr--popular { padding: 36px 0; }
.ftr--popular h2 { font-size: 14px; font-weight: 600; color: var(--bg); margin-bottom: 12px; }
.ftr--popular nav { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; }
.ftr--popular a { color: var(--on-dark); text-decoration: none; }

/* ---------- breadcrumb / pager ---------- */
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--muted); }
.breadcrumb li + li::before { content: '›'; margin-right: 6px; color: var(--hint); }
.breadcrumb a { color: var(--muted); text-decoration: none; } .breadcrumb a:hover { color: var(--accent); }
.hero .breadcrumb ol, .land-hero .breadcrumb ol, .page-hero .breadcrumb ol { color: var(--on-dark2); }
.hero .breadcrumb a, .land-hero .breadcrumb a, .page-hero .breadcrumb a { color: var(--on-dark); }
.hero .breadcrumb a:hover, .land-hero .breadcrumb a:hover, .page-hero .breadcrumb a:hover { color: #fff; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 28px; }
.pager a, .pager span { min-width: 44px; min-height: 44px; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--outline); background: #fff; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; font-weight: 500; }
.pager .is-current { background: var(--ink); color: #fff; border-color: var(--ink); }
.pager .pager__gap { border: 0; background: none; min-width: 20px; }

/* ---------- forms ---------- */
.card { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 24px; }
.card--lg { padding: 32px; border-radius: 16px; } .card--xl { padding: 32px; border-radius: 18px; }
.card h2.card__title, .card__title { font-size: 19px; font-weight: 600; margin-bottom: 14px; }
.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field__label { font-size: 14px; font-weight: 600; color: var(--ink); }
.field__help { font-weight: 400; color: var(--hint); }
.field > label.check { font-weight: 400; } /* checkbox labels inside a field are body text, not field labels */
.req { color: var(--urgent); }
.input, .select, .textarea { font-size: 16px; border: 1px solid var(--input); border-radius: 10px; padding: 12px 14px; background: #fff; color: var(--ink); width: 100%; }
.select { padding: 11px 12px; cursor: pointer; }
.textarea { resize: vertical; min-height: 110px; line-height: normal; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); outline: 3px solid rgba(11,110,121,.18); outline-offset: 0; }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--urgent); }
.field-error { font-size: 13.5px; color: var(--urgent); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.span-all { grid-column: 1 / -1; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; line-height: 1.5; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin: 1px 0 0; flex: 0 0 auto; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-check { position: relative; }
.pill-check input { position: absolute; opacity: 0; pointer-events: none; }
.pill-check span { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border: 1px solid var(--outline); border-radius: 999px; background: #fff; font-size: 14px; cursor: pointer; }
.pill-check input:checked + span { background: var(--tint); border-color: var(--accent); color: var(--accent-dark); font-weight: 600; }
.pill-check input:focus-visible + span { outline: 3px solid rgba(11,110,121,.35); }
.otp-input { width: 150px; font-size: 18px; letter-spacing: 4px; text-align: center; }
.dropzone { display: flex; gap: 14px; align-items: center; border: 1.5px dashed var(--dash); border-radius: 12px; padding: 18px; background: var(--soft); cursor: pointer; }
.dropzone:hover { border-color: var(--accent); }
.dropzone__t { font-size: 15px; font-weight: 600; color: var(--accent); } .dropzone__s { font-size: 13px; font-weight: 400; color: var(--hint); }
.form-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- notices ---------- */
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 10px; font-size: 15px; margin-bottom: 14px; border: 1px solid; }
.flash--ok { background: #EAF6EE; border-color: #BFE3CB; color: var(--ok); }
.flash--error { background: var(--urgent-bg); border-color: #E8C4BA; color: var(--urgent); }
.flash--warn { background: var(--note-bg); border-color: var(--note-line); color: var(--note); }
.flash--info { background: #F3F5FC; border-color: #C9D3EE; color: var(--info); }
.flashes { padding-top: 16px; }
.notice { background: var(--note-bg); border: 1px solid var(--note-line); color: var(--note); border-radius: 10px; padding: 12px 16px; font-size: 14.5px; }
.notice--info { background: #F3F5FC; border-color: #C9D3EE; color: var(--info); }
.notice--ok { background: #EAF6EE; border-color: #BFE3CB; color: var(--ok); }

/* ---------- accordion (boards 08/13/18) ---------- */
.faq { background: #fff; border: 1px solid var(--border); border-radius: 14px; }
.faq__item + .faq__item { border-top: 1px solid var(--divider); }
.faq__q { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; background: none; border: 0; text-align: left;
  font-size: 16.5px; font-weight: 600; padding: 18px 22px; min-height: 56px; cursor: pointer; color: var(--ink); }
.faq__sign { font-size: 22px; color: var(--accent); line-height: 1; flex: 0 0 auto; }
.faq__sub { display: block; font-size: 13.5px; font-weight: 400; color: var(--hint); margin-top: 2px; }
.faq__a { padding: 0 22px 20px; font-size: 15.5px; line-height: 1.65; color: var(--text2); max-width: 820px; }
.faq__a[hidden] { display: none; }

/* ---------- stepper / tabs / tables ---------- */
.stepper { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; }
.stepper__s { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--muted); }
.stepper__bar { height: 6px; border-radius: 999px; background: var(--border); }
.stepper__s.is-done .stepper__bar, .stepper__s.is-current .stepper__bar { background: var(--accent); }
.stepper__s.is-current { color: var(--ink); font-weight: 600; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs a, .tabs button { text-decoration: none; border: 1px solid var(--outline); background: #fff; color: var(--ink); border-radius: 999px; padding: 8px 14px; font-size: 14px; min-height: 40px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.tabs [aria-current="page"], .tabs [aria-selected="true"] { background: var(--ink); color: #fff; border-color: var(--ink); font-weight: 600; }
.tabs .count { font-size: 12px; opacity: .8; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th { text-align: left; font-size: 13px; font-weight: 600; color: var(--muted); padding: 10px 14px; background: var(--soft); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 13px 14px; border-top: 1px solid var(--divider); vertical-align: middle; }
.progress { height: 8px; background: var(--divider); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.switch { position: relative; display: inline-block; width: 52px; height: 32px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--input); border-radius: 999px; cursor: pointer; transition: background .15s; }
.switch span::before { content: ''; position: absolute; width: 26px; height: 26px; left: 3px; top: 3px; background: #fff; border-radius: 999px; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::before { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid rgba(11,110,121,.35); }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); background: #fff; border: 1px dashed var(--input); border-radius: 14px; }

/* ---------- page header (inner pages) ---------- */
.page-hero { background: var(--ink); color: var(--bg); }
.page-hero__in { padding-top: 22px; padding-bottom: 44px; }
.page-h1 { font-family: var(--head); font-size: 44px; line-height: 1.08; font-weight: 700; letter-spacing: -1px; }
.page-hero__sub { margin-top: 10px; font-size: 18px; color: var(--on-dark); }
.page { padding-top: 36px; padding-bottom: 72px; }
.layout-aside { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.layout-aside__aside { flex: 1 1 280px; max-width: 360px; display: flex; flex-direction: column; gap: 16px; }
.layout-aside__main { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }

/* ---------- auth pages ---------- */
.auth { padding-top: 40px; padding-bottom: 72px; display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; }
.auth__main { flex: 999 1 560px; }
.auth__aside { flex: 1 1 300px; max-width: 380px; display: flex; flex-direction: column; gap: 14px; }
.auth h1 { font-family: var(--head); font-size: 34px; letter-spacing: -.5px; }
.auth__sub { margin: 6px 0 22px; font-size: 15.5px; color: var(--muted); }
.dark-card { background: var(--ink); color: #E3ECEC; border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.dark-card .eyebrow { margin: 0; font-size: 13px; }
.dark-card a { color: var(--on-dark-link); font-weight: 600; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hdr__in { gap: 12px; }
  .hdr__menu { display: inline-flex; }
  .nav, .hdr__right .hdr__link, .hdr__right .btn--primary { display: none; }
  .hdr.is-open .nav { display: flex; flex-direction: column; flex-basis: 100%; order: 10; }
  .hdr.is-open .hdr__right { flex-basis: 100%; order: 11; flex-wrap: wrap; }
  .hdr.is-open .hdr__right .hdr__link, .hdr.is-open .hdr__right .btn--primary { display: inline-flex; }
  .hdr__right { margin-left: auto; order: 2; }
  .hdr__menu { order: 3; } /* board 01: logo · language · menu button at the right edge */
  .hdr.is-open .hdr__menu { margin-left: auto; }
}
@media (max-width: 640px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .brand__word { font-size: 20px; }
  .hero__in { padding-top: 36px; padding-bottom: 28px; } /* board 01 */
  .searchbar { padding: 8px; gap: 4px; }
  .searchbar__f { padding: 8px 10px; }
  .searchbar__f label { font-size: 11.5px; }
  .searchbar__btn { min-height: 50px; border-radius: 10px; }
  .section, .section--first { padding-top: 28px; padding-bottom: 8px; }
  .jcard { padding: 16px 14px; } .jcard--urgent { padding: 15px 13px; }
  .jcard .logo-tile { display: none; } /* board 01: no logo tile on phone cards */
  .jcard__actions .btn.btn--primary { order: -1; flex: 3 1 auto; } /* Apply first and widest (board 01) */
  .hero h1 { font-size: 38px; letter-spacing: -1px; }
  html[lang="th"] .hero h1 { font-size: 34px; }
  .hero__sub { font-size: 17px; }
  .searchbar { flex-direction: column; }
  .searchbar__f { flex-basis: auto; } /* basis 320/220 would become heights in a column */
  .searchbar__sep { width: auto; height: 1px; margin: 0 14px; }
  .searchbar__btn { width: 100%; }
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
  .chip-dark { white-space: nowrap; }
  .grid-cards { grid-template-columns: 1fr; }
  .grid-tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .area-tile { flex-direction: column; align-items: flex-start; padding: 14px; }
  .jcard__actions { width: 100%; }
  .jcard__actions .btn { flex: 1 1 auto; }
  .h2 { font-size: 26px; }
  .cta-card { padding: 24px; gap: 24px; }
  .cta-card h2 { font-size: 28px; }
  .page-h1 { font-size: 32px; }
  .card--lg, .card--xl { padding: 20px; }
  .auth h1 { font-size: 28px; }
}
@media print {
  .hdr, .ftr, .no-print { display: none !important; }
  body { background: #fff; }
}
.badge--xs { padding: 2px 8px; font-size: 11.5px; }

.hdr__logout { margin: 0; }
.hdr__logout .link-btn { text-decoration: none; color: var(--ink); font-weight: 500; }
.ok-text { color: var(--ok); font-weight: 600; font-size: 15px; }

.login-sms { margin-top: 22px; border-top: 1px solid var(--divider); padding-top: 18px; }
.login-sms summary { cursor: pointer; font-weight: 600; color: var(--accent); }

/* ---------- touch targets on phones (design QA: every tap target >= 44px at <= 640px; desktop keeps the board sizes) ---------- */
@media (max-width: 640px), (pointer: coarse) {
  .brand { min-height: 44px; }
  .langsw a, .chip-dark, .tabs a, .tabs button, .pill-check span, .pager a, .pager span { min-height: 44px; }
  .btn, .btn--sm { min-height: 44px; }
  .icon-btn { width: 44px; height: 44px; }
  .searchbar__f input, .searchbar__f select { min-height: 44px; }
  .faq__q { min-height: 56px; }
  .ftr__col a { padding: 11px 0; }
  .ftr__col { gap: 0; }
  .hdr__right a, .dark-card a { display: inline-flex; align-items: center; min-height: 44px; }
}
