:root {
  color-scheme: light;
  --bg: #f5f8fc;
  --surface: #ffffff;
  --surface-soft: #f8fbff;
  --text: #071429;
  --muted: #647086;
  --line: #dfe7f2;
  --navy: #051123;
  --navy-2: #0b172a;
  --navy-3: #132034;
  --gold: #ffc319;
  --gold-dark: #efae00;
  --danger: #ef3348;
  --blue: #1464f6;
  --green: #20b65a;
  --orange: #fb8c00;
  --purple: #8d31e7;
  --shadow: 0 22px 60px rgba(10, 24, 46, 0.12);
  --shadow-soft: 0 10px 30px rgba(10, 24, 46, 0.08);
  font-family: "Noto Sans Thai", "Segoe UI", Tahoma, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 195, 25, 0.08), transparent 28rem),
    linear-gradient(180deg, #eef4fb 0, var(--bg) 32rem);
  color: var(--text);
}

body.dark-mode {
  color-scheme: dark;
  --bg: #0b1321;
  --surface: #111b2b;
  --surface-soft: #152238;
  --text: #f7fbff;
  --muted: #a8b5c7;
  --line: rgba(255, 255, 255, 0.1);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  --shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.24);
}

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

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.page-shell {
  width: min(100% - 40px, 1320px);
  margin-inline: auto;
}

.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;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(3, 12, 26, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(100% - 48px, 1440px);
  min-height: 72px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  min-width: 236px;
}

.brand-mark {
  width: 45px;
  height: 45px;
  color: #ffd168;
}

.brand-mark svg path:first-child {
  fill: rgba(255, 255, 255, 0.06);
  stroke-width: 3;
}

.brand-mark svg path:last-child {
  stroke-width: 4;
}

.brand strong {
  display: block;
  font-size: 29px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
}

.brand small {
  display: block;
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  line-height: 1.35;
  margin-top: 2px;
}

.primary-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 38px);
}

.primary-nav a {
  position: relative;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  padding: 26px 0 24px;
  white-space: nowrap;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: transparent;
}

.primary-nav a:hover,
.primary-nav a.active {
  color: var(--gold);
}

.primary-nav a.active::after {
  background: var(--gold);
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.guest-actions {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.guest-actions[hidden],
.user-menu[hidden],
.user-dropdown[hidden] {
  display: none;
}

.user-menu {
  position: relative;
}

.user-trigger {
  min-height: 44px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  padding: 4px 10px 4px 5px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  text-align: left;
}

.user-trigger:hover,
.user-trigger[aria-expanded="true"] {
  border-color: rgba(255, 195, 25, 0.7);
  background: rgba(255, 255, 255, 0.1);
}

.user-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: #ffc319;
  color: #071429;
  font-size: 14px;
  font-weight: 900;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-trigger-copy {
  min-width: 0;
}

.user-trigger-copy strong,
.user-trigger-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-trigger-copy strong {
  max-width: 116px;
  font-size: 13px;
}

.user-trigger-copy small {
  color: #aebdd0;
  font-size: 10px;
}

.user-chevron {
  color: #ffc319;
  font-size: 17px;
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 318px;
  padding: 14px;
  border: 1px solid #314861;
  border-radius: 8px;
  background: #0a1729;
  color: #ffffff;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.38);
}

.user-dropdown-head {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 7px 6px 18px;
}

.user-avatar-large {
  width: 56px;
  height: 56px;
  font-size: 18px;
}

.user-dropdown-head strong,
.user-dropdown-head small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown-head small {
  color: #aebdd0;
  font-size: 12px;
}

.user-dropdown > button {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #eef4ff;
  font-size: 16px;
  font-weight: 800;
  text-align: left;
}

.user-dropdown > button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.user-dropdown .danger-menu-item {
  color: #ff7b88;
}

.user-menu-separator {
  height: 1px;
  margin: 12px 2px;
  background: rgba(255, 255, 255, 0.12);
}

.menu-count {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #26364c;
  color: #c9d5e5;
  font-size: 11px;
  text-align: center;
}

.account-dialog {
  width: min(420px, calc(100% - 32px));
  padding: 28px;
  border: 1px solid #dce4ef;
  border-radius: 8px;
  background: #ffffff;
  color: #071429;
  box-shadow: 0 28px 80px rgba(3, 12, 26, 0.35);
}

.account-dialog::backdrop {
  background: rgba(3, 12, 26, 0.72);
}

body.dark-mode .account-dialog {
  border-color: #304159;
  background: #0b172a;
  color: #ffffff;
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 25px;
}

.dialog-profile {
  text-align: center;
}

.dialog-avatar {
  width: 76px;
  height: 76px;
  margin: 0 auto 12px;
  font-size: 24px;
}

.dialog-profile h2,
.dialog-profile p {
  margin: 0;
}

.dialog-profile p {
  color: #647086;
}

.account-details {
  margin: 22px 0 0;
}

.account-details div {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid #dfe7f2;
}

.account-details dt {
  color: #647086;
}

.account-details dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.data-loading { padding: 28px 12px !important; color: var(--muted); text-align: center; }
.case-number-link,.case-item a { color: var(--text); text-decoration: none; font-weight: 800; }
.case-number-link:hover,.case-item a:hover { color: #a97400; }
.search-results-section { scroll-margin-top: 86px; margin-top: 18px; }
.search-results-heading { display:flex; align-items:end; justify-content:space-between; gap:20px; padding:18px 20px; border:1px solid var(--line); border-bottom:0; border-radius:8px 8px 0 0; background:var(--surface); }
.search-results-heading p,.search-results-heading h2 { margin:0; }
.search-results-heading p { color:#a97400; font-size:13px; font-weight:700; }
.search-results-heading h2 { font-size:21px; }
.search-results-heading select { min-height:40px; padding:7px 34px 7px 11px; border:1px solid var(--line); border-radius:6px; background:var(--surface); color:var(--text); }
.search-results-list { display:grid; gap:3px; padding:3px; border:1px solid var(--line); border-radius:0 0 8px 8px; background:var(--line); }
.search-result-card { display:grid; grid-template-columns:1fr 1.35fr 1.2fr .85fr 1.2fr 1fr .9fr .9fr auto; align-items:center; gap:0; min-width:0; padding:14px; background:var(--surface); }
.search-result-card>div { min-width:0; min-height:52px; padding:0 12px; border-right:1px solid var(--line); }
.search-result-card small,.search-result-card strong { display:block; overflow-wrap:anywhere; }
.search-result-card small { margin-bottom:5px; color:var(--muted); font-size:10px; }
.search-result-card strong { color:var(--text); font-size:12px; }
.search-result-card .result-number { font-size:14px; }
.result-detail-button { margin-left:12px; padding:8px 10px; border:1px solid #d5a400; border-radius:6px; color:#9a6e00; text-decoration:none; font-size:12px; font-weight:800; white-space:nowrap; }
.search-empty { margin:0; padding:38px 20px; background:var(--surface); color:var(--muted); text-align:center; }
.row-action { display:grid; place-items:center; text-decoration:none; }
body.dark-mode .result-detail-button { color:#ffd44a; }

@media (max-width: 1100px) {
  .search-result-card { grid-template-columns:repeat(4,1fr) auto; gap:10px; }
  .search-result-card>div { padding:4px 8px; border-right:0; }
  .search-result-card>div:nth-child(n+6) { display:none; }
}
@media (max-width: 680px) {
  .search-results-heading { align-items:stretch; flex-direction:column; }
  .search-result-card { grid-template-columns:1fr 1fr; }
  .search-result-card>div:nth-child(n+5) { display:none; }
  .result-detail-button { grid-column:1/-1; margin:0; text-align:center; }
}

.button,
.icon-button {
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}

.button:active,
.icon-button:active {
  transform: translateY(1px);
}

.button {
  min-height: 38px;
  padding: 0 22px;
  border-radius: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.button-primary {
  background: linear-gradient(180deg, #ffd543 0%, #ffbe16 100%);
  color: #151000;
  box-shadow: 0 8px 20px rgba(255, 190, 22, 0.28);
}

.button-primary:hover {
  box-shadow: 0 12px 28px rgba(255, 190, 22, 0.38);
}

.button-ghost {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
}

.button-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.icon-button {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: transparent;
  color: #ffffff;
}

.icon-button:hover {
  background: rgba(255, 255, 255, 0.08);
}

.theme-toggle svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.5;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: 355px;
  padding: 52px 0 36px;
  overflow: hidden;
  background:
    linear-gradient(105deg, rgba(6, 19, 37, 0.98) 0%, rgba(11, 28, 52, 0.97) 55%, rgba(7, 19, 35, 0.98) 100%),
    var(--navy);
  color: #ffffff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 195, 25, 0.11), transparent 20rem),
    radial-gradient(circle at 77% 24%, rgba(54, 112, 255, 0.14), transparent 22rem);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  width: 275px;
  height: 190px;
  top: 64px;
  left: 53%;
  border: 16px solid rgba(126, 153, 191, 0.11);
  border-radius: 20px;
  transform: rotate(-24deg);
  filter: blur(1px);
  opacity: 0.75;
}

.hero-glow {
  position: absolute;
  width: 460px;
  height: 460px;
  right: 5%;
  top: -190px;
  background: radial-gradient(circle, rgba(34, 88, 180, 0.28), transparent 62%);
}

.hero-card-shadow {
  position: absolute;
  width: 480px;
  height: 210px;
  right: 4%;
  bottom: 20px;
  background: radial-gradient(ellipse, rgba(255, 255, 255, 0.08), transparent 72%);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: clamp(38px, 6vw, 96px);
  align-items: center;
}

.eyebrow {
  display: none;
}

.hero-copy h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(40px, 4.1vw, 62px);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: 0;
}

.hero-copy h1 span {
  color: var(--gold);
}

.hero-subtitle {
  width: min(620px, 100%);
  margin: 14px 0 18px;
  color: rgba(239, 245, 255, 0.8);
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.65;
  font-weight: 600;
}

.search-panel {
  width: min(780px, 100%);
  height: 60px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 116px;
  align-items: center;
  overflow: hidden;
  border-radius: 10px;
  background: #ffffff;
  color: #071429;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.search-panel svg {
  width: 22px;
  height: 22px;
  margin-left: 20px;
  color: #70809a;
}

.search-panel input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  color: #142033;
  font-size: 15px;
  font-weight: 500;
  background: transparent;
  padding: 0 16px 0 8px;
}

.search-panel input::placeholder {
  color: #8a96a8;
}

.search-panel button {
  height: 100%;
  border: 0;
  background: linear-gradient(180deg, #ffd747, #ffbf18);
  color: #151000;
  font-weight: 900;
  font-size: 17px;
}

.popular-searches {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
  color: rgba(235, 243, 255, 0.84);
  font-size: 14px;
}

.popular-searches button {
  min-height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.86);
  padding: 0 14px;
}

.popular-searches button:hover {
  border-color: rgba(255, 195, 25, 0.6);
  color: #ffffff;
}

.trust-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 0;
  color: rgba(235, 243, 255, 0.88);
  font-size: 15px;
  font-weight: 600;
}

.trust-line span {
  width: 22px;
  height: 22px;
  color: #22df6a;
}

.trust-line-secondary {
  margin-top: 8px;
}

.report-card {
  min-height: 304px;
  padding: 26px 28px 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 13px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    rgba(22, 34, 53, 0.86);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(20px);
}

.report-head {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 14px;
  align-items: start;
}

.alert-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #ff4d5e;
}

.alert-icon svg {
  width: 38px;
  height: 38px;
  stroke-width: 2.3;
}

.report-card h2 {
  margin: 0 0 4px;
  color: #ffffff;
  font-size: 22px;
  font-weight: 900;
}

.report-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.55;
  font-size: 14px;
  font-weight: 600;
}

.report-button,
.tutorial-button {
  width: 100%;
  min-height: 42px;
  margin-top: 14px;
  border-radius: 8px;
}

.report-button {
  background: linear-gradient(180deg, #ff4051, #e9273e);
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(239, 51, 72, 0.28);
}

.tutorial-button {
  border: 1px solid rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.02);
  color: #ffffff;
}

.feature-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.feature {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 2px 8px;
  align-items: start;
}

.feature-icon {
  grid-row: span 2;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #ffffff;
}

.feature-icon svg {
  width: 12px;
  height: 12px;
  stroke-width: 2.5;
}

.feature-icon.blue {
  background: #2e73ff;
}

.feature-icon.orange {
  background: #ff8c20;
}

.feature-icon.teal {
  background: #29c9c7;
}

.feature strong {
  font-size: 12px;
  color: #ffffff;
  line-height: 1.2;
}

.feature small {
  min-width: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  line-height: 1.45;
}

.stats-section {
  margin-top: 22px;
}

.stats-card {
  min-height: 100px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.stat-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 18px 28px;
  border-right: 1px solid var(--line);
}

.stat-item:last-child {
  border-right: 0;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.stat-icon svg {
  width: 26px;
  height: 26px;
  stroke-width: 2.2;
}

.stat-icon.purple {
  color: #8c27dc;
  background: #f2e6ff;
}

.stat-icon.amber {
  color: #ff8b00;
  background: #fff3d8;
}

.stat-icon.red {
  color: #ed3445;
  background: #ffe2e7;
}

.stat-icon.green {
  color: #23af58;
  background: #daf6e5;
}

.stat-icon.sky {
  color: #1465f6;
  background: #e5f0ff;
}

.stat-item small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.stat-item strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 25px;
  line-height: 1.1;
  font-weight: 900;
}

.stat-item span {
  display: block;
  margin-top: 3px;
  color: #1261e6;
  font-size: 12px;
  font-weight: 800;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.home-insights-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;align-items:start}.home-insights-grid .case-list{grid-template-columns:1fr}.home-insights-grid .case-item{padding:10px;border:1px solid var(--line);border-radius:7px}.metrics-panel{padding-bottom:14px}.metrics-panel .panel-heading small{display:block;color:var(--muted);font-size:10px;font-weight:700}.live-indicator{display:inline-flex;align-items:center;gap:6px;color:#168a4f;font-size:11px;font-weight:800}.live-indicator i{width:7px;height:7px;border-radius:50%;background:#1fb25d;box-shadow:0 0 0 4px rgba(31,178,93,.12)}.metrics-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1px;margin:3px 20px 14px;overflow:hidden;border:1px solid var(--line);border-radius:7px;background:var(--line)}.metric-item{min-height:88px;display:flex;align-items:center;gap:11px;padding:14px;background:var(--surface)}.metric-item small,.metric-item strong{display:block}.metric-item small{color:var(--muted);font-size:11px;font-weight:700}.metric-item strong{margin-top:2px;color:var(--text);font-size:23px;font-weight:800}.metric-icon{width:36px;height:36px;flex:0 0 36px;display:grid;place-items:center;border-radius:50%;font-size:18px;font-weight:800}.metric-icon.reports{background:#efe4ff;color:#8b3de8}.metric-icon.closed{background:#dff7e8;color:#168a4f}.metric-icon.visitors{background:#e4efff;color:#1261e6}.metric-icon.members{background:#fff1cf;color:#a66d00}.accused-appeal-button{width:calc(100% - 40px);min-height:62px;display:grid;grid-template-columns:34px minmax(0,1fr) 16px;align-items:center;gap:10px;margin:0 20px;padding:10px 13px;border:1px solid #d7a400;border-radius:7px;background:rgba(255,195,25,.1);color:var(--text);text-align:left}.accused-appeal-button>span:first-child{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:var(--gold);color:#271d00}.accused-appeal-button strong,.accused-appeal-button small{display:block}.accused-appeal-button strong{font-size:13px}.accused-appeal-button small{margin-top:1px;color:var(--muted);font-size:10px;line-height:1.35}.accused-appeal-button>b{font-size:22px}.accused-appeal-button:hover{background:rgba(255,195,25,.18)}body.dark-mode .metric-item{background:#0e1b2e}body.dark-mode .metric-item strong{color:#fff}body.dark-mode .accused-appeal-button{color:#fff}

.panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.panel-heading {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px 10px;
}

.panel-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
}

.panel-heading a {
  color: #1261e6;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.table-wrap {
  padding: 0 12px 14px;
  overflow-x: auto;
}

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

thead {
  background: linear-gradient(180deg, #f7faff, #eef3fa);
}

th {
  color: #526179;
  text-align: left;
  font-size: 12px;
  font-weight: 800;
  padding: 10px 12px;
}

th:first-child {
  border-radius: 7px 0 0 0;
}

th:last-child {
  border-radius: 0 7px 0 0;
}

td {
  padding: 12px;
  border-top: 1px solid #edf2f7;
  color: #304057;
  font-size: 13px;
  font-weight: 600;
  vertical-align: middle;
}

body.dark-mode td {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.profile-cell {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.profile-cell strong,
.profile-cell small {
  display: block;
  min-width: 0;
}

.profile-cell strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.profile-cell small {
  color: #57667b;
  font-size: 12px;
  line-height: 1.3;
}

body.dark-mode .profile-cell small {
  color: var(--muted);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  color: #ffffff;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7);
}

.badge-leaf {
  background: radial-gradient(circle at 50% 35%, #ffffff 0 34%, #1ec267 36% 54%, #e3243d 56%);
  color: #1ec267;
}

.badge-shop {
  font-size: 0;
  background:
    radial-gradient(circle at 50% 42%, #ffffff 0 17%, transparent 18%),
    radial-gradient(circle at 34% 50%, #ffffff 0 15%, transparent 16%),
    radial-gradient(circle at 66% 50%, #ffffff 0 15%, transparent 16%),
    #1fa6e8;
}

.badge-spade {
  background: #4012a8;
  color: #ffd124;
  font-size: 22px;
}

.badge-pay {
  border-radius: 4px;
  color: #1961e7;
  background: #ffffff;
  border: 1px solid #b3c8f7;
  box-shadow: none;
  font-size: 9px;
}

.badge-company {
  border-radius: 4px;
  background: #ffffff;
  color: #0d62d6;
  border: 1px solid #d6deeb;
  box-shadow: none;
  font-size: 18px;
}

.badge-company::first-letter {
  color: #ff8d00;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.status.pending {
  color: #bd7410;
  background: #fff1cf;
}

.status.danger {
  color: #e3273d;
  background: #ffe1e6;
}

.status.watching {
  color: #da6410;
  background: #ffead9;
}

.status.closed {
  color: #139a48;
  background: #dff6e7;
}

.row-action {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  color: #263b56;
  background: transparent;
  font-size: 28px;
  line-height: 1;
}

.row-action:hover {
  background: #edf4ff;
}

.cases-panel {
  padding-bottom: 12px;
}

.case-list {
  display: grid;
  gap: 13px;
  padding: 4px 20px 12px;
}

.case-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.case-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffffff;
}

.case-icon svg {
  width: 19px;
  height: 19px;
  stroke-width: 2.2;
}

.case-icon.red {
  background: #e73145;
}

.case-icon.orange {
  background: #ff931a;
}

.case-icon.green {
  background: #25b457;
}

.case-icon.yellow {
  background: #ffb60f;
}

.case-item strong {
  display: block;
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.case-item p {
  margin: 2px 0 0;
  color: #394a62;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.case-item span {
  display: block;
  color: #5d6c80;
  font-size: 12px;
  line-height: 1.35;
}

body.dark-mode .case-item p,
body.dark-mode .case-item span {
  color: var(--muted);
}

.case-item time {
  color: #5d6c80;
  font-size: 12px;
  white-space: nowrap;
  margin-top: 2px;
}

.history-button {
  width: calc(100% - 40px);
  min-height: 42px;
  margin: 2px 20px 0;
  border-radius: 7px;
  border: 1px solid #1261e6;
  background: transparent;
  color: #1261e6;
  font-weight: 900;
}

.history-button:hover {
  background: #edf4ff;
}

.lower-grid {
  align-items: stretch;
  margin-bottom: 18px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 4px 18px 18px;
}

.news-card {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.news-image {
  min-height: 110px;
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid rgba(10, 24, 46, 0.08);
  background-color: #0f1b2f;
  position: relative;
}

.news-image::before,
.news-image::after {
  content: "";
  position: absolute;
}

.news-image.dark-phone {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 45%),
    linear-gradient(135deg, #101722, #020712);
}

.news-image.dark-phone::before {
  width: 88px;
  height: 78px;
  left: 25px;
  top: 18px;
  border-radius: 10px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.02)),
    #152337;
  transform: rotate(-7deg);
  box-shadow: 0 14px 24px rgba(0, 0, 0, 0.32);
}

.news-image.dark-phone::after {
  width: 62px;
  height: 10px;
  left: 38px;
  top: 44px;
  border-radius: 999px;
  background: #ffca22;
  box-shadow: 0 18px 0 rgba(255, 255, 255, 0.4);
}

.news-image.id-card {
  background:
    linear-gradient(135deg, rgba(255, 195, 25, 0.22), transparent 42%),
    linear-gradient(155deg, #173862, #07182d);
}

.news-image.id-card::before {
  width: 108px;
  height: 70px;
  left: 30px;
  top: 20px;
  border-radius: 6px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.16) 0 8%, transparent 8% 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(214, 231, 255, 0.95));
  box-shadow: 0 13px 26px rgba(0, 0, 0, 0.24);
}

.news-image.id-card::after {
  width: 42px;
  height: 42px;
  left: 44px;
  top: 34px;
  border-radius: 50%;
  background: #1f65d6;
  box-shadow: 52px -2px 0 -16px #94a6bf, 52px 18px 0 -16px #94a6bf;
}

.news-image.shield {
  background:
    radial-gradient(circle at 70% 28%, rgba(24, 101, 246, 0.42), transparent 46%),
    linear-gradient(145deg, #0c1c35, #07101e);
}

.news-image.shield::before {
  width: 72px;
  height: 82px;
  left: 50%;
  top: 18px;
  border-radius: 36px 36px 18px 18px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #295fd3, #0c3278);
  clip-path: polygon(50% 0, 92% 16%, 86% 67%, 50% 100%, 14% 67%, 8% 16%);
}

.news-image.shield::after {
  width: 38px;
  height: 22px;
  left: 50%;
  top: 44px;
  border-left: 5px solid #ffffff;
  border-bottom: 5px solid #ffffff;
  transform: translateX(-50%) rotate(-45deg);
}

.news-card strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.news-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.premium-panel {
  min-height: 158px;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 26px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 26% 36%, rgba(255, 195, 25, 0.1), transparent 16rem),
    linear-gradient(145deg, #09203d, #061326 72%);
  color: #ffffff;
  box-shadow: var(--shadow-soft);
}

.premium-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  color: var(--gold);
}

.premium-icon svg {
  width: 32px;
  height: 32px;
  stroke-width: 2.3;
}

.premium-panel h2 {
  margin: 0 0 2px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
}

.premium-panel p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
}

.site-footer {
  padding: 28px 0 40px;
}

body.dark-mode .stats-card,
body.dark-mode .panel {
  color: #eef5ff;
}

body.dark-mode .stat-item small {
  color: #bac7d9;
  font-weight: 600;
  letter-spacing: 0;
}

body.dark-mode .stat-item strong {
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0;
  text-rendering: geometricPrecision;
}

body.dark-mode .stat-item span {
  color: #73a8ff;
  font-weight: 700;
  letter-spacing: 0;
}

body.dark-mode .panel-heading h2 {
  color: #f8fbff;
  font-weight: 800;
  letter-spacing: 0;
}

body.dark-mode .panel-heading a {
  color: #79adff;
  font-weight: 700;
  letter-spacing: 0;
}

body.dark-mode thead {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.045));
}

body.dark-mode th {
  color: #c2cee0;
  font-weight: 700;
  letter-spacing: 0;
}

body.dark-mode td {
  color: #dce7f5;
  border-top-color: rgba(255, 255, 255, 0.09);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.42;
}

body.dark-mode td small {
  color: #b8c6d8;
  font-weight: 500;
  letter-spacing: 0;
}

body.dark-mode .profile-cell strong {
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0;
}

body.dark-mode .profile-cell small {
  color: #b7c5d7;
  font-weight: 500;
  letter-spacing: 0;
}

body.dark-mode .status {
  font-weight: 800;
  letter-spacing: 0;
}

body.dark-mode .row-action {
  color: #d7e6fa;
}

body.dark-mode .row-action:hover {
  background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .case-item strong {
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0;
}

body.dark-mode .case-item p {
  color: #d7e3f1;
  font-weight: 600;
  letter-spacing: 0;
}

body.dark-mode .case-item div span {
  color: #b9c7d9;
  font-weight: 500;
  letter-spacing: 0;
}

body.dark-mode .case-icon {
  color: #ffffff;
}

body.dark-mode .case-item .case-icon {
  color: #ffffff;
}

body.dark-mode .case-item time {
  color: #b7c5d7;
  font-weight: 500;
  letter-spacing: 0;
}

body.dark-mode .history-button {
  color: #83b4ff;
  border-color: #4e8df5;
  font-weight: 800;
  letter-spacing: 0;
}

body.dark-mode .history-button:hover {
  background: rgba(78, 141, 245, 0.12);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 13px;
}

.footer-inner p {
  margin: 0;
}

.footer-inner a {
  color: #1261e6;
  font-weight: 800;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 100;
  max-width: min(420px, calc(100% - 32px));
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(5, 17, 35, 0.94);
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  font-size: 14px;
  font-weight: 700;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1180px) {
  .header-inner {
    grid-template-columns: auto auto 1fr;
  }

  .brand {
    min-width: 0;
  }

  .primary-nav {
    position: absolute;
    left: 24px;
    right: 24px;
    top: calc(100% + 10px);
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(5, 17, 35, 0.98);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.32);
  }

  .primary-nav.open {
    display: grid;
  }

  .primary-nav a {
    padding: 13px 14px;
    border-radius: 8px;
  }

  .primary-nav a::after {
    display: none;
  }

  .primary-nav a.active,
  .primary-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
  }

  .nav-toggle {
    display: inline-flex;
  }

  .header-actions {
    justify-self: end;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .report-card {
    width: min(620px, 100%);
  }

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

  .stat-item:nth-child(3) {
    border-right: 0;
  }

  .stat-item:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }

  .dashboard-grid,
  .lower-grid {
    grid-template-columns: 1fr;
  }

  .home-insights-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: min(100% - 28px, 1320px);
  }

  .header-inner {
    width: min(100% - 28px, 1440px);
    min-height: 66px;
    grid-template-columns: 1fr auto;
    gap: 12px;
  }

  .brand strong {
    font-size: 24px;
  }

  .brand small {
    font-size: 12px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .nav-toggle {
    order: 3;
  }

  .header-actions {
    grid-column: 1 / -1;
    width: 100%;
    display: grid;
    grid-template-columns: 42px 1fr;
    padding-bottom: 12px;
  }

  .guest-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .user-menu,
  .user-trigger {
    width: 100%;
  }

  .user-trigger-copy strong {
    max-width: none;
  }

  .user-dropdown {
    width: min(320px, calc(100vw - 28px));
  }

  .header-actions .button {
    width: 100%;
    padding: 0 12px;
  }

  .primary-nav {
    left: 14px;
    right: 14px;
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 34px;
  }

  .hero-copy h1 {
    font-size: 42px;
  }

  .hero-subtitle {
    font-size: 17px;
  }

  .search-panel {
    height: auto;
    grid-template-columns: 44px 1fr;
    overflow: visible;
    border-radius: 10px;
  }

  .search-panel input {
    min-height: 56px;
  }

  .search-panel button {
    grid-column: 1 / -1;
    min-height: 50px;
    border-radius: 0 0 10px 10px;
  }

  .report-card {
    padding: 22px 18px;
  }

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

  .stats-card {
    grid-template-columns: 1fr;
  }

  .stat-item,
  .stat-item:nth-child(3) {
    border-right: 0;
  }

  .stat-item:nth-child(n + 2) {
    border-top: 1px solid var(--line);
  }

  .case-item {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .case-item time {
    grid-column: 2;
    margin-top: -4px;
  }

  .metrics-grid {
    grid-template-columns: 1fr 1fr;
  }

  .news-grid {
    grid-template-columns: 1fr;
  }

  .premium-panel {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .premium-panel .button {
    grid-column: 1 / -1;
  }

  .footer-inner {
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .hero-copy h1 {
    font-size: 36px;
  }

  .popular-searches span {
    width: 100%;
  }

  .report-head {
    grid-template-columns: 40px 1fr;
  }

  .alert-icon {
    width: 36px;
    height: 36px;
  }

  .button {
    min-height: 40px;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
  }
}

/* Visual hierarchy and contrast refinements */
.primary-nav {
  gap: clamp(18px, 2vw, 32px);
}

.report-card {
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(17, 31, 51, 0.97);
}

.report-card p {
  color: #dbe5f3;
  font-weight: 500;
}

.accused-hero-button {
  width: 100%;
  min-height: 44px;
  margin-top: 12px;
  border: 1px solid rgba(255, 211, 74, 0.72);
  border-radius: 8px;
  background: rgba(255, 195, 25, 0.08);
  color: #ffd84f;
  font-weight: 800;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.accused-hero-button:hover,
.accused-hero-button:focus-visible {
  border-color: var(--gold);
  background: rgba(255, 195, 25, 0.16);
  outline: none;
}

.reports-panel {
  border-top: 3px solid var(--gold);
}

.reports-panel .panel-heading {
  padding-top: 14px;
}

.home-insights-grid {
  align-items: stretch;
}

.home-insights-grid > .panel {
  height: 100%;
}

.metrics-panel {
  display: flex;
  flex-direction: column;
}

.metrics-grid {
  flex: 1;
  margin-bottom: 20px;
}

.metric-item small {
  color: #536176;
  font-weight: 600;
}

.metric-item strong {
  font-weight: 750;
  line-height: 1.15;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 20px;
}

body.dark-mode .metric-item small {
  color: #c0ccdb;
}

body.dark-mode .report-card p,
body.dark-mode .feature small {
  color: #d6e0ed;
}

body.dark-mode .reports-panel {
  border-top-color: #ffd03d;
}

@media (max-width: 760px) {
  .nav-toggle {
    order: 0;
    justify-self: end;
  }

  .footer-inner nav {
    justify-content: flex-start;
  }
}
