/* ═══ CSS — Thaibreak ═══ */

:root {
  --primary: #e8312a;
  --primary-dark: #c5211b;
  --primary-light: #fef4f3;
  --primary-border: #fad7d5;
  --text: #111111;
  --text-secondary: #555555;
  --text-muted: #888888;
  --border: #e8e8e8;
  --border-mid: #d0d0d0;
  --bg: #ffffff;
  --bg-surface: #fafafa;
  --bg-subtle: #f5f5f5;
  --success: #1a7a4a;
  --success-bg: #edf7f1;
  --warning: #c47a00;
  --warning-bg: #fef8e8;
  --danger: #c5211b;
  --danger-bg: #fef0ef;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 5px;
}

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

body {
  font-family: 'Kanit', sans-serif;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  min-height: 100vh;
}

h1, h2, h3, h4, h5 {
  font-family: 'Kanit', sans-serif;
  line-height: 1.25;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  font-family: 'Kanit', sans-serif;
}

input, select, textarea {
  font-family: 'Kanit', sans-serif;
  font-size: 14px;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.page {
  display: none;
  background: #fff;
  min-height: calc(100vh - 64px);
}

.page.active {
  display: block;
}


/* ── NAV ── */

nav {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: 'Kanit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  cursor: pointer;
  letter-spacing: -.3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.logo-dot {
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  display: inline-block;
  margin-right: 2px;
}

.logo span {
  color: var(--text);
  font-weight: 500;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-btn {
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  border: none;
  transition: all .15s;
  font-family: 'Kanit', sans-serif;
  cursor: pointer;
}

.nav-btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.nav-btn-ghost:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

.nav-btn-primary {
  background: var(--primary);
  color: white;
  border: 1px solid var(--primary);
}

.nav-btn-primary:hover {
  background: var(--primary-dark);
}

.nav-btn-outline {
  background: transparent;
  border: 1px solid var(--border-mid);
  color: var(--text);
}

.nav-btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--primary-border);
}

/* User dropdown */
.user-menu-wrap {
  position: relative;
}

.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 5px;
  border-radius: 99px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .14s;
  background: transparent;
}

.user-menu-trigger:hover {
  background: var(--bg-subtle);
  border-color: var(--border);
}

.user-menu-chevron {
  color: var(--text-muted);
  transition: transform .2s;
  display: flex;
  align-items: center;
}

.user-menu-wrap.open .user-menu-chevron {
  transform: rotate(180deg);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(0, 0, 0, .1);
  min-width: 190px;
  z-index: 300;
  display: none;
  overflow: hidden;
}

.user-menu-wrap.open .user-dropdown {
  display: block;
}

.user-dropdown-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}

.user-dropdown-name {
  font-weight: 700;
  font-size: 14px;
  font-family: 'Kanit', sans-serif;
  color: var(--text);
}

.user-dropdown-email {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 1px;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13.5px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background .12s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: 'Kanit', sans-serif;
}

.user-dropdown-item:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

.user-dropdown-item.danger {
  color: var(--danger);
}

.user-dropdown-item.danger:hover {
  background: var(--danger-bg);
}

.user-dropdown-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 4px 0;
}


/* ── BUTTONS ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: all .14s;
  cursor: pointer;
  font-family: 'Kanit', sans-serif;
  letter-spacing: .01em;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-outline {
  background: white;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary-light);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--bg-subtle);
  color: var(--text);
}

.btn-sm {
  padding: 5px 14px;
  font-size: 12.5px;
}

.btn-lg {
  padding: 12px 28px;
  font-size: 15px;
}

.btn-block {
  width: 100%;
}

.btn-success {
  background: var(--success-bg);
  color: var(--success);
  border-color: #a8d9bc;
}

.btn-success:hover {
  background: #d0eedd;
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: #f7b8b5;
}

.btn-danger:hover {
  background: #fce0de;
}

.btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}


/* ── FORMS ── */

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
  font-family: 'Kanit', sans-serif;
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: white;
  transition: border-color .14s, box-shadow .14s;
  outline: none;
  font-family: 'Kanit', sans-serif;
}

.form-control:hover {
  border-color: var(--border-mid);
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232, 49, 42, .08);
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

/* Unit picker */
.unit-sel { position: relative; flex-shrink: 0; }
.unit-sel-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  height: 42px; padding: 0 11px 0 13px; min-width: 110px;
  background: white; border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm); cursor: pointer;
  font-family: 'Kanit', sans-serif; font-size: 14px; color: var(--text);
  white-space: nowrap; transition: border-color .14s, box-shadow .14s;
}
.unit-sel-btn:hover { box-shadow: 0 1px 4px rgba(0,0,0,.07); }
.unit-sel-btn.open,
.unit-sel-btn:focus  { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(232,49,42,.08); outline: none; }
.unit-sel-btn svg    { transition: transform .18s; color: var(--text-muted); }
.unit-sel-btn.open svg { transform: rotate(180deg); }
.unit-sel-drop {
  display: none; position: absolute; top: calc(100% + 5px); left: 0;
  min-width: 100%; background: white;
  border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,.13); padding: 4px; z-index: 9999;
}
.unit-sel-drop.open { display: block; }
.unit-sel-opt {
  padding: 8px 14px; border-radius: 7px; cursor: pointer;
  font-family: 'Kanit', sans-serif; font-size: 14px; color: var(--text);
  transition: background .1s; display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.unit-sel-opt:hover   { background: var(--bg-subtle); }
.unit-sel-opt.active  { color: var(--primary); font-weight: 600; }
.unit-sel-opt.active::after { content: '✓'; font-size: 12px; }

/* Styled file input */
.file-upload-wrap {
  position: relative;
  display: block;
}

.file-upload-wrap input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  width: 100%;
  height: 100%;
}

.file-upload-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1.5px dashed var(--border-mid);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  cursor: pointer;
  transition: all .14s;
  min-height: 42px;
}

.file-upload-wrap:hover .file-upload-btn {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}


/* ── BADGES ── */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  font-family: 'Kanit', sans-serif;
}

.badge-pending {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid #f5d98a;
}

.badge-active {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid #a8d9bc;
}

.badge-expired {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.badge-rejected {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid #f7b8b5;
}


/* ── ALERTS ── */

.alert {
  padding: 11px 15px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 14px;
}

.alert-error {
  background: var(--danger-bg);
  color: #8b1a16;
  border: 1px solid #f7b8b5;
}

.alert-success {
  background: var(--success-bg);
  color: #145036;
  border: 1px solid #a8d9bc;
}

.alert-warning {
  background: var(--warning-bg);
  color: #7a4900;
  border: 1px solid #f5d07a;
}

.card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 22px;
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 22px 0;
}


/* ── PAGE HEADER ── */

.page-header {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
  margin-bottom: 28px;
}

.page-header h2 {
  font-size: 20px;
  margin-bottom: 3px;
}

.page-header p {
  color: var(--text-muted);
  font-size: 13.5px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.breadcrumb a {
  color: var(--primary);
  cursor: pointer;
}

.breadcrumb a:hover {
  text-decoration: underline;
}


/* ── TABS ── */

.tab-nav {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
}

.tab-btn {
  padding: 10px 18px;
  border: none;
  background: none;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all .14s;
  font-family: 'Kanit', sans-serif;
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-btn:hover:not(.active) {
  color: var(--text);
}


/* ── MODAL ── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .42);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-box {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-head {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-head h3 {
  font-size: 16px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text);
}

.modal-body {
  padding: 22px;
}

.modal-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}


/* ── AUTOCOMPLETE ── */

.ac-wrap {
  position: relative;
}

.ac-input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
  background: white;
  outline: none;
  font-family: 'Kanit', sans-serif;
  transition: border-color .14s, box-shadow .14s;
}

.ac-input:hover {
  border-color: var(--border-mid);
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
}

.ac-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232, 49, 42, .08);
}

.ac-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.ac-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
  z-index: 50;
  max-height: 220px;
  overflow-y: auto;
  display: none;
}

.ac-dropdown.open {
  display: block;
}

.ac-option {
  padding: 9px 14px;
  font-size: 14px;
  cursor: pointer;
  transition: background .1s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ac-option:hover,
.ac-option.focused {
  background: var(--primary-light);
  color: var(--primary);
}

.ac-option-count {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: auto;
}


/* ── MULTI-SELECT DISTRICTS ── */

.ms-wrap {
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  background: white;
  min-height: 42px;
  max-height: 180px;
  overflow-y: auto;
  padding: 6px 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  cursor: text;
  transition: border-color .14s, box-shadow .14s;
}

.ms-wrap:hover {
  border-color: var(--border-mid);
  box-shadow: 0 1px 4px rgba(0,0,0,.07);
}

.ms-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232, 49, 42, .08);
}

.ms-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  border-radius: 99px;
  padding: 2px 10px 2px 10px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.ms-tag button {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  opacity: .7;
}

.ms-tag button:hover {
  opacity: 1;
}

.ms-input {
  border: none;
  outline: none;
  font-size: 13px;
  font-family: 'Kanit', sans-serif;
  min-width: 100px;
  flex: 1;
  padding: 2px 4px;
  background: transparent;
  color: var(--text);
}

/* contenteditable replacement for <input> — immune to Chrome autofill */
.ms-ce {
  cursor: text;
  white-space: nowrap;
  overflow: hidden;
  line-height: 1.6;
  text-align: left;
}
.ms-ce:empty::before {
  content: attr(data-placeholder);
  color: var(--text-muted);
  pointer-events: none;
}

.ms-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
  z-index: 50;
  max-height: 200px;
  overflow-y: auto;
  display: none;
}

.ms-dropdown.open {
  display: block;
}

.ms-option {
  padding: 9px 14px;
  font-size: 13.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ms-option:hover {
  background: var(--primary-light);
}

.ms-option.selected {
  color: var(--primary);
  font-weight: 600;
}

.ms-option .ms-check {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border-mid);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .14s;
}

.ms-option.selected .ms-check {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  font-size: 10px;
}


/* ── HOME ── */

.hero {
  background: #fff;
  padding: 64px 0 56px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.hero-eyebrow {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--primary-border);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 16px;
  border-radius: 99px;
  margin-bottom: 18px;
  letter-spacing: .5px;
  text-transform: uppercase;
  font-family: 'Kanit', sans-serif;
}

.hero h1 {
  font-size: clamp(26px, 4.5vw, 44px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -.5px;
}

.hero h1 em {
  color: var(--primary);
  font-style: normal;
}

.hero-sub {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.search-box {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 32px;
  max-width: 640px;
  margin: 0 auto;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .04), 0 4px 16px rgba(0, 0, 0, .04);
}

.search-box-title {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 16px;
  font-family: 'Kanit', sans-serif;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.prov-filter-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-family: 'Kanit', sans-serif;
  color: var(--text-secondary);
  cursor: pointer;
  margin-bottom: 14px;
  transition: border-color .15s, color .15s, background .15s, box-shadow .15s;
}

.prov-filter-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 1px 4px rgba(232,49,42,.08);
}

/* ── CUSTOM SELECT ── */

.cs-wrap {
  position: relative;
}

.cs-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: 'Kanit', sans-serif;
  background: var(--bg-surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color .14s, box-shadow .14s, background .14s;
  user-select: none;
  text-align: left;
}

.cs-trigger:hover {
  border-color: var(--primary);
  box-shadow: 0 1px 4px rgba(232,49,42,.06);
  background: var(--primary-light);
}

.cs-wrap.open .cs-trigger {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(232,49,42,.08);
}

.cs-chevron {
  transition: transform .2s;
  flex-shrink: 0;
  color: var(--text-muted);
}

.cs-wrap.open .cs-chevron {
  transform: rotate(180deg);
}

.cs-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  z-index: 200;
  overflow: hidden;
}

.cs-wrap.open .cs-dropdown {
  display: block;
}

.cs-option {
  padding: 9px 14px;
  font-size: 14px;
  font-family: 'Kanit', sans-serif;
  cursor: pointer;
  transition: background .1s, color .1s;
}

.cs-option:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.cs-option.selected {
  color: var(--primary);
  font-weight: 600;
}


/* Event tags strip */
.event-strip {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.event-chip {
  display: inline-flex;
  align-items: center;
  background: white;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  padding: 5px 16px;
  border-radius: 99px;
  letter-spacing: .02em;
  transition: all .14s;
}

.event-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}


/* Featured shops */
.home-section {
  padding: 56px 0;
}

.home-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
}

.home-section-header h2 {
  font-size: 22px;
}

.home-section-header a {
  font-size: 13.5px;
  color: var(--primary);
  cursor: pointer;
}

.home-section-header a:hover {
  text-decoration: underline;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* Popular provinces */
.pop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.pop-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: pointer;
  transition: all .14s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pop-card:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.pop-card .count {
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 2px 8px;
  border-radius: 99px;
  border: 1px solid var(--border);
}

/* CTA section */
.cta-section {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  padding: 56px 0;
  text-align: center;
}

.cta-section h2 {
  font-size: 26px;
  margin-bottom: 8px;
}

.cta-section p {
  color: var(--text-secondary);
  font-size: 15px;
  margin-bottom: 28px;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}


/* ── SHOP LIST + FILTER ── */

.shops-wrap {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding-bottom: 48px;
  align-items: start;
}

.filter-panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  position: sticky;
  top: 80px;
  z-index: 5;
  overflow: visible;
}

.filter-panel h4 {
  font-size: 14px;
  font-family: 'Kanit', sans-serif;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-panel h4 a {
  font-size: 12px;
  color: var(--primary);
  cursor: pointer;
  font-weight: 400;
}

.filter-section {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.filter-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 9px;
  font-family: 'Kanit', sans-serif;
  text-transform: uppercase;
  letter-spacing: .4px;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--text-secondary);
}

.filter-option input[type=checkbox] {
  width: 15px;
  height: 15px;
  accent-color: var(--primary);
  cursor: pointer;
}

.filter-option:hover {
  color: var(--text);
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-pill {
  padding: 5px 12px;
  border: 1px solid var(--border-mid);
  border-radius: 20px;
  background: white;
  font-size: 12.5px;
  font-family: 'Kanit', sans-serif;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .14s;
  white-space: nowrap;
}

.filter-pill:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
}

.filter-toggle-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--text-secondary);
  align-items: center;
  border-radius: 6px;
}

.shops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}


/* ── SHOP CARD ── */

.shop-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color .15s, transform .15s, box-shadow .15s;
  cursor: pointer;
}

.shop-card:hover {
  border-color: var(--primary-border);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
}

.shop-img {
  width: 100%;
  height: 165px;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.shop-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-body {
  padding: 14px 16px;
}

.shop-body h3 {
  font-size: 15px;
  margin-bottom: 4px;
  font-weight: 600;
}

.shop-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.shop-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

.shop-pills {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.shop-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 2px 9px;
  font-size: 11.5px;
  color: var(--text-muted);
}


/* ── SHOP PROFILE ── */

.page#page-shop {
  background: linear-gradient(180deg, #fff5f5 0%, #ffffff 280px);
}

.shop-profile {
  max-width: 840px;
  margin: 0 auto;
  padding-bottom: 80px;
}

.profile-hero {
  width: calc(100% + 48px);
  margin-left: -24px;
  height: 300px;
  background: var(--bg-subtle);
  border-radius: 0 0 20px 20px;
  overflow: visible;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-hero > img,
.profile-hero > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0 0 20px 20px;
}

.profile-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-hero-no-img {
  background: linear-gradient(135deg, #e8312a 0%, #ff7043 55%, #ffb347 100%);
}

.profile-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,.08) 0%, transparent 35%, rgba(0,0,0,.62) 100%);
}

.profile-hero-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 24px 22px;
  z-index: 2;
}

.profile-hero-location {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 99px;
  padding: 3px 11px;
  font-size: 12px;
  color: white;
  font-weight: 500;
  margin-bottom: 7px;
}

.profile-hero-name {
  font-size: 26px;
  font-weight: 700;
  color: white;
  text-shadow: 0 1px 10px rgba(0,0,0,.35);
  line-height: 1.2;
  margin-bottom: 5px;
}

.profile-hero-phone {
  font-size: 13px;
  color: rgba(255,255,255,.85);
  font-weight: 400;
}

.gallery-thumbs {
  display: flex;
  gap: 7px;
  padding: 10px 0 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.gallery-thumbs::-webkit-scrollbar { display: none; }

.gallery-thumb-item {
  width: 76px;
  height: 60px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .14s;
  flex-shrink: 0;
}

.gallery-thumb-item.active {
  border-color: var(--primary);
}

.gallery-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Shop profile info card (food-app style white card overlapping hero) ── */

.profile-info-card {
  background: white;
  border-radius: 20px 20px 0 0;
  margin-top: -22px;
  position: relative;
  z-index: 5;
  padding: 0 20px 0;
  box-shadow: 0 -4px 24px rgba(0,0,0,.1);
  margin-left: -24px;
  margin-right: -24px;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: 18px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 4px solid white;
  box-shadow: 0 12px 40px rgba(0,0,0,.32), 0 0 0 3px rgba(232,49,42,.25);
  position: absolute;
  bottom: -36px;
  left: 24px;
  z-index: 10;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-card-body {
  padding: 12px 0 16px;
  padding-left: 112px;
  border-bottom: 1px solid var(--border);
  min-height: 72px;
}

.shop-card-name-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
}

.shop-card-name {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

.shop-card-location {
  font-size: 13px;
  color: var(--text-muted);
}

.shop-action-row {
  display: flex;
  gap: 8px;
  padding: 14px 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.shop-action-row::-webkit-scrollbar { display: none; }

.shop-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: white;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  font-family: Kanit, sans-serif;
  transition: all .14s;
}
.shop-action-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.shop-action-line:hover { border-color: #06c755; color: #06c755; background: #f0fff5; }
.shop-action-fb:hover   { border-color: #1877f2; color: #1877f2; background: #eff6ff; }
.shop-action-map:hover  { border-color: #16a34a; color: #16a34a; background: #f0fdf4; }

/* ── Service chips ── */
.svc-chips-row {
  display: flex;
  gap: 8px;
  padding: 16px 0 20px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  margin-left: -24px;
  margin-right: -24px;
  padding-left: 24px;
  padding-right: 24px;
}
.svc-chips-row::-webkit-scrollbar { display: none; }

.svc-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: var(--bg-subtle);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  color: var(--text-secondary);
  text-decoration: none;
  font-family: Kanit, sans-serif;
  transition: opacity .14s;
}
a.svc-chip:hover { opacity: .75; }
.svc-chip-orange { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.svc-chip-green  { background: #f0fdf4; border-color: #bbf7d0; color: #16a34a; }
.svc-chip-blue   { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.svc-chip-red    { background: #fff5f5; border-color: #fecaca; color: #dc2626; }

.contact-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.location-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  border-radius: 99px;
  padding: 4px 12px;
  font-size: 12px;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 6px;
}

/* Feature pills */
.feature-pills-bar {
  display: flex;
  gap: 10px;
  border: none;
  overflow: visible;
  margin-bottom: 26px;
  background: transparent;
}

.feature-pill-item {
  flex: 1;
  min-width: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 10px;
  gap: 8px;
  border-right: none;
  text-align: center;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: white;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  transition: transform .15s, box-shadow .15s;
}

.feature-pill-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.1);
}

.feature-pill-icon-box {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #d4f5e2 0%, #a8ecc4 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #16a34a;
}

.feature-pill-icon-box.orange {
  background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
  color: #c2410c;
}

.feature-pill-icon-box.blue {
  background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 100%);
  color: #1d4ed8;
}

.feature-pill-label {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

.feature-pill-value {
  font-size: 15px;
  font-weight: 700;
  font-family: 'Kanit', sans-serif;
  color: var(--text);
  line-height: 1.2;
}

.profile-section {
  margin-bottom: 30px;
}

.profile-section h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.profile-section h3::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--primary);
  border-radius: 99px;
}


.profile-section-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 1px 9px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 9px;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: white;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  color: var(--text);
  font-family: 'Kanit', sans-serif;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
}

.contact-btn:hover {
  border-color: var(--primary-border);
  background: var(--primary-light);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(232,49,42,.1);
  transform: translateY(-1px);
}

.contact-btn-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
  background: var(--bg-subtle);
}

.contact-btn-body small {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

.contact-btn-phone:hover { border-color: var(--primary-border); background: var(--primary-light); }
.contact-btn.line-btn .contact-btn-icon { font-weight: 700; font-size: 11px; color: #057a34; font-family: Kanit, sans-serif; }
.contact-btn.line-btn:hover { border-color: #06c755; background: #f0fff5; }
.contact-btn.fb-btn .contact-btn-icon { font-weight: 700; font-size: 11px; color: #1877f2; font-family: Kanit, sans-serif; }
.contact-btn.fb-btn:hover { border-color: #1877f2; background: #eff6ff; }

.info-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row-icon {
  width: 26px;
  text-align: center;
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 15px;
}

.info-row-label {
  font-size: 11.5px;
  color: var(--text-muted);
}

.info-row-value {
  font-weight: 600;
  font-size: 14px;
}


/* ── AUTH ── */

.auth-wrap {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: white;
}

.auth-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 32px;
  width: 100%;
  max-width: 420px;
}

.auth-card h2 {
  font-size: 20px;
  margin-bottom: 5px;
}

.auth-card > p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.auth-switch {
  text-align: center;
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.auth-switch a {
  color: var(--primary);
  cursor: pointer;
  font-weight: 600;
}


/* ── DASHBOARD ── */

.dash-wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.dash-header h2 {
  font-size: 20px;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 18px 20px;
}

.stat-card-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: 6px;
  font-family: 'Kanit', sans-serif;
}

.stat-card-num {
  font-size: 28px;
  font-weight: 700;
  font-family: 'Kanit', sans-serif;
  color: var(--text);
  line-height: 1;
  margin-bottom: 2px;
}

.stat-card-sub {
  font-size: 12px;
  color: var(--text-muted);
}

.stat-card-primary .stat-card-num {
  color: var(--primary);
}

.stat-card-success .stat-card-num {
  color: var(--success);
}

.contact-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}

.contact-stat-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  text-align: center;
}

.contact-stat-num {
  font-size: 22px;
  font-weight: 700;
  font-family: 'Kanit', sans-serif;
  color: var(--text);
}

.contact-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}


/* ── TABLE ── */

.table-wrap {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead {
  background: var(--bg-subtle);
}

th {
  padding: 11px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .4px;
  font-family: 'Kanit', sans-serif;
}

td {
  padding: 13px 14px;
  font-size: 13.5px;
  border-top: 1px solid var(--border);
}

tr:hover td {
  background: var(--bg-surface);
}

.td-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}


/* ── PROVINCE / DISTRICT ── */

.region-accordion {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 10px;
  background: var(--bg);
  overflow: hidden;
}
.region-accordion-hd {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: Kanit, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  transition: background .15s;
}
.region-accordion-hd:hover { background: var(--bg-subtle); }
.region-accordion-name { flex: 1; }
.region-accordion-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
}
.region-accordion-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform .2s;
}
.region-accordion.open .region-accordion-chevron { transform: rotate(180deg); }
.region-accordion-body { display: none; padding: 0 14px 14px; }
.region-accordion.open .region-accordion-body { display: block; }
.province-btn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.province-btn {
  padding: 9px 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: Kanit, sans-serif;
  font-size: 13.5px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: all .15s;
  font-weight: 400;
  line-height: 1.3;
}
.province-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}
@media (max-width: 640px) {
  .province-btn-grid { grid-template-columns: repeat(2, 1fr); }
}

.district-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
  padding-bottom: 48px;
}

.district-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 18px;
  cursor: pointer;
  transition: all .14s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.district-card:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}


/* ── EMPTY STATE ── */

.empty {
  text-align: center;
  padding: 56px 20px;
  color: var(--text-muted);
}

.empty-icon {
  width: 56px;
  height: 56px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty h3 {
  font-size: 17px;
  color: var(--text);
  margin-bottom: 7px;
}


/* ── FOOTER ── */

footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  padding: 36px 0 28px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13.5px;
}

footer strong {
  display: block;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 5px;
  font-family: 'Kanit', sans-serif;
}


/* ── EDIT MODAL ── */

.edit-modal-box {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 960px;
  display: flex;
  flex-direction: column;
  height: 90vh;
}


/* ── ADMIN ── */

.admin-stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.admin-stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  border-left: 3px solid var(--border);
}

.admin-stat-card.accent-red {
  border-left-color: var(--primary);
}

.admin-stat-card.accent-green {
  border-left-color: var(--success);
}

.admin-stat-card.accent-orange {
  border-left-color: var(--warning);
}

.admin-stat-card.accent-blue {
  border-left-color: #1a6bb5;
}


/* ── RESPONSIVE ── */

@media (max-width: 768px) {
  .shops-wrap {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
    margin-bottom: 16px;
    padding: 12px 14px;
  }

  .filter-panel h4 {
    margin-bottom: 0;
  }

  .filter-panel.filter-open h4 {
    margin-bottom: 10px;
  }

  .filter-section {
    margin-bottom: 10px;
    padding-bottom: 10px;
  }

  .filter-label {
    margin-bottom: 6px;
    font-size: 11px;
  }

  .filter-pill {
    padding: 4px 10px;
    font-size: 12px;
  }

  .ms-wrap {
    min-height: 34px;
    padding: 4px 6px;
  }

  .filter-toggle-btn {
    display: inline-flex;
  }

  #filterPanelBody {
    display: none;
  }

  .filter-panel.filter-open #filterPanelBody {
    display: block;
  }

  .filter-panel.filter-open .filter-toggle-btn svg {
    transform: rotate(180deg);
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 48px 0 40px;
  }

  .feature-pills-bar {
    flex-direction: column;
  }

  .feature-pill-item {
    border-right: none;
    border-bottom: 1px solid var(--border);
    flex-direction: row;
    text-align: left;
    padding: 12px 16px;
  }

  .feature-pill-item:last-child {
    border-bottom: none;
  }
}

/* ═══════════════════════════════════════════
   HAMBURGER NAV + MOBILE MENU
═══════════════════════════════════════════ */

.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 7px 5px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  transition: background .12s;
}
.nav-hamburger:hover { background: var(--bg-subtle); }
.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav-hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: white;
  z-index: 299;
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
  border-bottom: 1px solid var(--border);
  padding: 8px 0 14px;
}
.mobile-menu.open { display: block; }

.mobile-menu-user {
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.mobile-menu-user-name {
  font-size: 15px;
  font-weight: 600;
  font-family: 'Kanit', sans-serif;
  color: var(--text);
}
.mobile-menu-user-phone {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 3px;
}
.mobile-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 13px 20px;
  background: none;
  border: none;
  font-size: 15px;
  font-family: 'Kanit', sans-serif;
  color: var(--text);
  cursor: pointer;
  transition: background .1s;
}
.mobile-menu-item:active,
.mobile-menu-item:hover { background: var(--bg-subtle); }
.mobile-menu-item.primary { color: var(--primary); font-weight: 600; }
.mobile-menu-item.danger  { color: #e8312a; }
.mobile-menu-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 4px 0;
}

@media (max-width: 640px) {
  .nav-hamburger { display: flex; }

  .nav-inner { justify-content: flex-start; }
  #navLinks   { margin-left: auto; }
  #navAuth    { margin-left: auto; }

  /* Move login/register to mobile menu */
  #navLinks .nav-btn-outline,
  #navLinks .nav-btn-primary { display: none; }

  .nav-btn-ghost { display: none; }

  .profile-hero { height: 220px; }
  .profile-avatar { width: 80px; height: 80px; bottom: -30px; border-radius: 14px; }
  .shop-card-body { padding-left: 96px; min-height: 60px; }
  .shop-card-name { font-size: 18px; }
  .feature-pills-bar { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; flex-wrap: nowrap; }
  .feature-pills-bar::-webkit-scrollbar { display: none; }
  .feature-pill-item { min-width: 100px; }
  .feature-pill-item:hover { transform: none; box-shadow: 0 2px 10px rgba(0,0,0,.06); }
  .contact-btn:hover { transform: none; box-shadow: none; }
  .edit-modal-box { max-width: 100%; }
}

/* ═══════════════════════════════════════════
   BLOG — list + article pages
═══════════════════════════════════════════ */

/* ── Blog list cards ── */

.blog-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.blog-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: stretch;
  transition: box-shadow .18s, border-color .18s, transform .18s;
}

.blog-card:hover {
  box-shadow: 0 6px 24px rgba(0,0,0,.08);
  border-color: var(--primary-border);
  transform: translateY(-2px);
}

.blog-card-img {
  width: 220px;
  flex-shrink: 0;
  overflow: hidden;
}

.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}

.blog-card:hover .blog-card-img img {
  transform: scale(1.04);
}

.blog-card-body {
  flex: 1;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.blog-card-cat {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  border-radius: 99px;
  padding: 2px 10px;
  margin-bottom: 14px;
  letter-spacing: .3px;
}

.blog-card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 10px;
}

.blog-card-sub {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 18px;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--text-muted);
}

.blog-card-more {
  color: var(--primary);
  font-weight: 500;
}

/* ── Article layout ── */

.article-layout {
  max-width: 720px;
  margin: 0 auto;
}

.article-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.article-breadcrumb a {
  color: var(--text-muted);
  cursor: pointer;
}

.article-breadcrumb a:hover {
  color: var(--primary);
}

.article-breadcrumb span {
  color: var(--border-mid);
}

/* ── ArticleHeader component ── */

.article-header {
  margin-bottom: 40px;
}

.article-category {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  border-radius: 99px;
  padding: 3px 12px;
  margin-bottom: 18px;
  letter-spacing: .3px;
}

.article-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 16px;
}

.article-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 20px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

.article-meta-date {
  display: flex;
  align-items: center;
  gap: 5px;
}

.article-meta-cat {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 2px 10px;
  font-size: 12px;
}

/* ── Article cover image ── */

.article-cover {
  margin-top: 28px;
  border-radius: var(--radius);
  overflow: hidden;
  height: 360px;
}

.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── ArticleContent component ── */

.article-body {
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--text-secondary);
  margin-bottom: 48px;
}

.article-body h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin: 36px 0 14px;
}

.article-body h3 {
  font-size: 16.5px;
  font-weight: 600;
  color: var(--text);
  margin: 24px 0 10px;
}

.article-body p {
  margin-bottom: 18px;
}

.article-body ul {
  padding-left: 20px;
  margin-bottom: 18px;
}

.article-body ul li {
  margin-bottom: 8px;
}

.article-body strong {
  color: var(--text);
  font-weight: 600;
}

/* ── CTASection component ── */

.article-cta-section {
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius);
  padding: 36px 40px;
  text-align: center;
  margin-bottom: 40px;
}

.article-cta-icon {
  width: 56px;
  height: 56px;
  background: white;
  border: 1px solid var(--primary-border);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.article-cta-section h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.article-cta-section p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

/* ── Internal links / related ── */

.article-related {
  border-top: 1px solid var(--border);
  padding-top: 32px;
  margin-bottom: 16px;
}

.article-related-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 16px;
}

.article-related-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.article-related-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.article-related-card:hover {
  border-color: var(--primary-border);
  background: var(--primary-light);
}

.article-related-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.article-related-link {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--primary);
}

/* ── Pagination ── */

.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-btn {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--text-secondary);
  font-size: 13.5px;
  font-family: 'Kanit', sans-serif;
  cursor: pointer;
  transition: all .14s;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.page-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
}

.page-num {
  padding: 8px 13px;
  min-width: 38px;
}

.page-num.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  font-weight: 600;
}

.page-num.active:hover {
  background: var(--primary-dark);
}

.page-ellipsis {
  padding: 8px 4px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ── Responsive ── */

@media (max-width: 600px) {
  .blog-card {
    flex-direction: column;
  }

  .blog-card-img {
    width: 100%;
    height: 180px;
  }

  .blog-card-body {
    padding: 18px 20px 22px;
  }

  .article-cover {
    height: 220px;
  }

  .article-title {
    font-size: 22px;
  }

  .article-subtitle {
    font-size: 14.5px;
  }

  .article-body {
    font-size: 14.5px;
  }

  .article-cta-section {
    padding: 28px 20px;
  }
}


/* ══════════════════════════════════════════
   ADMIN v2
══════════════════════════════════════════ */

#page-admin.active {
  display: flex;
  background: #f1f5f9;
  min-height: calc(100vh - 64px);
}

/* ── Sidebar ── */
.adm-sidebar {
  width: 224px;
  flex-shrink: 0;
  background: linear-gradient(160deg, #1e1b4b 0%, #312e81 55%, #4338ca 100%);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}

.adm-sidebar-hd {
  padding: 22px 18px 18px;
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.adm-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.2px;
}

.adm-brand-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a5b4fc;
  flex-shrink: 0;
}

.adm-brand-sub {
  font-size: 11px;
  color: rgba(165,180,252,.6);
  margin-top: 3px;
}

.adm-nav-list {
  flex: 1;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.adm-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 8px;
  border: none;
  background: none;
  color: #c7d2fe;
  font-size: 13px;
  font-family: Kanit, sans-serif;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background .15s, color .15s;
  position: relative;
}

.adm-nav-item:hover {
  background: rgba(255,255,255,.1);
  color: #e0e7ff;
}

.adm-nav-item.active {
  background: rgba(255,255,255,.18);
  color: #1e1b4b;
}

.adm-nav-item.active .adm-nav-ic {
  color: #a5b4fc;
}

.adm-nav-ic {
  flex-shrink: 0;
  color: rgba(165,180,252,.8);
  display: flex;
  align-items: center;
  transition: color .15s;
}

.adm-nav-item:hover .adm-nav-ic {
  color: rgba(199,210,254,.8);
}

.adm-nav-badge {
  margin-left: auto;
  background: #f59e0b;
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 99px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.adm-sidebar-ft {
  padding: 14px 10px;
  border-top: 1px solid rgba(255,255,255,.12);
}

.adm-sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.adm-sidebar-av {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255,255,255,.15);
  color: #e0e7ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.adm-sidebar-ui { min-width: 0; }

.adm-sidebar-un {
  font-size: 12.5px;
  font-weight: 600;
  color: #e0e7ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adm-sidebar-ur {
  font-size: 10.5px;
  color: rgba(165,180,252,.6);
}

/* ── Main content ── */
.adm-main {
  flex: 1;
  overflow-y: auto;
  min-width: 0;
}

.adm-dash {
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ── Top bar ── */
.adm-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.adm-title {
  font-size: 21px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  font-family: Kanit, sans-serif;
  letter-spacing: -.3px;
}

.adm-subtitle {
  font-size: 13px;
  color: #64748b;
  margin: 3px 0 0;
}

/* ── Period pills ── */
.adm-pbar {
  display: flex;
  align-items: center;
  gap: 4px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 4px;
}

.adm-plbl {
  font-size: 11.5px;
  color: #94a3b8;
  padding: 0 6px;
  white-space: nowrap;
}

.adm-ppill {
  padding: 6px 14px;
  border-radius: 7px;
  border: none;
  background: none;
  color: #64748b;
  font-size: 12.5px;
  font-family: Kanit, sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}

.adm-ppill.on {
  background: #6366f1;
  color: white;
  font-weight: 600;
}

.adm-ppill:hover:not(.on) {
  background: #f1f5f9;
  color: #334155;
}

/* ── Date picker ── */
.adm-date-sep {
  display: inline-block;
  width: 1px;
  height: 18px;
  background: #e2e8f0;
  margin: 0 4px;
  vertical-align: middle;
}

.adm-date-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 7px;
  border: 1.5px solid #e2e8f0;
  background: white;
  color: #94a3b8;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}

.adm-date-wrap.on {
  border-color: #6366f1;
  color: #6366f1;
  background: #eef2ff;
  box-shadow: 0 0 0 3px rgba(99,102,241,.10);
}

.adm-date-input {
  border: none;
  background: transparent;
  font-size: 12.5px;
  font-family: Kanit, sans-serif;
  color: inherit;
  cursor: pointer;
  outline: none;
  width: 112px;
}

.adm-date-clear {
  border: none;
  background: none;
  padding: 0 2px;
  font-size: 16px;
  line-height: 1;
  color: #6366f1;
  cursor: pointer;
  opacity: .7;
  transition: opacity .15s;
}
.adm-date-clear:hover { opacity: 1; }

/* ── KPI grid (LINE broadcast page) ── */
.adm-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

/* ── KPI groups (dashboard) ── */
.adm-kpi-groups {
  display: flex;
  gap: 10px;
}

.adm-kpi-group {
  flex: 2;
  min-width: 0;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 12px 12px;
}

.adm-kpi-group.adm-kpi-group-lg {
  flex: 3;
}

.adm-kpi-glabel {
  font-size: 9.5px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .7px;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}

.adm-kpi-grow {
  display: flex;
  gap: 8px;
}

.adm-kpi-grow .adm-kpi-card {
  flex: 1;
  min-width: 0;
  background: #f8fafc;
  border-color: #f1f5f9;
  border-radius: 10px;
  padding: 12px 10px 10px;
}

.adm-kpi-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-top: 3px solid var(--kc, #e2e8f0);
  border-radius: 12px;
  padding: 16px 14px 14px;
  transition: box-shadow .15s, transform .15s;
}

.adm-kpi-click {
  cursor: pointer;
}

.adm-kpi-click:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.08);
}

.adm-kpi-ic {
  margin-bottom: 10px;
}

.adm-kpi-num {
  font-size: 26px;
  font-weight: 700;
  color: #0f172a;
  font-family: Kanit, sans-serif;
  line-height: 1;
  margin-bottom: 5px;
}

.adm-kpi-lbl {
  font-size: 10.5px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 3px;
}

.adm-kpi-sub {
  font-size: 11px;
  color: #94a3b8;
}

/* ── Card ── */
.adm-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
}

.adm-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.adm-card-hd {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.adm-card-title {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  font-family: Kanit, sans-serif;
}

.adm-card-sub {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 2px;
}

.adm-legend {
  display: flex;
  align-items: center;
  font-size: 11.5px;
  color: #64748b;
}

.adm-ldot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  display: inline-block;
  margin-right: 4px;
}

/* ── Horizontal bars ── */
.adm-hbars {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.adm-hbar-r {
  display: flex;
  align-items: center;
  gap: 10px;
}

.adm-hbar-lbl {
  font-size: 12px;
  color: #334155;
  width: 90px;
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adm-hbar-trk {
  flex: 1;
  height: 6px;
  background: #f1f5f9;
  border-radius: 99px;
  overflow: hidden;
}

.adm-hbar-f {
  height: 100%;
  border-radius: 99px;
  transition: width .4s ease;
}

.adm-hbar-v {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  min-width: 28px;
  text-align: right;
  white-space: nowrap;
}

.adm-hbar-pct {
  font-size: 10px;
  font-weight: 400;
  color: #cbd5e1;
  margin-left: 4px;
}

.adm-ch-total {
  margin-top: 10px;
  font-size: 11.5px;
  color: #94a3b8;
}

.adm-empty-sm {
  padding: 20px 0;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

/* ── Recent list ── */
.adm-recent {
  display: flex;
  flex-direction: column;
}

.adm-rec-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f8fafc;
}

.adm-rec-row:last-child { border-bottom: none; }

.adm-rec-av {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.adm-rec-info { flex: 1; min-width: 0; }

.adm-rec-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adm-rec-meta {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 1px;
}

.adm-spill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
}

.adm-btn-ok {
  padding: 5px 12px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 7px;
  color: #059669;
  font-size: 12px;
  font-family: Kanit, sans-serif;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}

.adm-btn-ok:hover { background: #d1fae5; }

.adm-btn-no {
  padding: 5px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 7px;
  color: #dc2626;
  font-size: 12px;
  font-family: Kanit, sans-serif;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}

.adm-btn-no:hover { background: #fee2e2; }

.adm-btn-ghost {
  padding: 5px 12px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  color: #64748b;
  font-size: 12px;
  font-family: Kanit, sans-serif;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}

.adm-btn-ghost:hover { background: #f8fafc; }

/* ── Approval subtabs ── */
.adm-stab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  background: white;
  color: #64748b;
  font-size: 13px;
  font-family: Kanit, sans-serif;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}

.adm-stab.on {
  border-color: #6366f1;
  background: #eef2ff;
  color: #6366f1;
}

.adm-inline-badge {
  background: #f59e0b;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 99px;
}

/* ── Table ── */
.adm-tbl-wrap {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  overflow-x: auto;
}

.adm-tbl {
  width: 100%;
  border-collapse: collapse;
}

.adm-tbl th {
  background: #f8fafc;
  padding: 10px 14px;
  text-align: left;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: #94a3b8;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.adm-tbl td {
  padding: 12px 14px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
  vertical-align: middle;
}

.adm-tbl tr:last-child td { border-bottom: none; }

.adm-tbl tr:hover td { background: #fafbfc; }

.adm-tbl-name {
  font-weight: 600;
  color: #1e293b;
  font-size: 13.5px;
}

.adm-tbl-date {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 1px;
}

/* ── Empty states ── */
.adm-empty-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 48px 24px;
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  color: #94a3b8;
  font-size: 14px;
}

/* ── Responsive ── */
@media (max-width: 1200px) {
  .adm-kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .adm-row2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .adm-sidebar {
    width: 56px;
  }
  .adm-nav-item span:not(.adm-nav-ic):not(.adm-nav-badge) {
    display: none;
  }
  .adm-brand-sub,
  .adm-sidebar-ui,
  .adm-plbl {
    display: none;
  }
  .adm-brand {
    justify-content: center;
  }
  .adm-dash {
    padding: 16px 14px;
  }
  .adm-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
