@charset "UTF-8";
/* ============================================================================
   BURAPAYONT UI-MASTER  ·  SHARED DESIGN TOKENS + BASE STYLES
   Visual prototype only — navy/gold Burapayont brand system.
   ========================================================================== */

:root {
  /* ---- Brand: deep navy (official #0B3D91) ---- */
  --navy-950: #061026;
  --navy-900: #081B45;
  --navy-800: #0A2A6B;
  --navy-700: #0B3D91;
  --navy-600: #1149A8;
  --navy-500: #2A5FC0;

  /* ---- Brand: golden yellow (official #F5A400) ---- */
  --gold-600: #C77F00;
  --gold-500: #F5A400;
  --gold-400: #FAB829;
  --gold-300: #FFD06B;
  --gold-glow: rgba(245,164,0,.32);

  /* ---- Neutrals / surfaces ---- */
  --bg: #EEF1F6;
  --surface: #FFFFFF;
  --surface-2: #F5F7FB;
  --surface-3: #EDF1F7;
  --ink: #14213D;
  --ink-2: #3C485F;
  --dim: #6B7790;
  --line: #E5E9F1;
  --line-2: #D9DFEA;

  /* ---- Status ---- */
  --ok: #1F9D6B;     --ok-bg: #E2F4EC;   --ok-ink:#0E6B47;
  --warn: #C2871A;   --warn-bg: #FaeFd7;  --warn-ink:#8A5E0E;
  --danger: #D14343; --danger-bg:#FBE5E5; --danger-ink:#9C2B2B;
  --info: #2D6CB5;   --info-bg:#E4EFFA;   --info-ink:#1C4C86;
  --violet:#6B53C4;  --violet-bg:#ECE7FA;

  /* ---- Radii ---- */
  --r-xl: 26px;
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --r-pill: 999px;

  /* ---- Shadows ---- */
  --sh-sm: 0 1px 2px rgba(11,26,51,.06), 0 1px 3px rgba(11,26,51,.05);
  --sh-md: 0 4px 14px rgba(11,26,51,.08), 0 2px 4px rgba(11,26,51,.05);
  --sh-lg: 0 14px 40px rgba(11,26,51,.16), 0 4px 12px rgba(11,26,51,.08);
  --sh-gold: 0 8px 22px rgba(168,133,47,.30);

  --ff: "Noto Sans Thai","Noto Sans",-apple-system,system-ui,sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html, body { height: 100%; }

body {
  font-family: var(--ff);
  color: var(--ink);
  background:
    radial-gradient(1100px 700px at 12% -8%, #16335f 0%, transparent 55%),
    radial-gradient(900px 600px at 110% 8%, #102a52 0%, transparent 50%),
    linear-gradient(160deg, #0a1730 0%, #0c1d3c 48%, #0a1530 100%);
  background-color: #0a1730;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ===========================================================================
   STAGE — desktop: phone framed by a flow navigator; mobile: phone fills view
   ========================================================================== */
.stage {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 320px minmax(0,1fr);
  gap: 0;
}
.stage__rail {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
  padding: 30px 26px 40px;
  color: #dfe6f2;
}
.stage__main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  min-height: 100vh;
}

/* ---- Rail ---- */
.rail__brand { display:flex; align-items:center; gap:12px; margin-bottom: 6px; }
.rail__mark {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  background: linear-gradient(150deg, var(--gold-400), var(--gold-600));
  display:grid; place-items:center; color: var(--navy-900);
  font-weight: 800; font-size: 20px; box-shadow: var(--sh-gold);
}
.rail__name { font-weight: 700; font-size: 16px; letter-spacing: .2px; color:#fff; }
.rail__sub { font-size: 11px; color: #8fa0bd; letter-spacing: 2px; text-transform: uppercase; font-family:"Noto Sans",sans-serif; }
.rail__tag {
  display:inline-flex; align-items:center; gap:6px; margin-top:18px;
  font-size: 10.5px; letter-spacing:.6px; color:#FFD06B; font-family:"Noto Sans",sans-serif;
  border:1px solid rgba(245,164,0,.35); padding:5px 10px; border-radius: var(--r-pill);
  background: rgba(245,164,0,.08); text-transform: uppercase; font-weight:600;
}
.rail__section { margin-top: 26px; }
.rail__label { font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; color:#7e90b0; font-weight:600; margin-bottom: 10px; font-family:"Noto Sans",sans-serif; }

.navmod {
  width: 100%; text-align: left; cursor: pointer;
  display:flex; align-items:center; gap:12px;
  padding: 11px 12px; border-radius: var(--r-md);
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.05);
  color:#d7deec; font-family: var(--ff); font-size: 13.5px; font-weight:500;
  margin-bottom: 7px; transition: all .15s ease;
}
.navmod:hover { background: rgba(255,255,255,.07); border-color: rgba(245,164,0,.3); transform: translateX(2px); }
.navmod.is-active { background: linear-gradient(120deg, rgba(245,164,0,.18), rgba(245,164,0,.06)); border-color: rgba(245,164,0,.5); color:#fff; }
.navmod__ic { width: 30px; height:30px; border-radius: 9px; flex:none; display:grid; place-items:center; background: rgba(255,255,255,.06); font-size: 15px; }
.navmod.is-active .navmod__ic { background: linear-gradient(150deg, var(--gold-400), var(--gold-600)); color: var(--navy-900); }

.flowcard {
  margin-top: 8px; padding: 12px 13px; border-radius: var(--r-md);
  background: rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.06);
}
.flowcard__t { font-size: 11.5px; color:#aebccf; margin-bottom:8px; font-weight:600; }
.flowstep { display:flex; align-items:center; gap:7px; font-size:11.5px; color:#9fb0cd; padding:3px 0; font-family:"Noto Sans",sans-serif; }
.flowstep b { color:#e8cf8e; font-weight:600; }

.rail__foot { margin-top: 26px; font-size: 10.5px; line-height:1.6; color:#6f80a0; font-family:"Noto Sans",sans-serif; }

/* ===========================================================================
   PHONE FRAME
   ========================================================================== */
.phone {
  width: 402px; height: 858px;
  background: #05101f;
  border-radius: 52px;
  padding: 13px;
  box-shadow: var(--sh-lg), 0 0 0 2px rgba(245,164,0,.12), inset 0 0 0 2px rgba(255,255,255,.04);
  position: relative;
  flex: none;
}
.phone__screen {
  width: 100%; height: 100%;
  background: var(--bg);
  border-radius: 40px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
.phone__notch {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 132px; height: 28px; background:#05101f; z-index: 60;
  border-bottom-left-radius: 16px; border-bottom-right-radius: 16px;
}

/* ---- iOS-style status bar ---- */
.statusbar {
  height: 44px; flex: none; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px 0 30px; font-family: "Noto Sans", sans-serif;
  font-weight: 600; font-size: 14px; color: var(--statusbar-ink, #fff);
}
.statusbar__r { display:flex; align-items:center; gap: 6px; }
.statusbar__bars { display:flex; align-items:flex-end; gap:2px; height:11px; }
.statusbar__bars i { width:3px; background: currentColor; border-radius:1px; display:block; }
.statusbar__batt { width: 23px; height:11px; border:1.6px solid currentColor; border-radius:3px; position:relative; opacity:.9; }
.statusbar__batt::after { content:""; position:absolute; right:-3px; top:3px; width:2px; height:5px; background:currentColor; border-radius:0 1px 1px 0; }
.statusbar__batt i { position:absolute; left:1.4px; top:1.4px; bottom:1.4px; width:62%; background: currentColor; border-radius:1px; }

/* ---- App viewport (scroll region) ---- */
.app {
  flex: 1; min-height: 0; position: relative;
  display: flex; flex-direction: column;
  background: var(--bg);
}
.app__scroll {
  flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
.app__scroll::-webkit-scrollbar { width: 0; }

/* ===========================================================================
   PRIMITIVES
   ========================================================================== */
.scr { padding: 0 0 24px; }
.pad { padding-left: 18px; padding-right: 18px; }

/* App header (within a module) */
.ahead {
  position: sticky; top: 0; z-index: 30;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 12px 14px 13px;
  display: flex; align-items: center; gap: 12px;
}
.ahead--navy { background: var(--navy-800); border-bottom-color: transparent; }
.ahead__back {
  width: 38px; height: 38px; border-radius: 11px; flex:none;
  border: 1px solid var(--line); background: var(--surface-2);
  display:grid; place-items:center; cursor:pointer; color: var(--ink-2);
  transition: all .14s ease;
}
.ahead__back:hover { background: var(--surface-3); }
.ahead--navy .ahead__back { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color:#fff; }
.ahead__tt { flex:1; min-width:0; }
.ahead__t { font-size: 16.5px; font-weight: 700; color: var(--ink); line-height:1.2; }
.ahead--navy .ahead__t { color:#fff; }
.ahead__s { font-size: 11.5px; color: var(--dim); margin-top:1px; }
.ahead--navy .ahead__s { color:#9fb0cd; }
.ahead__act {
  width:38px; height:38px; border-radius:11px; flex:none; border:1px solid var(--line);
  background: var(--surface-2); display:grid; place-items:center; cursor:pointer; color:var(--ink-2);
}
.ahead--navy .ahead__act { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color:#fff; }

/* Cards */
.card {
  background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--sh-sm); border: 1px solid var(--line);
}
.card--flat { box-shadow: none; }
.card--pad { padding: 16px; }

/* Buttons */
.btn {
  font-family: var(--ff); font-weight: 600; font-size: 15px;
  border: none; cursor: pointer; border-radius: var(--r-md);
  padding: 14px 18px; display:inline-flex; align-items:center; justify-content:center; gap:9px;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease;
  width: 100%;
}
.btn:active { transform: scale(.978); }
.btn--gold { background: linear-gradient(140deg, var(--gold-400), var(--gold-600)); color: var(--navy-900); box-shadow: var(--sh-gold); }
.btn--navy { background: var(--navy-700); color: #fff; box-shadow: var(--sh-md); }
.btn--ghost { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line-2); }
.btn--danger { background: var(--danger-bg); color: var(--danger-ink); }
.btn--sm { padding: 10px 14px; font-size: 13.5px; border-radius: var(--r-sm); width:auto; }

/* Badges */
.badge {
  display:inline-flex; align-items:center; gap:5px;
  font-size: 11.5px; font-weight: 600; padding: 4px 10px; border-radius: var(--r-pill);
  font-family: var(--ff); white-space: nowrap; line-height:1;
}
.badge i { width:6px; height:6px; border-radius:50%; background: currentColor; display:block; }
.badge--ok { background: var(--ok-bg); color: var(--ok-ink); }
.badge--warn { background: var(--warn-bg); color: var(--warn-ink); }
.badge--danger { background: var(--danger-bg); color: var(--danger-ink); }
.badge--info { background: var(--info-bg); color: var(--info-ink); }
.badge--violet { background: var(--violet-bg); color: var(--violet); }
.badge--ghost { background: var(--surface-3); color: var(--ink-2); }

/* Pill chips (filters) */
.chips { display:flex; gap:8px; overflow-x:auto; padding: 2px 18px; scrollbar-width:none; }
.chips::-webkit-scrollbar{ display:none; }
.chip {
  flex:none; font-size: 13px; font-weight:500; padding: 8px 14px; border-radius: var(--r-pill);
  background: var(--surface); border:1px solid var(--line-2); color: var(--ink-2); cursor:pointer;
  font-family: var(--ff); transition: all .14s ease;
}
.chip.is-active { background: var(--navy-700); color:#fff; border-color: var(--navy-700); }

/* List row */
.lrow {
  display:flex; align-items:center; gap:13px; padding: 14px 16px;
  cursor:pointer; transition: background .14s ease; position:relative;
}
.lrow:hover { background: var(--surface-2); }
.lrow + .lrow { border-top: 1px solid var(--line); }
.lrow__av {
  width: 46px; height:46px; border-radius: 13px; flex:none; display:grid; place-items:center;
  font-weight:700; font-size: 17px; background: var(--surface-3); color: var(--navy-700);
}
.lrow__bd { flex:1; min-width:0; }
.lrow__t { font-size: 14.5px; font-weight:600; color: var(--ink); line-height:1.25; }
.lrow__s { font-size: 12px; color: var(--dim); margin-top:2px; }
.lrow__r { text-align:right; flex:none; }
.chev { color: var(--line-2); flex:none; }

/* Section heading */
.sh { display:flex; align-items:baseline; justify-content:space-between; padding: 0 2px 10px; }
.sh__t { font-size: 13px; font-weight:700; color: var(--ink-2); letter-spacing:.2px; white-space:nowrap; }
.sh__a { font-size: 12.5px; font-weight:600; color: var(--navy-600); cursor:pointer; }

/* Money */
.thb::before { content:"\000e3f"; font-family:"Noto Sans",sans-serif; opacity:.65; margin-right:1px; font-weight:600; }

/* Divider */
.dvd { height:1px; background: var(--line); border:0; margin: 0; }

/* ===========================================================================
   BOTTOM NAV
   ========================================================================== */
.bnav {
  flex: none; background: var(--surface); border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 14px rgba(11,26,51,.05);
}
.bnav__i { background:none; border:none; cursor:pointer; font-family:var(--ff);
  display:flex; flex-direction:column; align-items:center; gap:3px; padding:6px 2px; color: var(--dim); transition: color .14s ease; }
.bnav__i.is-active { color: var(--navy-700); }
.bnav__ic { width:24px; height:24px; }
.bnav__l { font-size: 10.5px; font-weight:600; }
.bnav__i.is-active .bnav__l { font-weight:700; }

/* ===========================================================================
   BOTTOM SHEET / MODAL
   ========================================================================== */
.sheet-wrap {
  position: absolute; inset: 0; z-index: 80;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet-scrim { position:absolute; inset:0; background: rgba(8,20,40,.46); backdrop-filter: blur(2px); animation: fade .22s ease; }
.sheet {
  position: relative; width: 100%; background: var(--surface);
  border-radius: 26px 26px 0 0; box-shadow: var(--sh-lg);
  padding: 8px 18px calc(20px + env(safe-area-inset-bottom));
  animation: slideup .3s cubic-bezier(.22,1,.36,1); max-height: 88%;
  display:flex; flex-direction:column;
}
.sheet--center { align-self:center; border-radius: 24px; width: calc(100% - 44px); margin: 0 22px; animation: pop .28s cubic-bezier(.22,1,.36,1); }
.sheet__grab { width: 42px; height: 5px; border-radius: 99px; background: var(--line-2); margin: 6px auto 12px; flex:none; }
.sheet__hd { display:flex; align-items:center; justify-content:space-between; padding: 0 2px 14px; }
.sheet__t { font-size: 18px; font-weight:700; }
.sheet__x { width:34px;height:34px;border-radius:10px;border:none;background:var(--surface-2);cursor:pointer;display:grid;place-items:center;color:var(--ink-2); }
.sheet__body { overflow-y:auto; min-height:0; }

@keyframes fade { from{opacity:0} to{opacity:1} }
@keyframes slideup { from{ transform: translateY(100%);} to{ transform: translateY(0);} }
@keyframes pop { from{ transform: scale(.92); opacity:0;} to{ transform: scale(1); opacity:1;} }
@keyframes screenin { from{ transform: translateY(10px);} to{ transform:none;} }
.screen-anim { animation: screenin .26s ease both; }

/* Toast */
.toast {
  position:absolute; left:50%; bottom: 96px; transform: translateX(-50%);
  z-index: 90; background: var(--navy-900); color:#fff; font-size:13px; font-weight:500;
  padding: 11px 18px; border-radius: var(--r-pill); box-shadow: var(--sh-lg);
  display:flex; align-items:center; gap:9px; animation: pop .26s ease; white-space:nowrap;
}
.toast i { color: var(--gold-400); display:flex; }

/* number stepper */
.step { display:flex; align-items:center; gap:0; border:1px solid var(--line-2); border-radius: var(--r-sm); overflow:hidden; }
.step button { width:32px;height:32px;border:none;background:var(--surface-2);cursor:pointer;font-size:18px;color:var(--navy-700);display:grid;place-items:center; font-family:"Noto Sans",sans-serif; }
.step button:active{ background: var(--surface-3); }
.step span { min-width: 34px; text-align:center; font-weight:700; font-size:14px; }

/* progress / timeline */
.tl { position:relative; padding-left: 8px; }
.tl__i { display:flex; gap:13px; padding-bottom: 2px; }
.tl__rail { display:flex; flex-direction:column; align-items:center; flex:none; }
.tl__dot { width: 26px; height:26px; border-radius:50%; display:grid; place-items:center; flex:none; font-size:13px; z-index:1;
  background: var(--surface-3); color: var(--dim); border: 2px solid var(--line); }
.tl__dot.is-done { background: var(--ok); color:#fff; border-color: var(--ok); }
.tl__dot.is-now { background: var(--info); color:#fff; border-color: var(--info); box-shadow: 0 0 0 4px var(--info-bg); }
.tl__line { width: 2px; flex:1; background: var(--line); min-height: 16px; }
.tl__line.is-done { background: var(--ok); }
.tl__bd { padding-bottom: 18px; flex:1; }
.tl__t { font-size: 13.5px; font-weight:600; color: var(--ink); }
.tl__time { font-size: 11.5px; color: var(--dim); margin-top:1px; }

/* photo placeholder */
.ph {
  background:
    repeating-linear-gradient(45deg, var(--surface-3) 0 11px, var(--surface-2) 11px 22px);
  border:1px solid var(--line); border-radius: var(--r-md);
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px;
  color: var(--dim); font-size: 12px; text-align:center;
}

/* mobile context banner (only shows on small screens) */
.mobile-note { display:none; }

/* ===========================================================================
   RESPONSIVE — collapse rail on smaller screens
   ========================================================================== */
@media (max-width: 1080px) {
  .stage { grid-template-columns: 1fr; }
  .stage__rail { display:none; }
  .stage__main { padding: 28px 16px; }
}
@media (max-width: 470px) {
  .stage__main { padding: 0; align-items: stretch; }
  .phone {
    width: 100vw; height: 100svh; min-height: 100vh; border-radius: 0; padding: 0;
    box-shadow: none;
  }
  .phone__screen { border-radius: 0; }
  .phone__notch { display:none; }
  .statusbar { height: 40px; padding-top: env(safe-area-inset-top); }
}
