@import "./tokens.css";

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(203, 135, 91, 0.2), transparent 24rem),
    radial-gradient(circle at 88% 6%, rgba(47, 127, 112, 0.14), transparent 18rem),
    linear-gradient(180deg, #fcf7f0 0%, var(--bg) 55%, #f2ebdf 100%);
  color: var(--ink);
  font-family: var(--font-sans);
}

body {
  padding: 0;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
}

body::before {
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.66), transparent 20rem),
    radial-gradient(circle at 86% 18%, rgba(223, 239, 232, 0.5), transparent 18rem),
    radial-gradient(circle at 50% 120%, rgba(244, 226, 212, 0.52), transparent 24rem);
}

body::after {
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(135, 118, 96, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(135, 118, 96, 0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.3), transparent 46%);
}

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

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

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

.app-shell {
  position: relative;
  width: 100%;
  max-width: 460px;
  min-height: 100vh;
  margin: 0 auto;
  padding:
    max(18px, calc(env(safe-area-inset-top) + var(--host-safe-area-top, 0px)))
    16px
    calc(32px + env(safe-area-inset-bottom) + var(--host-safe-area-bottom, 0px));
  overflow-x: hidden;
}

.hero-card,
.section-card,
.summary-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.96) 0%, rgba(255, 249, 242, 0.92) 100%);
  border: 1px solid rgba(217, 206, 187, 0.74);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.hero-card::before,
.section-card::before,
.summary-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, rgba(47, 127, 112, 0.08), rgba(203, 135, 91, 0.16), rgba(47, 127, 112, 0.08));
}

.hero-card::after,
.section-card::after,
.summary-card::after {
  content: "";
  position: absolute;
  right: -46px;
  top: -46px;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(244, 226, 212, 0.72) 0%, rgba(244, 226, 212, 0) 72%);
  pointer-events: none;
}

.hero-card {
  padding: 24px 22px 22px;
}

.section-card,
.summary-card {
  padding: 18px;
  margin-top: 16px;
}

.section-card--compact {
  padding: 16px;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.page-title {
  margin: 8px 0 10px;
  font-size: 29px;
  line-height: 1.12;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.body-copy,
.supporting-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
  overflow-wrap: anywhere;
}

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

.stat-tile {
  padding: 14px 14px 13px;
  background: linear-gradient(180deg, rgba(255, 251, 246, 0.98) 0%, rgba(248, 241, 231, 0.96) 100%);
  border: 1px solid rgba(223, 209, 190, 0.9);
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.stat-tile.warm {
  background: linear-gradient(180deg, #fff8f2 0%, #f7ecdf 100%);
}

.stat-tile.cool {
  background: linear-gradient(180deg, #f3fbf8 0%, #eaf5f1 100%);
}

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.stat-value {
  display: block;
  margin-top: 6px;
  font-size: 22px;
  font-weight: 700;
}

.section-title {
  margin: 0 0 12px;
  font-size: 18px;
  overflow-wrap: anywhere;
}

.mini-list {
  display: grid;
  gap: 10px;
}

.mini-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.mini-item strong {
  display: block;
  margin-bottom: 4px;
}

.mini-meta {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--brand-soft);
  color: var(--brand);
  max-width: 100%;
  text-align: center;
  line-height: 1.35;
  white-space: normal;
}

.pill.warning {
  background: rgba(211, 139, 28, 0.12);
  color: var(--warning);
}

.pill.soft {
  background: var(--rose-soft);
  color: #9c6240;
}

.pill.accent {
  background: rgba(201, 111, 59, 0.12);
  color: var(--accent);
}

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

.timeline-item {
  position: relative;
  padding: 0 0 0 18px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
}

.timeline-item::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 22px;
  width: 1px;
  height: calc(100% + 10px);
  background: var(--line);
}

.timeline-item:last-child::after {
  display: none;
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(217, 206, 187, 0.7);
}

.file-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.vault-sections-head {
  margin-top: 12px;
}

.vault-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.vault-tab {
  display: grid;
  gap: 4px;
  align-items: center;
  justify-items: center;
  min-height: 72px;
  padding: 12px 10px;
  border-radius: 18px;
  border: 1px solid rgba(217, 206, 187, 0.9);
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font: inherit;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(57, 45, 25, 0.05);
  text-align: center;
}

.vault-tab span {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}

.vault-tab strong {
  font-size: 18px;
  line-height: 1;
  color: var(--ink);
}

.vault-tab.active {
  border-color: rgba(47, 127, 112, 0.34);
  background: linear-gradient(180deg, rgba(47, 127, 112, 0.14) 0%, rgba(47, 127, 112, 0.08) 100%);
  color: var(--brand-strong);
}

.vault-tab.active strong {
  color: var(--brand-strong);
}

.vault-tab-note {
  margin-top: 12px;
}

.page-nav-shell {
  position: sticky;
  top: max(10px, calc(env(safe-area-inset-top, 0px) + var(--host-safe-area-top, 0px) + 8px));
  z-index: 25;
  margin: 0 0 14px;
}

.page-nav-bar {
  display: block;
  padding: 8px 10px;
  background: rgba(255, 252, 247, 0.82);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(217, 206, 187, 0.78);
  border-radius: 26px;
  box-shadow: 0 14px 36px rgba(57, 45, 25, 0.09);
}

.page-nav {
  display: flex;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
  scroll-snap-type: x proximity;
}

.page-utility-strip {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 18px;
}

.page-utility-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(217, 206, 187, 0.84);
  background: rgba(255, 255, 255, 0.9);
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 18px rgba(57, 45, 25, 0.05);
}

.page-utility-link:hover {
  background: rgba(255, 255, 255, 0.9);
}

.page-nav::-webkit-scrollbar {
  display: none;
}

.page-nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 72px;
  width: auto;
  min-height: 46px;
  padding: 12px 8px;
  border-radius: 17px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: normal;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.6);
  transition: background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
  scroll-snap-align: start;
}

.page-nav-link.active {
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-strong) 100%);
  color: #fff;
  box-shadow: 0 10px 18px rgba(47, 127, 112, 0.22);
}

.page-nav-link:hover {
  transform: translateY(-1px);
}

.language-panel {
  display: grid;
  gap: 10px;
}

.language-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.language-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(217, 206, 187, 0.88);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(57, 45, 25, 0.05);
}

.language-chip.active {
  border-color: rgba(47, 127, 112, 0.34);
  background: linear-gradient(180deg, rgba(47, 127, 112, 0.12) 0%, rgba(47, 127, 112, 0.07) 100%);
  color: var(--brand-strong);
}

.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.primary-button {
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-strong) 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(47, 127, 112, 0.22);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(57, 45, 25, 0.06);
}

.ghost-button {
  background: transparent;
  color: var(--brand);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.file-trigger:hover,
.mini-action-button:hover,
.admin-filter:hover {
  transform: translateY(-1px);
}

.inline-button {
  margin-top: 14px;
}

.actions-row .inline-button {
  margin-top: 0;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.upload-dropzone {
  margin-top: 16px;
  padding: 18px;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78) 0%, rgba(250, 242, 234, 0.88) 100%);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.upload-dropzone.is-dragging {
  border-color: rgba(63, 138, 120, 0.55);
  background: linear-gradient(180deg, rgba(241, 250, 246, 0.94) 0%, rgba(252, 246, 239, 0.92) 100%);
  transform: translateY(-1px);
}

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

.file-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.file-trigger--primary {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 241, 233, 0.96) 100%);
  box-shadow: 0 10px 24px rgba(76, 57, 28, 0.08);
}

.file-trigger-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.file-trigger-row--stacked {
  align-items: flex-start;
}

.file-trigger-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.form-grid,
.meta-grid {
  display: grid;
  gap: 12px;
}

.field-label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
}

.text-input,
.select-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  font: inherit;
  color: var(--ink);
}

.helper-copy {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.helper-copy.error {
  color: #a5483a;
}

.helper-copy.success {
  color: var(--success);
}

.list-stack {
  display: grid;
  gap: 12px;
}

.review-card,
.upload-file-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: 0 10px 24px rgba(76, 57, 28, 0.04);
}

.checkbox-row {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  color: var(--muted);
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.split-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.split-header--tight {
  margin-bottom: 12px;
}

.split-header > *,
.section-headline > *,
.mini-item > *,
.file-row > *,
.package-topline > *,
.timeline-topline > *,
.export-header > *,
.share-report-header > *,
.task-meta-line > *,
.trust-header > * {
  min-width: 0;
}

.soft-hero-copy {
  max-width: 28rem;
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.55);
}

.stat-note {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

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

.country-tile {
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--surface-strong);
}

.link-tile {
  display: block;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.soft-section-note {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--rose-soft) 0%, #fff4ef 100%);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.index-hero {
  display: grid;
  gap: 18px;
}

.index-hero .split-header > :first-child {
  width: 100%;
  max-width: 100%;
}

.app-shell--login {
  max-width: 1160px;
}

.login-hero-card {
  min-height: calc(100vh - 80px);
  display: grid;
  align-items: center;
}

.login-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 430px);
  gap: 24px;
  align-items: stretch;
}

.login-copy-stack,
.login-panel-card,
.login-feature-card,
.login-session-card {
  min-width: 0;
}

.login-copy-stack {
  display: grid;
  gap: 18px;
  align-content: start;
}

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

.login-feature-card {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(217, 206, 187, 0.82);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 12px 28px rgba(76, 57, 28, 0.06);
}

.login-feature-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
}

.login-feature-card .supporting-copy {
  margin: 0;
  font-size: 13px;
}

.login-panel-card {
  display: grid;
  gap: 16px;
  align-content: start;
  align-self: center;
  box-shadow: var(--shadow-float);
}

.login-session-card {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(217, 206, 187, 0.82);
  background: linear-gradient(180deg, rgba(248, 242, 233, 0.86) 0%, rgba(255, 255, 255, 0.9) 100%);
}

.login-session-card .supporting-copy {
  margin-top: 8px;
}

.welcome-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 4px;
}

.welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(223, 209, 190, 0.84);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  max-width: 100%;
  white-space: normal;
}

.hero-soft-panel {
  position: relative;
}

.hero-soft-panel::after {
  content: "";
  position: absolute;
  right: -32px;
  top: -36px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(248, 228, 220, 0.85) 0%, rgba(248, 228, 220, 0) 72%);
  pointer-events: none;
}

.score-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(252, 247, 240, 0.96) 0%, rgba(246, 239, 229, 0.96) 100%);
  border: 1px solid rgba(223, 209, 190, 0.8);
  box-shadow: 0 14px 28px rgba(57, 45, 25, 0.12);
}

.score-ring-cluster {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.score-ring::after {
  content: "";
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fffdf8 0%, #f7f1e8 100%);
  box-shadow: inset 0 0 0 1px rgba(47, 127, 112, 0.08);
}

.score-ring-svg {
  position: absolute;
  inset: 0;
  transform: rotate(-90deg);
  z-index: 1;
}

.score-ring-track,
.score-ring-progress {
  fill: none;
  stroke-width: 10;
}

.score-ring-track {
  stroke: rgba(63, 138, 120, 0.12);
}

.score-ring-progress {
  stroke: var(--brand);
  stroke-linecap: round;
  stroke-dasharray: 351.86;
  stroke-dashoffset: 351.86;
}

.score-ring-value {
  position: relative;
  z-index: 2;
  display: grid;
  text-align: center;
}

.score-ring-value strong {
  font-size: 34px;
  line-height: 1;
}

.score-ring-value span {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.score-ring-footnote {
  max-width: 172px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.encourage-card {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(223, 239, 232, 0.96) 0%, rgba(238, 248, 244, 0.96) 100%);
  border: 1px solid rgba(47, 127, 112, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.encourage-card strong {
  display: block;
  margin-bottom: 6px;
}

.hero-guidance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hero-guidance-card {
  display: grid;
  gap: 6px;
  padding: 14px 15px;
  border-radius: 18px;
  border: 1px solid rgba(223, 209, 190, 0.82);
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.96) 0%, rgba(248, 242, 233, 0.94) 100%);
  box-shadow: 0 12px 24px rgba(76, 57, 28, 0.05);
}

.hero-guidance-card--accent {
  background: linear-gradient(180deg, rgba(238, 248, 244, 0.98) 0%, rgba(247, 252, 249, 0.96) 100%);
  border-color: rgba(63, 138, 120, 0.18);
}

.hero-guidance-label {
  font-size: 12px;
  color: var(--muted);
}

.hero-guidance-value {
  font-size: 18px;
  line-height: 1.25;
}

.index-layout {
  display: grid;
  gap: 16px;
}

.radar-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    radial-gradient(circle at top right, rgba(47, 127, 112, 0.12), transparent 42%),
    radial-gradient(circle at bottom left, rgba(203, 135, 91, 0.1), transparent 34%),
    linear-gradient(180deg, #fffdf9 0%, #f7f1e8 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.radar-wrap {
  max-width: 320px;
  margin: 0 auto;
  padding: 2px 0 4px;
}

.radar-svg {
  width: 100%;
  height: auto;
  display: block;
}

.radar-caption {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.radar-caption span {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(223, 209, 190, 0.78);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

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

.dimension-grid > :last-child {
  grid-column: 1 / -1;
}

.dimension-card {
  position: relative;
  padding: 15px 14px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(223, 209, 190, 0.9);
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.98) 0%, rgba(248, 242, 233, 0.98) 100%);
  box-shadow: 0 12px 24px rgba(76, 57, 28, 0.05);
  display: grid;
  gap: 9px;
}

.dimension-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, rgba(47, 127, 112, 0.72), rgba(203, 135, 91, 0.72));
  opacity: 0.72;
}

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

.dimension-label {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.dimension-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.dimension-scoreline {
  display: flex;
  align-items: baseline;
  gap: 6px;
  justify-self: end;
  flex-shrink: 0;
}

.dimension-score {
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}

.dimension-out-of {
  color: var(--muted);
  font-size: 13px;
}

.dimension-stat {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.dimension-bar {
  height: 8px;
  margin: 0;
  border-radius: 999px;
  background: rgba(14, 122, 100, 0.12);
  overflow: hidden;
}

.dimension-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #41a792);
}

.dimension-card--community {
  background: linear-gradient(180deg, rgba(246, 250, 248, 0.94) 0%, rgba(255, 255, 255, 1) 100%);
}

.dimension-card--verification .dimension-bar span {
  background: linear-gradient(90deg, #0e7a64, #2a9d85);
}

.dimension-card--organization .dimension-bar span {
  background: linear-gradient(90deg, #286c60, #4ca08f);
}

.dimension-card--compliance .dimension-bar span {
  background: linear-gradient(90deg, #9a6d3a, #d09657);
}

.dimension-card--continuity .dimension-bar span {
  background: linear-gradient(90deg, #678e76, #89ad97);
}

.micro-copy {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.dimension-note {
  margin: 0;
}

.section-headline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.gentle-kicker {
  font-size: 13px;
  color: var(--muted);
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(223, 209, 190, 0.72);
}

.process-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.process-chip {
  flex: 1 1 0;
  padding: 11px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(223, 209, 190, 0.88);
  font-size: 12px;
  color: var(--ink-soft);
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.process-chip.is-active {
  background: linear-gradient(180deg, rgba(223, 239, 232, 0.9) 0%, rgba(239, 247, 243, 0.92) 100%);
  border-color: rgba(47, 127, 112, 0.22);
  color: var(--brand);
}

.process-arrow {
  color: rgba(102, 97, 84, 0.45);
  font-size: 14px;
  flex: 0 0 auto;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(223, 239, 232, 0.86);
  color: var(--brand-strong);
  font-size: 12px;
  border: 1px solid rgba(47, 127, 112, 0.12);
}

.status-chip.soft {
  background: var(--rose-soft);
  color: #9c6240;
}

.package-preview-card,
.share-card,
.share-entry-card {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid rgba(223, 209, 190, 0.9);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.98) 0%, rgba(248, 242, 233, 0.98) 100%);
  box-shadow: 0 16px 36px rgba(76, 57, 28, 0.08);
}

.package-preview-grid {
  display: grid;
  gap: 16px;
}

.package-preview-main,
.qr-panel {
  display: grid;
  gap: 10px;
}

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

.package-actions,
.mini-actions,
.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.mini-action-button {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.qr-panel {
  justify-items: center;
  padding: 16px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(245, 250, 247, 0.92) 0%, rgba(255, 247, 242, 0.82) 100%);
}

.qr-placeholder {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 240px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px dashed rgba(217, 206, 187, 0.9);
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.96) 0%, rgba(248, 243, 235, 0.88) 100%);
  text-align: center;
}

.loading-stack {
  display: grid;
  gap: 10px;
}

.loading-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.86);
}

.loading-line {
  height: 10px;
  width: 100%;
  margin-top: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(226, 220, 210, 0.8), rgba(246, 243, 236, 1), rgba(226, 220, 210, 0.8));
  background-size: 220% 100%;
  animation: shimmer 1.4s linear infinite;
}

.loading-line:first-child {
  margin-top: 0;
}

.loading-line--lg {
  width: 72%;
  height: 14px;
}

.loading-line--sm {
  width: 46%;
}

.flow-choice-card {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(245, 250, 247, 0.92) 0%, rgba(255, 247, 242, 0.82) 100%);
}

.flow-choice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.confirm-note {
  margin-top: 12px;
}

.qr-image {
  width: 210px;
  height: 210px;
  max-width: 100%;
  border-radius: 20px;
  background: #fff;
  padding: 12px;
  border: 1px solid rgba(217, 206, 187, 0.7);
}

.share-shell {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 18px 40px;
}

.share-entry-card {
  max-width: 520px;
  margin: 10vh auto 0;
}

.share-report {
  display: grid;
  gap: 14px;
}

.share-report-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 6px 0 2px;
}

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

.share-metric {
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--surface-strong);
}

.share-metric strong {
  display: block;
  margin-top: 6px;
  line-height: 1.45;
}

.share-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.share-document-list {
  display: grid;
  gap: 10px;
}

.share-document-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #fffdfa;
}

.share-disclaimer {
  background: linear-gradient(180deg, rgba(255, 248, 241, 0.9) 0%, rgba(255, 255, 255, 0.98) 100%);
}

@media (min-width: 720px) {
  .package-preview-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(220px, 0.9fr);
    align-items: center;
  }
}

@media print {
  body {
    background: #fff;
  }

  .share-shell {
    width: 100%;
    padding: 0;
  }

  .share-report-header .share-actions,
  .share-entry-card {
    display: none !important;
  }

  .share-card {
    box-shadow: none;
    border-color: #ddd;
    break-inside: avoid;
  }
}

.review-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.review-quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.review-meta-card {
  padding: 12px;
  border-radius: 14px;
  background: linear-gradient(180deg, #fffaf5 0%, #f8f0e6 100%);
  border: 1px solid rgba(223, 209, 190, 0.72);
}

.review-meta-card strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--muted);
}

.review-meta-card span {
  font-size: 14px;
  color: var(--ink);
}

.trust-card {
  margin-top: 14px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f5fbf8 0%, #edf6f2 100%);
  border: 1px solid rgba(47, 127, 112, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.trust-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.trust-score {
  font-size: 28px;
  font-weight: 700;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.trust-grid .review-meta-card {
  background: rgba(255, 255, 255, 0.82);
}

.warning-list {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-status-row {
  margin-top: 12px;
}

.review-editor {
  margin-top: 14px;
  border: 1px solid rgba(223, 209, 190, 0.82);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  overflow: hidden;
}

.review-editor summary {
  padding: 13px 14px;
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
}

.review-editor summary::-webkit-details-marker {
  display: none;
}

.review-editor[open] summary {
  border-bottom: 1px solid rgba(223, 209, 190, 0.72);
}

.review-editor-body {
  padding: 14px;
}

.trust-card--compact {
  margin-top: 0;
}

.actions-row--dense {
  margin-top: 14px;
}

.privacy-card {
  margin-top: 14px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, #fff8f1 0%, #fdf1e5 100%);
  border: 1px solid rgba(203, 135, 91, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.privacy-card strong {
  display: block;
  margin-bottom: 6px;
}

.privacy-list {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.consent-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(45, 42, 38, 0.34);
  z-index: 20;
  animation: modalFadeIn 180ms ease-out;
}

.consent-modal[hidden] {
  display: none;
}

.consent-panel {
  width: min(100%, 420px);
  max-height: min(86vh, 780px);
  padding: 0;
  border-radius: 24px;
  background: #fffdfa;
  border: 1px solid rgba(221, 208, 192, 0.9);
  box-shadow: 0 20px 40px rgba(57, 45, 25, 0.18);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  animation: modalRiseIn 220ms ease-out;
}

.detail-panel {
  width: min(100%, 720px);
}

.modal-header,
.modal-footer {
  background: #fffdfa;
  padding: 18px 20px;
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid rgba(221, 208, 192, 0.9);
}

.modal-body {
  overflow: auto;
  padding: 18px 20px;
}

.modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  border-top: 1px solid rgba(221, 208, 192, 0.9);
}

.detail-layout {
  display: grid;
  gap: 16px;
}

.detail-preview {
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f8f2e9 0%, #f4ece2 100%);
  border: 1px solid rgba(223, 209, 190, 0.9);
}

.detail-preview img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 14px;
  background: #fff;
}

.document-frame {
  display: block;
  width: 100%;
  min-height: 360px;
  border: 0;
  border-radius: 14px;
  background: #fff;
}

.detail-fallback {
  display: grid;
  place-items: center;
  min-height: 180px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  background: #fff;
  border-radius: 14px;
}

.detail-fields {
  display: grid;
  gap: 10px;
}

.task-list {
  display: grid;
  gap: 12px;
}

.task-card {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.98) 0%, rgba(248, 242, 233, 0.98) 100%);
  box-shadow: 0 12px 28px rgba(76, 57, 28, 0.05);
}

.task-card.processing {
  background: linear-gradient(180deg, #f7fbf9 0%, #eef7f3 100%);
}

.task-card.success {
  background: linear-gradient(180deg, #f8fcfb 0%, #f0f8f4 100%);
}

.task-card.warning {
  background: linear-gradient(180deg, #fff9f4 0%, #fdf0e5 100%);
}

.task-meta-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.fine-print {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.progress-marquee {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, #f3faf7 0%, #edf7f2 100%);
  border: 1px solid rgba(63, 138, 120, 0.14);
}

.progress-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 rgba(63, 138, 120, 0.3);
  animation: pulse-dot 1.4s infinite;
}

.progress-track {
  margin-top: 10px;
  height: 8px;
  border-radius: 999px;
  background: rgba(63, 138, 120, 0.12);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 20%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #76b2a5);
  transition: width 240ms ease;
}

@keyframes pulse-dot {
  0% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(63, 138, 120, 0.3);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(63, 138, 120, 0);
  }
  100% {
    transform: scale(0.9);
    box-shadow: 0 0 0 0 rgba(63, 138, 120, 0);
  }
}

.export-sheet {
  background: #fff;
  color: #111;
  border-radius: 20px;
  padding: 22px 20px;
  border: 1px solid #ded7c8;
  box-shadow: var(--shadow-soft);
}

.export-sheet .soft-section-note {
  margin-top: 16px;
}

.admin-shell {
  width: 100%;
  max-width: 1240px;
  min-height: 100vh;
  margin: 0 auto;
  padding:
    calc(24px + env(safe-area-inset-top, 0px) + var(--host-safe-area-top, 0px))
    20px
    calc(40px + env(safe-area-inset-bottom, 0px) + var(--host-safe-area-bottom, 0px));
  overflow-x: hidden;
}

.admin-hero-card {
  padding: 24px;
  box-shadow: var(--shadow-float);
}

.admin-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.admin-auth-card {
  max-width: 560px;
  margin: 0 auto;
}

.mfa-qr-shell {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.mfa-qr-card {
  display: grid;
  place-items: center;
  padding: 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(245, 250, 247, 0.98) 0%, rgba(255, 248, 241, 0.94) 100%);
  border: 1px solid rgba(217, 206, 187, 0.82);
}

.mfa-qr-card svg {
  width: min(280px, 100%);
  height: auto;
}

.backup-secret-value {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(63, 138, 120, 0.28);
  background: rgba(255, 255, 255, 0.82);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 14px;
  letter-spacing: 0.08em;
  word-break: break-word;
}

.admin-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.admin-metric-card {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(217, 206, 187, 0.82);
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.96) 0%, rgba(248, 242, 233, 0.94) 100%);
  box-shadow: 0 12px 26px rgba(76, 57, 28, 0.05);
}

.admin-main-grid {
  display: grid;
  grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.admin-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.admin-mobile-nav {
  display: none;
  gap: 10px;
  margin-top: 16px;
}

.admin-filter {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.admin-filter.active {
  background: var(--brand);
  color: #fff;
  border-color: transparent;
}

.admin-filter-count {
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  background: rgba(47, 127, 112, 0.1);
  color: var(--brand);
}

.admin-filter.active .admin-filter-count {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.admin-queue-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.admin-queue-item {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.98) 0%, rgba(248, 242, 233, 0.98) 100%);
  box-shadow: 0 12px 26px rgba(76, 57, 28, 0.05);
}

.admin-queue-item.active {
  border-color: rgba(63, 138, 120, 0.4);
  box-shadow: 0 16px 32px rgba(63, 138, 120, 0.14);
}

.admin-queue-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.admin-workbench-card {
  min-height: 560px;
  box-shadow: var(--shadow-float);
}

.admin-detail-stack {
  display: grid;
  gap: 16px;
  margin-top: 14px;
}

.admin-review-toolbar {
  position: sticky;
  top: calc(12px + env(safe-area-inset-top, 0px));
  z-index: 3;
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(217, 206, 187, 0.82);
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.98) 0%, rgba(248, 242, 233, 0.96) 100%);
  box-shadow: 0 16px 28px rgba(76, 57, 28, 0.08);
}

.admin-review-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.admin-review-section {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(217, 206, 187, 0.82);
  background: rgba(255, 255, 255, 0.82);
}

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

.admin-form-span {
  grid-column: 1 / -1;
}

.admin-preview {
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.98) 0%, rgba(248, 242, 233, 0.96) 100%);
}

.admin-preview img {
  display: block;
  width: 100%;
  height: auto;
}

.admin-preview .document-frame {
  min-height: 420px;
}

.admin-preview--placeholder {
  display: grid;
  place-items: center;
  padding: 18px;
  background: linear-gradient(180deg, #fffdfa 0%, #f6efe6 100%);
}

.admin-history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-history-stack {
  display: grid;
  gap: 12px;
}

.admin-history-details {
  border-radius: 18px;
  border: 1px solid rgba(217, 206, 187, 0.82);
  background: rgba(255, 255, 255, 0.88);
  overflow: hidden;
}

.admin-history-details summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}

.admin-history-details summary::-webkit-details-marker {
  display: none;
}

.admin-history-details[open] summary {
  border-bottom: 1px solid rgba(217, 206, 187, 0.82);
}

.admin-history-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(63, 138, 120, 0.1);
  color: var(--brand);
  font-size: 12px;
}

.backup-code-panel {
  margin-top: 14px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(217, 206, 187, 0.82);
}

.backup-code-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.backup-code-pill {
  justify-content: center;
  min-height: 40px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.06em;
}

.admin-textarea {
  min-height: 96px;
  resize: vertical;
}

.admin-shell--platform {
  max-width: 1380px;
}

.admin-shell--monitor {
  max-width: 1480px;
}

.admin-platform-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: calc(20px + env(safe-area-inset-top, 0px));
  padding: 14px;
}

.admin-tab-nav {
  display: grid;
  gap: 8px;
}

.admin-rail-button {
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(217, 206, 187, 0.82);
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.96) 0%, rgba(248, 242, 233, 0.94) 100%);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.admin-rail-button:hover,
.admin-rail-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(63, 138, 120, 0.34);
  box-shadow: 0 12px 26px rgba(63, 138, 120, 0.08);
}

.admin-rail-button.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand) 0%, #2f7568 100%);
  box-shadow: 0 18px 30px rgba(45, 109, 97, 0.22);
}

.admin-stage-shell {
  display: grid;
  gap: 16px;
}

.admin-stage-header,
.admin-stage-content,
.admin-panel {
  box-shadow: var(--shadow-float);
}

.admin-stage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.admin-stage-header .split-header {
  flex-wrap: nowrap;
  align-items: flex-start;
}

.admin-stage-header .split-header > :first-child {
  flex: 1 1 auto;
  max-width: 56rem;
}

.admin-stage-header .split-header > :last-child {
  flex: 0 0 auto;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.admin-kpi-grid--monitor {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-metric-card--feature {
  background: linear-gradient(180deg, rgba(240, 249, 246, 0.98) 0%, rgba(255, 249, 243, 0.96) 100%);
  border-color: rgba(63, 138, 120, 0.2);
}

.admin-panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.admin-panel-grid--wide {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
}

.admin-inline-field {
  min-width: 280px;
}

.admin-user-toolbar {
  display: grid;
  gap: 14px;
}

.admin-user-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.admin-user-result {
  color: var(--muted);
  font-size: 13px;
}

.admin-resource-list {
  display: grid;
  gap: 12px;
}

.admin-resource-row {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(217, 206, 187, 0.82);
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.98) 0%, rgba(248, 242, 233, 0.96) 100%);
}

.admin-row-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-review-layout {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 16px;
}

.admin-bar-list {
  display: grid;
  gap: 12px;
}

.admin-bar-item {
  display: grid;
  gap: 8px;
}

.admin-bar-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(63, 138, 120, 0.12);
  overflow: hidden;
}

.admin-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #79b6a9);
}

.admin-activity-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  min-height: 180px;
}

.admin-activity-day {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.admin-activity-bars {
  width: 100%;
  min-height: 130px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
}

.admin-activity-bar {
  width: 100%;
  border-radius: 999px 999px 6px 6px;
  background: rgba(217, 206, 187, 0.82);
}

.admin-activity-bar--upload {
  background: linear-gradient(180deg, #76b2a5 0%, var(--brand) 100%);
}

.admin-activity-bar--confirm {
  background: linear-gradient(180deg, #e3b16e 0%, #cb875b 100%);
}

.admin-activity-bar--export {
  background: linear-gradient(180deg, #90aacb 0%, #5d7aa6 100%);
}

.admin-storage-meter {
  display: grid;
  gap: 10px;
}

.admin-monitor-wall {
  display: grid;
  gap: 16px;
}

.admin-monitor-wall--fullscreen .admin-kpi-grid--monitor .admin-metric-card {
  min-height: 180px;
  display: grid;
  align-content: center;
}

.monitor-last-updated {
  margin-top: 6px;
  text-align: right;
}

.export-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 0;
}

.export-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.export-generate-card {
  margin-top: 14px;
}

.direct-export-card {
  margin-top: 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(217, 206, 187, 0.9);
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.98) 0%, rgba(246, 240, 230, 0.94) 100%);
  box-shadow: 0 12px 28px rgba(76, 57, 28, 0.05);
}

.export-overview-card {
  margin-top: 14px;
}

.export-history-section {
  margin-bottom: 10px;
}

.export-block {
  padding: 14px 12px;
  border: 1px solid #ded7c8;
  border-radius: 14px;
  background: #fcfaf5;
  display: grid;
  gap: 4px;
}

.export-block strong {
  font-size: 18px;
  line-height: 1.15;
}

.export-block span {
  font-size: 12px;
  color: var(--muted);
}

.export-block .mini-meta {
  font-size: 12px;
}

.timeline-guide,
.purpose-grid,
.detail-history {
  display: grid;
  gap: 10px;
}

.guide-chip,
.purpose-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #fff;
}

.guide-chip span,
.purpose-card span,
.timeline-detail {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.purpose-card {
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.purpose-card.active {
  border-color: rgba(63, 138, 120, 0.32);
  background: linear-gradient(180deg, #f4fbf8 0%, #eef8f4 100%);
  box-shadow: 0 10px 20px rgba(63, 138, 120, 0.08);
}

.history-disclosure {
  margin-top: 10px;
}

.history-summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(217, 206, 187, 0.9);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  list-style: none;
}

.history-summary::-webkit-details-marker {
  display: none;
}

.timeline-item.rich {
  padding: 16px 0 0 22px;
}

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

.timeline-summary {
  margin-top: 6px;
}

.timeline-detail {
  margin-top: 8px;
}

.export-choice {
  cursor: pointer;
}

.auto-include-card {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(217, 206, 187, 0.88);
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.98) 0%, rgba(246, 240, 230, 0.96) 100%);
  box-shadow: 0 12px 28px rgba(76, 57, 28, 0.05);
}

.auto-include-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.auto-include-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.auto-include-item {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(223, 209, 190, 0.92);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 22px rgba(76, 57, 28, 0.04);
}

.history-item {
  align-items: flex-start;
}

.file-row-actions {
  align-items: center;
  justify-content: flex-end;
}

.secondary-button.small {
  padding: 9px 12px;
  font-size: 13px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -20% 0;
  }
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalRiseIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 768px) {
  .admin-platform-layout,
  .admin-main-grid,
  .admin-history-grid,
  .admin-form-grid {
    grid-template-columns: 1fr;
  }

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

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

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

  .admin-sidebar {
    position: static;
    padding: 10px;
  }

  .admin-tab-nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(140px, 1fr);
    overflow-x: auto;
    padding-bottom: 6px;
  }

  .admin-review-layout,
  .admin-panel-grid--wide {
    grid-template-columns: 1fr;
  }

  .admin-activity-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .admin-mobile-nav {
    display: flex;
    flex-wrap: wrap;
  }

  #admin-body[data-mobile-section="queue"] .admin-workbench-card,
  #admin-body[data-mobile-section="queue"] .admin-monitor-stack,
  #admin-body[data-mobile-section="workbench"] .admin-queue-card,
  #admin-body[data-mobile-section="workbench"] .admin-monitor-stack,
  #admin-body[data-mobile-section="monitor"] .admin-main-grid {
    display: none;
  }

  .admin-stage-header .split-header {
    flex-wrap: wrap;
  }
}

@media (max-width: 920px) {
  .admin-platform-layout,
  .admin-main-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 390px) {
  .app-shell {
    padding: 14px 12px 28px;
  }

  .page-nav-link {
    font-size: 10px;
    min-height: 44px;
    padding: 10px 4px;
    min-width: 64px;
  }
}

@media (max-width: 640px) {
  .admin-kpi-grid,
  .admin-kpi-grid--monitor {
    grid-template-columns: 1fr;
  }

  .page-nav-bar {
    padding: 8px;
  }

  .page-nav-link {
    font-size: 11px;
    padding-inline: 6px;
    min-width: 68px;
  }

  .page-utility-link {
    min-height: 40px;
    padding: 8px 12px;
    font-size: 11px;
  }
}

@media (max-width: 430px) {
  .app-shell {
    padding: 16px 12px 30px;
  }

  .hero-card {
    padding: 20px 18px 18px;
  }

  .section-card,
  .summary-card {
    padding: 16px;
  }

  .split-header,
  .section-headline,
  .export-header,
  .mini-item,
  .file-row,
  .timeline-topline,
  .task-meta-line,
  .trust-header,
  .package-topline {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-title {
    font-size: 24px;
  }

  .page-nav {
    gap: 6px;
  }

  .page-nav-link {
    padding-inline: 6px;
    font-size: 11px;
    line-height: 1.1;
    min-width: 64px;
  }

  .welcome-strip {
    align-items: flex-start;
    gap: 10px;
  }

  .welcome-badge,
  .section-headline .pill,
  .split-header .pill,
  .package-topline .pill,
  .timeline-topline .pill {
    align-self: flex-start;
  }

  .stats-grid,
  .country-grid,
  .review-meta,
  .share-overview-grid,
  .export-grid,
  .trust-grid,
  .admin-metrics-grid,
  .admin-main-grid,
  .admin-history-grid,
  .admin-form-grid,
  .dimension-grid,
  .hero-guidance-grid,
  .admin-review-metrics,
  .admin-user-filter-grid {
    grid-template-columns: 1fr;
  }

  .radar-caption {
    grid-template-columns: 1fr;
  }

  .score-ring {
    width: 124px;
    height: 124px;
    align-self: center;
  }

  .score-ring-cluster {
    justify-items: flex-start;
  }

  .process-strip {
    flex-direction: column;
    align-items: stretch;
  }

  .process-arrow {
    align-self: center;
    transform: rotate(90deg);
  }

  .actions-row {
    align-items: stretch;
  }

  .primary-button,
  .secondary-button,
  .ghost-button {
    width: 100%;
  }

  .admin-hero-actions,
  .share-actions,
  .package-actions,
  .mini-actions,
  .share-report-header .share-actions {
    width: 100%;
  }

  .admin-shell {
    padding:
      calc(18px + env(safe-area-inset-top, 0px) + var(--host-safe-area-top, 0px))
      12px
      calc(28px + env(safe-area-inset-bottom, 0px) + var(--host-safe-area-bottom, 0px));
  }

  .admin-hero-actions {
    justify-content: flex-start;
  }

  .admin-hero-actions .secondary-button,
  .admin-hero-actions .ghost-button {
    width: 100%;
  }

}

@media (max-width: 350px) {
  .page-nav-link {
    font-size: 10px;
    min-width: 60px;
  }
}

@media (max-width: 720px) {
  .index-hero .split-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .index-hero .score-ring,
  .index-hero .score-ring-cluster {
    align-self: flex-start;
  }

  .hero-guidance-grid,
  .login-feature-grid,
  .admin-review-metrics,
  .admin-user-filter-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .login-grid {
    grid-template-columns: 1fr;
  }

  .login-hero-card {
    min-height: auto;
  }

  .login-panel-card {
    order: -1;
  }

  .login-copy-stack {
    order: 1;
  }
}
