.admin-app {
  background:
    radial-gradient(900px 420px at -10% -10%, rgba(18, 54, 44, 0.18), transparent 70%),
    radial-gradient(700px 360px at 110% 0%, rgba(196, 107, 60, 0.18), transparent 70%),
    linear-gradient(180deg, #f6f8f7 0%, #eef3f1 45%, #ecf0ef 100%);
  color: #12231c;
}

.admin-app .container {
  width: min(1380px, 94vw);
}

.admin-main {
  padding-top: 22px;
  padding-bottom: 34px;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(12, 22, 19, 0.12);
  background: rgba(247, 250, 248, 0.86);
  backdrop-filter: blur(14px);
}

.admin-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #12231c;
}

.admin-brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(241, 234, 223, 0.94));
  box-shadow: 0 10px 20px rgba(18, 35, 28, 0.12);
  border: 1px solid rgba(18, 35, 28, 0.08);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.admin-brand-mark img {
  width: 78%;
  height: 78%;
  object-fit: contain;
}

.admin-brand-copy {
  display: grid;
  gap: 2px;
}

.admin-brand-copy strong {
  line-height: 1;
}

.admin-brand-copy small {
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(18, 35, 28, 0.58);
}

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

.admin-nav-link {
  border: 1px solid rgba(18, 35, 28, 0.12);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #1f332c;
}

.admin-nav-link:hover,
.admin-nav-link.active {
  border-color: rgba(44, 138, 107, 0.45);
  background: rgba(217, 242, 231, 0.95);
  color: #0f2e24;
}

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

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

.admin-utility-note {
  font-size: 0.76rem;
  color: rgba(18, 35, 28, 0.68);
  max-width: 240px;
}

.admin-lang-switch {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-lang-switch .btn {
  padding: 8px 12px;
  font-size: 0.8rem;
}

.admin-lang-switch .btn.active {
  border-color: rgba(44, 138, 107, 0.55);
  background: #d9f2e7;
  color: #113a2e;
}

.admin-headline {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.admin-headline-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-inline-form {
  margin: 0;
}

.admin-notice {
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 12px;
  border: 1px solid transparent;
  font-weight: 600;
}

.admin-notice.success {
  background: rgba(44, 138, 107, 0.12);
  border-color: rgba(44, 138, 107, 0.34);
  color: #134634;
}

.admin-notice.error {
  background: rgba(186, 60, 56, 0.12);
  border-color: rgba(186, 60, 56, 0.32);
  color: #662522;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.metric-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.84));
  border: 1px solid rgba(18, 35, 28, 0.12);
  border-radius: 18px;
  padding: 14px;
  display: grid;
  gap: 4px;
  box-shadow: 0 8px 18px rgba(15, 30, 24, 0.08);
}

.metric-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(18, 35, 28, 0.62);
}

.metric-value {
  font-size: 1.8rem;
  line-height: 1;
  color: #12382d;
}

.metric-sub {
  font-size: 0.85rem;
  color: rgba(18, 35, 28, 0.7);
}

.admin-block {
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(18, 35, 28, 0.1);
  border-radius: 22px;
  padding: 16px;
  margin-bottom: 18px;
  box-shadow: 0 12px 26px rgba(14, 28, 23, 0.08);
}

.admin-block-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.admin-block-head h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.admin-block-sub {
  font-size: 0.86rem;
  color: rgba(18, 35, 28, 0.66);
}

.admin-setup-block {
  background:
    radial-gradient(520px 220px at top right, rgba(44, 138, 107, 0.14), transparent 65%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.74));
}

.admin-setup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.setup-card {
  border: 1px solid rgba(18, 35, 28, 0.12);
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 24px rgba(14, 28, 23, 0.08);
  display: grid;
  gap: 12px;
}

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

.setup-card h3 {
  font-family: var(--font-display);
  font-size: 1.08rem;
  line-height: 1.2;
}

.setup-card p {
  color: rgba(18, 35, 28, 0.74);
  font-size: 0.92rem;
  line-height: 1.5;
}

.setup-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.setup-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  border: 1px solid rgba(18, 35, 28, 0.14);
  background: rgba(18, 35, 28, 0.06);
  color: rgba(18, 35, 28, 0.72);
  white-space: nowrap;
}

.setup-status-chip.is-active {
  background: rgba(44, 138, 107, 0.14);
  border-color: rgba(44, 138, 107, 0.32);
  color: #124533;
}

.setup-status-chip.is-ready {
  background: rgba(31, 122, 186, 0.12);
  border-color: rgba(31, 122, 186, 0.28);
  color: #134761;
}

.setup-note {
  font-size: 0.82rem;
  color: rgba(18, 35, 28, 0.66);
}

.admin-empty {
  border: 1px dashed rgba(18, 35, 28, 0.24);
  border-radius: 14px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.72);
  color: rgba(18, 35, 28, 0.7);
}

.admin-empty.compact {
  padding: 12px;
  font-size: 0.9rem;
}

.order-board {
  display: grid;
  gap: 14px;
}

.message-board {
  display: grid;
  gap: 14px;
}

.order-card-app {
  border: 1px solid rgba(18, 35, 28, 0.12);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(14, 28, 23, 0.07);
  display: grid;
  gap: 12px;
}

.order-card-app.has-alert {
  border-color: rgba(196, 107, 60, 0.52);
  box-shadow: 0 12px 24px rgba(196, 107, 60, 0.18);
}

.order-card-app.is-expanded,
.message-card-app.is-expanded {
  border-color: rgba(44, 138, 107, 0.44);
  box-shadow: 0 12px 26px rgba(44, 138, 107, 0.16);
}

.message-card-app {
  border: 1px solid rgba(18, 35, 28, 0.12);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 18px rgba(14, 28, 23, 0.07);
  display: grid;
  gap: 12px;
}

.message-card-app.has-alert {
  border-color: rgba(196, 107, 60, 0.52);
  box-shadow: 0 12px 24px rgba(196, 107, 60, 0.18);
}

.order-card-shell,
.message-card-detail,
.order-card-detail {
  display: grid;
  gap: 12px;
}

.order-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.message-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.order-number {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(18, 35, 28, 0.6);
  font-weight: 700;
}

.order-card-top h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1.2;
}

.order-top-meta {
  font-size: 0.86rem;
  color: rgba(18, 35, 28, 0.65);
}

.order-card-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-pill,
.notif-pill {
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}

.status-pill {
  color: #173f32;
  background: rgba(44, 138, 107, 0.14);
  border-color: rgba(44, 138, 107, 0.38);
}

.notif-pill {
  background: rgba(196, 107, 60, 0.16);
  border-color: rgba(196, 107, 60, 0.45);
  color: #6d3620;
}

.notif-pill-attention {
  background: rgba(186, 78, 45, 0.14);
  border-color: rgba(186, 78, 45, 0.36);
  color: #7b3016;
}

.notif-pill.is-muted {
  background: rgba(18, 35, 28, 0.07);
  border-color: rgba(18, 35, 28, 0.18);
  color: rgba(18, 35, 28, 0.7);
}

.status-received { background: rgba(31, 122, 186, 0.14); border-color: rgba(31, 122, 186, 0.38); color: #0f4566; }
.status-confirmed { background: rgba(44, 138, 107, 0.14); border-color: rgba(44, 138, 107, 0.38); color: #124533; }
.status-preparing,
.status-production,
.status-production_done,
.status-packed,
.status-transport_ready,
.status-picked,
.status-customs { background: rgba(196, 107, 60, 0.14); border-color: rgba(196, 107, 60, 0.38); color: #65321e; }
.status-delivered { background: rgba(29, 112, 84, 0.18); border-color: rgba(29, 112, 84, 0.46); color: #0f382a; }

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

.order-overview-grid,
.message-overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.order-alert-tags {
  min-height: 32px;
}

.meta-cell {
  border-radius: 12px;
  padding: 10px;
  border: 1px solid rgba(18, 35, 28, 0.12);
  background: rgba(255, 255, 255, 0.76);
  display: grid;
  gap: 4px;
}

.meta-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(18, 35, 28, 0.62);
  font-weight: 700;
}

.meta-cell small {
  color: rgba(18, 35, 28, 0.62);
  font-size: 0.8rem;
}

.meta-cell strong {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.product-sort-row {
  display: grid;
  gap: 8px;
}

.product-sort-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-notice.is-hidden {
  display: none;
}

.product-sort-button {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(18, 35, 28, 0.16);
  background: rgba(255, 255, 255, 0.9);
  color: #16362a;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.product-sort-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(44, 138, 107, 0.42);
  background: rgba(217, 242, 231, 0.92);
}

.product-sort-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.product-sort-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(18, 35, 28, 0.12);
  background: rgba(18, 35, 28, 0.05);
  color: rgba(18, 35, 28, 0.76);
}

.product-sort-prefix {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(18, 35, 28, 0.58);
}

.product-sort-input {
  width: 68px;
  border: 0;
  background: transparent;
  color: #16362a;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 8px 0;
  outline: none;
}

.product-sort-input::-webkit-outer-spin-button,
.product-sort-input::-webkit-inner-spin-button {
  margin: 0;
}

.card.is-sorting {
  opacity: 0.72;
  pointer-events: none;
}

.card.is-sorted {
  box-shadow: 0 20px 40px rgba(19, 65, 51, 0.18);
  transform: translateY(-3px);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.product-card-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  gap: 12px;
  align-items: stretch;
  margin-top: auto;
}

.product-delete-form {
  margin: 0;
}

.btn-danger-icon {
  justify-content: center;
  padding: 0;
  width: 56px;
  min-width: 56px;
  min-height: 56px;
  border: 1px solid rgba(176, 42, 38, 0.34);
  background: linear-gradient(180deg, rgba(255, 236, 235, 0.96), rgba(255, 225, 223, 0.94));
  color: #b02a26;
  box-shadow: 0 10px 22px rgba(176, 42, 38, 0.14);
}

.btn-danger-icon:hover {
  transform: translateY(-2px);
  border-color: rgba(176, 42, 38, 0.46);
  background: linear-gradient(180deg, rgba(255, 228, 226, 0.98), rgba(255, 211, 209, 0.96));
  box-shadow: 0 14px 26px rgba(176, 42, 38, 0.2);
}

.btn-danger-icon svg {
  width: 20px;
  height: 20px;
}

.btn-danger-inline {
  background: linear-gradient(180deg, rgba(196, 44, 40, 0.96), rgba(165, 33, 29, 0.98));
  color: #fff;
  box-shadow: 0 14px 28px rgba(165, 33, 29, 0.22);
}

.btn-danger-inline:hover {
  transform: translateY(-2px);
  filter: brightness(1.04);
}

.btn-danger-inline svg {
  width: 18px;
  height: 18px;
}

.message-signal {
  position: relative;
  overflow: hidden;
  min-height: 110px;
  align-content: start;
}

.message-signal.is-hot {
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.55), transparent 28%),
    linear-gradient(135deg, rgba(44, 138, 107, 0.22), rgba(31, 122, 186, 0.16));
  border-color: rgba(44, 138, 107, 0.34);
  box-shadow:
    inset 0 0 0 1px rgba(44, 138, 107, 0.1),
    0 18px 40px rgba(31, 122, 186, 0.12);
}

.message-signal.is-hot::after {
  content: "";
  position: absolute;
  top: 18px;
  right: 18px;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #1fa269;
  box-shadow: 0 0 0 0 rgba(31, 162, 105, 0.28);
  animation: adminMessagePulse 1.6s ease-out infinite;
}

.message-signal strong {
  font-size: 1rem;
  line-height: 1.28;
  max-width: calc(100% - 34px);
}

.message-signal.is-hot strong {
  font-size: 1.08rem;
  color: #0c5d3e;
}

@keyframes adminMessagePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(31, 162, 105, 0.28);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(31, 162, 105, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(31, 162, 105, 0);
  }
}

.order-inline-preview {
  border-radius: 12px;
  border: 1px solid rgba(18, 35, 28, 0.12);
  background: rgba(251, 252, 251, 0.9);
  padding: 10px;
  display: grid;
  gap: 6px;
}

.preview-role {
  display: inline-flex;
  width: fit-content;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.preview-role.buyer {
  background: rgba(31, 122, 186, 0.14);
  color: #114764;
}

.preview-role.winak {
  background: rgba(44, 138, 107, 0.14);
  color: #124533;
}

.preview-empty {
  color: rgba(18, 35, 28, 0.66);
}

.order-status-form {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}

.order-status-form label {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(18, 35, 28, 0.74);
}

.checkbox-inline {
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.order-actions-row {
  display: flex;
  justify-content: flex-end;
}

.order-card-detail[hidden],
.message-card-detail[hidden] {
  display: none !important;
}

.order-detail-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 12px;
}

.detail-panel {
  border: 1px solid rgba(18, 35, 28, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.detail-panel h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.detail-panel h5 {
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(18, 35, 28, 0.66);
}

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

.detail-panel-wide {
  min-width: 0;
}

.channel-stack {
  display: grid;
  gap: 14px;
}

.channel-card {
  border: 1px solid rgba(18, 35, 28, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  padding: 14px;
  display: grid;
  gap: 12px;
}

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

.channel-head h4 {
  font-family: var(--font-display);
  font-size: 1.02rem;
}

.channel-sub {
  margin: 3px 0 0;
  font-size: 0.84rem;
  color: rgba(18, 35, 28, 0.66);
}

.thread-list {
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
  display: grid;
  gap: 8px;
}

.message-bubble {
  border-radius: 12px;
  border: 1px solid rgba(18, 35, 28, 0.14);
  padding: 10px;
  display: grid;
  gap: 6px;
  background: rgba(255, 255, 255, 0.85);
}

.message-bubble.buyer {
  border-left: 4px solid #1f7aba;
}

.message-bubble.winak {
  border-left: 4px solid #2c8a6b;
}

.message-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: rgba(18, 35, 28, 0.7);
}

.message-bubble p {
  white-space: pre-wrap;
  margin: 0;
}

.message-subject {
  font-size: 0.85rem;
  font-weight: 700;
  color: #173f32;
}

.message-original {
  margin-top: 6px;
  border-radius: 10px;
  border: 1px dashed rgba(18, 35, 28, 0.2);
  padding: 8px;
  background: rgba(246, 249, 247, 0.8);
  color: rgba(18, 35, 28, 0.8);
  white-space: pre-wrap;
}

.reply-form {
  border-top: 1px solid rgba(18, 35, 28, 0.12);
  padding-top: 10px;
  display: grid;
  gap: 10px;
}

.btn-compact {
  padding: 8px 14px;
  font-size: 0.84rem;
  line-height: 1.1;
}

.btn-send-action {
  justify-self: start;
  min-width: 0;
  padding: 10px 16px;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(18, 54, 44, 0.12);
}

.reply-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 0.85rem;
}

.thread-feedback {
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.86rem;
  font-weight: 700;
  border: 1px solid transparent;
}

.thread-feedback.success {
  background: rgba(44, 138, 107, 0.12);
  border-color: rgba(44, 138, 107, 0.28);
  color: #134634;
}

.thread-feedback.error {
  background: rgba(186, 60, 56, 0.12);
  border-color: rgba(186, 60, 56, 0.28);
  color: #6a241f;
}

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

.composer-grid-email {
  grid-template-columns: 1.1fr 1.2fr 160px;
}

.detail-kv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.detail-kv-grid-threads {
  margin-bottom: 14px;
}

.detail-kv-grid > div {
  border: 1px solid rgba(18, 35, 28, 0.12);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.76);
  display: grid;
  gap: 4px;
}

.detail-kv-grid span {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(18, 35, 28, 0.62);
  font-weight: 700;
}

.detail-kv-grid strong {
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.25;
}

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

.item-card {
  border: 1px solid rgba(18, 35, 28, 0.12);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, 0.84);
}

.item-cost-form {
  display: grid;
  gap: 10px;
}

.item-currency-select {
  display: grid;
  gap: 6px;
  max-width: 180px;
  font-size: 0.84rem;
  font-weight: 600;
  color: rgba(18, 35, 28, 0.74);
}

.item-card-editor {
  display: grid;
  gap: 10px;
}

.item-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.item-card-head small {
  display: block;
  margin-top: 3px;
  color: rgba(18, 35, 28, 0.66);
}

.item-cost-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  min-width: 0;
}

.item-cost-columns {
  display: grid;
  grid-template-columns: minmax(250px, 0.95fr) minmax(320px, 1.15fr);
  gap: 14px;
}

.item-cost-column {
  border: 1px solid rgba(18, 35, 28, 0.1);
  border-radius: 18px;
  padding: 16px;
  background: rgba(251, 252, 251, 0.94);
  display: grid;
  gap: 14px;
  min-width: 0;
}

.item-cost-column-origin {
  background: linear-gradient(180deg, rgba(253, 249, 242, 0.96), rgba(255, 255, 255, 0.96));
}

.item-cost-column-market {
  background: linear-gradient(180deg, rgba(242, 248, 245, 0.98), rgba(255, 255, 255, 0.98));
}

.item-cost-column-head {
  display: grid;
  gap: 4px;
}

.item-cost-column h6 {
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(18, 35, 28, 0.62);
}

.item-cost-column-head p {
  color: rgba(18, 35, 28, 0.62);
  font-size: 0.82rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.item-cost-grid label {
  display: grid;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(18, 35, 28, 0.74);
  min-width: 0;
}

.item-market-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.item-market-grid label {
  display: grid;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(18, 35, 28, 0.74);
  min-width: 0;
}

.affiliate-summary-card {
  background: linear-gradient(180deg, rgba(247, 252, 250, 0.96), rgba(255, 255, 255, 0.96));
}

.affiliate-kv-grid {
  margin-top: 4px;
}

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

  .item-market-grid {
    grid-template-columns: 1fr;
  }
}

.admin-timeline .timeline-item {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(18, 35, 28, 0.12);
  border-radius: 12px;
  padding: 10px;
}

.admin-timeline .timeline-item p {
  margin: 2px 0 4px;
}

.visitor-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 12px;
}

.visitor-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
  padding-right: 2px;
}

.visitor-item {
  border-radius: 12px;
  border: 1px solid rgba(18, 35, 28, 0.12);
  background: rgba(255, 255, 255, 0.86);
  padding: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.visitor-item.active,
.visitor-item:hover {
  border-color: rgba(44, 138, 107, 0.42);
  background: rgba(217, 242, 231, 0.58);
}

.visitor-item strong {
  font-size: 0.9rem;
}

.visitor-item small {
  display: block;
  color: rgba(18, 35, 28, 0.65);
  margin-top: 2px;
}

.visitor-thread-panel {
  border: 1px solid rgba(18, 35, 28, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.message-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px auto;
  gap: 10px;
  align-items: end;
}

.message-search-form label {
  display: grid;
  gap: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  color: rgba(18, 35, 28, 0.74);
}

.search-grow {
  min-width: 0;
}

.message-center-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 14px;
  min-height: 760px;
}

.thread-index {
  border: 1px solid rgba(18, 35, 28, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  padding: 14px;
  display: grid;
  gap: 12px;
}

.thread-index-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.thread-index-head h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.thread-index-list {
  display: grid;
  gap: 10px;
  max-height: 100%;
  overflow: auto;
  padding-right: 4px;
}

.thread-card {
  border: 1px solid rgba(18, 35, 28, 0.12);
  border-radius: 16px;
  background: rgba(252, 253, 252, 0.95);
  padding: 12px;
  display: grid;
  gap: 10px;
  box-shadow: 0 6px 16px rgba(14, 28, 23, 0.06);
}

.thread-card:hover,
.thread-card.active {
  border-color: rgba(44, 138, 107, 0.46);
  background: rgba(217, 242, 231, 0.56);
  box-shadow: 0 10px 22px rgba(44, 138, 107, 0.12);
}

.thread-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.thread-card-top strong {
  display: block;
  font-size: 0.95rem;
}

.thread-card-top small {
  color: rgba(18, 35, 28, 0.66);
}

.thread-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.thread-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 0.77rem;
  font-weight: 700;
  border: 1px solid rgba(18, 35, 28, 0.12);
  background: rgba(245, 248, 246, 0.95);
  color: rgba(18, 35, 28, 0.76);
}

.thread-card-preview {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(18, 35, 28, 0.8);
}

.thread-card-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: rgba(18, 35, 28, 0.66);
}

.thread-detail-panel {
  border: 1px solid rgba(18, 35, 28, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  padding: 16px;
  display: grid;
  gap: 14px;
}

.thread-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.thread-detail-head h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.thread-order-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.thread-order-links.compact .thread-order-link {
  padding: 5px 10px;
  font-size: 0.76rem;
}

.thread-order-link {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 12px;
  border: 1px solid rgba(44, 138, 107, 0.24);
  background: rgba(217, 242, 231, 0.52);
  color: #124533;
  font-weight: 700;
  font-size: 0.83rem;
}

.product-editor {
  display: grid;
  gap: 18px;
}

.admin-field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.admin-field-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(18, 35, 28, 0.12);
  background: rgba(255, 255, 255, 0.88);
}

.admin-field-card-full {
  grid-column: 1 / -1;
}

.admin-field-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #16362b;
}

.admin-field-help {
  font-size: 0.8rem;
  color: rgba(18, 35, 28, 0.62);
  line-height: 1.4;
}

.admin-field-help strong {
  color: #15392d;
}

.admin-field-micro-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(18, 35, 28, 0.58);
}

.input.input-compact {
  min-height: 42px;
  padding: 0 12px;
  font-size: 0.92rem;
}

.admin-field-card-toggle .toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  font-weight: 700;
}

.product-image-row {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.upload-dropzone {
  border-style: dashed;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.admin-pricing-slot {
  align-content: start;
}

.admin-pricing-slot-meta {
  display: grid;
  gap: 6px;
}

.admin-pricing-slot-select {
  display: grid;
  gap: 6px;
  max-width: 180px;
}

.upload-dropzone.is-dragover {
  border-color: rgba(44, 138, 107, 0.48);
  background: rgba(217, 242, 231, 0.42);
  transform: translateY(-2px);
}

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

.product-image-preview {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(18, 35, 28, 0.12);
  background: rgba(255, 255, 255, 0.86);
  min-height: 220px;
}

.product-image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.translation-source-bar {
  margin-bottom: 14px;
}

.translation-source-bar .admin-field-card {
  max-width: 420px;
}

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

.translation-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.translation-preview-card {
  border-radius: 18px;
  border: 1px solid rgba(18, 35, 28, 0.12);
  background: rgba(255, 255, 255, 0.88);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.translation-preview-card h3 {
  font-family: var(--font-display);
  font-size: 1rem;
}

.translation-preview-card strong {
  font-size: 1rem;
  line-height: 1.25;
}

.translation-preview-content {
  color: rgba(18, 35, 28, 0.82);
  line-height: 1.5;
  white-space: normal;
}

.translation-preview-list {
  display: grid;
  gap: 6px;
}

.translation-preview-list span {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(18, 35, 28, 0.62);
  font-weight: 700;
}

.translation-preview-list ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
}

.order-inline-alert {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.order-party-grid,
.order-payment-grid,
.order-documents-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.order-party-grid,
.order-party-stack {
  grid-template-columns: 1fr;
}

.order-party-stack {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

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

.order-documents-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.detail-kv-grid.compact {
  gap: 10px;
}

.detail-kv-grid.compact strong {
  font-size: 0.96rem;
  line-height: 1.35;
}

.order-document-card {
  align-content: start;
}

.order-party-accordion {
  border: 1px solid rgba(18, 35, 28, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  overflow: hidden;
}

.order-party-summary {
  list-style: none;
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  cursor: pointer;
  background: linear-gradient(135deg, rgba(235, 246, 240, 0.95), rgba(255, 249, 241, 0.95));
}

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

.order-party-title {
  font-family: var(--font-display);
  font-size: 1.02rem;
}

.order-party-preview {
  color: rgba(18, 35, 28, 0.7);
  font-size: 0.86rem;
}

.order-party-accordion .detail-kv-grid {
  padding: 14px;
}

.document-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.document-upload-form {
  display: grid;
  gap: 10px;
}

.mini-inline-form {
  margin-top: 10px;
}

.document-generate-form {
  margin-top: 0;
}

.billing-profile-grid {
  display: grid;
  gap: 18px;
}

.billing-profile-card {
  display: grid;
  gap: 16px;
}

.billing-profile-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

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

.billing-form-grid label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  font-size: 0.85rem;
}

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

.billing-profile-actions {
  display: flex;
  justify-content: flex-end;
}

.product-editor-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-app .card,
.admin-app .table,
.admin-app .input {
  border-color: rgba(18, 35, 28, 0.14);
}

.admin-app .table {
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(255, 255, 255, 0.84);
  border-radius: 14px;
  overflow: hidden;
}

.admin-app .table thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(18, 35, 28, 0.72);
  background: rgba(18, 35, 28, 0.05);
  border-bottom: 1px solid rgba(18, 35, 28, 0.12);
  padding: 12px 10px;
}

.admin-app .table tbody td {
  padding: 12px 10px;
}

@media (max-width: 1100px) {
  .order-detail-grid {
    grid-template-columns: 1fr;
  }

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

  .message-center-layout {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .composer-grid-email {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .translation-editor-grid,
  .product-image-row,
  .order-party-grid,
  .order-payment-grid {
    grid-template-columns: 1fr;
  }

  .billing-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 920px) {
  .admin-topbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-top-actions {
    width: 100%;
    justify-content: space-between;
  }

  .admin-nav {
    width: 100%;
  }

  .message-search-form {
    grid-template-columns: 1fr;
  }

  .thread-detail-head,
  .channel-head,
  .order-card-top,
  .message-card-top {
    flex-direction: column;
  }
}

@media (max-width: 700px) {
  .admin-headline {
    flex-direction: column;
    align-items: flex-start;
  }

  .order-status-form {
    grid-template-columns: 1fr;
  }

  .metric-value {
    font-size: 1.5rem;
  }
}
