:root {
  color-scheme: dark;
  --bg: #031012;
  --frame: #050a0b;
  --surface: #0a1011;
  --surface-2: #0d1516;
  --surface-3: #111b1c;
  --line: rgba(151, 220, 214, .13);
  --line-strong: rgba(88, 236, 221, .27);
  --ui-accent: #4ee9d5;
  --ui-accent-2: #8cf6e8;
  --ui-glow: rgba(78, 233, 213, .18);
  --warning: #f4b86a;
  --danger: #ff7078;
  --text: #f0f7f5;
  --muted: #81908e;
  --muted-2: #a8b6b3;
  --brand-primary: #17324d;
  --brand-secondary: #e67e22;
  --brand-accent: #f7f4ed;
  --font-heading: "Noto Sans Thai", "Leelawadee UI", "Segoe UI", sans-serif;
  --font-body: "Noto Sans Thai", "Leelawadee UI", "Segoe UI", sans-serif;
  font-family: var(--font-body);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 82% 18%, rgba(32, 133, 129, .32), transparent 32rem),
    radial-gradient(circle at 8% 88%, rgba(18, 91, 96, .28), transparent 38rem),
    linear-gradient(145deg, #061719, #02090a 55%, #0c3031);
  font: 14px/1.55 var(--font-body);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background-image:
    linear-gradient(rgba(99, 236, 224, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 236, 224, .08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 75% 25%, black, transparent 68%);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ambient { position: fixed; z-index: -1; border-radius: 50%; filter: blur(100px); pointer-events: none; }
.ambient-one { top: 4%; right: 2%; width: 360px; height: 360px; background: rgba(32, 199, 184, .2); }
.ambient-two { left: 2%; bottom: 0; width: 280px; height: 280px; background: rgba(17, 94, 105, .26); }

.shell {
  position: relative;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  grid-template-rows: 76px minmax(0, 1fr);
  width: min(1480px, calc(100% - 40px));
  min-height: calc(100vh - 40px);
  margin: 20px auto;
  overflow: hidden;
  background: rgba(4, 9, 10, .96);
  border: 1px solid rgba(116, 230, 219, .24);
  border-radius: 28px;
  box-shadow: 0 34px 100px rgba(0, 0, 0, .48), 0 0 0 8px rgba(80, 178, 173, .055);
  backdrop-filter: blur(24px);
}

.side-nav {
  grid-row: 1 / 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 18px 12px;
  background: linear-gradient(180deg, #071011, #050a0b);
  border-right: 1px solid var(--line);
}
.nav-brand, .mark { display: block; object-fit: contain; background: transparent; }
.nav-brand { width: 48px; height: 48px; }
.program-logo { filter: drop-shadow(0 8px 15px rgba(78, 233, 213, .2)); }
.nav-stack { display: grid; gap: 8px; }
.side-nav-item {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  color: #73817f;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 800;
  transition: color .18s, background .18s, border-color .18s, transform .18s;
}
.side-nav-item:hover, .side-nav-item:focus-visible {
  color: var(--text);
  background: rgba(255, 255, 255, .045);
  border-color: var(--line);
  outline: none;
}
.side-nav-item.active {
  color: var(--ui-accent);
  background: linear-gradient(145deg, rgba(78, 233, 213, .15), rgba(78, 233, 213, .035));
  border-color: rgba(78, 233, 213, .22);
  box-shadow: inset 0 0 18px rgba(78, 233, 213, .05);
}
.nav-bottom { display: grid; gap: 12px; align-items: center; margin-top: auto; }
.nav-online {
  width: 9px;
  height: 9px;
  margin: 0 auto;
  background: var(--ui-accent);
  border: 2px solid #0a2724;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(78, 233, 213, .1), 0 0 14px var(--ui-accent);
}

.brand {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-width: 0;
  padding: 12px 22px;
  background: rgba(5, 10, 11, .94);
  border-bottom: 1px solid var(--line);
}
.brand-identity, .top-actions, .top-status { display: flex; align-items: center; }
.brand-identity { gap: 12px; min-width: 0; }
.brand-identity > div:last-child { min-width: 0; }
.mark { flex: 0 0 auto; width: 48px; height: 48px; }
.brand-logo { width: 48px; height: 48px; object-fit: contain; padding: 4px; background: var(--brand-accent); border-radius: 12px; }
.eyebrow, .step { margin: 0; color: var(--ui-accent); font-size: 10px; font-weight: 800; letter-spacing: .17em; }
.brand h1 { margin: 2px 0 0; overflow: hidden; font: 700 19px/1.2 var(--font-heading); text-overflow: ellipsis; white-space: nowrap; }
.top-actions { gap: 10px; }
.top-status { gap: 8px; padding: 8px 11px; color: #b9c6c3; background: rgba(255,255,255,.03); border: 1px solid var(--line); border-radius: 11px; font-size: 11px; font-weight: 700; }
.status-dot { width: 7px; height: 7px; background: var(--ui-accent); border-radius: 50%; box-shadow: 0 0 10px var(--ui-accent); }
.test-badge { padding: 8px 11px; color: var(--warning); background: rgba(244,184,106,.07); border: 1px solid rgba(244,184,106,.18); border-radius: 11px; font-size: 9px; font-weight: 850; letter-spacing: .09em; }

.card { grid-column: 2; min-width: 0; background: #070c0d; }
.narrow { padding: 28px; }
.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
  min-height: calc(100vh - 145px);
  overflow: hidden;
  background:
    radial-gradient(circle at 38% 40%, rgba(39, 164, 157, .18), transparent 22rem),
    linear-gradient(145deg, #070c0d, #091314);
  border: 1px solid var(--line);
  border-radius: 22px;
}
.login-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: clamp(34px, 6vw, 78px);
  overflow: hidden;
  border-right: 1px solid var(--line);
}
.login-intro::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .22;
  background-image:
    linear-gradient(rgba(78,233,213,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(78,233,213,.12) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(circle at 55% 48%, black, transparent 70%);
  pointer-events: none;
}
.login-intro > * { position: relative; z-index: 1; }
.login-intro h2 { max-width: 720px; margin: 14px 0 18px; font: 730 clamp(34px, 5vw, 68px)/1.08 var(--font-heading); letter-spacing: -.045em; }
.login-intro h2 span { color: var(--ui-accent); text-shadow: 0 0 26px rgba(78,233,213,.16); }
.login-copy { max-width: 650px; margin: 0; font-size: 15px; line-height: 1.8; }
.login-signals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 38px; }
.login-signals div { display: grid; gap: 3px; padding: 16px; background: rgba(6, 13, 14, .74); border: 1px solid var(--line); border-radius: 14px; }
.login-signals span { color: var(--ui-accent); font-size: 10px; font-weight: 900; }
.login-signals strong { font-size: 13px; }
.login-signals small { color: var(--muted); font-size: 10px; }
.system-line { display: flex; align-items: center; gap: 9px; margin-top: 20px; color: #859492; font-size: 10px; letter-spacing: .05em; }
.system-line i { width: 6px; height: 6px; background: var(--ui-accent); border-radius: 50%; box-shadow: 0 0 10px var(--ui-accent); }
.login-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(30px, 4.5vw, 60px); background: rgba(3, 8, 9, .78); }
.login-visual { position: relative; display: grid; place-items: center; width: 76px; height: 76px; margin-bottom: 24px; }
.login-icon { z-index: 2; display: block; width: 68px; height: 68px; object-fit: contain; background: transparent; border-radius: 0; filter: drop-shadow(0 0 18px rgba(78,233,213,.24)); }
.login-orbit { position: absolute; border: 1px solid rgba(78,233,213,.2); border-radius: 50%; }
.orbit-one { inset: 5px; }
.orbit-two { inset: -2px; border-style: dashed; opacity: .5; }
.login-panel h3 { margin: 8px 0; font: 700 29px/1.25 var(--font-heading); }
.login-panel > .muted { margin: 0 0 24px; line-height: 1.75; }
.login-panel form { margin: 0; }
.login-panel label { font-size: 11px; }
.security-note { display: flex; align-items: center; gap: 8px; margin: 22px 0 0; color: #647370; font-size: 10px; }
.dev-code { padding: 10px 12px; color: var(--ui-accent); background: rgba(78,233,213,.06); border: 1px solid var(--line); border-radius: 9px; font-family: ui-monospace, monospace; }

label { display: grid; gap: 7px; color: #bdc9c6; font-weight: 650; }
input, select, textarea {
  width: 100%;
  padding: 12px 13px;
  color: var(--text);
  background: #0b1314;
  border: 1px solid rgba(154,190,185,.16);
  border-radius: 10px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
select { color-scheme: dark; }
textarea { min-height: 76px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #586563; }
input:hover, select:hover, textarea:hover { background: #0d1718; border-color: rgba(154,220,213,.26); }
input:focus, select:focus, textarea:focus { background: #0c1617; border-color: var(--ui-accent); box-shadow: 0 0 0 3px rgba(78,233,213,.08); }

button {
  color: #02100e;
  background: var(--ui-accent);
  border: 0;
  border-radius: 10px;
  font-weight: 800;
  transition: transform .16s, box-shadow .16s, filter .16s;
}
button:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(78,233,213,.12); }
button:active { transform: translateY(0); }
.primary-action, .submit-action, .overview-action { display: flex; align-items: center; justify-content: space-between; }
.primary-action { width: 100%; margin-top: 14px; padding: 13px 15px; }
.primary-action b, .submit-action b { display: grid; place-items: center; width: 28px; height: 28px; background: rgba(0,0,0,.12); border-radius: 8px; }
button.secondary { color: var(--ui-accent); background: rgba(78,233,213,.07); border: 1px solid rgba(78,233,213,.17); }
button.compact { padding: 9px 12px; font-size: 11px; }

#upload-card { min-width: 0; background: #060b0c; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 26px 18px; border-bottom: 1px solid var(--line); }
.card-head h2 { margin: 5px 0 2px; font: 700 clamp(21px, 2.8vw, 31px)/1.2 var(--font-heading); letter-spacing: -.03em; }
.workspace-intro { margin: 0; font-size: 12px; }
.journey { display: flex; align-items: center; padding: 15px 26px; background: #070d0e; border-bottom: 1px solid var(--line); }
.journey-item { display: flex; align-items: center; gap: 8px; color: #60706e; white-space: nowrap; }
.journey-item b { display: grid; place-items: center; width: 25px; height: 25px; background: #10191a; border: 1px solid var(--line); border-radius: 8px; font-size: 10px; }
.journey-item em { font-size: 10px; font-style: normal; font-weight: 800; }
.journey-item.active { color: var(--ui-accent); }
.journey-item.active b { color: #00100e; background: var(--ui-accent); border-color: transparent; box-shadow: 0 0 16px rgba(78,233,213,.14); }
.journey-line { flex: 1; height: 1px; margin: 0 10px; background: var(--line); }

.command-overview {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 1.25fr) minmax(420px, .75fr);
  gap: 18px;
  margin: 22px 24px 0;
  padding: 26px;
  overflow: hidden;
  background:
    linear-gradient(110deg, rgba(7,18,19,.98), rgba(8,29,29,.9)),
    #071112;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  box-shadow: inset 0 0 55px rgba(78,233,213,.025);
}
.command-overview::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -130px;
  width: 320px;
  height: 320px;
  border: 1px solid rgba(78,233,213,.11);
  border-radius: 50%;
  box-shadow: 0 0 0 38px rgba(78,233,213,.025), 0 0 0 78px rgba(78,233,213,.018);
}
.overview-copy, .overview-metrics { position: relative; z-index: 1; }
.live-kicker { display: flex; align-items: center; gap: 8px; color: var(--ui-accent); font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.live-kicker i, .guard-metric small i { width: 6px; height: 6px; background: var(--ui-accent); border-radius: 50%; box-shadow: 0 0 9px var(--ui-accent); }
.overview-copy h3 { margin: 12px 0 6px; font: 720 clamp(26px, 3vw, 42px)/1.1 var(--font-heading); letter-spacing: -.035em; }
.overview-copy p { max-width: 640px; margin: 0; color: var(--muted-2); }
.overview-action { gap: 22px; margin-top: 20px; padding: 10px 12px 10px 14px; font-size: 11px; }
.overview-action span { display: grid; place-items: center; width: 25px; height: 25px; background: rgba(0,0,0,.12); border-radius: 7px; }
.overview-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; align-content: stretch; }
.overview-metrics article { display: flex; flex-direction: column; justify-content: flex-end; min-width: 0; padding: 15px; background: rgba(3,9,10,.74); border: 1px solid var(--line); border-radius: 13px; }
.overview-metrics span { color: var(--muted); font-size: 9px; font-weight: 750; }
.overview-metrics strong { margin: 8px 0 2px; font: 700 clamp(20px, 2.5vw, 31px)/1 var(--font-heading); overflow-wrap: anywhere; }
.overview-metrics small { color: #6e7e7b; font-size: 8px; line-height: 1.4; }
.overview-metrics .guard-metric strong { color: var(--warning); font-size: 18px; }
.guard-metric small { display: flex; align-items: center; gap: 6px; }
.guard-metric small i { background: var(--warning); box-shadow: 0 0 9px rgba(244,184,106,.8); }

.workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 15px; padding: 18px 24px 26px; }
.workspace-main { min-width: 0; }
#job-form { display: grid; grid-template-columns: minmax(0,1fr); gap: 14px; min-width: 0; margin: 0; }
.page-picker { margin-bottom: 12px; font-size: 11px; }
.form-section, .aside-card, .brand-help, .submit-panel {
  background: linear-gradient(145deg, #0a1112, #080e0f);
  border: 1px solid var(--line);
  border-radius: 15px;
}
.form-section { min-width: 0; padding: 20px; scroll-margin-top: 18px; }
.section-title { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.section-number { display: grid; place-items: center; flex: 0 0 auto; width: 34px; height: 34px; color: var(--ui-accent); background: rgba(78,233,213,.07); border: 1px solid rgba(78,233,213,.14); border-radius: 10px; font-size: 10px; font-weight: 900; }
.section-title > div { min-width: 0; }
.section-title h3 { margin: 0; font: 720 17px/1.35 var(--font-heading); }
.section-title p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.section-status { flex: 0 0 auto; margin-left: auto; padding: 5px 7px; color: #82918f; background: #0c1516; border: 1px solid var(--line); border-radius: 7px; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.wide { grid-column: 1 / -1; }
.field-grid label { font-size: 10px; }

.template-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.inline-title { margin-bottom: 0; }
.selection-count { flex: 0 0 auto; padding: 7px 10px; color: var(--ui-accent); background: rgba(78,233,213,.08); border: 1px solid rgba(78,233,213,.2); border-radius: 999px; font-size: 9px; font-weight: 850; }
.template-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 14px 0 10px; padding: 5px; background: rgba(3,10,11,.76); border: 1px solid var(--line); border-radius: 13px; }
.template-tab { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; margin: 0; padding: 10px 12px; color: #879794; background: transparent; border: 1px solid transparent; border-radius: 9px; font-size: 10px; }
.template-tab:hover { box-shadow: none; }
.template-tab.active { color: #00100e; background: linear-gradient(135deg, var(--ui-accent), #77f0df); box-shadow: 0 8px 22px rgba(78,233,213,.12); }
.template-control-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(250px,330px); gap: 18px; align-items: end; margin-bottom: 12px; padding: 13px 14px; background: rgba(5,14,15,.54); border: 1px solid var(--line); border-radius: 12px; }
.template-control-copy { display: grid; gap: 2px; min-width: 0; }
.template-control-copy strong { color: var(--text); font-size: 12px; }
.template-control-copy span { color: var(--muted); font-size: 10px; line-height: 1.5; }
.template-strategy { width: 100%; }
.template-strategy label { font-size: 9px; }
.template-strategy label > span { display: block; margin-bottom: 5px; color: var(--muted-2); font-weight: 700; }
.template-strategy select { padding: 9px 10px; font-size: 10px; }
.template-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.template-list:has(.template-card:only-child) { grid-template-columns: 1fr; }
.template-card {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: start;
  min-width: 0;
  min-height: 108px;
  padding: 15px;
  background: linear-gradient(145deg, rgba(7,17,18,.94), rgba(6,13,14,.86));
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .15s, background .15s, transform .15s;
}
.template-card:only-child { min-height: 116px; }
.template-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.template-card:has(input:checked) { background: rgba(78,233,213,.055); border-color: rgba(78,233,213,.42); box-shadow: inset 0 0 20px rgba(78,233,213,.025); }
.template-card input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--ui-accent); }
.template-card strong, .template-card small { display: block; }
.template-card-body { display: grid; gap: 4px; min-width: 0; }
.template-card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; }
.template-card-title em { flex: 0 0 auto; padding: 3px 7px; color: var(--ui-accent); background: rgba(78,233,213,.07); border: 1px solid rgba(78,233,213,.13); border-radius: 999px; font-size: 8px; font-style: normal; font-weight: 800; }
.template-card strong { font-size: 11px; }
.template-card small { display: -webkit-box; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 500; line-height: 1.5; white-space: pre-line; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.template-card a { display: inline-block; margin-top: 6px; color: var(--ui-accent); font-size: 9px; }
.template-empty { padding: 18px; color: var(--muted); background: #0b1314; border: 1px dashed var(--line-strong); border-radius: 10px; text-align: center; }
.template-add { min-width: 0; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.template-add summary { display: flex; align-items: center; width: max-content; max-width: 100%; gap: 8px; color: var(--ui-accent); font-size: 10px; font-weight: 800; cursor: pointer; }
.template-add summary span { display: grid; place-items: center; width: 22px; height: 22px; background: rgba(78,233,213,.07); border-radius: 7px; }
.template-add[open] summary { margin-bottom: 12px; }
.template-add-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 16px 16px 0; background: rgba(5,13,14,.78); border: 1px solid var(--line); border-bottom: 0; border-radius: 13px 13px 0 0; }
.template-add-head > div { min-width: 0; }
.template-add-kicker { color: var(--ui-accent); font-size: 8px; font-weight: 900; letter-spacing: .15em; }
.template-add-head h4 { margin: 4px 0 2px; font-size: 15px; }
.template-add-head p { max-width: 520px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.page-scope-chip { flex: 0 0 auto; padding: 5px 8px; color: var(--ui-accent); background: rgba(78,233,213,.07); border: 1px solid rgba(78,233,213,.15); border-radius: 999px; font-size: 8px; font-weight: 850; letter-spacing: .06em; }
.template-add-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(190px,240px); gap: 12px; min-width: 0; padding: 16px; background: rgba(5,13,14,.78); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 13px 13px; }
.template-add-grid > * { min-width: 0; }
.template-add-grid label { display: grid; align-content: start; gap: 6px; }
.template-add-grid input, .template-add-grid textarea { width: 100%; min-width: 0; }
.template-form-guide { display: grid; align-content: center; gap: 5px; padding: 13px; color: var(--muted); background: rgba(78,233,213,.045); border: 1px solid rgba(78,233,213,.11); border-radius: 10px; }
.template-form-guide strong { color: var(--muted-2); font-size: 10px; }
.template-form-guide span { font-size: 9px; line-height: 1.55; }
.template-add-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.template-add-actions button { flex: 0 0 auto; padding: 10px 13px; }
.template-add-actions button.secondary { color: #02110f; background: linear-gradient(135deg, var(--ui-accent), #77f0df); border-color: transparent; box-shadow: 0 8px 22px rgba(78,233,213,.12); }
.template-add-actions small { color: var(--muted); font-size: 9px; text-align: right; }
.template-library, .template-add, .template-add-grid, .template-list { width: 100%; min-width: 0; }
.library-path { display: none; }

.uploader { display: grid; gap: 10px; }
.upload-zone { display: flex; flex-direction: column; align-items: center; padding: 30px 18px; background: #081011; border: 1px dashed rgba(78,233,213,.28); border-radius: 12px; text-align: center; cursor: pointer; transition: background .15s, border-color .15s; }
.upload-zone:hover, .upload-zone.dragging { background: rgba(78,233,213,.035); border-color: var(--ui-accent); }
.upload-icon { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 9px; color: var(--ui-accent); background: rgba(78,233,213,.07); border: 1px solid rgba(78,233,213,.15); border-radius: 12px; font-size: 18px; }
.upload-zone strong { font-size: 12px; }
.upload-zone .muted { margin-top: 2px; font-size: 9px; }
.upload-cta { margin-top: 11px; padding: 7px 10px; color: #00100e; background: var(--ui-accent); border-radius: 7px; font-size: 9px; font-weight: 900; }
.file-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.text-button, .icon-button { margin: 0; color: var(--ui-accent); background: transparent; border: 1px solid var(--line-strong); }
.text-button { padding: 7px 9px; font-size: 9px; }
.file-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.file-item { display: grid; grid-template-columns: 64px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 9px; background: #0b1314; border: 1px solid var(--line); border-radius: 11px; }
.file-item img { width: 64px; height: 55px; object-fit: cover; border-radius: 8px; }
.file-item strong, .file-item span { display: block; overflow-wrap: anywhere; }
.file-item strong { font-size: 10px; }
.file-item span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.file-actions { display: flex; gap: 5px; }
.icon-button { min-width: 33px; padding: 7px; }
.icon-button.danger { color: var(--danger); border-color: rgba(255,112,120,.2); }

.submit-panel { display: grid; grid-template-columns: minmax(240px,1fr) minmax(300px,1.25fr) minmax(180px,.9fr); grid-template-areas: "copy consent blank" "action consent blank" "safe consent blank"; gap: 10px 24px; align-items: center; padding: 24px 28px; scroll-margin-top: 18px; }
.submit-copy { grid-area: copy; }
.submit-copy h3 { margin: 5px 0 2px; font: 700 17px var(--font-heading); }
.submit-copy p { margin: 0; color: var(--muted); font-size: 10px; }
.consent { grid-area: consent; display: grid; grid-template-columns: 20px 1fr; align-self: stretch; align-content: center; padding: 8px 28px; border-left: 1px solid var(--line-strong); border-right: 1px solid var(--line-strong); font-size: 10px; font-weight: 500; }
.consent input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--ui-accent); }
.consent strong { display: block; color: var(--text); }
.submit-action { grid-area: action; justify-self: start; gap: 18px; width: 210px; min-width: 0; padding: 11px 12px 11px 14px; }
.safe-submit { grid-area: safe; margin: 0; color: #6f7e7b; font-size: 8px; text-align: left; }
.safe-submit span { color: var(--warning); }
.progress { margin-top: 13px; padding: 14px; color: var(--ui-accent); background: rgba(78,233,213,.045); border: 1px solid var(--line); border-radius: 11px; }
.progress span { display: block; margin-bottom: 8px; font-size: 10px; font-weight: 800; }
progress { width: 100%; accent-color: var(--ui-accent); }

.workspace-aside { display: grid; align-content: start; gap: 10px; min-width: 0; }
.aside-card, .brand-help { padding: 14px; }
.aside-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.aside-label { margin: 0; color: #778683; font-size: 8px; font-weight: 900; letter-spacing: .13em; }
.mini-live { padding: 4px 6px; color: var(--ui-accent); background: rgba(78,233,213,.07); border-radius: 5px; font-size: 7px; font-weight: 900; }
.page-summary { margin-top: 14px; padding: 13px; background: linear-gradient(145deg, color-mix(in srgb, var(--brand-primary) 45%, #0a1112), #0b1314); border: 1px solid rgba(255,255,255,.08); border-radius: 11px; }
.page-summary strong { display: block; margin-bottom: 4px; font-size: 13px; }
.page-summary span { color: #a7b5b2; font-size: 9px; line-height: 1.55; }
.system-status-card { display: grid; gap: 12px; }
.system-status-card .aside-head > span { color: var(--ui-accent); font-size: 11px; font-weight: 800; }
.status-row { display: grid; grid-template-columns: 68px 1fr 32px; gap: 7px; align-items: center; }
.status-row > span, .status-row > strong { font-size: 8px; font-style: normal; }
.status-row > span { color: var(--muted-2); }
.status-row > strong { color: var(--ui-accent); text-align: right; }
.status-row.warning > strong { color: var(--warning); }
.status-bar { height: 3px; overflow: hidden; background: #152020; border-radius: 999px; }
.status-bar b { display: block; height: 100%; background: var(--ui-accent); box-shadow: 0 0 8px var(--ui-accent); }
.brand-help { display: grid; gap: 3px; color: var(--text); background: linear-gradient(145deg, color-mix(in srgb, var(--brand-primary) 58%, #081011), #0a1213); }
.brand-help strong { font-size: 10px; }
.brand-help span { color: #b6c2c0; font-size: 9px; }
.promise-card { display: flex; align-items: flex-start; gap: 10px; }
.promise-icon { display: grid; place-items: center; flex: 0 0 auto; width: 29px; height: 29px; color: #00100e; background: var(--ui-accent); border-radius: 9px; font-weight: 900; }
.promise-card strong, .price-card strong { font-size: 10px; line-height: 1.45; }
.promise-card p, .price-card p:not(.aside-label) { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.55; }
.price-card { background: linear-gradient(145deg, rgba(78,233,213,.055), #080e0f); }
.workspace-aside .price-card { min-height: 180px; }
.price-card > strong { display: block; margin-top: 10px; color: var(--ui-accent-2); }

.result { min-height: calc(100vh - 116px); padding: clamp(34px, 7vw, 80px); text-align: center; }
#result-card { background-image: linear-gradient(180deg, rgba(3,11,12,.64), rgba(3,10,11,.76)), url('/assets/login-background-bright-glass-studio.png'); background-size: cover; background-position: center; }
.success { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 16px; color: #00100e; background: var(--ui-accent); border-radius: 18px; box-shadow: 0 0 28px rgba(78,233,213,.18); font-size: 25px; }
.result h2 { margin: 8px 0; font: 700 32px var(--font-heading); }
.result > p { color: var(--muted-2); }
.result dl { display: grid; grid-template-columns: max-content 1fr; gap: 9px 16px; max-width: 560px; margin: 24px auto; padding: 20px; background: rgba(7,16,17,.76); border: 1px solid var(--line-strong); border-radius: 14px; box-shadow: 0 18px 45px rgba(0,0,0,.18); backdrop-filter: blur(12px); text-align: left; }
.result dt { color: var(--muted); }
.result dd { margin: 0; overflow-wrap: anywhere; font-weight: 700; }
.result button { padding: 11px 16px; background: linear-gradient(135deg, var(--ui-accent), #77f0df); box-shadow: 0 10px 24px rgba(78,233,213,.14); }
.message { position: fixed; z-index: 20; right: 24px; bottom: 24px; max-width: 430px; padding: 13px 16px; color: white; background: #7e2027; border: 1px solid rgba(255,112,120,.35); border-radius: 11px; box-shadow: 0 14px 38px rgba(0,0,0,.38); }

@media (max-width: 1120px) {
  .command-overview { grid-template-columns: 1fr; }
  .workspace-grid { grid-template-columns: minmax(0,1fr) 230px; }
  .overview-metrics { grid-template-columns: repeat(3, minmax(0,1fr)); }
}

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; grid-template-rows: 70px minmax(0,1fr) 66px; width: min(100% - 20px, 760px); margin: 10px auto; border-radius: 22px; }
  .side-nav { grid-row: 3; grid-column: 1; z-index: 5; flex-direction: row; justify-content: center; gap: 10px; padding: 9px 14px; border-top: 1px solid var(--line); border-right: 0; }
  .nav-brand, .nav-bottom .side-nav-item { display: none; }
  .nav-stack { display: flex; gap: 6px; }
  .nav-bottom { margin: 0; }
  .nav-online { margin: 0; }
  .brand, .card { grid-column: 1; }
  .brand { padding: 10px 16px; }
  .login-layout { grid-template-columns: 1fr; min-height: auto; }
  .login-intro { min-height: 400px; border-right: 0; border-bottom: 1px solid var(--line); }
  .login-panel { min-height: 440px; }
  .workspace-grid { grid-template-columns: 1fr; }
  .workspace-aside { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .brand-help, .price-card { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .top-status { display: none; }
  .test-badge { font-size: 7px; }
  .brand h1 { font-size: 15px; }
  .brand-logo, .mark { width: 38px; height: 38px; }
  .nav-brand { width: 42px; height: 42px; }
  .narrow { padding: 12px; }
  .login-intro, .login-panel { padding: 28px 22px; }
  .login-intro h2 { font-size: 38px; }
  .login-signals { grid-template-columns: 1fr; margin-top: 26px; }
  .card-head { align-items: flex-start; padding: 18px 16px 15px; }
  .card-head h2 { font-size: 21px; }
  .journey { padding: 12px 16px; }
  .journey-item em { display: none; }
  .journey-line { margin: 0 6px; }
  .command-overview { margin: 14px 12px 0; padding: 20px; }
  .overview-copy h3 { font-size: 29px; }
  .overview-metrics { grid-template-columns: 1fr; }
  .overview-metrics article { min-height: 96px; }
  .workspace-grid { padding: 12px; }
  .form-section, .submit-panel { padding: 16px; }
  .grid { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .section-status { display: none; }
  .template-heading { display: grid; }
  .selection-count { justify-self: start; margin-left: 46px; }
  .template-tabs { grid-template-columns: 1fr; }
  .template-control-row { grid-template-columns: 1fr; gap: 10px; }
  .template-list { grid-template-columns: 1fr; }
  .template-add-grid { grid-template-columns: 1fr; }
  .template-add-head { display: grid; }
  .page-scope-chip { justify-self: start; }
  .template-add-actions { align-items: flex-start; flex-direction: column; }
  .template-add-actions small { text-align: left; }
  .submit-panel { grid-template-columns: 1fr; grid-template-areas: "copy" "consent" "action" "safe"; }
  .consent { align-self: auto; padding: 0; border-right: 0; border-left: 0; }
  .submit-action { width: 100%; justify-self: stretch; }
  .safe-submit { text-align: left; }
  .workspace-aside { grid-template-columns: 1fr; }
  .brand-help, .price-card { grid-column: auto; }
  .file-item { grid-template-columns: 56px minmax(0,1fr); }
  .file-item img { width: 56px; height: 50px; }
  .file-actions { grid-column: 1 / -1; justify-content: flex-end; }
}

/* Professional service-portal redesign */
:root {
  color-scheme: light;
  --bg: #f3f6f8;
  --bg-deep: #e9eff2;
  --surface: #ffffff;
  --surface-2: #f8fafb;
  --surface-3: #eef4f5;
  --line: #d9e3e7;
  --line-strong: #bdcdd3;
  --text: #182a33;
  --muted: #63737b;
  --muted-2: #8a9aa1;
  --accent: #087f82;
  --accent-strong: #056568;
  --accent-soft: #e2f2f1;
  --navy: #183b4a;
  --success: #18794e;
  --warning: #a56317;
  --danger: #b33a42;
  --shadow: 0 18px 50px rgba(24, 55, 68, .10);
  --shadow-sm: 0 5px 18px rgba(24, 55, 68, .07);
}

html { background: var(--bg); }
body {
  background: radial-gradient(circle at 100% 0, #e5f2f1 0, transparent 31%), var(--bg);
  color: var(--text);
  font-family: "Noto Sans Thai", "Segoe UI", system-ui, sans-serif;
  letter-spacing: 0;
}
body::before { display: none; }
button, input, select, textarea { font: inherit; }
.shell {
  display: block;
  width: min(1240px, calc(100% - 32px));
  min-height: calc(100vh - 32px);
  margin: 16px auto;
  overflow: visible;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.side-nav { display: none; }
.brand {
  min-height: 76px;
  padding: 16px 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.96);
  border-radius: 22px 22px 0 0;
}
.brand-identity { gap: 13px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--navy); box-shadow: none;
}
.brand-mark::after { color: #c7efea; }
.eyebrow { color: var(--accent); font-size: 10px; letter-spacing: .12em; }
.brand h1 { color: var(--navy); font-size: 18px; letter-spacing: -.02em; }
.test-badge {
  min-height: 34px; padding: 8px 12px; border: 1px solid #c9e4df;
  color: var(--accent-strong); background: var(--accent-soft); box-shadow: none;
}
.card { background: transparent; }
.login-layout {
  grid-template-columns: 1.12fr .88fr;
  min-height: 650px;
  margin: 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.login-intro {
  min-height: 600px; padding: 58px 56px;
  color: var(--text); border-right: 1px solid var(--line);
  background: linear-gradient(145deg, #f8fbfb 0%, #edf6f5 100%);
}
.login-intro::after { display: none; }
.login-intro h2 { max-width: 560px; margin: 22px 0 18px; color: var(--navy); font-size: clamp(36px, 4.5vw, 58px); line-height: 1.08; letter-spacing: -.045em; }
.login-intro h2 em { color: var(--accent); }
.login-copy { max-width: 520px; color: var(--muted); font-size: 16px; line-height: 1.75; }
.login-signals { gap: 12px; margin-top: 42px; }
.login-signals div { min-height: 112px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.72); box-shadow: none; }
.login-signals b { color: var(--navy); }
.login-signals span { color: var(--muted); }
.login-panel { min-height: 600px; padding: 58px 48px; background: var(--surface); }
.login-panel h3 { color: var(--navy); font-size: 30px; letter-spacing: -.03em; }
.login-panel > p { color: var(--muted); line-height: 1.6; }
label, .field-label { color: var(--navy); font-size: 12px; font-weight: 700; }
input, select, textarea {
  border: 1px solid var(--line-strong); border-radius: 9px; color: var(--text);
  background: #fff; box-shadow: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(8,127,130,.12); outline: none; }
.primary-action, button.primary-action, .submit-button {
  border: 0; border-radius: 9px; background: var(--accent-strong); color: #fff; box-shadow: 0 7px 16px rgba(5,101,104,.20);
}
.primary-action:hover, .submit-button:hover { background: var(--navy); transform: translateY(-1px); }
.secondary-action, button.secondary-action { border: 1px solid var(--line-strong); border-radius: 9px; color: var(--navy); background: #fff; box-shadow: none; }
.secondary-action:hover { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); }
.form-message, .registration-status { border-radius: 9px; }
#upload-card .card-head {
  min-height: 118px; margin: 28px 28px 0; padding: 28px 32px;
  border: 1px solid var(--line); border-radius: 16px 16px 0 0; background: var(--surface); box-shadow: var(--shadow-sm);
}
.card-head h2 { color: var(--navy); font-size: 30px; letter-spacing: -.035em; }
.workspace-intro { color: var(--muted); }
#upload-card .journey { margin: 0 28px; padding: 15px 32px; border: 1px solid var(--line); border-top: 0; background: var(--surface-2); }
.journey-item { color: var(--muted); }
.journey-item b { width: 30px; height: 30px; color: var(--navy); border: 1px solid var(--line-strong); background: #fff; box-shadow: none; }
.journey-item.active { color: var(--accent-strong); }
.journey-item.active b { color: #fff; border-color: var(--accent); background: var(--accent); }
.command-overview {
  margin: 22px 28px 0; padding: 26px 30px; border: 1px solid #cde4e1; border-radius: 16px;
  background: linear-gradient(135deg, #edf8f6 0%, #f7fbfb 100%); box-shadow: none;
}
.command-overview::before { display: none; }
.overview-copy h3 { color: var(--navy); font-size: 34px; letter-spacing: -.04em; }
.overview-copy p { color: var(--muted); }
.overview-metrics article { min-height: 94px; padding: 16px; border: 1px solid #cde4e1; border-radius: 12px; background: rgba(255,255,255,.72); }
.overview-metrics strong { color: var(--navy); }
.overview-metrics span { color: var(--muted); }
.workspace-grid { grid-template-columns: minmax(0,1fr) 280px; gap: 18px; padding: 20px 28px 36px; }
.form-section, .workspace-aside > section, .result {
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm);
}
.form-section { padding: 24px; }
.section-title { border-bottom: 1px solid var(--line); }
.section-title h3 { color: var(--navy); font-size: 20px; }
.section-title p { color: var(--muted); }
.template-tabs { border-bottom-color: var(--line); }
.template-tab { color: var(--muted); }
.template-tab.active { color: var(--accent-strong); border-color: var(--accent); background: var(--accent-soft); }
.template-control-row, .template-card, .upload-zone, .submit-panel { border-color: var(--line); background: var(--surface-2); box-shadow: none; }
.upload-zone { border: 1.5px dashed var(--line-strong); border-radius: 12px; }
.upload-zone:hover { border-color: var(--accent); background: var(--accent-soft); }
.workspace-aside { gap: 14px; }
.status-card h4, .workspace-aside h3 { color: var(--navy); }
.status-card p, .workspace-aside p, .safe-text { color: var(--muted); }
.status-dot { box-shadow: none; }
.submit-panel { border-radius: 14px; }
.consent { border-color: var(--line); }
.result { margin: 28px; padding: 34px; }
.result h2 { color: var(--navy); }
.result > p { color: var(--muted); }
.result dl { border-color: var(--line); background: var(--surface-2); }

/* Admin surface */
.admin-body { min-height: 100vh; padding: 24px; background: radial-gradient(circle at 100% 0,#e5f2f1 0,transparent 30%), var(--bg); color: var(--text); }
.admin-shell { max-width: 1240px; margin: 0 auto; }
.admin-header, .admin-toolbar, .admin-panel, .admin-login-card {
  border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm);
}
.admin-header { padding: 22px 26px; }
.admin-header h1, .admin-panel h2, .admin-panel h3 { color: var(--navy); }
.admin-header p, .admin-toolbar p { color: var(--muted); }
.admin-toolbar { margin-top: 18px; padding: 15px 20px; }
.admin-guard { color: var(--success); background: #e8f6ef; border-color: #c6e6d4; }
.admin-summary article { border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); box-shadow: none; }
.admin-summary strong { color: var(--navy); }
.admin-summary span { color: var(--muted); }
.admin-panel { padding: 26px; }
.admin-alert-panel { border-color: #ead5a9; background: #fffaf0; }
.admin-actions button, .wizard-final button { border-radius: 9px; }
.wizard-block { border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); }
.wizard-step { background: var(--accent-soft); color: var(--accent-strong); }
.wizard-block h3 { color: var(--navy); }
.page-item { border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.page-item:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.page-item h3 { color: var(--navy); }
.page-item p, .page-meta { color: var(--muted); }
.status-pill { border-radius: 999px; box-shadow: none; }
.admin-table { border-color: var(--line); }
.admin-table th { color: var(--muted); background: var(--surface-2); }
.admin-table td { border-color: var(--line); }

@media (max-width: 900px) {
  .login-layout { grid-template-columns: 1fr; }
  .login-intro { min-height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 680px) {
  .shell { width: calc(100% - 16px); margin: 8px auto; }
  .brand { padding: 14px 16px; }
  .login-layout { margin: 14px; }
  .login-intro, .login-panel { min-height: auto; padding: 30px 24px; }
  .login-intro h2 { font-size: 36px; }
  #upload-card .card-head { margin: 14px 14px 0; padding: 22px 18px; }
  #upload-card .journey { margin: 0 14px; padding-inline: 18px; }
  .command-overview { margin: 16px 14px 0; padding: 22px; }
  .workspace-grid { grid-template-columns: 1fr; padding: 14px; }
  .result { margin: 14px; padding: 24px; }
  .admin-body { padding: 10px; }
}

/* Free Pilot automation flow */
.registration-form .wide,
.registration-form .registration-section-title,
.registration-form .registration-consent { grid-column: 1 / -1; }
.registration-section-title { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 12px 0 4px; border-top: 1px solid rgba(78,233,213,.14); }
.registration-section-title:first-child { margin-top: 0; border-top: 0; }
.registration-section-title span { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid rgba(78,233,213,.28); border-radius: 9px; color: var(--ui-accent); background: rgba(78,233,213,.07); font-size: 10px; font-weight: 900; }
.registration-section-title strong { color: var(--text); font-size: 13px; }
.registration-form select { width: 100%; min-height: 42px; border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(2,12,13,.72); color: var(--text); padding: 10px 12px; font: inherit; }
.registration-form label small { color: var(--muted); font-size: 10px; font-weight: 500; line-height: 1.5; }
.registration-consent { grid-template-columns: auto 1fr !important; align-items: start; padding: 12px; border: 1px solid rgba(78,233,213,.2); border-radius: 12px; background: rgba(78,233,213,.04); }
.registration-consent input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--ui-accent); }
.automation-profile-card { display: grid; gap: 18px; }
.page-profile-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.page-profile-summary div { display: grid; align-content: start; gap: 6px; min-height: 82px; padding: 14px; border: 1px solid rgba(78,233,213,.12); border-radius: 12px; background: rgba(1,12,13,.56); }
.page-profile-summary div:last-child { grid-column: 1 / -1; min-height: auto; }
.page-profile-summary span { color: var(--muted); font-size: 11px; font-weight: 700; }
.page-profile-summary strong { color: #e8f3f1; font-size: 13px; line-height: 1.55; }
.post-suffix-editor { display: grid; grid-template-columns: minmax(0,1fr) 210px; gap: 14px; align-items: end; padding: 16px; border: 1px solid rgba(78,233,213,.22); border-radius: 14px; background: linear-gradient(135deg,rgba(78,233,213,.055),rgba(3,17,18,.72)); }
.post-suffix-editor label { display: grid; gap: 8px; color: #d5e2e0; font-size: 13px; font-weight: 800; }
.post-suffix-editor textarea { width: 100%; min-height: 108px; resize: vertical; }
.post-suffix-editor textarea, .post-suffix-editor input, .post-suffix-editor select { border: 1px solid var(--line-strong); border-radius: 11px; background: #061112; color: var(--text); padding: 12px 14px; font: inherit; line-height: 1.6; }
.page-preference-fields { display: grid; gap: 14px; }
.schedule-fields { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 12px; }
.schedule-fields small { font-weight: 500; }
.post-suffix-editor > div { display: grid; gap: 9px; }
.post-suffix-editor small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.template-card { grid-template-columns: 1fr; }
.template-card.locked { border-color: rgba(255,196,100,.18); background: rgba(80,59,24,.08); }
.template-card.locked .template-card-title em { color: #ffd58b; border-color: rgba(255,196,100,.22); background: rgba(255,196,100,.07); }
.page-profile-fields textarea,
.wizard-fields textarea,
.wizard-fields select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: #061112; color: var(--text); font: inherit; resize: vertical; }
.wizard-fields textarea[readonly],
.wizard-fields select:disabled { color: #a9b7b5; background: rgba(255,255,255,.025); cursor: not-allowed; }

@media (max-width: 760px) {
  .page-profile-summary { grid-template-columns: 1fr; }
  .page-profile-summary div:last-child { grid-column: auto; }
  .post-suffix-editor { grid-template-columns: 1fr; }
  .schedule-fields { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Typography system: keep Thai UI readable and visually consistent. */
body { font-size: 15px; line-height: 1.65; }
label { font-size: 13px; line-height: 1.45; }
input, select, textarea { font-size: 14px; line-height: 1.5; }
.workspace-intro, .login-copy { font-size: 14px; }
.eyebrow, .step { font-size: 11px; }
.top-status { font-size: 12px; }
.test-badge { font-size: 10px; }
.journey-item em { font-size: 12px; }
.overview-metrics span { font-size: 11px; }
.overview-metrics small { font-size: 10px; }
.field-grid label { font-size: 13px; }
.section-title h3 { font-size: 19px; }
.section-title p { font-size: 12px; line-height: 1.55; }
.section-status { font-size: 10px; }
.selection-count { font-size: 11px; }
.template-tab { font-size: 12px; }
.template-strategy label { font-size: 12px; }
.template-strategy select { font-size: 13px; }
.template-card strong { font-size: 13px; }
.template-card small { font-size: 11px; line-height: 1.55; }
.template-card a { font-size: 11px; }
.template-add summary { font-size: 12px; }
.upload-zone strong { font-size: 14px; }
.upload-zone .muted { font-size: 11px; }
.upload-cta { font-size: 11px; }
.text-button { font-size: 11px; }
.file-item strong { font-size: 12px; }
.file-item span { font-size: 11px; }
.submit-copy p, .consent { font-size: 12px; line-height: 1.55; }
.safe-submit { font-size: 10px; }
.progress span { font-size: 12px; }
.aside-label { font-size: 10px; }
.mini-live { font-size: 9px; }
.page-summary span { font-size: 11px; }
.status-row > span, .status-row > strong { font-size: 10px; }
.brand-help strong { font-size: 12px; }
.brand-help span { font-size: 11px; }
.promise-card strong, .price-card strong { font-size: 12px; }
.promise-card p, .price-card p:not(.aside-label) { font-size: 11px; }

@media (max-width: 680px) {
  body { font-size: 14px; }
  .test-badge { font-size: 9px; }
  .brand h1 { font-size: 16px; }
  .card-head h2 { font-size: 23px; }
  .overview-copy h3 { font-size: 30px; }
  .journey-item em { font-size: 11px; }
  .section-title h3 { font-size: 18px; }
  .template-tab { font-size: 13px; }
  .template-card strong { font-size: 14px; }
  .template-card small { font-size: 12px; }
  .submit-copy p, .consent { font-size: 13px; }
}

/* Final balance for the Thai login headline and supporting copy. */
.login-intro h2 {
  max-width: 620px;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1.12;
  letter-spacing: -.035em;
}
.login-copy { max-width: 600px; font-size: 15px; line-height: 1.75; }
.login-signals strong { font-size: 14px; }
.login-signals small { font-size: 11px; }
.system-line { font-size: 11px; }

/* Shared-system visual: selected Media Orchestration background, kept subtle under UI copy. */
.login-layout {
  background-image:
    linear-gradient(90deg, rgba(3, 9, 10, .72) 0%, rgba(3, 9, 10, .52) 46%, rgba(3, 9, 10, .28) 100%),
    url('/assets/login-background-bright-glass-studio.png');
  background-size: cover;
  background-position: center;
}
.login-panel { background: rgba(3, 8, 9, .62); }
.login-intro::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(3, 9, 10, .52) 0%, rgba(3, 9, 10, .24) 62%, transparent 100%);
}

@media (max-width: 680px) {
  .login-intro h2 { max-width: 100%; font-size: 37px; }
  .login-copy { font-size: 14px; }
}

/* On stacked tablet/mobile layouts the same image sits behind both panels.
   Add a uniform veil so copy stays readable while the technology collage remains visible. */
@media (max-width: 900px) {
  .login-layout {
    background-image:
      linear-gradient(rgba(3, 9, 10, .68), rgba(3, 9, 10, .68)),
      url('/assets/login-background-bright-glass-studio.png');
  }
  .login-intro::after { background: rgba(3, 9, 10, .34); }
  .login-panel { background: rgba(3, 8, 9, .74); }
}

/* Workspace dashboard treatment: reuse the selected technology collage while
   keeping a consistent, readable glass layer across all operational cards. */
#upload-card {
  background-image:
    linear-gradient(180deg, rgba(4, 13, 14, .56), rgba(3, 10, 11, .68)),
    url('/assets/login-background-bright-glass-studio.png');
  background-size: cover;
  background-position: center top;
}
#upload-card .brand,
#upload-card .journey {
  background: rgba(8, 19, 20, .64);
  backdrop-filter: blur(14px);
}
#upload-card .command-overview {
  background: linear-gradient(110deg, rgba(7, 22, 23, .72), rgba(8, 35, 35, .60));
  backdrop-filter: blur(10px);
}
#upload-card .form-section,
#upload-card .aside-card,
#upload-card .brand-help,
#upload-card .submit-panel {
  background: linear-gradient(145deg, rgba(10, 20, 21, .72), rgba(8, 16, 17, .64));
  backdrop-filter: blur(12px);
}

/* The sidebar content ends before the upload/final-check cards. Let those
   bottom cards use the otherwise empty dashboard width on larger screens. */
@media (min-width: 901px) {
  #upload-card #upload-section,
  #upload-card #submit-section {
    width: calc(100% + 285px);
  }
}

/* Premium product finish — one visual system across login, workspace and receipt. */
:root {
  --premium-panel: rgba(8, 19, 20, .88);
  --premium-panel-soft: rgba(11, 25, 26, .78);
  --premium-stroke: rgba(151, 235, 226, .17);
  --premium-shadow: 0 22px 55px rgba(0, 0, 0, .22);
}

body {
  color: #f3f8f7;
  background:
    radial-gradient(circle at 84% 12%, rgba(34, 151, 144, .32), transparent 34rem),
    radial-gradient(circle at 8% 94%, rgba(18, 87, 94, .28), transparent 38rem),
    linear-gradient(145deg, #061719, #02090a 52%, #0b292b);
}

.shell {
  width: min(1540px, calc(100% - 32px));
  min-height: calc(100vh - 32px);
  margin: 16px auto;
  border-color: rgba(142, 239, 229, .22);
  border-radius: 26px;
  box-shadow: 0 32px 90px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255,255,255,.025) inset;
}

.side-nav {
  gap: 26px;
  padding-block: 20px;
  background: linear-gradient(180deg, rgba(5,15,16,.98), rgba(3,9,10,.98));
}

.side-nav-item { width: 46px; height: 46px; border-radius: 14px; }
.nav-icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.side-nav-item.active {
  background: linear-gradient(145deg, rgba(78,233,213,.18), rgba(78,233,213,.055));
  border-color: rgba(78,233,213,.3);
  box-shadow: 0 10px 24px rgba(0,0,0,.2), inset 0 0 22px rgba(78,233,213,.05);
}

.brand {
  min-height: 78px;
  padding: 13px 26px;
  background: rgba(4, 12, 13, .9);
  backdrop-filter: blur(20px);
}
.brand-identity { gap: 14px; }
.brand h1 { margin-top: 3px; font-size: 20px; letter-spacing: -.015em; }
.eyebrow, .step { font-size: 10px; letter-spacing: .16em; }
.top-status, .test-badge { min-height: 38px; padding-inline: 13px; border-radius: 12px; }
.test-badge { display: inline-flex; align-items: center; font-size: 9px; letter-spacing: .04em; }

.narrow { padding: 30px; }
.login-layout { min-height: calc(100vh - 154px); border-radius: 24px; box-shadow: var(--premium-shadow); }
.login-layout { grid-template-columns: minmax(0,1.28fr) minmax(360px,.72fr); }
.login-intro { padding: clamp(42px, 4.5vw, 66px); }
.login-intro h2 { margin: 16px 0 20px; max-width: 680px; font-size: clamp(38px, 4.2vw, 55px); line-height: 1.1; }
.login-copy { color: #b7c5c2; font-size: 16px; line-height: 1.75; }
.login-signals { gap: 14px; margin-top: 42px; }
.login-signals div {
  min-height: 116px;
  align-content: end;
  gap: 5px;
  padding: 18px;
  background: linear-gradient(145deg, rgba(5,15,16,.84), rgba(7,21,22,.7));
  border-color: var(--premium-stroke);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,.16);
}
.login-signals strong { font-size: 15px; line-height: 1.35; }
.login-signals small { color: #91a19e; font-size: 12px; }
.system-line { margin-top: 24px; font-size: 12px; }
.login-panel { padding: clamp(38px, 5vw, 68px); background: rgba(3, 10, 11, .7); backdrop-filter: blur(16px); }
.login-panel h3 { margin: 10px 0; font-size: 31px; }
.login-panel > .muted { color: #a9b8b5; font-size: 14px; }
.login-panel label { font-size: 13px; }
.login-visual { width: 84px; height: 84px; margin-bottom: 26px; }
.login-icon { width: 76px; height: 76px; }
.security-note { color: #7f908d; font-size: 11px; }

input, select, textarea {
  min-height: 50px;
  padding: 13px 15px;
  color: #f5faf8;
  background: rgba(3, 12, 13, .88);
  border-color: rgba(160, 214, 208, .2);
  border-radius: 12px;
  font-size: 14px;
}
textarea { min-height: 108px; }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 4px rgba(78,233,213,.09), 0 12px 28px rgba(0,0,0,.12); }
.primary-action { min-height: 54px; margin-top: 16px; padding-inline: 17px; border-radius: 12px; font-size: 14px; }

#upload-card {
  background-image:
    linear-gradient(180deg, rgba(3, 12, 13, .42), rgba(3, 11, 12, .58)),
    url('/assets/login-background-bright-glass-studio.png');
}
#upload-card .card-head {
  min-height: 126px;
  padding: 28px 32px 24px;
  background: linear-gradient(100deg, rgba(4, 18, 19, .84), rgba(12, 53, 53, .58));
  backdrop-filter: blur(18px);
}
.card-head h2 { margin: 7px 0 3px; font-size: clamp(25px, 2.5vw, 34px); }
.workspace-intro { color: #aebdb9; font-size: 14px; }
.card-head .secondary { min-height: 42px; padding-inline: 16px; border-radius: 11px; }

#upload-card .journey {
  min-height: 62px;
  padding: 15px 32px;
  background: rgba(4, 14, 15, .78);
  border-bottom-color: rgba(151,235,226,.14);
}
.journey-item { gap: 10px; color: #71827f; }
.journey-item b { width: 30px; height: 30px; border-radius: 9px; font-size: 11px; }
.journey-item em { color: inherit; font-size: 12px; }
.journey-line { margin-inline: 14px; background: linear-gradient(90deg, var(--line), rgba(78,233,213,.19), var(--line)); }

#upload-card .command-overview {
  margin: 26px 28px 0;
  padding: 30px;
  background: linear-gradient(120deg, rgba(6,25,26,.9), rgba(15,58,57,.72));
  border-color: rgba(111,239,225,.25);
  border-radius: 21px;
  box-shadow: 0 24px 60px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.035);
}
.overview-copy h3 { margin: 13px 0 8px; font-size: clamp(31px, 3vw, 44px); }
.overview-copy p { color: #b8c7c4; font-size: 14px; line-height: 1.65; }
.overview-action { min-height: 46px; margin-top: 24px; padding-inline: 16px 11px; border-radius: 11px; font-size: 13px; }
.overview-metrics { gap: 12px; }
.overview-metrics article {
  min-height: 132px;
  padding: 19px;
  background: rgba(2,11,12,.82);
  border-color: rgba(151,235,226,.15);
  border-radius: 15px;
  box-shadow: 0 14px 30px rgba(0,0,0,.12);
}
.overview-metrics span { color: #9bacaa; font-size: 12px; }
.overview-metrics strong { margin-block: 10px 5px; font-size: 30px; }
.overview-metrics small { color: #798a87; font-size: 11px; }
.overview-metrics .guard-metric strong { font-size: 21px; }

.workspace-grid {
  grid-template-columns: minmax(0,1fr) 280px;
  gap: 18px;
  padding: 20px 28px 30px;
  background: linear-gradient(105deg, rgba(3,12,13,.3), rgba(3,12,13,.68));
  border-top: 1px solid rgba(151,235,226,.08);
}
#job-form { gap: 18px; }
#upload-card .form-section,
#upload-card .aside-card,
#upload-card .brand-help,
#upload-card .submit-panel {
  background: linear-gradient(145deg, rgba(9,22,23,.9), rgba(7,16,17,.84));
  border-color: var(--premium-stroke);
  box-shadow: 0 18px 42px rgba(0,0,0,.16), inset 0 1px 0 rgba(255,255,255,.025);
  backdrop-filter: blur(16px);
}
.form-section { padding: 25px; border-radius: 18px; }
.section-title { gap: 14px; margin-bottom: 23px; }
.section-number { width: 38px; height: 38px; border-radius: 11px; font-size: 11px; }
.section-title h3 { font-size: 21px; letter-spacing: -.01em; }
.section-title p { margin-top: 5px; color: #91a19e; font-size: 13px; }
.section-status { padding: 6px 9px; color: #a9b8b5; background: rgba(2,10,11,.62); border-radius: 8px; font-size: 9px; }
.grid { gap: 17px 15px; }
.field-grid label { gap: 9px; color: #cbd5d3; font-size: 13px; }

.template-heading { padding-bottom: 19px; }
.selection-count { padding: 8px 12px; font-size: 11px; }
.template-tabs { gap: 8px; margin: 18px 0 14px; padding: 6px; border-radius: 15px; }
.template-tab { min-height: 48px; border-radius: 11px; font-size: 13px; }
.template-control-row { gap: 22px; margin-bottom: 15px; padding: 17px 18px; border-radius: 14px; }
.template-control-copy strong { font-size: 14px; }
.template-control-copy span { margin-top: 3px; color: #8fa09d; font-size: 12px; }
.template-strategy label, .template-strategy label > span { font-size: 12px; }
.template-strategy select { min-height: 44px; font-size: 13px; }
.template-list { gap: 11px; }
.template-card { min-height: 124px; padding: 18px; border-radius: 14px; }
.template-card:only-child { min-height: 128px; }
.template-card input { width: 18px; height: 18px; }
.template-card strong { font-size: 14px; }
.template-card small { margin-top: 6px; color: #91a19e; font-size: 12px; line-height: 1.6; }
.template-card-title em { padding: 4px 8px; font-size: 9px; }
.template-add { margin-top: 18px; padding-top: 16px; }
.template-add summary { min-height: 34px; font-size: 13px; }
.template-add summary span { width: 25px; height: 25px; }
.template-add summary:focus-visible { outline: 2px solid var(--ui-accent); outline-offset: 4px; border-radius: 8px; }
.template-add[open] summary { margin-bottom: 15px; }
.template-add-head { padding: 21px 21px 0; border-radius: 16px 16px 0 0; }
.template-add-kicker { font-size: 9px; }
.template-add-head h4 { margin-top: 6px; font-size: 18px; }
.template-add-head p { margin-top: 3px; font-size: 12px; }
.page-scope-chip { padding: 6px 9px; font-size: 9px; }
.template-add-grid { gap: 15px; padding: 21px; border-radius: 0 0 16px 16px; }
.template-add-grid label { gap: 8px; font-size: 13px; }
.template-form-guide { padding: 16px; border-radius: 12px; }
.template-form-guide strong { font-size: 12px; }
.template-form-guide span { font-size: 11px; }
.template-add-actions button { min-height: 46px; padding-inline: 17px; font-size: 13px; }
.template-add-actions small { font-size: 11px; }

.upload-zone {
  min-height: 260px;
  justify-content: center;
  padding: 38px 22px;
  background: linear-gradient(145deg, rgba(2,11,12,.88), rgba(5,19,20,.82));
  border-color: rgba(78,233,213,.32);
  border-radius: 16px;
}
.upload-icon { width: 52px; height: 52px; margin-bottom: 14px; border-radius: 15px; font-size: 21px; }
.upload-zone strong { font-size: 16px; }
.upload-zone .muted { margin-top: 5px; color: #8d9d9a; font-size: 12px; }
.upload-cta { margin-top: 16px; padding: 9px 14px; border-radius: 9px; font-size: 12px; }

.submit-panel {
  grid-template-columns: minmax(240px,.95fr) minmax(320px,1.25fr) minmax(210px,.8fr);
  grid-template-areas: "copy consent action" "safe consent action";
  gap: 12px 26px;
  min-height: 190px;
  padding: 28px 30px;
  border-radius: 18px;
}
.submit-copy h3 { margin: 7px 0 4px; font-size: 20px; }
.submit-copy p { color: #92a29f; font-size: 12px; }
.consent { min-height: 108px; padding: 16px 26px; border-color: rgba(151,235,226,.17); font-size: 13px; line-height: 1.65; }
.consent input { width: 18px; height: 18px; }
.submit-action { justify-self: stretch; align-self: center; width: 100%; min-height: 54px; padding-inline: 16px 12px; border-radius: 12px; font-size: 13px; }
.safe-submit { color: #83938f; font-size: 10px; line-height: 1.5; }

.workspace-aside { gap: 12px; }
.aside-card, .brand-help { padding: 18px; border-radius: 16px; }
.aside-label { color: #8b9b98; font-size: 10px; }
.mini-live { padding: 5px 8px; border-radius: 999px; font-size: 9px; }
.page-summary { margin-top: 16px; padding: 16px; border-radius: 13px; }
.page-summary strong { margin-bottom: 6px; font-size: 15px; }
.page-summary span { color: #aebbb9; font-size: 11px; }
.system-status-card { gap: 15px; }
.status-row { grid-template-columns: 82px 1fr 40px; gap: 9px; }
.status-row > span, .status-row > strong { font-size: 10px; }
.brand-help { gap: 6px; }
.brand-help strong { font-size: 13px; }
.brand-help span { font-size: 11px; line-height: 1.6; }
.promise-card { gap: 12px; }
.promise-icon { width: 34px; height: 34px; border-radius: 10px; }
.promise-card strong, .price-card strong { font-size: 13px; }
.promise-card p, .price-card p:not(.aside-label) { font-size: 11px; }
.workspace-aside .price-card { min-height: 176px; }

.result { display: grid; align-content: center; justify-items: center; min-height: calc(100vh - 110px); padding: clamp(40px,7vw,90px); }
.success { width: 68px; height: 68px; border-radius: 20px; font-size: 29px; }
.result h2 { margin: 10px 0; font-size: 38px; }
.result > p { max-width: 680px; color: #b3c1bf; font-size: 15px; line-height: 1.7; }
.result dl { width: min(100%,620px); gap: 12px 20px; margin: 28px auto; padding: 24px; border-radius: 17px; font-size: 14px; }
.result button { min-height: 48px; padding-inline: 20px; border-radius: 11px; font-size: 13px; }

.registration-panel { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-strong); }
.registration-panel summary { color: var(--accent); font-size: 12px; font-weight: 800; cursor: pointer; }
.registration-panel > p { margin: 12px 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.registration-form { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.registration-form label { display: grid; gap: 6px; color: #b9c7c5; font-size: 10px; font-weight: 700; }
.registration-form label:nth-of-type(n+5), .registration-form button, .registration-status { grid-column: 1 / -1; }
.registration-form input, .registration-form textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(2,12,13,.72); color: var(--text); padding: 10px 12px; font: inherit; }
.registration-form textarea { resize: vertical; }
.registration-form button { min-height: 42px; }
.registration-status { margin: 0; padding: 11px 12px; border: 1px solid rgba(72,225,210,.26); border-radius: 10px; background: rgba(72,225,210,.08); color: #c9fbf5; font-size: 11px; line-height: 1.5; }

.admin-body { min-height: 100vh; padding: 22px; background: #071315 url('/assets/login-background-bright-glass-studio.png') center/cover fixed; }
.admin-body::before { content: ""; position: fixed; inset: 0; background: linear-gradient(135deg,rgba(4,14,15,.84),rgba(5,31,31,.62)); pointer-events: none; }
.admin-shell { position: relative; width: min(1440px,100%); margin: auto; color: var(--text); }
.admin-header, .admin-toolbar, .admin-login-card, .admin-panel, .admin-summary article { border: 1px solid var(--line-strong); background: rgba(6,19,20,.9); box-shadow: 0 18px 50px rgba(0,0,0,.24); backdrop-filter: blur(18px); }
.admin-header { display: flex; align-items: center; justify-content: space-between; min-height: 88px; padding: 17px 22px; border-radius: 22px; }
.admin-brand { display: flex; align-items: center; gap: 14px; }
.admin-brand img { width: 48px; height: 48px; }
.admin-brand span, .admin-panel-head span { color: var(--accent); font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.admin-brand h1 { margin: 2px 0 0; font-size: 20px; }
.admin-guard { display: grid; grid-template-columns: auto auto; gap: 2px 8px; align-items: center; padding: 10px 13px; border: 1px solid rgba(244,184,72,.22); border-radius: 12px; background: rgba(244,184,72,.06); }
.admin-guard i { width: 8px; height: 8px; border-radius: 50%; background: #f4b848; }
.admin-guard strong { color: #ffd887; font-size: 10px; }
.admin-guard span { grid-column: 2; color: var(--muted); font-size: 9px; }
.admin-login-card { width: min(480px,100%); margin: 50px auto; padding: 34px; border-radius: 22px; }
.admin-login-card h2 { margin: 8px 0; font-size: 30px; }
.admin-login-card > p:not(.step) { color: var(--muted); }
.admin-login-card form { display: grid; gap: 13px; margin-top: 20px; }
.admin-login-card label { display: grid; gap: 7px; color: #c6d3d1; font-size: 11px; font-weight: 800; }
.admin-login-card input { min-height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 11px; background: #061112; color: var(--text); }
.admin-toolbar { display: flex; justify-content: space-between; gap: 20px; margin-top: 16px; padding: 24px; border-radius: 18px; }
.admin-toolbar h2 { margin: 4px 0 0; font-size: 27px; }
.admin-toolbar > div:last-child { display: flex; gap: 10px; align-items: center; }
.admin-toolbar-actions { justify-content: flex-end; flex-wrap: wrap; }
.admin-toolbar-actions .primary-action { min-width: 190px; }
.admin-summary { display: grid; grid-template-columns: repeat(5,1fr); gap: 12px; margin: 12px 0; }
.admin-summary article { min-height: 104px; padding: 18px; border-radius: 16px; }
.admin-summary span { display: block; color: var(--muted); font-size: 11px; }
.admin-summary strong { display: block; margin-top: 10px; color: var(--accent); font-size: 29px; }
.admin-summary .safe strong { color: #ffd887; }
.admin-grid { display: grid; grid-template-columns: minmax(300px,.8fr) minmax(420px,1.2fr); gap: 14px; align-items: start; }
.admin-panel { padding: 20px; border-radius: 18px; }
.admin-alert-panel { grid-column: 1 / -1; }
.admin-page-panel { grid-column: 1 / -1; }
.admin-panel-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid var(--line-strong); }
.admin-panel-head > div { display: flex; align-items: center; gap: 10px; }
.admin-panel-head h3 { margin: 0; font-size: 18px; }
.admin-panel-head small { color: var(--muted); }
.admin-list { display: grid; gap: 12px; margin-top: 14px; }
.admin-item { padding: 16px; border: 1px solid var(--line-strong); border-radius: 14px; background: rgba(2,12,13,.72); }
.admin-item-title { display: flex; justify-content: space-between; gap: 12px; }
.admin-item-title strong, .admin-item-title span { display: block; }
.admin-item-title strong { font-size: 14px; }
.admin-item-title span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.status-chip { align-self: start; padding: 6px 8px; border: 1px solid rgba(72,225,210,.22); border-radius: 8px; color: #9df5ed; font-size: 8px; font-style: normal; font-weight: 900; }
.status-chip.pending { color: #ffd887; border-color: rgba(244,184,72,.25); }
.status-chip.error { color: #ff9c9c; border-color: rgba(255,90,90,.25); }
.admin-item dl { display: grid; grid-template-columns: 90px 1fr; gap: 5px 10px; margin: 14px 0; font-size: 10px; }
.admin-item dt { color: var(--muted); }
.admin-item dd { margin: 0; }
.admin-item a { color: var(--accent); }
.admin-item p { color: #becbc9; font-size: 11px; line-height: 1.6; }
.admin-item textarea, .admin-item select { width: 100%; min-height: 42px; padding: 10px; border: 1px solid var(--line-strong); border-radius: 9px; background: #061112; color: var(--text); }
.admin-item textarea { margin-top: 12px; resize: vertical; }
.admin-item details { margin-top: 12px; color: var(--accent); font-size: 10px; }
.admin-item pre { max-height: 220px; overflow: auto; padding: 12px; border-radius: 9px; background: #02090a; color: #b8c6c4; white-space: pre-wrap; }
.admin-actions { display: flex; gap: 9px; margin-top: 11px; }
.admin-actions button { min-height: 42px; }
.admin-actions .primary-action { flex: 1; }
.registration-shortcuts { display: grid; gap: 10px; margin-top: 12px; }
.registration-shortcuts > .primary-action { width: 100%; }

.package-catalog-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 14px 0; padding: 16px 18px; border: 1px solid rgba(11,105,101,.2); border-radius: 14px; background: rgba(11,105,101,.045); }
.package-catalog-panel div { display: grid; gap: 3px; }
.package-catalog-panel span { color: var(--ui-accent); font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.package-catalog-panel strong { color: var(--text); font-size: 15px; }
.package-catalog-panel small { color: var(--muted); font-size: 11px; line-height: 1.55; }
.package-catalog-panel > b { flex: 0 0 auto; padding: 8px 11px; border-radius: 999px; background: rgba(78,233,213,.08); color: var(--ui-accent-2); font-size: 10px; }
.package-options { display: flex !important; align-items: flex-end; gap: 7px !important; }
.package-options b { padding: 8px 10px; border: 1px solid rgba(78,233,213,.18); border-radius: 10px; color: var(--ui-accent-2); font-size: 10px; white-space: nowrap; }

.admin-wizard { margin-top: 14px; border-color: rgba(72,225,210,.28); box-shadow: 0 22px 64px rgba(0,0,0,.32), inset 0 1px rgba(255,255,255,.025); }
.admin-wizard .compact { min-height: 36px; padding: 7px 12px; }
.page-wizard-form { display: grid; gap: 12px; margin-top: 16px; }
.wizard-block { display: grid; grid-template-columns: 42px minmax(0,1fr); gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(2,12,13,.58); }
.wizard-number { display: grid; place-items: center; width: 36px; height: 36px; color: var(--accent); background: rgba(72,225,210,.09); border: 1px solid rgba(72,225,210,.22); border-radius: 10px; font-size: 10px; font-weight: 900; }
.wizard-block > div > label, .wizard-fields > label { display: grid; gap: 7px; color: #c6d3d1; font-size: 11px; font-weight: 800; }
.wizard-block > div > small, .wizard-fields small { color: var(--muted); font-size: 9px; line-height: 1.5; }
.wizard-block select, .wizard-fields input { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: #061112; color: var(--text); font: inherit; }
.wizard-fields { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.wizard-heading { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding-bottom: 4px; }
.wizard-heading strong { font-size: 14px; }
.wizard-fields .wide { grid-column: 1 / -1; }
.wizard-fields input[readonly] { color: #a9b7b5; background: rgba(255,255,255,.025); cursor: not-allowed; }
.wizard-fields input[type="color"] { padding: 5px; cursor: pointer; }
.logo-field { padding: 12px; border: 1px dashed rgba(72,225,210,.25); border-radius: 11px; background: rgba(72,225,210,.035); }
.wizard-final { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 18px; align-items: center; padding: 17px; border: 1px solid rgba(244,184,72,.18); border-radius: 14px; background: rgba(244,184,72,.045); }
.wizard-confirm { display: grid; grid-template-columns: 20px minmax(0,1fr); gap: 10px; align-items: start; cursor: pointer; }
.wizard-confirm input { margin-top: 2px; }
.wizard-confirm strong, .wizard-confirm small { display: block; }
.wizard-confirm strong { color: #eef8f6; font-size: 11px; }
.wizard-confirm small { margin-top: 3px; color: var(--muted); font-size: 9px; line-height: 1.55; }
.wizard-final .primary-action { min-width: 230px; }

.page-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
.page-item { display: grid; grid-template-columns: 54px minmax(0,1fr); gap: 13px; align-items: center; }
.page-item > img { width: 54px; height: 54px; padding: 5px; object-fit: contain; border: 1px solid var(--line); border-radius: 13px; background: #f4f7f6; }
.page-item-copy { min-width: 0; }
.provisioning-strip { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 11px; color: var(--muted); font-size: 9px; }
.provisioning-strip span { display: inline-flex; align-items: center; gap: 5px; }
.provisioning-strip i { width: 6px; height: 6px; border-radius: 50%; background: #f4b848; }
.provisioning-strip i.ready { background: var(--accent); box-shadow: 0 0 10px rgba(72,225,210,.65); }
.provisioning-strip .safe-text { color: #ffd887; margin-left: auto; }
.manual-note, .approved-note { display: block; margin-top: 9px; color: var(--muted); font-size: 9px; }
.handoff-downloads { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.handoff-downloads summary { color: var(--navy); cursor: pointer; font-size: 13px; font-weight: 700; }
.handoff-downloads .admin-actions { margin-top: 10px; }
.handoff-confirm { display: grid; gap: 8px; margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.handoff-confirm > strong { color: var(--navy); font-size: 13px; }
.handoff-confirm label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; font-weight: 700; }
.handoff-confirm .primary-action { justify-self: start; }
.admin-empty { padding: 30px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--muted); text-align: center; }
.message.success { background: #0f5b50; border-color: rgba(72,225,210,.38); }

/* Keep navigation contextual: workspace controls do not appear before login or
   on the final receipt where they would lead to hidden sections. */
.shell:has(#login-card:not(.hidden)) .side-nav .nav-stack,
.shell:has(#login-card:not(.hidden)) .side-nav .nav-bottom { display: none; }
@media (min-width: 901px) {
  .shell:has(#login-card:not(.hidden)) #brand-mark { display: none; }
}
.shell:has(#result-card:not(.hidden)) { grid-template-columns: 1fr; }
.shell:has(#result-card:not(.hidden)) .side-nav { display: none; }
.shell:has(#result-card:not(.hidden)) .brand,
.shell:has(#result-card:not(.hidden)) .result { grid-column: 1; }

@media (max-width: 1120px) and (min-width: 901px) {
  .workspace-grid { grid-template-columns: minmax(0,1fr) 245px; }
  #upload-card #upload-section,
  #upload-card #submit-section { width: calc(100% + 263px); }
  .submit-panel { grid-template-columns: minmax(220px,.9fr) minmax(300px,1.2fr) minmax(200px,.8fr); gap-inline: 20px; }
  .admin-summary { grid-template-columns: repeat(3,1fr); }
  .wizard-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  body { padding-bottom: 78px; }
  body:has(#login-card:not(.hidden)),
  body:has(#result-card:not(.hidden)) { padding-bottom: 0; }
  .shell { grid-template-rows: 70px minmax(0,1fr); width: min(100% - 18px, 780px); min-height: calc(100vh - 18px); margin: 9px auto; overflow: visible; border-radius: 22px; backdrop-filter: none; }
  .brand { border-radius: 22px 22px 0 0; }
  .card { overflow: hidden; border-radius: 0 0 22px 22px; }
  .side-nav {
    position: fixed;
    z-index: 30;
    right: auto;
    bottom: 10px;
    left: 50%;
    grid-row: auto;
    width: min(calc(100% - 24px), 560px);
    height: 64px;
    padding: 8px 12px;
    background: rgba(4, 14, 15, .92);
    border: 1px solid rgba(151,235,226,.2);
    border-radius: 18px;
    box-shadow: 0 18px 45px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.035);
    backdrop-filter: blur(20px);
    transform: translateX(-50%);
  }
  .nav-stack { justify-content: space-between; width: 100%; }
  .nav-bottom { display: none; }
  .shell:has(#login-card:not(.hidden)) .side-nav { display: none; }
  .brand { min-height: 70px; padding-inline: 18px; }
  .login-layout { grid-template-columns: 1fr; }
  .login-intro { min-height: 430px; }
  .login-panel { min-height: 430px; }
  #upload-card .card-head { min-height: 112px; padding: 24px; }
  #upload-card .journey { padding-inline: 24px; }
  #upload-card .command-overview { margin: 20px 20px 0; }
  .workspace-grid { grid-template-columns: 1fr; gap: 16px; padding: 16px 20px 24px; }
  .workspace-aside { gap: 12px; }
  .submit-panel { grid-template-columns: 1fr 1fr; grid-template-areas: "copy consent" "action consent" "safe consent"; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-alert-panel { grid-column: 1; }
  .admin-summary { grid-template-columns: 1fr 1fr; }
  .page-list { grid-template-columns: 1fr; }
  .wizard-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 680px) {
  .shell { width: calc(100% - 10px); margin: 5px auto; border-radius: 18px; }
  .brand { min-height: 66px; padding: 9px 12px; }
  .brand-identity { gap: 9px; }
  .brand h1 { display: -webkit-box; max-width: 145px; overflow: hidden; font-size: 14px; line-height: 1.15; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .eyebrow { max-width: 140px; overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
  .test-badge { max-width: 118px; min-height: 38px; padding: 7px 9px; font-size: 8px; line-height: 1.35; text-align: center; }
  .narrow { padding: 10px; }
  .login-intro, .login-panel { min-height: auto; padding: 30px 23px; }
  .login-intro { padding-top: 46px; padding-bottom: 38px; }
  .login-intro h2 { margin-block: 14px 17px; font-size: 35px; }
  .login-copy { font-size: 14px; }
  .login-signals { gap: 10px; margin-top: 28px; }
  .login-signals div { min-height: 92px; padding: 15px; }
  .login-panel h3 { font-size: 27px; }
  #upload-card .card-head { min-height: 116px; padding: 20px 16px; }
  .card-head h2 { font-size: 25px; }
  .workspace-intro { font-size: 12px; }
  #upload-card .journey { min-height: 56px; padding-inline: 16px; }
  .journey-item b { width: 29px; height: 29px; }
  #upload-card .command-overview { margin: 14px 12px 0; padding: 22px; border-radius: 17px; }
  .overview-copy h3 { font-size: 31px; }
  .overview-copy p { font-size: 13px; }
  .overview-metrics { gap: 10px; }
  .overview-metrics article { min-height: 102px; padding: 17px; }
  .workspace-grid { padding: 12px; }
  .form-section { padding: 18px; border-radius: 16px; }
  .section-title { margin-bottom: 19px; }
  .section-title h3 { font-size: 19px; }
  .section-title p { font-size: 12px; }
  .template-tabs { grid-template-columns: repeat(3,1fr); gap: 4px; }
  .template-tab { min-height: 45px; padding: 8px 5px; font-size: 11px; }
  .template-control-row { padding: 15px; }
  .template-card { padding: 16px; }
  .template-add-head, .template-add-grid { padding-inline: 17px; }
  .upload-zone { min-height: 230px; padding: 30px 18px; }
  .submit-panel { grid-template-columns: 1fr; grid-template-areas: "copy" "consent" "action" "safe"; gap: 18px; padding: 22px 19px; }
  .consent { min-height: auto; padding: 16px 0; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); border-left: 0; border-right: 0; }
  .workspace-aside { grid-template-columns: 1fr; }
  .result h2 { font-size: 31px; }
  .result > p { font-size: 14px; }
  .result dl { grid-template-columns: 1fr; gap: 3px; padding: 20px; }
  .result dd { margin-bottom: 9px; }
  .registration-form { grid-template-columns: 1fr; }
  .package-catalog-panel { align-items: flex-start; flex-direction: column; }
  .registration-form label, .registration-form label:nth-of-type(n+5), .registration-form button, .registration-status { grid-column: 1; }
  .admin-body { padding: 8px; }
  .admin-header, .admin-toolbar { align-items: flex-start; flex-direction: column; }
  .admin-guard { width: 100%; }
  .admin-toolbar > div:last-child, .admin-actions { width: 100%; flex-direction: column; align-items: stretch; }
  .admin-summary { grid-template-columns: 1fr 1fr; }
  .admin-panel { padding: 14px; }
  .admin-toolbar-actions .primary-action { min-width: 0; }
  .wizard-block { grid-template-columns: 1fr; }
  .wizard-fields { grid-template-columns: 1fr; }
  .wizard-heading, .wizard-fields .wide { grid-column: 1; }
  .wizard-heading { display: grid; }
  .wizard-final { grid-template-columns: 1fr; }
  .wizard-final .primary-action { min-width: 0; width: 100%; }
  .page-item { grid-template-columns: 46px minmax(0,1fr); }
  .page-item > img { width: 46px; height: 46px; }
  .provisioning-strip .safe-text { width: 100%; margin-left: 0; }
}

/* Final cascade: keep the new visual language ahead of legacy theme rules. */
html { background: #f3f6f8 !important; }
body { background: radial-gradient(circle at 100% 0,#e5f2f1 0,transparent 31%),#f3f6f8 !important; color: #182a33 !important; }
body::before, .admin-body::before { display: none !important; }
.shell { display: block !important; width: min(1240px,calc(100% - 32px)) !important; min-height: calc(100vh - 32px) !important; margin: 16px auto !important; overflow: visible !important; background: #fff !important; border: 1px solid #d9e3e7 !important; border-radius: 22px !important; box-shadow: 0 18px 50px rgba(24,55,68,.10) !important; }
.side-nav { display: none !important; }
.brand { min-height: 76px !important; padding: 16px 30px !important; background: #fff !important; border-bottom: 1px solid #d9e3e7 !important; border-radius: 22px 22px 0 0 !important; }
.brand h1 { color: #183b4a !important; font-size: 18px !important; }
.brand-mark { background: #183b4a !important; box-shadow: none !important; }
.login-layout { grid-template-columns: 1.12fr .88fr !important; min-height: 650px !important; margin: 30px !important; background: #fff !important; border: 1px solid #d9e3e7 !important; border-radius: 18px !important; box-shadow: 0 5px 18px rgba(24,55,68,.07) !important; }
.login-intro { min-height: 600px !important; padding: 58px 56px !important; color: #182a33 !important; background: linear-gradient(145deg,#f8fbfb,#edf6f5) !important; border-right: 1px solid #d9e3e7 !important; }
.login-intro::before, .login-intro::after { display: none !important; }
.login-intro h2 { color: #183b4a !important; }
.login-intro h2 span, .login-intro h2 em { color: #087f82 !important; text-shadow: none !important; }
.login-copy, .login-panel > p { color: #63737b !important; }
.login-signals div { background: rgba(255,255,255,.72) !important; border: 1px solid #d9e3e7 !important; box-shadow: none !important; }
.login-signals b, .login-panel h3 { color: #183b4a !important; }
.login-panel { min-height: 600px !important; padding: 58px 48px !important; background: #fff !important; color: #182a33 !important; }
.login-panel > .muted { color: #63737b !important; }
input, select, textarea { color: #182a33 !important; background: #fff !important; border-color: #bdcdd3 !important; box-shadow: none !important; }
.primary-action, button.primary-action, .submit-button { background: #056568 !important; box-shadow: 0 7px 16px rgba(5,101,104,.20) !important; }
.secondary-action, button.secondary-action { color: #183b4a !important; background: #fff !important; border-color: #bdcdd3 !important; box-shadow: none !important; }
#upload-card .card-head, #upload-card .journey, .command-overview, .form-section, .workspace-aside > section, .result { border-color: #d9e3e7 !important; background: #fff !important; box-shadow: 0 5px 18px rgba(24,55,68,.07) !important; }
#upload-card .card-head { margin: 28px 28px 0 !important; }
#upload-card .journey { margin: 0 28px !important; background: #f8fafb !important; box-shadow: none !important; }
.command-overview { background: linear-gradient(135deg,#edf8f6,#f7fbfb) !important; box-shadow: none !important; }
.command-overview::before { display: none !important; }
.card-head h2, .overview-copy h3, .section-title h3, .workspace-aside h3, .status-card h4, .result h2 { color: #183b4a !important; }
.workspace-intro, .section-title p, .status-card p, .workspace-aside p, .safe-text { color: #63737b !important; }
.template-tab.active { color: #056568 !important; background: #e2f2f1 !important; border-color: #087f82 !important; }
.template-control-row, .template-card, .upload-zone, .submit-panel { background: #f8fafb !important; border-color: #d9e3e7 !important; box-shadow: none !important; }
.admin-body { background: radial-gradient(circle at 100% 0,#e5f2f1 0,transparent 30%),#f3f6f8 !important; }
.admin-header, .admin-toolbar, .admin-panel, .admin-login-card, .page-item, .admin-summary article { background: #fff !important; border-color: #d9e3e7 !important; box-shadow: 0 5px 18px rgba(24,55,68,.07) !important; }
.admin-header h1, .admin-panel h2, .admin-panel h3, .page-item h3 { color: #183b4a !important; }
.admin-header p, .admin-toolbar p, .page-item p, .page-meta { color: #63737b !important; }
@media (max-width: 900px) { .login-layout { grid-template-columns: 1fr !important; } .login-intro { min-height: auto !important; border-right: 0 !important; border-bottom: 1px solid #d9e3e7 !important; } }
@media (max-width: 680px) { .shell { width: calc(100% - 16px) !important; margin: 8px auto !important; } .login-layout { margin: 14px !important; } .login-intro, .login-panel { min-height: auto !important; padding: 30px 24px !important; } #upload-card .card-head { margin: 14px 14px 0 !important; } #upload-card .journey { margin: 0 14px !important; } .command-overview { margin: 16px 14px 0 !important; } .workspace-grid { grid-template-columns: 1fr !important; padding: 14px !important; } }

/* Typography refinement */
body, button, input, select, textarea { font-family: "Leelawadee UI", "Noto Sans Thai", "Segoe UI", sans-serif !important; }
body { font-size: 15px !important; line-height: 1.7 !important; }
.eyebrow, .step, .top-status, .test-badge { letter-spacing: .06em !important; }
.brand h1 { font-size: 19px !important; font-weight: 700 !important; letter-spacing: -.01em !important; }
.login-intro h2 { max-width: none !important; font-size: clamp(34px,3.5vw,45px) !important; font-weight: 700 !important; line-height: 1.22 !important; letter-spacing: -.02em !important; word-break: keep-all !important; }
.login-copy { font-size: 16px !important; line-height: 1.8 !important; }
.login-signals strong { font-size: 14px !important; font-weight: 700 !important; }
.login-signals small { font-size: 12px !important; line-height: 1.55 !important; }
.login-panel h3 { font-size: 29px !important; font-weight: 700 !important; line-height: 1.35 !important; }
.login-panel > p { font-size: 15px !important; line-height: 1.75 !important; }
label, .field-label { font-size: 13px !important; line-height: 1.5 !important; }
input, select, textarea { font-size: 15px !important; line-height: 1.55 !important; }
.security-note { font-size: 12px !important; line-height: 1.5 !important; }
.card-head h2 { font-size: clamp(24px,2.7vw,31px) !important; font-weight: 700 !important; line-height: 1.3 !important; }
.workspace-intro { font-size: 14px !important; line-height: 1.65 !important; }
.journey-item em { font-size: 12px !important; font-weight: 600 !important; }
.overview-copy h3 { font-size: clamp(27px,3vw,38px) !important; font-weight: 700 !important; line-height: 1.25 !important; }
.overview-copy p { font-size: 14px !important; line-height: 1.7 !important; }
.overview-metrics span { font-size: 12px !important; font-weight: 600 !important; }
.overview-metrics strong { font-size: clamp(21px,2.4vw,30px) !important; }
.section-title h3 { font-size: 20px !important; font-weight: 700 !important; line-height: 1.4 !important; }
.section-title p, .template-control-copy span, .template-card small { font-size: 12px !important; line-height: 1.6 !important; }
.template-control-copy strong, .template-card strong { font-size: 14px !important; }
.template-tab { font-size: 13px !important; }
.upload-zone strong { font-size: 15px !important; }
.upload-zone .muted, .file-item span { font-size: 12px !important; }
.submit-copy h3 { font-size: 20px !important; line-height: 1.4 !important; }
.submit-copy p, .consent { font-size: 13px !important; line-height: 1.6 !important; }
.safe-submit { font-size: 11px !important; }
.result h2 { font-size: 32px !important; line-height: 1.35 !important; }
.result > p { font-size: 15px !important; line-height: 1.7 !important; }
.admin-header h1 { font-size: 28px !important; line-height: 1.3 !important; }
.admin-header p, .admin-toolbar p, .page-item p, .page-meta { font-size: 14px !important; line-height: 1.65 !important; }
.admin-panel h2, .admin-panel h3 { line-height: 1.4 !important; }
@media (max-width: 680px) { .login-intro h2 { max-width: 100% !important; font-size: 34px !important; white-space: normal !important; } .login-copy { font-size: 15px !important; } }

/* Concept A: editorial landing layout */
.login-layout { grid-template-columns: minmax(0,1.45fr) minmax(340px,.7fr) !important; min-height: 610px !important; border: 0 !important; background: #f8faf9 !important; box-shadow: none !important; }
.login-intro { position: relative !important; isolation: isolate !important; display: flex !important; flex-direction: column !important; justify-content: center !important; min-height: 610px !important; padding: 64px 72px !important; overflow: hidden !important; border: 0 !important; background: #f7f8f5 !important; }
.login-intro::before { content: "" !important; display: block !important; position: absolute !important; z-index: -1 !important; right: 8% !important; top: 18% !important; width: 43% !important; height: 53% !important; border-radius: 28px !important; background: linear-gradient(145deg,#e4ece7,#d5e1dd) !important; opacity: .92 !important; transform: rotate(3deg) !important; }
.login-intro::after { content: "KAIROS AUTOPOST  ·  CONTENT WORKSPACE" !important; display: flex !important; align-items: flex-end !important; position: absolute !important; z-index: -1 !important; right: 11% !important; top: 25% !important; width: 35% !important; height: 39% !important; padding: 20px !important; border-radius: 18px !important; color: #183b4a !important; background: linear-gradient(160deg,#fff 0 55%,#dbeae5 55% 100%) !important; box-shadow: 0 18px 35px rgba(24,55,68,.12) !important; font-size: 10px !important; font-weight: 700 !important; letter-spacing: .08em !important; }
.login-intro > * { position: relative !important; z-index: 1 !important; max-width: 53% !important; }
.login-intro .login-signals { max-width: 58% !important; margin-top: 34px !important; }
.login-intro .system-line { max-width: 58% !important; }
.login-intro h2 { margin: 18px 0 16px !important; font-size: clamp(40px,4.2vw,58px) !important; line-height: 1.12 !important; }
.login-panel { align-self: center !important; min-height: auto !important; margin: 40px 40px 40px 0 !important; padding: 42px 38px !important; border: 1px solid #d9e3e7 !important; border-radius: 18px !important; background: #fff !important; box-shadow: 0 12px 30px rgba(24,55,68,.10) !important; }
.login-panel .login-visual { margin-bottom: 18px !important; }
.login-panel .login-icon { width: 52px !important; height: 52px !important; }
.login-panel .registration-panel { margin-top: 26px !important; }
.login-signals div { min-height: 96px !important; padding: 16px !important; border-radius: 12px !important; }
.login-signals span { display: block !important; margin-bottom: 8px !important; }
@media (max-width: 900px) { .login-layout { grid-template-columns: 1fr !important; } .login-intro { min-height: 500px !important; padding: 52px 56px !important; } .login-intro > * { max-width: 65% !important; } .login-intro::before { right: 4% !important; width: 42% !important; } .login-intro::after { right: 8% !important; width: 35% !important; } .login-panel { margin: -18px 40px 40px !important; } }
@media (max-width: 680px) { .login-intro { min-height: 430px !important; padding: 38px 24px !important; } .login-intro > * { max-width: 100% !important; } .login-intro::before, .login-intro::after { display: none !important; } .login-intro .login-signals, .login-intro .system-line { max-width: 100% !important; } .login-intro h2 { font-size: 40px !important; } .login-panel { margin: 0 !important; padding: 30px 24px !important; border-radius: 0 0 16px 16px !important; box-shadow: none !important; } }

/* Match concept A hero composition with the prepared Kairos visual. */
.login-intro::after {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  z-index: 0 !important;
  left: auto !important;
  top: 15% !important;
  right: 6% !important;
  width: 43% !important;
  height: 68% !important;
  padding: 0 !important;
  border: 1px solid rgba(24,59,74,.10) !important;
  border-radius: 20px !important;
  background: #dceae7 url('/assets/login-background-bright-glass-studio.png') center/cover no-repeat !important;
  box-shadow: 0 22px 42px rgba(24,55,68,.15) !important;
  font-size: 0 !important;
  transform: rotate(2deg) !important;
}
.login-intro::before { z-index: -1 !important; right: 4% !important; top: 12% !important; width: 45% !important; height: 72% !important; background: #e3efeb !important; transform: rotate(-3deg) !important; }
.login-intro > * { max-width: 43% !important; }
.login-intro .login-signals, .login-intro .system-line { max-width: 46% !important; }
@media (max-width: 900px) { .login-intro::after { right: 5% !important; width: 39% !important; height: 56% !important; } .login-intro::before { right: 3% !important; width: 41% !important; height: 60% !important; } }
@media (max-width: 680px) { .login-intro::before, .login-intro::after { display: none !important; } .login-intro > * { max-width: 100% !important; } }

/* Standard type scale: one Thai family, predictable weights and rhythm. */
body, body * { font-family: "Leelawadee UI", "Noto Sans Thai", "Segoe UI", sans-serif !important; }
body { font-size: 15px !important; line-height: 1.7 !important; font-weight: 400 !important; }
h1, h2, h3, h4, p, span, small, label, button, input, select, textarea { letter-spacing: 0 !important; }
h1, h2, h3, h4 { font-weight: 700 !important; }
p, span, small, label, input, select, textarea { font-weight: 400 !important; }
.eyebrow, .step, .live-kicker, .aside-label { font-size: 11px !important; font-weight: 700 !important; letter-spacing: .06em !important; }
.brand h1 { font-size: 19px !important; line-height: 1.35 !important; font-weight: 700 !important; }
.login-intro h2 { font-size: clamp(38px,4vw,54px) !important; line-height: 1.18 !important; font-weight: 700 !important; letter-spacing: -.015em !important; }
.login-copy { font-size: 16px !important; line-height: 1.8 !important; }
.login-signals strong { display: block !important; font-size: 14px !important; line-height: 1.45 !important; font-weight: 700 !important; }
.login-signals small { display: block !important; margin-top: 4px !important; font-size: 12px !important; line-height: 1.55 !important; }
.login-panel h3 { font-size: 29px !important; line-height: 1.35 !important; font-weight: 700 !important; }
.login-panel > p, .login-panel .muted { font-size: 15px !important; line-height: 1.75 !important; font-weight: 400 !important; }
.login-panel label { font-size: 13px !important; line-height: 1.5 !important; font-weight: 700 !important; }
.login-panel input, .login-panel select, .login-panel textarea { font-size: 15px !important; line-height: 1.55 !important; font-weight: 400 !important; }
.login-panel button { font-size: 14px !important; line-height: 1.5 !important; font-weight: 700 !important; }
.security-note { font-size: 12px !important; line-height: 1.6 !important; font-weight: 400 !important; }
.card-head h2 { font-size: clamp(24px,2.7vw,31px) !important; line-height: 1.35 !important; font-weight: 700 !important; }
.workspace-intro { font-size: 14px !important; line-height: 1.7 !important; }
.journey-item em { font-size: 12px !important; line-height: 1.45 !important; font-weight: 600 !important; }
.overview-copy h3 { font-size: clamp(27px,3vw,38px) !important; line-height: 1.25 !important; font-weight: 700 !important; }
.overview-copy p { font-size: 14px !important; line-height: 1.7 !important; }
.section-title h3 { font-size: 20px !important; line-height: 1.4 !important; font-weight: 700 !important; }
.section-title p, .template-control-copy span, .template-card small { font-size: 12px !important; line-height: 1.6 !important; }
.template-control-copy strong, .template-card strong { font-size: 14px !important; line-height: 1.45 !important; font-weight: 700 !important; }
.template-tab { font-size: 13px !important; line-height: 1.4 !important; font-weight: 600 !important; }
.upload-zone strong { font-size: 15px !important; line-height: 1.5 !important; font-weight: 700 !important; }
.upload-zone .muted, .file-item span { font-size: 12px !important; line-height: 1.6 !important; }
.submit-copy h3 { font-size: 20px !important; line-height: 1.4 !important; font-weight: 700 !important; }
.submit-copy p, .consent { font-size: 13px !important; line-height: 1.65 !important; }
.result h2 { font-size: 32px !important; line-height: 1.35 !important; font-weight: 700 !important; }
.result > p { font-size: 15px !important; line-height: 1.7 !important; }
.admin-header h1 { font-size: 28px !important; line-height: 1.35 !important; font-weight: 700 !important; }
.admin-header p, .admin-toolbar p, .page-item p, .page-meta { font-size: 14px !important; line-height: 1.65 !important; }
@media (max-width: 680px) { .login-intro h2 { font-size: 36px !important; line-height: 1.2 !important; } .login-copy { font-size: 15px !important; } }

/* Final editorial hierarchy for the selected Concept A. */
.brand { position: relative !important; }
.brand::after {
  content: "" !important;
  position: absolute !important;
  left: 52% !important;
  top: 35px !important;
  width: 156px !important;
  height: 3px !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg,#0b5f7a 0 33%,#b7c4cb 33% 56%,#d8e0e4 56% 100%) !important;
}
.login-layout { grid-template-columns: minmax(0,1.5fr) minmax(330px,.7fr) !important; min-height: 630px !important; }
.login-intro { min-height: 630px !important; padding: 72px 68px !important; }
.login-intro > .step { margin: 0 0 16px !important; }
.login-intro h2 { max-width: 42% !important; margin: 0 0 18px !important; font-size: clamp(34px,2.9vw,40px) !important; line-height: 1.25 !important; white-space: nowrap !important; }
.login-intro .login-copy { max-width: 36% !important; margin: 0 !important; }
.login-intro .login-signals, .login-intro .system-line { display: none !important; }
.login-intro::after { top: 16% !important; right: 6% !important; width: 43% !important; height: 67% !important; transform: rotate(1.2deg) !important; }
.login-intro::before { top: 14% !important; right: 4.5% !important; width: 45% !important; height: 70% !important; transform: rotate(-1.8deg) !important; }
.login-panel { margin: 46px 42px 46px 0 !important; padding: 46px 38px !important; border-radius: 18px !important; }
.login-panel .login-visual { margin-bottom: 16px !important; }
.login-panel h3 { margin-top: 4px !important; }
.login-panel .security-note { margin-top: 20px !important; }
@media (max-width: 900px) {
  .brand::after { display: none !important; }
  .login-intro { min-height: 480px !important; padding: 52px 48px !important; }
  .login-intro h2 { max-width: 48% !important; }
  .login-intro .login-copy { max-width: 44% !important; }
  .login-panel { margin: -12px 34px 36px !important; }
}
@media (max-width: 680px) {
  .login-intro { min-height: 360px !important; padding: 38px 24px !important; }
  .login-intro h2, .login-intro .login-copy { max-width: 100% !important; }
  .login-intro .login-copy { font-size: 15px !important; }
  .login-intro::before, .login-intro::after { display: none !important; }
}

/* Readable production scale for the landing page. */
body { font-size: 16px !important; }
.eyebrow, .step, .live-kicker, .aside-label { font-size: 12px !important; letter-spacing: .055em !important; }
.brand h1 { font-size: 20px !important; }
.top-status, .test-badge { font-size: 12px !important; }
.login-intro h2 { font-size: clamp(36px,3.05vw,42px) !important; line-height: 1.22 !important; }
.login-copy { font-size: 16px !important; line-height: 1.75 !important; }
.login-panel h3 { font-size: 30px !important; line-height: 1.35 !important; }
.login-panel > p, .login-panel .muted { font-size: 16px !important; line-height: 1.7 !important; }
.login-panel label { font-size: 14px !important; }
.login-panel input, .login-panel select, .login-panel textarea { font-size: 16px !important; }
.login-panel button, .primary-action, .secondary-action { font-size: 15px !important; }
.security-note { font-size: 13px !important; }
.registration-panel summary { font-size: 14px !important; font-weight: 700 !important; }
.registration-panel > p { font-size: 14px !important; line-height: 1.65 !important; }
.card-head h2 { font-size: clamp(25px,2.4vw,30px) !important; }
.workspace-intro, .overview-copy p { font-size: 15px !important; }
.journey-item em { font-size: 13px !important; }
.section-title h3 { font-size: 21px !important; }
.section-title p, .template-control-copy span, .template-card small { font-size: 13px !important; }
.template-control-copy strong, .template-card strong { font-size: 15px !important; }
.template-tab { font-size: 14px !important; }
@media (max-width: 680px) {
  .login-intro h2 { font-size: 36px !important; }
  .login-copy, .login-panel > p, .login-panel .muted { font-size: 15px !important; }
}

/* Self-service page drafts: independent from active publishing controls. */
.drafts-section { margin: 20px 28px 0; padding: 24px; border: 1px solid var(--line-strong); border-radius: 18px; background: #fff; }
.drafts-heading { display: flex; justify-content: space-between; align-items: start; gap: 24px; }
.drafts-heading h3 { margin: 2px 0 6px; color: #17324d; font-size: 21px !important; line-height: 1.4 !important; }
.drafts-heading p:last-child { max-width: 700px; margin: 0; color: #50626b; font-size: 14px !important; line-height: 1.65 !important; }
.drafts-heading button { flex: none; }
.page-drafts-list { display: grid; gap: 10px; margin-top: 18px; }
.draft-empty { margin: 0; padding: 16px; border: 1px dashed #c8d7dc; border-radius: 12px; color: #51636c; font-size: 14px !important; }
.draft-item { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 14px 16px; border: 1px solid #dce6e8; border-radius: 12px; background: #f7faf9; }
.draft-item > div:first-child { display: grid; gap: 2px; min-width: 0; }
.draft-item strong { color: #17324d; font-size: 15px !important; }
.draft-item span, .draft-item small { color: #586b73; font-size: 13px !important; line-height: 1.5 !important; }
.draft-item-actions { display: flex; flex: none; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; }
.draft-item-actions .text-button { color: #a04444; font-size: 13px !important; }
.draft-waiting { color: #0b6965; font-size: 13px !important; }
.facebook-connect { border: 0; border-radius: 10px; background: #1877f2; color: #fff; padding: 10px 14px; font: inherit; font-weight: 700; cursor: pointer; }
.facebook-connect:disabled { opacity: .6; cursor: wait; }
.facebook-connected { display: inline-flex; align-items: center; border-radius: 999px; background: #e7f7f1; color: #096b54; padding: 8px 12px; font-size: 13px !important; font-weight: 700; }
.facebook-page-options { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px; padding: 10px; border: 1px solid #b9d2ef; border-radius: 12px; background: #f3f8ff; }
.facebook-page-options > span { width: 100%; color: #17324d; font-size: 13px !important; font-weight: 700; }
.page-draft-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 20px; padding-top: 20px; border-top: 1px solid #dce6e8; }
.page-draft-form label { display: grid; gap: 6px; color: #263f4a; font-size: 14px !important; font-weight: 600 !important; }
.page-draft-form .wide { grid-column: 1 / -1; }
.page-draft-form input, .page-draft-form textarea, .page-draft-form select { width: 100%; min-width: 0; border: 1px solid #c6d6db; border-radius: 10px; background: #fff; color: #17324d; padding: 10px 12px; font-size: 15px !important; }
.page-draft-form textarea { min-height: 78px; }
.page-draft-form small { color: #586b73; font-size: 12px !important; }
.draft-form-actions { display: flex; gap: 10px; align-items: center; }
.draft-form-actions .primary-action { width: auto; min-width: 150px; }
.draft-status { min-height: 1.5em; margin: 14px 0 0; color: #0b6965; font-size: 13px !important; }
@media (max-width: 700px) {
  .drafts-section { margin: 14px 12px 0; padding: 18px; }
  .drafts-heading, .draft-item { flex-direction: column; align-items: stretch; }
  .page-draft-form { grid-template-columns: 1fr; }
  .page-draft-form .wide { grid-column: auto; }
  .draft-form-actions { flex-wrap: wrap; }
}
