@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("fonts/nunito-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("fonts/nunito-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --gold: #dda724;
  --gold-deep: #c78f12;
  --gold-light: #f2c34c;
  --gold-gradient: linear-gradient(135deg, #ebb73e 0%, #d89e1a 100%);
  --charcoal: #4a4a4a;
  --ink: #3a3a3a;
  --slate: #505050;
  --mist: #f1f1f1;
  --cream: #fdf1d2;
  --pill: #ffd36e;
  --muted: #7b7b7b;
  --line: #e4e4e4;
  --danger: #b3261e;
  --danger-soft: #fbe3e1;
  --radius-card: 22px;
  --radius-input: 12px;
  --font: "Nunito", "Segoe UI Variable Display", "Segoe UI", ui-rounded, system-ui, "Leelawadee UI", "Noto Sans Thai", sans-serif;
}

* { box-sizing: border-box; }

html { background: #fff; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--charcoal);
  background: #fff;
}

a { color: var(--gold-deep); }

.stripe { height: 8px; background: var(--gold-gradient); }

.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.site-header .bar {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 28px;
}
.brand { order: 1; }
.brand img { display: block; height: 48px; width: auto; }

.main-nav { order: 3; flex: 1 0 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.main-nav a {
  color: var(--charcoal);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 7px 14px;
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}
.main-nav a:hover { background: var(--mist); }
.main-nav a.active { background: var(--cream); color: var(--gold-deep); }
.nav-label {
  margin-left: 10px;
  padding-left: 14px;
  border-left: 2px solid var(--line);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.bar-right { order: 2; margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.user-chip { display: flex; align-items: center; gap: 12px; }
.mode-switch { margin: 0; }
button.mode { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; font-size: 0.88rem; }
button.mode.developer { background: var(--slate); color: var(--gold-light); box-shadow: 0 3px 0 #2f2f2f; }
button.mode:disabled { opacity: 1; cursor: default; filter: none; }
button.mode.employee { background: var(--gold-gradient); color: #fff; }
.view-banner { background: var(--cream); color: var(--gold-deep); text-align: center; font-weight: 800; font-size: 0.9rem; padding: 8px 16px; border-bottom: 2px solid var(--gold); }
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}
img.avatar { object-fit: cover; background: var(--mist); }
.avatar.small { width: 34px; height: 34px; font-size: 0.95rem; flex: none; }
.person { display: inline-flex; align-items: center; gap: 10px; }
.who { display: flex; flex-direction: column; line-height: 1.15; }
.who strong { font-size: 0.95rem; color: var(--ink); }
.who small { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); font-weight: 700; }


main {
  flex: 1;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 36px 24px 56px;
}

.site-footer {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px 22px;
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--muted);
}

.hero { margin-bottom: 30px; }
.hero h1 {
  margin: 14px 0 0;
  font-size: clamp(2.3rem, 6vw, 3.9rem);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.025em;
  color: var(--charcoal);
}
.hero h1 em { font-style: normal; color: var(--gold); }
.hero-bar { width: 108px; height: 6px; border-radius: 6px; background: var(--gold); margin: 20px 0 16px; }
.hero-sub { margin: 0; font-size: 1.12rem; color: var(--muted); font-weight: 600; max-width: 46rem; }

.tag {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--pill);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.tag.dark { background: var(--slate); color: #fff; }

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 34px 0 16px;
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--ink);
}
.section-title::before { content: ""; width: 6px; height: 1.5em; border-radius: 4px; background: var(--gold); }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card { background: var(--mist); border-radius: var(--radius-card); padding: 24px 26px; margin-bottom: 18px; }
.card.white { background: #fff; border: 1px solid var(--line); }
.card.gold { background: var(--gold-gradient); color: #fff; }
.card.dark { background: var(--slate); color: #fff; }
.card.cream { background: var(--cream); }
.card.accent { border-top: 6px solid var(--gold); border-radius: 8px 8px var(--radius-card) var(--radius-card); }
.card h2 { margin: 0 0 10px; font-size: 1.3rem; font-weight: 900; color: var(--ink); }
.card.gold h2, .card.dark h2 { color: #fff; }

.label {
  display: block;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.card.gold .label, .card.dark .label { color: rgba(255, 255, 255, 0.82); }
.card.dark .label { color: var(--gold-light); }
.big { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 900; line-height: 1.1; letter-spacing: -0.02em; }

.lead { font-size: 1.45rem; font-weight: 800; line-height: 1.35; margin: 4px 0 22px; }

.tile {
  display: block;
  position: relative;
  text-decoration: none;
  color: var(--charcoal);
  background: var(--mist);
  border-top: 6px solid var(--gold);
  border-radius: 8px 8px var(--radius-card) var(--radius-card);
  padding: 20px 24px 22px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.tile:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(0, 0, 0, 0.1); }
.tile strong { display: block; font-size: 1.3rem; font-weight: 900; color: var(--ink); }
.tile span.text { display: block; margin-top: 4px; color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.tile .go { position: absolute; right: 18px; top: 18px; width: 34px; height: 34px; border-radius: 50%; background: var(--slate); color: var(--gold-light); display: grid; place-items: center; font-weight: 900; }

.bracketed { position: relative; }
.bracketed::before, .bracketed::after { content: ""; position: absolute; width: 34px; height: 34px; border: 4px solid var(--gold); }
.bracketed::before { top: -14px; left: -14px; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
.bracketed::after { bottom: -14px; right: -14px; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }

.split { display: grid; gap: 40px; align-items: center; grid-template-columns: 1.1fr 0.9fr; margin-top: 18px; }
.sign-in-card { background: var(--mist); border-radius: var(--radius-card); padding: 34px 32px; }
.sign-in-card p { margin: 0 0 22px; color: var(--muted); font-weight: 600; }

.centered { max-width: 640px; margin: 40px auto 0; }
.centered .card { padding: 34px 36px; }
.centered .hero h1 { font-size: clamp(2rem, 5vw, 3rem); }

.button, button {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  padding: 10px 24px;
  background: var(--gold-gradient);
  color: #fff;
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--gold-deep);
  transition: transform 0.1s, box-shadow 0.1s, filter 0.15s;
}
.button:hover, button:hover { filter: brightness(1.05); }
.button:active, button:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--gold-deep); }
button:disabled { opacity: 0.45; cursor: not-allowed; }
.button.big-button { padding: 14px 32px; font-size: 1.1rem; }
.button.dark, button.dark { background: var(--slate); box-shadow: 0 3px 0 #2f2f2f; }
.button.ghost, button.ghost { background: #fff; color: var(--charcoal); box-shadow: inset 0 0 0 2px var(--line); }
button.danger { background: #fff; color: var(--danger); box-shadow: inset 0 0 0 2px var(--danger-soft); }
button.danger:hover { background: var(--danger-soft); }
.signout button { padding: 7px 18px; font-size: 0.9rem; }

input[type=text], input[type=email], input[type=number], select {
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  padding: 9px 14px;
  border: 2px solid transparent;
  border-radius: var(--radius-input);
  background: #fff;
  min-width: 0;
}
.card.white input, .card.white select { background: var(--mist); }
input:focus, select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(221, 167, 36, 0.2); }
.table form.inline { flex-wrap: nowrap; }
select { min-width: 7.5rem; }
form.inline { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
form.stack { display: grid; gap: 12px; }
label { font-weight: 700; }

.flash { border-radius: 16px; padding: 14px 20px; margin: 0 0 24px; font-weight: 700; background: var(--slate); color: #fff; }
.flash::before { content: "\2713\00a0\00a0"; color: var(--gold-light); font-weight: 900; }
.flash.error { background: var(--danger-soft); color: var(--danger); }
.flash.error::before { content: "!\00a0\00a0"; color: var(--danger); }
.error-text { color: var(--danger); font-weight: 800; }

.table { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.table th {
  text-align: left;
  padding: 0 14px 2px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.table td { padding: 12px 14px; background: var(--mist); vertical-align: middle; font-weight: 600; }
.table tr:nth-child(even) td { background: var(--cream); }
.table td:first-child { border-radius: 14px 0 0 14px; }
.table td:last-child { border-radius: 0 14px 14px 0; }
.table td .sub { display: block; font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.scroll-x { overflow-x: auto; }

.badge { display: inline-block; padding: 2px 12px; border-radius: 999px; background: #fff; color: var(--gold-deep); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.04em; }
.table .badge { background: var(--cream); }
.table tr:nth-child(even) .badge { background: #fff; }
.badge.bad { background: var(--danger-soft); color: var(--danger); }
.badge.dark { background: var(--slate); color: #fff; }
.muted { color: var(--muted); font-weight: 600; }

.settings-row { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 2px solid #fff; }
.settings-row:last-of-type { border-bottom: 0; }

ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { padding: 10px 0; border-bottom: 2px solid #fff; font-weight: 600; }
ul.plain li:last-child { border-bottom: 0; }

@media (max-width: 800px) {
  .split { grid-template-columns: 1fr; gap: 28px; }
  .site-header .bar { padding: 12px 16px; }
  main { padding: 26px 16px 44px; }
  .user-chip { gap: 8px; }
  .who small { display: none; }
  .nav-label { display: none; }
  .table { font-size: 0.92rem; }
}
