:root {
  color-scheme: light;
  --ink: #192232;
  --muted: #657284;
  --line: #dbe3ef;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --blue: #062b73;
  --deep-blue: #041c4c;
  --red: #e01822;
  --gold: #e0ae4f;
  --green: #047a65;
  --teal: #0b7285;
  --soft-blue: #edf3ff;
  --soft-gold: #fff5dd;
  --soft-green: #e8f6f0;
  --danger-soft: #fff0f1;
  --shadow: 0 18px 42px rgba(4, 28, 76, 0.12);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Khmer", "Noto Sans Lao", "Noto Sans Thai", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(4, 28, 76, 0.14), rgba(244, 247, 251, 0.96) 360px),
    repeating-linear-gradient(45deg, rgba(224, 174, 79, 0.09) 0 1px, transparent 1px 22px),
    var(--bg);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.app {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(4, 28, 76, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.topbar::after {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--blue) 0 34%, #fff 34% 39%, var(--red) 39% 66%, #fff 66% 71%, var(--blue) 71% 100%);
}

.topbar-inner {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: 168px;
  max-width: 45vw;
  height: auto;
  background: #fff;
  border-radius: 8px;
  padding: 4px 6px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

.brand-copy {
  display: none;
  min-width: 0;
  color: #fff;
}

.brand-copy strong {
  display: block;
  font-size: 14px;
  line-height: 1.1;
}

.brand-copy small {
  display: block;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy .brand-verse {
  max-width: 300px;
  color: #ffdf8e;
  font-size: 11px;
  font-weight: 760;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 100%;
  gap: 7px;
  min-width: 0;
}

.language-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 4px;
}

.language-switcher::-webkit-scrollbar {
  display: none;
}

.language-switcher button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.86);
  min-width: 39px;
  min-height: 32px;
  padding: 5px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.language-switcher button.active {
  background: #fff;
  color: var(--blue);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.flag {
  font-size: 16px;
  line-height: 1;
}

.credit-pill,
.account-chip {
  border-radius: 999px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.credit-pill {
  background: rgba(255, 248, 232, 0.98);
  color: #734b0c;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  flex: 0 0 auto;
}

.credit-pill strong {
  color: var(--ink);
  font-size: 16px;
}

.account-chip {
  background: rgba(255, 255, 255, 0.94);
  color: var(--blue);
  padding: 7px 10px;
  max-width: 172px;
  min-width: 0;
}

.account-chip strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wrap {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 14px;
}

.hero {
  min-height: 326px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.24);
  box-shadow: 0 26px 66px rgba(4, 28, 76, 0.24);
  background:
    linear-gradient(95deg, rgba(4, 28, 76, 1) 0%, rgba(4, 28, 76, 0.94) 42%, rgba(6, 43, 115, 0.2) 72%),
    url("assets/good-job-cambodia-workers-crop.png") right bottom / auto 100% no-repeat,
    linear-gradient(120deg, #061f55, #0a3b86);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -8% -44px 20%;
  height: 108px;
  background: linear-gradient(90deg, rgba(224, 24, 34, 0.95), rgba(224, 24, 34, 0.86) 44%, rgba(6, 43, 115, 0.95) 78%);
  border-radius: 72% 0 0 0;
  transform: rotate(-5deg);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  width: min(590px, 91%);
  padding: 26px 18px 86px;
  color: #fff;
}

.eyebrow {
  margin: 0;
  color: #ffdf8e;
  font-weight: 900;
  font-size: 13px;
}

.hero h1 {
  margin: 0;
  max-width: 9em;
  font-size: 36px;
  line-height: 1.06;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.26);
}

.hero-copy {
  margin: 0;
  max-width: 33em;
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
  line-height: 1.55;
}

.hero-actions,
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  max-width: 470px;
  margin-top: 4px;
}

.hero-metrics div {
  min-height: 66px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  backdrop-filter: blur(8px);
}

.hero-metrics strong,
.hero-metrics span {
  display: block;
}

.hero-metrics strong {
  font-size: 21px;
  line-height: 1;
}

.hero-metrics span {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  line-height: 1.25;
}

.verse-card {
  display: grid;
  gap: 4px;
  max-width: 500px;
  margin-top: 2px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.verse-card span {
  color: #ffdf8e;
  font-size: 12px;
  font-weight: 900;
}

.verse-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  line-height: 1.38;
}

.btn {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 850;
  line-height: 1.1;
  white-space: normal;
}

.btn.compact {
  min-height: 36px;
  padding: 8px 11px;
  font-size: 12px;
}

.btn.primary {
  background: var(--red);
  color: #fff;
  box-shadow: 0 10px 20px rgba(224, 24, 34, 0.16);
}

.btn.primary:hover {
  background: #bf111a;
}

.btn.blue {
  background: var(--blue);
  color: #fff;
}

.btn.warn {
  background: var(--gold);
  color: #2d210d;
}

.btn.ghost {
  background: #fff;
  color: var(--blue);
  border-color: #cfd9e8;
}

.btn.light {
  background: rgba(255, 255, 255, 0.96);
  color: var(--blue);
  border-color: rgba(255, 255, 255, 0.58);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.btn.outline-light {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.64);
  backdrop-filter: blur(8px);
}

.btn.danger {
  background: var(--red);
  color: #fff;
}

.btn:disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.role-tabs {
  position: sticky;
  top: 106px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin: 12px 0 0;
  padding: 5px;
  background:
    linear-gradient(90deg, rgba(224, 24, 34, 0.2), rgba(224, 174, 79, 0.17), rgba(6, 43, 115, 0.22)),
    rgba(4, 28, 76, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(4, 28, 76, 0.14);
}

.role-tabs button {
  border: 0;
  border-radius: 6px;
  min-height: 44px;
  padding: 9px 5px;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.15;
}

.role-tabs button.active {
  background: #fff;
  color: var(--red);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.16);
}

.view {
  display: none;
  padding-top: 14px;
}

.view.active {
  display: block;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin: 6px 0 14px;
}

.section-head.tight {
  margin-top: 14px;
}

.section-head h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.18;
}

.section-head p,
.tool-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.feature-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 10px;
  scrollbar-width: none;
}

.feature-strip::-webkit-scrollbar {
  display: none;
}

.feature-strip span {
  flex: 0 0 auto;
  border: 1px solid #d8e1ef;
  border-radius: 999px;
  background: #fff;
  color: var(--blue);
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 850;
}

.workspace-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.form-zone {
  margin-top: 16px;
}

.surface {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(4, 28, 76, 0.08);
  position: relative;
  overflow: hidden;
}

.surface::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--gold), var(--blue), var(--green));
}

.surface > * {
  position: relative;
}

.tool {
  padding: 14px;
}

.tool h3 {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.2;
}

.tool-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.search-bar,
.form-grid {
  display: grid;
  gap: 11px;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.field input,
.field select,
.field textarea,
.filter-row > input,
.filter-row > select,
.search-bar > input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #d7dfeb;
  border-radius: 8px;
  background: #fbfcff;
  color: var(--ink);
  padding: 12px;
}

.field textarea {
  min-height: 94px;
  resize: vertical;
  line-height: 1.45;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.filter-row > input:focus,
.filter-row > select:focus,
.search-bar > input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(6, 43, 115, 0.12);
  outline: 0;
}

.toggle-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.toggle-row label,
.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #d8e1ef;
  border-radius: 999px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.photo-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.photo-preview,
.profile-card img,
.avatar {
  width: 74px;
  height: 74px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #eef3f5;
  object-fit: cover;
  flex: 0 0 auto;
}

.avatar {
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  font-size: 22px;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.profile-card,
.job-card,
.service-card {
  background: var(--panel);
  border: 1px solid #d8e1ef;
  border-radius: 8px;
  padding: 12px;
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  min-width: 0;
}

.preview-card {
  box-shadow: none;
}

.job-card,
.service-card {
  grid-template-columns: 1fr;
}

.card-main {
  min-width: 0;
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.profile-card h3,
.job-card h3,
.service-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.22;
}

.company,
.card-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.phrase {
  margin: 8px 0 9px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 720;
  line-height: 1.38;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.chip,
.badge {
  border-radius: 999px;
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1;
  font-weight: 820;
  white-space: nowrap;
}

.chip {
  background: #eef3ff;
  border: 1px solid #dbe6fb;
  color: var(--blue);
}

.badge {
  background: var(--soft-gold);
  border: 1px solid #edd39c;
  color: #7a4d08;
  flex: 0 0 auto;
}

.badge.green {
  background: var(--soft-green);
  border-color: #b8dfd2;
  color: #05604f;
}

.badge.red {
  background: var(--danger-soft);
  border-color: #f3c2c7;
  color: #a70f18;
}

.trust-line {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  margin: 8px 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.trust-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf6;
}

.trust-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--green), var(--gold));
}

.wallet-lines,
.account-lines,
.model-list {
  display: grid;
  gap: 8px;
}

.wallet-lines div,
.account-lines div,
.model-list div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.wallet-lines span,
.account-lines span,
.model-list span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.model-list div {
  display: grid;
  gap: 3px;
}

.model-list strong {
  font-size: 14px;
}

.account-panel {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.notice {
  border: 1px solid #d8e1ef;
  border-radius: 8px;
  padding: 12px;
  background: var(--soft-blue);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.notice.success {
  background: var(--soft-green);
  border-color: #b8dfd2;
}

.notice.warn {
  background: var(--soft-gold);
  border-color: #efd29b;
}

.topup-layout {
  display: grid;
  gap: 12px;
}

.qr-box {
  display: grid;
  gap: 10px;
  justify-items: center;
  border: 1px solid #d8e1ef;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.qr-grid {
  width: 168px;
  height: 168px;
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  grid-template-rows: repeat(9, 1fr);
  gap: 3px;
  background: #fff;
  border: 10px solid #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}

.qr-cell {
  border-radius: 2px;
  background: #fff;
}

.qr-cell.on {
  background: #15202b;
}

.table-list {
  display: grid;
  gap: 8px;
}

.request-row {
  display: grid;
  gap: 8px;
  border: 1px solid #d8e1ef;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.request-row h4,
.request-row p {
  margin: 0;
}

.request-row p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.empty {
  padding: 22px 14px;
  text-align: center;
  border: 1px dashed #bdc9d3;
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: end;
  justify-content: center;
  padding: 14px;
  background: rgba(17, 24, 39, 0.52);
}

.modal-backdrop.active {
  display: flex;
}

.modal {
  width: min(720px, 100%);
  max-height: min(88vh, 780px);
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.modal-head h3 {
  margin: 0;
  font-size: 18px;
}

.modal-body {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.detail-item {
  padding: 11px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail-item span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.detail-item strong,
.detail-item p {
  margin: 0;
  line-height: 1.45;
}

.provider-grid {
  display: grid;
  gap: 8px;
}

.provider-btn {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px;
  font-weight: 850;
}

.provider-btn span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.provider-mark {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-style: normal;
}

.provider-mark.google {
  background: #4285f4;
}

.provider-mark.telegram {
  background: #229ed9;
}

.provider-mark.facebook {
  background: #1877f2;
}

.toast {
  position: fixed;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 80;
  display: none;
  border-radius: 8px;
  background: #17202a;
  color: #fff;
  padding: 13px 14px;
  box-shadow: var(--shadow);
  font-weight: 760;
}

.toast.active {
  display: block;
}

.admin-actions {
  margin-top: 12px;
}

@media (min-width: 560px) {
  .filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

@media (min-width: 760px) {
  .wrap {
    padding: 20px;
  }

  .topbar-inner {
    padding: 12px 20px;
  }

  .topbar-actions {
    flex: 1 1 auto;
  }

  .brand-copy {
    display: block;
  }

  .brand-logo {
    width: 190px;
  }

  .hero {
    min-height: 366px;
  }

  .hero-content {
    width: min(590px, 54%);
    padding: 40px 32px 98px;
  }

  .hero h1 {
    font-size: 52px;
  }

  .role-tabs {
    top: 76px;
    width: 680px;
  }

  .workspace-grid {
    grid-template-columns: minmax(0, 1.28fr) minmax(300px, 0.72fr);
  }

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

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

@media (min-width: 1040px) {
  .result-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .topbar-inner {
    padding-inline: 10px;
  }

  .wrap {
    padding-inline: 10px;
  }

  .hero {
    background:
      linear-gradient(95deg, rgba(4, 28, 76, 1) 0%, rgba(4, 28, 76, 0.94) 56%, rgba(6, 43, 115, 0.34) 100%),
      url("assets/good-job-cambodia-workers-crop.png") right bottom / auto 86% no-repeat,
      linear-gradient(120deg, #061f55, #0a3b86);
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero-content {
    width: 100%;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
    max-width: 210px;
  }

  .verse-card {
    max-width: 250px;
  }

  .role-tabs {
    top: 130px;
    overflow-x: auto;
    grid-template-columns: repeat(4, minmax(92px, 1fr));
  }

  .photo-row {
    align-items: flex-start;
  }

  .profile-card {
    grid-template-columns: 64px 1fr;
  }

  .profile-card img,
  .avatar {
    width: 64px;
    height: 64px;
  }
}
