:root {
  color-scheme: light dark;
  --background-start: #f3f6ff;
  --background-end: #ffffff;
  --aura: rgba(31, 111, 235, 0.18);
  --surface-card: rgba(255, 255, 255, 0.96);
  --surface-muted: rgba(255, 255, 255, 0.82);
  --surface-frosted: rgba(255, 255, 255, 0.7);
  --border: rgba(22, 76, 182, 0.12);
  --border-strong: rgba(37, 99, 235, 0.28);
  --divider: rgba(148, 163, 184, 0.16);
  --text-primary: #0f172a;
  --text-secondary: #27324d;
  --text-muted: rgba(71, 85, 105, 0.72);
  --accent: #1f6feb;
  --accent-strong: #185ad2;
  --accent-soft: rgba(31, 111, 235, 0.14);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-soft: 0 42px 84px -52px rgba(15, 23, 42, 0.5);
  --shadow-card: 0 28px 56px -46px rgba(32, 76, 178, 0.45);
  --shadow-floating: 0 22px 44px -34px rgba(31, 111, 235, 0.55);
  font-family: "Inter", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(120% 160% at 50% -12%, rgba(31, 111, 235, 0.08), transparent 62%),
    linear-gradient(180deg, var(--background-start) 0%, var(--background-end) 72%);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
  overflow-x: hidden;
}

body.review {
  --tabs-sticky-top: calc(env(safe-area-inset-top) + 96px);
}

body.review--tabs-pinned {
  --tabs-sticky-top: calc(env(safe-area-inset-top) + 18px);
}

.background-aura {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(58% 40% at 50% 0%, var(--aura), transparent),
    radial-gradient(50% 38% at 22% 18%, rgba(14, 116, 255, 0.1), transparent 68%);
  filter: blur(44px);
  opacity: 0.75;
  z-index: 0;
}

.material-symbol {
  font-family: "Material Symbols Outlined", "Material Icons", sans-serif;
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-bar {
  --app-bar-padding-y: 12px;
  --app-bar-margin-top: clamp(12px, 4vw, 24px);
  width: min(100% - 32px, 520px);
  margin: var(--app-bar-margin-top) auto 0;
  padding: var(--app-bar-padding-y) 16px;
  border-radius: calc(var(--radius-lg) + 4px);
  background: var(--surface-frosted);
  border: 1px solid var(--border);
  backdrop-filter: blur(22px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 16px;
  z-index: 4;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  max-height: 96px;
  transition:
    transform 0.32s ease,
    opacity 0.32s ease,
    padding 0.32s ease,
    margin 0.32s ease,
    border-color 0.32s ease,
    box-shadow 0.32s ease,
    max-height 0.32s ease;
}

.app-bar--review {
  gap: 18px;
}

.app-bar__spacer {
  flex: 0 0 40px;
  display: block;
}

.app-bar--review .icon-button {
  flex: 0 0 40px;
}

.app-bar__cluster {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-bar--review .brand {
  flex: 1;
  justify-content: center;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.02em;
}

.brand__emblem {
  width: 28px;
  height: 28px;
  border-radius: 12px;
  background: linear-gradient(135deg, #133bba, #2f7bff);
  box-shadow: 0 12px 26px rgba(23, 76, 202, 0.38);
}

.brand__wordmark {
  font-size: 1rem;
  text-transform: uppercase;
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--surface-muted);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.icon-button--ghost {
  background: transparent;
  border-color: transparent;
}

.icon-button:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
}

.icon-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.content {
  flex: 1;
  padding: clamp(12px, 3vw, 18px) 16px calc(140px + env(safe-area-inset-bottom));
  display: flex;
  position: relative;
  z-index: 1;
}

.content__inner {
  width: min(100%, 520px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero__badge {
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(31, 111, 235, 0.14);
  color: var(--accent-strong);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.hero__title {
  margin: 0;
  font-size: clamp(1.65rem, 7vw, 2rem);
  color: var(--text-primary);
}

.hero__subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.card {
  position: relative;
  border-radius: var(--radius-xl);
  padding: 24px 24px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.card--upload {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--surface-card), var(--surface-card)) padding-box,
    linear-gradient(135deg, rgba(31, 111, 235, 0.42), rgba(59, 130, 246, 0.22)) border-box;
}

.card__header {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card__eyebrow {
  align-self: flex-start;
  margin: 0;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(31, 111, 235, 0.12);
  color: var(--accent-strong);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.card__title {
  margin: 0;
  font-size: clamp(1.3rem, 6vw, 1.6rem);
}

.card__subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.93rem;
  line-height: 1.55;
}

.upload {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.upload__dropzone {
  border: 1px dashed var(--border-strong);
  border-radius: calc(var(--radius-lg) - 4px);
  background: rgba(255, 255, 255, 0.88);
  padding: 28px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease,
    box-shadow 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 24px 48px -40px rgba(31, 111, 235, 0.45);
  backdrop-filter: blur(6px);
}

.upload__dropzone:hover {
  transform: translateY(-2px);
  border-color: rgba(31, 111, 235, 0.46);
  background: rgba(255, 255, 255, 0.94);
}

.upload__dropzone:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.upload__dropzone input {
  display: none;
}

.upload__icon {
  font-size: 2.2rem;
  color: var(--accent);
  background: rgba(31, 111, 235, 0.12);
  border-radius: 18px;
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 4px;
}

.upload__label {
  font-size: 1rem;
  font-weight: 600;
}

.upload__hint {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.upload__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.button--ghost {
  background: var(--accent-soft);
  color: var(--accent-strong);
  box-shadow: 0 16px 32px -28px rgba(31, 111, 235, 0.6);
}

.button--accent {
  background: linear-gradient(135deg, #1f6feb, #2f7bff);
  color: white;
  box-shadow: var(--shadow-floating);
}

.button:hover {
  transform: translateY(-1px);
}

.button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.upload__feedback {
  min-height: 20px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.upload__feedback[data-tone="success"] {
  color: #16a34a;
}

.upload__feedback[data-tone="error"] {
  color: #dc2626;
}

.upload__feedback[data-tone="warning"] {
  color: #d97706;
}

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quick-action {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.quick-action:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-floating);
}

.quick-action__icon {
  font-size: 1.4rem;
  color: var(--accent);
  border-radius: 14px;
  background: var(--accent-soft);
  padding: 10px;
}

.quick-action__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex: 1;
}

.quick-action__title {
  font-weight: 600;
  color: var(--text-primary);
}

.quick-action__subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.review .content {
  padding-bottom: clamp(180px, 32vw, 260px);
}

.review-hero {
  position: relative;
  padding-bottom: 12px;
}

.insights-bar {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 24px 48px -44px rgba(31, 111, 235, 0.5);
  backdrop-filter: blur(10px);
}

.insights-bar__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}

.insights-bar__item--alert .insights-bar__value {
  color: #f97316;
}

.insights-bar__label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.insights-bar__value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.insights-bar__divider {
  width: 1px;
  height: 36px;
  background: var(--divider);
  justify-self: center;
}

.review-overview {
  gap: 18px;
}

.review-overview__header {
  display: flex;
  gap: 16px;
  align-items: center;
}

.review-overview__icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(31, 111, 235, 0.16);
  color: var(--accent-strong);
  font-size: 1.6rem;
}

.review-overview__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.overview-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.overview-pill--accent {
  background: linear-gradient(135deg, rgba(31, 111, 235, 0.12), rgba(59, 130, 246, 0.16));
  border-color: rgba(31, 111, 235, 0.24);
}

.overview-pill--success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.14), rgba(45, 212, 191, 0.12));
  border-color: rgba(34, 197, 94, 0.28);
}

.overview-pill__icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(31, 111, 235, 0.16);
  color: var(--accent-strong);
  font-size: 1.4rem;
}

.overview-pill--success .overview-pill__icon {
  background: rgba(34, 197, 94, 0.18);
  color: #15803d;
}

.overview-pill__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.overview-pill__value {
  font-weight: 700;
  font-size: 1.1rem;
}

.overview-pill__label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

.review-progress__track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.review-progress__fill {
  height: 100%;
  width: calc(var(--progress, 0) * 100%);
  background: linear-gradient(135deg, #1f6feb, #60a5ff);
  border-radius: inherit;
  transition: width 0.3s ease;
}

.review-progress__label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.review-tabs {
  position: sticky;
  top: var(--tabs-sticky-top);
  z-index: 2;
  transition: top 0.28s ease, padding 0.28s ease;
}

.review-tabs__rail {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 4px 6px;
  scrollbar-width: thin;
  transition: background 0.3s ease, box-shadow 0.3s ease, border 0.3s ease, padding 0.3s ease,
    backdrop-filter 0.3s ease;
}

.review-tab {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text-muted);
  font-weight: 600;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.review-tab .material-symbol {
  font-size: 1.1rem;
}

.review-tab--active,
.review-tab:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 111, 235, 0.32);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text-primary);
}

.review-tab__badge {
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: #f97316;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.review-tab__badge--visible {
  opacity: 1;
  transform: translateY(0);
}

.review-sections {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.review-card {
  gap: 24px;
}

.floating-app-controls {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 20px);
  right: max(16px, calc((100vw - 520px) / 2 + 16px));
  display: flex;
  gap: 10px;
  padding: 8px;
  border-radius: 999px;
  background: var(--surface-frosted);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-floating);
  backdrop-filter: blur(18px);
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
  z-index: 6;
}

.floating-app-controls .icon-button {
  width: 36px;
  height: 36px;
}

.icon-button--frosted {
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(255, 255, 255, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

body.review--tabs-pinned .app-bar {
  --app-bar-padding-y: 0px;
  --app-bar-margin-top: 0px;
  opacity: 0;
  transform: translateY(-16px);
  pointer-events: none;
  border-color: transparent;
  box-shadow: none;
  max-height: 0;
}

body.review--tabs-pinned .review-tabs {
  margin-top: 4px;
}

body.review--tabs-pinned .review-tabs__rail {
  background: var(--surface-frosted);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius-lg) + 6px);
  padding: 10px 12px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

body.review--tabs-pinned .floating-app-controls {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

body.side-menu-open .floating-app-controls {
  opacity: 0;
  transform: translateY(-12px);
  pointer-events: none;
}

.review-card__header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
}

.review-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(31, 111, 235, 0.18);
  color: var(--accent-strong);
  font-size: 1.4rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.review-card__badge {
  font-size: 0.78rem;
  font-weight: 600;
  color: #16a34a;
  background: rgba(34, 197, 94, 0.16);
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.28);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.review-card__badge--alert {
  color: #f97316;
  background: rgba(249, 115, 22, 0.14);
  border-color: rgba(249, 115, 22, 0.28);
}

.review-card__fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.review-field {
  position: relative;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(31, 111, 235, 0.12);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 18px 40px -36px rgba(31, 111, 235, 0.4);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.review-field[data-confidence="high"] {
  border-color: rgba(34, 197, 94, 0.26);
}

.review-field[data-confidence="medium"] {
  border-color: rgba(234, 179, 8, 0.26);
}

.review-field[data-confidence="low"],
.review-field[data-confidence="missing"] {
  border-color: rgba(248, 113, 113, 0.36);
  box-shadow: 0 22px 44px -38px rgba(248, 113, 113, 0.65);
}

.review-field--verified {
  border-color: rgba(34, 197, 94, 0.32);
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(45, 212, 191, 0.14));
}

.review-field--flagged {
  border-color: rgba(249, 115, 22, 0.4);
  box-shadow: 0 18px 36px -30px rgba(249, 115, 22, 0.55);
}

.review-field__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.review-field__icon {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  background: rgba(31, 111, 235, 0.12);
  color: var(--accent-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.review-field__titles {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.review-field__label {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
}

.review-field__confidence {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.review-field__confidence[data-tone="high"] {
  color: #16a34a;
}

.review-field__confidence[data-tone="medium"] {
  color: #f59e0b;
}

.review-field__confidence[data-tone="low"],
.review-field__confidence[data-tone="missing"] {
  color: #ef4444;
}

.review-field__cta {
  display: flex;
  align-items: center;
}

.button--pill {
  border-radius: 999px;
  padding-inline: 18px;
  padding-block: 8px;
}

.review-field__body {
  margin-top: 12px;
}

.review-field__value {
  display: flex;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.review-field__value--chips {
  flex-wrap: wrap;
}

.review-field__value--text {
  flex-direction: column;
  gap: 6px;
}

.review-field__paragraph {
  margin: 0;
  line-height: 1.45;
}

.review-field__separator {
  flex-basis: 100%;
  height: 1px;
  background: rgba(148, 163, 184, 0.16);
  display: block;
}

.review-field__placeholder {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.review-field__footer {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.review-field__inline-actions {
  display: inline-flex;
  gap: 12px;
}

.review-field__hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.review-field__editor {
  margin-top: 14px;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(31, 111, 235, 0.28);
  background: rgba(255, 255, 255, 0.78);
  display: none;
  flex-direction: column;
  gap: 10px;
}

.review-field__editor textarea,
.review-field__editor input {
  width: 100%;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 10px 12px;
  font: inherit;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
}

.review-field__editor textarea:focus,
.review-field__editor input:focus {
  outline: 2px solid rgba(31, 111, 235, 0.32);
  border-color: transparent;
}

.review-field__editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.review-field--editing .review-field__editor {
  display: flex;
}

.review-chip {
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(31, 111, 235, 0.14);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 600;
}

.link-button {
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.link-button .material-symbol {
  font-size: 1rem;
}

.link-button:hover {
  text-decoration: underline;
}

.link-button[disabled] {
  opacity: 0.45;
  pointer-events: none;
}

.review-field--pulse {
  animation: reviewPulse 1s ease;
}

@keyframes reviewPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.015);
  }
  100% {
    transform: scale(1);
  }
}

.bottom-sheet {
  position: fixed;
  left: 50%;
  bottom: clamp(12px, 4vw, 28px);
  transform: translateX(-50%);
  width: min(100% - 32px, 520px);
  border-radius: calc(var(--radius-lg) + 6px);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.94), rgba(226, 234, 255, 0.88));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-floating);
  padding: 16px 18px calc(18px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 3;
}

.bottom-sheet__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.bottom-sheet__cta {
  width: 100%;
}

.button--success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.9), rgba(16, 185, 129, 0.95));
  color: white;
}

.review-field__hint:empty {
  display: none;
}

.review-field__placeholder[hidden] {
  display: none;
}

.review-field__editor input[disabled],
.review-field__editor textarea[disabled] {
  opacity: 0.6;
}

.review-field--verified .review-field__cta .button--ghost {
  background: rgba(34, 197, 94, 0.18);
  color: #15803d;
}

.review-field--flagged .review-field__cta .button--ghost {
  background: rgba(249, 115, 22, 0.14);
  color: #c2410c;
}

.quick-action__chevron {
  color: var(--text-muted);
}

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

.mini-card {
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.92), rgba(210, 224, 255, 0.58));
  border: 1px solid var(--border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-card);
}

.mini-card__title {
  margin: 0;
  font-size: 1.05rem;
}

.mini-card__body {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.bottom-bar {
  position: fixed;
  left: 50%;
  bottom: clamp(12px, 4vw, 28px);
  transform: translateX(-50%);
  width: min(100% - 32px, 520px);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(226, 234, 255, 0.88));
  border: 1px solid var(--border);
  border-radius: calc(var(--radius-lg) + 6px);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 10px;
  gap: 8px;
  box-shadow: var(--shadow-floating);
  z-index: 3;
  backdrop-filter: blur(18px);
}

.bottom-bar__item {
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.75rem;
  padding: 6px 4px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.bottom-bar__item--active,
.bottom-bar__item:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.side-menu {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(320px, 78vw);
  background: rgba(234, 242, 255, 0.95);
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  gap: 24px;
  z-index: 5;
  backdrop-filter: blur(18px);
}

.side-menu[aria-hidden="false"] {
  transform: translateX(0);
}

.side-menu__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.side-menu__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-menu__link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
}

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.25);
  backdrop-filter: blur(4px);
  z-index: 4;
}

@media (min-width: 768px) {
  body {
    align-items: center;
  }

  .content {
    padding-bottom: calc(160px + env(safe-area-inset-bottom));
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --background-start: #0b1120;
    --background-end: #0f172a;
    --aura: rgba(96, 165, 255, 0.28);
    --surface-card: rgba(15, 23, 42, 0.9);
    --surface-muted: rgba(30, 41, 59, 0.85);
    --surface-frosted: rgba(15, 23, 42, 0.75);
    --border: rgba(148, 163, 184, 0.18);
    --border-strong: rgba(148, 163, 184, 0.38);
    --text-primary: #e2e8f0;
    --text-secondary: #d0dcff;
    --text-muted: rgba(203, 213, 225, 0.72);
    --accent: #60a5ff;
    --accent-strong: #93c5ff;
    --accent-soft: rgba(96, 165, 255, 0.2);
    --shadow-card: 0 30px 60px -50px rgba(0, 0, 0, 0.75);
    --shadow-floating: 0 22px 44px -32px rgba(59, 130, 246, 0.45);
  }

  body {
    color: var(--text-primary);
  }

  .side-menu {
    background: rgba(12, 20, 35, 0.94);
  }

  .insights-bar,
  .review-tab,
  .review-field,
  .review-overview,
  .bottom-sheet {
    background: rgba(15, 23, 42, 0.82);
  }

  .review-tab {
    border-color: rgba(148, 163, 184, 0.24);
  }

  .review-tab--active,
  .review-tab:hover {
    background: rgba(30, 41, 59, 0.92);
    border-color: rgba(96, 165, 250, 0.36);
  }

  body.review--tabs-pinned .review-tabs__rail {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.32);
    box-shadow: 0 28px 56px -36px rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(26px);
  }

  .floating-app-controls {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.32);
    box-shadow: 0 32px 60px -34px rgba(37, 99, 235, 0.4);
  }

  .icon-button--frosted {
    background: rgba(30, 41, 59, 0.82);
    border-color: rgba(148, 163, 184, 0.32);
    box-shadow: inset 0 1px 0 rgba(148, 163, 184, 0.2);
  }

  .review-card__badge {
    background: rgba(34, 197, 94, 0.2);
  }

  .review-card__badge--alert {
    background: rgba(249, 115, 22, 0.22);
  }

  .review-field__editor {
    background: rgba(30, 41, 59, 0.9);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
