@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@400;500;600;700&family=Noto+Sans+Thai:wght@400;500;600;700&display=swap");

:root {
  --matcha-primary: #6b8e23;
  --matcha-deep: #3f5d2a;
  --wabi-clay: #c58e6f;
  --tea-cream: #f5f2e9;
  --ink-black: #1f1f1f;
  --spring-leaf: #9bcb3c;
  --stone: #8f8372;
  --mist: #f8f6f0;
  --paper: #fffdf8;
  --charcoal: #2d261f;
  --rose-clay: #e8d8ce;
  --sage-fog: #dfe6d0;
  --success: #2f7d4b;
  --warning: #bb7b2c;
  --danger: #9d3d2e;
  --shadow-soft: 0 24px 60px rgba(54, 50, 36, 0.08);
  --shadow-card: 0 18px 36px rgba(55, 52, 40, 0.1);
  --shadow-hard: 0 30px 80px rgba(34, 30, 24, 0.16);
  --radius-sm: 12px;
  --radius-md: 22px;
  --radius-lg: 34px;
  --radius-pill: 999px;
  --font-display: "Cormorant Garamond", "Noto Serif JP", serif;
  --font-body: "Bai Jamjuree", sans-serif;
  --transition: 220ms ease;
  --sidebar-width: 290px;
  --content-width: 1480px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink-black);
  background:
    radial-gradient(circle at top left, rgba(155, 203, 60, 0.18), transparent 35%),
    radial-gradient(circle at bottom right, rgba(197, 142, 111, 0.16), transparent 30%),
    linear-gradient(180deg, #faf7f0 0%, #f4efe3 100%);
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.is-hidden {
  display: none !important;
}

.app-root {
  position: relative;
  z-index: 1;
}

.app-noise,
.app-glow {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
}

.app-noise {
  opacity: 0.08;
  background-image:
    linear-gradient(0deg, rgba(255, 255, 255, 0.35) 50%, transparent 50%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.04) 50%, transparent 50%);
  background-size: 3px 3px, 4px 4px;
  mix-blend-mode: multiply;
}

.app-glow-top {
  background: radial-gradient(circle at 10% 10%, rgba(107, 142, 35, 0.22), transparent 38%);
}

.app-glow-bottom {
  background: radial-gradient(circle at 85% 90%, rgba(197, 142, 111, 0.18), transparent 34%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--matcha-deep);
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: currentColor;
  opacity: 0.45;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.2fr 0.95fr;
  gap: 1.75rem;
  padding: 2rem;
}

.auth-shell__brand,
.auth-shell__panel {
  display: flex;
}

.auth-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  background: rgba(255, 252, 246, 0.85);
  border: 1px solid rgba(63, 93, 42, 0.09);
  border-radius: 36px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(20px);
}

.auth-card--brand {
  padding: 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    linear-gradient(145deg, rgba(255, 250, 240, 0.98), rgba(245, 242, 233, 0.78)),
    var(--paper);
}

.auth-card--brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 20%, rgba(107, 142, 35, 0.16), transparent 32%),
    radial-gradient(circle at 80% 30%, rgba(197, 142, 111, 0.12), transparent 26%),
    linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.45) 100%);
  pointer-events: none;
}

.auth-card--form {
  max-width: 560px;
  margin: auto;
  padding: 2.5rem;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(249, 246, 240, 0.94)),
    var(--paper);
}

.brand-lockup {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.brand-lockup__mark {
  width: 10.5rem;
  flex-shrink: 0;
  filter: drop-shadow(0 18px 26px rgba(63, 93, 42, 0.14));
}

.brand-lockup__jp {
  margin: 0;
  font-size: 2.6rem;
  line-height: 0.95;
  color: var(--charcoal);
  font-family: var(--font-display);
}

.brand-lockup__title {
  margin: 0.2rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(2.9rem, 6vw, 4.6rem);
  line-height: 0.95;
  color: var(--ink-black);
}

.brand-lockup__subtitle {
  margin: 0.4rem 0 0;
  font-size: 1.05rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(31, 31, 31, 0.6);
}

.architect-note {
  position: relative;
  margin-top: 1rem;
  max-width: 46rem;
}

.architect-note h2 {
  margin: 1rem 0 0.9rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.02;
  color: var(--charcoal);
}

.architect-note p {
  margin: 0;
  max-width: 44rem;
  font-size: 1rem;
  line-height: 1.8;
  color: rgba(31, 31, 31, 0.78);
}

.auth-flow-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.flow-chip {
  padding: 1.15rem 1.2rem;
  border-radius: 26px;
  border: 1px solid rgba(63, 93, 42, 0.1);
  background: rgba(255, 255, 255, 0.72);
}

.flow-chip span {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  color: var(--matcha-primary);
  font-weight: 700;
}

.flow-chip strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.flow-chip small {
  display: block;
  color: rgba(31, 31, 31, 0.68);
  line-height: 1.5;
}

.auth-title {
  margin: 0.9rem 0 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1;
}

.auth-desc {
  margin: 0 0 1.5rem;
  color: rgba(31, 31, 31, 0.74);
  line-height: 1.75;
}

.form-stack {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field span {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(31, 31, 31, 0.76);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(63, 93, 42, 0.14);
  border-radius: 18px;
  padding: 0.9rem 1rem;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink-black);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(107, 142, 35, 0.6);
  outline: none;
  box-shadow: 0 0 0 4px rgba(155, 203, 60, 0.16);
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.seed-accounts {
  margin-top: 1.4rem;
  padding: 1rem 1.2rem;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(107, 142, 35, 0.08), rgba(197, 142, 111, 0.08));
}

.seed-accounts h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
}

.seed-accounts ul {
  margin: 0;
  padding-left: 1.1rem;
  color: rgba(31, 31, 31, 0.72);
  line-height: 1.7;
}

.shell {
  position: relative;
  min-height: 100vh;
}

.shell__mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(31, 31, 31, 0.45);
  backdrop-filter: blur(4px);
  z-index: 30;
}

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-width);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  background:
    linear-gradient(180deg, rgba(27, 40, 20, 0.96), rgba(44, 39, 30, 0.96)),
    var(--matcha-deep);
  color: rgba(255, 255, 255, 0.92);
  box-shadow: 18px 0 48px rgba(28, 24, 18, 0.16);
  z-index: 40;
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(155, 203, 60, 0.22), transparent 26%),
    radial-gradient(circle at 85% 90%, rgba(197, 142, 111, 0.18), transparent 28%);
  opacity: 0.75;
  pointer-events: none;
}

.sidebar > * {
  position: relative;
  z-index: 1;
}

.sidebar__top {
  display: grid;
  gap: 1rem;
}

.sidebar__brand {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.sidebar__crest {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(155, 203, 60, 0.28), rgba(197, 142, 111, 0.24));
  font-family: var(--font-display);
  font-size: 1.8rem;
}

.sidebar__title {
  font-family: var(--font-display);
  font-size: 1.7rem;
}

.sidebar__caption {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
}

.sidebar__badge {
  display: inline-flex;
  justify-content: center;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.85rem;
}

.sidebar__nav {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  border: none;
  padding: 0.88rem 1rem;
  border-radius: 18px;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  text-align: left;
  transition: transform var(--transition), background var(--transition), color var(--transition);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  transform: translateX(4px);
}

.nav-item.is-active {
  background: linear-gradient(135deg, rgba(155, 203, 60, 0.24), rgba(107, 142, 35, 0.24));
  color: white;
  border: 1px solid rgba(155, 203, 60, 0.24);
}

.nav-item__icon {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.07);
  font-size: 1rem;
}

.nav-item__text strong {
  display: block;
  font-size: 0.98rem;
}

.nav-item__text small {
  display: block;
  margin-top: 0.15rem;
  color: rgba(255, 255, 255, 0.56);
}

.sidebar__footer {
  margin-top: auto;
  padding: 1rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar__footer-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.58);
}

.palette-strip {
  display: flex;
  gap: 0.45rem;
  margin: 0.8rem 0;
}

.palette-strip span {
  flex: 1;
  height: 20px;
  border-radius: 999px;
}

.sidebar__footer-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  line-height: 1.6;
}

.shell__main {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.4rem 1.8rem 1.1rem;
  background: rgba(250, 246, 236, 0.8);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(63, 93, 42, 0.08);
}

.topbar__left,
.topbar__right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar__eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(31, 31, 31, 0.5);
}

.topbar__title {
  margin: 0.25rem 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1;
}

.topbar__user {
  padding: 0.6rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-card);
  color: rgba(31, 31, 31, 0.8);
  font-size: 0.92rem;
}

.shell__content {
  width: min(calc(100vw - var(--sidebar-width)), var(--content-width));
  margin: 0 auto;
  padding: 1.8rem;
}

.page-shell {
  display: grid;
  gap: 1.4rem;
}

.hero-band {
  position: relative;
  overflow: hidden;
  padding: 1.7rem 1.8rem;
  border-radius: 30px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(245, 242, 233, 0.8)),
    var(--paper);
  border: 1px solid rgba(63, 93, 42, 0.08);
  box-shadow: var(--shadow-card);
}

.hero-band::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  right: -70px;
  top: -90px;
  background: radial-gradient(circle, rgba(155, 203, 60, 0.22), transparent 65%);
}

.hero-band h3 {
  margin: 0.5rem 0 0.45rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 0.98;
  max-width: 16ch;
}

.hero-band p {
  max-width: 56rem;
  margin: 0;
  color: rgba(31, 31, 31, 0.72);
  line-height: 1.8;
}

.hero-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.2rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.stat-card {
  padding: 1.2rem 1.2rem 1.25rem;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(63, 93, 42, 0.08);
  box-shadow: var(--shadow-card);
}

.stat-card__label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(31, 31, 31, 0.5);
}

.stat-card__value {
  margin-top: 0.7rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 0.92;
}

.stat-card__hint {
  margin-top: 0.55rem;
  color: rgba(31, 31, 31, 0.68);
  line-height: 1.6;
  font-size: 0.92rem;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 1rem;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  padding: 1.35rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(63, 93, 42, 0.08);
  box-shadow: var(--shadow-card);
}

.card--soft {
  background: linear-gradient(135deg, rgba(248, 252, 241, 0.92), rgba(255, 250, 244, 0.92));
}

.card__head,
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.card__head h3,
.section-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.8rem;
  line-height: 0.98;
}

.card__head p,
.section-head p {
  margin: 0.35rem 0 0;
  color: rgba(31, 31, 31, 0.66);
  line-height: 1.65;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: none;
  border-radius: 999px;
  padding: 0.88rem 1.25rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: linear-gradient(135deg, var(--matcha-deep), var(--matcha-primary));
  color: white;
  box-shadow: 0 14px 26px rgba(63, 93, 42, 0.22);
}

.btn--secondary {
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink-black);
  border: 1px solid rgba(63, 93, 42, 0.12);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.4);
  color: var(--ink-black);
  border: 1px solid rgba(63, 93, 42, 0.08);
}

.btn--danger {
  background: linear-gradient(135deg, #b95241, var(--danger));
  color: white;
}

.btn--block {
  width: 100%;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(63, 93, 42, 0.1);
  background: rgba(255, 255, 255, 0.92);
  display: inline-grid;
  place-items: center;
  font-size: 1rem;
  box-shadow: var(--shadow-card);
}

.icon-btn--ghost {
  background: rgba(255, 255, 255, 0.6);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border-radius: 999px;
  padding: 0.48rem 0.78rem;
  font-weight: 600;
  font-size: 0.85rem;
}

.status-pill--soft {
  background: rgba(155, 203, 60, 0.12);
  color: var(--matcha-deep);
}

.status-pill--success {
  background: rgba(47, 125, 75, 0.12);
  color: var(--success);
}

.status-pill--warning {
  background: rgba(187, 123, 44, 0.14);
  color: var(--warning);
}

.status-pill--danger {
  background: rgba(157, 61, 46, 0.12);
  color: var(--danger);
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: currentColor;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(63, 93, 42, 0.12);
  color: rgba(31, 31, 31, 0.72);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.chip.is-active,
.chip:hover {
  background: rgba(107, 142, 35, 0.12);
  border-color: rgba(107, 142, 35, 0.3);
  color: var(--matcha-deep);
}

.stack {
  display: grid;
  gap: 0.85rem;
}

.kpi-list,
.queue-list,
.mini-list,
.activity-list {
  display: grid;
  gap: 0.8rem;
}

.mini-row,
.activity-item,
.queue-ticket {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 20px;
  background: rgba(250, 249, 246, 0.86);
  border: 1px solid rgba(63, 93, 42, 0.08);
}

.mini-row__title,
.activity-item__title,
.queue-ticket__title {
  font-weight: 700;
}

.mini-row small,
.activity-item small,
.queue-ticket small {
  display: block;
  margin-top: 0.2rem;
  color: rgba(31, 31, 31, 0.58);
}

.flow-list {
  display: grid;
  gap: 0.9rem;
}

.flow-step {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 1rem;
  align-items: start;
}

.flow-step__num {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(107, 142, 35, 0.18), rgba(155, 203, 60, 0.22));
  color: var(--matcha-deep);
  font-family: var(--font-display);
  font-size: 1.4rem;
}

.flow-step h4 {
  margin: 0.1rem 0 0.35rem;
  font-size: 1.02rem;
}

.flow-step p {
  margin: 0;
  color: rgba(31, 31, 31, 0.68);
  line-height: 1.72;
}

.table-shell {
  overflow: auto;
  border-radius: 24px;
  border: 1px solid rgba(63, 93, 42, 0.08);
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.table th,
.table td {
  padding: 0.95rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(63, 93, 42, 0.08);
  vertical-align: top;
}

.table th {
  background: rgba(245, 242, 233, 0.76);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(31, 31, 31, 0.54);
}

.table tr:hover td {
  background: rgba(255, 255, 255, 0.74);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.btn-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  border: 1px solid rgba(63, 93, 42, 0.12);
  background: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(31, 31, 31, 0.72);
}

.btn-inline:hover {
  background: rgba(107, 142, 35, 0.12);
  color: var(--matcha-deep);
}

.btn-inline--danger:hover {
  background: rgba(157, 61, 46, 0.12);
  color: var(--danger);
}

.search-row {
  display: grid;
  grid-template-columns: 1.25fr 0.95fr 0.8fr auto;
  gap: 0.8rem;
}

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

.table-meta {
  display: grid;
  gap: 0.25rem;
}

.table-meta strong {
  font-weight: 700;
}

.table-meta small {
  color: rgba(31, 31, 31, 0.55);
}

.avatar-dot,
.product-thumb,
.inventory-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(223, 230, 208, 0.9), rgba(245, 242, 233, 0.9));
  font-size: 1.5rem;
  overflow: hidden;
}

.product-thumb img,
.catalog-card__media img,
.preview-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.catalog-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 1rem;
  padding: 1rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(63, 93, 42, 0.08);
  box-shadow: var(--shadow-card);
}

.catalog-card__media {
  width: 92px;
  height: 92px;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(223, 230, 208, 0.95), rgba(245, 242, 233, 0.98));
  display: grid;
  place-items: center;
  font-size: 2.2rem;
}

.catalog-card__body {
  display: grid;
  gap: 0.55rem;
}

.catalog-card__title-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.catalog-card__title-row h4 {
  margin: 0;
  font-size: 1.08rem;
}

.muted {
  color: rgba(31, 31, 31, 0.58);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(107, 142, 35, 0.12);
  color: var(--matcha-deep);
  font-weight: 600;
  font-size: 0.82rem;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 1rem;
}

.meta-grid div {
  display: grid;
  gap: 0.2rem;
}

.meta-grid small {
  color: rgba(31, 31, 31, 0.56);
}

.meta-grid strong {
  font-size: 0.96rem;
}

.pos-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 1rem;
}

.pos-product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.pos-product {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(63, 93, 42, 0.08);
  box-shadow: var(--shadow-card);
}

.pos-product__header {
  display: flex;
  gap: 1rem;
}

.pos-product__body {
  display: grid;
  gap: 0.35rem;
}

.pos-product h4 {
  margin: 0;
  font-size: 1.08rem;
}

.price {
  font-family: var(--font-display);
  font-size: 1.8rem;
  line-height: 1;
}

.cart-items {
  display: grid;
  gap: 0.75rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 0.85rem;
  align-items: center;
  padding: 0.85rem;
  border-radius: 22px;
  background: rgba(250, 249, 246, 0.9);
  border: 1px solid rgba(63, 93, 42, 0.08);
}

.cart-item__qty {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: white;
  border: 1px solid rgba(63, 93, 42, 0.1);
}

.cart-item__qty button {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  background: rgba(107, 142, 35, 0.12);
}

.summary-box {
  display: grid;
  gap: 0.6rem;
  padding: 1rem;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(63, 93, 42, 0.96), rgba(86, 110, 55, 0.94));
  color: white;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.summary-row strong {
  font-size: 1.02rem;
}

.summary-row--total strong:last-child {
  font-family: var(--font-display);
  font-size: 2.1rem;
}

.split-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.queue-board {
  display: grid;
  gap: 0.75rem;
}

.queue-ticket {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(245, 242, 233, 0.94));
}

.queue-ticket__badge {
  display: inline-flex;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(107, 142, 35, 0.12);
  color: var(--matcha-deep);
  font-weight: 700;
  font-size: 0.86rem;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.permission-card {
  padding: 1rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(63, 93, 42, 0.08);
  box-shadow: var(--shadow-card);
}

.permission-card h4 {
  margin: 0;
  font-size: 1.1rem;
}

.permission-card ul {
  margin: 0.8rem 0 0;
  padding-left: 1rem;
  color: rgba(31, 31, 31, 0.7);
  line-height: 1.7;
}

.print-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.92fr;
  gap: 1rem;
}

.print-preview {
  border-radius: 24px;
  padding: 1rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(245, 242, 233, 0.9));
  border: 1px solid rgba(63, 93, 42, 0.08);
  min-height: 360px;
  display: grid;
  gap: 0.75rem;
}

.preview-paper {
  flex: 1;
  min-height: 260px;
  border-radius: 18px;
  border: 1px dashed rgba(63, 93, 42, 0.2);
  background: rgba(255, 255, 255, 0.92);
  padding: 1rem;
}

.preview-paper h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.7rem;
}

.preview-media {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(223, 230, 208, 0.9), rgba(245, 242, 233, 0.95));
  font-size: 1.8rem;
}

.receipt-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px dashed rgba(63, 93, 42, 0.14);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 190px;
  text-align: center;
  color: rgba(31, 31, 31, 0.56);
  border: 1px dashed rgba(63, 93, 42, 0.18);
  border-radius: 24px;
  padding: 1rem;
}

.empty-state strong {
  display: block;
  margin-bottom: 0.45rem;
  color: rgba(31, 31, 31, 0.76);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 31, 31, 0.5);
  backdrop-filter: blur(6px);
}

.modal__dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 920px);
  max-height: calc(100vh - 3rem);
  margin: 1.5rem auto;
  overflow: auto;
  border-radius: 32px;
  background: rgba(255, 252, 246, 0.98);
  box-shadow: var(--shadow-hard);
  border: 1px solid rgba(63, 93, 42, 0.08);
}

.modal__dialog--scanner {
  width: min(92vw, 760px);
}

.modal__body {
  padding: 1.5rem;
}

.modal__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  margin-bottom: 1rem;
}

.modal__header h3 {
  margin: 0.25rem 0 0;
  font-family: var(--font-display);
  font-size: 2rem;
}

.modal__footer {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.form-grid .field--full {
  grid-column: 1 / -1;
}

.help-text {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  color: rgba(31, 31, 31, 0.56);
  line-height: 1.6;
}

.preview-tile {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(63, 93, 42, 0.08);
}

.scanner-shell {
  padding: 1.3rem;
  display: grid;
  gap: 1rem;
}

.scanner-shell__header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.scanner-shell__header h3 {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-size: 2rem;
}

.scanner-shell__video {
  width: 100%;
  min-height: 320px;
  max-height: 68vh;
  border-radius: 28px;
  background: rgba(31, 31, 31, 0.88);
  object-fit: cover;
}

.scanner-shell__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.toast-stack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 120;
  display: grid;
  gap: 0.7rem;
}

.toast {
  min-width: 280px;
  max-width: 420px;
  padding: 0.95rem 1rem;
  border-radius: 20px;
  box-shadow: var(--shadow-hard);
  color: white;
  background: linear-gradient(135deg, rgba(63, 93, 42, 0.96), rgba(107, 142, 35, 0.94));
}

.toast--error {
  background: linear-gradient(135deg, #b95241, var(--danger));
}

.toast strong {
  display: block;
  margin-bottom: 0.15rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1280px) {
  .stat-grid,
  .permission-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .print-layout,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1120px) {
  .auth-shell,
  .grid-2,
  .catalog-grid,
  .pos-layout {
    grid-template-columns: 1fr;
  }

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

  .shell__main {
    margin-left: 0;
  }

  .sidebar {
    transform: translateX(-105%);
    transition: transform var(--transition);
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .shell__content {
    width: min(100vw, var(--content-width));
    padding: 1rem;
  }
}

@media (max-width: 820px) {
  .auth-shell {
    padding: 1rem;
  }

  .topbar {
    padding: 1rem;
    flex-direction: column;
    align-items: stretch;
  }

  .topbar__left,
  .topbar__right {
    justify-content: space-between;
  }

  .stat-grid,
  .permission-grid,
  .split-fields,
  .form-grid,
  .search-row,
  .search-row--compact,
  .pos-product-grid {
    grid-template-columns: 1fr;
  }

  .catalog-card,
  .flow-step {
    grid-template-columns: 1fr;
  }

  .brand-lockup {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand-lockup__mark {
    width: 8rem;
  }
}

@media (max-width: 620px) {
  .auth-card--brand,
  .auth-card--form,
  .card,
  .hero-band,
  .modal__body,
  .scanner-shell {
    padding: 1rem;
  }

  .topbar__right {
    flex-wrap: wrap;
  }

  .table {
    min-width: 680px;
  }

  .scanner-shell__footer,
  .hero-band__actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Clean visual refresh inspired by tailwind-pos:
   lighter surfaces, lower contrast shadows, and Thai-first typography. */
:root {
  --matcha-primary: #6f8a51;
  --matcha-deep: #4f6546;
  --wabi-clay: #ba9179;
  --tea-cream: #f6f4ee;
  --ink-black: #202420;
  --spring-leaf: #a3bf6b;
  --stone: #7f857a;
  --mist: #f7f8f4;
  --paper: #ffffff;
  --charcoal: #273126;
  --sage-fog: #e8ede1;
  --shadow-soft: 0 10px 28px rgba(36, 50, 31, 0.04);
  --shadow-card: 0 6px 20px rgba(36, 50, 31, 0.05);
  --shadow-hard: 0 14px 40px rgba(36, 50, 31, 0.08);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --font-display: "IBM Plex Sans Thai", "Noto Sans Thai", sans-serif;
  --font-body: "Noto Sans Thai", sans-serif;
  --content-width: 1520px;
}

html {
  scrollbar-color: #bcc7b6 #edf0e8;
  scrollbar-width: thin;
}

body {
  background:
    linear-gradient(180deg, #f9faf7 0%, #f3f5ef 100%);
  color: #1f2820;
}

.app-noise,
.app-glow {
  display: none;
}

.auth-card,
.hero-band,
.stat-card,
.card,
.catalog-card,
.pos-product,
.print-preview,
.preview-paper,
.modal__body,
.scanner-shell,
.table-shell,
.cart-item,
.summary-box,
.queue-ticket,
.mini-row,
.activity-item {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(79, 101, 70, 0.09);
  box-shadow: var(--shadow-card);
}

.auth-card,
.hero-band,
.card,
.catalog-card,
.pos-product,
.print-preview,
.preview-paper,
.modal__body,
.scanner-shell {
  border-radius: 20px;
}

.auth-card--brand,
.auth-card--form,
.hero-band,
.card--soft {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 247, 242, 0.98));
}

.auth-card--brand::before,
.hero-band::after,
.sidebar::before {
  display: none;
}

.sidebar {
  background: rgba(255, 255, 255, 0.97);
  color: var(--ink-black);
  border-right: 1px solid rgba(79, 101, 70, 0.08);
  box-shadow: 8px 0 24px rgba(30, 42, 27, 0.04);
}

.sidebar__caption,
.sidebar__footer-label,
.nav-item__text small,
.sidebar__footer-copy {
  color: rgba(32, 36, 32, 0.48);
}

.sidebar__badge,
.sidebar__footer {
  background: #f6f8f2;
  border-color: rgba(79, 101, 70, 0.08);
  color: rgba(32, 36, 32, 0.76);
}

.nav-item {
  color: rgba(32, 36, 32, 0.72);
  border: 1px solid transparent;
}

.nav-item__icon {
  background: #f1f4ed;
}

.nav-item:hover {
  transform: none;
  background: #f5f8f1;
  color: var(--matcha-deep);
}

.nav-item.is-active {
  background: #edf3e5;
  color: var(--matcha-deep);
  border-color: rgba(111, 138, 81, 0.16);
}

.topbar {
  background: rgba(249, 250, 247, 0.9);
  border-bottom-color: rgba(79, 101, 70, 0.08);
  box-shadow: 0 6px 16px rgba(30, 42, 27, 0.03);
}

.topbar__title,
.auth-title,
.hero-band h3,
.card__head h3,
.section-head h3,
.stat-card__value,
.price,
.preview-paper h4,
.brand-lockup__title,
.brand-lockup__jp {
  letter-spacing: -0.02em;
  font-weight: 600;
}

.topbar__user,
.flow-chip,
.seed-accounts,
.chip,
.status-pill,
.table tr:hover td {
  box-shadow: none;
}

.flow-chip,
.seed-accounts,
.chip,
.topbar__user,
.btn-inline,
.cart-item__qty,
.table th {
  background: #f7f8f4;
  border-color: rgba(79, 101, 70, 0.08);
}

.field input,
.field select,
.field textarea {
  border-radius: 14px;
  background: #ffffff;
  border-color: rgba(79, 101, 70, 0.12);
  box-shadow: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(111, 138, 81, 0.45);
  box-shadow: 0 0 0 3px rgba(163, 191, 107, 0.12);
}

.btn {
  border-radius: 14px;
  padding: 0.82rem 1.15rem;
  box-shadow: none;
}

.btn:hover {
  transform: none;
}

.btn--primary {
  background: var(--matcha-deep);
  color: #fff;
  box-shadow: 0 8px 18px rgba(79, 101, 70, 0.12);
}

.btn--secondary,
.btn--ghost {
  background: #ffffff;
  color: var(--ink-black);
  border: 1px solid rgba(79, 101, 70, 0.1);
}

.btn--danger {
  background: #9d3d2e;
}

.icon-btn,
.btn-inline,
.chip,
.status-pill,
.queue-ticket,
.catalog-card__media,
.product-thumb,
.inventory-icon,
.preview-media,
.avatar-dot {
  border-radius: 14px;
}

.status-pill,
.tag,
.chip.is-active,
.chip:hover,
.btn-inline:hover {
  background: #edf3e5;
  color: var(--matcha-deep);
}

.table-shell {
  background: #ffffff;
}

.table th,
.table td {
  border-bottom-color: rgba(79, 101, 70, 0.07);
}

.table th {
  color: rgba(32, 36, 32, 0.54);
}

.table tr:hover td {
  background: #fafbf8;
}

.catalog-card__media,
.product-thumb,
.inventory-icon,
.preview-media,
.avatar-dot {
  background: linear-gradient(180deg, #f1f5eb, #fbfcf9);
}

.preview-paper,
.print-preview {
  background: #ffffff;
}

.queue-ticket__badge,
.tag {
  background: #f2f6eb;
}
