/* ===================================================================
   GW Project — Theme tokens
   โทนสีเขียวหลัก + แดง (ถอน/ออกจากระบบ) + น้ำเงินเข้ม (แบนเนอร์ตลาดการเงิน)
   =================================================================== */
:root {
  --green-900: #0F5132;
  --green-700: #14603D;
  --green-600: #1B7A4E;
  --green-500: #219C5F;
  --green-100: #E7F5EC;
  --green-50:  #F2FAF5;
  --green-vivid-1: #1C8055;
  --green-vivid-2: #0F5C3B;

  --red-600: #DC3B3B;
  --red-500: #E5514F;
  --red-100: #FCEBEA;

  --navy-800: #17233F;
  --navy-600: #24345C;

  --ink-900: #14181A;
  --ink-700: #3A4340;
  --ink-500: #6E7772;
  --ink-300: #A7AEAA;

  --bg-app: #F1F4F2;
  --bg-card: #FFFFFF;
  --border: #EAEEEB;

  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 3px rgba(20, 30, 25, 0.06), 0 8px 20px -12px rgba(20, 30, 25, 0.12);

  --font-display: 'Kanit', 'Noto Sans Thai', sans-serif;
  --font-body: 'Noto Sans Thai', 'Kanit', sans-serif;
}

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

html, body { height: auto; }

body {
  font-family: var(--font-body);
  background: var(--bg-app);
  color: var(--ink-900);
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; cursor: pointer; background: none; border: none; color: inherit; }
svg { width: 100%; height: 100%; display: block; }

/* ===================== App shell ===================== */
.app-shell {
  display: flex;
  justify-content: center;
}

.app-frame {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  background: var(--bg-app);
  display: flex;
  flex-direction: column;
  position: relative;
}

/* ===================== Header ===================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 18px 20px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-header__title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  color: var(--ink-900);
  flex: 1;
}

.header-back {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--ink-700);
}
.header-back:hover { background: var(--green-50); }
.header-back svg { width: 20px; height: 20px; }

.lang-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-700);
  flex-shrink: 0;
}
.lang-pill svg { width: 15px; height: 15px; }

/* ===================== Content / pages ===================== */
.app-content {
  flex: 1;
  padding: 16px 16px 96px;
}

.page { display: none; flex-direction: column; gap: 18px; }
#page-market-room.page.active { gap: 10px; }
.page.active { display: flex; }

.section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-500);
  margin: 4px 2px -6px;
}

.section-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink-500);
  text-transform: uppercase;
  margin: 4px 2px -4px;
}
.section-eyebrow i {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ===================== Generic pill button ===================== */
.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.pill-btn--soft { background: var(--green-100); color: var(--green-700); }
.pill-btn--sm { padding: 4px 12px; }
.pill-btn--verified {
  background: rgba(255,255,255,0.16);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
}
.pill-btn--verified svg { width: 13px; height: 13px; }
.pill-btn--outline-light {
  background: rgba(255,255,255,0.14);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
  font-family: var(--font-display);
  letter-spacing: 0.02em;
}

/* ===================== หน้าหลัก: Rates card ===================== */
.rates-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border-top: 3px solid var(--green-500);
  box-shadow: var(--shadow-card);
  padding: 18px 22px 6px;
}

.rates-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.rates-card__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 3px;
}

.rates-card__meta { font-size: 12.5px; color: var(--ink-500); }

.rates-table__head {
  display: grid;
  grid-template-columns: 1fr 74px 74px;
  padding: 0 4px 8px;
  font-size: 12px;
  color: var(--ink-500);
}
.rates-table__head span:nth-child(2),
.rates-table__head span:nth-child(3) { text-align: right; }

.rate-row {
  display: grid;
  grid-template-columns: 1fr 74px 74px;
  align-items: center;
  padding: 12px 4px;
  border-top: 1px solid var(--border);
}
.rate-row.is-highlight {
  background: var(--green-50);
  margin: 0 -22px;
  padding-left: 26px;
  padding-right: 26px;
}

.rate-row__currency { display: flex; align-items: center; gap: 10px; }
.rate-row__flag { font-size: 22px; line-height: 1; }
.rate-row__code { font-weight: 700; font-size: 14.5px; }
.rate-row__name { font-size: 12px; color: var(--ink-500); margin-top: 1px; }

.rate-row__buy { text-align: right; font-weight: 700; font-size: 15px; color: var(--ink-900); }
.rate-row__sell { text-align: right; font-weight: 700; font-size: 15px; color: var(--green-600); }

/* ===================== หน้าหลัก: Markets card ===================== */
.markets-card {
  background: linear-gradient(160deg, var(--green-700), var(--green-900));
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.markets-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.markets-card__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.7);
  margin-bottom: 4px;
}
.markets-card__subtitle { font-size: 14.5px; font-weight: 600; color: #fff; }

.markets-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.market-tile {
  background: rgba(255,255,255,0.96);
  border-radius: var(--radius-md);
  padding: 12px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.market-tile__flag { font-size: 22px; }
.market-tile__country { font-weight: 700; font-size: 14px; color: var(--ink-900); }
.market-tile__meta { font-size: 11.5px; color: var(--ink-500); }
.market-tile__meta b { color: var(--green-600); }
.market-tile__chev { width: 16px; height: 16px; color: var(--ink-300); margin-left: auto; flex-shrink: 0; }

/* ===================== Banner cards (ตลาดการเงิน / ติดต่อ / logout) ===================== */
.banner-card {
  width: 100%;
  border-radius: var(--radius-lg);
  padding: 16px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  box-shadow: var(--shadow-card);
  border-left: 4px solid transparent;
}
.banner-card--navy {
  background: linear-gradient(135deg, var(--navy-600), var(--navy-800));
  border-left-color: #5B7FE0;
}
.banner-card--green {
  background: linear-gradient(135deg, var(--green-600), var(--green-900));
}
.banner-card--red {
  background: linear-gradient(135deg, var(--red-500), #B22E2E);
}

.banner-card__icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  background: rgba(255,255,255,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  color: #fff;
}
.banner-card__body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.banner-card__title { font-weight: 700; font-size: 15px; color: #fff; }
.banner-card__subtitle { font-size: 12px; color: rgba(255,255,255,0.78); }
.banner-card .chev { width: 18px; height: 18px; color: rgba(255,255,255,0.7); flex-shrink: 0; }

.status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.16);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.status-pill--live i {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4ADE80; display: inline-block;
}

/* ===================== หน้าหลัก: Deposit card ===================== */
.deposit-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
}
.deposit-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.deposit-card__eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em;
  color: var(--green-600); margin-bottom: 6px;
}
.deposit-card__title { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.deposit-card__subtitle { font-size: 13px; color: var(--ink-500); line-height: 1.5; }
.shield-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--green-100); color: var(--green-600);
  border-radius: 12px; padding: 9px;
}

/* ===================== Buttons ===================== */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 14.5px;
}
.btn svg { width: 18px; height: 18px; }
.btn--primary { background: linear-gradient(135deg, var(--green-500), var(--green-700)); color: #fff; }
.btn--outline { background: var(--bg-card); color: var(--green-700); border: 1.5px solid var(--green-500); }
.btn--block { width: 100%; }

/* ===================== เกี่ยวกับเรา: intro (ภาพตึก + ข้อมูลบริษัท) ===================== */
.about-intro {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  min-height: 420px;
  display: flex;
  align-items: flex-end;
}
.about-intro__photo { position: absolute; inset: 0; background: var(--green-900); }
.about-intro__photo img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.9; }
.about-intro__body {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 22px 20px 24px;
  background: linear-gradient(180deg, rgba(8,43,27,0) 0%, rgba(8,43,27,0.55) 35%, rgba(8,43,27,0.94) 100%);
}
.about-intro__eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,0.75); margin-bottom: 6px;
}
.about-intro__title { font-family: var(--font-display); font-size: 24px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.about-intro__text { font-size: 13px; color: rgba(255,255,255,0.9); line-height: 1.6; margin-bottom: 16px; max-width: 320px; }
.about-intro__features { display: flex; gap: 14px; margin-bottom: 18px; }
.about-intro__feature { display: flex; align-items: center; gap: 7px; }
.about-intro__feature-icon { width: 20px; height: 20px; color: #fff; flex-shrink: 0; }
.about-intro__feature-icon svg { width: 100%; height: 100%; }
.about-intro__feature-text { font-size: 10.5px; font-weight: 600; line-height: 1.3; color: rgba(255,255,255,0.88); }
.about-intro__cta { width: auto; display: inline-flex; padding: 11px 20px; }

/* ===================== เกี่ยวกับเรา: บริการ + สถิติ (สองคอลัมน์) ===================== */
.about-services-split {
  display: grid;
  grid-template-columns: 1fr;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.about-services-split__list {
  background: linear-gradient(160deg, var(--green-700), var(--green-900));
  padding: 22px 18px;
}
.about-services-split__eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; color: rgba(255,255,255,0.7); margin-bottom: 4px; }
.about-services-split__title { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: #fff; margin-bottom: 16px; }
.about-services-split__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,0.14);
}
.about-services-split__icon {
  width: 34px; height: 34px; flex-shrink: 0;
  background: rgba(255,255,255,0.12);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.about-services-split__icon svg { width: 17px; height: 17px; }
.about-services-split__item-title { display: block; font-size: 13.5px; font-weight: 700; color: #fff; margin-bottom: 2px; }
.about-services-split__item-sub { display: block; font-size: 11.5px; color: rgba(255,255,255,0.68); line-height: 1.4; }
.about-services-split__more {
  display: inline-flex; align-items: center; gap: 4px;
  margin-top: 14px; font-size: 12.5px; font-weight: 700; color: #fff;
}
.about-services-split__more svg { width: 15px; height: 15px; }

.about-services-split__photo { position: relative; min-height: 220px; }
.about-services-split__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.about-services-split__photo::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(8,20,15,0.85) 0%, rgba(8,20,15,0.15) 55%, rgba(8,20,15,0.05) 100%);
}
.about-services-split__stats {
  position: relative;
  z-index: 1;
  height: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  align-content: end;
  padding: 16px;
}
.about-services-split__stat-value { display: block; font-family: var(--font-display); font-size: 20px; font-weight: 700; color: #fff; }
.about-services-split__stat-label { display: block; font-size: 10px; color: rgba(255,255,255,0.78); line-height: 1.35; margin-top: 2px; }

@media (min-width: 640px) {
  .about-services-split { grid-template-columns: 1.05fr 1fr; }
  .about-services-split__photo { min-height: 100%; }
}

/* ===================== เกี่ยวกับเรา ===================== */
.about-hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  min-height: 250px;
  display: flex;
  align-items: flex-end;
}
.about-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,81,50,0.18) 0%, rgba(15,81,50,0.62) 50%, rgba(8,43,27,0.96) 100%);
}
.about-hero__content {
  position: relative;
  z-index: 1;
  padding: 24px 22px;
}
.about-hero__eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  margin-bottom: 8px;
}
.about-hero__title { font-family: var(--font-display); font-size: 25px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.about-hero__subtitle { font-size: 13.5px; color: rgba(255,255,255,0.92); line-height: 1.6; max-width: 320px; }

.illustration-card {
  background: var(--green-50);
  border-radius: var(--radius-lg);
  padding: 20px 12px 12px;
  box-shadow: var(--shadow-card);
  display: flex;
  justify-content: center;
}
.illustration-card svg { width: 100%; max-width: 360px; height: auto; }

.info-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
}

.hero-banner {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  background: var(--bg-card);
}
.hero-banner__toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 10px 14px;
}
.hero-banner__menu {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--green-700);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}
.hero-banner__menu svg { width: 18px; height: 18px; flex-shrink: 0; }
.hero-banner__menu:hover { background: var(--green-50); }

.hero-banner__body {
  position: relative;
  min-height: 439px;
  overflow: hidden;
}
.hero-banner__photo {
  position: absolute;
  inset: 0;
  background: var(--green-50);
}
.hero-banner__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-banner__photo--empty { background: var(--green-100); }

.hero-banner__curve {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-banner__quote-panel {
  position: absolute;
  top: 0;
  left: 50%;
  right: 0;
  bottom: 0;
  padding: 24px 24px 24px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  z-index: 2;
}
.hero-banner__quote {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  line-height: 1.5;
}
.hero-banner__quote--en {
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  font-style: italic;
}

.hero-banner__features {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding-top: 16px;
  margin-top: 4px;
  border-top: 1px solid rgba(255,255,255,0.22);
}
.hero-banner__feature {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
  padding: 0 2px;
  position: relative;
}
.hero-banner__feature:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: rgba(255,255,255,0.22);
}
.hero-banner__feature-icon {
  width: 22px;
  height: 22px;
  color: #fff;
}
.hero-banner__feature-icon svg { width: 100%; height: 100%; }
.hero-banner__feature-text {
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.35;
  color: rgba(255,255,255,0.85);
  word-break: keep-all;
}

.quote-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  min-height: 190px;
}
.quote-card__text-panel {
  background: linear-gradient(160deg, var(--green-700), var(--green-900));
  padding: 22px 16px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.quote-card__mark {
  font-family: var(--font-display);
  font-size: 48px;
  line-height: 1;
  color: rgba(255,255,255,0.3);
  display: block;
  margin-bottom: -10px;
  position: relative;
  z-index: 1;
}
.quote-card__text {
  font-size: 14.5px;
  font-weight: 600;
  color: #fff;
  line-height: 1.55;
  position: relative;
  z-index: 1;
}
.quote-card__photo { width: 100%; height: 100%; }
.quote-card__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.photo-banner {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.photo-banner img { width: 100%; height: auto; display: block; }

.photo-caption {
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--green-700);
  margin-top: -10px;
}

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

.service-item {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  gap: 14px;
}
.service-item__icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--green-50);
  color: var(--green-600);
  padding: 11px;
}
.service-item:nth-child(even) .service-item__icon {
  background: var(--green-100);
  color: var(--green-700);
}
.service-item:nth-child(3n) .service-item__icon {
  background: var(--green-900);
  color: #EAF3DE;
}
.service-item__body { flex: 1; }
.service-item__title {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-900);
  padding-bottom: 6px;
  border-bottom: 2px solid var(--green-500);
  margin-bottom: 8px;
}
.service-item__text { font-size: 12.5px; color: var(--ink-700); line-height: 1.6; }
.info-card__title { font-family: var(--font-display); font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.info-card__text { font-size: 13.5px; color: var(--ink-700); line-height: 1.7; }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat-tile {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px 8px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.stat-tile__value { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--green-600); }
.stat-tile__label { font-size: 11px; color: var(--ink-500); margin-top: 4px; line-height: 1.4; }

/* ===================== List card (ใช้ในเกี่ยวกับเรา + บัญชี) ===================== */
.list-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 6px 16px;
  box-shadow: var(--shadow-card);
}
.list-card__label { font-size: 12.5px; font-weight: 700; color: var(--ink-500); padding: 12px 4px 8px; }

.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 4px;
  border-top: 1px solid var(--border);
}
.list-row--link { cursor: pointer; }
.list-row--link:hover { background: var(--green-50); border-radius: var(--radius-sm); }
.list-row--link:focus-visible { outline: 2px solid var(--green-600); outline-offset: -2px; border-radius: var(--radius-sm); }
.list-card > .list-row:first-of-type,
.list-card > .list-row.first { border-top: none; }
.list-row:first-child { border-top: none; }

.list-row__icon {
  width: 38px; height: 38px; flex-shrink: 0;
  border-radius: 11px; padding: 9px;
  background: var(--green-100); color: var(--green-700);
}
.list-row__icon--soft { background: var(--green-100); color: var(--green-700); }
.list-row__icon--gray { background: #EFF1F0; color: var(--ink-700); }

.list-row__text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.list-row__title { font-weight: 700; font-size: 14px; color: var(--ink-900); }
.list-row__subtitle { font-size: 12px; color: var(--ink-500); }

.list-row .chev { width: 16px; height: 16px; color: var(--ink-300); flex-shrink: 0; }

/* ===================== ธุรกรรม ===================== */
.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}
.summary-chip {
  border-radius: var(--radius-md);
  padding: 14px 8px;
  text-align: center;
}
.summary-chip--up { background: var(--green-50); }
.summary-chip--down { background: var(--red-100); }
.summary-chip--neutral { background: #EFF1EF; }
.summary-chip__label { font-size: 11px; color: var(--ink-500); margin-bottom: 6px; }
.summary-chip__value { font-family: var(--font-display); font-size: 14.5px; font-weight: 700; }
.summary-chip--up .summary-chip__value { color: var(--green-700); }
.summary-chip--down .summary-chip__value { color: var(--red-600); }
.summary-chip--neutral .summary-chip__value { color: var(--ink-900); }

.filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 2px;
  scrollbar-width: none;
}
.filter-tabs::-webkit-scrollbar { display: none; }

.filter-tab {
  flex-shrink: 0;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-700);
}
.filter-tab.active {
  background: linear-gradient(135deg, var(--red-500), var(--red-600));
  color: #fff;
  border-color: transparent;
}

.tx-date-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-500);
  background: #E7EBE8;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-top: 4px;
}

.tx-list-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.tx-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}
.tx-row:first-child { border-top: none; }

.tx-row__icon {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  padding: 10px;
}
.tx-row__icon--in { background: var(--green-100); color: var(--green-600); }
.tx-row__icon--out { background: var(--red-100); color: var(--red-600); }

.tx-row__text { flex: 1; }
.tx-row__title { font-weight: 700; font-size: 14px; }
.tx-row__time { font-size: 12px; color: var(--ink-500); margin-top: 2px; }

.tx-row__right { text-align: right; }
.tx-row__amount { font-weight: 700; font-size: 14.5px; font-family: var(--font-display); }
.tx-row__amount--in { color: var(--green-600); }
.tx-row__amount--out { color: var(--red-600); }

.tx-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
}
.tx-status i { width: 6px; height: 6px; border-radius: 50%; }
.tx-status--success { color: var(--green-600); }
.tx-status--success i { background: var(--green-600); }
.tx-status--pending { color: #B8860B; }
.tx-status--pending i { background: #D4A017; }
.tx-status--failed { color: var(--red-600); }
.tx-status--failed i { background: var(--red-600); }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-500);
  font-size: 13.5px;
}

/* ===================== บัญชี ===================== */
.account-header {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  padding: 26px 22px 40px;
}
.account-header__photo { position: absolute; inset: 0; background: var(--green-900); }
.account-header__photo img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.85; }
.account-header::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(155deg, rgba(33,156,95,0.55) 0%, rgba(15,81,50,0.85) 55%, rgba(8,43,27,0.96) 100%);
}
.account-header__content { position: relative; z-index: 1; width: 100%; }
.account-header__eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  color: rgba(255,255,255,0.75);
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 2px solid rgba(255,255,255,0.5);
  display: inline-block;
}
.account-header__name { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: #fff; margin-bottom: 18px; }
.account-header__balance-label { font-size: 12.5px; color: rgba(255,255,255,0.75); margin-bottom: 4px; }
.account-header__balance { font-family: var(--font-display); font-size: 34px; font-weight: 700; color: #fff; margin-bottom: 18px; line-height: 1.15; }
.account-header__number {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.account-header__number svg { width: 15px; height: 15px; flex-shrink: 0; }

.passbook-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 18px;
}
.passbook-card__top { display: flex; justify-content: space-between; align-items: flex-start; }
.passbook-card__eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; color: var(--green-600); margin-bottom: 4px; }
.passbook-card__title { font-family: var(--font-display); font-size: 15px; font-weight: 600; }
.passbook-card__icon {
  width: 36px; height: 36px; background: var(--green-100); color: var(--green-700);
  border-radius: 10px; padding: 8px; flex-shrink: 0;
}
.passbook-card__divider { border: none; border-top: 1px solid var(--border); margin: 14px 0; }
.passbook-card__label { font-size: 12.5px; color: var(--ink-500); margin-bottom: 4px; }
.passbook-card__balance { font-family: var(--font-display); font-size: 26px; font-weight: 700; margin-bottom: 14px; }
.passbook-card__pl {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--green-50); border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: 12.5px; color: var(--ink-700); font-weight: 600;
}

.account-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ===================== Bottom navigation ===================== */
.bottom-nav {
  position: sticky;
  bottom: 0;
  z-index: 20;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 2px;
  color: var(--ink-300);
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
}
.nav-item svg { width: 25px; height: 25px; }
.nav-item.active { color: var(--green-600); }

/* ===================== Focus visibility & motion ===================== */
button:focus-visible {
  outline: 2px solid var(--green-600);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ===================== Bottom sheet (ภาษา / ยืนยันออกจากระบบ) ===================== */
.sheet-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 18, 0.5);
  z-index: 100;
  align-items: flex-end;
  justify-content: center;
}
.sheet-overlay.open { display: flex; }

.sheet {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border-radius: 26px 26px 0 0;
  padding: 28px 22px calc(22px + env(safe-area-inset-bottom));
  max-height: 85vh;
  overflow-y: auto;
}

.sheet__title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  text-align: center;
}
.sheet__subtitle {
  font-size: 13px;
  color: var(--ink-500);
  text-align: center;
  margin-top: 4px;
  margin-bottom: 20px;
}
.sheet__title--center,
.sheet__subtitle--center { text-align: center; }

.sheet--center { text-align: center; }
.sheet__icon {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.sheet__icon--danger { background: var(--red-100); color: var(--red-600); }

.lang-options { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }

.lang-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  text-align: left;
}
.lang-option.active { background: var(--red-100); }
.lang-option__flag { font-size: 26px; line-height: 1; }
.lang-option__text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.lang-option__title { font-weight: 700; font-size: 14.5px; color: var(--ink-900); }
.lang-option__subtitle { font-size: 12px; color: var(--ink-500); }
.lang-option__check {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--red-600);
  color: #fff;
  flex-shrink: 0;
}
.lang-option__check svg { width: 14px; height: 14px; }
.lang-option.active .lang-option__check { display: flex; }

.btn-sheet-close {
  width: 100%;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink-700);
  margin-top: 8px;
}
.btn-sheet-close:hover { background: var(--green-50); }

.btn--danger {
  background: linear-gradient(135deg, var(--red-500), var(--red-600));
  color: #fff;
  margin-bottom: 10px;
}

/* ===================== ติดต่อฝ่ายบริการลูกค้า ===================== */
.support-hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  min-height: 150px;
}
.support-hero__text {
  background: linear-gradient(160deg, var(--green-600), var(--green-900));
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.support-hero__title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.15;
}
.support-hero__subtitle {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  line-height: 1.4;
}
.support-hero__photo { width: 100%; height: 100%; }
.support-hero__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.support-card__title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--green-700);
  margin-bottom: 14px;
}
.support-card__title--center { text-align: center; margin-top: 4px; }

.support-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.support-list {
  list-style: disc;
  padding-left: 20px;
  margin: 12px 0 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.support-list li { font-size: 13.5px; color: var(--ink-700); }

/* ===================== จัดการบัญชี / ฟอร์มต่างๆ ===================== */
.sub-hero {
  text-align: center;
  padding: 8px 12px 4px;
}
.sub-hero__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(160deg, var(--green-600), var(--green-900));
  color: #fff;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sub-hero__title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 6px;
}
.sub-hero__subtitle { font-size: 13px; color: var(--ink-500); }

.form-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field__label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-900);
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-field__badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-500);
  background: #EFF1EF;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.form-input {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  background: var(--bg-card);
}
.form-input:focus-within { border-color: var(--green-500); }
.form-input svg { width: 19px; height: 19px; color: var(--ink-300); flex-shrink: 0; }
.form-input input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--ink-900);
  background: transparent;
  min-width: 0;
}
.form-input input::placeholder { color: var(--ink-300); }
.form-input__eye { color: var(--ink-300); flex-shrink: 0; }
.form-input__eye svg { width: 19px; height: 19px; }

.pin-input { letter-spacing: 6px; font-weight: 700; }

.password-strength {
  height: 4px;
  background: #EFF1EF;
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.password-strength i {
  display: block;
  height: 100%;
  background: var(--green-500);
  border-radius: var(--radius-pill);
}

.forgot-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-500);
  padding: 4px;
}
.forgot-link svg { width: 15px; height: 15px; }
.forgot-link:hover { color: var(--green-700); }

.form-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-900);
  background: var(--bg-card);
}
.form-select svg { width: 18px; height: 18px; color: var(--ink-300); }

.empty-state-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 40px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.empty-state-card__icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: #F1F1EF;
  color: var(--ink-300);
  padding: 18px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.empty-state-card__icon svg { width: 100%; height: 100%; flex-shrink: 0; }
.empty-state-card__title { font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.empty-state-card__subtitle { font-size: 13px; color: var(--ink-500); max-width: 320px; line-height: 1.6; margin-bottom: 12px; }

/* จัดการ์ดสถานะเดี่ยว (เช่น ยังไม่มีบัญชีธนาคาร / KYC ผ่านแล้ว) ให้อยู่กึ่งกลางแนวตั้งของหน้าจอ ดูสมดุลขึ้น */
.page-center-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 55vh;
}
.page-center-wrap .empty-state-card { width: 100%; }

.accent-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-700);
  border-left: 3px solid var(--red-500);
  padding-left: 10px;
}
#page-financial-markets .accent-label { font-size: 15px; }

.bank-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 4px;
  border-top: 1px solid var(--border);
  text-align: left;
}
.bank-tile:first-child { border-top: none; }
.bank-tile__logo {
  width: 52px;
  height: 40px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 800;
  text-align: center;
  line-height: 1.15;
  flex-shrink: 0;
  padding: 2px;
}
.bank-tile__text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.bank-tile__name { font-weight: 700; font-size: 14px; }
.bank-tile__name-en { font-size: 12px; color: var(--ink-500); }
.bank-tile .chev { width: 16px; height: 16px; color: var(--ink-300); flex-shrink: 0; }

.bank-tile--manual {
  color: var(--ink-500);
}
.bank-tile--manual .bank-tile__logo {
  background: var(--bg-card);
  border: 1.5px dashed var(--ink-300);
  color: var(--ink-300);
  font-size: 20px;
}

.upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.upload-box {
  border: 1.5px dashed var(--green-500);
  border-radius: var(--radius-md);
  background: var(--green-50);
  color: var(--green-700);
  padding: 18px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
}
.upload-box svg { width: 22px; height: 22px; }
.upload-preview {
  border-radius: var(--radius-md);
  background: #F1F1EF;
  color: var(--ink-300);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.upload-preview svg { width: 40px; height: 40px; }

.sheet__icon--soft { background: var(--green-100); color: var(--green-700); }

.sheet__row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.sheet__title--left {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  text-align: left;
}
.sheet__close-x {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #F1F1EF;
  color: var(--ink-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sheet__close-x svg { width: 16px; height: 16px; }

/* ===================== ส่งคำร้องขอถอนเงิน ===================== */
.withdraw-hero {
  background: linear-gradient(160deg, var(--green-600), var(--green-900));
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.withdraw-hero__title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 12px;
}
.withdraw-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
}
.withdraw-hero__badge svg { width: 14px; height: 14px; }

.account-info-card {
  background: var(--green-50);
  border-top: 3px solid var(--green-500);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
}
.account-info-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}
.account-info-card__label { font-size: 12px; font-weight: 700; color: var(--green-700); margin-bottom: 3px; }
.account-info-card__name { font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--ink-900); }
.account-info-card__balance { text-align: right; }
.account-info-card__balance-value { display: block; font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--green-700); }
.account-info-card__balance-label { font-size: 11px; color: var(--ink-500); }
.account-info-card__row { font-size: 13px; color: var(--ink-700); padding-top: 6px; border-top: 1px solid rgba(0,0,0,0.06); margin-top: 6px; }
.account-info-card__row:first-of-type { border-top: 1px solid rgba(0,0,0,0.06); }
.account-info-card__row b { color: var(--ink-900); }

.sheet__icon--warning { background: #FEF3E2; color: #B45309; }

/* ===================== บัญชีธนาคารที่ผูกไว้ (อ่านอย่างเดียว แก้ไขผ่านแอดมินเท่านั้น) ===================== */

.bank-linked-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.bank-linked-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.bank-linked-card__header-title { font-weight: 700; font-size: 14px; color: var(--ink-900); }
.bank-linked-card__header-sub { font-size: 12px; color: var(--ink-500); margin-top: 2px; }
.bank-linked-card__icon {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
  background: var(--green-100); color: var(--green-700);
  display: flex; align-items: center; justify-content: center;
}
.bank-linked-card__icon svg { width: 22px; height: 22px; }
.bank-linked-card__body { padding: 16px 18px; }
.bank-linked-card__name { font-family: var(--font-display); font-weight: 700; font-size: 17px; color: var(--ink-900); margin-bottom: 2px; }
.bank-linked-card__masked { font-size: 13px; color: var(--ink-500); margin-bottom: 14px; letter-spacing: 0.02em; }
.bank-linked-card__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  background: #F4F6F5;
  border-radius: var(--radius-md);
  padding: 12px 14px;
}
.bank-linked-card__grid-label { font-size: 10px; font-weight: 700; letter-spacing: 0.04em; color: var(--ink-500); text-transform: uppercase; margin-bottom: 4px; }
.bank-linked-card__grid-value { font-size: 14px; font-weight: 700; color: var(--ink-900); word-break: break-word; }

.bank-warning-box {
  display: flex;
  gap: 10px;
  background: #FEF3E2;
  border: 1px solid #F5D9A8;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 14px;
}
.bank-warning-box__icon { color: #B45309; flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; }
.bank-warning-box__title { font-weight: 700; font-size: 13px; color: #92400E; margin-bottom: 2px; }
.bank-warning-box__text { font-size: 12px; color: #92400E; line-height: 1.5; }

.support-contact-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  border: none;
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-top: 14px;
  cursor: pointer;
  text-align: left;
  color: #fff;
}
.support-contact-card__icon {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  background: rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center;
}
.support-contact-card__icon svg { width: 20px; height: 20px; }
.support-contact-card__text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.support-contact-card__title { font-weight: 700; font-size: 14px; }
.support-contact-card__subtitle { font-size: 12px; opacity: 0.85; }
.support-contact-card .chev { width: 18px; height: 18px; opacity: 0.85; flex-shrink: 0; color: #fff; }

/* ===================== หน้าเข้าสู่ระบบ / สมัครสมาชิก ===================== */
.auth-screen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--bg-card);
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
}
.auth-screen.open { display: flex; }

.auth-card {
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  background: var(--bg-card);
  padding: 48px 22px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 431px) {
  .auth-screen { background: var(--bg-app); align-items: center; padding: 24px 16px; }
  .auth-card {
    min-height: unset;
    border-radius: var(--radius-lg);
    border-top: 4px solid var(--green-500);
    box-shadow: var(--shadow-card);
    padding: 28px 24px 22px;
  }
}

.auth-card__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.auth-card__badge {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 13px;
  overflow: hidden;
  background: linear-gradient(160deg, var(--green-600), var(--green-900));
}
.auth-card__badge img { width: 100%; height: 100%; object-fit: cover; display: block; }
.auth-card__name { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--ink-900); }
.auth-card__eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; color: var(--green-600); margin-top: 1px; }

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #F1F1EF;
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
  margin-bottom: 24px;
}
.auth-tab {
  padding: 11px 8px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-500);
}
.auth-tab.active { background: var(--bg-card); color: var(--ink-900); box-shadow: 0 1px 2px rgba(0,0,0,0.08); }

.auth-panel { display: none; flex-direction: column; gap: 18px; }
.auth-panel.active { display: flex; }

.auth-panel__title { font-family: var(--font-display); font-size: 21px; font-weight: 600; margin-bottom: 2px; }
.auth-panel__subtitle { font-size: 13px; color: var(--ink-500); margin-bottom: 4px; }

.form-field__hint { font-size: 11.5px; font-weight: 500; color: var(--ink-500); }

.auth-card__footer {
  text-align: center;
  font-size: 11px;
  color: var(--ink-500);
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  line-height: 1.7;
}
.auth-card__footer a { color: var(--green-700); font-weight: 600; }

/* ===================== ฝากประจำ ===================== */
.fd-panel {
  background: var(--bg-card);
  border-top: 3px solid var(--green-500);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 22px 18px 26px;
}

.fd-panel__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.fd-panel__eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; color: var(--green-600); }
.fd-secure-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--green-100);
  border: 1px solid var(--green-200, var(--green-100));
  color: var(--green-700);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}
.fd-secure-pill svg { width: 13px; height: 13px; }

.fd-panel__title { font-family: var(--font-display); font-size: 24px; font-weight: 700; color: var(--ink-900); margin-bottom: 4px; }
.fd-panel__subtitle { font-size: 13px; color: var(--ink-500); margin-bottom: 18px; }

.fd-balance-box {
  background: var(--green-50);
  border: 1px solid var(--green-100);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}
.fd-balance-box__label { font-size: 11.5px; color: var(--ink-500); margin-bottom: 4px; }
.fd-balance-box__value { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--ink-900); }
.fd-pill-btn {
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--green-500);
  color: var(--green-700);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
}
.fd-pill-btn:hover { background: var(--green-100); }

.fd-field { margin-bottom: 20px; }
.fd-field__label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-700); margin-bottom: 8px; }

.fd-amount-input {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}
.fd-amount-input:focus-within { border-color: var(--green-500); }
.fd-amount-input span { font-weight: 700; color: var(--ink-300); font-size: 18px; }
.fd-amount-input input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  color: var(--ink-900);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  min-width: 0;
}
.fd-amount-input input::placeholder { color: var(--ink-300); }

.fd-terms-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.fd-terms-head > span:first-child { font-size: 12.5px; font-weight: 600; color: var(--ink-700); }
.fd-apr { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--green-700); }

.fd-terms-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.fd-term-btn {
  padding: 11px 4px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  color: var(--ink-700);
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
}
.fd-term-btn.active {
  background: var(--green-600);
  border-color: var(--green-600);
  color: #fff;
}

.fd-stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.fd-stat-box {
  background: var(--green-50);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}
.fd-stat-box__label { font-size: 11px; color: var(--ink-500); margin-bottom: 4px; }
.fd-stat-box__value { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--green-700); }

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

.fd-rate-table { display: flex; flex-direction: column; margin-bottom: 14px; }
.fd-rate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 2px;
  border-top: 1px solid var(--border);
}
.fd-rate-row:first-child { border-top: none; }
.fd-rate-row__term { font-size: 13.5px; font-weight: 700; color: var(--ink-900); min-width: 56px; }
.fd-rate-row__pct { font-size: 13.5px; font-weight: 700; color: var(--green-700); flex: 1; text-align: center; }
.fd-rate-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}
.fd-rate-badge--short { background: #EFF1EF; color: var(--ink-500); }
.fd-rate-badge--long { background: var(--green-100); color: var(--green-700); }
.fd-rate-badge--high { background: var(--green-600); color: #fff; }

.fd-note { font-size: 11px; color: rgba(255,255,255,0.6); line-height: 1.6; margin-bottom: 18px; }

/* ===================== ตลาดการเงิน ===================== */
.fm-account-card {
  background: linear-gradient(155deg, var(--green-500), var(--green-900));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 14px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  overflow: hidden;
}
.fm-account-card::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -10%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.16), transparent 70%);
  pointer-events: none;
}
.fm-account-card__name { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: #fff; margin-bottom: 3px; position: relative; }
.fm-account-card__meta { font-size: 12.5px; color: rgba(255,255,255,0.8); position: relative; }
.fm-account-card__balance { text-align: right; position: relative; }
.fm-account-card__balance-value { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: #fff; margin-bottom: 3px; }
.fm-account-card__balance-label { font-size: 11.5px; color: rgba(255,255,255,0.8); }

#fm-tier-list { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }

.fm-tier-card {
  border-radius: 20px;
  padding: 12px 11px;
  box-shadow: 0 14px 34px -12px rgba(0,0,0,0.35), var(--shadow-card);
  border: 1px solid rgba(255,255,255,0.14);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.fm-tier-card::before {
  content: '';
  position: absolute;
  top: -55%;
  right: -25%;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.22), transparent 68%);
  pointer-events: none;
}
.fm-tier-card--standard { background: linear-gradient(155deg, #4A78D4, #16274F); }
.fm-tier-card--premium { background: linear-gradient(155deg, #2A1A0A, #E0952A); }
.fm-tier-card--ultra { background: linear-gradient(155deg, #9070EE, #3A2778); }

.fm-tier-card__watermark {
  position: absolute;
  right: -22px;
  bottom: -26px;
  width: 128px;
  height: 128px;
  opacity: 0.1;
  pointer-events: none;
  transform: rotate(-8deg);
}
.fm-tier-card__watermark svg { width: 100%; height: 100%; }

.fm-tier-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  position: relative;
}
.fm-tier-card__icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 14px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px;
}
.fm-tier-card__badge {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.4);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  color: #fff;
  padding: 4px 9px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  white-space: nowrap;
}
.fm-tier-card__badge svg { width: 11px; height: 11px; }

.fm-tier-card__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 3px;
  position: relative;
  text-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.fm-tier-card__desc { font-size: 13px; color: rgba(255,255,255,0.85); line-height: 1.5; margin-bottom: 10px; position: relative; max-width: 90%; }

.fm-tier-card__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 9px;
  position: relative;
}
.fm-tier-card__stat {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 12px;
  padding: 6px 6px;
}
.fm-tier-card__stat-label { font-size: 9.5px; font-weight: 800; letter-spacing: 0.07em; color: rgba(255,255,255,0.68); margin-bottom: 3px; }
.fm-tier-card__stat-value { font-family: var(--font-display); font-size: 15px; font-weight: 700; }

.fm-tier-card__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: relative;
}
.fm-tier-card__count {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.78);
  font-variant-numeric: tabular-nums;
}
.fm-tier-card__count svg { width: 15px; height: 15px; flex-shrink: 0; }
.fm-tier-card__open {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: var(--ink-900);
  font-weight: 800;
  font-size: 14.5px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  box-shadow: 0 6px 18px rgba(0,0,0,0.28);
  flex-shrink: 0;
}
.fm-tier-card__open svg { width: 17px; height: 17px; }


/* ===================== ห้องเทรด (ตลาด/ทองคำ) ===================== */
.mr-history-row { display: flex; justify-content: flex-end; }
.mr-history-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--green-50);
  border: 1px solid var(--green-100);
  color: var(--green-700);
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
}
.mr-history-pill svg { width: 14px; height: 14px; }
.mr-history-pill:hover { background: var(--green-100); }

.mr-session {
  background: var(--navy-800);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  color: #fff;
}
.mr-session__top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  margin-bottom: 8px;
}
.mr-session__status { display: flex; align-items: center; gap: 6px; font-weight: 700; letter-spacing: 0.04em; }
.mr-session__status i { width: 7px; height: 7px; border-radius: 50%; background: #4ADE80; flex-shrink: 0; }
.mr-session--gold .mr-session__status i { background: #F5B93F; }
.mr-session__round { color: rgba(255,255,255,0.7); }
.mr-session__round b { color: #fff; font-weight: 700; }
.mr-session__timer { margin-left: auto; color: rgba(255,255,255,0.7); }
.mr-session__timer b { font-family: var(--font-display); color: #fff; font-weight: 700; }
.mr-session__bar { height: 4px; background: rgba(255,255,255,0.15); border-radius: var(--radius-pill); overflow: hidden; }
.mr-session__bar i { display: block; height: 100%; background: linear-gradient(90deg, #2563EB, #60A5FA); border-radius: var(--radius-pill); transition: width 1s linear; }
.mr-session--gold .mr-session__bar i { background: linear-gradient(90deg, #C9820F, #F5B93F); }

.mr-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #F1F1EF;
  border-radius: var(--radius-md);
  padding: 4px;
  gap: 4px;
}
.mr-tab {
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-500);
  border-bottom: 2px solid transparent;
}
.mr-tab.active { background: var(--bg-card); color: var(--green-700); box-shadow: 0 1px 2px rgba(0,0,0,0.08); }

.mr-panel { display: none; flex-direction: column; gap: 10px; }
.mr-panel.active { display: flex; }

/* คู่สกุลเงิน */
#mr-pairs-list {
  background: var(--navy-800);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.mr-pair-card {
  padding: 6px 14px;
  color: #fff;
  border-top: 1px solid rgba(255,255,255,0.2);
  border-left: 6px solid transparent;
  cursor: pointer;
}
.mr-pair-card:first-child { border-top: none; }
.mr-pair-card--selected { border-left-color: #22C55E; background: rgba(34,197,94,0.14); }
.mr-pair-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}
.mr-pair-card__name { display: flex; align-items: center; gap: 7px; }
.mr-pair-card__flags { font-size: 14px; letter-spacing: -4px; }
.mr-pair-card__label { font-weight: 700; font-size: 13.5px; }
.mr-pair-card__round { font-size: 10px; color: #6EE7B7; font-weight: 600; margin-top: 1px; }
.mr-pair-card__badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.mr-pair-card__badge--up { background: rgba(74,222,128,0.18); color: #6EE7B7; }
.mr-pair-card__badge--down { background: rgba(248,113,113,0.18); color: #FCA5A5; }

.mr-pair-card__body {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}
.mr-pair-card__price { font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.mr-pair-card__range { font-size: 10px; color: rgba(255,255,255,0.5); margin-top: 1px; }
.mr-pair-card__spark { width: 56px; height: 22px; flex-shrink: 0; }
.mr-pair-card__spark polyline { fill: none; stroke-width: 1.6; }

.mr-compare {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}
.mr-compare__col { flex: 1; }
.mr-compare__col--right { text-align: right; }
.mr-compare__step { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--ink-500); margin-bottom: 3px; }
.mr-compare__col--right .mr-compare__step { justify-content: flex-end; }
.mr-compare__num { width: 16px; height: 16px; border-radius: 50%; background: var(--green-100); color: var(--green-700); font-size: 10px; display: inline-flex; align-items: center; justify-content: center; }
.mr-compare__num--dark { background: var(--navy-600); color: #fff; }
.mr-compare__value { font-weight: 700; font-size: 13.5px; color: var(--ink-300); }
.mr-compare__value--filled { color: var(--ink-900); }
.mr-compare__swap { width: 34px; height: 34px; border-radius: 50%; background: #F1F1EF; color: var(--ink-500); display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin: 0 10px; }
.mr-compare__swap svg { width: 17px; height: 17px; }

.mr-amount-input {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}
.mr-amount-input input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-900);
  font-family: inherit;
}
.mr-amount-input input::placeholder { color: var(--ink-300); }

.mr-trade-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mr-trade-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 14px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 14.5px;
  color: #fff;
}
.mr-trade-btn svg { width: 17px; height: 17px; }
.mr-trade-btn--long { background: linear-gradient(135deg, var(--green-500), var(--green-700)); }
.mr-trade-btn--short { background: linear-gradient(135deg, var(--red-500), var(--red-600)); }

.mr-min-note { text-align: center; font-size: 12px; color: var(--ink-500); }
.mr-min-note b { color: var(--ink-900); }

/* ทองคำ */
.mr-gold-card {
  background: var(--navy-800);
  border-radius: var(--radius-lg);
  padding: 16px;
  color: #fff;
}
.mr-gold-card__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.mr-gold-card__label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.85); }
.mr-gold-card__coin {
  width: 22px; height: 22px; border-radius: 50%;
  background: #F5B93F; color: #3A2410;
  font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.mr-gold-card__live {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; color: #6EE7B7;
  background: rgba(74,222,128,0.14);
  padding: 4px 10px; border-radius: var(--radius-pill);
}
.mr-gold-card__live i { width: 6px; height: 6px; border-radius: 50%; background: #4ADE80; }

.mr-gold-card__price-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.mr-gold-card__price { font-family: var(--font-display); font-size: 30px; font-weight: 700; }
.mr-gold-card__unit { font-size: 12px; color: rgba(255,255,255,0.55); margin-top: 2px; }
.mr-gold-card__change { text-align: right; font-weight: 700; font-size: 15px; }
.mr-gold-card__change.is-up { color: #6EE7B7; }
.mr-gold-card__change.is-down { color: #FCA5A5; }
.mr-gold-card__diff { display: block; font-size: 12px; font-weight: 600; }

.mr-gold-card__stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,0.14); padding-top: 12px; }
.mr-gold-card__stat-label { font-size: 10.5px; color: rgba(255,255,255,0.55); margin-bottom: 3px; }
.mr-gold-card__stat-value { font-family: var(--font-display); font-size: 13.5px; font-weight: 700; }
.mr-gold-card__stat-value--up { color: #6EE7B7; }
.mr-gold-card__stat-value--down { color: #FCA5A5; }

.mr-gold-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mr-gold-mini {
  background: var(--navy-800);
  border-radius: var(--radius-md);
  padding: 14px;
  color: #fff;
  cursor: pointer;
  border: 2px solid transparent;
}
.mr-gold-mini.active { border-color: #F5B93F; background: #2A3550; }
.mr-gold-mini__title { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.mr-gold-mini__pct { font-size: 12.5px; font-weight: 700; color: #6EE7B7; margin-bottom: 4px; }
.mr-gold-mini__desc { font-size: 11px; color: rgba(255,255,255,0.55); }

/* ===================== ประวัติการลงทุน ===================== */
.ih-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ih-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 10px;
  border-radius: var(--radius-md);
  background: #F1F1EF;
  border: 1.5px solid transparent;
  color: var(--ink-500);
  font-weight: 700;
  font-size: 13.5px;
}
.ih-tab svg { width: 16px; height: 16px; }
.ih-tab.active { background: var(--bg-card); border-color: var(--green-500); color: var(--green-700); box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

.ih-summary {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 16px 8px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}
.ih-summary > div { text-align: center; padding: 0 4px; }
.ih-summary__label { font-size: 11px; color: var(--ink-500); margin-bottom: 6px; }
.ih-summary__value { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--ink-900); }
.ih-summary__value--green { color: var(--green-700); }

#ih-list { display: flex; flex-direction: column; gap: 10px; }

.ih-order-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 13px;
  border-left: 4px solid var(--green-500);
}
.ih-order-card--short { border-left-color: var(--red-500); }
.ih-order-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.ih-order-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--green-100);
  color: var(--green-700);
}
.ih-order-card__badge--short { background: var(--red-100); color: var(--red-600); }
.ih-order-card__status {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}
.ih-order-card__status--active { background: #FEF3E2; color: #B45309; }
.ih-order-card__status--matured { background: var(--green-100); color: var(--green-700); }
.ih-order-card__status--open { background: #EAF2FE; color: var(--navy-600); }

.ih-order-card__amount { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--ink-900); margin-bottom: 10px; }

.ih-order-card__rows { display: flex; flex-direction: column; gap: 5px; border-top: 1px solid var(--border); padding-top: 10px; }
.ih-order-card__row { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-500); }
.ih-order-card__row b { color: var(--ink-900); font-weight: 700; }
.ih-order-card__row b.is-green { color: var(--green-700); }

/* ===================== Toast แจ้งเตือน ===================== */
.toast-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 340px;
  padding: 0 16px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--ink-900);
  color: #fff;
  padding: 15px 20px;
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 34px rgba(0,0,0,0.32);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  width: auto;
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.toast.show { opacity: 1; transform: scale(1); }
.toast__icon {
  width: 22px; height: 22px; flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.toast__icon svg { width: 13px; height: 13px; }
.toast--success .toast__icon { background: rgba(74,222,128,0.22); color: #4ADE80; }
.toast--info .toast__icon { background: rgba(96,165,250,0.22); color: #60A5FA; }

/* ===================== ประวัติเทรด (การ์ดใหม่) ===================== */
.ih-summary__value--red { color: var(--red-600); }

.ih-order-card__title { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--ink-900); margin-bottom: 6px; }
.ih-order-card__meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.ih-order-card__meta-left { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ih-order-card__direction {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
  font-size: 12.5px;
}
.ih-order-card__direction svg { width: 12px; height: 12px; flex-shrink: 0; }
.ih-order-card__direction--long { color: var(--green-600); }
.ih-order-card__direction--short { color: var(--red-600); }
.ih-order-card__tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  background: #E9EEFC;
  color: var(--navy-600);
}
.ih-order-card__meta-right { text-align: right; }
.ih-order-card__code {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-sm);
  background: #F0ECFE;
  color: #6D3FC0;
  font-family: var(--font-display);
  margin-bottom: 3px;
}
.ih-order-card__time { font-size: 11.5px; color: var(--ink-500); }

.ih-order-card__detail-box {
  background: #F5F6F5;
  border-radius: var(--radius-md);
  padding: 10px 11px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ih-order-card__detail-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.ih-order-card__detail-col { display: flex; flex-direction: column; gap: 2px; }
.ih-order-card__detail-col--right { align-items: flex-end; text-align: right; }
.ih-order-card__detail-label { font-size: 11.5px; color: var(--ink-500); margin-bottom: 2px; }
.ih-order-card__detail-value { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--ink-900); }
.ih-order-card__pl-row { padding-top: 3px; border-top: 1px dashed var(--border); }
.ih-order-card__pl-value { font-family: var(--font-display); font-size: 16px; font-weight: 800; }
.ih-order-card__pl-value--up { color: var(--green-600); }
.ih-order-card__pl-value--down { color: var(--red-600); }
.ih-order-card__pending { display: flex; align-items: center; gap: 6px; color: #B45309; font-weight: 700; font-size: 13px; }
.ih-order-card__pending svg { width: 15px; height: 15px; }