.auto-date-note {
  display: grid;
  gap: 3px;
  background: #eef3e8;
  border-left: 4px solid var(--lime);
  padding: 13px 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.auto-date-note span {
  color: var(--muted);
  font-size: 13px;
}

.button.danger-outline {
  color: var(--danger);
  background: #fff;
  border-color: #d8a49e;
}

.button.danger-button {
  color: #fff;
  background: var(--danger);
}

.delete-card {
  max-width: 680px;
  margin: 5vh auto;
  padding: 34px;
}

.delete-card h1 {
  margin: 6px 0 14px;
  font-size: 40px;
}

.danger-text {
  color: var(--danger) !important;
}

.delete-warning {
  display: grid;
  gap: 5px;
  margin: 25px 0;
  padding: 16px;
  color: #71342c;
  background: #f9e7e4;
  border-radius: 10px;
}

.delete-warning span {
  line-height: 1.5;
}

.button.hw-button,
.hw-status,
.hw-tag {
  color: #fff;
  background: #315d8a;
  border-color: #315d8a;
}

.button.compact {
  min-width: 48px;
  padding: 7px 10px;
}

.article-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  white-space: nowrap;
}

.customer-order-row td {
  background: #fff0cf;
}

.customer-order-row .customer-quantity {
  color: var(--danger);
  font-weight: 900;
}

.button.reseller-button {
  color: #fff;
  background: #a82632;
  border-color: #a82632;
}

.batch-detail-header {
  align-items: stretch;
  flex-direction: column;
  gap: 24px;
}

.batch-summary {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.batch-summary h1 {
  max-width: none;
}

.batch-actions {
  display: grid;
  gap: 20px;
  padding: 22px;
}

.batch-action-group {
  display: grid;
  gap: 11px;
}

.batch-action-group + .batch-action-group {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.batch-action-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

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

.batch-action-grid .button {
  min-height: 58px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
  text-align: center;
}

.batch-action-grid .button small {
  font-size: 11px;
  font-weight: 750;
  opacity: .82;
}

.batch-download-all {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 17px;
  border-radius: 13px;
  background: #f8e8ea;
}

.batch-download-all > div {
  display: grid;
  gap: 4px;
}

.batch-download-all small {
  color: var(--muted);
}

.button.reseller-all-button {
  color: #fff;
  background: #7f1d27;
  border-color: #7f1d27;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .topbar {
    height: auto;
    min-height: 72px;
    padding: 12px 4vw;
    flex-wrap: wrap;
  }

  .topbar nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 5px;
  }

  .batch-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .batch-download-all {
    grid-template-columns: 1fr;
  }

  .batch-download-all .button {
    width: 100%;
    white-space: normal;
  }

  .batch-action-grid {
    grid-template-columns: 1fr;
  }
}

.reseller-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 20px;
  align-items: start;
}

.reseller-grid .form-card {
  max-width: none;
}

.reseller-info {
  padding: 25px;
  border-top: 5px solid #a82632;
}

.reseller-info h2 {
  margin: 5px 0 10px;
  font-size: 30px;
}

.reseller-info p:last-child,
.rule-note span {
  color: var(--muted);
  line-height: 1.5;
}

.rule-note {
  display: grid;
  gap: 4px;
  margin: 0 0 22px;
  padding: 14px;
  background: #f7ecee;
  border-left: 4px solid #a82632;
  border-radius: 8px;
}

.closeout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}

.closeout-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px;
  border-left: 5px solid #a82632;
}

.closeout-card h3 { margin: 0 0 8px; font-size: 24px; }
.closeout-card p { margin: 10px 0 0; color: var(--muted); }

.closeout-confirm {
  max-width: 1050px;
  margin: 0 auto;
  padding: 30px;
}

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

.closeout-summary div {
  display: grid;
  gap: 5px;
  padding: 16px;
  background: #f7ecee;
  border-radius: 10px;
}

.closeout-summary span { color: var(--muted); font-size: 12px; }
.closeout-summary strong { font-size: 24px; }

@media(max-width:760px) {
  .reseller-grid { grid-template-columns: 1fr; }
  .closeout-card { align-items: flex-start; flex-direction: column; }
  .closeout-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.user-chip {
  display: grid;
  gap: 1px;
  padding: 7px 11px;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 9px;
  white-space: nowrap;
}

.user-chip strong { font-size: 12px; }
.user-chip small { color: #cdd6d0; font-size: 10px; }

.role-badge {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 800;
}

.role-admin { color: #fff; background: #26372e; }
.role-office { color: #234c2d; background: #dfeedd; }
.role-production { color: #234f72; background: #dcebf5; }
.role-read_only { color: #5d5267; background: #ece7f0; }
.status.disabled { color: #7c332b; background: #f7dfdc; }

.role-matrix {
  margin-top: 28px;
  padding: 24px;
  overflow: auto;
}

.role-matrix h2,
.account-grid h2 { margin: 0 0 20px; }

.account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.account-grid .form-card { max-width: none; }

@media(max-width:980px) {
  .user-chip { order: 2; }
  .account-grid { grid-template-columns: 1fr; }
}
