:root {
  --rose: #df8b8d;
  --berry: #ac0a53;
  --plum: #392d50;
  --lavender: #bdc2ff;
  --cream: #f5f1ea;
  --white: #ffffff;
  --black: #111111;
  --ink: #231d2e;
  --muted: #746b7c;
  --line: rgba(57, 45, 80, 0.14);
  --shadow: 0 18px 45px rgba(57, 45, 80, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--cream);
  color: var(--ink);
  font-family: "Verdana Pro", Verdana, Geneva, sans-serif;
}

body.modal-open {
  overflow: hidden;
}

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

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

.app-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 24px;
  background: var(--plum);
  color: var(--white);
}

.mobile-nav-bar {
  display: none;
}

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

.mobile-nav-brand > div {
  min-width: 0;
}

.mobile-nav-brand strong,
.mobile-nav-brand span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-nav-brand strong {
  color: var(--white);
  font-size: 0.82rem;
  letter-spacing: 0;
}

.mobile-nav-brand span {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.74rem;
  font-weight: 700;
}

.mobile-menu-toggle {
  display: grid;
  width: 42px;
  height: 38px;
  flex: 0 0 42px;
  place-items: center;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.mobile-menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--white);
  transition: transform 160ms ease, opacity 160ms ease;
}

.mobile-menu-open .mobile-menu-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.mobile-menu-open .mobile-menu-toggle span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-open .mobile-menu-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

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

.brand-mark {
  display: grid;
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  background: var(--berry);
  color: var(--white);
  font-family: "Lyno", "Verdana Pro", Verdana, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
}

.brand > div {
  min-width: 0;
}

.brand > div > strong,
.brand > div > span {
  display: block;
}

.brand > div > strong {
  overflow: hidden;
  color: var(--white);
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand > div > span {
  margin-top: 2px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.nav-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: rgba(255, 255, 255, 0.74);
  text-align: left;
  cursor: pointer;
}

.nav-tab strong {
  font-size: 0.9rem;
}

.nav-tab span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-weight: 700;
}

.nav-tab.active,
.nav-tab:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

.sidebar-note {
  margin-top: auto;
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-note span,
.sidebar-note strong {
  display: block;
}

.sidebar-note span {
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.78rem;
}

.partner-mode:not(.partner-portal-mode) .nav-tabs,
.partner-mode .sidebar-note,
.partner-mode #seedDemoButton,
.partner-mode #openAdminButton,
.partner-mode .status-panel {
  display: none;
}

.partner-portal-mode .nav-tab[data-view="storage"],
.partner-portal-mode .nav-tab[data-view="analytics"],
.partner-portal-mode .nav-tab[data-view="alerts"],
.partner-portal-mode .nav-tab[data-view="missing"],
.partner-portal-mode .nav-tab[data-view="partners"],
.partner-portal-mode .nav-tab[data-view="campaigns"],
.partner-portal-mode .nav-tab[data-view="constructionFeed"],
.partner-portal-mode .nav-tab[data-view="constructionSettings"],
.partner-portal-mode .nav-tab[data-view="qr"] {
  display: none;
}

.partner-primary-tabs {
  display: none;
}

.central-mode .survey-voting-only,
.partner-mode .survey-admin-only {
  display: none;
}

.partner-mode:not(.partner-portal-mode) .partner-primary-tabs {
  display: grid;
  max-width: 760px;
  margin: -4px 0 18px;
  padding: 4px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.partner-primary-tab {
  justify-content: center;
  min-height: 42px;
  color: var(--muted);
  text-align: center;
}

.partner-primary-tab span {
  background: rgba(57, 45, 80, 0.08);
  color: var(--plum);
}

.partner-primary-tab.active,
.partner-primary-tab:hover {
  background: var(--plum);
  color: var(--white);
}

.partner-primary-tab.active span,
.partner-primary-tab:hover span {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
}

.partner-mode .sidebar {
  min-height: 100vh;
}

.partner-mode .upload-layout {
  grid-template-columns: minmax(0, 760px);
  max-width: 760px;
}

.partner-mode .upload-panel {
  max-width: 760px;
}

.central-locked .app-shell,
.partner-locked .app-shell,
.password-reset-active .app-shell {
  display: none;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background: var(--cream);
}

.login-screen[hidden] {
  display: none;
}

.login-card {
  display: grid;
  width: min(440px, 100%);
  gap: 18px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.login-brand {
  color: var(--plum);
}

.login-brand div span {
  color: var(--muted);
}

.login-message {
  min-height: 20px;
  margin: 0;
  color: var(--berry);
  font-size: 0.85rem;
  font-weight: 700;
}

.text-button {
  justify-self: center;
  border: 0;
  background: transparent;
  color: var(--berry);
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 850;
}

.text-button:hover,
.text-button:focus-visible {
  text-decoration: underline;
  outline: none;
}

.main {
  min-width: 0;
  padding: 28px;
}

.topbar,
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--berry);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

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

h1,
h2 {
  margin-bottom: 0;
  color: var(--plum);
  line-height: 1.1;
  letter-spacing: 0;
}

h1 {
  font-size: 3rem;
}

h2 {
  font-size: 1.65rem;
}

.top-actions,
.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.filter-field {
  display: grid;
  gap: 4px;
}

.filter-field span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.language-field {
  display: grid;
  gap: 4px;
}

.admin-date-control {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
}

.admin-date-control[hidden] {
  display: none;
}

.date-field {
  display: grid;
  gap: 4px;
}

.date-field span,
.language-field span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.date-field input,
.language-field select {
  min-height: 42px;
  min-width: 140px;
  background: var(--white);
}

.date-step-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--plum);
  cursor: pointer;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
}

.date-step-button:hover,
.date-step-button:focus {
  border-color: var(--berry);
  color: var(--berry);
  outline: 2px solid rgba(189, 194, 255, 0.62);
  outline-offset: 2px;
}

button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

.primary-button {
  background: var(--berry);
  color: var(--white);
}

.primary-button:hover {
  background: #920746;
}

.ghost-button {
  background: var(--white);
  color: var(--plum);
  border-color: var(--line);
}

.ghost-button:hover {
  border-color: var(--berry);
  color: var(--berry);
}

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

.view {
  display: none;
}

.view.active {
  display: block;
}

.upload-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 22px;
  align-items: start;
}

.upload-panel,
.status-panel,
.kpi,
.feed-card,
.campaign-panel,
.maintenance-panel,
.storage-row,
.partner-card,
.reminder-card,
.missing-item,
.qr-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.upload-panel {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.section-heading {
  display: grid;
  gap: 2px;
}

.field,
.field-grid {
  display: grid;
  gap: 8px;
}

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

.field span {
  color: var(--plum);
  font-size: 0.82rem;
  font-weight: 700;
}

.locked-location {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid rgba(172, 10, 83, 0.2);
  border-radius: var(--radius);
  background: #fff7fa;
}

.locked-location[hidden],
.field[hidden] {
  display: none;
}

.locked-location span {
  color: var(--berry);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.locked-location strong {
  color: var(--plum);
  font-size: 1.08rem;
}

.locked-location small {
  color: var(--muted);
}

select,
input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf9;
  color: var(--ink);
}

select {
  min-height: 46px;
  padding: 0 12px;
}

input {
  min-height: 46px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  min-height: 86px;
  padding: 12px;
}

select:focus,
input:focus,
textarea:focus,
.dropzone:focus {
  outline: 2px solid rgba(189, 194, 255, 0.88);
  outline-offset: 2px;
}

.dropzone {
  display: grid;
  width: 100%;
  min-height: 170px;
  place-items: center;
  gap: 6px;
  padding: 22px;
  border: 2px dashed rgba(172, 10, 83, 0.34);
  border-radius: var(--radius);
  background: #fff9fb;
  color: var(--plum);
  cursor: pointer;
  text-align: center;
}

.hidden-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.dropzone-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: var(--berry);
  color: var(--white);
  font-size: 2rem;
  line-height: 1;
}

.dropzone small {
  color: var(--muted);
}

.image-choice-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(172, 10, 83, 0.18);
  border-radius: var(--radius);
  background: #fffdf9;
}

.image-choice-panel[hidden] {
  display: none;
}

.image-choice-button {
  display: grid;
  gap: 4px;
  min-height: 76px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--plum);
  cursor: pointer;
  text-align: left;
}

.image-choice-button:hover,
.image-choice-button:focus {
  border-color: var(--berry);
  outline: 2px solid rgba(189, 194, 255, 0.62);
  outline-offset: 2px;
}

.image-choice-button strong {
  color: var(--plum);
}

.image-choice-button span {
  color: var(--muted);
  font-size: 0.78rem;
}

.preview-grid,
.feed-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
}

.preview-item,
.feed-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: #efe8df;
  cursor: pointer;
}

.preview-item {
  cursor: default;
}

.preview-item img,
.preview-item video,
.feed-image img,
.feed-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 160ms ease;
}

.feed-image:hover img,
.feed-image:focus img {
  transform: scale(1.03);
}

.feed-image:focus {
  outline: 2px solid var(--berry);
  outline-offset: 2px;
}

.feed-image-status {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  padding: 12px;
  color: var(--plum);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
}

.feed-image-broken {
  border: 1px dashed rgba(172, 10, 83, 0.32);
  background: rgba(245, 241, 234, 0.92);
  cursor: default;
}

.feed-image-broken .feed-image-status {
  color: var(--berry);
  line-height: 1.35;
}

.feed-video {
  cursor: default;
}

.feed-video:focus {
  outline: 0;
}

.preview-item button {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.78);
  color: var(--white);
  cursor: pointer;
}

.camera-modal,
.image-lightbox,
.analytics-store-modal,
.feedback-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(17, 17, 17, 0.64);
}

.camera-modal[hidden],
.image-lightbox[hidden],
.analytics-store-modal[hidden],
.feedback-modal[hidden] {
  display: none;
}

.camera-dialog,
.analytics-store-dialog,
.feedback-dialog {
  display: grid;
  width: min(720px, 100%);
  max-height: calc(100vh - 36px);
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.camera-dialog header,
.analytics-store-dialog header,
.feedback-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.camera-dialog h3,
.analytics-store-dialog h3,
.feedback-dialog h3 {
  min-width: 0;
  margin: 0;
  color: var(--plum);
  overflow-wrap: anywhere;
}

.analytics-store-dialog .icon-button,
.feedback-dialog .icon-button,
.camera-dialog .icon-button {
  flex: 0 0 auto;
}

.feedback-dialog {
  width: min(620px, 100%);
}

.ai-feedback-dialog {
  width: min(680px, 100%);
  overflow: auto;
}

.analytics-store-dialog {
  width: min(920px, 100%);
  overflow: auto;
}

.analytics-store-modal-body {
  display: grid;
  gap: 14px;
}

.analytics-store-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.analytics-store-summary-grid article {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid rgba(57, 45, 80, 0.12);
  border-radius: 16px;
  background: #fff8ef;
}

.analytics-store-summary-grid span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.analytics-store-summary-grid strong {
  color: var(--plum);
  font-size: 1rem;
  overflow-wrap: anywhere;
}

.analytics-store-summary-grid .analytics-currency-pair,
.analytics-store-mini-dashboard .analytics-currency-pair {
  justify-items: start;
}

.analytics-store-summary-grid .analytics-currency-primary,
.analytics-store-mini-dashboard .analytics-currency-primary {
  color: var(--plum);
  font-size: 1rem;
}

.feedback-dialog header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.feedback-recipient {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf9;
}

.feedback-recipient span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.feedback-recipient strong {
  color: var(--plum);
  overflow-wrap: anywhere;
}

.feedback-approval {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(44, 153, 111, 0.22);
  border-radius: var(--radius);
  background: rgba(44, 153, 111, 0.08);
  color: var(--plum);
  font-weight: 800;
}

.feedback-approval input {
  width: 18px;
  height: 18px;
  accent-color: var(--berry);
}

.feedback-history {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf9;
}

.feedback-history-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--plum);
}

.feedback-history-list {
  display: grid;
  gap: 8px;
  max-height: 190px;
  overflow: auto;
}

.feedback-history-row {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(57, 45, 80, 0.1);
  border-radius: 10px;
  background: var(--white);
}

.feedback-history-row div {
  display: grid;
  gap: 5px;
}

.feedback-history-row strong,
.feedback-history-row span,
.feedback-history-row small,
.feedback-history-row em {
  overflow-wrap: anywhere;
}

.feedback-history-row small,
.feedback-history-row span,
.feedback-history-empty {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.feedback-history-row em {
  color: var(--berry);
  font-size: 0.78rem;
  font-weight: 800;
  font-style: normal;
}

.feedback-log-summary {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid rgba(44, 153, 111, 0.16);
  border-radius: var(--radius);
  background: rgba(44, 153, 111, 0.07);
}

.feedback-log-summary span:not(.status-pill),
.feedback-log-summary small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.feedback-message {
  min-height: 20px;
  margin: 0;
  color: var(--berry);
  font-weight: 700;
}

.ai-feedback-review-box {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(172, 10, 83, 0.18);
  border-radius: var(--radius);
  background: #fff8ef;
}

.ai-feedback-review-box span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.ai-feedback-review-box strong {
  color: var(--plum);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.ai-feedback-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.ai-feedback-choice legend {
  grid-column: 1 / -1;
  margin-bottom: 2px;
  color: var(--plum);
  font-weight: 800;
}

.ai-feedback-option {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf9;
  cursor: pointer;
  overflow: hidden;
}

.ai-feedback-option::before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border: 2px solid rgba(57, 45, 80, 0.34);
  border-radius: 50%;
  background: var(--white);
}

.ai-feedback-option:has(input:checked) {
  border-color: rgba(172, 10, 83, 0.34);
  background: rgba(172, 10, 83, 0.05);
}

.ai-feedback-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ai-feedback-option:has(input:checked)::before {
  border-color: var(--berry);
  background: var(--berry);
  box-shadow: inset 0 0 0 5px var(--white);
}

.ai-feedback-option span {
  display: grid;
  gap: 3px;
  min-width: 0;
  max-width: 100%;
}

.ai-feedback-option strong {
  color: var(--plum);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.ai-feedback-option small {
  color: var(--muted);
  line-height: 1.35;
}

.feedback-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.image-lightbox {
  z-index: 40;
  background: rgba(17, 17, 17, 0.78);
}

.image-lightbox-dialog {
  display: grid;
  width: min(1100px, 100%);
  max-height: calc(100vh - 36px);
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.image-lightbox-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.image-lightbox-dialog h3 {
  margin: 0;
  color: var(--plum);
}

.image-lightbox-dialog p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.image-lightbox-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 240px;
}

.image-lightbox-stage img {
  width: 100%;
  max-height: calc(100vh - 150px);
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--black);
}

.lightbox-nav-button {
  position: absolute;
  top: 50%;
  z-index: 1;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  background: rgba(57, 45, 80, 0.82);
  color: var(--white);
  cursor: pointer;
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-50%);
}

.lightbox-nav-button:hover,
.lightbox-nav-button:focus {
  background: var(--berry);
  outline: 0;
}

.lightbox-nav-button[hidden] {
  display: none;
}

.lightbox-nav-previous {
  left: 12px;
}

.lightbox-nav-next {
  right: 12px;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--plum);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.icon-button:hover,
.icon-button:focus {
  border-color: var(--berry);
  color: var(--berry);
  outline: 2px solid rgba(189, 194, 255, 0.62);
  outline-offset: 2px;
}

.camera-stage {
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  background: var(--black);
}

.camera-stage video,
.camera-stage canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.camera-message {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

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

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

.form-footer p {
  margin: 0;
  color: var(--berry);
  font-weight: 700;
}

.location-admin-card {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
  padding: 20px;
}

.location-admin-card h3 {
  margin: 0 0 6px;
}

.location-admin-card p:not(.location-message) {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.location-create-form {
  display: grid;
  gap: 16px;
}

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

.form-footer .location-message {
  min-height: 1.4rem;
  margin: 0;
  color: #2d7f57;
  font-weight: 900;
}

.form-footer .location-message.is-error {
  color: var(--berry);
}

.status-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  position: sticky;
  top: 24px;
}

.location-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--plum);
  color: var(--white);
}

.location-card h3 {
  margin: 0;
  color: var(--white);
}

.location-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
}

.tag {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(223, 139, 141, 0.22);
  color: var(--white);
  font-size: 0.74rem;
  font-weight: 700;
}

.mini-dashboard,
.kpi-row,
.reminder-grid {
  display: grid;
  gap: 12px;
}

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

.mini-dashboard div {
  padding: 14px 10px;
  border-radius: var(--radius);
  background: var(--cream);
  text-align: center;
}

.mini-dashboard span,
.kpi span,
.reminder-card span,
.feed-meta,
.qr-row span,
.missing-item span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.mini-dashboard strong,
.kpi strong {
  display: block;
  margin-top: 5px;
  color: var(--plum);
  font-size: 1.5rem;
}

.filter-row select {
  min-width: 190px;
  background: var(--white);
}

.filter-row input[type="date"] {
  min-width: 150px;
  background: var(--white);
}

.date-range-field {
  min-width: 150px;
}

.compact-button.active {
  border-color: var(--berry);
  background: var(--berry);
  color: var(--white);
}

.kpi-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.kpi {
  padding: 18px;
}

.kpi.warn {
  border-color: rgba(172, 10, 83, 0.3);
  background: #fff7fa;
}

.feed-grid {
  column-gap: 18px;
  columns: 320px;
}

.ai-overview-panel {
  display: grid;
  gap: 14px;
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid rgba(172, 10, 83, 0.18);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.ai-overview-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ai-overview-heading h3 {
  margin: 4px 0 0;
  color: var(--plum);
}

.ai-score-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 999px;
  color: var(--white);
  font-weight: 900;
  white-space: nowrap;
}

.ai-kpi-grid,
.ai-insight-grid {
  display: grid;
  gap: 12px;
}

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

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

.ai-mini-kpi,
.ai-insight-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream);
}

.ai-mini-kpi span,
.ai-insight-card > strong,
.ai-review-head span,
.ai-review-meta,
.ai-criteria-grid span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ai-mini-kpi strong {
  display: block;
  margin-top: 5px;
  color: var(--plum);
  font-size: 1.45rem;
}

.ai-insight-card > p {
  margin: 8px 0 0;
  color: var(--plum);
  line-height: 1.35;
}

.ai-ranking-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.ai-ranking-row:first-of-type {
  margin-top: 8px;
}

.ai-ranking-row > span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--plum);
  color: var(--white);
  font-weight: 900;
}

.ai-ranking-row > span.positive {
  background: #18845d;
}

.ai-ranking-row > span.negative {
  background: #b00020;
}

.ai-ranking-row strong,
.ai-ranking-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-ranking-row strong {
  color: var(--plum);
  line-height: 1.2;
}

.ai-ranking-row small {
  color: var(--muted);
  font-size: 0.74rem;
}

.ai-ranking-row em {
  color: var(--berry);
  font-style: normal;
  font-weight: 900;
}

.ai-review-panel {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: var(--radius);
  background: rgba(245, 241, 234, 0.7);
}

.ai-review-head,
.ai-review-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ai-review-head strong {
  color: var(--plum);
  font-size: 1.15rem;
}

.ai-review-panel p {
  margin: 0;
  color: var(--plum);
  line-height: 1.35;
}

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

.ai-criteria-grid span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 7px 8px;
  border-radius: var(--radius);
  background: var(--white);
  text-transform: none;
}

.ai-criteria-grid strong {
  color: var(--plum);
}

.ai-status-green {
  border-color: #18845d;
  background-color: #18845d;
}

.ai-status-yellow {
  border-color: #c78100;
  background-color: #c78100;
}

.ai-status-red,
.ai-status-failed {
  border-color: #b00020;
  background-color: #b00020;
}

.ai-status-pending {
  border-color: var(--lavender);
  background-color: var(--plum);
}

.ai-review-panel.ai-status-green,
.ai-review-panel.ai-status-yellow,
.ai-review-panel.ai-status-red,
.ai-review-panel.ai-status-pending,
.ai-review-panel.ai-status-failed {
  background: rgba(245, 241, 234, 0.7);
}

.upload-ai-message {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  border-left: 4px solid var(--berry);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--plum);
}

.upload-ai-message strong,
.upload-ai-message span,
.upload-ai-message em {
  display: block;
  font-style: normal;
}

.upload-ai-message span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.upload-ai-message.ai-status-green,
.upload-ai-message.ai-status-yellow,
.upload-ai-message.ai-status-red,
.upload-ai-message.ai-status-pending,
.upload-ai-message.ai-status-failed {
  background: var(--white);
}

.upload-ai-message.ai-status-green {
  border-left-color: #18845d;
}

.upload-ai-message.ai-status-yellow {
  border-left-color: #c78100;
}

.upload-ai-message.ai-status-red,
.upload-ai-message.ai-status-failed {
  border-left-color: #b00020;
}

.analytics-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.analytics-hero h2 {
  margin: 0;
}

.analytics-controls {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.analytics-date-field,
.analytics-product-field {
  display: grid;
  gap: 5px;
}

.analytics-date-field span,
.analytics-fixed-field span,
.analytics-product-field span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.analytics-date-field input,
.analytics-product-field input,
.analytics-product-field select {
  min-height: 50px;
  min-width: 168px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--plum);
  font-weight: 800;
}

.analytics-compare-field span {
  color: var(--berry);
}

.analytics-compare-field input {
  background: #fff8fb;
  border-color: rgba(172, 10, 83, 0.22);
}

.analytics-fixed-field {
  display: grid;
  gap: 5px;
  min-width: 170px;
}

.analytics-fixed-field strong {
  display: flex;
  min-height: 50px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--plum);
  font-size: 0.88rem;
}

.analytics-live-button,
.analytics-export-button {
  min-height: 50px;
  white-space: nowrap;
}

.analytics-live-status {
  min-height: 20px;
  margin: -6px 0 16px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.analytics-live-status.warn {
  color: var(--berry);
}

.analytics-range-switch,
.analytics-amount-switch {
  display: inline-grid;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream);
}

.analytics-range-switch {
  grid-template-columns: repeat(4, minmax(82px, 1fr));
}

.analytics-amount-switch {
  grid-template-columns: repeat(2, minmax(86px, 1fr));
}

.analytics-range-switch button,
.analytics-amount-switch button {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 800;
}

.analytics-range-switch button.active,
.analytics-range-switch button:hover,
.analytics-amount-switch button.active,
.analytics-amount-switch button:hover {
  background: var(--plum);
  color: var(--white);
}

.analytics-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.analytics-insight {
  min-width: 0;
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.analytics-insight span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.analytics-insight strong {
  display: block;
  margin-top: 8px;
  color: var(--plum);
  font-size: clamp(0.98rem, 1.35vw, 1.14rem);
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.analytics-insight small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.35;
}

.analytics-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.analytics-kpi {
  min-width: 0;
  min-height: 116px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 12px 28px rgba(57, 45, 80, 0.08);
}

.analytics-kpi span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.analytics-kpi strong {
  display: block;
  margin-top: 10px;
  color: var(--plum);
  font-size: 1.42rem;
  line-height: 1.08;
  overflow-wrap: normal;
  word-break: normal;
}

.analytics-kpi small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.35;
}

.analytics-comparison-kpi {
  border-color: rgba(172, 10, 83, 0.2);
  background: #fff8fb;
}

.analytics-comparison-kpi.positive {
  border-left: 4px solid #2d8a57;
}

.analytics-comparison-kpi.negative {
  border-left: 4px solid var(--berry);
}

.analytics-comparison-kpi.neutral,
.analytics-comparison-kpi.missing {
  border-left: 4px solid var(--lavender);
}

.analytics-details-toggle {
  appearance: none;
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 116px;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--plum);
  cursor: pointer;
  text-align: left;
  box-shadow: 0 12px 28px rgba(57, 45, 80, 0.08);
}

.analytics-details-toggle:hover,
.analytics-details-toggle.active {
  border-color: rgba(172, 10, 83, 0.35);
  background: rgba(189, 194, 255, 0.18);
}

.analytics-details-toggle span {
  color: var(--berry);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.analytics-details-toggle strong {
  display: block;
  margin-top: 10px;
  color: var(--plum);
  font-size: clamp(1.08rem, 1.8vw, 1.35rem);
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.analytics-details-toggle small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.35;
}

.analytics-details-panel {
  margin-bottom: 18px;
}

.analytics-analysis-panel {
  margin-bottom: 18px;
}

.analytics-analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.35fr);
  gap: 12px;
}

.analytics-analysis-card {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 12px;
  min-height: 180px;
  padding: 14px;
  border: 1px solid rgba(57, 45, 80, 0.1);
  border-radius: var(--radius);
  background: var(--cream);
}

.analytics-analysis-card-wide {
  grid-row: span 2;
}

.analytics-analysis-card-head,
.analytics-analysis-summary {
  display: grid;
  gap: 6px;
}

.analytics-analysis-card-head span,
.analytics-analysis-summary span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.analytics-analysis-card-head strong,
.analytics-analysis-summary strong {
  color: var(--plum);
  font-size: clamp(0.98rem, 1.45vw, 1.18rem);
  line-height: 1.16;
  overflow-wrap: anywhere;
}

.analytics-analysis-summary small {
  color: var(--muted);
  line-height: 1.35;
}

.analytics-signal-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.analytics-signal-list li {
  padding: 10px 12px;
  border-left: 4px solid var(--berry);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--plum);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
}

.analytics-line-chart {
  width: 100%;
  min-height: 190px;
  color: var(--berry);
}

.analytics-line-chart line {
  stroke: rgba(57, 45, 80, 0.16);
  stroke-width: 2;
}

.analytics-line-chart .muted-grid {
  stroke-dasharray: 6 8;
}

.analytics-line-chart polygon {
  fill: rgba(172, 10, 83, 0.1);
}

.analytics-line-chart polyline {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 5;
}

.analytics-lifetime-chart .store-line {
  stroke: var(--plum);
  stroke-dasharray: 10 8;
  stroke-width: 4;
}

.analytics-lifetime-chart .revenue-line {
  stroke: var(--berry);
}

.analytics-line-chart circle {
  fill: var(--berry);
  stroke: var(--white);
  stroke-width: 4;
}

.analytics-line-chart text {
  fill: var(--muted);
  font-size: 18px;
  font-weight: 800;
}

.analytics-line-chart .end-label,
.analytics-line-chart .max-label {
  text-anchor: end;
}

.analytics-line-chart .store-label {
  fill: var(--plum);
  font-size: 14px;
  text-anchor: end;
}

.analytics-chart-note {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.35;
}

.analytics-hourly-card {
  grid-column: 1 / -1;
  min-height: 0;
}

.analytics-hourly-card .analytics-analysis-card-head small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.4;
}

.analytics-hourly-list {
  display: grid;
  gap: 16px;
}

.analytics-hourly-store {
  min-width: 0;
  padding-top: 14px;
  border-top: 1px solid rgba(57, 45, 80, 0.12);
}

.analytics-hourly-store-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.analytics-hourly-store-head div,
.analytics-hourly-store-head strong,
.analytics-hourly-store-head small {
  display: block;
  min-width: 0;
}

.analytics-hourly-store-head strong {
  color: var(--plum);
  font-size: 0.98rem;
  overflow-wrap: anywhere;
}

.analytics-hourly-store-head small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

.analytics-hourly-store-head em {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid rgba(180, 35, 24, 0.24);
  border-radius: 6px;
  background: #fff1f0;
  color: #b42318;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.analytics-hourly-store-head em.warning {
  border-color: rgba(138, 86, 0, 0.25);
  background: #fff8e8;
  color: #8a5600;
}

.analytics-hourly-scroll {
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 3px;
}

.analytics-hourly-chart {
  display: grid;
  grid-template-columns: repeat(var(--hour-count), minmax(26px, 1fr));
  gap: 5px;
  min-width: min(560px, calc(var(--hour-count) * 34px));
  height: 174px;
  padding-top: 8px;
}

.analytics-hourly-column {
  display: grid;
  grid-template-rows: 146px 20px;
  min-width: 0;
  text-align: center;
}

.analytics-hourly-track {
  display: flex;
  align-items: flex-end;
  height: 146px;
  overflow: hidden;
  border-bottom: 1px solid rgba(57, 45, 80, 0.18);
}

.analytics-hourly-track span {
  display: block;
  width: 100%;
  min-height: 0;
  background: var(--berry);
}

.analytics-hourly-column.warning .analytics-hourly-track span {
  background: #c98200;
}

.analytics-hourly-column.critical .analytics-hourly-track span {
  background: #b42318;
}

.analytics-hourly-column.recovery .analytics-hourly-track span {
  background: #238b57;
}

.analytics-hourly-column small {
  padding-top: 5px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

@media (max-width: 640px) {
  .analytics-hourly-store-head {
    display: grid;
    gap: 8px;
  }

  .analytics-hourly-store-head em {
    justify-self: start;
    white-space: normal;
  }

  .analytics-hourly-chart {
    min-width: max(520px, calc(var(--hour-count) * 32px));
  }
}

.analytics-lifetime-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.analytics-lifetime-summary div {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(57, 45, 80, 0.08);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
}

.analytics-lifetime-summary span,
.analytics-lifetime-summary small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.analytics-lifetime-summary span {
  text-transform: uppercase;
}

.analytics-lifetime-summary strong {
  display: block;
  margin-top: 5px;
  color: var(--plum);
  line-height: 1.16;
  overflow-wrap: anywhere;
}

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

.analytics-trend-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  padding: 10px 0;
  border-top: 1px solid rgba(57, 45, 80, 0.1);
}

.analytics-trend-row strong {
  overflow: hidden;
  color: var(--plum);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-trend-row span {
  color: #127046;
  font-weight: 900;
}

.analytics-trend-row.negative span {
  color: var(--berry);
}

.analytics-trend-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-weight: 800;
}

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

.analytics-warning-panel {
  margin-bottom: 18px;
  border-color: rgba(172, 10, 83, 0.18);
  background: linear-gradient(135deg, #fffdf9 0%, #fff4f6 100%);
}

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

.analytics-warning-head h3 {
  margin: 0;
  color: var(--plum);
  font-size: 1.08rem;
  overflow-wrap: anywhere;
}

.analytics-warning-head small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.analytics-warning-head strong {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(172, 10, 83, 0.1);
  color: var(--berry);
  font-size: 0.82rem;
  white-space: nowrap;
}

.analytics-alert-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
}

.analytics-alert {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(57, 45, 80, 0.1);
  border-left: 4px solid #df8b8d;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
}

.analytics-alert.critical {
  border-left-color: var(--berry);
}

.analytics-alert.info {
  border-left-color: var(--plum);
}

.analytics-alert.positive {
  border-left-color: #3da171;
  background: rgba(61, 161, 113, 0.08);
}

.analytics-alert strong {
  color: var(--plum);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.analytics-alert span {
  color: var(--berry);
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.analytics-alert.positive span {
  color: #28784d;
}

.analytics-alert small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.analytics-positive-block {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.analytics-positive-block > span {
  color: #28784d;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.analytics-detail-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(57, 45, 80, 0.1);
  border-radius: var(--radius);
  background: var(--cream);
}

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

.analytics-detail-card-head strong {
  min-width: 0;
  color: var(--plum);
  font-size: 1rem;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.analytics-detail-card-head span {
  flex: 0 0 auto;
  color: var(--berry);
  font-weight: 900;
  white-space: nowrap;
}

.analytics-store-mini-row,
.analytics-store-warning-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.analytics-store-mini-row span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.analytics-store-average {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
}

.analytics-store-warning-list em,
.store-tile-alerts em,
.analytics-product-badges em {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(223, 139, 141, 0.2);
  color: var(--berry);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
  white-space: normal;
}

.analytics-store-warning-list em.critical,
.store-tile-alerts em.critical {
  background: rgba(172, 10, 83, 0.12);
  color: var(--berry);
}

.analytics-store-warning-list em.info,
.store-tile-alerts em.info {
  background: rgba(57, 45, 80, 0.08);
  color: var(--plum);
}

.analytics-store-warning-list em.positive,
.store-tile-alerts em.positive {
  background: rgba(61, 161, 113, 0.14);
  color: #28784d;
}

.analytics-store-warning-list.compact {
  margin-top: -4px;
}

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

.analytics-detail-columns h4 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.analytics-detail-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  padding: 8px 0;
  border-top: 1px solid rgba(57, 45, 80, 0.1);
}

.analytics-detail-row span {
  color: var(--plum);
  font-weight: 800;
}

.analytics-detail-row .analytics-currency-pair {
  align-self: start;
}

.analytics-detail-row em {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
}

.analytics-detail-note {
  margin: 0;
  padding: 10px 0;
  border-top: 1px solid rgba(57, 45, 80, 0.1);
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.analytics-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 18px;
  align-items: start;
}

.product-performance-panel {
  margin-bottom: 18px;
}

.analytics-product-field {
  min-width: min(360px, 100%);
}

.analytics-controls .analytics-store-field {
  min-width: min(260px, 100%);
}

.analytics-product-field select {
  width: 100%;
}

.analytics-product-field input {
  width: 100%;
  padding: 0 14px;
}

.analytics-product-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
}

.analytics-sync-panel {
  margin-top: 18px;
  margin-bottom: 18px;
}

.analytics-backfill-actions,
.analytics-backfill-controls {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.analytics-check-field {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--plum);
  font-weight: 800;
}

.analytics-check-field input {
  width: 18px;
  height: 18px;
  accent-color: var(--berry);
}

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

.analytics-backfill-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(57, 45, 80, 0.1);
  border-radius: var(--radius);
  background: var(--cream);
}

.analytics-backfill-row strong,
.analytics-backfill-row span,
.analytics-backfill-row small {
  display: block;
}

.analytics-backfill-row strong {
  color: var(--plum);
  font-size: 0.88rem;
}

.analytics-backfill-row span,
.analytics-backfill-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.analytics-backfill-row b {
  color: var(--muted);
  font-size: 0.8rem;
}

.sync-job-status {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(189, 194, 255, 0.4);
  color: var(--plum);
  font-size: 0.76rem;
  font-style: normal;
  font-weight: 900;
}

.sync-job-status.done {
  background: rgba(61, 161, 113, 0.14);
  color: #28784d;
}

.sync-job-status.failed {
  background: rgba(172, 10, 83, 0.1);
  color: var(--berry);
}

.sync-job-status.running {
  background: rgba(223, 139, 141, 0.22);
  color: var(--berry);
}

.product-metric {
  min-width: 0;
  min-height: 92px;
  padding: 14px;
  border: 1px solid rgba(57, 45, 80, 0.1);
  border-radius: var(--radius);
  background: var(--cream);
}

.product-metric span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.product-metric strong {
  display: block;
  margin-top: 8px;
  color: var(--plum);
  font-size: clamp(1rem, 1.55vw, 1.16rem);
  line-height: 1.14;
  overflow-wrap: anywhere;
}

.product-metric small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.analytics-product-dashboard {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.analytics-product-dashboard-head {
  display: flex;
  min-width: 0;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.analytics-product-dashboard-head span,
.analytics-product-missing > span,
.analytics-product-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.analytics-product-dashboard-head small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.analytics-product-dashboard-head strong {
  color: var(--berry);
  font-size: 1.1rem;
  overflow-wrap: anywhere;
}

.analytics-product-dashboard-list {
  display: grid;
  gap: 8px;
  max-height: 620px;
  overflow: auto;
  padding-right: 4px;
}

.analytics-product-groups {
  display: grid;
  min-width: 0;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(172, 10, 83, 0.16);
  border-radius: var(--radius);
  background: var(--cream);
}

.analytics-product-groups-head {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.analytics-product-groups-head span,
.analytics-product-group-card span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.analytics-product-groups-head small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 750;
}

.analytics-product-groups-head strong {
  color: var(--berry);
  font-size: 1.1rem;
}

.analytics-product-groups-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.analytics-product-groups-actions button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid rgba(172, 10, 83, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  color: var(--berry);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 900;
}

.analytics-product-group-grid {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.analytics-product-group-card {
  display: grid;
  min-width: 0;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(57, 45, 80, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.analytics-product-group-card:hover,
.analytics-product-group-card:focus-visible,
.analytics-product-groups-actions button:hover,
.analytics-product-groups-actions button:focus-visible {
  border-color: rgba(172, 10, 83, 0.46);
  box-shadow: 0 10px 28px rgba(172, 10, 83, 0.1);
  outline: none;
}

.analytics-product-group-card.active {
  border-color: rgba(172, 10, 83, 0.7);
  box-shadow: inset 0 0 0 2px rgba(172, 10, 83, 0.18), 0 12px 30px rgba(172, 10, 83, 0.12);
}

.analytics-product-group-card strong {
  display: block;
  min-width: 0;
  margin-top: 4px;
  color: var(--berry);
  font-size: 1.08rem;
  overflow-wrap: anywhere;
}

.analytics-product-group-card small,
.analytics-product-group-card em {
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
}

.analytics-product-group-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(57, 45, 80, 0.1);
}

.analytics-product-group-track b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--berry);
}

.analytics-product-chart-card {
  display: grid;
  min-width: 0;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(172, 10, 83, 0.16);
  border-radius: var(--radius);
  background: var(--cream);
}

.analytics-product-chart-head {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.analytics-product-chart-head span,
.analytics-product-quantity > span,
.analytics-product-chart-metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.analytics-product-chart-head strong {
  display: block;
  min-width: 0;
  margin-top: 4px;
  color: var(--plum);
  font-size: 1.2rem;
  overflow-wrap: anywhere;
}

.analytics-product-chart-head small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 750;
  line-height: 1.35;
}

.analytics-product-chart-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(86px, auto));
  gap: 8px;
}

.analytics-product-chart-metrics em {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(57, 45, 80, 0.1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  font-style: normal;
}

.analytics-product-chart-metrics strong {
  margin-top: 4px;
  color: var(--berry);
  font-size: 1rem;
}

.analytics-product-quantity {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.analytics-product-quantity-list {
  display: grid;
  gap: 7px;
}

.analytics-product-quantity-row {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(82px, 0.28fr) minmax(0, 1fr) minmax(52px, auto);
  gap: 8px;
  align-items: center;
}

.analytics-product-quantity-row small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.analytics-product-quantity-row strong {
  color: var(--plum);
  font-size: 0.86rem;
  text-align: right;
}

.analytics-product-quantity-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(57, 45, 80, 0.1);
}

.analytics-product-quantity-track b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--berry);
}

.analytics-product-row {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(90px, 0.45fr)) minmax(0, 1.4fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid rgba(57, 45, 80, 0.1);
  border-radius: var(--radius);
  background: var(--cream);
}

.analytics-product-main strong,
.analytics-product-stat strong,
.analytics-product-missing strong {
  display: block;
  min-width: 0;
  color: var(--plum);
  font-weight: 900;
  overflow-wrap: anywhere;
}

.analytics-product-main small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.analytics-product-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.analytics-product-badges em {
  background: rgba(189, 194, 255, 0.34);
  color: var(--plum);
}

.analytics-product-stat strong {
  margin-top: 6px;
  color: var(--berry);
}

.analytics-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.analytics-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(172, 10, 83, 0.08);
  color: var(--berry);
  font-size: 0.78rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
  white-space: normal;
}

.analytics-chip.muted {
  background: rgba(57, 45, 80, 0.08);
  color: var(--plum);
}

.analytics-side {
  display: grid;
  gap: 18px;
}

.analytics-panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: 0 12px 32px rgba(57, 45, 80, 0.08);
}

.analytics-panel-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.analytics-panel-heading h3 {
  margin: 0;
  color: var(--plum);
  font-size: 1.08rem;
}

.analytics-panel-heading span {
  max-width: 52ch;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-align: right;
}

.store-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

.store-tile {
  display: grid;
  min-width: 0;
  overflow: hidden;
  gap: 9px;
  min-height: 188px;
  padding: 14px;
  border: 1px solid rgba(57, 45, 80, 0.12);
  border-radius: var(--radius);
  background: #fffdf9;
  color: inherit;
  text-align: left;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.store-tile:hover,
.store-tile:focus-visible {
  border-color: rgba(172, 10, 83, 0.34);
  box-shadow: 0 10px 26px rgba(57, 45, 80, 0.1);
  transform: translateY(-1px);
  outline: 0;
}

.analytics-live-progress-text {
  display: block;
}

.analytics-live-progress-bar {
  display: block;
  width: min(320px, 100%);
  height: 8px;
  margin-top: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(57, 45, 80, 0.12);
}

.analytics-live-progress-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--berry);
}

.analytics-provider-statuses {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.analytics-provider-status {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid rgba(57, 45, 80, 0.12);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
}

.analytics-provider-status strong,
.analytics-provider-status small {
  font-size: 0.7rem;
}

.analytics-provider-status strong {
  color: var(--plum);
}

.analytics-provider-status.running {
  border-color: rgba(172, 10, 83, 0.35);
  background: rgba(172, 10, 83, 0.04);
}

.analytics-provider-status.done {
  border-color: rgba(40, 120, 77, 0.3);
  background: rgba(40, 120, 77, 0.06);
}

.analytics-provider-status.cached {
  border-color: rgba(161, 100, 9, 0.25);
  background: rgba(161, 100, 9, 0.06);
}

.analytics-provider-status.error {
  border-color: rgba(172, 10, 83, 0.35);
  color: var(--berry);
}

.store-tile strong {
  min-width: 0;
  color: var(--plum);
  font-size: 1rem;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.store-tile-head {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.store-health-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(189, 194, 255, 0.42);
  color: var(--plum);
  font-size: 0.72rem;
  font-weight: 900;
  white-space: nowrap;
}

.store-health-pill.green {
  background: rgba(61, 161, 113, 0.15);
  color: #28784d;
}

.store-health-pill.yellow {
  background: rgba(240, 178, 78, 0.18);
  color: #99600f;
}

.store-health-pill.red {
  background: rgba(172, 10, 83, 0.12);
  color: var(--berry);
}

.store-tile-alerts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.store-tile-value {
  min-width: 0;
}

.analytics-currency-pair {
  display: inline-grid;
  min-width: 0;
  justify-items: end;
  gap: 2px;
  line-height: 1.1;
}

.analytics-currency-primary {
  min-width: 0;
  color: var(--berry);
  font-size: 0.94rem;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.analytics-currency-eur {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.analytics-currency-pair.compact .analytics-currency-primary {
  font-size: 0.82rem;
}

.analytics-currency-pair.compact .analytics-currency-eur {
  font-size: 0.62rem;
}

.store-tile-value .analytics-currency-pair {
  width: 100%;
  justify-items: start;
}

.store-tile-value .analytics-currency-primary {
  font-size: 1.22rem;
}

.store-tile-value .analytics-currency-eur {
  font-size: 0.72rem;
}

.store-average-basket {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
}

.store-average-basket .analytics-currency-pair,
.analytics-store-average .analytics-currency-pair {
  justify-items: start;
}

.store-source-line {
  min-width: 0;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 850;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.store-tile-meta {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.store-tile-meta span,
.store-tile-detail span,
.store-group-row span,
.store-group-row em {
  min-width: 0;
  overflow-wrap: anywhere;
}

.store-tile-detail {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.store-group-mix {
  display: grid;
  gap: 5px;
}

.store-group-row {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 42px;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.store-group-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(57, 45, 80, 0.1);
}

.store-group-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--plum);
}

.store-group-row:nth-child(2) .store-group-track span {
  background: var(--berry);
}

.store-bar {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(57, 45, 80, 0.1);
}

.store-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--berry);
}

.analytics-health-list,
.analytics-launch-list,
.analytics-mini-warning-list {
  display: grid;
  gap: 9px;
}

.analytics-health-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  align-items: center;
}

.analytics-health-row span {
  overflow: hidden;
  color: var(--plum);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-health-row strong {
  color: var(--berry);
}

.analytics-health-row strong.green {
  color: #28784d;
}

.analytics-health-row strong.yellow {
  color: #99600f;
}

.analytics-health-row em {
  grid-column: 1 / -1;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--berry), var(--plum));
}

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

.analytics-benchmark-grid div,
.analytics-store-mini-dashboard article {
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(57, 45, 80, 0.08);
  border-radius: var(--radius);
  background: var(--cream);
}

.analytics-benchmark-grid span,
.analytics-store-mini-dashboard span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.analytics-benchmark-grid strong,
.analytics-store-mini-dashboard strong {
  display: block;
  margin-top: 6px;
  color: var(--plum);
  line-height: 1.14;
  overflow-wrap: anywhere;
}

.analytics-benchmark-grid small,
.analytics-store-mini-dashboard small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.74rem;
}

.analytics-launch-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 10px;
  padding: 10px 0;
  border-top: 1px solid rgba(57, 45, 80, 0.1);
}

.analytics-launch-row strong {
  color: var(--plum);
  min-width: 0;
  overflow-wrap: anywhere;
}

.analytics-launch-row span {
  color: #28784d;
  font-weight: 900;
}

.analytics-launch-row small {
  grid-column: 1 / -1;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.analytics-mini-warning-list div {
  display: grid;
  gap: 2px;
  padding: 9px 0;
  border-top: 1px solid rgba(57, 45, 80, 0.1);
}

.analytics-mini-warning-list strong {
  color: var(--plum);
  min-width: 0;
  overflow-wrap: anywhere;
}

.analytics-mini-warning-list span {
  color: var(--berry);
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.analytics-mini-warning-list small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.analytics-mini-warning-list .positive span {
  color: #28784d;
}

.analytics-store-mini-dashboard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

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

.rank-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 54px;
  padding: 10px;
  border: 1px solid rgba(57, 45, 80, 0.1);
  border-radius: var(--radius);
  background: var(--cream);
}

.rank-row span:first-child {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--plum);
  color: var(--white);
  font-size: 0.76rem;
  font-weight: 900;
}

.rank-row strong {
  display: block;
  overflow: hidden;
  color: var(--plum);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-row small {
  color: var(--muted);
  font-size: 0.74rem;
}

.rank-row em {
  color: var(--berry);
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
  text-align: right;
}

.rank-row .analytics-currency-pair {
  max-width: 150px;
  text-align: right;
}

.analytics-analysis-card-head .analytics-currency-pair {
  justify-items: end;
}

.project-pages-header {
  align-items: flex-start;
}

.project-pages-intro {
  max-width: 680px;
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

#projectPageMessage {
  min-height: 22px;
  margin: 0 0 10px;
}

.project-admin-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(380px, 1.2fr);
  overflow: hidden;
  border: 1px solid rgba(57, 45, 80, 0.12);
  border-radius: 8px;
  background: #fff;
}

.project-admin-pane {
  min-width: 0;
  padding: 20px;
}

.project-admin-pane + .project-admin-pane {
  border-left: 1px solid rgba(57, 45, 80, 0.12);
}

.project-admin-pane-head,
.project-task-workspace-head,
.project-admin-task-title,
.project-page-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.project-admin-pane-head {
  margin-bottom: 16px;
}

.project-admin-pane-head h3,
.project-admin-pane-head h4,
.project-task-workspace-head h3 {
  margin: 2px 0 0;
  color: var(--plum);
  font-size: 1rem;
  letter-spacing: 0;
}

.project-admin-label {
  color: var(--berry);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

.project-page-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(57, 45, 80, 0.1);
  border-radius: 8px;
  background: var(--cream);
}

.project-page-item.selected {
  border-color: rgba(172, 10, 83, 0.55);
  box-shadow: inset 3px 0 0 var(--berry);
}

.project-page-select {
  display: grid;
  min-width: 0;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.project-page-item-head strong {
  min-width: 0;
  color: var(--plum);
  overflow-wrap: anywhere;
}

.project-page-item-head em,
.project-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 900;
}

.project-page-item-head em.active,
.project-status.done {
  background: rgba(40, 120, 77, 0.13);
  color: #28784d;
}

.project-page-item-head em.inactive,
.project-status.open {
  background: rgba(57, 45, 80, 0.1);
  color: var(--muted);
}

.project-status.in_progress {
  background: rgba(240, 178, 78, 0.2);
  color: #8b590f;
}

.project-page-url {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.project-page-progress,
.project-task-progress {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.project-page-progress i,
.project-task-progress i {
  display: block;
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(57, 45, 80, 0.1);
}

.project-page-progress b,
.project-task-progress b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--berry);
}

.project-page-progress small,
.project-task-progress small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
}

.project-page-actions,
.project-admin-task-actions,
.project-form-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.project-page-actions {
  align-self: start;
}

.project-page-actions .icon-button,
.project-admin-task-actions .icon-button {
  width: 32px;
  height: 32px;
  min-height: 32px;
  text-decoration: none;
}

.icon-button.danger {
  color: var(--berry);
}

.project-page-form {
  display: grid;
  align-content: start;
  gap: 14px;
}

.project-url-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.project-url-field:focus-within {
  border-color: var(--berry);
  box-shadow: 0 0 0 2px rgba(172, 10, 83, 0.08);
}

.project-url-field > span {
  padding: 0 0 0 12px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  white-space: nowrap;
}

.project-url-field input {
  min-width: 0;
  border: 0;
  box-shadow: none;
}

.project-page-active-field {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--plum);
  font-weight: 800;
}

.project-page-active-field input {
  width: 18px;
  height: 18px;
}

.project-form-actions {
  justify-content: flex-end;
}

.project-task-workspace {
  margin-top: 18px;
  padding-top: 20px;
  border-top: 1px solid rgba(57, 45, 80, 0.14);
}

.project-task-workspace-head {
  margin-bottom: 18px;
}

.project-task-workspace-head a {
  display: inline-block;
  margin-top: 5px;
  color: var(--berry);
  font-size: 0.8rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.project-task-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.project-task-summary span {
  min-width: 90px;
  padding: 8px 10px;
  border-left: 2px solid var(--berry);
  background: rgba(172, 10, 83, 0.04);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.project-task-summary strong {
  display: block;
  color: var(--plum);
  font-size: 1rem;
}

.project-task-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(0, 1.3fr);
  gap: 18px;
  align-items: start;
}

.project-task-form {
  display: grid;
  gap: 13px;
  padding: 16px;
  border: 1px solid rgba(57, 45, 80, 0.12);
  border-radius: 8px;
  background: #fff;
}

.project-progress-field > span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.project-progress-field output {
  color: var(--berry);
}

.project-progress-field input[type="range"] {
  padding: 0;
  accent-color: var(--berry);
}

.project-admin-task-list {
  display: grid;
  gap: 8px;
}

.project-admin-task {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 13px;
  border: 1px solid rgba(57, 45, 80, 0.1);
  border-radius: 8px;
  background: #fff;
}

.project-admin-task.done {
  background: rgba(40, 120, 77, 0.035);
}

.project-task-check {
  display: grid;
  width: 24px;
  height: 24px;
  padding: 0;
  place-items: center;
  border: 2px solid rgba(57, 45, 80, 0.28);
  border-radius: 50%;
  background: #fff;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.project-admin-task.done .project-task-check {
  border-color: #28784d;
  background: #28784d;
}

.project-admin-task-copy {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.project-admin-task-title strong {
  min-width: 0;
  color: var(--plum);
  overflow-wrap: anywhere;
}

.project-admin-task.done .project-admin-task-title strong {
  color: var(--muted);
  text-decoration: line-through;
}

.project-admin-task-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.4;
  white-space: pre-line;
}

.project-admin-task-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 12px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.project-admin-task-meta .project-task-progress {
  width: min(170px, 100%);
}

.project-empty-state {
  display: grid;
  gap: 4px;
  padding: 24px 12px;
  color: var(--muted);
  text-align: center;
}

.project-empty-state strong {
  color: var(--plum);
}

#projectPagesView.is-loading {
  cursor: progress;
}

@media (max-width: 900px) {
  .project-admin-layout,
  .project-task-layout {
    grid-template-columns: 1fr;
  }

  .project-admin-pane + .project-admin-pane {
    border-top: 1px solid rgba(57, 45, 80, 0.12);
    border-left: 0;
  }
}

@media (max-width: 600px) {
  .project-pages-header,
  .project-task-workspace-head {
    align-items: stretch;
    flex-direction: column;
  }

  .project-pages-header .primary-button {
    width: 100%;
  }

  .project-admin-pane {
    padding: 15px;
  }

  .project-page-item,
  .project-admin-task {
    grid-template-columns: 1fr;
  }

  .project-page-actions,
  .project-admin-task-actions,
  .project-task-summary {
    justify-content: flex-start;
  }

  .project-task-summary span {
    flex: 1 1 90px;
  }

  .project-task-check {
    grid-row: 1;
  }

  .project-url-field {
    grid-template-columns: 1fr;
  }

  .project-url-field > span {
    padding: 10px 12px 0;
  }
}

.feed-card {
  display: grid;
  gap: 14px;
  width: 100%;
  margin: 0 0 18px;
  padding: 16px;
  -webkit-column-break-inside: avoid;
  break-inside: avoid;
  page-break-inside: avoid;
}

.feed-card header,
.feed-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.feed-actions {
  flex-wrap: wrap;
}

.feed-card h3 {
  margin: 0 0 4px;
  color: var(--plum);
}

.feed-location-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.feed-location-heading h3 {
  margin: 0 0 4px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.location-edit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--cream);
  color: var(--berry);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.location-edit-button:hover,
.location-edit-button:focus {
  border-color: var(--berry);
  outline: none;
}

.feed-location-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}

.feed-location-editor[hidden] {
  display: none;
}

.feed-location-editor select {
  min-width: 0;
}

.feed-card p {
  margin: 0;
  color: var(--muted);
}

.feed-badge {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(189, 194, 255, 0.34);
  color: var(--plum);
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.feed-type-control {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.feed-comment {
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  border-left: 3px solid var(--rose);
  background: var(--cream);
  color: var(--plum);
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.empty-state {
  padding: 32px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.reminder-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.campaign-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.18fr);
  gap: 22px;
  align-items: start;
}

.survey-admin-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
  gap: 22px;
  align-items: start;
}

.survey-voting-layout {
  display: grid;
  max-width: 920px;
  grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1.45fr);
  gap: 22px;
  align-items: start;
}

.survey-location-panel,
.survey-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.survey-location-panel {
  position: sticky;
  top: 20px;
  padding: 18px;
}

.survey-location-panel p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.survey-list,
.survey-option-editor {
  display: grid;
  gap: 12px;
}

.survey-option-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 8px;
  align-items: center;
}

.survey-option-row .icon-button {
  width: 40px;
  height: 40px;
  color: var(--berry);
}

.survey-card {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.survey-card header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.survey-card h3,
.survey-card h4 {
  margin: 0;
  color: var(--plum);
  font-size: 1.08rem;
  line-height: 1.35;
}

.survey-card header small,
.survey-card-meta {
  color: var(--muted);
  font-size: 0.76rem;
}

.survey-answer-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.survey-answer-option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf9;
  color: var(--plum);
  cursor: pointer;
}

.survey-answer-option:has(input:checked) {
  border-color: var(--berry);
  background: #fff4f8;
}

.survey-answer-option input {
  width: 18px;
  height: 18px;
  min-height: auto;
  margin: 0;
  accent-color: var(--berry);
}

.survey-answer-option span {
  font-weight: 700;
}

.survey-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.survey-card-message {
  min-height: 18px;
  margin: 0;
  color: var(--berry);
  font-size: 0.8rem;
  font-weight: 700;
}

.survey-result-bars {
  display: grid;
  gap: 10px;
}

.survey-result-row {
  display: grid;
  gap: 6px;
}

.survey-result-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--plum);
  font-size: 0.82rem;
}

.survey-store-results {
  display: grid;
  gap: 8px;
}

.survey-store-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(100px, 0.6fr) auto;
  gap: 12px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  color: var(--plum);
  font-size: 0.8rem;
}

.survey-store-row time {
  color: var(--muted);
  text-align: right;
}

.survey-missing-stores {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.survey-status {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: var(--radius);
  background: #e7f3ea;
  color: #23683b;
  font-size: 0.72rem;
  font-weight: 700;
}

.survey-status.closed {
  background: #efedf0;
  color: var(--muted);
}

.survey-admin-actions {
  display: flex;
  justify-content: flex-end;
}

.partner-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 22px;
  align-items: start;
  margin-bottom: 18px;
}

.partner-command-layout {
  grid-template-columns: minmax(280px, 0.74fr) minmax(360px, 1.26fr);
}

.partner-users-panel {
  margin-bottom: 18px;
}

.whatsapp-control-panel {
  align-content: start;
  border: 1px solid rgba(172, 10, 83, 0.14);
  background:
    linear-gradient(135deg, rgba(189, 194, 255, 0.2), rgba(255, 255, 255, 0) 58%),
    var(--white);
}

.automation-date-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf9;
}

.automation-date-card span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.automation-date-card strong {
  color: var(--plum);
  font-size: 1.25rem;
}

.campaign-panel {
  display: grid;
  gap: 18px;
  padding: 18px;
}

.campaign-panel h3 {
  margin: 0;
  color: var(--plum);
}

.campaign-daily-toggle {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(172, 10, 83, 0.2);
  border-radius: var(--radius);
  background: #fff8fb;
  color: var(--plum);
}

.campaign-daily-toggle input {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  accent-color: var(--berry);
}

.campaign-daily-toggle span {
  display: grid;
  gap: 4px;
}

.campaign-daily-toggle small {
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
}

.campaign-daily-range[hidden] {
  display: none;
}

.campaign-schedule-editor {
  margin: 14px 0;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.campaign-schedule-editor summary {
  cursor: pointer;
  color: var(--plum);
  font-weight: 700;
}

.campaign-schedule-editor form {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.campaign-schedule-editor .field,
.campaign-schedule-editor input {
  min-width: 0;
}

.campaign-frequency-label {
  display: inline-flex;
  width: fit-content;
  margin-top: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(172, 10, 83, 0.1);
  color: var(--berry);
  font-size: 0.72rem;
  font-weight: 900;
}

.launch-email-tool {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(172, 10, 83, 0.14);
  border-radius: var(--radius);
  background: #fffdf9;
}

.launch-email-tool textarea {
  min-height: 150px;
}

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

.campaign-target-header > span {
  color: var(--plum);
  font-size: 0.82rem;
  font-weight: 700;
}

.campaign-target-header > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compact-button {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 0.78rem;
}

.campaign-target-grid {
  display: grid;
  max-height: 360px;
  overflow: auto;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf9;
}

.campaign-target {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 8px;
  border-radius: var(--radius);
  color: var(--plum);
  font-size: 0.82rem;
}

.campaign-target input {
  width: 16px;
  height: 16px;
  min-height: auto;
  accent-color: var(--berry);
}

.campaign-list {
  display: grid;
  gap: 16px;
}

.campaign-card {
  display: grid;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.campaign-card:first-child {
  padding-top: 0;
  border-top: 0;
}

.campaign-card header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.campaign-card h4 {
  margin: 0 0 4px;
  color: var(--plum);
  font-size: 1.1rem;
}

.campaign-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.campaign-card header > strong {
  color: var(--berry);
  font-size: 1.45rem;
}

.progress-bar {
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: rgba(57, 45, 80, 0.1);
}

.progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--berry);
}

.campaign-progress-text {
  color: var(--plum);
  font-size: 0.86rem;
  font-weight: 700;
}

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

.campaign-status-grid strong {
  display: block;
  margin-bottom: 8px;
  color: var(--plum);
  font-size: 0.82rem;
}

.campaign-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.campaign-archive-block {
  margin-top: 12px;
}

.campaign-location-chip,
.empty-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}

.campaign-location-chip.editable {
  flex-wrap: wrap;
  padding-right: 5px;
}

.campaign-chip-label {
  overflow-wrap: anywhere;
}

.campaign-chip-actions {
  display: inline-flex;
  gap: 4px;
}

.campaign-chip-action {
  min-height: 22px;
  padding: 2px 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--plum);
  font-family: inherit;
  font-size: 0.66rem;
  font-weight: 800;
  cursor: pointer;
}

.campaign-chip-action:hover {
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(57, 45, 80, 0.16);
}

.campaign-chip-action:disabled {
  opacity: 0.55;
  cursor: wait;
}

.campaign-location-chip.missing {
  background: #fff7fa;
  color: var(--berry);
}

.campaign-location-chip.done {
  background: rgba(189, 194, 255, 0.34);
  color: var(--plum);
}

.campaign-location-chip.archived {
  background: var(--cream);
  color: var(--muted);
}

.campaign-location-chip.manual-done {
  box-shadow: inset 0 0 0 1px rgba(57, 45, 80, 0.12);
}

.campaign-location-chip small {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
}

.empty-inline {
  background: var(--cream);
  color: var(--muted);
}

.reminder-card {
  padding: 18px;
}

.reminder-card strong {
  display: block;
  margin: 6px 0 8px;
  color: var(--plum);
  font-size: 1.4rem;
}

.reminder-card p {
  margin: 0;
  color: var(--muted);
}

.missing-list,
.qr-list,
.storage-list,
.ai-reference-list,
.partner-user-list,
.whatsapp-log-list,
.partner-list {
  display: grid;
  gap: 10px;
}

.missing-item,
.storage-row,
.partner-user-card,
.partner-card,
.qr-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
}

.missing-item strong,
.storage-row strong,
.partner-user-card strong,
.partner-card strong,
.qr-row strong {
  display: block;
  color: var(--plum);
}

.storage-row span,
.partner-user-card span,
.partner-card span,
.helper-text {
  color: var(--muted);
  font-size: 0.78rem;
}

.maintenance-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.3fr) auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 18px;
  padding: 18px;
}

.maintenance-panel h3 {
  margin-bottom: 6px;
  color: var(--plum);
}

.maintenance-panel p {
  margin-bottom: 0;
  color: var(--muted);
}

.ai-reference-list {
  margin-top: 14px;
}

.ai-reference-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.ai-reference-thumb {
  display: grid;
  place-items: center;
  width: 96px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  background: var(--cream);
}

.ai-reference-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ai-reference-copy {
  min-width: 0;
}

.ai-reference-copy strong {
  display: block;
  color: var(--plum);
  font-size: 1rem;
}

.ai-reference-copy span,
.ai-reference-copy p {
  display: block;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.partner-card {
  grid-template-columns: minmax(260px, 1fr) minmax(150px, 0.3fr) minmax(240px, 0.8fr) auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

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

.partner-card-main > div:last-child {
  min-width: 0;
}

.partner-card-main span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.partner-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 50%;
  background: var(--berry);
  color: var(--white);
  font-size: 0.86rem;
  font-weight: 800;
}

.partner-card-status {
  display: grid;
  gap: 5px;
  justify-items: start;
}

.partner-card-status strong {
  font-size: 1.25rem;
}

.partner-location-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.partner-user-card {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(110px, 0.5fr) minmax(110px, 0.5fr);
}

.partner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.partner-edit-form {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  margin-top: 4px;
  padding: 16px;
  border: 1px solid rgba(189, 194, 255, 0.55);
  border-radius: var(--radius);
  background: #fffdf9;
}

.partner-edit-form[hidden] {
  display: none;
}

.partner-edit-form h4 {
  margin: 0;
  color: var(--plum);
}

.partner-edit-form small {
  color: var(--muted);
  font-size: 0.72rem;
}

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

.partner-edit-location-grid {
  max-height: 260px;
}

.partner-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.whatsapp-log-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.whatsapp-log-card strong {
  display: block;
  color: var(--plum);
}

.whatsapp-log-card span,
.whatsapp-log-card p {
  color: var(--muted);
  font-size: 0.78rem;
}

.whatsapp-log-card p {
  grid-column: 1 / -1;
  margin: 0;
}

.whatsapp-log-meta {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(189, 194, 255, 0.34);
  color: var(--plum);
  font-size: 0.74rem;
  font-weight: 800;
}

.status-pill.sent {
  background: rgba(44, 153, 111, 0.13);
  color: #166b4d;
}

.status-pill.failed {
  background: #fff0f5;
  color: var(--berry);
}

.alert-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 24px;
  align-items: start;
}

.alert-panel,
.alert-log-panel {
  min-width: 0;
}

.alert-form-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.alert-form-header h3 {
  margin: 0 0 6px;
  color: var(--plum);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
}

.alert-form-header p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.alert-recipient-list,
.alert-type-list,
.alert-log-list {
  display: grid;
  gap: 12px;
}

.alert-recipient-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(180px, 1fr) minmax(160px, 1fr) auto;
  gap: 12px;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.alert-recipient-row .field {
  margin: 0;
}

.alert-recipient-active {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 48px;
  color: var(--plum);
  font-weight: 800;
}

.alert-recipient-active input,
.alert-check input {
  width: 20px;
  height: 20px;
  accent-color: var(--berry);
}

.alert-type-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cream);
}

.alert-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--plum);
  font-weight: 900;
}

.alert-type-card small,
.alert-log-card small {
  color: var(--muted);
  font-weight: 700;
}

.alert-product-field {
  margin-top: 6px;
}

.alert-product-grid {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(240px, 1fr);
  gap: 12px;
  align-items: end;
}

.alert-product-hint {
  display: block;
  margin-top: 2px;
}

.alert-report-card {
  border-color: rgba(181, 0, 88, 0.28);
  background: #fff8fb;
}

.alert-weekly-report-card {
  border-color: rgba(35, 139, 87, 0.3);
  background: #f5fbf7;
}

.alert-hourly-report-card {
  border-color: rgba(179, 107, 0, 0.32);
  background: #fffbf2;
}

.alert-daily-launch-card {
  border-color: rgba(57, 45, 80, 0.3);
  background: #f7f5fa;
}

.alert-report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 12px;
  align-items: start;
}

.alert-weekly-report-grid {
  grid-template-columns: repeat(3, minmax(130px, 1fr));
}

.alert-report-grid > label:last-child {
  grid-column: 1 / -1;
}

.alert-report-grid textarea {
  min-height: 92px;
  resize: vertical;
}

.alert-report-actions {
  display: flex;
  justify-content: flex-start;
  margin-top: 4px;
}

.alert-report-message {
  margin: 0;
  min-height: 0;
}

.alert-report-message:empty {
  display: none;
}

.alert-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}

.alert-log-panel {
  margin-top: 24px;
}

.alert-log-card {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.alert-log-card strong,
.alert-log-card span {
  display: block;
}

.alert-log-card strong {
  color: var(--plum);
}

.alert-status {
  justify-self: end;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--plum);
  font-size: 0.85rem;
  font-weight: 900;
}

.alert-status.sent {
  background: rgba(44, 153, 111, 0.13);
  color: #166b4d;
}

.alert-status.failed {
  background: #fff0f5;
  color: var(--berry);
}

.status-pill.dry-run {
  background: var(--cream);
  color: var(--plum);
}

.danger-button {
  border-color: rgba(172, 10, 83, 0.3);
  color: var(--berry);
}

.qr-row code {
  display: block;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--plum);
  cursor: pointer;
  font-weight: 700;
}

.copy-button:hover {
  border-color: var(--berry);
  color: var(--berry);
}

.print-page {
  padding: 28px;
  background: var(--cream);
}

.print-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.qr-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.print-qr-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 128px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.print-qr-card img {
  width: 92px;
  height: 92px;
}

.print-qr-card strong,
.print-qr-card span,
.print-qr-card small {
  display: block;
}

.print-qr-card strong {
  margin-bottom: 4px;
  color: var(--plum);
}

.print-qr-card span,
.print-qr-card small {
  color: var(--muted);
  font-size: 0.74rem;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

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

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 10;
    gap: 0;
    padding: 0;
    min-height: auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .mobile-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 54px;
    padding: 8px 14px;
  }

  .mobile-nav-bar .brand-mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    font-size: 0.74rem;
  }

  .sidebar > .brand,
  .sidebar-note {
    display: none;
  }

  .partner-mode .app-shell {
    grid-template-columns: 1fr;
  }

  .partner-mode:not(.partner-portal-mode) .sidebar {
    display: none;
  }

  .partner-portal-mode .sidebar {
    display: flex;
    width: 100%;
    min-height: auto;
  }

  .nav-tabs {
    display: none;
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
    gap: 8px;
    padding: 0 14px 14px;
  }

  .mobile-menu-open .nav-tabs {
    display: grid;
  }

  .nav-tab {
    justify-content: center;
    min-width: 0;
    min-height: 42px;
    padding: 8px;
    font-size: 0.8rem;
  }

  .nav-tab strong {
    overflow: hidden;
    font-size: 0.78rem;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .partner-portal-mode .nav-tabs {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: visible;
  }

  .partner-portal-mode .nav-tab {
    display: none;
    min-width: 0;
  }

  .partner-portal-mode .nav-tab[data-view="upload"],
  .partner-portal-mode .nav-tab[data-view="surveys"],
  .partner-portal-mode .nav-tab[data-view="admin"] {
    display: flex;
  }

  .partner-portal-mode .nav-tab strong {
    display: block;
  }

  .main {
    padding: 18px;
  }

  h1 {
    font-size: 2.2rem;
  }

  .topbar,
  .admin-header,
  .form-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions,
  .filter-row {
    justify-content: stretch;
  }

  .primary-button,
  .ghost-button,
  .admin-date-control,
  .date-field,
  .date-field input,
  .date-step-button,
  .language-field,
  .language-field select,
  .filter-field,
  .filter-row input[type="date"],
  .filter-row select {
    width: 100%;
  }

  .admin-date-control {
    align-items: stretch;
  }

  .camera-actions,
  .feedback-actions {
    flex-direction: column;
  }

  .feedback-modal {
    align-items: start;
    padding: 12px;
    overflow: auto;
  }

  .feedback-dialog,
  .ai-feedback-dialog {
    width: 100%;
    max-height: none;
    padding: 14px;
  }

  .ai-feedback-choice {
    grid-template-columns: 1fr;
  }

  .ai-feedback-option {
    grid-template-columns: 26px minmax(0, 1fr);
  }

  .ai-feedback-review-box strong {
    font-size: 0.98rem;
  }

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

  .upload-layout,
  .analytics-layout,
  .alert-layout,
  .campaign-layout,
  .survey-admin-layout,
  .survey-voting-layout,
  .partner-layout,
  .partner-edit-grid,
  .ai-insight-grid,
  .whatsapp-log-meta,
  .field-grid,
  .image-choice-panel,
  .maintenance-panel,
  .reminder-grid,
  .campaign-status-grid {
    grid-template-columns: 1fr;
  }

  .survey-location-panel {
    position: static;
  }

  .survey-store-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .survey-store-row time {
    text-align: left;
  }

  .alert-recipient-row,
  .alert-product-grid,
  .alert-report-grid,
  .alert-log-card {
    grid-template-columns: 1fr;
  }

  .alert-form-header {
    flex-direction: column;
  }

  .alert-actions,
  .alert-actions button,
  .alert-report-actions,
  .alert-report-actions button,
  .alert-form-header .compact-button {
    width: 100%;
  }

  .alert-status {
    justify-self: start;
  }

  .status-panel {
    position: static;
  }

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

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

  .analytics-hero,
  .analytics-controls,
  .analytics-backfill-actions,
  .analytics-backfill-controls,
  .analytics-panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .analytics-panel-heading span {
    max-width: none;
    text-align: left;
  }

  .analytics-range-switch,
  .analytics-amount-switch,
  .analytics-strip,
  .analytics-kpi-grid,
  .analytics-analysis-grid,
  .analytics-details-grid,
  .analytics-detail-columns,
  .analytics-store-summary-grid,
  .analytics-store-mini-dashboard,
  .analytics-lifetime-summary,
  .analytics-benchmark-grid,
  .analytics-alert-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .analytics-product-row {
    grid-template-columns: minmax(0, 1fr) repeat(3, minmax(86px, 0.5fr));
  }

  .analytics-product-chart-head {
    grid-template-columns: 1fr;
  }

  .analytics-product-missing {
    grid-column: 1 / -1;
  }

  .analytics-analysis-card-wide {
    grid-row: auto;
  }

  .feed-grid {
    columns: 280px;
  }

  .missing-item,
  .storage-row,
  .ai-reference-row,
  .partner-user-card,
  .partner-card,
  .qr-row {
    grid-template-columns: 1fr;
  }

  .ai-reference-thumb {
    width: 100%;
  }
}

@media (max-width: 540px) {
  .main {
    padding: 14px;
  }

  .location-form-grid {
    grid-template-columns: 1fr;
  }

  .location-admin-card .form-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .location-admin-card .primary-button {
    width: 100%;
  }

  .upload-panel {
    padding: 16px;
  }

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

  .nav-tab {
    min-height: 40px;
    padding: 7px;
  }

  .nav-tab span {
    width: 20px;
    height: 20px;
    font-size: 0.72rem;
  }

  .nav-tab strong {
    font-size: 0.76rem;
  }

  .kpi-row,
  .ai-kpi-grid,
  .ai-insight-grid,
  .ai-criteria-grid,
  .mini-dashboard,
  .analytics-strip,
  .analytics-kpi-grid,
  .analytics-analysis-grid,
  .analytics-details-grid,
  .analytics-detail-columns,
  .analytics-product-summary,
  .analytics-store-summary-grid,
  .analytics-store-mini-dashboard,
  .analytics-lifetime-summary,
  .analytics-benchmark-grid,
  .analytics-alert-list,
  .analytics-range-switch,
  .analytics-amount-switch,
  .analytics-date-field,
  .analytics-date-field input,
  .analytics-fixed-field,
  .analytics-product-field,
  .analytics-check-field,
  .analytics-backfill-actions,
  .analytics-backfill-controls,
  .analytics-export-button,
  .analytics-live-button {
    grid-template-columns: 1fr;
    width: 100%;
  }

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

  .analytics-product-dashboard-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .analytics-product-groups-head {
    flex-direction: column;
  }

  .analytics-product-group-grid {
    grid-template-columns: 1fr;
  }

  .analytics-warning-head,
  .analytics-detail-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .analytics-warning-head strong,
  .analytics-detail-card-head span {
    white-space: normal;
  }

  .analytics-product-dashboard-list {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

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

  .analytics-product-chart-metrics,
  .analytics-product-quantity-row {
    grid-template-columns: 1fr;
  }

  .analytics-product-quantity-row strong {
    text-align: left;
  }

  .analytics-product-missing {
    grid-column: auto;
  }

  .feed-grid {
    columns: 1;
  }

  .feed-location-editor {
    grid-template-columns: 1fr;
  }

  .ai-overview-heading,
  .ai-review-head,
  .ai-review-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .image-lightbox-dialog {
    padding: 12px;
  }

  .lightbox-nav-button {
    width: 40px;
    height: 40px;
  }

  .lightbox-nav-previous {
    left: 8px;
  }

  .lightbox-nav-next {
    right: 8px;
  }
}

@media print {
  body {
    background: var(--white);
  }

  .no-print {
    display: none;
  }

  .print-page {
    padding: 0;
  }

  .print-header {
    margin-bottom: 14px;
  }

  .qr-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8mm;
  }

  .print-qr-card {
    break-inside: avoid;
    box-shadow: none;
  }
}
