/*
  Sport Time 7 contrast pass
  Keeps the current design, but reinforces legibility on buttons, tabs,
  chips, alerts and action controls across the whole system.
*/

:root {
  --st7-ink-strong: #0b1220;
  --st7-ink-muted: #475569;
  --st7-border-strong: #cbd5e1;
  --st7-surface-strong: #ffffff;
  --st7-blue-strong: #174acb;
  --st7-blue-dark: #123fbd;
  --st7-red-strong: #b3132b;
  --st7-green-strong: #08753a;
  --st7-amber-strong: #8a5600;
  --st7-focus: #ffcf33;
}

button,
[role="button"],
input[type="button"],
input[type="submit"],
input[type="reset"],
.button,
.btn,
.save-button,
.primary-button,
.publish-button,
.danger-button,
.workspace-new-button,
.admin-nav-exit,
.brand-links a,
.admin-header a,
.admin-header button,
.module-tabs button,
.module-tabs a,
.module-tab-link,
.internal-module-nav a,
.accounting-view-tabs button,
.list-heading button,
.report-actions button,
.row-actions button,
.movement-actions button,
.cart-actions button,
.checkout-actions button,
.stock-actions button,
.stock-card button,
.variant-card button,
.flow-primary-link {
  font-weight: 900;
  text-shadow: none;
}

button:focus-visible,
[role="button"]:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--st7-focus);
  outline-offset: 3px;
}

a {
  text-underline-offset: 3px;
}

.save-button,
.primary-button,
.publish-button,
.workspace-new-button,
button.save-button,
button.primary-button,
button.publish-button,
button.workspace-new-button,
.cart-actions .primary,
.checkout-actions .primary,
.stock-actions .primary {
  color: #ffffff !important;
  background: var(--st7-blue-strong) !important;
  border-color: var(--st7-blue-strong) !important;
}

.save-button:hover,
.primary-button:hover,
.publish-button:hover,
.workspace-new-button:hover,
button.save-button:hover,
button.primary-button:hover,
button.publish-button:hover,
button.workspace-new-button:hover {
  background: var(--st7-blue-dark) !important;
  border-color: var(--st7-blue-dark) !important;
}

.danger-button,
.danger-action,
.delete-button,
.remove-button,
.cancel-button.is-danger,
button[data-action="delete"],
button[data-action="cancel"] {
  color: #8f1020 !important;
  background: #fff0f3 !important;
  border-color: #f0b8c2 !important;
  box-shadow: none !important;
}

.danger-button:hover,
.danger-action:hover,
.delete-button:hover,
.remove-button:hover,
.cancel-button.is-danger:hover,
button[data-action="delete"]:hover,
button[data-action="cancel"]:hover {
  color: #ffffff !important;
  background: var(--st7-red-strong) !important;
  border-color: var(--st7-red-strong) !important;
}

.module-tabs button:not(.is-active),
.module-tabs a:not(.is-active),
.module-tab-link:not(.is-active),
.internal-module-nav a:not(.is-active),
.accounting-view-tabs button:not(.is-active),
.list-heading button:not(.danger-button),
.report-actions button:not(.danger-button),
.row-actions button:not(.danger-button),
.movement-actions button:not(.danger-button),
.cart-actions button:not(.primary):not(.danger-button),
.checkout-actions button:not(.primary):not(.danger-button),
.stock-actions button:not(.primary):not(.danger-button) {
  color: var(--st7-ink-strong) !important;
  background: var(--st7-surface-strong) !important;
  border: 1px solid var(--st7-border-strong) !important;
}

.module-tabs button.is-active,
.module-tabs a.is-active,
.module-tab-link.is-active,
.internal-module-nav a.is-active,
.accounting-view-tabs button.is-active {
  color: #ffffff !important;
  background: var(--module-accent, var(--st7-blue-strong)) !important;
  border-color: var(--module-accent, var(--st7-blue-strong)) !important;
  box-shadow: 0 14px 28px rgba(23, 74, 203, 0.18);
}

.internal-module-nav a[data-tone="green"].is-active,
.module-tabs [data-tone="green"].is-active {
  background: var(--st7-green-strong) !important;
  border-color: var(--st7-green-strong) !important;
}

.internal-module-nav a[data-tone="amber"].is-active,
.module-tabs [data-tone="amber"].is-active {
  background: var(--st7-amber-strong) !important;
  border-color: var(--st7-amber-strong) !important;
}

.data-chip,
.status-pill,
.status-badge,
.row-status,
.chip,
.pill,
.tag,
.admin-tags span,
.line-chip,
.sku-chip,
.lot-chip,
.run-chip,
.pairs-chip,
.color-chip,
.brand-chip,
.collection-chip {
  color: var(--st7-ink-strong) !important;
  border-color: var(--st7-border-strong) !important;
  font-weight: 900;
}

.sku-chip,
.chip-sku,
.tag-sku {
  color: #174acb !important;
  background: #edf4ff !important;
  border-color: #b8cdfd !important;
}

.lot-chip,
.chip-lote,
.tag-lote {
  color: #7a4c00 !important;
  background: #fff4d6 !important;
  border-color: #f2cb72 !important;
}

.pairs-chip,
.chip-pares,
.tag-pares,
.status-ok,
.is-success {
  color: #08753a !important;
  background: #e9f8ef !important;
  border-color: #9bdcb7 !important;
}

.line-chip,
.run-chip,
.chip-corrida,
.tag-corrida {
  color: #432bb1 !important;
  background: #f0edff !important;
  border-color: #c9c1ff !important;
}

.color-chip,
.chip-color,
.tag-color {
  color: #a20f2f !important;
  background: #fff0f4 !important;
  border-color: #f3b2c0 !important;
}

.status-warning,
.is-warning {
  color: #7a4c00 !important;
  background: #fff4d6 !important;
  border-color: #f2cb72 !important;
}

.status-danger,
.is-danger,
.is-cancelled,
.is-canceled {
  color: #7f1020 !important;
  background: #fff1f4 !important;
  border-color: #f0b8c2 !important;
}

.toast,
.notice,
.alert,
.form-error,
.status-toast,
.floating-message {
  font-weight: 900;
  color: #ffffff;
}

.toast a,
.notice a,
.alert a,
.form-error a,
.status-toast a,
.floating-message a {
  color: #ffffff;
  font-weight: 900;
  text-decoration: underline;
}

.empty-list,
.empty-state,
.bulk-summary,
.import-intro,
.muted,
small,
.help-text,
.field-hint {
  color: var(--st7-ink-muted) !important;
}

button:disabled,
button[disabled],
.is-disabled,
[aria-disabled="true"] {
  color: #64748b !important;
  background: #e2e8f0 !important;
  border-color: #cbd5e1 !important;
  opacity: 1 !important;
  cursor: not-allowed;
  box-shadow: none !important;
}

.legal-footer a,
.site-footer a,
footer a {
  color: var(--st7-blue-strong) !important;
  font-weight: 900;
}

@media (max-width: 760px) {
  button,
  [role="button"],
  .button,
  .btn,
  .brand-links a,
  .admin-header a,
  .module-tab-link,
  .internal-module-nav a {
    min-height: 42px;
  }
}

/* Admin readability pass: slightly larger text without changing layout. */
.admin-shell,
.admin-main,
.admin-page,
.admin-panel,
.admin-form,
.admin-list,
.stock-admin,
.stock-list-section,
.workspace-summary,
.accounting-workspace,
.tracking-dashboard,
.tracking-shell {
  font-size: 14px;
}

.admin-shell label,
.admin-form label,
.stock-admin label,
.accounting-workspace label,
.tracking-dashboard label {
  font-size: 11px !important;
  color: #4b5565 !important;
  font-weight: 950;
}

.admin-shell input,
.admin-shell select,
.admin-shell textarea,
.stock-admin input,
.stock-admin select,
.stock-admin textarea,
.accounting-workspace input,
.accounting-workspace select,
.accounting-workspace textarea {
  font-size: 12.5px !important;
  color: var(--st7-ink-strong) !important;
  font-weight: 800;
}

.admin-page-title p,
.workspace-summary-kicker,
.flow-kicker,
.admin-flow-stat small,
.admin-flow-nav button small {
  font-size: 11px !important;
  color: var(--st7-ink-muted) !important;
}

.admin-flow-nav button b,
.editor-stepper button,
.module-tabs button,
.module-tabs a,
.module-tab-link,
.internal-module-nav a {
  font-size: 12px !important;
}

.data-chip,
.admin-tags span,
.chip,
.pill,
.tag {
  min-height: 22px;
  padding: 4px 8px;
  font-size: 10.5px !important;
  line-height: 1.1;
}

/* Loaded stock list: make totals and actions impossible to miss. */
.stock-row-group > strong {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  color: #ffffff !important;
  background: var(--st7-green-strong) !important;
  border: 1px solid var(--st7-green-strong) !important;
  border-radius: 999px;
  font-size: 13px !important;
  font-weight: 950;
  line-height: 1;
  box-shadow: 0 10px 22px rgba(8, 117, 58, 0.18);
}

.stock-row-group .stock-run-summary {
  min-height: 46px;
  padding: 8px 10px;
}

.stock-row-group .stock-run-summary strong {
  color: #4b2fc8 !important;
  font-size: 11px !important;
  font-weight: 950;
}

.stock-row-group .stock-run-summary b {
  color: var(--st7-green-strong) !important;
  font-size: 16px !important;
  font-weight: 950;
}

.stock-row-group .stock-label-select {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px;
  color: var(--st7-ink-strong) !important;
  background: #ffffff !important;
  border: 1px solid var(--st7-border-strong) !important;
  border-radius: 999px;
  font-size: 11.5px !important;
  font-weight: 950;
}

.stock-row-group .stock-label-select input {
  width: 16px;
  height: 16px;
}

.stock-row-group .row-actions button,
body[data-active-module="catalog"] .style-row .row-actions button {
  min-height: 34px !important;
  min-width: 72px;
  padding: 0 12px !important;
  font-size: 11.5px !important;
  border-radius: 999px !important;
}

.stock-row-group .row-actions .danger-button,
body[data-active-module="catalog"] .style-row .row-actions .danger-button {
  color: #8f1020 !important;
  background: #fff0f3 !important;
  border-color: #f0b8c2 !important;
}

/* Histories: cancelled rows should be soft and readable, not solid red. */
.history-row.is-cancelled,
.stock-command-row.is-cancelled,
.stock-return-card.is-cancelled {
  color: var(--st7-ink-strong) !important;
  background: linear-gradient(135deg, #fff6f8 0%, #ffffff 62%) !important;
  border: 1px solid #f0b8c2 !important;
  border-left: 6px solid #b3132b !important;
  box-shadow: 0 12px 28px rgba(127, 16, 32, 0.08) !important;
}

.history-row.is-cancelled h3,
.history-row.is-cancelled strong,
.stock-command-row.is-cancelled strong {
  color: var(--st7-ink-strong) !important;
}

.history-row.is-cancelled p,
.history-row.is-cancelled span,
.stock-command-row.is-cancelled span,
.stock-return-card.is-cancelled p {
  color: #475569 !important;
}

.history-row.is-cancelled h3::after,
.stock-command-row.is-cancelled strong::after {
  color: #8f1020 !important;
  background: #ffe3e9 !important;
  border-color: #ef9caf !important;
  font-weight: 950;
}

.history-row.is-cancelled .data-chip,
.stock-command-row.is-cancelled .data-chip,
.stock-return-card.is-cancelled .data-chip {
  color: var(--st7-ink-strong) !important;
  background: #ffffff !important;
  border-color: #d7deea !important;
}

.history-row.is-cancelled .data-chip.is-danger,
.history-row.is-cancelled .collection-chip.is-danger,
.stock-command-row.is-cancelled .data-chip.is-danger,
.stock-command-row.is-cancelled .collection-chip.is-danger {
  color: #8f1020 !important;
  background: #ffe3e9 !important;
  border-color: #ef9caf !important;
}

@media (max-width: 760px) {
  .admin-shell,
  .admin-main,
  .admin-form,
  .admin-list,
  .stock-admin,
  .stock-list-section,
  .workspace-summary,
  .accounting-workspace,
  .tracking-dashboard {
    font-size: 13.5px;
  }

  .stock-row-group > strong {
    min-height: 38px;
    font-size: 13px !important;
  }
}
