﻿:root {
  --bg: #f3f5f7;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --text: #1f2933;
  --muted: #667582;
  --border: #d9e0e6;
  --primary: #12475f;
  --primary-strong: #0e394d;
  --radius: 14px;
  --shadow: 0 10px 28px rgba(18, 31, 43, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #f6f8fa 0%, #f1f4f7 100%);
  line-height: 1.5;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.bg-app {
  position: relative;
  min-height: 100vh;
}

.bg-app::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("/static/img/LOGO.png");
  background-repeat: repeat;
  background-size: 150px auto;
  background-position: 40px 40px;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}

.site-header,
main {
  position: relative;
  z-index: 1;
}

.container {
  width: min(1120px, 92%);
  margin-inline: auto;
}

.section-gap {
  padding: 48px 0;
}

.section-soft {
  background: var(--surface-soft);
  border-block: 1px solid #ecf0f3;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e6ebef;
  background: rgba(245, 247, 249, 0.92);
}

.private-header {
  background: rgba(241, 244, 247, 0.95);
}

.nav-wrap {
  min-height: 74px;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 10px 0;
}

.nav-wrap-private {
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  line-height: 1;
}

.brand-logo {
  height: 34px;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.brand-text {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.product-highlight {
  background:
    radial-gradient(circle at top right, rgba(18, 71, 95, 0.14), transparent 42%),
    #fff;
}

.product-highlight p {
  color: #445564;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.category-pills span {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(18, 71, 95, 0.08);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.9rem;
}

.social-block {
  margin-top: 16px;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0.85rem 0 1.25rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.58rem 0.9rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.social-links a:hover {
  background: rgba(18, 71, 95, 0.08);
  border-color: rgba(18, 71, 95, 0.22);
  transform: translateY(-1px);
}

.private-note {
  margin-top: 1rem;
  color: var(--muted);
}

.main-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.main-nav a {
  padding: 8px 10px;
  border-radius: 8px;
  color: #2a3a46;
}
.main-nav a.btn-primary {
  color: #fff;
}

.main-nav a:hover {
  background: #e9eff4;
}

.private-nav-groups {
  flex: 1 1 560px;
  gap: 8px;
  align-items: center;
}

.private-nav-home {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 4px 14px rgba(18, 31, 43, 0.04);
}

.private-nav-dropdown {
  position: relative;
}

.private-nav-dropdown summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 4px 14px rgba(18, 31, 43, 0.04);
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.private-nav-dropdown summary::-webkit-details-marker {
  display: none;
}

.private-nav-dropdown summary::after {
  content: "▾";
  font-size: 0.74rem;
  color: var(--muted);
  transition: transform 0.18s ease;
}

.private-nav-dropdown[open] summary::after {
  transform: rotate(180deg);
}

.private-nav-dropdown summary:hover,
.private-nav-dropdown[open] summary {
  border-color: #c5d0d8;
  background: var(--surface-soft);
  box-shadow: 0 8px 18px rgba(18, 31, 43, 0.06);
}

.private-nav-panel {
  top: calc(100% + 8px);
  right: auto;
  left: 0;
  z-index: 30;
  min-width: 240px;
  width: min(280px, 80vw);
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 14px 28px rgba(18, 31, 43, 0.10);
}

.private-nav-link {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.private-nav-link strong {
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}

.private-nav-link span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.private-nav-link:hover {
  border-color: var(--border);
  background: var(--surface-soft);
}

.placeholder-link {
  color: var(--muted) !important;
  cursor: default;
}

.placeholder-link:hover {
  background: transparent !important;
}

.account-menu {
  margin-left: auto;
}

.account-menu-trigger {
  border-radius: 999px !important;
  border: 1px solid #2a8b4f !important;
  background: linear-gradient(180deg, #31a35d 0%, #2b944f 100%) !important;
  color: #fff !important;
  font-weight: 700 !important;
  padding: 8px 14px !important;
}

.account-menu-trigger:hover,
.account-menu[open] .account-menu-trigger {
  background: linear-gradient(180deg, #2f9858 0%, #257f45 100%) !important;
  border-color: #257f45 !important;
}

.account-menu-panel {
  min-width: 220px;
  padding: 10px;
}

.account-menu-link {
  display: block;
  border-radius: 8px;
  border: 1px solid #d5dde4;
  background: #f8fbfd;
  color: #24465a;
  font-size: 0.9rem !important;
  font-weight: 600;
  padding: 9px 10px;
}

.account-menu-link:hover {
  background: #edf3f7;
}

.account-menu-form {
  margin: 0;
}

.account-menu-button {
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.hero-grid {
  display: grid;
  gap: 20px;
}

.eyebrow {
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.78rem;
  margin-bottom: 10px;
}

h1 {
  font-size: clamp(1.85rem, 4vw, 2.7rem);
  line-height: 1.15;
  margin-bottom: 12px;
}

.lead {
  color: #445564;
  max-width: 66ch;
}

.actions-row {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-strong);
}
.main-nav a.btn-primary:hover {
  color: #fff;
  background: var(--primary-strong);
}
.btn-outline {
  border-color: #c8d3dc;
  color: #233746;
  background: #fff;
}

.btn-outline:hover {
  background: #f2f6f9;
}

.btn-ghost {
  border-color: #cdd7df;
  color: #2a3a46;
  background: transparent;
}

.btn-ghost:hover {
  background: #eef3f7;
}

.btn-sm {
  padding: 8px 12px;
  font-size: 0.92rem;
}

.btn-block {
  width: 100%;
}

.hero {
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: 5%;
  top: 50%;
  width: 420px;
  height: 420px;
  background-image: url("/static/img/LOGO.png");
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.30;
  transform: translateY(-50%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}
.inventario-hub {
  display: grid;
  gap: 14px;
}

.inv-action {
  border-radius: 14px;
  border: 1px solid #d5e0e8;
  padding: 16px 18px;
  display: grid;
  gap: 6px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(18, 31, 43, 0.1);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.inv-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(18, 31, 43, 0.15);
}

.inv-action-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.inv-action-text {
  color: #405565;
  font-size: 0.92rem;
}

.inv-action-stock {
  border-color: #8bb2c7;
  background: linear-gradient(135deg, #e9f4fb 0%, #f5fbff 100%);
}

.inv-action-stock .inv-action-title {
  color: #0f4d66;
}

.inv-action-ingresar {
  border-color: #90c8a8;
  background: linear-gradient(135deg, #ebf8ef 0%, #f5fcf7 100%);
}

.inv-action-ingresar .inv-action-title {
  color: #1e643d;
}

.inv-action-ingresos {
  border-color: #c6ced8;
  background: linear-gradient(135deg, #f6f8fa 0%, #ffffff 100%);
}

.inv-action-ingresos .inv-action-title {
  color: #2c4453;
}

.inv-action-egresos {
  border-color: #d3c3dd;
  background: linear-gradient(135deg, #f8f4fb 0%, #ffffff 100%);
}

.inv-action-egresos .inv-action-title {
  color: #5a3d70;
}

.card {
  background: var(--surface);
  border: 1px solid #e7edf2;
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.hero-card h2,
.card h2,
.card h3 {
  margin-bottom: 10px;
}

.feature-list {
  margin: 0;
  padding-left: 18px;
  color: #40515f;
  display: grid;
  gap: 8px;
}

.cards-grid {
  display: grid;
  gap: 16px;
}

.info-block p {
  margin-top: 10px;
  color: #445564;
}

.messages-area {
  padding-top: 20px;
}

.alert {
  background: #edf4f9;
  border: 1px solid #d8e8f5;
  border-radius: 10px;
  padding: 10px 12px;
  color: #1f3c52;
}

.alert-success {
  background: linear-gradient(135deg, #edf8ef 0%, #f8fdf9 100%);
  border-color: #c5e5d0;
  color: #184f33;
}

.alert-error {
  background: linear-gradient(135deg, #fff1f1 0%, #fff8f8 100%);
  border-color: #e7c4c4;
  color: #6e2e2e;
}

.alert-prominent {
  padding: 18px 20px;
  border-radius: 16px;
  box-shadow: 0 14px 28px rgba(18, 31, 43, 0.08);
  font-size: 1rem;
  font-weight: 700;
}

.auth-wrap {
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(460px, 100%);
}

.auth-card h1 {
  font-size: clamp(1.6rem, 3.4vw, 2.1rem);
  margin-bottom: 10px;
}

.auth-form {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.form-group {
  display: grid;
  gap: 6px;
}

.form-group label {
  font-weight: 600;
  color: #2e3f4b;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  color: var(--text);
  background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #6f95ab;
  outline: 2px solid rgba(18, 71, 95, 0.15);
  outline-offset: 1px;
}

.radio-choice-list {
  display: grid;
  gap: 10px;
}

.radio-choice-item {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 10px 12px;
  border: 1px solid #dbe3ea;
  border-radius: 10px;
  background: #fbfdfe;
  cursor: pointer;
  position: relative;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.radio-choice-item input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px !important;
  height: 1px !important;
  min-width: 1px;
  max-width: 1px;
  margin: 0;
  padding: 0;
}

.radio-choice-item span {
  margin: 0;
  font-weight: 500;
  color: #2e3f4b;
  line-height: 1.3;
  flex: 1;
}

.radio-choice-item:hover {
  border-color: #aebfcc;
  background: #f6fafc;
}

.radio-choice-item input[type="radio"]:checked + span {
  color: #0f4056;
  font-weight: 700;
}

.radio-choice-item:has(input[type="radio"]:checked) {
  border-color: var(--primary);
  background: #edf6fb;
  box-shadow: inset 0 0 0 1px rgba(18, 71, 95, 0.08);
}

.activa-toggle-wrap {
  display: grid;
  gap: 8px;
}

.activa-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid #d2dde6;
  border-radius: 999px;
  background: #f7fbff;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.activa-toggle:hover {
  border-color: #9fb8ca;
  background: #eef6fd;
}

.activa-toggle input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary);
}

.activa-toggle-text {
  font-weight: 600;
  color: #234254;
}

.field-help {
  margin: 0;
  font-size: 0.9rem;
  color: #5a6e7c;
}

.costos-actuales-empty {
  border: 1px dashed #cfd8df;
  border-radius: 10px;
  background: #f8fbfd;
  color: #4d6271;
  padding: 12px;
}

.checkbox-grid #id_talles_predefinidos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(64px, 1fr));
  gap: 8px 12px;
}

.checkbox-grid #id_talles_predefinidos > div label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  color: #2e3f4b;
}

.checkbox-grid #id_tipos_pago_habilitados {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 12px;
}

.checkbox-grid #id_tipos_pago_habilitados > div label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid #d2dde6;
  border-radius: 999px;
  background: #f7fbff;
  cursor: pointer;
  font-weight: 500;
  color: #2e3f4b;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.checkbox-grid #id_tipos_pago_habilitados > div label:hover {
  border-color: #9fb8ca;
  background: #eef6fd;
}

.checkbox-grid #id_tipos_pago_habilitados > div label:has(input[type="checkbox"]:checked) {
  border-color: var(--primary);
  background: #e9f4ff;
  box-shadow: 0 0 0 2px rgba(46, 134, 222, 0.12);
}

.checkbox-grid #id_tipos_pago_habilitados input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary);
}

.choice-pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 12px;
}

.choice-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 10px 14px;
  border: 1px solid #d2dde6;
  border-radius: 999px;
  background: #f7fbff;
  cursor: pointer;
  font-weight: 500;
  color: #2e3f4b;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.choice-pill:hover {
  border-color: #9fb8ca;
  background: #eef6fd;
}

.choice-pill:has(input[type="checkbox"]:checked) {
  border-color: var(--primary);
  background: #e9f4ff;
  box-shadow: 0 0 0 2px rgba(46, 134, 222, 0.12);
}

.choice-pill input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--primary);
}

.movement-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.movement-type-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #d2dde6;
  border-radius: 16px;
  background: #f7fbff;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.movement-type-card:hover {
  border-color: #9fb8ca;
  background: #eef6fd;
}

.movement-type-card:has(input[type="radio"]:checked) {
  border-color: var(--primary);
  background: #e9f4ff;
  box-shadow: 0 0 0 2px rgba(46, 134, 222, 0.12);
}

.movement-type-card input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--primary);
  flex: 0 0 auto;
}

.movement-type-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.movement-type-title {
  font-weight: 700;
  color: #243744;
}

.movement-type-description {
  color: #526474;
  line-height: 1.45;
  font-size: 0.95rem;
}

.form-errors {
  border: 1px solid #e7c8c8;
  background: #fff2f2;
  color: #6a2d2d;
  border-radius: 10px;
  padding: 10px 12px;
}

.form-error-summary {
  margin-bottom: 16px;
  overflow-wrap: anywhere;
}

.form-error-summary-title {
  margin: 0 0 6px;
  font-size: clamp(1rem, 2vw, 1.05rem);
}

.form-error-summary-message {
  margin: 0 0 10px;
  font-weight: 500;
  line-height: 1.4;
}

.form-error-summary-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  font-weight: 500;
  line-height: 1.4;
}

.form-error-summary-list li {
  min-width: 0;
}

.form-error-summary-list strong {
  overflow-wrap: anywhere;
}

.form-errors p {
  margin: 0 0 6px;
}

.form-errors p:last-child {
  margin-bottom: 0;
}

.lockout-help {
  margin: 16px 0;
  color: #445564;
}

.field-error {
  color: #7a2f2f;
}

@media (max-width: 640px) {
  .form-error-summary {
    margin-bottom: 14px;
    padding: 14px 16px;
    border-radius: 14px;
  }

  .form-error-summary-title {
    font-size: 0.98rem;
  }

  .form-error-summary-list {
    padding-left: 16px;
    gap: 5px;
    font-size: 0.95rem;
  }
}

.field-help {
  color: var(--muted);
  font-size: 0.88rem;
}

.btn-action-lg {
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 700;
}

.page-head {
  margin-bottom: 18px;
}

.dashboard-shell {
  display: grid;
  gap: 28px;
}

.dashboard-hero {
  padding: 20px 22px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 22px rgba(18, 31, 43, 0.06);
}

.dashboard-hero-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dashboard-hero-copy .page-head,
.dashboard-hero-copy {
  margin-bottom: 0;
}

.dashboard-profile-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
}

.dashboard-hero-actions {
  display: flex;
  align-items: center;
}

.dashboard-kpis-grid {
  display: grid;
  gap: 14px;
}

.dashboard-kpi-card {
  display: grid;
  gap: 8px;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(18, 31, 43, 0.06);
}

.dashboard-kpi-label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dashboard-kpi-value {
  color: var(--text);
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1;
}

.dashboard-kpi-helper {
  color: var(--muted);
  font-size: 0.9rem;
}

.dashboard-sections-area {
  display: grid;
  gap: 18px;
}

.dashboard-sections-intro {
  display: grid;
  gap: 4px;
}

.dashboard-sections-intro h2 {
  margin-bottom: 0;
  color: var(--text);
}

.dashboard-sections-intro p:last-child {
  color: var(--muted);
}

.dashboard-groups {
  display: grid;
  gap: 16px;
}

.dashboard-group-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(18, 31, 43, 0.05);
}

.dashboard-group-head {
  display: grid;
  gap: 4px;
}

.dashboard-group-head h3 {
  margin-bottom: 0;
  color: var(--text);
  font-size: 1.05rem;
}

.dashboard-group-head p:last-child {
  color: var(--muted);
  max-width: 72ch;
  font-size: 0.92rem;
}

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

.dashboard-access-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-access-item:hover {
  border-color: #c6d3dc;
  background: var(--surface-soft);
  box-shadow: 0 8px 18px rgba(18, 31, 43, 0.05);
}

.dashboard-access-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.dashboard-access-copy strong {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
}

.dashboard-access-copy span {
  color: var(--muted);
  font-size: 0.84rem;
}

.dashboard-access-arrow {
  color: var(--primary);
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}

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

.finanzas-resumen-title {
  font-size: clamp(1.75rem, 2vw, 2.15rem);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.finanzas-resumen-grid {
  display: grid;
  gap: 16px;
  align-items: stretch;
}

.finanzas-resumen-topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.summary-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.summary-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.finanzas-resumen-topbar-form,
.dashboard-resumen-toolbar,
.reportes-tabs-filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.finanzas-resumen-topbar-form input,
.dashboard-resumen-toolbar input,
.reportes-tabs-filter-form input,
.reportes-tabs-filter-form select {
  min-width: 170px;
}

.summary-filter-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.summary-picker {
  min-height: 44px;
  min-width: 210px;
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border: 1px solid #c8d3dc;
  border-radius: 10px;
  background: #fff;
  color: #233746;
  font-weight: 600;
  transition: all 0.2s ease;
}

.summary-picker:hover,
.summary-select:hover {
  background: #f2f6f9;
}

.summary-picker:focus-within,
.summary-select:focus {
  border-color: #9fb3c2;
  background: #f8fbfd;
  outline: none;
}

.summary-picker-control,
.summary-picker select,
.summary-filter-form select {
  min-height: 22px;
  border: 0;
  background: transparent;
  color: #233746;
  font: inherit;
  font-weight: 600;
  width: 100%;
  min-width: 0;
  padding: 0;
  outline: none;
  box-shadow: none;
}

.summary-picker-control::-webkit-calendar-picker-indicator {
  opacity: 0.9;
  cursor: pointer;
}

.summary-select {
  min-height: 44px;
  min-width: 170px;
  padding: 10px 16px;
  border: 1px solid #c8d3dc;
  border-radius: 10px;
  background: #fff;
  color: #233746;
  font: inherit;
  font-weight: 600;
  transition: all 0.2s ease;
}

.summary-filter-submit {
  min-height: 44px;
}

.finanzas-filtros-inline {
  display: grid;
  gap: 14px;
  align-items: end;
}

.finanzas-filtros-inline .form-group {
  margin-bottom: 0;
}

.finanzas-filtros-accion {
  display: grid;
  align-self: end;
}

.finanzas-filtros-accion-label {
  visibility: hidden;
}

.finanzas-filtros-accion .btn {
  width: 100%;
}

.finanzas-resumen-card {
  display: grid;
  gap: 14px;
  align-content: start;
  height: 100%;
  padding: 22px;
}

.finanzas-card-label {
  margin: 0;
  color: #5a6b79;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.finanzas-card-hero {
  color: #21313f;
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
  font-weight: 800;
}

.finanzas-card-hero-compact {
  font-size: clamp(2rem, 4.2vw, 3.6rem);
}

.finanzas-card-helper {
  margin: 0;
  color: #5f7080;
  font-size: 0.95rem;
}

.finanzas-card-helper-strong {
  color: #21313f;
  font-weight: 700;
}

.finanzas-resumen-card-total,
.finanzas-variacion-card {
  align-content: center;
  justify-items: center;
  text-align: center;
}

.finanzas-resumen-card-total {
  justify-items: center;
  text-align: center;
}

.finanzas-resumen-card-total .finanzas-card-label,
.finanzas-variacion-card .finanzas-card-label {
  width: min(80%, 220px);
  font-size: 1.08rem;
  line-height: 1.15;
  text-wrap: balance;
}

.finanzas-resumen-card-total .finanzas-card-hero {
  width: min(80%, 230px);
  font-size: clamp(3.9rem, 6.6vw, 5.8rem);
  text-wrap: balance;
}

.finanzas-resumen-card-total .finanzas-card-helper,
.finanzas-variacion-card .finanzas-card-helper {
  width: min(80%, 220px);
  font-size: clamp(1.05rem, 1.8vw, 1.3rem);
  text-align: center;
  text-wrap: balance;
}

.finanzas-variacion-card .finanzas-card-hero {
  width: min(80%, 240px);
  font-size: clamp(2.8rem, 5vw, 4.9rem);
  text-wrap: balance;
}

.finanzas-variacion-sin_base .finanzas-card-hero {
  white-space: nowrap;
  font-size: clamp(2.5rem, 4.3vw, 4.2rem);
}

.finanzas-variacion-card .finanzas-card-helper {
  max-width: 16ch;
}

.finanzas-resumen-card-chart {
  align-content: start;
}

.finanzas-chart-layout {
  display: grid;
  gap: 18px;
}

.finanzas-donut-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
}

.finanzas-donut {
  width: min(220px, 100%);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
}

.finanzas-donut-center {
  width: 58%;
  height: 58%;
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 12px;
  box-shadow: inset 0 0 0 1px #e7edf2;
}

.finanzas-donut-center strong {
  color: #21313f;
  font-size: 0.95rem;
  line-height: 1.2;
}

.finanzas-donut-slice-label {
  position: absolute;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: clamp(0.58rem, 1vw, 0.7rem);
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  white-space: nowrap;
}

.finanzas-donut-legend {
  display: grid;
  gap: 4px;
  align-content: center;
  min-height: 220px;
  padding-left: 18px;
}

.finanzas-donut-legend-item {
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 8px;
  align-items: start;
}

.finanzas-donut-legend-color {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  margin-top: 4px;
}

.finanzas-donut-legend-item strong,
.finanzas-donut-legend-item small {
  display: block;
}

.finanzas-donut-legend-item strong {
  font-size: 0.78rem;
  line-height: 1.05;
}

.finanzas-donut-legend-item small {
  color: #5f7080;
  font-size: 0.7rem;
  line-height: 1.05;
}

.finanzas-variacion-main {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.finanzas-variacion-arrow {
  color: #5f7080;
  font-size: 1.8rem;
  line-height: 1.1;
  margin-top: 8px;
}

.finanzas-variacion-sube .finanzas-card-hero {
  color: #b42318;
}

.finanzas-variacion-baja .finanzas-card-hero {
  color: #027a48;
}

.finanzas-variacion-igual .finanzas-card-hero,
.finanzas-variacion-sin_base .finanzas-card-hero {
  color: #21313f;
}

.dashboard-bars-card {
  align-content: space-between;
}

.dashboard-bars-chart {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  align-items: stretch;
  min-height: 220px;
}

.dashboard-bars-item {
  display: grid;
  grid-template-columns: 54px 1fr minmax(42px, auto);
  gap: 10px;
  align-items: center;
}

.dashboard-bars-item-selected .dashboard-bars-label,
.dashboard-bars-item-selected .dashboard-bars-value {
  color: #103f57;
  font-weight: 700;
}

.dashboard-bars-value,
.dashboard-bars-label {
  margin: 0;
  color: #5f7080;
  font-size: 0.72rem;
  line-height: 1.05;
  text-align: center;
  text-wrap: balance;
}

.dashboard-bars-column {
  width: 100%;
  min-height: 16px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0;
  border-radius: 999px;
  background: #eaf0f5;
  overflow: hidden;
}

.dashboard-bars-bar {
  display: block;
  width: 0;
  min-height: 16px;
  border-radius: 999px;
  background: linear-gradient(90deg, #5b8def 0%, #1d4ed8 55%, #173ea6 100%);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.14);
}

.dashboard-bars-bar-selected {
  background: linear-gradient(90deg, #3467eb 0%, #1d4ed8 55%, #0f2d78 100%);
}

.dashboard-bars-empty {
  display: grid;
  gap: 10px;
  justify-items: center;
  align-content: center;
  min-height: 220px;
  text-align: center;
}

.stat-value {
  color: #4e6070;
}

.card-link {
  color: var(--primary);
  font-weight: 600;
}

@media (max-width: 560px) {
  .brand-logo {
    height: 30px;
  }

  .brand-text {
    font-size: 1.02rem;
  }

  .dashboard-bars-chart {
    gap: 6px;
    min-height: 190px;
  }

  .dashboard-bars-value,
  .dashboard-bars-label {
    font-size: 0.64rem;
  }

  .dashboard-bars-item {
    grid-template-columns: 46px 1fr minmax(38px, auto);
  }

  .private-nav-panel {
    left: 0;
    right: auto;
    width: min(280px, 88vw);
  }

  .dashboard-hero-main {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-hero-actions {
    width: 100%;
  }
}

@media (min-width: 760px) {
  .hero-grid {
    grid-template-columns: 1.35fr 1fr;
    align-items: center;
  }

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

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

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

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

  .finanzas-resumen-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }

  .finanzas-filtros-inline {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  }

  .finanzas-filtros-accion .btn {
    width: auto;
    min-width: 160px;
  }

  .finanzas-chart-layout {
    grid-template-columns: minmax(165px, 190px) minmax(0, 1fr);
    align-items: center;
  }

  .dashboard-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }
}

@media (min-width: 1040px) {
  .cards-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}


.table-wrap {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  position: relative;
}

.table-wrap-filters {
  min-height: 320px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.table th,
.table td {
  padding: 10px 12px;
  border-bottom: 1px solid #e7edf2;
  text-align: left;
  font-size: 0.95rem;
}

.table th {
  color: #415260;
  font-weight: 700;
  vertical-align: top;
}

.table tbody tr:hover {
  background: #f8fbfd;
}

.table-excel .th-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.table-excel .th-head > a {
  font-weight: 700;
}

.pricing-precios-table tbody tr:nth-child(odd) {
  background: rgba(255, 255, 255, 0.88);
}

.pricing-precios-table tbody tr:nth-child(even) {
  background: #eef7ff;
}

.pricing-precios-table tbody tr:hover {
  background: #deefff;
}

.table-listado-scroll {
  --table-scroll-max-height: clamp(560px, calc(100vh - 180px), 820px);
  max-height: var(--table-scroll-max-height);
  min-height: 560px;
  overflow-y: auto;
  overflow-x: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.table-wrap-filters.table-listado-scroll {
  min-height: 600px;
}

.table-sticky-grid thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #f7fbfe;
  box-shadow: inset 0 -1px 0 #dce4eb;
}

.table-sticky-grid .table-col-acciones {
  position: sticky;
  right: 0;
  z-index: 2;
  min-width: 84px;
  text-align: center;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: -10px 0 14px rgba(15, 77, 102, 0.08);
}

.table-sticky-grid thead .table-col-acciones {
  background: #f7fbfe;
  z-index: 5;
}

.table-sticky-grid tbody tr:nth-child(odd) .table-col-acciones {
  background: rgba(255, 255, 255, 0.88);
}

.table-sticky-grid tbody tr:nth-child(even) .table-col-acciones {
  background: #f6fbff;
}

.table-sticky-grid tbody tr:hover .table-col-acciones {
  background: #deefff;
}

.table-col-acciones .table-actions,
.table-col-acciones .table-actions-inline,
.table-col-acciones .actions-row {
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
  margin: 0;
}

.table-col-acciones .inline-form,
.table-col-acciones form {
  margin: 0;
}

.pricing-manual-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
}

.pricing-precios-table .pricing-manual-chip-yes {
  background: #dff5e8;
  color: #155f35;
  border: 1px solid #7fc49b;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.th-menu {
  position: relative;
}

.th-menu summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: #415260;
  border: 1px solid #d5dde4;
  border-radius: 8px;
  padding: 2px 6px;
  line-height: 1.1;
  user-select: none;
}

.th-menu summary::-webkit-details-marker {
  display: none;
}

.th-menu[open] summary {
  background: #edf3f7;
}

.th-menu.th-menu-filtered summary {
  border-color: #7bb8dc;
  background: #dff1fb;
  color: #0f4d66;
  font-weight: 700;
}

.th-menu.th-menu-filtered[open] summary {
  background: #cfe9f8;
}

.th-menu-panel {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  min-width: 230px;
  max-width: 280px;
  background: #fff;
  border: 1px solid #dce4eb;
  border-radius: 10px;
  box-shadow: 0 12px 28px rgba(18, 31, 43, 0.12);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.th-menu-left .th-menu-panel {
  left: 0;
  right: auto;
}


.th-menu-panel a {
  font-size: 0.86rem;
  color: #24465a;
}

.th-menu-panel label {
  font-size: 0.8rem;
  color: #526573;
  font-weight: 600;
}

.th-menu-panel input,
.th-menu-panel select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 0.86rem;
}

.th-menu-panel .th-menu-multi-select {
  min-height: 148px;
  padding: 6px;
  background: #fbfdff;
}

.th-menu-panel .th-menu-multi-select option {
  padding: 4px 6px;
  border-radius: 6px;
}

.th-menu-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.cards-grid-cotizaciones {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 18px;
}

.cotizacion-card h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 4px;
}

.kicker {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #546877;
  font-weight: 700;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.badge-ok {
  background: #e8f6ee;
  color: #1f6b42;
}

.badge-muted {
  background: #edf2f6;
  color: #4d6271;
}

.card-actions {
  margin-top: 6px;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.table-actions .inline-form {
  display: inline-flex;
  margin: 0;
  flex: 0 0 auto;
}

.table-actions > * {
  flex: 0 0 auto;
}

.table-action-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid #c6dceb;
  background: #e9f3fa;
  color: #0f4d66;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  padding: 0;
}

.table-action-edit {
  font-size: 1rem;
}

.table-action-edit:hover {
  background: #dbeef9;
}

.table-action-view {
  font-size: 1rem;
}

.table-action-view:hover {
  background: #dbeef9;
}

.table-action-delete {
  border-color: #e5c5c5;
  background: #faecec;
  color: #8c2f2f;
}

.table-action-delete:hover {
  background: #f6dddd;
}

.table-action-toggle {
  height: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
}

.table-actions-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.table-actions-inline form {
  margin: 0;
  display: inline-flex;
}

.input-qty-inline {
  width: 84px;
}

.caja-shell {
  display: grid;
  gap: 14px;
}

.caja-postventa {
  display: grid;
  gap: 18px;
  padding: 22px 24px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.85), transparent 34%),
    linear-gradient(135deg, #dff5e6 0%, #eefaf1 52%, #f8fdf9 100%);
  border: 1px solid #bfe3cb;
  box-shadow: 0 18px 36px rgba(16, 63, 87, 0.08);
}

.caja-postventa-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #1f6f46;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.caja-postventa h1 {
  margin: 0 0 8px;
  color: #103f57;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

.caja-postventa p {
  margin: 0;
  max-width: 680px;
  color: #33505f;
}

.caja-postventa-resumen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin: 0;
}

.caja-postventa-resumen div {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(191, 227, 203, 0.9);
}

.caja-postventa-resumen dt {
  margin-bottom: 6px;
  color: #53707c;
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.caja-postventa-resumen dd {
  margin: 0;
  color: #103f57;
  font-size: 1.3rem;
  font-weight: 800;
}

.caja-state {
  display: grid;
  gap: 14px;
}

.caja-state > * {
  min-width: 0;
}

.caja-grid {
  display: grid;
  gap: 14px;
}

.caja-col {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.caja-card {
  border: 1px solid #dbe4ea;
  box-shadow: 0 8px 22px rgba(18, 31, 43, 0.08);
}

.caja-card-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}

.caja-card-head p {
  color: #5a6c79;
  font-size: 0.9rem;
}

.caja-form {
  margin-bottom: 12px;
}

.caja-buscador-avanzado {
  border: 1px solid #d6e1e8;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 12px;
  background: #f8fbfd;
}

.caja-buscador-avanzado summary {
  cursor: pointer;
  font-weight: 700;
  color: #1d4459;
  margin-bottom: 8px;
}

.caja-filtro-form {
  margin-top: 10px;
}

.caja-busqueda-resultados {
  margin-top: 10px;
}

.caja-table-resultados {
  min-width: 760px;
}

.caja-total-principal {
  border: 1px solid #cfe0ea;
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(180deg, #f6fbff 0%, #eef6fb 100%);
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.caja-total-principal span {
  color: #3e5a6d;
  font-weight: 600;
}

.caja-total-principal strong {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: #103f57;
}

.caja-totales-lista {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.caja-totales-lista div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #2e3f4b;
}

.caja-totales-lista dt {
  font-weight: 700;
}

.caja-totales-lista dd {
  margin: 0;
}

.caja-combos-resumen {
  margin: 0 0 12px;
  border: 1px solid #d6e9f4;
  border-radius: 10px;
  background: #f4faff;
  padding: 10px 12px;
}

.caja-combos-resumen strong {
  color: #0f4d66;
}

.caja-combos-resumen ul {
  margin: 6px 0 0;
  padding-left: 18px;
  color: #31586d;
}

.caja-items-wrap {
  display: grid;
  min-width: 0;
}

.caja-table-wrap {
  overflow-x: auto;
}

.caja-table {
  min-width: 900px;
}

.caja-inline-form {
  display: flex;
  align-items: center;
  gap: 8px;
}

.caja-qty-input {
  width: 88px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 8px;
}

.caja-meta {
  color: #5a6c79;
}

.caja-qty-static {
  display: inline-flex;
  min-width: 48px;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: #edf4f7;
  color: #103f57;
  font-weight: 700;
}

.caja-badge-lock {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef5ec;
  color: #2f6542;
  font-weight: 700;
}

.caja-mensajes {
  display: grid;
  gap: 8px;
}

.caja-alert {
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid transparent;
}

.caja-alert p {
  margin: 0;
}

.caja-alert-error {
  background: #fff1f1;
  border-color: #e8c4c4;
  color: #6e2e2e;
}

.caja-toast {
  justify-self: end;
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid transparent;
  font-weight: 600;
}

.caja-toast-success {
  background: #e9f8ee;
  border-color: #bfe3cb;
  color: #226342;
}

.caja-toast-error {
  background: #fff1f1;
  border-color: #e8c4c4;
  color: #6e2e2e;
}

.caja-inline-feedback {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  box-shadow: 0 8px 18px rgba(18, 31, 43, 0.06);
}

.caja-inline-feedback-success {
  background: linear-gradient(135deg, #edf8ef 0%, #f7fcf8 100%);
  border-color: #c9e7d1;
  color: #22543a;
}

.caja-inline-feedback-error {
  background: linear-gradient(135deg, #fff3f3 0%, #fffafa 100%);
  border-color: #efc8c8;
  color: #7c2f2f;
}

.caja-inline-feedback-title {
  display: block;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.caja-inline-feedback-text {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.45;
}

.caja-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid transparent;
}

.caja-status strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
}

.caja-status p {
  margin: 0;
  color: #33505f;
}

.caja-status-success {
  background: linear-gradient(135deg, #edf8ef 0%, #f6fcf7 100%);
  border-color: #c9e7d1;
}

.caja-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 10px 14px;
  border-radius: 999px;
  background: #1f6f46;
  color: #fff;
  font-weight: 700;
}

.caja-status-note {
  margin-bottom: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #f3f6f8;
  border: 1px solid #d8e2e8;
}

.caja-status-note strong {
  display: block;
  margin-bottom: 4px;
  color: #103f57;
}

.caja-status-note p {
  margin: 0;
  color: #49626f;
}

.devoluciones-grid-detalle {
  margin-top: 12px;
}

.historial-shell {
  display: grid;
  gap: 18px;
}

.historial-card {
  border: 1px solid #dbe4ea;
  box-shadow: 0 10px 24px rgba(18, 31, 43, 0.06);
}

.historial-filtros {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}

.historial-table {
  min-width: 880px;
}

.historial-table-detalle {
  min-width: 1120px;
}

.historial-resumen-grid {
  display: grid;
  gap: 18px;
}

.historial-dl {
  display: grid;
  gap: 12px;
  margin: 0;
}

.historial-dl div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #edf1f4;
}

.historial-dl dt {
  font-weight: 700;
  color: #49626f;
}

.historial-dl dd {
  margin: 0;
  color: #103f57;
  text-align: right;
}

.historial-devolucion-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.historial-devolucion-item {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid #dbe4ea;
  background: #fbfdff;
}

.historial-devolucion-item p {
  margin: 4px 0 0;
  color: #58707d;
}

.historial-devolucion-meta {
  display: flex;
  gap: 14px;
  margin: 10px 0;
  color: #355363;
  font-size: 0.92rem;
  font-weight: 600;
}

.historial-devoluciones-lista {
  display: grid;
  gap: 12px;
}

.reportes-shell {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.reportes-shell > *,
.reportes-shell .finanzas-resumen-grid,
.reportes-shell .reportes-card,
.reportes-shell .table-wrap,
.reportes-shell .table-listado-scroll {
  min-width: 0;
}

.reportes-home-shell {
  gap: 22px;
}

.reportes-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.reportes-tabs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.reportes-card {
  border: 1px solid #dbe4ea;
  box-shadow: 0 10px 24px rgba(18, 31, 43, 0.06);
  overflow: hidden;
}

.reportes-filtros {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}

.reportes-error {
  margin-top: 14px;
}

.reportes-grid {
  display: grid;
  gap: 16px;
}

.reportes-diario-insights-grid {
  display: grid;
  gap: 16px;
}

.reportes-bars-chart {
  min-height: 220px;
}

.reportes-bars-item {
  grid-template-columns: minmax(96px, 132px) 1fr minmax(44px, auto);
}

.reportes-bars-label,
.reportes-bars-value {
  font-size: 0.76rem;
}

.reportes-bars-label {
  text-align: left;
}

.reportes-bars-value {
  text-align: right;
}

.reportes-kpi {
  display: grid;
  gap: 8px;
}

.reportes-kpi strong {
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: #103f57;
}

.reportes-kpi p {
  color: #526573;
}

.reportes-ventas-ingresos-card {
  align-content: center;
  justify-items: center;
  text-align: center;
}

.reportes-ventas-ingresos-lines {
  width: min(88%, 260px);
  display: grid;
  gap: 14px;
}

.reportes-ventas-ingresos-line {
  display: grid;
  gap: 4px;
}

.reportes-ventas-ingresos-line span {
  color: #5a6b79;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.reportes-ventas-ingresos-line strong {
  color: #21313f;
  font-size: clamp(1.2rem, 2.1vw, 1.7rem);
  line-height: 1.1;
}

.reportes-table {
  min-width: 1080px;
}

.reportes-table-mensual {
  min-width: 1220px;
}

.reportes-table tbody tr:nth-child(odd) {
  background: #ffffff;
}

.reportes-table tbody tr:nth-child(even) {
  background: #f3faff;
}

.reportes-table tbody tr:hover {
  background: #eaf6ff;
}

.reportes-money-negative {
  color: #b42318;
  font-weight: 600;
}

.reportes-home-grid {
  display: grid;
  gap: 16px;
}

.reportes-bubble {
  display: grid;
  gap: 12px;
  padding: 22px;
}

.reportes-bubble h2 {
  margin: 0;
  font-size: 1.35rem;
  color: #103f57;
}

.reportes-bubble p {
  margin: 0;
  color: #526573;
}

.reportes-bubble-principal {
  border: 1px solid #a9d8f7;
  box-shadow: 0 16px 30px rgba(18, 31, 43, 0.1);
  background: linear-gradient(140deg, #f4fbff 0%, #ffffff 100%);
}

.reportes-bubble-disabled {
  opacity: 0.92;
  background: #f8fafc;
}

.btn-disabled {
  pointer-events: none;
  opacity: 0.6;
}

@media (min-width: 940px) {
  .caja-grid {
    grid-template-columns: 1.45fr 1fr;
    align-items: start;
  }

  .devoluciones-grid-detalle {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

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

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

  .reportes-diario-insights-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .reportes-home-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
  }
}
/* Social hero: pantalla principal de redes */
.social-hero {
  min-height: calc(100vh - 74px);
  display: grid;
  align-items: center;
  padding: 48px 0;
}

.social-hero-inner {
  display: grid;
  justify-items: center;
  gap: 28px;
  text-align: center;
}

.social-hero-copy h1 {
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: 0.9;
  letter-spacing: -0.07em;
  margin-bottom: 14px;
}

.social-hero-copy p {
  max-width: 520px;
  color: #425462;
  font-size: clamp(1rem, 2.2vw, 1.25rem);
}

.social-hero-icons {
  width: min(780px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 3vw, 28px);
  margin-top: 8px;
}

/* Botones grandes */
.social-big-link {
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border-radius: clamp(24px, 4vw, 42px);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 24px 60px rgba(18, 31, 43, 0.09);
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.social-big-link:hover {
  transform: translateY(-6px);
  background: #fff;
  box-shadow: 0 30px 70px rgba(18, 31, 43, 0.14);
}

/* Máscara base para pintar SVG con color CSS */
.social-icon-mask {
  width: clamp(46px, 8vw, 92px);
  height: clamp(46px, 8vw, 92px);
  display: block;
  background: currentColor;
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}

/* Archivos SVG */
.icon-instagram {
  mask-image: url("/static/icons/instagram.svg");
  -webkit-mask-image: url("/static/icons/instagram.svg");
}

.icon-facebook {
  mask-image: url("/static/icons/facebook.svg");
  -webkit-mask-image: url("/static/icons/facebook.svg");
}

.icon-tiktok {
  mask-image: url("/static/icons/tiktok.svg");
  -webkit-mask-image: url("/static/icons/tiktok.svg");
}

/* Colores de marca */
.social-big-link.instagram {
  color: #e1306c;
}

.social-big-link.facebook {
  color: #1877f2;
}

.social-big-link.tiktok {
  color: #111111;
}

/* Horario */
.social-hero-meta {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 12px 32px rgba(18, 31, 43, 0.06);
}

.social-hero-meta span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.social-hero-meta strong {
  color: #103f57;
  font-size: 0.98rem;
}

.private-note a {
  color: var(--primary);
  font-weight: 800;
}

/* Responsive */
@media (max-width: 639px) {
  #merma-estado,
  #merma-estado > section,
  #merma-estado .caja-col,
  #merma-captura,
  .historial-card,
  .historial-card .page-head {
    min-width: 0;
  }

  #merma-estado .table-wrap,
  #merma-estado .caja-table-wrap,
  .historial-card .table-wrap,
  .historial-card .table-wrap-filters {
    max-width: 100%;
  }

  .container,
  .card,
  .auth-card,
  .caja-shell,
  .caja-state,
  .caja-col,
  .caja-items-wrap,
  .reportes-shell,
  .reportes-home-shell,
  .reportes-home-grid,
  .reportes-grid,
  .historial-shell,
  .historial-resumen-grid,
  .devoluciones-grid-detalle,
  .table-wrap,
  .caja-table-wrap {
    min-width: 0;
  }

  .table-wrap,
  .caja-table-wrap {
    max-width: 100%;
  }

  .nav-wrap-private {
    align-items: flex-start;
    gap: 10px;
  }

  .brand {
    width: 100%;
  }

  .account-menu {
    order: 2;
    width: 100%;
    margin-left: 0;
    display: flex;
    justify-content: flex-end;
  }

  .private-nav-groups {
    order: 3;
    width: 100%;
    flex: 1 1 100%;
    margin-top: 2px;
    display: grid;
    gap: 8px;
  }

  .private-nav-home,
  .private-nav-dropdown,
  .private-nav-dropdown summary {
    width: 100%;
  }

  .private-nav-dropdown summary {
    justify-content: space-between;
  }

  .private-nav-panel {
    left: 0;
    right: 0;
    width: 100%;
    min-width: 0;
  }

  .caja-card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .caja-status {
    flex-direction: column;
    align-items: flex-start;
  }

  .caja-status-badge {
    min-width: 0;
  }

  .caja-toast {
    justify-self: stretch;
  }

  .caja-inline-form {
    flex-wrap: wrap;
  }

  .caja-inline-form .caja-qty-input {
    width: 100%;
    max-width: 100%;
  }

  .caja-inline-form .btn {
    width: 100%;
  }

  .actions-row {
    flex-direction: column;
    align-items: stretch;
  }

  .actions-row > .btn,
  .actions-row > a.btn,
  .actions-row > button.btn {
    width: 100%;
  }

  .actions-row > form {
    width: 100%;
    margin: 0;
  }

  .actions-row > form .btn {
    width: 100%;
  }

  .summary-toolbar,
  .summary-toolbar-actions,
  .summary-filter-form {
    flex-direction: column;
    align-items: stretch;
  }

  .summary-picker,
  .summary-select,
  .summary-filter-submit {
    width: 100%;
  }

  .actions-row-compact-mobile {
    flex-direction: row;
    align-items: center;
  }

  .actions-row-compact-mobile > .btn,
  .actions-row-compact-mobile > a.btn,
  .actions-row-compact-mobile > button.btn,
  .actions-row-compact-mobile > form,
  .actions-row-compact-mobile > form .btn {
    width: auto;
  }

  .th-menu-actions {
    flex-direction: row;
    align-items: center;
  }

  .th-menu-actions .btn,
  .th-menu-actions a.btn,
  .th-menu-actions button.btn {
    width: auto;
  }

  .social-hero-icons {
    grid-template-columns: 1fr;
    width: min(280px, 80%);
  }

  .social-big-link {
    aspect-ratio: 2.8 / 1;
    border-radius: 28px;
  }

  .social-icon-mask {
    width: 42px;
    height: 42px;
  }

  .social-hero-meta {
    border-radius: 24px;
  }
}

.private-access {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--muted);
}

.private-access a {
  color: var(--muted);
  font-weight: 600;
  text-decoration: none;
  opacity: 0.72;
}

.private-access a:hover {
  color: var(--primary);
  opacity: 1;
}
