:root {
  --panel: rgba(255, 250, 240, 0.92);
  --panel-strong: #fff8ee;
  --border: rgba(74, 55, 28, 0.14);
  --text: #2d2416;
  --muted: #695b45;
  --primary: #0f6b5a;
  --primary-strong: #0a5447;
  --accent: #bd6d2b;
  --danger: #9d3f2d;
  --success: #1f6b47;
  --shadow: 0 20px 50px rgba(87, 64, 33, 0.12);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(189, 109, 43, 0.16), transparent 25%),
    radial-gradient(circle at top right, rgba(15, 107, 90, 0.16), transparent 22%),
    linear-gradient(180deg, #f7f0e5 0%, #f1ebdf 100%);
}

a {
  color: var(--primary-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.admin-shell {
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 248, 238, 0.88);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 10px 24px rgba(87, 64, 33, 0.08);
}

.topbar-main {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 0 0 auto;
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: auto;
  height: 38px;
  max-width: min(168px, 26vw);
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(74, 55, 28, 0.1));
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  background: linear-gradient(135deg, #0f6b5a 0%, #bd6d2b 100%);
  box-shadow: 0 10px 24px rgba(15, 107, 90, 0.24);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.brand-copy small,
.muted,
.panel-head p,
.helper-text,
.cell-sub,
.empty-state,
.publish-card span {
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.topbar-nav {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 4px;
}

.topbar-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 4px 12px;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  transition: color 0.12s ease, opacity 0.12s ease;
}

.topbar-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  transform: scaleX(0.45);
  opacity: 0;
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.topbar-link:hover {
  text-decoration: none;
  color: var(--text);
}

.topbar-link:hover::after {
  opacity: 0.32;
  transform: scaleX(0.72);
}

.topbar-link.is-active {
  color: var(--primary-strong);
}

.topbar-link.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.notification-shell {
  position: relative;
}

.notification-button {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(74, 55, 28, 0.14);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(87, 64, 33, 0.08);
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease, color 0.14s ease;
}

.notification-button:hover {
  transform: translateY(-1px);
}

.notification-button.has-unread {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
  box-shadow: 0 14px 28px rgba(15, 107, 90, 0.22);
}

.notification-icon {
  width: 20px;
  height: 20px;
}

.notification-button.has-unread .notification-icon {
  animation: notification-ring 1.8s ease-in-out infinite;
  transform-origin: 50% 0%;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #d94832;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(217, 72, 50, 0.3);
}

.notification-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(420px, calc(100vw - 32px));
  max-height: min(72vh, 620px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid rgba(74, 55, 28, 0.14);
  border-radius: 24px;
  background: rgba(255, 250, 240, 0.98);
  box-shadow: 0 26px 56px rgba(74, 55, 28, 0.18);
  overflow: hidden;
  z-index: 30;
}

.notification-panel-head {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(74, 55, 28, 0.08);
  background: rgba(255, 255, 255, 0.82);
}

.notification-list {
  display: grid;
  gap: 12px;
  padding: 16px 18px 18px;
  overflow-y: auto;
}

.notification-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(74, 55, 28, 0.1);
  background: rgba(255, 255, 255, 0.86);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.notification-item:hover {
  text-decoration: none;
  transform: translateY(-1px);
  border-color: rgba(15, 107, 90, 0.26);
  box-shadow: 0 12px 24px rgba(15, 107, 90, 0.08);
}

.notification-item.is-unread {
  border-color: rgba(15, 107, 90, 0.22);
  background: rgba(15, 107, 90, 0.08);
}

.notification-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.notification-item-head strong {
  font-size: 15px;
}

.notification-item-head span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.notification-item-message {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.notification-item-comment {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(189, 109, 43, 0.12);
  background: rgba(189, 109, 43, 0.08);
}

.notification-item-comment strong {
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.notification-item-comment span {
  line-height: 1.5;
}

.notification-empty {
  padding: 18px;
  border-radius: 18px;
  border: 1px dashed rgba(74, 55, 28, 0.18);
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  text-align: center;
}

@keyframes notification-ring {
  0%, 100% {
    transform: rotate(0deg);
  }
  20% {
    transform: rotate(-13deg);
  }
  40% {
    transform: rotate(11deg);
  }
  60% {
    transform: rotate(-7deg);
  }
  80% {
    transform: rotate(5deg);
  }
}

.user-chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 107, 90, 0.08);
  color: var(--primary-strong);
  font-weight: 600;
}

.page-wrap {
  width: min(1380px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.hero-card,
.panel,
.login-card,
.publish-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-card,
.panel {
  padding: 24px;
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 24px;
  margin-bottom: 22px;
}

.hero-card-compact {
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  align-items: start;
  margin-bottom: 18px;
}

.hero-copy {
  display: grid;
  gap: 10px;
  align-content: start;
}

.hero-copy p {
  max-width: 72ch;
}

.workflow-note {
  align-self: start;
  border: 1px dashed rgba(15, 107, 90, 0.22);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.68);
  overflow: hidden;
}

.workflow-note summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  padding: 16px 48px 16px 18px;
  font-weight: 700;
}

.workflow-note summary::-webkit-details-marker {
  display: none;
}

.workflow-note summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 22px;
  line-height: 1;
}

.workflow-note[open] summary::after {
  content: "−";
}

.workflow-note-body {
  padding: 0 18px 18px;
  color: var(--muted);
  line-height: 1.6;
}

.status-grid {
  display: grid;
  gap: 14px;
}

.status-card {
  padding: 18px;
  border-radius: 18px;
  background: var(--panel-strong);
  border: 1px solid rgba(15, 107, 90, 0.12);
}

.country-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  margin: 0;
  border-radius: 22px;
  border: 1px solid rgba(74, 55, 28, 0.12);
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 24px rgba(87, 64, 33, 0.06);
}

.country-toolbar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.country-tabs-panel {
  flex: 1 1 auto;
  display: grid;
  gap: 12px;
}

.country-tabs-copy {
  display: grid;
  gap: 4px;
}

.country-tabs-copy span {
  color: var(--muted);
}

.country-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  box-shadow: none;
  transition: transform 0.12s ease, color 0.12s ease, background 0.12s ease;
}

.country-tab:hover {
  text-decoration: none;
  transform: translateY(-1px);
  background: rgba(15, 107, 90, 0.08);
}

.country-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  box-shadow: 0 12px 24px rgba(15, 107, 90, 0.18);
}

.dashboard-metrics {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-metric {
  min-width: 170px;
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 22px;
  border: 1px solid rgba(74, 55, 28, 0.12);
  background: rgba(255, 255, 255, 0.78);
  color: inherit;
  box-shadow: 0 12px 24px rgba(87, 64, 33, 0.08);
}

.dashboard-metric:hover {
  text-decoration: none;
}

.dashboard-metric span,
.dashboard-metric small {
  color: var(--muted);
}

.dashboard-metric strong {
  margin: 0;
  font-size: 30px;
  line-height: 1;
}

.dashboard-metric-alert {
  border-color: rgba(15, 107, 90, 0.18);
  background: linear-gradient(135deg, rgba(15, 107, 90, 0.12) 0%, rgba(189, 109, 43, 0.12) 100%);
}

.dashboard-metric-alert strong {
  color: var(--primary-strong);
}

.workspace-hero {
  align-items: start;
}

.workspace-kpis {
  display: grid;
  gap: 12px;
}

.workspace-kpi {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(74, 55, 28, 0.12);
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 12px 24px rgba(87, 64, 33, 0.08);
}

.workspace-kpi span,
.workspace-kpi small {
  color: var(--muted);
}

.workspace-kpi strong {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.workspace-kpi-alert {
  border-color: rgba(15, 107, 90, 0.18);
  background: linear-gradient(135deg, rgba(15, 107, 90, 0.12) 0%, rgba(189, 109, 43, 0.12) 100%);
}

.workspace-kpi-alert strong {
  color: var(--primary-strong);
}

.country-placeholder {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 18px;
  background: rgba(15, 107, 90, 0.07);
  border: 1px dashed rgba(15, 107, 90, 0.22);
}

.status-card strong,
.panel-head h2,
.hero-card h1,
.login-card h1,
.lot-header h1 {
  display: block;
  margin: 0 0 8px;
}

.eyebrow {
  display: inline-flex;
  padding: 6px 10px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: rgba(189, 109, 43, 0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-bottom: 22px;
  min-width: 0;
}

.dashboard-import-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.8fr);
  align-items: stretch;
}

.filters-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76) 0%, rgba(255, 250, 240, 0.9) 100%);
}

.import-panel {
  display: grid;
  gap: 14px;
}

.import-panel-primary {
  border-color: rgba(15, 107, 90, 0.18);
  background: linear-gradient(180deg, rgba(15, 107, 90, 0.05) 0%, rgba(255, 250, 240, 0.92) 100%);
}

.import-panel-secondary {
  background: rgba(255, 255, 255, 0.74);
}

.panel-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(15, 107, 90, 0.1);
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.panel-kicker-muted {
  background: rgba(74, 55, 28, 0.08);
  color: var(--muted);
}

.import-input-label {
  gap: 10px;
}

.field-note {
  color: var(--muted);
  line-height: 1.4;
}

.import-button {
  min-height: 54px;
  font-size: 16px;
}

.import-button .loading-label {
  display: none;
}

.import-button.is-loading {
  opacity: 0.82;
  cursor: wait;
}

.import-button.is-loading .default-label {
  display: none;
}

.import-button.is-loading .loading-label {
  display: inline;
}

.inline-form-alert {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
}

.inline-form-alert-error {
  border: 1px solid rgba(190, 73, 73, 0.18);
  background: rgba(255, 240, 240, 0.96);
  color: #8f3030;
}

.stack-form,
.stack-column {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.stack-form label,
.stack-form .form-grid label {
  display: grid;
  gap: 8px;
}

.stack-form label span {
  font-weight: 600;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(74, 55, 28, 0.18);
  border-radius: 16px;
  padding: 13px 14px;
  font: inherit;
  color: inherit;
  background: rgba(255, 255, 255, 0.92);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(15, 107, 90, 0.55);
  box-shadow: 0 0 0 4px rgba(15, 107, 90, 0.12);
}

.primary-button,
.secondary-button,
.ghost-button,
.secondary-link-button {
  border: 0;
  border-radius: 16px;
  padding: 13px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  box-shadow: 0 12px 24px rgba(15, 107, 90, 0.22);
}

.secondary-button,
.ghost-button,
.secondary-link-button {
  background: rgba(15, 107, 90, 0.08);
  color: var(--primary-strong);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-button:hover,
.secondary-link-button:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.primary-button:disabled,
.secondary-button:disabled,
.ghost-button:disabled,
.secondary-link-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.panel-head {
  margin-bottom: 16px;
}

.panel-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.view-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(74, 55, 28, 0.14);
  background: rgba(255, 255, 255, 0.76);
}

.view-switch-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  transition: background 0.12s ease, color 0.12s ease, transform 0.12s ease;
}

.view-switch-link:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.view-switch-link.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

.panel-head p,
.muted,
.helper-text,
.cell-sub,
.empty-state {
  margin: 0;
  line-height: 1.5;
}

.lots-table {
  width: 100%;
  border-collapse: collapse;
}

.lots-panel .panel-head {
  margin-bottom: 18px;
}

.dashboard-table-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.table-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 107, 90, 0.12);
  background: rgba(15, 107, 90, 0.08);
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 700;
}

.table-chip-muted {
  border-color: rgba(74, 55, 28, 0.12);
  background: rgba(74, 55, 28, 0.06);
  color: var(--muted);
}

.catalog-filter-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.filter-grid-compact {
  gap: 14px;
}

.section-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.catalog-grid.is-list {
  grid-template-columns: 1fr;
  gap: 14px;
}

.catalog-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(74, 55, 28, 0.12);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 14px 28px rgba(74, 55, 28, 0.07);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.catalog-grid.is-list .catalog-card {
  grid-template-columns: minmax(180px, 230px) minmax(0, 1fr);
  grid-template-rows: none;
}

.catalog-card:hover,
.review-card:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 107, 90, 0.16);
  box-shadow: 0 18px 34px rgba(74, 55, 28, 0.1);
}

.catalog-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: rgba(15, 107, 90, 0.06);
}

.catalog-grid.is-list .catalog-card-media {
  aspect-ratio: 4 / 3;
}

.catalog-card-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.catalog-card-body {
  display: grid;
  gap: 14px;
  padding: 18px;
  min-width: 0;
}

.catalog-grid.is-list .catalog-card-body {
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.9fr);
  gap: 10px 18px;
  align-items: start;
}

.catalog-grid.is-list .catalog-metrics,
.catalog-grid.is-list .catalog-actions {
  grid-column: 2;
}

.catalog-grid.is-list .catalog-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.catalog-grid.is-list .catalog-actions {
  align-self: end;
}

.catalog-card-body h3 {
  margin: 0;
  overflow-wrap: anywhere;
}

.catalog-card-head,
.review-card-head {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.catalog-title-block {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.catalog-subline {
  margin: -4px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.catalog-metrics {
  display: grid;
  gap: 10px;
  margin: 0;
}

.catalog-metrics div {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(74, 55, 28, 0.08);
  background: rgba(255, 248, 238, 0.72);
}

.catalog-metrics dt {
  color: var(--muted);
  font-size: 13px;
}

.catalog-metrics dd {
  margin: 0;
  font-weight: 700;
}

.catalog-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.entity-actions {
  gap: 10px;
}

.entity-actions .inline-link,
.entity-actions .secondary-link-button {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(15, 107, 90, 0.14);
  background: rgba(15, 107, 90, 0.08);
  text-decoration: none;
}

.entity-actions .inline-link:hover,
.entity-actions .secondary-link-button:hover {
  text-decoration: none;
}

.catalog-card-empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 600;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 16px;
}

.review-grid.is-list {
  grid-template-columns: 1fr;
}

.review-card {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  align-items: start;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(74, 55, 28, 0.12);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 28px rgba(74, 55, 28, 0.07);
}

.review-grid.is-list .review-card {
  grid-template-columns: minmax(170px, 210px) minmax(0, 1fr);
  grid-template-rows: none;
}

.review-card-media {
  background: rgba(15, 107, 90, 0.06);
  align-self: start;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.review-grid.is-list .review-card-media {
  aspect-ratio: 4 / 3;
}

.review-card-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.review-card-body {
  display: grid;
  gap: 14px;
  padding: 16px 16px 18px;
  min-width: 0;
}

.review-grid.is-list .review-card-body {
  grid-template-columns: minmax(0, 1fr) minmax(290px, 0.95fr);
  gap: 10px 18px;
  align-items: start;
}

.review-grid.is-list .catalog-metrics,
.review-grid.is-list .review-card-body form {
  grid-column: 2;
}

.review-grid.is-list .catalog-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.review-card-body h3 {
  margin: 0;
  overflow-wrap: anywhere;
}

.cell-sub {
  overflow-wrap: anywhere;
}

.review-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.review-form-shell {
  gap: 12px;
}

.review-comment-field textarea {
  min-height: 92px;
  background: rgba(255, 255, 255, 0.94);
}

.review-actions-compact .primary-button,
.review-actions-compact .secondary-link-button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
}

.review-actions-compact .inline-link,
.review-actions-compact .inline-button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(74, 55, 28, 0.12);
  background: rgba(255, 248, 238, 0.74);
  text-decoration: none;
}

.review-actions-compact .inline-link:hover,
.review-actions-compact .inline-button:hover {
  text-decoration: none;
}

.lots-table th,
.lots-table td {
  text-align: left;
  vertical-align: top;
  padding: 16px 14px;
  border-bottom: 1px solid rgba(74, 55, 28, 0.1);
}

.lots-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lots-table tbody tr {
  transition: background 0.12s ease;
}

.lots-table tbody tr:hover {
  background: rgba(15, 107, 90, 0.04);
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.table-wrap {
  overflow: auto;
  border-radius: 20px;
  border: 1px solid rgba(74, 55, 28, 0.08);
  background: rgba(255, 255, 255, 0.62);
}

.mono-cell {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.source-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.source-domain {
  display: inline-flex;
  align-items: center;
  max-width: 220px;
  min-height: 34px;
  padding: 0 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  border: 1px solid rgba(74, 55, 28, 0.12);
  background: rgba(255, 248, 238, 0.74);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.compact-table th,
.compact-table td {
  padding: 10px 12px;
}

.command-snippet {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(74, 55, 28, 0.14);
  background: rgba(255, 255, 255, 0.84);
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
  line-height: 1.6;
  word-break: break-word;
}

.status-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.inline-link,
.inline-button {
  font: inherit;
  font-weight: 700;
  color: var(--primary-strong);
  background: none;
  border: 0;
  padding: 0;
  text-decoration: none;
  cursor: pointer;
}

.inline-link:hover,
.inline-button:hover {
  text-decoration: underline;
}

.table-actions .inline-link,
.table-actions .inline-button {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 107, 90, 0.14);
  background: rgba(15, 107, 90, 0.08);
  text-decoration: none;
}

.table-actions .inline-link:hover,
.table-actions .inline-button:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.table-actions .danger-button {
  border-color: rgba(157, 63, 45, 0.16);
  background: rgba(157, 63, 45, 0.08);
}

.danger-button {
  color: var(--danger);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 12px 0 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid transparent;
}

.status-badge::before {
  display: inline-block;
  font-size: 13px;
  line-height: 1;
}

.status-badge.is-draft {
  color: var(--muted);
  background: rgba(74, 55, 28, 0.08);
  border-color: rgba(74, 55, 28, 0.12);
}

.status-badge.is-draft::before {
  content: "✎";
}

.status-badge.is-pending {
  color: #1f5ea8;
  background: rgba(31, 94, 168, 0.12);
  border-color: rgba(31, 94, 168, 0.2);
}

.status-badge.is-pending::before {
  content: "●";
}

.status-badge.is-approved {
  color: var(--success);
  background: rgba(31, 107, 71, 0.12);
  border-color: rgba(31, 107, 71, 0.2);
}

.status-badge.is-approved::before {
  content: "✓";
}

.status-badge.is-returned {
  color: #aa5c00;
  background: rgba(189, 109, 43, 0.16);
  border-color: rgba(189, 109, 43, 0.24);
}

.status-badge.is-returned::before {
  content: "↺";
}

.status-badge.is-rejected {
  color: #b1462f;
  background: rgba(177, 70, 47, 0.14);
  border-color: rgba(177, 70, 47, 0.22);
}

.status-badge.is-rejected::before {
  content: "⛔";
}

.pill {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(189, 109, 43, 0.12);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.pill-secondary {
  background: rgba(15, 107, 90, 0.1);
  color: var(--primary-strong);
}

.source-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.clip-text {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.login-layout {
  min-height: calc(100vh - 140px);
  display: grid;
  place-items: center;
}

.login-card {
  width: min(520px, 100%);
  padding: 30px;
}

.flash {
  padding: 14px 16px;
  border-radius: 18px;
  margin-bottom: 18px;
  font-weight: 600;
}

.flash-error {
  background: rgba(157, 63, 45, 0.12);
  color: var(--danger);
  border: 1px solid rgba(157, 63, 45, 0.18);
}

.flash-success {
  background: rgba(31, 107, 71, 0.12);
  color: var(--success);
  border: 1px solid rgba(31, 107, 71, 0.18);
}

.lot-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 22px;
  margin-bottom: 22px;
}

.publish-card {
  padding: 18px 20px;
  display: grid;
  gap: 8px;
  align-self: start;
}

.edit-layout {
  align-items: start;
}

.lot-editor-form {
  align-items: start;
}

.sub-panel {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(74, 55, 28, 0.1);
  background: rgba(255, 255, 255, 0.54);
}

.compact-head {
  margin-bottom: 0;
}

.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.inline-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.copy-only-input {
  cursor: copy;
  background: rgba(255, 248, 238, 0.92);
}

.choice-group {
  display: grid;
  gap: 10px;
}

.choice-group > span {
  font-weight: 700;
}

.choice-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.choice-card {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(74, 55, 28, 0.14);
  background: rgba(255, 255, 255, 0.78);
  font-weight: 600;
}

.choice-card input {
  margin: 0;
}

.preview-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.catalog-library-layout {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.catalog-library-sidebar {
  position: sticky;
  top: 88px;
}

.catalog-library-main {
  display: grid;
  gap: 22px;
  min-width: 0;
}

.catalog-brand-list {
  display: grid;
  gap: 10px;
}

.catalog-brand-link {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(74, 55, 28, 0.12);
  background: rgba(255, 255, 255, 0.76);
  color: inherit;
  text-decoration: none;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.catalog-brand-link:hover,
.drom-model-card:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.catalog-brand-link strong,
.drom-model-card h3,
.drom-generation-copy h3,
.drom-trim-copy h3 {
  margin: 0;
}

.catalog-brand-link span,
.catalog-brand-link small {
  color: var(--muted);
  line-height: 1.45;
}

.catalog-brand-link.is-active,
.drom-model-card.is-active {
  border-color: rgba(15, 107, 90, 0.24);
  background: rgba(15, 107, 90, 0.08);
  box-shadow: 0 12px 22px rgba(15, 107, 90, 0.08);
}

.drom-model-grid,
.drom-trim-grid {
  display: grid;
  gap: 14px;
}

.drom-model-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.drom-model-card,
.drom-trim-card,
.drom-generation-card {
  border-radius: 20px;
  border: 1px solid rgba(74, 55, 28, 0.12);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 28px rgba(74, 55, 28, 0.06);
}

.drom-model-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  color: inherit;
  text-decoration: none;
}

.drom-card-meta {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 13px;
}

.drom-generation-list {
  display: grid;
  gap: 12px;
}

.drom-generation-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
}

.drom-generation-image,
.drom-trim-image {
  width: 100%;
  object-fit: cover;
  border-radius: 16px;
  background: rgba(74, 55, 28, 0.06);
}

.drom-generation-image {
  aspect-ratio: 4 / 3;
}

.drom-generation-copy {
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
}

.drom-trim-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.drom-trim-head {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.drom-trim-image {
  aspect-ratio: 1 / 1;
}

.drom-trim-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.drom-spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.drom-spec-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(74, 55, 28, 0.1);
  background: rgba(255, 248, 238, 0.72);
}

.drom-spec-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.drom-spec-list div {
  display: grid;
  gap: 2px;
}

.drom-spec-list dt {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.drom-spec-list dd {
  margin: 0;
  font-weight: 600;
  line-height: 1.45;
}

.drom-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 14px;
}

.drom-breadcrumbs a {
  color: var(--primary-strong);
  text-decoration: none;
}

.drom-breadcrumbs a:hover {
  text-decoration: underline;
}

.drom-breadcrumbs span:last-child {
  color: var(--text-primary);
  font-weight: 700;
}

.drom-breadcrumbs a:not(:last-child)::after,
.drom-breadcrumbs span:not(:last-child)::after {
  content: "/";
  margin-left: 10px;
  color: rgba(74, 55, 28, 0.28);
}

.drom-group-panel {
  display: grid;
  gap: 14px;
}

.drom-trim-hero-image {
  display: block;
  width: min(560px, 100%);
  max-width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid rgba(74, 55, 28, 0.12);
  background: rgba(255, 255, 255, 0.78);
}

.preview-list div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(74, 55, 28, 0.08);
}

.preview-list dt {
  color: var(--muted);
  font-size: 13px;
}

.preview-list dd {
  margin: 0;
  font-weight: 600;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.editable-photo-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.photo-card,
.sheet-card {
  display: block;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(74, 55, 28, 0.14);
  background: rgba(255, 255, 255, 0.8);
}

.photo-card img,
.sheet-card img {
  width: 100%;
  max-width: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.photo-select-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(74, 55, 28, 0.14);
  background: rgba(255, 255, 255, 0.82);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
}

.photo-select-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border-radius: 6px;
  box-shadow: none;
}

.photo-select-card img {
  width: 100%;
  max-width: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 14px;
}

.photo-select-meta {
  display: grid;
  gap: 4px;
}

.photo-select-meta span {
  font-weight: 700;
}

.photo-select-meta small {
  color: var(--muted);
}

.photo-sort-hint {
  margin: 0 0 12px;
}

.photo-upload-status {
  display: block;
  margin-top: 6px;
}

.photo-select-card.is-sortable {
  cursor: grab;
}

.photo-select-card.is-sortable:active {
  cursor: grabbing;
}

.photo-select-card.is-dragging {
  opacity: 0.58;
  transform: scale(0.98);
  box-shadow: 0 18px 36px rgba(15, 107, 90, 0.12);
}

.photo-select-card.is-drop-target {
  border-color: rgba(15, 107, 90, 0.42);
  box-shadow: 0 14px 28px rgba(15, 107, 90, 0.12);
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.is-hidden {
  display: none !important;
}

.pending-photo-card,
.pending-preview-card {
  border-style: dashed;
}

.pending-photo-top {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.pending-remove-button {
  flex: 0 0 auto;
  border: 0;
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(157, 63, 45, 0.1);
  color: var(--danger);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.reference-details {
  border: 1px solid rgba(74, 55, 28, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.reference-details summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 700;
}

.reference-list {
  display: grid;
  gap: 10px;
  padding: 0 16px 16px;
}

.reference-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 248, 238, 0.88);
}

.panel,
.sub-panel,
.publish-card,
.preview-list div {
  min-width: 0;
}

.sheet-card img {
  aspect-ratio: auto;
  object-fit: contain;
  background: #fff;
}

.back-link {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .hero-card,
  .lot-header,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .country-toolbar {
    flex-direction: column;
  }

  .dashboard-metrics {
    width: 100%;
  }

  .workspace-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-library-layout {
    grid-template-columns: 1fr;
  }

  .catalog-library-sidebar {
    position: static;
  }

  .catalog-grid,
  .catalog-filter-grid,
  .review-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.manager-filter-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.manager-record-form-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.table-shell {
  overflow-x: auto;
}

.manager-records-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
}

.manager-records-table th,
.manager-records-table td {
  padding: 14px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(15, 107, 90, 0.12);
}

.manager-records-table th {
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.manager-records-table tbody tr:hover {
  background: rgba(15, 107, 90, 0.04);
}

.manager-inline-status-form {
  display: grid;
  gap: 8px;
  min-width: 220px;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--text);
}

.inline-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.manager-record-row {
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.manager-record-row:focus-visible {
  outline: 2px solid rgba(15, 107, 90, 0.28);
  outline-offset: -2px;
}

.manager-record-row.is-active {
  background: rgba(15, 107, 90, 0.08);
}

body.manager-record-details-open {
  overflow: hidden;
}

.manager-record-details-shell {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.manager-record-details-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.46);
  backdrop-filter: blur(4px);
}

.manager-record-details-drawer {
  position: relative;
  width: min(920px, calc(100vw - 48px));
  max-width: 920px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 22px 24px 26px;
  background: #fffdf8;
  border: 1px solid rgba(15, 107, 90, 0.12);
  border-radius: 28px;
  box-shadow: 0 28px 72px rgba(15, 23, 42, 0.22);
}

.manager-record-details-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.manager-record-details-head-actions {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.manager-record-details-status {
  min-width: 220px;
}

.manager-record-details-status span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.manager-record-details-head h2 {
  margin: 0 0 6px;
}

.manager-record-details-feedback {
  margin-bottom: 16px;
}

.manager-record-details-form {
  gap: 18px;
}

.manager-record-details-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.manager-record-details-summary-card,
.manager-record-details-section {
  border: 1px solid rgba(15, 107, 90, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.manager-record-details-summary-card {
  padding: 16px 18px;
}

.manager-record-details-summary-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.manager-record-details-summary-card strong {
  display: block;
  line-height: 1.45;
}

.manager-record-details-section {
  padding: 16px 18px;
}

.manager-record-details-section .panel-head {
  margin-bottom: 14px;
}

.manager-record-details-section h3 {
  margin: 0 0 6px;
}

.manager-record-details-section .panel-head p {
  margin: 0;
}

.manager-record-details-checklist {
  display: grid;
  gap: 12px;
}

.manager-record-details-checklist--grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.manager-record-details-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.manager-record-details-inline-check {
  min-height: 52px;
  padding: 0 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.94);
}

.manager-record-row-issued td {
  text-decoration: line-through;
  color: rgba(15, 23, 42, 0.58);
}

.manager-record-row-issued:hover td,
.manager-record-row-issued.is-active td {
  color: rgba(15, 23, 42, 0.72);
}

.payment-indicator-list {
  display: grid;
  gap: 8px;
}

.payment-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(15, 23, 42, 0.58);
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.2;
}

.payment-indicator-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.payment-indicator.is-active {
  color: #0f6b5a;
}

.payment-indicator.is-active .payment-indicator-dot {
  border-color: rgba(15, 107, 90, 0.38);
  background: linear-gradient(180deg, #3ad29b 0%, #0f8b72 100%);
  box-shadow: 0 0 0 3px rgba(15, 139, 114, 0.12);
}

.manager-record-details-actions {
  position: sticky;
  bottom: 0;
  padding-top: 10px;
  background: linear-gradient(
    180deg,
    rgba(255, 253, 248, 0) 0%,
    rgba(255, 253, 248, 0.94) 22%,
    rgba(255, 253, 248, 1) 100%
  );
}

.manager-record-display-list {
  display: grid;
  gap: 12px;
}

.manager-record-display-item {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(15, 107, 90, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
}

.manager-record-display-item span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.table-shell-records {
  overflow-x: visible;
}

body.admin-page--wide .page-wrap {
  width: min(1600px, calc(100vw - 20px));
  max-width: none;
}

.manager-records-table.is-admin-table,
.manager-records-table.is-my-purchases-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.manager-records-table.is-admin-table th,
.manager-records-table.is-admin-table td,
.manager-records-table.is-my-purchases-table th,
.manager-records-table.is-my-purchases-table td {
  padding: 10px 8px;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  hyphens: none;
  line-height: 1.22;
  vertical-align: top;
}

.manager-records-table.is-admin-table .manager-inline-status-form {
  min-width: 0;
}

.manager-records-table.is-admin-table th:nth-child(1),
.manager-records-table.is-admin-table td:nth-child(1) {
  width: 9%;
}

.manager-records-table.is-admin-table th:nth-child(2),
.manager-records-table.is-admin-table td:nth-child(2) {
  width: 13%;
}

.manager-records-table.is-admin-table th:nth-child(3),
.manager-records-table.is-admin-table td:nth-child(3),
.manager-records-table.is-admin-table th:nth-child(4),
.manager-records-table.is-admin-table td:nth-child(4),
.manager-records-table.is-admin-table th:nth-child(5),
.manager-records-table.is-admin-table td:nth-child(5),
.manager-records-table.is-admin-table th:nth-child(6),
.manager-records-table.is-admin-table td:nth-child(6),
.manager-records-table.is-admin-table th:nth-child(7),
.manager-records-table.is-admin-table td:nth-child(7),
.manager-records-table.is-admin-table th:nth-child(8),
.manager-records-table.is-admin-table td:nth-child(8) {
  width: 7%;
}

.manager-records-table.is-admin-table th:nth-child(9),
.manager-records-table.is-admin-table td:nth-child(9) {
  width: 5%;
}

.manager-records-table.is-admin-table th:nth-child(10),
.manager-records-table.is-admin-table td:nth-child(10) {
  width: 14%;
}

.manager-records-table.is-admin-table th:nth-child(12),
.manager-records-table.is-admin-table td:nth-child(12) {
  width: 4%;
}

.manager-records-table.is-admin-table th:nth-child(11),
.manager-records-table.is-admin-table td:nth-child(11) {
  width: 9%;
}

.manager-records-table.is-admin-table th:nth-child(3),
.manager-records-table.is-admin-table td:nth-child(3) {
  width: 10%;
}

.manager-records-table.is-admin-table td:nth-child(3),
.manager-records-table.is-my-purchases-table td:nth-child(3) {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.manager-records-table.is-admin-table td:nth-child(4),
.manager-records-table.is-admin-table td:nth-child(5),
.manager-records-table.is-admin-table td:nth-child(6),
.manager-records-table.is-admin-table td:nth-child(7),
.manager-records-table.is-admin-table td:nth-child(8),
.manager-records-table.is-admin-table td:nth-child(9),
.manager-records-table.is-admin-table td:nth-child(11),
.manager-records-table.is-my-purchases-table td:nth-child(4),
.manager-records-table.is-my-purchases-table td:nth-child(5),
.manager-records-table.is-my-purchases-table td:nth-child(6),
.manager-records-table.is-my-purchases-table td:nth-child(7),
.manager-records-table.is-my-purchases-table td:nth-child(8),
.manager-records-table.is-my-purchases-table td:nth-child(9),
.manager-records-table.is-my-purchases-table td:nth-child(10) {
  white-space: nowrap;
}

.manager-records-table .inline-check span {
  word-break: normal;
  overflow-wrap: normal;
}

body.admin-page--wide .manager-records-table.is-admin-table,
body.admin-page--wide .manager-records-table.is-my-purchases-table {
  table-layout: fixed;
}

body.admin-page--wide .manager-records-table.is-admin-table th,
body.admin-page--wide .manager-records-table.is-admin-table td,
body.admin-page--wide .manager-records-table.is-my-purchases-table th,
body.admin-page--wide .manager-records-table.is-my-purchases-table td {
  padding: 10px 7px;
  font-size: 0.84rem;
  vertical-align: top;
}

body.admin-page--wide .manager-records-table.is-admin-table th,
body.admin-page--wide .manager-records-table.is-my-purchases-table th {
  font-size: 0.68rem;
  line-height: 1.08;
  letter-spacing: 0.05em;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
}

body.admin-page--wide .manager-records-table.is-admin-table td,
body.admin-page--wide .manager-records-table.is-my-purchases-table td {
  overflow-wrap: break-word;
}

body.admin-page--wide .manager-records-table.is-admin-table td:nth-child(10),
body.admin-page--wide .manager-records-table.is-admin-table th:nth-child(10) {
  width: 14%;
}

body.admin-page--wide .manager-records-table.is-admin-table td:nth-child(11),
body.admin-page--wide .manager-records-table.is-admin-table th:nth-child(11) {
  width: 9%;
  white-space: normal;
}

body.admin-page--wide .manager-records-table.is-admin-table td:nth-child(12),
body.admin-page--wide .manager-records-table.is-admin-table th:nth-child(12) {
  width: 4%;
  text-align: center;
}

body.admin-page--wide .manager-records-table.is-admin-table .manager-inline-status-form {
  gap: 4px;
}

body.admin-page--wide .manager-records-table.is-admin-table .inline-check {
  gap: 6px;
  align-items: flex-start;
}

body.admin-page--wide .manager-records-table.is-admin-table .inline-check span {
  font-size: 0.75rem;
  line-height: 1.12;
}

body.admin-page--wide .manager-records-table.is-admin-table .inline-icon-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
}

.inline-icon-button {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.inline-icon-button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.manager-records-table.is-my-purchases-table th:nth-child(1),
.manager-records-table.is-my-purchases-table td:nth-child(1) {
  width: 4%;
}

.manager-records-table.is-my-purchases-table th:nth-child(2),
.manager-records-table.is-my-purchases-table td:nth-child(2) {
  width: 18%;
}

.manager-records-table.is-my-purchases-table th:nth-child(3),
.manager-records-table.is-my-purchases-table td:nth-child(3),
.manager-records-table.is-my-purchases-table th:nth-child(4),
.manager-records-table.is-my-purchases-table td:nth-child(4),
.manager-records-table.is-my-purchases-table th:nth-child(5),
.manager-records-table.is-my-purchases-table td:nth-child(5),
.manager-records-table.is-my-purchases-table th:nth-child(6),
.manager-records-table.is-my-purchases-table td:nth-child(6),
.manager-records-table.is-my-purchases-table th:nth-child(7),
.manager-records-table.is-my-purchases-table td:nth-child(7),
.manager-records-table.is-my-purchases-table th:nth-child(8),
.manager-records-table.is-my-purchases-table td:nth-child(8),
.manager-records-table.is-my-purchases-table th:nth-child(9),
.manager-records-table.is-my-purchases-table td:nth-child(9),
.manager-records-table.is-my-purchases-table th:nth-child(10),
.manager-records-table.is-my-purchases-table td:nth-child(10) {
  width: 9.75%;
}

body.admin-page--manager-records .manager-records-table.is-admin-table td:nth-child(4),
body.admin-page--manager-records .manager-records-table.is-admin-table td:nth-child(5),
body.admin-page--manager-records .manager-records-table.is-admin-table td:nth-child(6),
body.admin-page--manager-records .manager-records-table.is-admin-table td:nth-child(7),
body.admin-page--manager-records .manager-records-table.is-admin-table td:nth-child(8),
body.admin-page--manager-records .manager-records-table.is-admin-table td:nth-child(9),
body.admin-page--manager-records .manager-records-table.is-admin-table td:nth-child(11),
body.admin-page--my-purchases .manager-records-table.is-my-purchases-table td:nth-child(4),
body.admin-page--my-purchases .manager-records-table.is-my-purchases-table td:nth-child(5),
body.admin-page--my-purchases .manager-records-table.is-my-purchases-table td:nth-child(6),
body.admin-page--my-purchases .manager-records-table.is-my-purchases-table td:nth-child(7),
body.admin-page--my-purchases .manager-records-table.is-my-purchases-table td:nth-child(8),
body.admin-page--my-purchases .manager-records-table.is-my-purchases-table td:nth-child(9),
body.admin-page--my-purchases .manager-records-table.is-my-purchases-table td:nth-child(10) {
  white-space: nowrap;
}

@media (max-width: 1320px) {
  body.admin-page--wide .manager-records-table.is-admin-table th,
  body.admin-page--wide .manager-records-table.is-admin-table td,
  body.admin-page--wide .manager-records-table.is-my-purchases-table th,
  body.admin-page--wide .manager-records-table.is-my-purchases-table td {
    padding: 9px 6px;
    font-size: 0.78rem;
  }

  body.admin-page--wide .manager-records-table.is-admin-table th,
  body.admin-page--wide .manager-records-table.is-my-purchases-table th {
    font-size: 0.64rem;
  }

  body.admin-page--manager-records .manager-records-table.is-admin-table .inline-check span {
    font-size: 0.71rem;
  }

  body.admin-page--manager-records .manager-records-table.is-admin-table .inline-icon-button {
    width: 32px;
    min-width: 32px;
    height: 32px;
  }
}

@media (max-width: 760px) {
  .page-wrap {
    width: min(100vw - 24px, 100%);
    padding-top: 18px;
  }

  .topbar {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }

  .topbar-main,
  .topbar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-actions {
    justify-content: space-between;
  }

  .notification-shell {
    width: 100%;
  }

  .notification-button {
    margin-left: auto;
  }

  .notification-panel {
    right: 0;
    left: 0;
    width: auto;
  }

  .hero-card,
  .panel,
  .login-card {
    padding: 18px;
    border-radius: 20px;
  }

  .form-grid,
  .photo-grid,
  .upload-grid,
  .editable-photo-grid,
  .catalog-grid,
  .catalog-filter-grid,
  .review-grid,
  .drom-model-grid,
  .drom-spec-grid {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    overflow-x: auto;
  }

  .lots-table {
    min-width: 980px;
  }

  .country-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .country-tab {
    width: 100%;
  }

  .panel-head-row {
    flex-direction: column;
    align-items: stretch;
  }

  .section-toolbar {
    justify-content: flex-start;
  }

  .view-switch {
    width: 100%;
  }

  .view-switch-link {
    flex: 1;
  }

  .topbar-nav {
    width: 100%;
  }

  .topbar-link,
  .secondary-link-button {
    width: 100%;
    justify-content: flex-start;
    padding: 10px 4px;
  }

  .brand-logo {
    height: 34px;
    max-width: min(168px, 70vw);
  }

  .review-card {
    grid-template-columns: 1fr;
  }

  .drom-generation-card,
  .drom-trim-head {
    grid-template-columns: 1fr;
  }

  .catalog-grid.is-list .catalog-card,
  .review-grid.is-list .review-card {
    grid-template-columns: 1fr;
  }

  .catalog-grid.is-list .catalog-card-body,
  .review-grid.is-list .review-card-body {
    grid-template-columns: 1fr;
  }

  .catalog-grid.is-list .catalog-metrics,
  .catalog-grid.is-list .catalog-actions,
  .review-grid.is-list .catalog-metrics,
  .review-grid.is-list .review-card-body form {
    grid-column: auto;
  }

  .workspace-kpis {
    grid-template-columns: 1fr;
  }

  .section-toolbar,
  .entity-actions,
  .review-actions-compact {
    width: 100%;
  }
}

/* 2026-03-28 admin ui foundation refresh */
:root {
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --border: #dde5ee;
  --text: #111827;
  --muted: #667085;
  --primary: #0f766e;
  --primary-strong: #0b5d57;
  --accent: #1e8a7a;
  --danger: #c75b39;
  --success: #15803d;
  --warning: #c37b12;
  --surface-soft: #f7f9fc;
  --surface-soft-strong: #f2f5f9;
  --shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  --shadow-soft: 0 8px 24px rgba(15, 23, 42, 0.05);
  --ring: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.06), transparent 24%),
    linear-gradient(180deg, #f4f7fb 0%, #edf2f7 100%);
}

a {
  color: var(--primary-strong);
}

a:hover {
  text-decoration: none;
}

.page-wrap {
  width: min(1360px, calc(100vw - 48px));
  padding: 28px 0 56px;
}

.topbar {
  gap: 18px;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.topbar-main {
  gap: 22px;
}

.brand-logo {
  height: 34px;
  max-width: min(156px, 24vw);
  filter: none;
}

.topbar-nav {
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.92);
}

.topbar-link {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  color: var(--muted);
}

.topbar-link::after {
  display: none;
}

.topbar-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.9);
}

.topbar-link.is-active {
  color: var(--primary-strong);
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07);
}

.topbar-actions {
  gap: 10px;
}

.notification-button,
.ghost-button,
.user-chip {
  min-height: 40px;
}

.notification-button {
  border-color: var(--border);
  background: #ffffff;
  color: var(--muted);
  box-shadow: none;
}

.notification-button:hover {
  background: var(--surface-soft);
  box-shadow: var(--shadow-soft);
}

.notification-button.has-unread {
  background: linear-gradient(135deg, var(--primary) 0%, #168c7d 100%);
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.2);
}

.notification-panel {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow);
}

.user-chip {
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--primary-strong);
  font-weight: 700;
  border: 1px solid var(--border);
}

.hero-card,
.panel,
.login-card,
.publish-card,
.sub-panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.hero-card,
.panel,
.login-card {
  border-radius: 24px;
}

.hero-card {
  gap: 28px;
  padding: 28px 30px;
  align-items: start;
}

.hero-card-compact {
  padding: 24px 26px;
}

.hero-card h1 {
  margin: 8px 0 10px;
  color: var(--text);
  font-size: clamp(1.8rem, 2.6vw, 2.45rem);
  line-height: 1.12;
}

.panel {
  padding: 24px;
}

.panel-head {
  gap: 8px;
}

.panel-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.28rem;
  line-height: 1.2;
}

.panel-head p,
.hero-card p,
.muted,
.helper-text,
.cell-sub,
.empty-state,
.publish-card span {
  color: var(--muted);
}

.eyebrow,
.panel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.08);
  color: var(--primary-strong);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-kicker-muted {
  background: rgba(100, 116, 139, 0.1);
  color: #475467;
}

.workflow-note {
  min-width: min(420px, 100%);
  border-radius: 18px;
  border: 1px dashed rgba(15, 118, 110, 0.2);
  background: var(--surface-soft);
  align-self: stretch;
}

.workflow-note summary {
  padding: 14px 16px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.workflow-note-body {
  padding: 0 16px 16px;
  color: var(--muted);
}

.status-grid,
.workspace-kpis,
.dashboard-metrics {
  gap: 14px;
}

.status-card,
.workspace-kpi,
.dashboard-metric {
  min-height: 112px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  box-shadow: none;
}

.status-card strong,
.workspace-kpi strong,
.dashboard-metric strong {
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1.1;
}

.status-card span,
.workspace-kpi span,
.workspace-kpi small,
.dashboard-metric span,
.dashboard-metric small {
  color: var(--muted);
}

.workspace-kpi-alert,
.dashboard-metric-alert {
  border-color: rgba(15, 118, 110, 0.24);
  background:
    linear-gradient(180deg, rgba(15, 118, 110, 0.08) 0%, rgba(255, 255, 255, 0.94) 100%);
}

.country-toolbar {
  gap: 16px;
  margin: 18px 0 24px;
}

.country-tabs-panel {
  padding: 18px 20px;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-soft);
}

.country-tabs-copy strong {
  color: var(--text);
}

.country-tabs-copy span {
  color: var(--muted);
}

.country-tabs {
  gap: 10px;
}

.country-tab {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: #475467;
  font-weight: 700;
}

.country-tab:hover {
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.country-tab.is-active {
  color: #ffffff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary-strong) 0%, var(--accent) 100%);
  box-shadow: 0 12px 24px rgba(15, 118, 110, 0.18);
}

label > span,
.choice-group > span,
.review-comment-field > span,
.import-input-label > span {
  display: inline-block;
  margin-bottom: 8px;
  color: #344054;
  font-size: 0.9rem;
  font-weight: 700;
}

input[type="text"],
input[type="url"],
input[type="password"],
input[type="date"],
input[type="month"],
input[type="number"],
select,
textarea {
  width: 100%;
  border: 1px solid #d7e0ea;
  border-radius: 14px;
  background: #ffffff;
  color: var(--text);
  padding: 12px 14px;
  font: inherit;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

select,
input[type="text"],
input[type="url"],
input[type="password"],
input[type="date"],
input[type="month"],
input[type="number"] {
  min-height: 46px;
}

textarea {
  min-height: 108px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(15, 118, 110, 0.55);
  box-shadow: var(--ring);
}

input[readonly],
.copy-only-input {
  background: var(--surface-soft);
  color: #475467;
}

.form-grid,
.upload-grid,
.grid-2,
.catalog-library-layout {
  gap: 18px;
}

.form-actions,
.panel-head-actions,
.section-toolbar,
.table-actions,
.entity-actions,
.review-actions,
.review-actions-compact,
.inline-actions {
  gap: 10px;
}

.primary-button,
.secondary-button,
.secondary-link-button,
.ghost-button,
.inline-button {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition:
    transform 0.14s ease,
    box-shadow 0.14s ease,
    border-color 0.14s ease,
    background 0.14s ease,
    color 0.14s ease;
}

.primary-button {
  border-color: transparent;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary-strong) 0%, var(--accent) 100%);
  box-shadow: 0 14px 28px rgba(15, 118, 110, 0.18);
}

.primary-button:hover,
.secondary-button:hover,
.secondary-link-button:hover,
.ghost-button:hover,
.inline-button:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.primary-button:hover {
  box-shadow: 0 16px 28px rgba(15, 118, 110, 0.22);
}

.secondary-button,
.secondary-link-button,
.ghost-button,
.inline-button {
  color: #344054;
  background: #ffffff;
}

.secondary-button:hover,
.secondary-link-button:hover,
.ghost-button:hover,
.inline-button:hover {
  border-color: rgba(15, 118, 110, 0.24);
  background: var(--surface-soft);
  box-shadow: var(--shadow-soft);
}

.danger-button {
  color: #b93815;
  border-color: rgba(185, 56, 21, 0.18);
  background: rgba(254, 242, 242, 0.92);
}

.danger-button:hover {
  background: rgba(254, 226, 226, 0.96);
  border-color: rgba(185, 56, 21, 0.32);
}

.primary-button:disabled,
.secondary-button:disabled,
.inline-button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.inline-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--primary-strong);
  font-weight: 700;
}

.inline-link:hover {
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.table-wrap,
.table-shell {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.lots-table,
.manager-records-table {
  border-collapse: separate;
  border-spacing: 0;
}

.lots-table th,
.lots-table td,
.manager-records-table th,
.manager-records-table td {
  padding: 15px 16px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.lots-table th,
.manager-records-table th {
  background: var(--surface-soft);
  color: #475467;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lots-table thead th:first-child,
.manager-records-table thead th:first-child {
  border-top-left-radius: 20px;
}

.lots-table thead th:last-child,
.manager-records-table thead th:last-child {
  border-top-right-radius: 20px;
}

.lots-table tbody tr:last-child td,
.manager-records-table tbody tr:last-child td {
  border-bottom: 0;
}

.lots-table tbody tr:hover,
.manager-records-table tbody tr:hover {
  background: rgba(15, 118, 110, 0.04);
}

.mono-cell {
  color: #475467;
  font-weight: 700;
}

.pill,
.table-chip,
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  font-weight: 700;
}

.pill,
.table-chip {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: #475467;
}

.pill-secondary,
.table-chip-muted {
  background: #ffffff;
}

.status-badge {
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid transparent;
}

.status-badge::before {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.status-badge.is-draft {
  color: #475467;
  background: rgba(100, 116, 139, 0.08);
  border-color: rgba(100, 116, 139, 0.16);
}

.status-badge.is-draft::before {
  background: #64748b;
}

.status-badge.is-pending {
  color: #155eef;
  background: rgba(21, 94, 239, 0.08);
  border-color: rgba(21, 94, 239, 0.18);
}

.status-badge.is-pending::before {
  background: #155eef;
}

.status-badge.is-approved {
  color: #067647;
  background: rgba(6, 118, 71, 0.08);
  border-color: rgba(6, 118, 71, 0.18);
}

.status-badge.is-approved::before {
  background: #067647;
}

.status-badge.is-returned {
  color: #b54708;
  background: rgba(181, 71, 8, 0.08);
  border-color: rgba(181, 71, 8, 0.2);
}

.status-badge.is-returned::before {
  background: #b54708;
}

.status-badge.is-rejected {
  color: #b42318;
  background: rgba(180, 35, 24, 0.08);
  border-color: rgba(180, 35, 24, 0.18);
}

.status-badge.is-rejected::before {
  background: #b42318;
}

.view-switch {
  gap: 8px;
  padding: 6px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.view-switch-link {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 12px;
  color: #475467;
  font-weight: 700;
}

.view-switch-link:hover {
  background: rgba(255, 255, 255, 0.9);
}

.view-switch-link.is-active {
  color: var(--primary-strong);
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.catalog-grid,
.review-grid,
.drom-model-grid,
.drom-trim-grid {
  gap: 18px;
}

.catalog-card,
.review-card,
.drom-model-card,
.drom-trim-card,
.drom-generation-card,
.drom-spec-card {
  border-radius: 22px;
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.catalog-card,
.review-card {
  padding: 16px;
}

.catalog-card:hover,
.review-card:hover,
.drom-model-card:hover,
.drom-trim-card:hover,
.drom-generation-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.catalog-card-media,
.review-card-media {
  min-height: 172px;
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface-soft);
}

.catalog-card-media img,
.review-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-card-body,
.review-card-body {
  gap: 16px;
}

.catalog-title-block h3,
.review-card-body h3 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.2;
  color: var(--text);
}

.catalog-subline {
  margin: 6px 0 0;
  color: var(--muted);
}

.catalog-metrics {
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.catalog-metrics div,
.preview-list div,
.reference-row,
.choice-card,
.photo-select-card,
.photo-card,
.publish-card,
.status-inline {
  border-radius: 16px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: var(--surface-soft);
}

.catalog-metrics div {
  padding: 12px 14px;
}

.catalog-metrics dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.catalog-metrics dd {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
}

.review-form-shell {
  gap: 14px;
}

.review-comment-field textarea {
  min-height: 96px;
}

.empty-state {
  padding: 24px;
  border-radius: 18px;
  border: 1px dashed rgba(17, 24, 39, 0.12);
  background: var(--surface-soft);
}

.lot-header {
  gap: 18px;
  margin-bottom: 20px;
}

.publish-card {
  padding: 18px;
}

.preview-list {
  gap: 12px;
}

.preview-list div {
  padding: 12px 14px;
}

.preview-list dt {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.preview-list dd {
  margin: 6px 0 0;
  font-weight: 700;
}

.choice-card {
  padding: 12px 14px;
}

.photo-grid,
.editable-photo-grid {
  gap: 14px;
}

.photo-card,
.photo-select-card {
  box-shadow: none;
}

.photo-card img,
.photo-select-card img {
  border-radius: 14px;
}

.reference-details {
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #ffffff;
}

.reference-details summary {
  padding: 14px 16px;
  font-weight: 700;
  cursor: pointer;
}

.reference-list {
  padding: 0 16px 16px;
}

.reference-row {
  background: var(--surface-soft);
}

.login-layout {
  min-height: calc(100vh - 140px);
}

.login-card {
  max-width: 460px;
  padding: 30px;
}

.command-snippet {
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: #101828;
  color: #e5eef7;
  overflow-x: auto;
  font-family: Consolas, "Courier New", monospace;
}

.drom-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.drom-breadcrumbs a,
.drom-breadcrumbs span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border);
  color: #475467;
}

.catalog-brand-link {
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #ffffff;
  box-shadow: none;
}

.catalog-brand-link:hover,
.catalog-brand-link.is-active {
  border-color: rgba(15, 118, 110, 0.24);
  box-shadow: var(--shadow-soft);
}

.drom-generation-card,
.drom-trim-head {
  gap: 16px;
}

.drom-generation-image,
.drom-trim-image,
.drom-trim-hero-image {
  border-radius: 18px;
  overflow: hidden;
}

.flash {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.flash-error {
  background: rgba(254, 242, 242, 0.96);
  border-color: rgba(180, 35, 24, 0.14);
  color: #9f1d12;
}

.flash-success {
  background: rgba(236, 253, 243, 0.96);
  border-color: rgba(6, 118, 71, 0.14);
  color: #067647;
}

@media (max-width: 1180px) {
  .catalog-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-grid,
  .review-grid {
    grid-template-columns: 1fr;
  }

  .catalog-grid.is-list .catalog-card,
  .review-grid.is-list .review-card {
    grid-template-columns: 140px minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .page-wrap {
    width: min(100vw - 28px, 100%);
  }

  .topbar {
    padding: 14px 16px;
  }

  .topbar-main {
    gap: 14px;
  }

  .topbar-nav {
    width: 100%;
  }

  .status-grid,
  .workspace-kpis,
  .dashboard-metrics,
  .catalog-metrics {
    grid-template-columns: 1fr;
  }

  .hero-card,
  .panel,
  .login-card {
    padding: 20px;
  }

  .catalog-card,
  .review-card,
  .catalog-grid.is-list .catalog-card,
  .review-grid.is-list .review-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar-nav {
    padding: 4px;
    gap: 6px;
  }

  .topbar-link {
    min-height: 36px;
    justify-content: center;
  }

  .hero-card h1 {
    font-size: 1.55rem;
  }

  .catalog-metrics {
    grid-template-columns: 1fr;
  }

  .inline-link,
  .secondary-link-button,
  .ghost-button,
  .primary-button,
  .secondary-button,
  .inline-button {
    width: 100%;
  }

  .brand-logo {
    height: 32px;
    max-width: min(150px, 68vw);
  }

  .manager-record-details-drawer {
    width: min(100%, calc(100vw - 20px));
    max-height: calc(100vh - 20px);
    padding: 18px 14px 20px;
    border-radius: 22px;
  }

  .manager-record-details-head,
  .manager-record-details-summary {
    grid-template-columns: 1fr;
  }

  .manager-record-details-head {
    display: grid;
  }

  .manager-record-details-head-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .manager-record-details-checklist--grid {
    grid-template-columns: 1fr;
  }

  .manager-record-details-grid {
    grid-template-columns: 1fr;
  }

  .table-shell-records {
    overflow-x: auto;
  }

  .manager-records-table.is-admin-table {
    min-width: 980px;
    table-layout: auto;
  }

  .manager-records-table.is-my-purchases-table {
    min-width: 820px;
    table-layout: auto;
  }

  body.admin-page--wide .page-wrap {
    width: min(100vw - 20px, 100%);
  }

  body.admin-page--wide .table-shell-records {
    overflow-x: auto;
  }

  body.admin-page--wide .manager-records-table.is-admin-table {
    min-width: 1160px;
    table-layout: fixed;
  }

  body.admin-page--wide .manager-records-table.is-my-purchases-table {
    min-width: 900px;
    table-layout: fixed;
  }
}

.flash-stack {
  position: fixed;
  top: 82px;
  right: 18px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(420px, calc(100vw - 28px));
  pointer-events: none;
}

.flash-stack .flash {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  pointer-events: auto;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.flash.is-hiding {
  opacity: 0;
  transform: translateY(-10px);
}

.flash-message {
  min-width: 0;
  line-height: 1.45;
}

.flash-close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.14s ease, transform 0.14s ease;
}

.flash-close:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: scale(1.04);
}

@media (max-width: 760px) {
  .flash-stack {
    top: 74px;
    right: 12px;
    left: 12px;
    width: auto;
  }

  .flash-stack .flash {
    grid-template-columns: minmax(0, 1fr) 28px;
  }
}

.rop-dashboard {
  display: grid;
  gap: 20px;
}

.rop-head,
.rop-toolbar,
.rop-section,
.rop-settings-panel {
  border: 1px solid rgba(74, 55, 28, 0.1);
  border-radius: 24px;
  background: rgba(255, 252, 247, 0.94);
  box-shadow: 0 18px 38px rgba(74, 55, 28, 0.08);
}

.rop-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px;
}

.rop-head-copy,
.rop-refresh-meta,
.rop-toolbar-group,
.rop-progress-stack,
.rop-event-feed,
.rop-drawer-body,
.rop-settings-body,
.rop-settings-list {
  display: grid;
  gap: 10px;
}

.rop-head-copy h1,
.rop-chart-copy h3,
.rop-drawer-head h2,
.rop-section-head h2 {
  margin: 0;
}

.rop-head-actions {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.rop-source-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(74, 55, 28, 0.08);
  font-weight: 700;
}

.rop-source-pill.is-ok {
  background: rgba(31, 107, 71, 0.16);
  color: #18553b;
}

.rop-source-pill.is-partial {
  background: rgba(189, 109, 43, 0.18);
  color: #8b521d;
}

.rop-source-pill.is-error {
  background: rgba(157, 63, 45, 0.16);
  color: #8a3627;
}

.rop-toolbar {
  display: grid;
  grid-template-columns: 1.5fr minmax(220px, 260px) minmax(220px, 260px);
  gap: 18px;
  padding: 18px 22px;
}

.filter-pills,
.rop-manager-head,
.rop-manager-metrics,
.rop-manager-kpi-grid,
.rop-badge-row,
.rop-link-row,
.rop-settings-actions,
.rop-drawer-head,
.rop-section-head {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.rop-section-head,
.rop-drawer-head {
  align-items: center;
  justify-content: space-between;
}

.filter-pill {
  border: 1px solid rgba(74, 55, 28, 0.14);
  background: #fff;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
}

.filter-pill.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
}

.rop-notice {
  padding: 16px 18px;
  border: 1px solid rgba(189, 109, 43, 0.2);
  border-radius: 20px;
  background: rgba(255, 248, 235, 0.92);
}

.rop-summary-grid,
.rop-chart-grid,
.rop-managers-grid {
  display: grid;
  gap: 16px;
}

.rop-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rop-chart-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rop-managers-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rop-summary-card,
.rop-chart-card,
.rop-manager-card {
  border: 1px solid rgba(74, 55, 28, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 30px rgba(74, 55, 28, 0.06);
}

.rop-summary-card,
.rop-manager-card,
.rop-section {
  padding: 18px;
}

.rop-summary-card strong {
  font-size: 28px;
  line-height: 1.1;
}

.rop-chart-card {
  display: grid;
  grid-template-columns: 108px 1fr;
  align-items: center;
  gap: 16px;
  padding: 18px;
}

.rop-donut {
  position: relative;
  width: 96px;
  height: 96px;
}

.rop-donut svg {
  width: 96px;
  height: 96px;
  transform: rotate(-90deg);
}

.rop-donut-track,
.rop-donut-fill {
  fill: none;
  stroke-width: 10;
}

.rop-donut-track {
  stroke: rgba(74, 55, 28, 0.09);
}

.rop-donut-fill {
  stroke-linecap: round;
}

.rop-donut-green .rop-donut-fill { stroke: #1f6b47; }
.rop-donut-yellow .rop-donut-fill { stroke: #bd6d2b; }
.rop-donut-red .rop-donut-fill { stroke: #9d3f2d; }
.rop-donut-neutral .rop-donut-fill { stroke: #6d7680; }

.rop-donut-label {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.rop-donut-label strong {
  font-size: 24px;
}

.rop-manager-card {
  display: grid;
  gap: 14px;
  cursor: pointer;
}

.rop-manager-head {
  align-items: flex-start;
  justify-content: space-between;
}

.rop-manager-head h3 {
  margin: 0 0 4px;
}

.rop-status-dot,
.rop-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.rop-status-dot.is-green {
  background: rgba(31, 107, 71, 0.14);
  color: #17543a;
}

.rop-status-dot.is-yellow,
.rop-badge.is-warning {
  background: rgba(189, 109, 43, 0.16);
  color: #8b521d;
}

.rop-status-dot.is-red {
  background: rgba(157, 63, 45, 0.14);
  color: #8a3627;
}

.rop-manager-metrics > div,
.rop-manager-kpi-grid span,
.rop-progress-row {
  display: grid;
  gap: 4px;
}

.rop-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.rop-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(74, 55, 28, 0.08);
  overflow: hidden;
}

.rop-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.rop-progress-bar .is-green { background: #1f6b47; }
.rop-progress-bar .is-yellow { background: #bd6d2b; }
.rop-progress-bar .is-red { background: #9d3f2d; }
.rop-progress-bar .is-neutral { background: #8a8f96; }

.rop-event-item {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(74, 55, 28, 0.08);
}

.rop-event-item.is-warning {
  border-color: rgba(189, 109, 43, 0.22);
}

.rop-event-item.is-critical {
  border-color: rgba(157, 63, 45, 0.2);
}

.rop-drawer,
.rop-settings-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
}

.rop-drawer-backdrop,
.rop-settings-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(45, 36, 22, 0.36);
}

.rop-drawer-panel,
.rop-settings-panel {
  position: absolute;
  right: 18px;
  background: rgba(255, 252, 247, 0.98);
}

.rop-drawer-panel {
  top: 18px;
  bottom: 18px;
  width: min(720px, calc(100vw - 36px));
  padding: 20px 22px;
  overflow: auto;
}

.rop-settings-panel {
  left: 50%;
  top: 50%;
  right: auto;
  width: min(820px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  padding: 20px 22px;
  overflow: auto;
  transform: translate(-50%, -50%);
}

.rop-settings-item {
  display: grid;
  grid-template-columns: 24px 1fr 140px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(74, 55, 28, 0.09);
  border-radius: 16px;
  background: #fff;
}

.rop-plan-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.rop-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.rop-plan-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(72, 56, 33, 0.1);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 24px rgba(74, 55, 28, 0.05);
}

.rop-plan-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.rop-plan-card-head strong {
  display: block;
  font-size: 16px;
}

.rop-plan-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.rop-plan-field {
  display: grid;
  gap: 8px;
}

.rop-plan-field span {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 1180px) {
  .rop-summary-grid,
  .rop-chart-grid,
  .rop-managers-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rop-toolbar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .rop-head,
  .rop-section-head {
    flex-direction: column;
  }

  .rop-summary-grid,
  .rop-chart-grid,
  .rop-managers-grid {
    grid-template-columns: 1fr;
  }

  .rop-chart-card,
  .rop-event-item {
    grid-template-columns: 1fr;
  }
}

/* ROP dashboard v3 overrides */
.rop-dashboard {
  gap: 22px;
}

.rop-head,
.rop-toolbar,
.rop-section,
.rop-settings-panel {
  border-radius: 26px;
  background: #fffdfa;
  border: 1px solid rgba(72, 56, 33, 0.09);
  box-shadow: 0 18px 42px rgba(74, 55, 28, 0.08);
}

.rop-head {
  align-items: center;
  padding: 28px 30px;
}

.rop-head-copy {
  gap: 8px;
}

.rop-head-copy h1 {
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.rop-head-copy .muted {
  max-width: 780px;
  font-size: 15px;
  line-height: 1.6;
}

.rop-head-actions {
  min-width: 280px;
  justify-items: stretch;
}

.rop-action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.rop-toolbar {
  grid-template-columns: 1.4fr minmax(220px, 280px) minmax(220px, 280px);
  align-items: end;
  padding: 18px 22px;
}

.rop-toolbar-periods {
  align-content: start;
}

.rop-notice {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
}

.rop-notice.is-partial {
  border-color: rgba(189, 109, 43, 0.26);
  background: #fff8ef;
}

.rop-notice.is-error {
  border-color: rgba(157, 63, 45, 0.22);
  background: #fff4f1;
}

.rop-notice-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.rop-notice-list {
  display: grid;
  gap: 8px;
}

.rop-notice-item {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(72, 56, 33, 0.08);
}

.rop-summary-stack {
  display: grid;
  gap: 16px;
}

.rop-summary-grid.is-primary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.rop-summary-grid.is-secondary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.rop-kpi-card {
  border: 1px solid rgba(72, 56, 33, 0.08);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 251, 245, 0.92));
  box-shadow: 0 12px 30px rgba(74, 55, 28, 0.05);
}

.rop-kpi-card.is-primary {
  padding: 18px 18px 16px;
  min-height: 134px;
}

.rop-kpi-card.is-secondary {
  padding: 16px;
  min-height: 112px;
}

.rop-kpi-card.is-green {
  border-color: rgba(31, 107, 71, 0.18);
}

.rop-kpi-card.is-yellow {
  border-color: rgba(189, 109, 43, 0.2);
}

.rop-kpi-card.is-red {
  border-color: rgba(157, 63, 45, 0.2);
}

.rop-kpi-card.is-accent {
  border-color: rgba(44, 102, 168, 0.18);
}

.rop-kpi-label {
  display: block;
  color: #6e6458;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.rop-kpi-value {
  display: block;
  margin-top: 10px;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: #1f2328;
}

.rop-kpi-meta {
  display: block;
  margin-top: 8px;
  color: #7d756a;
  font-size: 13px;
}

.rop-chart-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.rop-chart-card {
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 18px;
  min-height: 258px;
}

.rop-chart-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.rop-chart-head h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.35;
}

.rop-help-dot {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  position: relative;
  border-radius: 50%;
  border: 1px solid rgba(72, 56, 33, 0.14);
  background: #fff;
  color: #6e6458;
  font-size: 12px;
  font-weight: 700;
  cursor: help;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.rop-help-dot:hover,
.rop-help-dot:focus-visible,
.rop-help-dot:focus-within {
  border-color: rgba(31, 107, 71, 0.26);
  color: #1f6b47;
  box-shadow: 0 8px 18px rgba(31, 107, 71, 0.16);
  outline: none;
}

.rop-help-dot-icon {
  display: inline-grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.rop-help-tooltip {
  position: absolute;
  top: calc(100% + 10px);
  right: -10px;
  z-index: 20;
  width: min(260px, calc(100vw - 48px));
  padding: 12px 14px;
  border-radius: 14px;
  background: #fffdf8;
  border: 1px solid rgba(72, 56, 33, 0.14);
  box-shadow: 0 18px 40px rgba(39, 31, 18, 0.14);
  color: #3c352d;
  font-size: 12px;
  line-height: 1.55;
  text-transform: none;
  letter-spacing: 0;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.rop-help-tooltip::before {
  content: "";
  position: absolute;
  top: -7px;
  right: 15px;
  width: 12px;
  height: 12px;
  background: #fffdf8;
  border-top: 1px solid rgba(72, 56, 33, 0.14);
  border-left: 1px solid rgba(72, 56, 33, 0.14);
  transform: rotate(45deg);
}

.rop-help-dot:hover .rop-help-tooltip,
.rop-help-dot:focus-visible .rop-help-tooltip,
.rop-help-dot:focus-within .rop-help-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.rop-chart-body {
  display: grid;
  gap: 16px;
  justify-items: center;
}

.rop-chart-copy {
  width: 100%;
  display: grid;
  gap: 8px;
}

.rop-chart-meta {
  color: #6e6458;
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.rop-chart-detail {
  font-size: 18px;
  font-weight: 700;
}

.rop-chart-fact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}

.rop-donut {
  width: 110px;
  height: 110px;
}

.rop-donut svg {
  width: 110px;
  height: 110px;
}

.rop-donut-label strong {
  font-size: 24px;
  letter-spacing: -0.02em;
}

.rop-managers-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.rop-manager-card {
  gap: 16px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(72, 56, 33, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 252, 247, 0.94));
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.rop-manager-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(74, 55, 28, 0.11);
}

.rop-manager-card.is-red {
  border-color: rgba(157, 63, 45, 0.2);
}

.rop-manager-card.is-yellow {
  border-color: rgba(189, 109, 43, 0.22);
}

.rop-manager-card.is-green {
  border-color: rgba(31, 107, 71, 0.18);
}

.rop-manager-title-wrap {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.rop-manager-title-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.rop-manager-title-row h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}

.rop-manager-subline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.rop-status-dot,
.rop-badge {
  gap: 8px;
  padding: 7px 11px;
  font-size: 12px;
  line-height: 1;
  letter-spacing: 0.02em;
}

.rop-badge.is-green,
.rop-badge.is-safe {
  background: rgba(31, 107, 71, 0.14);
  color: #16513a;
}

.rop-badge.is-yellow,
.rop-badge.is-warning {
  background: rgba(189, 109, 43, 0.16);
  color: #8a531e;
}

.rop-badge.is-red,
.rop-badge.is-critical {
  background: rgba(157, 63, 45, 0.14);
  color: #8c3729;
}

.rop-badge.is-neutral {
  background: rgba(72, 56, 33, 0.08);
  color: #635a50;
}

.rop-badge.is-accent {
  background: rgba(44, 102, 168, 0.12);
  color: #24558f;
}

.rop-manager-stat-grid,
.rop-detail-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.rop-stat-tile,
.rop-kpi-cell {
  border: 1px solid rgba(72, 56, 33, 0.08);
  border-radius: 18px;
  padding: 12px 12px 10px;
  background: rgba(255, 255, 255, 0.88);
  min-width: 0;
}

.rop-stat-label,
.rop-kpi-cell span {
  display: block;
  color: #776c60;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rop-stat-value,
.rop-kpi-cell strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
  line-height: 1.15;
  word-break: break-word;
}

.rop-stat-meta {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #84796d;
}

.rop-manager-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.rop-card-block {
  display: grid;
  gap: 12px;
}

.rop-card-block-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: #5f574d;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rop-progress-stack {
  gap: 12px;
}

.rop-progress-row {
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(72, 56, 33, 0.07);
}

.rop-progress-foot {
  margin-top: 6px;
  color: #72675c;
  font-size: 12px;
}

.manager-rop-plan-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.85fr);
  gap: 18px;
}

.manager-rop-plan-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(31, 107, 71, 0.1);
  background: rgba(255, 255, 255, 0.9);
}

.manager-rop-plan-card-head h3 {
  margin: 0;
  font-size: 20px;
}

.manager-rop-plan-chart-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}

.manager-rop-plan-stats {
  display: grid;
  gap: 12px;
}

.manager-rop-plan-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(245, 238, 227, 0.7);
}

.manager-rop-plan-stat span {
  color: #72675c;
  font-size: 13px;
}

.manager-rop-plan-stat strong {
  font-size: 18px;
}

.manager-rop-plan-over {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(31, 107, 71, 0.12);
  color: #1f6b47;
  font-weight: 700;
}

.manager-rop-plan-kpi {
  align-content: center;
}

.manager-rop-plan-kpi-value {
  font-size: clamp(44px, 5vw, 64px);
  font-weight: 800;
  line-height: 1;
  color: #1a4f6b;
}

.manager-rop-plan-kpi-caption {
  color: #72675c;
  font-size: 15px;
}

@media (max-width: 980px) {
  .manager-rop-plan-grid {
    grid-template-columns: 1fr;
  }

  .manager-rop-plan-chart-row {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .manager-rop-plan-stats {
    width: 100%;
  }
}

.rop-time-only-note {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(72, 56, 33, 0.06);
  color: #5f574d;
  font-size: 14px;
  line-height: 1.5;
}

.rop-badge-row {
  align-items: flex-start;
}

.rop-event-feed {
  gap: 12px;
}

.rop-event-item {
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid rgba(72, 56, 33, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
}

.rop-event-main {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 14px;
  align-items: start;
}

.rop-event-severity {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 6px;
  background: #7c8591;
}

.rop-event-severity.is-warning {
  background: #bd6d2b;
}

.rop-event-severity.is-critical {
  background: #9d3f2d;
}

.rop-event-severity.is-info {
  background: #406d9c;
}

.rop-event-title-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.rop-event-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
  color: #72685d;
  font-size: 13px;
}

.rop-event-side {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: 180px;
}

.rop-event-side time {
  color: #6e6559;
  font-size: 13px;
  font-weight: 700;
}

.rop-event-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.rop-event-action {
  min-height: 34px;
}

.ghost-link {
  color: #24558f;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.ghost-link:hover {
  text-decoration: underline;
}

.rop-drawer-panel {
  width: min(860px, calc(100vw - 36px));
  padding: 22px 24px 26px;
}

.rop-drawer-body {
  gap: 18px;
}

.rop-drawer-hero,
.rop-drawer-section {
  border: 1px solid rgba(72, 56, 33, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  padding: 18px;
}

.rop-drawer-hero {
  display: grid;
  gap: 14px;
}

.rop-drawer-section {
  display: grid;
  gap: 14px;
}

.rop-drawer-section h3 {
  margin: 0;
  font-size: 18px;
}

.rop-link-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.rop-detail-history,
.rop-detail-timeline,
.rop-hour-grid {
  display: grid;
  gap: 10px;
}

.rop-detail-history-row,
.rop-detail-event,
.rop-hour-row {
  border: 1px solid rgba(72, 56, 33, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  padding: 12px 14px;
}

.rop-detail-history-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.rop-detail-event {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
}

.rop-detail-event time {
  color: #71665a;
  font-weight: 700;
}

.rop-hour-row {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 12px;
  align-items: start;
}

.rop-hour-label {
  color: #62594e;
  font-weight: 700;
}

.rop-hour-bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(72, 56, 33, 0.08);
  overflow: hidden;
}

.rop-hour-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1f6b47, #3b8c64);
}

.rop-hour-metrics {
  grid-column: 2;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: #70675c;
  font-size: 12px;
}

.rop-skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(72, 56, 33, 0.08);
}

.rop-skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.68), transparent);
  animation: rop-skeleton-shimmer 1.25s infinite;
}

.rop-skeleton.is-title { height: 16px; width: 58%; }
.rop-skeleton.is-value { height: 36px; width: 42%; margin-top: 10px; }
.rop-skeleton.is-meta { height: 12px; width: 68%; margin-top: 8px; }
.rop-skeleton.is-chart { height: 116px; width: 116px; border-radius: 50%; justify-self: center; }
.rop-skeleton.is-line { height: 14px; width: 100%; }
.rop-skeleton.is-grid { height: 82px; width: 100%; }

.rop-kpi-card.is-skeleton,
.rop-chart-card.is-skeleton,
.rop-manager-card.is-skeleton,
.rop-event-item.is-skeleton {
  cursor: default;
  transform: none;
}

.rop-drawer-loading {
  display: grid;
  gap: 12px;
}

.rop-dashboard.is-refreshing .rop-section,
.rop-dashboard.is-refreshing .rop-toolbar,
.rop-dashboard.is-refreshing .rop-head {
  opacity: 0.96;
}

@keyframes rop-skeleton-shimmer {
  100% {
    transform: translateX(100%);
  }
}

@media (max-width: 1440px) {
  .rop-chart-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1280px) {
  .rop-plan-grid,
  .rop-summary-grid.is-primary,
  .rop-summary-grid.is-secondary,
  .rop-managers-grid,
  .rop-manager-kpi-grid,
  .rop-manager-stat-grid,
  .rop-detail-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rop-plan-field-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .rop-head,
  .rop-section-head,
  .rop-notice-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .rop-head-actions,
  .rop-action-row,
  .rop-event-side {
    justify-items: start;
    justify-content: flex-start;
  }

  .rop-toolbar,
  .rop-plan-grid,
  .rop-chart-grid,
  .rop-managers-grid,
  .rop-summary-grid.is-primary,
  .rop-summary-grid.is-secondary {
    grid-template-columns: 1fr;
  }

  .rop-event-item,
  .rop-detail-event,
  .rop-hour-row {
    grid-template-columns: 1fr;
  }

  .rop-hour-metrics {
    grid-column: auto;
  }
}

/* Messenger */
body.messenger-panel-open {
  overflow: hidden;
}

.messenger-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 85;
}

.messenger-launcher {
  position: relative;
  z-index: 3;
  width: 62px;
  height: 62px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  box-shadow: 0 18px 42px rgba(15, 107, 90, 0.28);
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.messenger-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 46px rgba(15, 107, 90, 0.32);
}

.messenger-launcher-icon {
  font-size: 24px;
  line-height: 1;
}

.messenger-launcher-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #d94832;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}

.messenger-screen-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1;
  border: 0;
  padding: 0;
  background: rgba(45, 36, 22, 0.22);
  cursor: pointer;
}

.messenger-panel {
  position: absolute;
  right: 0;
  bottom: 78px;
  z-index: 2;
  width: min(1040px, calc(100vw - 48px));
  height: min(720px, calc(100dvh - 120px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: 28px;
  border: 1px solid rgba(72, 56, 33, 0.1);
  background: rgba(255, 252, 247, 0.98);
  box-shadow: 0 28px 80px rgba(45, 36, 22, 0.2);
  overflow: hidden;
}

.messenger-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(72, 56, 33, 0.08);
  background: rgba(255, 255, 255, 0.78);
}

.messenger-panel-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.messenger-panel-actions,
.messenger-active-actions,
.messenger-modal-foot {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.messenger-small-button {
  min-height: 38px;
  padding: 10px 14px;
  border-radius: 14px;
}

.messenger-panel-body {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 0;
}

.messenger-sidebar {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
  border-right: 1px solid rgba(72, 56, 33, 0.08);
  background: rgba(255, 255, 255, 0.78);
}

.messenger-sidebar-head {
  padding: 18px 18px 10px;
}

.messenger-sidebar-title {
  display: grid;
  gap: 4px;
}

.messenger-chat-list {
  display: grid;
  gap: 8px;
  padding: 10px 12px 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.messenger-chat-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(72, 56, 33, 0.08);
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.88);
  cursor: pointer;
  text-align: left;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.messenger-chat-item:hover,
.messenger-chat-item.is-active {
  transform: translateY(-1px);
  border-color: rgba(15, 107, 90, 0.22);
  box-shadow: 0 12px 26px rgba(15, 107, 90, 0.09);
}

.messenger-chat-avatar,
.messenger-user-initial {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-grid;
  place-items: center;
  background: rgba(15, 107, 90, 0.1);
  color: var(--primary-strong);
  font-weight: 800;
}

.messenger-chat-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.messenger-chat-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.messenger-chat-row strong,
.messenger-chat-subtitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.messenger-chat-subtitle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  min-width: 0;
}

.messenger-unread-badge,
.messenger-group-mark {
  flex: 0 0 auto;
  min-width: 22px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
}

.messenger-unread-badge {
  background: rgba(15, 107, 90, 0.14);
  color: var(--primary-strong);
}

.messenger-group-mark {
  background: rgba(72, 56, 33, 0.08);
  color: #635a50;
}

.messenger-presence {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9ca4ae;
}

.messenger-presence.is-online {
  background: #1f6b47;
}

.messenger-workspace,
.messenger-active {
  min-height: 0;
  min-width: 0;
}

.messenger-workspace {
  display: grid;
  background: rgba(255, 251, 246, 0.9);
}

.messenger-empty {
  height: 100%;
  display: grid;
  place-items: center;
  gap: 8px;
  color: var(--muted);
  text-align: center;
  padding: 24px;
}

.messenger-active {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
}

.messenger-active-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(72, 56, 33, 0.08);
}

.messenger-active-title-block {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.messenger-active-title-block strong,
.messenger-active-subtitle {
  overflow-wrap: anywhere;
}

.messenger-message-scroll {
  min-height: 0;
  overflow-y: auto;
  padding: 18px 20px;
  display: grid;
  align-content: start;
  gap: 12px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.messenger-load-older {
  justify-self: center;
}

.messenger-message-list {
  display: grid;
  gap: 12px;
}

.messenger-message {
  display: grid;
  gap: 6px;
}

.messenger-message.is-own {
  justify-items: end;
}

.messenger-message.is-foreign {
  justify-items: start;
}

.messenger-message-bubble {
  max-width: min(78%, 640px);
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 22px;
  border: 1px solid rgba(72, 56, 33, 0.08);
  background: rgba(255, 255, 255, 0.96);
}

.messenger-message.is-own .messenger-message-bubble {
  background: linear-gradient(180deg, rgba(15, 107, 90, 0.1), rgba(255, 255, 255, 0.96));
  border-color: rgba(15, 107, 90, 0.2);
}

.messenger-message-body {
  white-space: pre-wrap;
  line-height: 1.55;
}

.messenger-message-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.messenger-message-actions {
  display: flex;
  gap: 8px;
}

.messenger-inline-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary-strong);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.messenger-inline-action:hover {
  text-decoration: underline;
}

.messenger-message-status.is-read {
  color: #1f6b47;
}

.messenger-message-status.is-delivered {
  color: #24558f;
}

.messenger-replied-snippet,
.messenger-forwarded-mark {
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(72, 56, 33, 0.06);
  display: grid;
  gap: 4px;
}

.messenger-forwarded-mark {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.messenger-message-attachments {
  display: grid;
  gap: 10px;
}

.messenger-attachment {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(72, 56, 33, 0.08);
  background: rgba(255, 255, 255, 0.88);
}

.messenger-attachment.is-image {
  grid-template-columns: 1fr;
}

.messenger-attachment.is-image img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 14px;
}

.messenger-attachment-copy {
  display: grid;
  gap: 4px;
}

.messenger-typing-line,
.messenger-reply-banner,
.messenger-attachment-queue {
  margin: 0 20px;
}

.messenger-typing-line {
  color: var(--muted);
  font-size: 13px;
}

.messenger-reply-banner,
.messenger-attachment-queue {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(72, 56, 33, 0.08);
  background: rgba(255, 255, 255, 0.88);
}

.messenger-reply-banner {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.messenger-reply-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.messenger-reply-copy span {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.messenger-pending-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.messenger-composer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 16px 20px 20px;
  border-top: 1px solid rgba(72, 56, 33, 0.08);
  background: rgba(255, 255, 255, 0.82);
}

.messenger-icon-button {
  width: 46px;
  min-width: 46px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  font-size: 20px;
}

.messenger-input {
  min-height: 48px;
  max-height: 130px;
  resize: vertical;
}

.messenger-send-button {
  min-height: 48px;
}

.messenger-modal {
  position: fixed;
  inset: 0;
  z-index: 95;
}

.messenger-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(45, 36, 22, 0.34);
}

.messenger-modal-panel {
  position: absolute;
  right: 32px;
  bottom: 112px;
  width: min(460px, calc(100vw - 40px));
  max-height: min(680px, calc(100vh - 160px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(72, 56, 33, 0.1);
  background: rgba(255, 252, 247, 0.98);
  box-shadow: 0 24px 56px rgba(45, 36, 22, 0.18);
}

.messenger-modal-head,
.messenger-modal-foot {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(72, 56, 33, 0.08);
}

.messenger-modal-foot {
  border-top: 1px solid rgba(72, 56, 33, 0.08);
  border-bottom: 0;
  justify-content: flex-end;
}

.messenger-modal-body {
  padding: 18px;
  overflow-y: auto;
  display: grid;
  gap: 14px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.messenger-user-picker,
.messenger-group-picker,
.messenger-forward-list,
.messenger-info-members {
  display: grid;
  gap: 10px;
}

.messenger-user-option,
.messenger-group-option,
.messenger-forward-option,
.messenger-info-member {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(72, 56, 33, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
}

.messenger-group-option input {
  justify-self: start;
}

.messenger-user-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.messenger-user-copy span {
  color: var(--muted);
}

.messenger-info-list {
  display: grid;
  gap: 10px;
}

.messenger-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.messenger-toast-stack {
  position: fixed;
  right: 24px;
  bottom: 100px;
  display: grid;
  gap: 10px;
  z-index: 96;
}

.messenger-toast {
  min-width: 240px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(45, 36, 22, 0.92);
  color: #fff;
  box-shadow: 0 18px 40px rgba(45, 36, 22, 0.22);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.messenger-toast.is-hiding {
  opacity: 0;
  transform: translateY(10px);
}

@media (max-width: 1180px) {
  .messenger-panel {
    width: min(920px, calc(100vw - 32px));
  }
}

@media (max-width: 980px) {
  .messenger-widget {
    right: 16px;
    bottom: 16px;
  }

  .messenger-panel {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 88px;
    width: auto;
    height: min(760px, calc(100dvh - 112px));
    max-height: calc(100dvh - 112px);
  }

  .messenger-panel-body {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(180px, 32vh) minmax(0, 1fr);
  }

  .messenger-sidebar {
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid rgba(72, 56, 33, 0.08);
  }

  .messenger-active-head {
    align-items: flex-start;
  }
}

@media (max-width: 720px) {
  .messenger-widget {
    right: 12px;
    bottom: 12px;
  }

  .messenger-launcher {
    width: 58px;
    height: 58px;
  }

  .messenger-panel {
    left: 8px;
    right: 8px;
    bottom: 80px;
    width: auto;
    height: calc(100dvh - 96px);
    max-height: calc(100dvh - 96px);
    border-radius: 24px;
  }

  .messenger-panel-head {
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
  }

  .messenger-panel-actions {
    justify-content: flex-start;
  }

  .messenger-panel-body {
    grid-template-rows: minmax(160px, 34vh) minmax(0, 1fr);
  }

  .messenger-sidebar-head {
    padding: 16px 16px 10px;
  }

  .messenger-chat-list {
    padding: 8px 10px 12px;
  }

  .messenger-chat-item {
    padding: 10px;
    border-radius: 16px;
  }

  .messenger-active-head {
    padding: 14px 16px 12px;
    flex-direction: column;
    align-items: stretch;
  }

  .messenger-message-bubble {
    max-width: 100%;
  }

  .messenger-message-scroll {
    padding: 14px 16px;
  }

  .messenger-typing-line,
  .messenger-reply-banner,
  .messenger-attachment-queue {
    margin: 0 16px;
  }

  .messenger-composer {
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: end;
    padding: 14px 16px 16px;
  }

  .messenger-icon-button,
  .messenger-send-button {
    width: auto;
  }

  .messenger-icon-button {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .messenger-send-button {
    min-height: 44px;
  }

  .messenger-modal-panel {
    left: 10px;
    right: 10px;
    bottom: 12px;
    width: auto;
    max-height: calc(100dvh - 24px);
  }

  .messenger-toast-stack {
    left: 10px;
    right: 10px;
    bottom: 82px;
  }

  .messenger-toast {
    min-width: 0;
    max-width: none;
  }
}

@media (max-width: 540px) {
  .messenger-small-button {
    min-height: 36px;
    padding: 9px 12px;
  }

  .messenger-chat-item {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
  }

  .messenger-chat-avatar,
  .messenger-user-initial {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .messenger-composer {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "input input"
      "attach send";
  }

  .messenger-icon-button {
    grid-area: attach;
  }

  .messenger-input {
    grid-area: input;
    min-height: 44px;
  }

  .messenger-send-button {
    grid-area: send;
    min-width: 112px;
  }
}

.auction-dashboard {
  display: grid;
  gap: 20px;
}

.auction-dashboard-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.auction-dashboard-head-copy {
  max-width: 760px;
}

.auction-dashboard-head-copy h1 {
  margin: 6px 0 10px;
}

.auction-dashboard-head-actions {
  display: grid;
  gap: 12px;
  min-width: 280px;
  justify-items: end;
}

.auction-dashboard-check-pill {
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(17, 74, 94, 0.12);
  background: rgba(250, 247, 240, 0.92);
  display: grid;
  gap: 4px;
}

.auction-dashboard-check-label,
.auction-dashboard-kpi-label,
.auction-dashboard-meta-label,
.auction-lot-card-section-label {
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6d7b88;
}

.auction-dashboard-check-pill strong,
.auction-dashboard-meta-status strong {
  font-size: 20px;
  line-height: 1.2;
  color: #0f2b3a;
}

.auction-dashboard-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.auction-dashboard-import {
  display: grid;
  gap: 16px;
}

.auction-dashboard-import-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.auction-dashboard-import-field {
  margin: 0;
}

.auction-dashboard-meta-card {
  display: grid;
  gap: 14px;
}

.auction-dashboard-meta-status {
  display: grid;
  gap: 8px;
}

.auction-dashboard-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.auction-dashboard-status-pill.is-neutral {
  background: rgba(99, 115, 129, 0.12);
  color: #50606d;
  border-color: rgba(99, 115, 129, 0.18);
}

.auction-dashboard-status-pill.is-ok {
  background: rgba(34, 145, 96, 0.12);
  color: #1f7b52;
  border-color: rgba(34, 145, 96, 0.18);
}

.auction-dashboard-status-pill.is-partial {
  background: rgba(211, 135, 44, 0.14);
  color: #9b651d;
  border-color: rgba(211, 135, 44, 0.22);
}

.auction-dashboard-status-pill.is-error {
  background: rgba(193, 75, 57, 0.12);
  color: #a13f30;
  border-color: rgba(193, 75, 57, 0.2);
}

.auction-dashboard-meta-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.auction-dashboard-meta-stats div {
  border-radius: 16px;
  background: #fbfaf7;
  border: 1px solid rgba(17, 74, 94, 0.08);
  padding: 12px 14px;
  display: grid;
  gap: 6px;
}

.auction-dashboard-meta-stats strong {
  font-size: 22px;
  line-height: 1;
  color: #0f2b3a;
}

.auction-dashboard-meta-stats span {
  color: #6d7b88;
  font-size: 13px;
}

.auction-dashboard-notice {
  border-style: dashed;
}

.auction-dashboard-notice.is-ok {
  border-color: rgba(34, 145, 96, 0.26);
  background: rgba(34, 145, 96, 0.06);
}

.auction-dashboard-notice.is-partial {
  border-color: rgba(211, 135, 44, 0.28);
  background: rgba(211, 135, 44, 0.08);
}

.auction-dashboard-notice.is-error {
  border-color: rgba(193, 75, 57, 0.3);
  background: rgba(193, 75, 57, 0.08);
}

.auction-dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.auction-dashboard-kpi-card {
  border-radius: 20px;
  border: 1px solid rgba(17, 74, 94, 0.08);
  background: #fbfaf7;
  padding: 18px;
  display: grid;
  gap: 8px;
}

.auction-dashboard-kpi-card.is-ok {
  background: rgba(34, 145, 96, 0.08);
}

.auction-dashboard-kpi-card.is-warning {
  background: rgba(211, 135, 44, 0.08);
}

.auction-dashboard-kpi-value {
  font-size: 34px;
  line-height: 1;
  color: #0f2b3a;
}

.auction-dashboard-kpi-meta {
  color: #6d7b88;
  font-size: 14px;
}

.auction-dashboard-lot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.auction-dashboard-simple-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.auction-lot-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 18px;
  border-radius: 24px;
  border: 1px solid rgba(17, 74, 94, 0.08);
  background: #ffffff;
  overflow: hidden;
}

.auction-lot-card-preview {
  position: relative;
  min-height: 100%;
  background: #eef2f4;
}

.auction-lot-card-media,
.auction-lot-card-media-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 220px;
  object-fit: cover;
}

.auction-lot-card-media-placeholder {
  display: grid;
  place-items: center;
  color: #7b8791;
  font-size: 14px;
}

.auction-lot-card-country {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: #a35a1a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auction-lot-card-body {
  padding: 18px 18px 18px 0;
  display: grid;
  gap: 14px;
}

.auction-lot-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.auction-lot-card-head h3 {
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 1.2;
}

.auction-lot-card-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  height: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.auction-lot-card-status.is-saved {
  background: rgba(34, 145, 96, 0.12);
  border-color: rgba(34, 145, 96, 0.18);
  color: #1f7b52;
}

.auction-lot-card-status.is-ready {
  background: rgba(34, 145, 96, 0.12);
  border-color: rgba(34, 145, 96, 0.18);
  color: #1f7b52;
}

.auction-lot-card-status.is-waiting {
  background: rgba(211, 135, 44, 0.12);
  border-color: rgba(211, 135, 44, 0.18);
  color: #9b651d;
}

.auction-lot-card-status.is-error {
  background: rgba(193, 75, 57, 0.12);
  border-color: rgba(193, 75, 57, 0.2);
  color: #a13f30;
}

.auction-lot-card-status.is-disabled {
  background: rgba(99, 115, 129, 0.12);
  border-color: rgba(99, 115, 129, 0.18);
  color: #50606d;
}

.auction-lot-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: #5f6b75;
  font-size: 13px;
}

.auction-lot-card-note,
.auction-lot-card-translation {
  border-radius: 18px;
  border: 1px solid rgba(17, 74, 94, 0.08);
  background: #fbfaf7;
  padding: 14px 16px;
}

.auction-lot-card-note {
  color: #344351;
}

.auction-lot-card-translation {
  display: grid;
  gap: 8px;
}

.auction-lot-card-translation-body {
  color: #1f2f3d;
  line-height: 1.6;
}

.auction-lot-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auction-simple-card {
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(17, 74, 94, 0.08);
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(17, 74, 94, 0.05);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.auction-simple-card:hover {
  border-color: rgba(17, 74, 94, 0.16);
  box-shadow: 0 16px 36px rgba(17, 74, 94, 0.08);
  transform: translateY(-1px);
}

.auction-simple-card.is-focused {
  border-color: rgba(15, 107, 90, 0.45);
  box-shadow: 0 0 0 4px rgba(15, 107, 90, 0.12), 0 18px 40px rgba(17, 74, 94, 0.08);
}

.auction-simple-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.auction-simple-card-head h3 {
  margin: 6px 0 0;
  font-size: 30px;
  line-height: 1;
}

.auction-simple-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.auction-simple-card-field,
.auction-simple-card-note,
.auction-simple-card-block {
  border-radius: 18px;
  border: 1px solid rgba(17, 74, 94, 0.08);
  background: #fbfaf7;
  padding: 14px 16px;
}

.auction-simple-card-field strong {
  display: block;
  margin-top: 6px;
  color: #173248;
  font-size: 18px;
  line-height: 1.35;
}

.auction-simple-card-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #6d7b88;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auction-simple-card-note {
  color: #344351;
  line-height: 1.55;
}

.auction-simple-card-text {
  margin-top: 8px;
  color: #1f2f3d;
  line-height: 1.6;
}

.auction-simple-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: #5f6b75;
  font-size: 13px;
}

.auction-simple-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.auction-simple-card-actions .danger {
  color: #a13f30;
  border-color: rgba(193, 75, 57, 0.22);
}

.auction-simple-card-actions .danger:hover {
  background: rgba(193, 75, 57, 0.08);
}

@media (max-width: 1180px) {
  .auction-dashboard-kpi-grid,
  .auction-dashboard-lot-grid,
  .auction-dashboard-simple-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .auction-dashboard-head,
  .auction-dashboard-meta-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .auction-dashboard-import-form {
    grid-template-columns: 1fr;
  }

  .auction-dashboard-head-actions {
    justify-items: stretch;
  }

  .auction-lot-card {
    grid-template-columns: 1fr;
  }

  .auction-lot-card-body {
    padding: 0 18px 18px;
  }

  .auction-simple-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .auction-dashboard-meta-stats,
  .auction-dashboard-kpi-grid {
    grid-template-columns: 1fr;
  }

  .auction-lot-card-actions {
    flex-direction: column;
  }

  .auction-lot-card-actions > * {
    width: 100%;
    justify-content: center;
  }

  .auction-simple-card-actions {
    flex-direction: column;
  }

  .auction-simple-card-actions > * {
    width: 100%;
    justify-content: center;
  }
}

.topbar-nav {
  overflow: visible;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 6px;
  border: 1px solid rgba(74, 55, 28, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 24px rgba(87, 64, 33, 0.08);
}

.topbar-group {
  position: relative;
}

.topbar-group > summary {
  list-style: none;
}

.topbar-group > summary::-webkit-details-marker {
  display: none;
}

.topbar-link,
.topbar-group-toggle,
.topbar-link--solo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  transition:
    color 0.16s ease,
    background-color 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    transform 0.16s ease;
}

.topbar-link::after {
  display: none;
}

.topbar-group-toggle {
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.topbar-group-toggle::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: -2px;
  border-right: 1.8px solid currentColor;
  border-bottom: 1.8px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.topbar-group[open] .topbar-group-toggle::after {
  transform: rotate(225deg);
  margin-top: 2px;
}

.topbar-group .topbar-dropdown {
  display: none;
}

.topbar-group[open] .topbar-dropdown {
  display: grid;
}

.topbar-link:hover,
.topbar-group-toggle:hover,
.topbar-link--solo:hover {
  color: var(--text);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(74, 55, 28, 0.12);
}

.topbar-group.is-active .topbar-group-toggle,
.topbar-group[open] .topbar-group-toggle,
.topbar-link--solo.is-active {
  color: var(--primary-strong);
  background: #ffffff;
  border-color: rgba(15, 107, 90, 0.14);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
}

.topbar-group[open] {
  z-index: 41;
}

.topbar-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 40;
  min-width: 280px;
  gap: 6px;
  padding: 10px;
  border: 1px solid rgba(74, 55, 28, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 44px rgba(15, 23, 42, 0.14);
}

.topbar-dropdown-link {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
}

.topbar-dropdown-link:hover {
  color: var(--text);
  text-decoration: none;
  background: rgba(15, 107, 90, 0.08);
}

.topbar-dropdown-link.is-active {
  color: var(--primary-strong);
  background: rgba(15, 118, 110, 0.12);
}

@media (max-width: 900px) {
  .topbar-nav {
    width: 100%;
    display: grid;
    gap: 10px;
  }

  .topbar-group,
  .topbar-link--solo {
    width: 100%;
  }

  .topbar-group-toggle,
  .topbar-link--solo {
    width: 100%;
    justify-content: space-between;
  }

  .topbar-dropdown {
    position: static;
    min-width: 0;
    margin-top: 8px;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.74);
  }

  .topbar-dropdown-link {
    justify-content: flex-start;
    white-space: normal;
  }
}

@media (max-width: 900px) {
  .page-wrap {
    width: min(100vw - 28px, 100%);
    padding: 18px 0 28px;
  }

  .topbar {
    gap: 12px;
    padding: 12px 14px;
  }

  .topbar-main {
    width: 100%;
    gap: 12px;
  }

  .brand {
    width: 100%;
    justify-content: flex-start;
  }

  .brand-logo {
    height: 32px;
    max-width: min(170px, 56vw);
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
  }

  .user-chip {
    flex: 1 1 180px;
    justify-content: center;
    text-align: center;
  }

  .hero-card,
  .hero-card-compact,
  .lot-header,
  .grid-2,
  .edit-layout,
  .quicklot-body-grid,
  .auction-dashboard-head,
  .auction-dashboard-meta-grid,
  .manager-rop-plan-grid,
  .rop-head,
  .rop-toolbar,
  .rop-summary-grid,
  .rop-chart-grid,
  .rop-managers-grid,
  .rop-plan-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-card,
  .panel,
  .sub-panel,
  .publish-card,
  .login-card {
    padding: 18px;
    border-radius: 20px;
  }

  .panel-head-row,
  .section-toolbar,
  .lot-header,
  .rop-head,
  .rop-section-head,
  .rop-drawer-head,
  .rop-settings-actions,
  .auction-dashboard-head,
  .auction-dashboard-head-actions {
    display: grid;
    gap: 12px;
  }

  .country-toolbar,
  .dashboard-metrics,
  .workspace-kpis,
  .status-grid,
  .dashboard-import-grid,
  .auction-dashboard-kpi-grid,
  .auction-dashboard-lot-grid,
  .auction-dashboard-simple-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .workspace-kpi,
  .status-card,
  .dashboard-metric,
  .dashboard-metric-alert {
    min-width: 0;
  }

  .catalog-grid,
  .review-grid,
  .catalog-filter-grid,
  .form-grid,
  .manager-filter-grid,
  .manager-record-form-grid,
  .upload-grid,
  .photo-grid,
  .editable-photo-grid,
  .drom-model-grid,
  .drom-spec-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-card,
  .review-card,
  .auction-lot-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-card-media,
  .review-card-media,
  .auction-lot-card-media {
    min-height: 220px;
  }

  .catalog-grid.is-list .catalog-card,
  .review-grid.is-list .review-card {
    grid-template-columns: minmax(0, 1fr);
  }

  .catalog-grid.is-list .catalog-card-media,
  .review-grid.is-list .review-card-media {
    min-height: 220px;
  }

  .catalog-card-body,
  .review-card-body,
  .auction-lot-card-body {
    padding: 16px;
  }

  .catalog-metrics,
  .preview-list,
  .manager-rop-plan-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .preview-list div,
  .catalog-metrics > div,
  .manager-rop-plan-stat {
    min-width: 0;
  }

  .table-wrap,
  .table-shell {
    margin: 0 -4px;
    padding-bottom: 2px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .lots-table {
    min-width: 760px;
  }

  .manager-records-table {
    min-width: 900px;
  }

  .rop-toolbar-group,
  .rop-toolbar-periods,
  .rop-head-actions,
  .rop-refresh-meta,
  .rop-action-row,
  .panel-head-actions {
    width: 100%;
  }

  .rop-action-row,
  .panel-head-actions,
  .auction-dashboard-head-actions,
  .auction-simple-card-actions,
  .auction-lot-card-actions,
  .review-actions,
  .table-actions,
  .inline-actions,
  .form-actions,
  .catalog-actions,
  .rop-settings-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .rop-action-row > *,
  .panel-head-actions > *,
  .auction-dashboard-head-actions > *,
  .auction-simple-card-actions > *,
  .auction-lot-card-actions > *,
  .review-actions > *,
  .table-actions > *,
  .inline-actions > *,
  .form-actions > *,
  .catalog-actions > *,
  .rop-settings-actions > * {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .review-comment-field textarea,
  textarea,
  input,
  select {
    font-size: 16px;
  }

  .photo-select-card img,
  .photo-card img {
    max-height: 260px;
  }

  .rop-drawer-panel,
  .rop-settings-panel {
    width: min(100vw - 20px, 100%);
    max-width: none;
    margin: 10px;
  }
}

@media (max-width: 640px) {
  .page-wrap {
    width: min(100vw - 18px, 100%);
    padding-top: 14px;
  }

  .topbar {
    padding: 10px 9px 12px;
  }

  .topbar-nav {
    padding: 5px;
    border-radius: 16px;
  }

  .topbar-link,
  .topbar-group-toggle,
  .topbar-link--solo {
    min-height: 44px;
    padding: 0 14px;
    font-size: 14px;
  }

  .topbar-dropdown {
    padding: 8px;
    border-radius: 16px;
  }

  .topbar-dropdown-link {
    min-height: 40px;
    padding: 10px 12px;
    line-height: 1.35;
  }

  .hero-card,
  .panel,
  .sub-panel,
  .publish-card,
  .login-card {
    padding: 15px;
    border-radius: 18px;
  }

  .hero-card h1,
  .lot-header h1,
  .rop-head h1 {
    font-size: clamp(24px, 7vw, 30px);
    line-height: 1.08;
  }

  .panel-head h2,
  .section-head h2,
  .rop-section-head h2 {
    font-size: 20px;
    line-height: 1.15;
  }

  .workspace-kpis,
  .status-grid,
  .dashboard-metrics,
  .auction-dashboard-meta-stats,
  .auction-dashboard-kpi-grid {
    gap: 10px;
  }

  .country-tabs {
    gap: 8px;
  }

  .country-tab {
    min-height: 44px;
  }

  .catalog-card-media,
  .review-card-media,
  .auction-lot-card-media {
    min-height: 190px;
  }

  .catalog-card-head,
  .review-card-head,
  .source-pills,
  .dashboard-table-meta {
    gap: 8px;
  }

  .catalog-metrics > div,
  .preview-list div,
  .rop-manager-card,
  .rop-chart-card,
  .workspace-kpi,
  .status-card,
  .dashboard-metric {
    padding: 14px;
  }

  .notification-panel {
    top: calc(100% + 8px);
    width: min(100vw - 18px, 100%);
    max-height: min(72vh, 560px);
  }

  .notification-list {
    padding: 12px;
  }

  .lots-table {
    min-width: 680px;
  }

  .manager-records-table {
    min-width: 820px;
  }
}

body.lightbox-open {
  overflow: hidden;
}

.admin-image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 140;
}

.admin-image-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 18, 28, 0.82);
  backdrop-filter: blur(4px);
}

.admin-image-lightbox__panel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 72px;
}

.admin-image-lightbox__image {
  display: block;
  width: auto;
  max-width: min(96vw, 1280px);
  max-height: 88vh;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.admin-image-lightbox__close,
.admin-image-lightbox__nav {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 30px;
  cursor: pointer;
  transition: background-color 0.18s ease, transform 0.18s ease;
}

.admin-image-lightbox__close:hover,
.admin-image-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.admin-image-lightbox__close {
  top: 20px;
  right: 20px;
}

.admin-image-lightbox__nav--prev {
  left: 20px;
}

.admin-image-lightbox__nav--next {
  right: 20px;
}

.admin-image-lightbox__status {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

@media (max-width: 768px) {
  .admin-image-lightbox__panel {
    padding: 16px;
  }

  .admin-image-lightbox__image {
    max-width: 100%;
    max-height: 82vh;
    border-radius: 16px;
  }

  .admin-image-lightbox__close,
  .admin-image-lightbox__nav {
    width: 46px;
    height: 46px;
    font-size: 26px;
  }

  .admin-image-lightbox__close {
    top: 12px;
    right: 12px;
  }

  .admin-image-lightbox__nav--prev {
    left: 10px;
  }

  .admin-image-lightbox__nav--next {
    right: 10px;
  }

  .admin-image-lightbox__status {
    bottom: 14px;
  }
}

/* ROP 50k preview */
.rop-import-modal {
  position: fixed;
  inset: 0;
  z-index: 96;
}

.rop-import-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(45, 36, 22, 0.42);
}

.rop-import-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(1100px, calc(100vw - 36px));
  max-height: min(88vh, 920px);
  overflow: auto;
  padding: 22px 24px 26px;
  background: rgba(255, 252, 247, 0.98);
  box-shadow: 0 24px 70px rgba(45, 36, 22, 0.18);
}

.rop-import-body,
.rop-import-summary,
.rop-import-upload-card {
  display: grid;
  gap: 16px;
}

.rop-import-intro {
  display: grid;
  gap: 8px;
}

.rop-import-intro p {
  margin: 0;
}

.rop-import-upload-card,
.rop-import-preview-table-wrap {
  border: 1px solid rgba(72, 56, 33, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  padding: 18px;
}

.rop-import-upload-row,
.rop-import-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.rop-import-file-meta,
.rop-import-upload-actions,
.rop-import-notices {
  display: grid;
  gap: 8px;
}

.rop-import-file-name {
  font-weight: 700;
  color: var(--text);
}

.rop-import-inline-notice,
.rop-import-notices {
  border-radius: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(72, 56, 33, 0.08);
  background: rgba(246, 240, 230, 0.66);
  color: #6f5d43;
}

.rop-import-inline-notice.is-success {
  background: rgba(236, 253, 245, 0.92);
  border-color: rgba(5, 150, 105, 0.18);
  color: #047857;
}

.rop-import-inline-notice.is-warning,
.rop-import-notice-item {
  background: rgba(255, 247, 237, 0.92);
  border-color: rgba(217, 119, 6, 0.16);
  color: #b45309;
}

.rop-import-inline-notice.is-error {
  background: rgba(254, 242, 242, 0.95);
  border-color: rgba(185, 56, 21, 0.16);
  color: #b93815;
}

.rop-import-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.rop-import-summary-card {
  border: 1px solid rgba(72, 56, 33, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  padding: 14px;
  display: grid;
  gap: 8px;
}

.rop-import-summary-card span {
  font-size: 0.8rem;
  color: var(--muted);
}

.rop-import-summary-card strong {
  font-size: 1.5rem;
  line-height: 1;
}

.rop-import-summary-card.is-green strong {
  color: #047857;
}

.rop-import-summary-card.is-yellow strong {
  color: #b45309;
}

.rop-import-summary-card.is-red strong {
  color: #b93815;
}

.rop-import-summary-card.is-accent strong {
  color: var(--primary-strong);
}

.rop-import-preview-table-scroll {
  overflow: auto;
}

.rop-import-preview-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

.rop-import-preview-table th,
.rop-import-preview-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(72, 56, 33, 0.08);
  text-align: left;
  vertical-align: top;
}

.rop-import-preview-table th {
  font-size: 0.8rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rop-import-preview-table tbody tr:hover {
  background: rgba(248, 244, 236, 0.64);
}

.rop-import-preview-messages {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.rop-import-preview-messages span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  background: rgba(248, 244, 236, 0.96);
  color: #6f5d43;
  font-size: 0.78rem;
}

.rop-import-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
  font-size: 0.78rem;
  background: rgba(248, 244, 236, 0.92);
  color: #6f5d43;
}

.rop-import-status.is-ok {
  background: rgba(236, 253, 245, 0.92);
  color: #047857;
}

.rop-import-status.is-warning,
.rop-import-status.is-duplicate {
  background: rgba(255, 247, 237, 0.92);
  color: #b45309;
}

.rop-import-status.is-error {
  background: rgba(254, 242, 242, 0.95);
  color: #b93815;
}

@media (max-width: 900px) {
  .rop-import-panel {
    width: min(100vw - 20px, 100%);
    max-height: min(92vh, 100%);
    padding: 18px;
  }

  .rop-import-upload-row,
  .rop-import-actions {
    align-items: stretch;
  }

  .rop-import-upload-actions .ghost-button,
  .rop-import-upload-actions .primary-button,
  .rop-import-actions .secondary-link-button {
    width: 100%;
  }
}

.ui-hidden-node {
  display: none !important;
}

.admin-page--ui-editor .page-wrap {
  max-width: 1680px;
}

.ui-editor-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.ui-editor-sidebar {
  position: sticky;
  top: 96px;
}

.ui-editor-anchor-nav {
  display: grid;
  gap: 10px;
}

.ui-editor-anchor-nav a {
  display: block;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.75);
  color: #153047;
  text-decoration: none;
  font-weight: 700;
}

.ui-editor-content {
  display: grid;
  gap: 24px;
}

.ui-editor-group,
.ui-editor-subsection {
  display: grid;
  gap: 16px;
}

.ui-editor-group-head {
  display: grid;
  gap: 4px;
}

.ui-editor-group-head h3 {
  margin: 0;
  font-size: 1rem;
}

.ui-editor-items {
  display: grid;
  gap: 16px;
}

.ui-editor-items--nested {
  padding-top: 8px;
}

.ui-editor-item-card {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  padding: 18px;
  display: grid;
  gap: 16px;
}

.ui-editor-item-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.ui-editor-item-head strong,
.ui-editor-item-head span {
  display: block;
}

.ui-editor-item-moves {
  display: inline-flex;
  gap: 8px;
}

.ui-editor-item-moves .ghost-button {
  min-width: 40px;
  padding-inline: 0;
}

.ui-editor-item-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.ui-editor-item-grid label {
  display: grid;
  gap: 8px;
}

.ui-editor-item-grid span {
  font-size: 0.86rem;
  font-weight: 700;
  color: #42576a;
}

.ui-editor-item-grid input[type="text"],
.ui-editor-item-grid input[type="number"],
.ui-editor-item-grid textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  padding: 11px 12px;
  font: inherit;
  background: rgba(255, 255, 255, 0.95);
}

.ui-editor-item-grid textarea {
  min-height: 88px;
  resize: vertical;
}

.ui-editor-check {
  align-content: end;
}

.ui-editor-check input {
  margin-right: 8px;
}

.ui-editor-span-2 {
  grid-column: 1 / -1;
}

.ui-editor-actions {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.ui-editor-status {
  min-height: 22px;
  font-weight: 700;
  color: #5f6f80;
}

.ui-editor-status.is-success {
  color: #0f7a65;
}

.ui-editor-status.is-error {
  color: #b93815;
}

.ui-editor-status.is-loading {
  color: #8a650f;
}

@media (max-width: 1120px) {
  .ui-editor-layout {
    grid-template-columns: 1fr;
  }

  .ui-editor-sidebar {
    position: static;
  }
}

@media (max-width: 760px) {
  .ui-editor-item-grid {
    grid-template-columns: 1fr;
  }

  .ui-editor-span-2 {
    grid-column: auto;
  }
}

.ui-inline-editor-launch {
  position: fixed;
  left: 22px;
  bottom: 24px;
  z-index: 70;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: rgba(10, 37, 64, 0.94);
  color: #fff;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.28);
  padding: 14px 18px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.ui-inline-editor-overlay {
  position: fixed;
  inset: 0;
  z-index: 71;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(3px);
}

.ui-inline-editor-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 72;
  width: min(460px, 100vw);
  height: 100vh;
  padding: 24px 20px 28px;
  background: #f7fbfe;
  border-left: 1px solid rgba(15, 23, 42, 0.1);
  box-shadow: -24px 0 48px rgba(15, 23, 42, 0.16);
  overflow-y: auto;
  display: grid;
  gap: 16px;
  align-content: start;
}

.ui-inline-editor-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.ui-inline-editor-head h2 {
  margin: 4px 0 0;
  font-size: 1.45rem;
}

.ui-inline-editor-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ui-inline-editor-status {
  min-height: 22px;
  font-weight: 700;
  color: #637282;
}

.ui-inline-editor-status.is-success {
  color: #0f7a65;
}

.ui-inline-editor-status.is-error {
  color: #b93815;
}

.ui-inline-editor-status.is-loading {
  color: #8a650f;
}

.ui-inline-editor-content {
  display: grid;
  gap: 20px;
}

.ui-inline-editor-section {
  display: grid;
  gap: 14px;
}

.ui-inline-editor-section-head {
  display: grid;
  gap: 4px;
}

.ui-inline-editor-section-head h3,
.ui-inline-editor-section-head p,
.ui-inline-editor-subtitle {
  margin: 0;
}

.ui-inline-editor-section-head h3,
.ui-inline-editor-subtitle {
  color: #153047;
}

.ui-inline-editor-section-head p {
  color: #637282;
  font-size: 0.95rem;
}

.ui-inline-editor-list,
.ui-inline-editor-sublist {
  display: grid;
  gap: 14px;
}

.ui-inline-editor-sublist {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px dashed rgba(15, 23, 42, 0.1);
}

.ui-inline-editor-item {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  padding: 16px;
  display: grid;
  gap: 14px;
}

.ui-inline-editor-item--card {
  background: rgba(246, 250, 253, 0.96);
}

.ui-inline-editor-item-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.ui-inline-editor-item-head strong,
.ui-inline-editor-item-head span {
  display: block;
}

.ui-inline-editor-item-head span {
  color: #637282;
  font-size: 0.9rem;
}

.ui-inline-editor-moves {
  display: inline-flex;
  gap: 8px;
}

.ui-inline-editor-moves .ghost-button {
  min-width: 38px;
  padding-inline: 0;
}

.ui-inline-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 14px;
}

.ui-inline-editor-field {
  display: grid;
  gap: 7px;
}

.ui-inline-editor-field--wide {
  grid-column: 1 / -1;
}

.ui-inline-editor-field span {
  font-size: 0.85rem;
  font-weight: 700;
  color: #42576a;
}

.ui-inline-editor-field input[type="text"],
.ui-inline-editor-field input[type="number"],
.ui-inline-editor-field textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: rgba(255, 255, 255, 0.98);
  padding: 11px 12px;
  font: inherit;
}

.ui-inline-editor-field textarea {
  min-height: 84px;
  resize: vertical;
}

.ui-inline-editor-field--check {
  align-content: end;
}

.ui-inline-editor-field--check input {
  margin-right: 8px;
}

.ui-inline-editor-open [data-ui-page] [data-ui-block] {
  position: relative;
  outline: 2px dashed rgba(15, 118, 110, 0.28);
  outline-offset: 6px;
}

.ui-inline-editor-open [data-ui-page] [data-ui-card] {
  outline: 1px dashed rgba(15, 118, 110, 0.18);
  outline-offset: 4px;
}

@media (max-width: 960px) {
  .ui-inline-editor-launch {
    left: 16px;
    bottom: 18px;
    max-width: calc(100vw - 32px);
  }

  .ui-inline-editor-grid {
    grid-template-columns: 1fr;
  }

  .ui-inline-editor-field--wide {
    grid-column: auto;
  }
}
