:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --bg-soft: #f9fafc;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --text: #101828;
  --text-soft: #344054;
  --muted: #667085;
  --muted-light: #98a2b3;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --nav: #101828;
  --nav-soft: #1d2939;
  --nav-line: rgba(255, 255, 255, 0.1);
  --accent: #4f46e5;
  --accent-strong: #3730a3;
  --accent-soft: #eef2ff;
  --cyan: #0891b2;
  --cyan-soft: #ecfeff;
  --danger: #d92d20;
  --danger-strong: #b42318;
  --danger-bg: #fff4f3;
  --success: #079455;
  --success-strong: #067647;
  --success-bg: #ecfdf3;
  --warning: #dc6803;
  --warning-bg: #fffaeb;
  --violet: #7f56d9;
  --violet-bg: #f4f3ff;
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm: 0 4px 12px rgba(16, 24, 40, 0.06);
  --shadow: 0 14px 36px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 30px 80px rgba(16, 24, 40, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 304px minmax(0, 1fr);
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled,
a[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(79, 70, 229, 0.18);
  outline-offset: 2px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hidden {
  display: none !important;
}

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

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark,
.mobile-brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 9px 22px rgba(79, 70, 229, 0.28);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand h1,
.brand p {
  margin: 0;
}

.brand h1 {
  color: inherit;
  font-size: 16px;
  font-weight: 780;
  letter-spacing: -0.02em;
}

.brand p {
  margin-top: 3px;
  color: #98a2b3;
  font-size: 12px;
}

/* Authentication */

.login-view {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
  background: #fff;
}

.is-authenticated .login-view {
  display: none;
}

body:not(.is-authenticated) .sidebar,
body:not(.is-authenticated) .main,
body:not(.is-authenticated) .admin-shell,
body:not(.is-authenticated) .review-dialog {
  visibility: hidden;
}

.login-showcase {
  position: relative;
  isolation: isolate;
  min-width: 0;
  padding: clamp(36px, 6vw, 76px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 42px;
  overflow: hidden;
  background: var(--nav);
  color: #fff;
}

.login-showcase::before,
.login-showcase::after {
  position: absolute;
  z-index: -1;
  content: "";
  border-radius: 999px;
  filter: blur(2px);
}

.login-showcase::before {
  width: 460px;
  height: 460px;
  right: -180px;
  top: -180px;
  background: rgba(79, 70, 229, 0.26);
}

.login-showcase::after {
  width: 380px;
  height: 380px;
  left: -170px;
  bottom: -180px;
  background: rgba(8, 145, 178, 0.18);
}

.login-brand {
  align-self: flex-start;
}

.login-showcase-copy {
  width: min(650px, 100%);
}

.login-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  color: #c7d7fe;
  font-size: 12px;
  font-weight: 800;
}

.login-showcase-copy h2 {
  margin: 20px 0 18px;
  font-size: clamp(36px, 4.5vw, 62px);
  line-height: 1.03;
  letter-spacing: -0.055em;
}

.login-showcase-copy p {
  max-width: 560px;
  margin: 0;
  color: #b9c2d0;
  font-size: clamp(16px, 1.5vw, 19px);
  line-height: 1.65;
}

.login-preview {
  width: min(680px, 92%);
  min-height: 210px;
  align-self: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(20px);
  transform: perspective(900px) rotateX(3deg) rotateY(-5deg);
}

.login-preview-head {
  height: 50px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.login-preview-head span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

.login-preview-body {
  padding: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.login-preview-body div {
  position: relative;
  height: 124px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.login-preview-body div::before,
.login-preview-body div::after {
  position: absolute;
  left: 14px;
  content: "";
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.23);
}

.login-preview-body div::before {
  width: 36px;
  height: 36px;
  top: 14px;
  background: rgba(129, 140, 248, 0.55);
}

.login-preview-body div::after {
  width: 62%;
  height: 8px;
  bottom: 18px;
}

.login-chart-preview {
  height: 160px;
  padding: 22px 28px 24px;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 18px;
}

.login-chart-preview i {
  width: 32px;
  height: 45%;
  border-radius: 9px 9px 3px 3px;
  background: #818cf8;
  box-shadow: inset 0 -12px 0 rgba(8, 145, 178, 0.5);
}

.login-chart-preview i:nth-child(2) { height: 70%; }
.login-chart-preview i:nth-child(3) { height: 52%; }
.login-chart-preview i:nth-child(4) { height: 86%; }
.login-chart-preview i:nth-child(5) { height: 63%; }
.login-chart-preview i:nth-child(6) { height: 94%; }

.login-panel {
  width: min(460px, calc(100% - 48px));
  align-self: center;
  justify-self: center;
  display: grid;
  gap: 20px;
  padding: 12px 0;
  color: var(--text);
}

.login-panel-heading {
  margin-bottom: 8px;
}

.mobile-brand-mark {
  display: none;
  margin-bottom: 26px;
}

.login-panel-heading h2 {
  margin: 8px 0 10px;
  color: var(--text);
  font-size: 34px;
  letter-spacing: -0.04em;
}

.login-panel-heading > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

label {
  display: grid;
  gap: 8px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 750;
}

label small {
  margin-left: 4px;
  color: var(--muted-light);
  font-size: 11px;
  font-weight: 650;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  padding: 11px 13px;
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-xs);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input {
  min-height: 46px;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-light);
}

input:hover,
textarea:hover,
select:hover {
  border-color: #98a2b3;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--accent);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.login-submit {
  min-height: 48px !important;
  margin-top: 2px;
}

.login-error {
  min-height: 18px;
  margin: -8px 0 0;
  color: var(--danger);
  font-size: 12px;
  font-weight: 750;
}

.login-security-note {
  margin: -4px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted-light);
  font-size: 11px;
  font-weight: 700;
}

.login-security-note span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 4px var(--success-bg);
}

/* Shared controls */

.icon-button,
.primary,
.danger,
.close-button {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: #fff;
  color: var(--text-soft);
  box-shadow: var(--shadow-xs);
  font-size: 12px;
  font-weight: 780;
  line-height: 1;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.icon-button:hover:not(:disabled),
.close-button:hover:not(:disabled) {
  border-color: #98a2b3;
  background: var(--panel-soft);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.link-button {
  text-decoration: none;
}

.primary,
.accent-button {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 14px rgba(79, 70, 229, 0.18);
}

.primary:hover:not(:disabled),
.accent-button:hover:not(:disabled) {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  box-shadow: 0 9px 20px rgba(79, 70, 229, 0.24);
  transform: translateY(-1px);
}

.danger {
  border-color: #fecdca;
  background: var(--danger-bg);
  color: var(--danger-strong);
  box-shadow: none;
}

.danger:hover:not(:disabled) {
  border-color: #fda29b;
  background: #fee4e2;
  transform: translateY(-1px);
}

.quiet-button {
  color: var(--muted);
}

.refresh-action::before {
  content: "↻";
  font-size: 16px;
  font-weight: 500;
}

.icon-button.is-loading,
.primary.is-loading,
.danger.is-loading {
  position: relative;
  padding-left: 35px;
}

.icon-button.is-loading::before,
.primary.is-loading::before,
.danger.is-loading::before {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 13px;
  height: 13px;
  margin-top: -7px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  content: "";
  animation: spin 0.8s linear infinite;
}

.close-button {
  width: 40px;
  min-width: 40px;
  padding: 0;
  border-radius: 11px;
  color: var(--muted);
  font-size: 20px;
  font-weight: 500;
}

/* Reviewer navigation */

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 0;
  padding: 22px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow: hidden;
  background: var(--nav);
  color: #f8fafc;
}

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

.live-badge {
  min-height: 24px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--nav-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #d0d5dd;
  font-size: 10px;
  font-weight: 800;
}

.live-badge i,
.hero-status i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #32d583;
  box-shadow: 0 0 0 3px rgba(50, 213, 131, 0.12);
}

.filters {
  display: grid;
  gap: 12px;
}

.section-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #f2f4f7;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-label-hint {
  color: #667085;
  font-size: 10px;
  letter-spacing: 0;
  text-transform: none;
}

.sidebar input {
  min-height: 42px;
  border-color: var(--nav-line);
  background: rgba(255, 255, 255, 0.06);
  color: #f9fafb;
  box-shadow: none;
}

.sidebar input::placeholder {
  color: #98a2b3;
}

.sidebar input:focus {
  border-color: rgba(129, 140, 248, 0.8);
  box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.12);
}

.segment {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--nav-line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
}

.segment button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #98a2b3;
  font-size: 11px;
  font-weight: 750;
}

.segment button:hover {
  color: #fff;
}

.segment button.active {
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-xs);
}

.product-list {
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 5px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: #344054 transparent;
}

.product-button {
  position: relative;
  width: 100%;
  min-height: 58px;
  padding: 8px 9px;
  border: 1px solid transparent;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  background: transparent;
  color: inherit;
  text-align: left;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.product-button:hover {
  border-color: var(--nav-line);
  background: rgba(255, 255, 255, 0.05);
}

.product-button.active {
  border-color: rgba(129, 140, 248, 0.32);
  background: rgba(99, 102, 241, 0.14);
}

.product-button.has-presence {
  min-height: 82px;
  padding-top: 10px;
  padding-bottom: 10px;
  align-items: start;
}

.product-button.has-presence .product-icon {
  margin-top: 1px;
}

.product-button.has-presence .product-meta {
  padding-top: 2px;
}

.product-button.active::after {
  position: absolute;
  right: -1px;
  top: 15px;
  width: 3px;
  height: 26px;
  border-radius: 999px 0 0 999px;
  background: #a5b4fc;
  content: "";
}

.product-button.active.has-presence::after {
  top: 50%;
  transform: translateY(-50%);
}

.product-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  color: #c7d7fe;
  font-size: 12px;
  font-weight: 900;
}

.product-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.product-copy strong,
.product-copy > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-copy strong {
  color: #f2f4f7;
  font-size: 12px;
  font-weight: 730;
}

.product-copy > span {
  color: #7d899b;
  font-size: 10px;
}

.product-type {
  min-height: 20px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--nav-line);
  border-radius: 999px;
  color: #98a2b3;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.product-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
}

.product-presence {
  width: fit-content;
  max-width: 100%;
  min-height: 22px;
  margin-top: 2px;
  padding: 2px 7px 2px 3px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  border: 1px solid rgba(52, 211, 153, 0.16);
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.07);
}

.presence-avatars {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  padding-left: 4px;
}

.presence-avatar,
.presence-more {
  width: 17px;
  height: 17px;
  margin-left: -4px;
  display: grid;
  place-items: center;
  border: 1.5px solid #181e2e;
  border-radius: 999px;
  background: linear-gradient(145deg, #6366f1, #4338ca);
  color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.22);
  font-size: 6px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
}

.presence-avatar:first-child {
  margin-left: 0;
}

.presence-avatar.presence-color-2 {
  background: linear-gradient(145deg, #06b6d4, #0e7490);
}

.presence-avatar.presence-color-3 {
  background: linear-gradient(145deg, #f97316, #c2410c);
}

.presence-avatar.presence-color-4 {
  background: linear-gradient(145deg, #ec4899, #be185d);
}

.presence-more {
  background: #344054;
  color: #d0d5dd;
}

.presence-label {
  min-width: 0;
  overflow: hidden;
  color: #6ee7b7;
  font-size: 9px;
  font-weight: 720;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.presence-label::before {
  width: 5px;
  height: 5px;
  margin-right: 4px;
  display: inline-block;
  border-radius: 999px;
  background: #32d583;
  box-shadow: 0 0 0 2px rgba(50, 213, 131, 0.12);
  content: "";
  vertical-align: 1px;
}

.product-button.active .product-presence {
  border-color: rgba(110, 231, 183, 0.22);
  background: rgba(16, 185, 129, 0.1);
}

.product-completion-flags {
  min-height: 18px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  font-size: 15px;
  line-height: 1;
}

.product-completion-flags:empty {
  display: none;
}

.flag-icon {
  width: 21px;
  height: 14px;
  display: inline-block;
  flex: 0 0 auto;
  border: 1px solid rgba(16, 24, 40, 0.16);
  border-radius: 2px;
  object-fit: cover;
  vertical-align: middle;
}

.sidebar-flag {
  width: 20px;
  height: 13px;
  border-color: rgba(255, 255, 255, 0.28);
}

.product-empty {
  min-height: 110px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 5px;
  color: #f2f4f7;
  text-align: center;
}

.product-empty strong {
  font-size: 12px;
}

.product-empty span {
  color: #667085;
  font-size: 10px;
}

.product-skeleton {
  min-height: 58px;
  padding: 12px;
  display: grid;
  gap: 9px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.product-skeleton span,
.product-skeleton small,
.skeleton-tile {
  position: relative;
  overflow: hidden;
}

.product-skeleton span,
.product-skeleton small {
  display: block;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.product-skeleton span { width: 58%; }
.product-skeleton small { width: 82%; }

.product-skeleton span::after,
.product-skeleton small::after,
.skeleton-tile::after,
.image-loading::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.25s infinite;
}

.sidebar-footer {
  min-height: 62px;
  padding: 9px;
  border: 1px solid var(--nav-line);
  border-radius: 13px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 10px;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.04);
}

.user-avatar,
.member-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #eef2ff;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.user-identity {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.user-identity strong,
.user-identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-identity strong {
  color: #f2f4f7;
  font-size: 11px;
}

.user-identity span {
  color: #7d899b;
  font-size: 9px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #32d583;
  box-shadow: 0 0 0 3px rgba(50, 213, 131, 0.11);
}

/* Reviewer workspace */

.main {
  min-width: 0;
  padding: 28px clamp(20px, 3vw, 42px) 44px;
  display: grid;
  align-content: start;
  gap: 20px;
}

.topbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

.page-heading {
  min-width: 220px;
}

.topbar h2,
.content-heading h3,
.section-intro h2,
.dashboard-hero h2 {
  margin: 5px 0 0;
  color: var(--text);
  letter-spacing: -0.035em;
}

.topbar h2 {
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.15;
}

.page-description {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.toolbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.country-filter {
  width: auto;
  max-width: 170px;
  min-height: 40px;
  padding: 0 34px 0 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 730;
}

.t1-toggle.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.done-button {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.done-button:hover:not(:disabled) {
  border-color: #4ade80;
  background: #dcfce7;
  color: #14532d;
}

.done-button.completed:disabled {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
  opacity: 1;
}

.done-button.remove-all {
  border-color: #fda29b;
  background: #fff5f4;
  color: #b42318;
}

.done-button.remove-all:hover:not(:disabled) {
  border-color: #f97066;
  background: #fee4e2;
  color: #912018;
}

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

.stat-card {
  position: relative;
  min-width: 0;
  min-height: 144px;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: var(--shadow-xs);
}

.stat-card::after {
  position: absolute;
  right: -22px;
  bottom: -32px;
  width: 94px;
  height: 94px;
  border-radius: 999px;
  background: var(--accent-soft);
  content: "";
  opacity: 0.6;
}

.stat-ready::after { background: var(--success-bg); }
.stat-project::after { background: var(--cyan-soft); }
.stat-automation::after { background: var(--violet-bg); }

.stat-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.stat-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 10px;
  font-weight: 900;
}

.stat-ready .stat-icon { background: var(--success-bg); color: var(--success-strong); }
.stat-project .stat-icon { background: var(--cyan-soft); color: var(--cyan); }
.stat-automation .stat-icon { background: var(--violet-bg); color: var(--violet); }

.stat-trend {
  min-height: 22px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.stat-trend.success { background: var(--success-bg); color: var(--success-strong); }
.stat-trend.violet { background: var(--violet-bg); color: var(--violet); }

.stat-card .stat-value {
  position: relative;
  z-index: 1;
  max-width: 100%;
  margin-top: 16px;
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-card .stat-project-value {
  font-size: 19px;
  letter-spacing: -0.025em;
}

.stat-card p {
  position: relative;
  z-index: 1;
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.status-banner {
  position: relative;
  padding: 13px 15px 13px 42px;
  border: 1px solid #c7d7fe;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.5;
}

.status-banner::before {
  position: absolute;
  left: 15px;
  top: 13px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  content: "i";
  font-size: 10px;
  font-weight: 900;
}

.status-banner.error {
  border-color: #fecdca;
  background: var(--danger-bg);
  color: var(--danger-strong);
}

.status-banner.error::before {
  background: var(--danger);
  content: "!";
}

.status-banner.success {
  border-color: #abefc6;
  background: var(--success-bg);
  color: var(--success-strong);
}

.status-banner.success::before {
  background: var(--success);
  content: "✓";
}

.status-banner a {
  color: inherit;
  font-weight: 850;
}

.content-heading,
.section-intro {
  min-width: 0;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.content-heading h3 {
  font-size: 21px;
}

.content-heading > p {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 11px;
}

.submission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  align-content: start;
  gap: 12px;
}

.submission-groups {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 24px;
}

.submission-grid.empty {
  min-height: 380px;
  grid-template-columns: 1fr;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
}

.empty-state {
  max-width: 420px;
  padding: 34px;
  text-align: center;
}

.empty-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border: 1px solid #c7d7fe;
  border-radius: 15px;
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.12);
  font-size: 13px;
  font-weight: 900;
}

.empty-state h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.empty-state p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.package-group {
  min-width: 0;
  display: grid;
  gap: 12px;
  scroll-margin-top: 18px;
  border-radius: 15px;
  transition: box-shadow 180ms ease;
}

.package-group.is-skip-target {
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
}

.package-group-header {
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--panel);
  box-shadow: var(--shadow-xs);
}

.package-group-header .package-heading {
  min-width: 0;
  flex: 1 1 auto;
}

.package-name-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.package-name-row h3 {
  min-width: 0;
}

.package-profile-status {
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 3px 7px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.package-profile-status.mandatory {
  border-color: #a6f4c5;
  background: var(--success-bg);
  color: var(--success-strong);
}

.package-profile-status.not-mandatory {
  border-color: #fecdca;
  background: var(--danger-bg);
  color: var(--danger-strong);
}

.package-group-header h3,
.package-group-header p {
  margin: 0;
}

.package-group-header h3 {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 780;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.package-group-header p:not(.package-label) {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
}

.package-group-header .package-label {
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.package-group-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.package-skip-button,
.package-mandate-button {
  white-space: nowrap;
}

.package-mandate-actions {
  display: inline-flex;
  gap: 8px;
}

.profile-not-mandatory-button {
  border-color: var(--danger);
  background: #fff;
  color: var(--danger-strong);
  box-shadow: none;
}

.profile-not-mandatory-button:hover:not(:disabled) {
  border-color: var(--danger-strong);
  background: var(--danger-bg);
  color: var(--danger-strong);
}

.package-delete-button {
  min-height: 36px;
  padding-inline: 11px;
  white-space: nowrap;
}

.package-count {
  min-width: 70px;
  min-height: 36px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 9px;
  font-weight: 750;
  white-space: nowrap;
}

.package-count strong {
  font-size: 14px;
  font-weight: 850;
}

.screenshot-tile {
  position: relative;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
  box-shadow: var(--shadow-sm);
  text-align: left;
  transition: transform 170ms ease, box-shadow 170ms ease, border-color 170ms ease;
}

.screenshot-tile:hover:not(:disabled),
.screenshot-tile:focus-visible {
  border-color: #a5b4fc;
  box-shadow: 0 18px 36px rgba(16, 24, 40, 0.15);
  transform: translateY(-3px);
  outline: none;
}

.screenshot-media {
  display: block;
}

.screenshot-media::after {
  position: absolute;
  inset: 40% 0 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(9, 16, 29, 0.78));
  content: "";
}

.screenshot-tile img,
.image-missing {
  width: 100%;
  aspect-ratio: 9 / 16;
  display: block;
  object-fit: cover;
  background: #e9edf3;
}

.image-missing {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.image-loading {
  position: relative;
  overflow: hidden;
}

.screenshot-tile-top,
.screenshot-tile-footer {
  position: absolute;
  z-index: 2;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  pointer-events: none;
}

.screenshot-tile-top {
  top: 10px;
}

.review-state,
.country-chip {
  min-height: 24px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(16, 24, 40, 0.72);
  color: #fff;
  backdrop-filter: blur(8px);
  font-size: 8px;
  font-weight: 850;
}

.review-state i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #fdb022;
}

.country-chip {
  background: rgba(255, 255, 255, 0.88);
  color: var(--text);
}

.screenshot-tile-footer {
  bottom: 11px;
  color: #fff;
}

.screenshot-tile-footer > span {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.76);
  font-size: 9px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screenshot-tile-footer strong {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.screenshot-tile-footer i {
  font-style: normal;
  font-size: 12px;
}

.skeleton-tile {
  aspect-ratio: 9 / 16;
  border: 0;
  background: #e6eaf0;
  box-shadow: none;
}

/* Review dialog */

.review-dialog {
  width: min(1180px, calc(100vw - 34px));
  max-height: calc(100vh - 34px);
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow-lg);
}

.review-dialog::backdrop,
.admin-modal::backdrop,
.image-detail-modal::backdrop,
.fraud-match-modal::backdrop {
  background: rgba(16, 24, 40, 0.72);
  backdrop-filter: blur(5px);
}

.review-dialog form {
  max-height: calc(100vh - 34px);
  margin: 0;
  padding: 20px;
  display: grid;
  gap: 16px;
  overflow-y: auto;
}

.review-dialog header,
.review-dialog footer,
.admin-modal header,
.admin-modal footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.review-dialog h3,
.admin-modal h3 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 19px;
  letter-spacing: -0.025em;
}

.review-dialog-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.flag-app-button {
  border-color: #fdb022;
  background: #fffaeb;
  color: #b54708;
  box-shadow: none;
}

.flag-app-button:hover:not(:disabled) {
  border-color: #f79009;
  background: #fef0c7;
  color: #93370d;
}

.flag-app-button.is-flagged {
  border-color: #abefc6;
  background: var(--success-bg);
  color: var(--success-strong);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(330px, 1fr) minmax(330px, 400px);
  gap: 18px;
  align-items: start;
}

.review-image-stage {
  min-height: 0;
  padding: 12px;
  border-radius: 16px;
  background: #111827;
}

.image-stage-label {
  height: 32px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #d0d5dd;
  font-size: 10px;
  font-weight: 750;
}

.image-stage-label span {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #32d583;
}

#dialogImage {
  width: 100%;
  height: min(66vh, 690px);
  display: block;
  border-radius: 11px;
  background: #0b1220;
  object-fit: contain;
}

.detail-panel {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.review-checklist-note {
  padding: 11px;
  border: 1px solid #c7d7fe;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  background: var(--accent-soft);
}

.checklist-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.review-checklist-note p {
  margin: 0;
  color: var(--accent-strong);
  font-size: 10px;
  line-height: 1.45;
}

.review-checklist-note strong {
  margin-bottom: 2px;
  display: block;
  font-size: 11px;
}

.review-dialog dl {
  margin: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 0 14px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 10px;
}

.review-dialog dt,
.review-dialog dd {
  min-height: 36px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.review-dialog dt:nth-last-of-type(1),
.review-dialog dd:nth-last-of-type(1) {
  border-bottom: 0;
}

.review-dialog dt {
  color: var(--text-soft);
  font-weight: 800;
}

.review-dialog dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  text-align: right;
  font-weight: 650;
}

.review-dialog dd span {
  margin-top: 2px;
  display: block;
  color: var(--muted-light);
  font-size: 9px;
}

.review-dialog .rejected-count-label,
.review-dialog .rejected-count-value {
  min-height: 40px;
  margin: 6px 0;
  padding: 10px;
  align-self: center;
  border: 1px solid #fecdca;
}

.review-dialog .rejected-count-label {
  border-right: 0;
  border-radius: 9px 0 0 9px;
  text-transform: uppercase;
}

.review-dialog .rejected-count-value {
  border-left: 0;
  border-radius: 0 9px 9px 0;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.review-dialog .rejected-count-zero { color: var(--success-strong); background: var(--success-bg); border-color: #abefc6; }
.review-dialog .rejected-count-one { color: var(--warning); background: var(--warning-bg); border-color: #fedf89; }
.review-dialog .rejected-count-two { color: var(--danger-strong); background: var(--danger-bg); border-color: #fecdca; }

.installed-app-card {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 106px;
  align-items: stretch;
  gap: 12px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.installed-app-copy {
  min-width: 0;
  display: grid;
  align-content: space-between;
  gap: 12px;
}

.installed-app-card p,
.installed-app-card strong,
.installed-app-card span {
  display: block;
  margin: 0;
}

.installed-app-card p {
  color: var(--accent);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.installed-app-card strong {
  margin-top: 5px;
  color: var(--text);
  font-size: 14px;
}

.installed-app-card span {
  margin-top: 4px;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 9px;
}

.app-link {
  width: max-content;
  min-width: 90px;
  min-height: 36px;
  display: inline-grid;
  place-items: center;
  text-decoration: none;
}

.installed-app-qr {
  min-height: 106px;
  border: 1px solid var(--line);
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--panel-soft);
}

.installed-app-qr img,
.qr-placeholder {
  width: 90px;
  height: 90px;
  border-radius: 7px;
  background: #fff;
}

.installed-app-qr img {
  display: block;
  object-fit: contain;
}

.qr-placeholder {
  display: grid;
  place-items: center;
  color: var(--muted-light);
  font-size: 12px;
  font-weight: 900;
}

.review-dialog textarea {
  min-height: 76px;
  resize: vertical;
}

.review-dialog footer {
  padding-top: 2px;
}

.decision-note {
  color: var(--muted);
  font-size: 10px;
}

.decision-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.decision-actions button {
  min-height: 42px;
}

/* Small game */

.flappy-toggle {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 12;
  width: 50px;
  height: 50px;
  border: 1px solid #fedf89;
  border-radius: 15px;
  background: var(--warning-bg);
  box-shadow: var(--shadow);
  font-size: 24px;
  line-height: 1;
  transition: transform 150ms ease;
}

.flappy-toggle:hover { transform: translateY(-2px) rotate(-2deg); }

.flappy-panel {
  position: fixed;
  right: 22px;
  bottom: 82px;
  z-index: 13;
  width: min(352px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  display: grid;
  gap: 12px;
  background: var(--panel);
  box-shadow: var(--shadow-lg);
}

.flappy-panel header,
.flappy-panel footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.flappy-panel strong { font-size: 13px; }

.flappy-panel canvas {
  width: 100%;
  height: 420px;
  display: block;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #dff6ff;
  touch-action: none;
}

.flappy-panel footer span {
  min-width: 48px;
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
}

/* Admin shell */

.admin-page {
  display: block;
  background: var(--bg);
}

.admin-shell {
  min-height: 100vh;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 76px;
  padding: 0 clamp(22px, 3vw, 42px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.admin-brand {
  color: var(--text);
}

.admin-brand .brand-mark {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border-radius: 12px;
}

.admin-brand p {
  color: var(--muted);
}

.admin-workspace {
  min-height: calc(100vh - 76px);
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  min-width: 0;
  height: calc(100vh - 76px);
  min-height: 0;
  padding: 20px 14px 16px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #d0d5dd transparent;
  background: #fff;
}

.admin-nav-heading {
  padding: 0 8px;
}

.admin-nav-heading > span {
  margin-top: 5px;
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.admin-tabs {
  display: grid;
  gap: 3px;
}

.admin-tabs button {
  min-height: 54px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.admin-tabs button:hover {
  border-color: var(--line);
  background: var(--panel-soft);
  color: var(--text);
}

.admin-tabs button.active {
  border-color: #c7d7fe;
  background: var(--accent-soft);
  color: var(--accent-strong);
  box-shadow: inset 3px 0 0 var(--accent);
}

.nav-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.admin-tabs button.active .nav-icon {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.admin-tabs button > span:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.admin-tabs strong,
.admin-tabs small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-tabs strong {
  color: inherit;
  font-size: 11px;
  font-weight: 800;
}

.admin-tabs small {
  color: var(--muted-light);
  font-size: 9px;
  font-weight: 600;
}

.admin-sidebar-note {
  margin-top: auto;
  padding: 12px;
  border: 1px solid #c7d7fe;
  border-radius: 13px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  background: var(--accent-soft);
}

.note-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 900;
}

.admin-sidebar-note strong {
  color: var(--accent-strong);
  font-size: 10px;
}

.admin-sidebar-note p {
  margin: 3px 0 0;
  color: #6366a8;
  font-size: 9px;
  line-height: 1.45;
}

.admin-profile {
  border-color: var(--line);
  background: var(--panel-soft);
}

.admin-profile .user-identity strong { color: var(--text); }
.admin-profile .user-identity span { color: var(--muted); }

.admin-content {
  min-width: 0;
  padding: 24px clamp(18px, 2.4vw, 34px) 48px;
}

.admin-content > .status-banner {
  margin-bottom: 18px;
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.active {
  display: grid;
  align-content: start;
  gap: 18px;
  animation: panel-in 200ms ease;
}

.dashboard-hero,
.section-intro {
  min-height: 96px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.dashboard-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.dashboard-hero::after {
  position: absolute;
  right: -64px;
  top: -94px;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: var(--accent-soft);
  content: "";
}

.dashboard-hero > div,
.dashboard-hero .hero-status {
  position: relative;
  z-index: 1;
}

.dashboard-hero h2,
.section-intro h2 {
  font-size: 25px;
}

.dashboard-hero p:last-child,
.section-intro p:last-child {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.hero-status {
  min-height: 30px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #abefc6;
  border-radius: 999px;
  background: var(--success-bg);
  color: var(--success-strong);
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
}

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

.metric-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 7px;
  background: var(--panel-soft);
}

.overview-card {
  min-height: 134px;
  padding: 15px;
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.metric-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.metric-card-head > span:last-child {
  color: var(--muted-light);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 9px;
  font-weight: 900;
}

.tone-green .metric-icon { background: var(--success-bg); color: var(--success-strong); }
.tone-violet .metric-icon { background: var(--violet-bg); color: var(--violet); }
.tone-amber .metric-icon { background: var(--warning-bg); color: var(--warning); }

.metric-card > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.metric-card > strong {
  overflow: hidden;
  color: var(--text);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  text-overflow: ellipsis;
}

.overview-card > strong {
  margin-top: 5px;
  font-size: 30px;
}

.metric-card p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.dashboard-grid {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(410px, 0.75fr);
  gap: 16px;
  align-items: start;
}

.admin-panel {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 17px;
  display: grid;
  align-content: start;
  gap: 15px;
  background: var(--panel);
  box-shadow: var(--shadow-xs);
}

.admin-panel > header {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-panel h3 {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 16px;
  letter-spacing: -0.02em;
}

.panel-kicker {
  margin: 0;
  color: var(--muted-light);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.panel-description {
  color: var(--muted-light);
  font-size: 9px;
  font-weight: 700;
}

.panel-badge {
  min-height: 26px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: var(--violet-bg);
  color: var(--violet);
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.chart-legend i {
  width: 8px;
  height: 8px;
  border-radius: 3px;
}

.chart-legend .approved { background: var(--success); }
.chart-legend .rejected { background: var(--danger); }

.stats-graph {
  min-height: 250px;
  padding: 18px 12px 12px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(42px, 1fr);
  align-items: end;
  gap: 8px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  background-image: linear-gradient(to bottom, transparent 49%, var(--line) 50%, transparent 51%);
  background-size: 100% 74px;
}

.stats-graph > .empty-row {
  min-width: 250px;
  align-self: center;
}

.stats-bar-group {
  min-width: 42px;
  display: grid;
  justify-items: center;
  align-items: end;
  gap: 6px;
}

.stats-bar-stack {
  width: 24px;
  height: 150px;
  border-radius: 7px 7px 3px 3px;
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-start;
  overflow: hidden;
  background: #eaecf0;
}

.stats-bar {
  width: 100%;
  display: block;
}

.stats-bar.approved { background: var(--success); }
.stats-bar.rejected { background: var(--danger); }

.stats-bar-group strong {
  color: var(--text-soft);
  font-size: 10px;
}

.stats-bar-group > span {
  color: var(--muted-light);
  font-size: 8px;
  font-weight: 750;
  white-space: nowrap;
}

.automation-panel {
  gap: 14px;
}

.ai-metric-grid {
  grid-template-columns: repeat(4, minmax(70px, 1fr));
  gap: 7px;
}

.ai-metric-card {
  min-height: 78px;
  padding: 11px;
}

.ai-metric-card > strong {
  font-size: 20px;
}

.ai-metric-card.tone-blue { border-top: 3px solid var(--accent); }
.ai-metric-card.tone-green { border-top: 3px solid var(--success); }
.ai-metric-card.tone-red { border-top: 3px solid var(--danger); }
.ai-metric-card.tone-amber { border-top: 3px solid var(--warning); }

.section-intro {
  align-items: center;
}

.section-intro > div:first-child {
  min-width: 0;
}

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

.data-row {
  min-height: 70px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  background: var(--panel-soft);
  transition: background 140ms ease, border-color 140ms ease;
}

.data-row:hover {
  border-color: var(--line-strong);
  background: #fff;
}

.member-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.member-copy {
  min-width: 0;
}

.member-copy strong,
.member-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-copy strong {
  color: var(--text);
  font-size: 12px;
}

.member-copy span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.role-badge {
  min-width: 64px;
  min-height: 25px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--cyan-soft);
  color: var(--cyan);
  font-size: 8px;
  font-weight: 850;
  text-transform: capitalize;
}

.role-badge.admin {
  background: var(--violet-bg);
  color: var(--violet);
}

.role-badge.super_admin {
  background: #fef3c7;
  color: #92400e;
}

.danger-quiet {
  min-height: 34px;
  background: #fff;
}

.member-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.member-actions .icon-button,
.member-actions .danger {
  min-height: 34px;
}

.empty-row {
  min-height: 90px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  background: var(--panel-soft);
  font-size: 11px;
  text-align: center;
}

.empty-row .empty-icon {
  width: 38px;
  height: 38px;
  margin: 0;
  flex: 0 0 38px;
  border-radius: 11px;
}

.empty-row strong {
  display: block;
  color: var(--text-soft);
}

.empty-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.compact-table {
  max-height: 220px;
}

.fraud-users-table-wrap {
  max-height: min(68vh, 720px);
}

.fraud-users-table {
  min-width: 1240px;
}

.user-installed-apps-table-wrap {
  max-height: min(68vh, 720px);
}

.user-installed-apps-table {
  min-width: 1780px;
}

.user-installed-app-filters {
  width: 100%;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  align-items: flex-end;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel-soft);
}

.user-installed-app-filters > button {
  width: 100%;
}

.user-installed-app-filters .archive-date-filter input {
  min-width: 142px;
  min-height: 41px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 750;
}

.user-installed-app-filters #userInstalledAppsMinimumApps {
  min-width: 110px;
  width: 110px;
}

.user-installed-apps-group th {
  position: static;
  padding: 12px 14px;
  background: #eef4ff;
  color: var(--text);
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  overflow-wrap: anywhere;
}

.user-installed-apps-group th strong {
  margin-right: 10px;
}

.user-installed-apps-group th span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.installed-app-group-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.installed-app-group-summary > strong {
  max-width: min(420px, 100%);
  margin-right: 5px;
  overflow-wrap: anywhere;
}

.user-installed-apps-group th .group-stat {
  min-height: 24px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
}

.user-installed-apps-group th .group-stat.suspicious {
  border-color: #fecdca;
  background: #fef3f2;
  color: #b42318;
}

.user-installed-apps-group th .group-stat.total {
  border-color: #a5f3fc;
  background: var(--cyan-soft);
  color: #0e7490;
}

.user-installed-apps-group th .group-stat.game {
  border-color: #fedf89;
  background: #fffaeb;
  color: #b54708;
}

.user-installed-apps-group th .group-stat.unavailable {
  border-color: #f9a8d4;
  background: #fdf2f8;
  color: #9d174d;
}

.user-installed-apps-group th .group-stat.approvals {
  border-color: #c7d7fe;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.installed-app-package,
.installed-app-user-id,
.installed-app-google-ad-id {
  max-width: 260px;
  overflow-wrap: anywhere;
}

.dry-run-account-details {
  min-width: 190px;
}

.dry-run-account-details summary {
  cursor: pointer;
  color: var(--accent-strong);
  font-weight: 800;
}

.dry-run-app-records {
  width: min(620px, 70vw);
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.dry-run-app-record {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
}

.dry-run-app-record > div {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dry-run-app-record dl {
  margin: 9px 0 0;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 8px;
  font-size: 9px;
}

.dry-run-app-record dt {
  color: var(--muted);
  font-weight: 800;
}

.dry-run-app-record dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.app-category-badge {
  min-height: 25px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
}

.app-category-badge.suspicious {
  border-color: #fecdca;
  background: #fef3f2;
  color: #b42318;
}

.app-category-badge.game {
  border-color: #fedf89;
  background: #fffaeb;
  color: #b54708;
}

.app-category-badge.normal {
  border-color: #abefc6;
  background: #ecfdf3;
  color: #067647;
}

.app-category-badge.pending {
  border-color: #e4e7ec;
  background: #f9fafb;
  color: #667085;
}

.availability-badge {
  min-height: 25px;
  padding: 0 10px 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
}

.availability-badge i,
.queue-badge::before {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 999px;
  content: "";
}

.availability-badge.available {
  border-color: #abefc6;
  background: var(--success-bg);
  color: var(--success-strong);
}

.availability-badge.available i { background: var(--success); }

.availability-badge.unavailable {
  border-color: #fecdca;
  background: var(--danger-bg);
  color: var(--danger-strong);
}

.availability-badge.unavailable i { background: var(--danger); }

.availability-badge.unchecked {
  border-color: var(--line);
  background: var(--panel-soft);
  color: var(--muted);
}

.availability-badge.unchecked i { background: var(--muted-light); }

/* Admin dashboard refinement */

.admin-page .section-intro > .toolbar {
  flex: 1 1 560px;
}

.admin-page .section-intro .archive-toolbar {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel-soft);
}

.admin-page .section-intro .archive-toolbar input,
.admin-page .section-intro .archive-toolbar select {
  background: #fff;
}

.admin-page .admin-panel > .table-wrap:not(.compact-table) {
  max-height: min(68vh, 720px);
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.admin-page table {
  font-variant-numeric: tabular-nums;
}

.admin-page th {
  padding: 12px 14px;
  background: #f6f8fc;
  color: #667085;
  font-size: 9px;
  letter-spacing: 0.065em;
  box-shadow: inset 0 -1px 0 var(--line);
}

.admin-page td {
  padding: 12px 14px;
  color: #344054;
  font-size: 11px;
  font-weight: 580;
  line-height: 1.45;
}

.admin-page tbody tr:nth-child(even) td {
  background: #fbfcfe;
}

.admin-page tbody tr:hover td {
  background: #f3f5ff;
}

.admin-page .installed-app-package,
.admin-page .installed-app-user-id,
.admin-page .installed-app-google-ad-id,
.admin-page .fraud-user-id,
.admin-page .fraud-package-list {
  color: #475467;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  font-weight: 650;
}

.app-types-actions {
  align-items: flex-end;
  gap: 10px;
}

.bulk-action-group,
.queue-action {
  display: flex;
  align-items: flex-end;
  gap: 7px;
}

.bulk-action-group {
  padding-right: 10px;
  border-right: 1px solid var(--line);
}

.bulk-action-group label {
  min-width: 164px;
}

.automation-action {
  border-color: #c7d7fe;
  background: var(--accent-soft);
  color: var(--accent-strong);
  box-shadow: none;
}

.automation-action:hover:not(:disabled) {
  border-color: #a5b4fc;
  background: #e0e7ff;
  color: var(--accent-strong);
}

.queue-action {
  position: relative;
  padding-bottom: 22px;
}

.queue-action .queue-badge {
  position: absolute;
  left: 3px;
  bottom: 0;
  min-height: 18px;
  padding: 0;
  gap: 5px;
  background: transparent;
  color: var(--muted-light);
  font-size: 8px;
}

.queue-badge::before {
  display: block;
  background: var(--muted-light);
}

.queue-badge.is-active {
  color: var(--accent-strong);
}

.queue-badge.is-active::before {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.ai-metric-card > strong {
  overflow: visible;
  font-size: clamp(16px, 1.5vw, 20px);
}

@media (max-height: 850px) and (min-width: 1021px) {
  .admin-sidebar {
    gap: 12px;
    padding-top: 14px;
  }

  .admin-nav-heading > span,
  .admin-tabs small,
  .admin-sidebar-note,
  .admin-profile {
    display: none;
  }

  .admin-tabs button {
    min-height: 36px;
    padding-block: 2px;
  }

  .admin-tabs button > span:last-child {
    gap: 0;
  }

}

@media (max-width: 800px) {
  .app-types-actions {
    align-items: stretch;
  }

  .bulk-action-group,
  .queue-action {
    width: 100%;
  }

  .bulk-action-group {
    padding: 0 0 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .bulk-action-group label,
  .bulk-action-group button,
  .queue-action button {
    flex: 1 1 auto;
  }

  .admin-page .section-intro > .toolbar {
    flex-basis: auto;
  }
}

.fraud-user-id,
.fraud-package-list {
  max-width: 260px;
  overflow-wrap: anywhere;
}

.fraud-mark-badge {
  min-height: 24px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 850;
  white-space: nowrap;
}

.fraud-mark-badge.marked {
  background: var(--danger-bg);
  color: var(--danger-strong);
}

.fraud-mark-badge.pending {
  background: var(--warning-bg);
  color: var(--warning);
}

.fraud-screenshot-link {
  min-height: 32px;
  white-space: nowrap;
}

.fraud-screenshot-unavailable {
  color: var(--muted-light);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.fraud-match-modal {
  width: min(1180px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.fraud-match-shell {
  max-height: calc(100vh - 32px);
  padding: 20px;
  display: grid;
  gap: 18px;
  overflow-y: auto;
}

.fraud-match-shell > header,
.fraud-match-shell > footer,
.fraud-match-event > header,
.fraud-match-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.fraud-match-shell h3 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 19px;
  letter-spacing: -0.025em;
}

.fraud-match-shell .modal-description {
  margin: 6px 0 0;
}

.fraud-match-list {
  display: grid;
  gap: 18px;
}

.fraud-match-event {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  display: grid;
  gap: 14px;
  background: var(--panel-soft);
}

.fraud-match-event > header span,
.fraud-match-card > header span {
  color: var(--muted-light);
  font-size: 9px;
  font-weight: 750;
}

.fraud-match-event > header strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.fraud-match-event > header time {
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.fraud-match-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.fraud-match-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 11px;
  background: #fff;
}

.fraud-match-card > header strong {
  color: var(--text-soft);
  font-size: 11px;
}

.fraud-match-image {
  height: min(52vh, 520px);
  min-height: 300px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 11px;
  background: #eef1f5;
}

.fraud-match-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.fraud-match-image-missing {
  color: var(--muted-light);
  font-size: 10px;
  font-weight: 750;
}

.fraud-match-card dl {
  margin: 0;
  display: grid;
  gap: 7px;
}

.fraud-match-card dl > div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 9px;
}

.fraud-match-card dt {
  color: var(--muted-light);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.fraud-match-card dd {
  margin: 0;
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.fraud-match-shell > footer {
  justify-content: flex-end;
}

@media (max-width: 760px) {
  .fraud-match-pair {
    grid-template-columns: 1fr;
  }

  .fraud-match-image {
    height: 58vh;
  }
}

table {
  width: 100%;
  min-width: 600px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 8px;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

td {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 650;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: #fcfcfd;
}

.decision-toggle {
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: inline-flex;
  background: var(--panel-soft);
}

.archive-date-filter {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.archive-toolbar {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.archive-package-search {
  min-width: min(100%, 370px);
  display: flex;
  align-items: center;
  gap: 7px;
}

.archive-package-search input {
  width: min(230px, 42vw);
  min-height: 41px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text-soft);
  box-shadow: var(--shadow-xs);
  font-size: 11px;
  font-weight: 650;
}

.archive-date-filter select {
  min-width: 142px;
  min-height: 41px;
  padding: 0 32px 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 750;
}

.decision-toggle button {
  min-height: 33px;
  padding: 0 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.decision-toggle button.active {
  background: #fff;
  color: var(--accent-strong);
  box-shadow: var(--shadow-xs);
}

.image-explorer-panel {
  min-height: 520px;
}

.image-explorer {
  min-width: 0;
  display: grid;
  gap: 18px;
}

.archive-pagination {
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.archive-pagination strong {
  color: var(--text-soft);
}

.admin-archive-grid {
  grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
}

.admin-image-card {
  position: relative;
  width: 100%;
  padding: 0;
  min-width: 0;
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-soft);
  color: inherit;
  box-shadow: var(--shadow-xs);
  text-decoration: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.admin-image-card:hover {
  border-color: #a5b4fc;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.admin-image-preview {
  position: relative;
  width: 100%;
  min-height: 0;
  padding: 0;
  display: block;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  cursor: zoom-in;
}

.admin-image-preview::after {
  position: absolute;
  right: 9px;
  bottom: 9px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 9px;
  background: rgba(16, 24, 40, 0.72);
  color: #fff;
  content: "⌕";
  font-size: 11px;
  backdrop-filter: blur(8px);
}

.admin-image-overlay-actions {
  position: absolute;
  top: 9px;
  left: 9px;
  right: 9px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease, visibility 150ms ease;
}

.admin-image-card:hover .admin-image-overlay-actions,
.admin-image-card:focus-within .admin-image-overlay-actions {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.archive-overlay-action {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 10px;
  color: #fff;
  box-shadow: 0 5px 14px rgba(16, 24, 40, 0.22);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.archive-overlay-action.delete-action {
  background: rgba(185, 28, 28, 0.9);
}

.archive-overlay-action.approve-action {
  margin-left: auto;
  background: rgba(5, 122, 85, 0.92);
}

.archive-overlay-action:hover:not(:disabled),
.archive-overlay-action:focus-visible {
  transform: scale(1.06);
}

.archive-overlay-action.is-approved,
.archive-overlay-action:disabled {
  cursor: default;
  background: rgba(5, 122, 85, 0.78);
  opacity: 1;
}

.admin-image-card img {
  width: 100%;
  aspect-ratio: 9 / 16;
  display: block;
  background: #e9edf3;
  object-fit: cover;
}

.admin-image-card strong,
.admin-image-card span,
.admin-image-card small {
  display: none;
}

.folder-grid,
.admin-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.folder-card {
  min-height: 94px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  align-items: center;
  gap: 4px 10px;
  background: var(--panel-soft);
  color: inherit;
  box-shadow: var(--shadow-xs);
  text-align: left;
}

.folder-card:hover { border-color: #a5b4fc; }

.folder-icon {
  position: relative;
  grid-row: 1 / span 2;
  width: 34px;
  height: 26px;
  align-self: start;
  margin-top: 4px;
  border-radius: 5px;
  background: #fdb022;
}

.folder-icon::before {
  position: absolute;
  left: 3px;
  top: -6px;
  width: 15px;
  height: 8px;
  border-radius: 4px 4px 0 0;
  background: #f79009;
  content: "";
}

.folder-card strong,
.folder-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-card strong { font-size: 11px; }
.folder-card small { color: var(--muted); font-size: 9px; font-weight: 700; }

.explorer-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.explorer-breadcrumbs button {
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--accent-strong);
  font-size: 9px;
  font-weight: 800;
}

/* Admin modal */

.admin-modal {
  width: min(460px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.admin-modal form {
  margin: 0;
  padding: 20px;
  display: grid;
  gap: 16px;
}

.admin-modal footer {
  justify-content: flex-end;
  margin-top: 4px;
}

.image-detail-modal {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.image-detail-shell {
  max-height: calc(100vh - 32px);
  padding: 20px;
  display: grid;
  gap: 18px;
  overflow-y: auto;
}

.image-detail-shell > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.image-detail-shell h3 {
  max-width: min(760px, 72vw);
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--text);
  font-size: 19px;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-detail-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  gap: 20px;
}

.image-detail-preview {
  min-height: 520px;
  padding: 14px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #eef1f5;
}

.image-detail-preview img {
  width: 100%;
  height: min(68vh, 680px);
  display: block;
  object-fit: contain;
}

.image-detail-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.image-detail-metadata {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.image-detail-row {
  min-width: 0;
  padding: 11px 13px;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.image-detail-row:last-child {
  border-bottom: 0;
}

.image-detail-row dt,
.image-detail-row dd {
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
}

.image-detail-row dt {
  color: var(--muted);
  font-weight: 750;
}

.image-detail-row dd {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text-soft);
  font-weight: 650;
}

.image-detail-ai-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid #d9ddff;
  border-radius: 16px;
  background: var(--accent-soft);
}

.image-detail-ai-panel > header {
  padding: 12px 14px;
  border-bottom: 1px solid #d9ddff;
}

.image-detail-ai-panel h4 {
  margin: 3px 0 0;
  color: var(--accent-strong);
  font-size: 13px;
}

.image-detail-ai-panel pre {
  max-height: 340px;
  margin: 0;
  padding: 14px;
  overflow: auto;
  background: #111827;
  color: #e5e7eb;
  font: 11px/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  tab-size: 2;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.image-detail-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.modal-description {
  margin: -7px 0 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1240px) {
  body {
    grid-template-columns: 280px minmax(0, 1fr);
  }

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

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

@media (max-width: 1020px) {
  .login-view {
    grid-template-columns: 1fr minmax(400px, 0.9fr);
  }

  .login-preview {
    display: none;
  }

  .admin-workspace {
    width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-sidebar {
    position: static;
    width: 100%;
    min-width: 0;
    max-width: 100vw;
    height: auto;
    padding: 14px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    display: block;
    overflow: visible;
    overscroll-behavior: auto;
    scrollbar-gutter: auto;
  }

  .admin-nav-heading,
  .admin-sidebar-note,
  .admin-profile {
    display: none;
  }

  .admin-tabs {
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    overflow-x: auto;
  }

  .admin-tabs button {
    min-width: 160px;
  }

  .admin-content {
    width: 100%;
    min-width: 0;
    padding-top: 22px;
  }
}

@media (max-width: 800px) {
  body {
    display: block;
  }

  .login-view {
    display: grid;
    grid-template-columns: 1fr;
    overflow-y: auto;
  }

  .login-showcase {
    display: none;
  }

  .login-panel {
    min-height: 100vh;
    align-content: center;
    padding: 42px 0;
  }

  .mobile-brand-mark {
    display: grid;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    min-height: auto;
    padding: 18px;
    overflow: visible;
  }

  .product-list {
    grid-auto-flow: column;
    grid-auto-columns: 232px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 6px;
  }

  .sidebar-footer {
    display: none;
  }

  .main {
    padding: 22px 18px 40px;
  }

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

  .toolbar {
    width: 100%;
    justify-content: flex-start;
  }

  .content-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .image-detail-layout {
    grid-template-columns: 1fr;
  }

  .image-detail-preview {
    min-height: 360px;
  }

  .image-detail-preview img {
    height: min(58vh, 560px);
  }

  #dialogImage {
    height: min(64vh, 620px);
  }

  .review-dialog {
    width: calc(100vw - 18px);
    max-height: calc(100vh - 18px);
  }

  .review-dialog form {
    max-height: calc(100vh - 18px);
  }

  .admin-topbar {
    padding: 14px 18px;
    align-items: stretch;
  }

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

  .admin-content {
    padding: 18px;
  }

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

  .section-intro {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  .image-detail-modal {
    width: calc(100vw - 18px);
    max-height: calc(100vh - 18px);
  }

  .image-detail-shell {
    max-height: calc(100vh - 18px);
    padding: 14px;
  }

  .image-detail-shell h3 {
    max-width: calc(100vw - 110px);
  }

  .image-detail-preview {
    min-height: 300px;
    padding: 8px;
  }

  .image-detail-row {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 10px;
  }

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

  #runImageAiReviewButton {
    grid-column: 1 / -1;
  }

  #deleteApprovedImageButton {
    grid-column: 1 / -1;
  }

  .archive-package-search {
    width: 100%;
    min-width: 0;
  }

  .archive-package-search input {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
  }

  .package-group-header {
    align-items: flex-start;
  }

  .package-group-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .package-skip-button,
  .package-mandate-button {
    min-height: 34px;
  }

  .package-mandate-actions {
    display: flex;
    flex-direction: column;
  }

  .login-panel {
    width: calc(100% - 36px);
  }

  .sidebar-head {
    align-items: flex-start;
  }

  .live-badge {
    margin-top: 8px;
  }

  .main {
    padding-inline: 14px;
  }

  .toolbar .icon-button,
  .toolbar .country-filter {
    flex: 1 1 calc(50% - 8px);
    max-width: none;
  }

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

  .stat-card {
    min-height: 130px;
  }

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

  .package-count {
    min-width: 58px;
  }

  .package-count {
    font-size: 0;
  }

  .package-count strong {
    font-size: 13px;
  }

  .review-dialog form {
    padding: 14px;
  }

  .review-image-stage {
    padding: 8px;
  }

  .review-dialog footer {
    align-items: stretch;
    flex-direction: column;
  }

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

  .decision-actions button {
    padding: 0 9px;
    font-size: 10px;
  }

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

  .installed-app-qr {
    display: none;
  }

  .admin-topbar .toolbar {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    grid-template-columns: repeat(4, 150px);
  }

  .admin-content {
    padding-inline: 12px;
  }

  .dashboard-hero,
  .section-intro {
    padding: 17px;
  }

  .dashboard-hero {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .admin-panel {
    padding: 14px;
  }

  .admin-panel > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .data-row {
    grid-template-columns: 40px minmax(0, 1fr) auto;
  }

  .role-badge {
    display: none;
  }

  .danger-quiet {
    padding: 0 10px;
  }

  .member-actions {
    gap: 6px;
  }

  .member-actions .icon-button,
  .member-actions .danger {
    padding: 0 10px;
  }

  .flappy-toggle {
    right: 14px;
    bottom: 14px;
  }

  .flappy-panel {
    right: 14px;
    bottom: 74px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
