/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[2].use[1]!../../node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[14].oneOf[2].use[2]!../../node_modules/next/font/google/target.css?{"path":"src\\app\\layout.tsx","import":"IBM_Plex_Sans_Thai","arguments":[{"subsets":["thai","latin"],"weight":["400","500","600","700"],"display":"swap","fallback":["system-ui","Tahoma","sans-serif"]}],"variableName":"font"} ***!
  \********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
/* cyrillic-ext */
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/db9bfcd87f1d73a3-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* thai */
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/4e2312c98e240c05-s.p.woff2) format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
/* latin-ext */
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/feed52454563c595-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/_next/static/media/f83e5507ec3854fa-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/8934311971e59087-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* thai */
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/bfdf244a9384e8b2-s.p.woff2) format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
/* latin-ext */
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/b10e9fa1144bb4fb-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/_next/static/media/d13ab8ed065835e4-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/d8c0f620f258dcc1-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* thai */
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/5fcb63deed33aab6-s.p.woff2) format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
/* latin-ext */
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/e595057e1ab84c19-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/_next/static/media/861fabf8a4ffc042-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* cyrillic-ext */
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/2b32cc5cb75c7a84-s.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* thai */
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/0d4277ce62acaedf-s.p.woff2) format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
/* latin-ext */
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/942c4903ae74b0f3-s.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'IBM Plex Sans Thai';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/_next/static/media/66c5464579bf95d1-s.p.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}@font-face {font-family: 'IBM Plex Sans Thai Fallback';src: local("Arial");ascent-override: 110.31%;descent-override: 52.78%;line-gap-override: 0.00%;size-adjust: 101.17%
}.__className_700a60 {font-family: 'IBM Plex Sans Thai', 'IBM Plex Sans Thai Fallback', system-ui, Tahoma, sans-serif;font-style: normal
}

/*!*************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ../../node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!../../node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./src/app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************************/
/*
 * LivePilot UI — glass / soft-depth style in a TikTok-inspired palette (ink black, pink #FE2C55, cyan #25F4EE).
 * Colors only: never use TikTok's logo, wordmark or note glyph (third-party tool, trademark).
 * Mobile-first: base styles target ~375px phones; wider layouts use min-width queries.
 */
:root {
  --pink: #fe2c55;
  --cyan: #25f4ee;
  --ink: #0b0b12;

  /* light theme */
  --bg: #eef0f5;
  --glow-a: rgb(37 244 238 / 22%);
  --glow-b: rgb(254 44 85 / 14%);
  --surface: rgb(255 255 255 / 68%);
  --surface-solid: #ffffff;
  --surface-2: rgb(255 255 255 / 45%);
  --glass-border: rgb(255 255 255 / 85%);
  --hairline: rgb(11 11 18 / 8%);
  --text: #0b0b12;
  --muted: #646778;
  --accent: var(--pink);
  --accent-ink: #ffffff;
  --accent-soft: rgb(254 44 85 / 10%);
  --focus: #0bb8b2;
  --good: #08875a;
  --good-soft: rgb(8 135 90 / 10%);
  --bad: #d81b45;
  --bad-soft: rgb(216 27 69 / 10%);
  --warn: #b26a00;
  --warn-soft: rgb(178 106 0 / 12%);
  --shadow: 0 10px 30px rgb(30 34 60 / 10%), 0 1px 2px rgb(30 34 60 / 6%);
  --blur: saturate(160%) blur(18px);

  --radius: 22px;
  --radius-sm: 14px;
  --tap: 48px;
  --nav-h: 66px;
  color-scheme: light;
}

/* Dark tokens: explicit choice (data-theme="dark"), or device preference unless the user picked light. */
:root[data-theme="dark"] {
  --bg: #06060a;
  --glow-a: rgb(37 244 238 / 16%);
  --glow-b: rgb(254 44 85 / 18%);
  --surface: rgb(255 255 255 / 6%);
  --surface-solid: #12121a;
  --surface-2: rgb(255 255 255 / 4%);
  --glass-border: rgb(255 255 255 / 10%);
  --hairline: rgb(255 255 255 / 8%);
  --text: #f4f4f7;
  --muted: #9a9cab;
  --accent-soft: rgb(254 44 85 / 16%);
  --focus: var(--cyan);
  --good: #3ddc97;
  --good-soft: rgb(61 220 151 / 14%);
  --bad: #ff5c7c;
  --bad-soft: rgb(255 92 124 / 14%);
  --warn: #ffbf47;
  --warn-soft: rgb(255 191 71 / 14%);
  --shadow: 0 12px 40px rgb(0 0 0 / 45%);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #06060a;
    --glow-a: rgb(37 244 238 / 16%);
    --glow-b: rgb(254 44 85 / 18%);
    --surface: rgb(255 255 255 / 6%);
    --surface-solid: #12121a;
    --surface-2: rgb(255 255 255 / 4%);
    --glass-border: rgb(255 255 255 / 10%);
    --hairline: rgb(255 255 255 / 8%);
    --text: #f4f4f7;
    --muted: #9a9cab;
    --accent-soft: rgb(254 44 85 / 16%);
    --focus: var(--cyan);
    --good: #3ddc97;
    --good-soft: rgb(61 220 151 / 14%);
    --bad: #ff5c7c;
    --bad-soft: rgb(255 92 124 / 14%);
    --warn: #ffbf47;
    --warn-soft: rgb(255 191 71 / 14%);
    --shadow: 0 12px 40px rgb(0 0 0 / 45%);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  color: var(--text);
  font-size: 16px; /* 16px stops iOS zooming into inputs */
  line-height: 1.55;
  -webkit-tap-highlight-color: transparent;
  background:
    radial-gradient(60vmax 50vmax at -10% -10%, var(--glow-a), transparent 60%),
    radial-gradient(55vmax 45vmax at 110% 105%, var(--glow-b), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 700; }
h2 { font-size: 1.15rem; font-weight: 600; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.num { font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }

/* Glass surface used by cards, bars, inputs */
.glass, .card, .topbar, .tabbar, .savebar, fieldset {
  background: var(--surface);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
}

/* ── Brand ─────────────────────────────────────────────── */
.brand { font-weight: 700; color: var(--text); display: flex; align-items: center; gap: .55rem; letter-spacing: -.01em; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 10px; background: var(--ink);
  display: grid; place-items: center; color: #fff; font-size: .78rem; font-weight: 800;
  /* chromatic offset in the palette's two accents */
  text-shadow: -1.5px -1px 0 var(--cyan), 1.5px 1px 0 var(--pink);
  box-shadow: -2px -2px 0 rgb(37 244 238 / 55%), 2px 2px 0 rgb(254 44 85 / 55%);
}

/* ── App shell ─────────────────────────────────────────── */
.shell { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: -webkit-sticky;
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: .75rem;
  padding: calc(env(safe-area-inset-top) + .7rem) 16px .7rem;
  border-width: 0 0 1px; border-radius: 0;
}
.topbar .spacer { flex: 1 1; }
.global-halt-banner { position: -webkit-sticky; position: sticky; top: calc(58px + env(safe-area-inset-top)); z-index: 19; padding: 10px 16px; font-weight: 700; text-align: center; }
.global-halt-banner.admin { background: #a91132; color: #fff; }
.global-halt-banner.customer { background: var(--surface-2); color: var(--text); border-bottom: 1px solid var(--hairline); }
.global-halt-control { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--bad); }
.global-halt-control h2 { color: var(--bad); margin: 0 0 4px; }
.global-halt-control p { margin: 0; }
.global-halt-control .halt-trigger { width: 100%; background: var(--bad); color: #fff; border-color: var(--bad); }
@media (min-width: 640px) { .global-halt-control .halt-trigger { width: auto; } }
@media (min-width: 900px) { .global-halt-banner { top: 80px; } }
.content {
  flex: 1 1; width: 100%; max-width: 1100px; margin: 0 auto;
  padding: 18px 16px calc(var(--nav-h) + env(safe-area-inset-bottom) + 40px);
}

/* Floating glass tab bar with a raised centre button (phones) */
.tabbar {
  position: fixed; z-index: 30;
  left: 12px; right: 12px; bottom: calc(env(safe-area-inset-bottom) + 10px);
  height: var(--nav-h);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: center;
  border-radius: 26px; box-shadow: var(--shadow);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); font-size: .7rem; min-height: var(--tap);
}
.tabbar a svg { width: 22px; height: 22px; }
.tabbar a[aria-current="page"] { color: var(--text); font-weight: 600; }
.tabbar a[aria-current="page"]:not(.tab-center) svg { color: var(--accent); }
.tabbar a.tab-center { position: relative; }
.tabbar a.tab-center svg {
  width: 58px; height: 58px; padding: 16px; margin-top: -30px; border-radius: 50%;
  color: #fff; background: var(--ink);
  box-shadow: -3px -2px 0 var(--cyan), 3px 2px 0 var(--pink), 0 10px 24px rgb(254 44 85 / 35%);
}
.tabbar a.tab-center[aria-current="page"] svg { background: var(--pink); box-shadow: -3px -2px 0 var(--cyan), 0 10px 28px rgb(254 44 85 / 50%); }
.nav-brand { display: none !important; }
.tabbar a.only-desktop { display: none; }

@media (min-width: 900px) {
  .shell.with-nav { flex-direction: row; }
  .shell.with-nav > .main-col { flex: 1 1; min-width: 0; display: flex; flex-direction: column; }
  .tabbar {
    position: -webkit-sticky;
    position: sticky; top: 12px; left: auto; right: auto; bottom: auto; margin: 12px 0 12px 12px;
    height: calc(100dvh - 24px); width: 230px; padding: 16px 12px;
    grid-auto-flow: row; grid-auto-rows: max-content; grid-auto-columns: auto; align-items: stretch; gap: 4px;
  }
  .tabbar a { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 14px; border-radius: var(--radius-sm); font-size: .95rem; }
  .tabbar a[aria-current="page"] { background: var(--accent-soft); }
  .tabbar a.tab-center svg { width: 22px; height: 22px; padding: 0; margin: 0; background: none; color: inherit; box-shadow: none; }
  .tabbar a.tab-center[aria-current="page"] svg { background: none; box-shadow: none; color: var(--accent); }
  .tabbar .nav-brand { display: flex !important; margin-bottom: 14px; padding: 4px 8px; }
  .tabbar a.only-desktop { display: flex; }
  .tabbar a.only-phone { display: none; }
  .topbar { margin: 12px 12px 0; border-radius: var(--radius); border-width: 1px; top: 12px; }
  .content { padding: 22px 24px 40px; }
}

/* ── Building blocks ───────────────────────────────────── */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.stack { display: grid; grid-gap: 14px; gap: 14px; }
.grid { display: grid; grid-gap: 14px; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid.cols-2 { grid-template-columns: repeat(2, 1fr); } .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }

.card { border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
/* "Ink" card: the deep dark panel from the reference, glows in both accents */
.card.ink, .card.highlight {
  color: #f4f4f7; border-color: rgb(255 255 255 / 10%);
  background:
    radial-gradient(120% 90% at 100% 0%, rgb(254 44 85 / 28%), transparent 55%),
    radial-gradient(110% 90% at 0% 100%, rgb(37 244 238 / 18%), transparent 55%),
    linear-gradient(160deg, #171724, #0b0b12);
}
.card.ink .muted, .card.highlight .muted { color: #a6a8b8; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 12px 0; border-top: 1px solid var(--hairline); }
.list > li:first-child { border-top: 0; }

.kpi .label { color: var(--muted); font-size: .82rem; }
.kpi .value { font-size: 1.7rem; font-weight: 700; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi:first-child { /* lead metric gets the ink treatment */
  color: #f4f4f7; border-color: rgb(255 255 255 / 10%);
  background: radial-gradient(120% 90% at 100% 0%, rgb(254 44 85 / 30%), transparent 55%), linear-gradient(160deg, #171724, #0b0b12);
}
.kpi:first-child .label { color: #a6a8b8; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px;
  font-size: .74rem; font-weight: 600; white-space: nowrap;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--hairline);
}
.badge.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.badge.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.accent { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.card.ink .badge, .card.highlight .badge { background: rgb(255 255 255 / 10%); color: #fff; }
.card.highlight .badge.accent { background: var(--pink); color: #fff; }

.alert {
  display: block; padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: .95rem;
  border: 1px solid transparent; -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
}
.alert.good { background: var(--good-soft); color: var(--good); }
.alert.bad { background: var(--bad-soft); color: var(--bad); }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.info { background: rgb(37 244 238 / 12%); color: var(--text); border-color: rgb(37 244 238 / 35%); }

/* ── Buttons & forms ───────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 0 20px; border-radius: 999px;
  border: 1px solid var(--glass-border); background: var(--surface); color: var(--text);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  font: inherit; font-weight: 600; cursor: pointer; transition: transform .08s, box-shadow .2s, background .2s;
}
.btn.primary {
  background: var(--pink); border-color: transparent; color: #fff;
  box-shadow: 0 8px 22px rgb(254 44 85 / 35%), inset 0 1px 0 rgb(255 255 255 / 25%);
}
.btn.primary:hover { box-shadow: 0 10px 28px rgb(254 44 85 / 45%), inset 0 1px 0 rgb(255 255 255 / 25%); }
.btn.dark { background: var(--ink); color: #fff; border-color: transparent; }
.btn.danger { color: var(--bad); }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: .85rem; }
.btn:active { transform: scale(.98); }
.card.ink .btn:not(.primary), .card.highlight .btn:not(.primary) { background: rgb(255 255 255 / 10%); color: #fff; border-color: rgb(255 255 255 / 14%); }

form.form { display: grid; grid-gap: 14px; gap: 14px; }
.field { display: grid; grid-gap: 6px; gap: 6px; }
.name-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.name-chips .btn { min-width: 0; min-height: 48px; padding: 0 10px; }
.field > span { font-size: .88rem; font-weight: 600; }
.field > small { color: var(--muted); font-size: .8rem; }
.field-heading { display: flex; align-items: center; gap: 6px; min-height: 24px; }
.field-heading label { flex: 1 1; font-size: .88rem; font-weight: 600; }
.info-trigger { position: relative; flex: 0 0 24px; width: 24px; height: 24px; }
.info-button {
  position: relative; width: 20px; height: 20px; padding: 0; border: 1px solid var(--hairline); border-radius: 50%;
  background: var(--surface-solid); color: var(--accent); font: inherit; font-size: .7rem; font-weight: 800; line-height: 18px; cursor: pointer;
}
.info-button::after { content: ""; position: absolute; inset: -12px; }
.info-button:focus-visible, .info-trigger[data-open="true"] .info-button { background: var(--accent-soft); }
.info-panel {
  display: none; position: absolute; z-index: 40; top: calc(100% + 6px); right: 0;
  width: min(280px, calc(100vw - 48px)); padding: 10px 12px; border: 1px solid var(--hairline);
  border-radius: var(--radius-sm); background: var(--surface-solid); color: var(--text);
  box-shadow: var(--shadow); font-size: .82rem; font-weight: 400; line-height: 1.45;
}
.info-button:focus-visible + .info-panel, .info-trigger[data-open="true"] .info-panel { display: block; }
@media (hover: hover) {
  .info-trigger:hover .info-button { background: var(--accent-soft); }
  .info-trigger:hover .info-panel { display: block; }
}
.scale-option { display: grid; grid-gap: 12px; gap: 12px; padding: 14px; border: 1px solid var(--hairline); border-radius: var(--radius-sm); }
.scale-option p { margin: 0; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="date"], input[type="datetime-local"], input[type="search"], select, textarea {
  width: 100%; min-height: var(--tap); padding: 10px 14px;
  border: 1px solid var(--hairline); border-radius: var(--radius-sm);
  background: var(--surface-solid); color: var(--text); font: inherit; font-size: 16px;
}
textarea { min-height: 96px; resize: vertical; }
.campaign-command-row { display: flex; flex-wrap: wrap; gap: 8px; }
.campaign-command-row > * { min-width: 0; flex: 1 1 120px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, .info-button:focus-visible, a:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
}
.check { display: flex; align-items: center; gap: 12px; min-height: var(--tap); }
.check input { width: 22px; height: 22px; accent-color: var(--pink); }
.row-2 { display: grid; grid-gap: 14px; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .row-2 { grid-template-columns: 1fr 1fr; } }
.days-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-gap: 4px; gap: 4px; }
@media (min-width: 640px) { .days-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
fieldset { border-radius: var(--radius); padding: 16px; margin: 0; display: grid; grid-gap: 14px; gap: 14px; box-shadow: var(--shadow); }
legend { padding: 4px 12px; font-weight: 700; font-size: .9rem; border-radius: 999px; background: var(--ink); color: #fff; }

/* Sticky save bar sits above the floating tab bar */
.savebar {
  position: -webkit-sticky;
  position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 20px); z-index: 10;
  display: flex; gap: 8px; padding: 8px; border-radius: 999px; box-shadow: var(--shadow);
}
.savebar .btn { flex: 1 1; }
@media (min-width: 900px) { .savebar { bottom: 16px; } }

.table-wrap { overflow-x: auto; }
.analytics-page { min-width: 0; grid-template-columns: minmax(0, 1fr); }
.analytics-page > * { min-width: 0; }
.analytics-filters { display: grid; grid-gap: 14px; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.analytics-filter-main { display: grid; grid-gap: 10px; gap: 10px; grid-template-columns: minmax(0, 1fr); align-items: end; }
.analytics-filter-main .btn { width: 100%; }
.analytics-filter-extra { display: grid; grid-gap: 12px; gap: 12px; grid-template-columns: minmax(0, 1fr); padding-top: 14px; border-top: 1px solid var(--hairline); }
.analytics-filter-row { display: grid; grid-gap: 12px; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.analytics-filter-extra .analytics-filter-row { grid-column: 1 / -1; }
.analytics-filters .field, .analytics-filters select { min-width: 0; }
.analytics-include { font-size: .88rem; }
.analytics-selection { margin: 0; overflow-wrap: anywhere; }
.analytics-identity-details { display: grid; grid-gap: 12px; gap: 12px; grid-template-columns: minmax(0, 1fr); }
.analytics-identity-details h2, .analytics-identity-details p { margin: 0; overflow-wrap: anywhere; }
.analytics-identity-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.analytics-identity-title { min-width: 0; }
.analytics-identity-eyebrow { display: block; color: var(--muted); font-size: .75rem; font-weight: 600; }
.analytics-identity-title h2 { margin: 2px 0; }
.analytics-identity-edit { flex: 0 0 auto; padding: 0 14px; }
.analytics-identity-rename { display: grid; grid-gap: 10px; gap: 10px; align-items: end; padding: 12px 0; border-top: 1px solid var(--hairline); }
.analytics-identity-technical { border-top: 1px solid var(--hairline); }
.analytics-identity-technical summary { display: flex; align-items: center; min-height: var(--tap); color: var(--muted); font-size: .875rem; font-weight: 600; cursor: pointer; list-style: none; }
.analytics-identity-technical summary::-webkit-details-marker { display: none; }
.analytics-identity-technical summary::after { content: ""; width: 8px; height: 8px; margin: -4px 4px 0 auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.analytics-identity-technical[open] summary::after { margin-top: 4px; transform: rotate(225deg); }
.analytics-identity-technical summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.analytics-identity-technical-content { display: grid; grid-gap: 10px; gap: 10px; padding: 0 0 4px; }
.analytics-identity-technical dl { display: grid; grid-gap: 8px; gap: 8px; margin: 0; }
.analytics-identity-technical dt { color: var(--muted); font-size: .75rem; }
.analytics-identity-technical dd { margin: 0; font-size: .875rem; overflow-wrap: anywhere; }
.analytics-range { margin: 0; }
.analytics-chart { display: flex; gap: 10px; align-items: stretch; overflow-x: auto; min-height: 210px; padding: 12px 2px 0; }
.analytics-bar-item { display: flex; flex: 1 0 52px; min-width: 52px; max-width: 100px; height: 180px; flex-direction: column; align-items: center; justify-content: flex-end; gap: 5px; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; }
.analytics-bar-item strong { font-size: .72rem; font-weight: 600; white-space: nowrap; }
.analytics-bar-item small { font-size: .72rem; color: var(--muted); white-space: nowrap; }
.analytics-bar { display: block; width: min(100%, 44px); min-height: 3px; border-radius: 5px 5px 0 0; background: var(--pink); }
.analytics-page .kpi .value { overflow-wrap: anywhere; }
@media (min-width: 640px) { .analytics-filter-main { grid-template-columns: minmax(180px, 1fr) auto auto; } .analytics-filter-main .btn { width: auto; } .analytics-filter-extra { grid-template-columns: repeat(2, minmax(0, 1fr)); } .analytics-identity-rename { grid-template-columns: minmax(0, 1fr) auto; } }
@media (min-width: 1000px) { .analytics-filter-extra { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--hairline); white-space: nowrap; }
table.data th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; }

/* ── Pricing ───────────────────────────────────────────── */
.price { font-size: 2rem; font-weight: 800; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.price small { font-size: .9rem; font-weight: 500; color: var(--muted); }
.card.highlight .price small { color: #a6a8b8; }
.features { list-style: none; padding: 0; margin: 12px 0; display: grid; grid-gap: 6px; gap: 6px; }
.features li::before { content: "✓"; color: var(--cyan); font-weight: 800; margin-right: 8px; text-shadow: 0 0 1px rgb(0 0 0 / 30%); }

.empty { text-align: center; padding: 44px 18px; color: var(--muted); }
.empty .icon {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; display: grid; place-items: center;
  font-size: 1.6rem; color: #fff; background: var(--ink);
  box-shadow: -3px -3px 0 var(--cyan), 3px 3px 0 var(--pink);
}

/* ── Auth ──────────────────────────────────────────────── */
.google-btn { background: #fff; color: #1f1f1f; border-color: #dadce0; }
.divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--muted); font-size: .85rem; }
.divider::before, .divider::after { content: ""; flex: 1 1; height: 1px; background: var(--hairline); }

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

/* Theme toggle: icon-only on small phones */
.icon-btn { padding: 0 12px; }
.icon-btn-label { display: none; }
@media (min-width: 480px) { .icon-btn-label { display: inline; } }

/* ── Loading feedback ──────────────────────────────────── */
.nav-progress {
  position: fixed; top: 0; left: 0; z-index: 100; height: 3px; width: 0; opacity: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  box-shadow: 0 0 10px rgb(254 44 85 / 60%);
}
.nav-progress[data-phase="loading"] { opacity: 1; width: 85%; transition: width 8s cubic-bezier(.1, .7, .2, 1); }
.nav-progress[data-phase="done"] { opacity: 0; width: 100%; transition: width .2s ease-out, opacity .3s .2s; }

@keyframes lp-spin { to { transform: rotate(360deg); } }
@keyframes lp-pulse { 50% { opacity: .35; transform: scale(.9); } }
@keyframes lp-shimmer { to { background-position: -200% 0; } }

/* Buttons/links waiting for the server: spinner + no double taps */
.btn[data-pending], .btn[data-nav-pending], button[data-pending] { position: relative; color: transparent !important; pointer-events: none; }
.btn[data-pending]::after, .btn[data-nav-pending]::after, button[data-pending]::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-color: var(--muted) var(--muted) var(--muted) transparent;
  animation: lp-spin .7s linear infinite;
}
.btn.primary[data-pending]::after, .btn.primary[data-nav-pending]::after { border-color: #fff #fff #fff transparent; }
.tabbar a svg.tab-pending { animation: lp-pulse .8s ease-in-out infinite; color: var(--accent); }
.tabbar a[data-nav-pending] { color: var(--text); }

.skeleton {
  border-radius: 10px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--hairline) 37%, var(--surface-2) 63%);
  background-size: 200% 100%; animation: lp-shimmer 1.2s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .nav-progress[data-phase="loading"] { transition: none; }
  .skeleton, .tabbar a svg.tab-pending, .btn[data-pending]::after { animation: none; }
}

.shop-switcher {
  position: relative;
  min-width: 0;
}
.shop-switcher summary {
  cursor: pointer;
  list-style: none;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shop-switcher summary::-webkit-details-marker {
  display: none;
}
.shop-switcher-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  right: 0;
  width: min(290px, calc(100vw - 20px));
  padding: 10px;
  box-shadow: 0 12px 35px #0004;
}
.shop-switcher-menu .btn {
  justify-content: flex-start;
  gap: 8px;
  text-align: left;
  min-height: 48px;
}
@media (max-width: 639px) {
  .topbar {
    gap: 0.35rem;
    padding-left: 10px;
    padding-right: 10px;
  }
  .topbar .brand {
    font-size: 0;
  }
  .shop-switcher summary {
    max-width: 115px;
    min-height: 48px;
  }
}

.plan-mode-segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 6px;
  gap: 6px;
  padding: 4px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--ink, #0b0b12) 9%, transparent);
}
.plan-mode-segment > *,
.plan-mode-segment form,
.plan-mode-segment .btn {
  width: 100%;
}
.plan-mode-segment span {
  display: grid;
  place-items: center;
  min-height: 48px;
}
.plan-mode-segment .selected {
  border-radius: 12px;
  background: #0b0b12;
  color: white;
  font-weight: 700;
}
.plan-control-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.plan-control-row > form,
.plan-control-row > button {
  flex: 1 1 120px;
}
.plan-control-row form .btn {
  width: 100%;
  min-height: 48px;
}
.plan-inline-confirm {
  padding: 14px;
  border: 1px solid #fe2c55;
  border-radius: 16px;
}
.plan-status-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 5px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: plan-spin 0.8s linear infinite;
}
@keyframes plan-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── Modal (components/Modal.tsx) ─────────────────────── */
.modal {
  width: min(440px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--glass-border);
  border-radius: var(--radius); background: var(--surface-solid); color: var(--text); box-shadow: 0 24px 60px rgb(0 0 0 / 35%);
}
.modal::-webkit-backdrop { background: rgb(6 6 10 / 55%); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal::backdrop { background: rgb(6 6 10 / 55%); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal[open] { animation: lp-modal-in .18s ease-out; }
.modal-body { display: grid; grid-gap: 12px; gap: 12px; padding: 20px; }
.modal-title { margin: 0; font-size: 1.1rem; }
.modal-danger .modal-title::before { content: "⚠ "; color: var(--bad); }
.modal-body p { margin: 0; color: var(--muted); }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 4px; }
.modal-actions > * { flex: 1 1 140px; }
.modal-actions form { display: contents; }
.modal-actions .btn { width: 100%; }
.campaign-edit-actions { position: -webkit-sticky; position: sticky; bottom: 0; padding: 12px 0 2px; background: var(--surface-solid); }
@keyframes lp-modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
/* Phones: bottom sheet */
@media (max-width: 639px) {
  .modal {
    width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 22px 22px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .modal[open] { animation: lp-sheet-in .22s ease-out; }
  @keyframes lp-sheet-in { from { transform: translateY(100%); } }
}
.sheet-actions { display: grid; grid-gap: 8px; gap: 8px; }
.sheet-actions .btn { width: 100%; min-height: 50px; justify-content: flex-start; padding: 0 18px; }

.view-as-banner {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  background: #0b0b12;
  color: white;
  border: 1px solid #25f4ee;
  border-radius: 0.75rem;
  font-size: 0.875rem;
}
.view-as-banner span { min-width: 0; overflow-wrap: anywhere; }
/* Admin audit */
.audit-filters { display: grid; grid-gap: 10px; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.audit-filters .field, .audit-filters input { min-width: 0; }
.audit-filters .field:first-child, .audit-filters .field:nth-child(3), .audit-filter-actions { grid-column: 1 / -1; }
.audit-filter-actions { display: flex; align-items: end; gap: 8px; }
.audit-filter-actions .btn { flex: 1 1; }
.audit-entry { padding: 0; min-width: 0; }
.audit-entry summary { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 16px; cursor: pointer; list-style: none; min-height: 64px; }
.audit-entry summary::-webkit-details-marker { display: none; }
.audit-summary-main { display: grid; grid-gap: 3px; gap: 3px; min-width: 0; overflow-wrap: anywhere; }
.audit-summary-meta { display: flex; gap: 8px; align-items: center; flex: 0 0 auto; }
.audit-detail { display: grid; grid-gap: 12px; gap: 12px; padding: 0 16px 16px; overflow-wrap: anywhere; }
.audit-changes { display: grid; grid-gap: 10px; gap: 10px; }
.audit-change { padding: 10px; border-radius: 12px; background: var(--surface-2); }
.audit-values { display: grid; grid-gap: 8px; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.audit-values pre { margin: 4px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .75rem; }
.audit-pagination { display: flex; justify-content: space-between; gap: 8px; }
@media (min-width: 640px) {
  .audit-filters { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .audit-filters .field:first-child, .audit-filters .field:nth-child(3) { grid-column: span 2; }
  .audit-filter-actions { grid-column: auto; }
}

/* /admin/more — phone list of admin pages that do not fit the bottom bar */
.more-list { display: flex; flex-direction: column; padding: 4px 0; }
.more-list a { padding: 14px 16px; min-height: var(--tap); color: var(--text); }
.more-list a + a { border-top: 1px solid var(--hairline); }
.more-item { display: inline-flex; align-items: center; gap: 12px; }
.more-item svg { width: 22px; height: 22px; color: var(--accent); }

/* Plan editor while the plan runs: locked settings stay in the form (inert, not disabled) so the server can verify
   them; editable ones look normal. */
.locked-field { position: relative; opacity: .5; }
.locked-field::after { content: "🔒"; position: absolute; top: 0; right: 0; font-size: .8rem; pointer-events: none; }

/* Settings left the phone tab bar for the live cockpit (2026-10-12): a top-bar icon on phones only. */
.btn.topbar-settings { min-width: 44px; min-height: 44px; padding: 0; }
@media (min-width: 900px) { .btn.topbar-settings { display: none; } }

