:root {
  --ps-primary: #0d9488;
  --ps-primary-dark: #0f766e;
  --ps-primary-light: #ccfbf1;
  --ps-sidebar: #1e293b;
  --ps-sidebar-hover: #334155;
  --ps-sidebar-active: #0d9488;
  --ps-bg: #f1f5f9;
  --ps-surface: #ffffff;
  --ps-border: #e2e8f0;
  --ps-text: #0f172a;
  --ps-text-muted: #64748b;
  --ps-success: #059669;
  --ps-danger: #dc2626;
  --ps-warning: #d97706;
  --ps-radius: 10px;
  --ps-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  --ps-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.1);
  --sidebar-width: 240px;
}

* { box-sizing: border-box; }

html { font-size: 15px; }

@media (min-width: 992px) {
  html { font-size: 16px; }
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ps-text);
  background: var(--ps-bg);
}

/* —— App shell —— */
.app-shell {
  display: flex;
  min-height: 100vh;
  max-width: 100%;
  overflow-x: hidden;
}

.app-sidebar {
  width: var(--sidebar-width);
  background: var(--ps-sidebar);
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 1040;
  transition: transform 0.25s ease;
}

.app-sidebar-brand {
  padding: 1.1rem 1.25rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  letter-spacing: -0.02em;
}

.app-sidebar-brand span { color: #5eead4; }

.app-nav {
  flex: 1;
  padding: 0.75rem 0.65rem;
  overflow-y: auto;
}

.app-nav-section {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  padding: 0.5rem 0.75rem 0.35rem;
  margin-top: 0.5rem;
}

.app-nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.9rem;
  margin-bottom: 2px;
  transition: background 0.15s, color 0.15s;
}

.app-nav-link:hover {
  background: var(--ps-sidebar-hover);
  color: #fff;
}

.app-nav-link.active {
  background: var(--ps-sidebar-active);
  color: #fff;
  font-weight: 600;
}

.app-nav-icon {
  width: 1.25rem;
  flex-shrink: 0;
  font-size: 1.15rem !important;
  line-height: 1;
  color: #94a3b8;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.app-nav-link:hover .app-nav-icon,
.app-nav-link.active .app-nav-icon {
  color: #fff;
}

.app-sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.app-user {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-bottom: 0.5rem;
  word-break: break-all;
}

.app-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  max-width: 100%;
}

.app-topbar {
  background: var(--ps-surface);
  border-bottom: 1px solid var(--ps-border);
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 1020;
}

.app-topbar-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ps-text-muted);
  margin: 0;
}

.sidebar-toggle {
  display: none;
  border: 1px solid var(--ps-border);
  background: var(--ps-surface);
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
}

.app-content {
  flex: 1;
  padding: 1.25rem;
  max-width: 1400px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  min-width: 0;
  overflow-x: hidden;
}

@media (max-width: 575.98px) {
  .app-content {
    padding: 0.85rem;
  }
}

/* Mobile sidebar */
@media (max-width: 991.98px) {
  .app-sidebar {
    transform: translateX(-100%);
  }
  .app-sidebar.open {
    transform: translateX(0);
    box-shadow: var(--ps-shadow-md);
  }
  .app-main { margin-left: 0; }
  .sidebar-toggle { display: inline-block; }
  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.4);
    z-index: 1035;
  }
  .sidebar-backdrop.show { display: block; }
}

/* —— Page header —— */
.page-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.page-header h1 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.2rem;
  letter-spacing: -0.02em;
}

.page-header .subtitle {
  color: var(--ps-text-muted);
  font-size: 0.85rem;
  margin: 0;
}

.page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* —— Cards —— */
.card-app {
  background: var(--ps-surface);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius);
  box-shadow: var(--ps-shadow);
  max-width: 100%;
  min-width: 0;
}

.card-app .card-header {
  background: transparent;
  border-bottom: 1px solid var(--ps-border);
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.card-app .card-body { padding: 1rem; }

.stat-card {
  padding: 1rem;
  border-radius: var(--ps-radius);
  background: var(--ps-surface);
  border: 1px solid var(--ps-border);
  box-shadow: var(--ps-shadow);
  height: 100%;
}

.stat-card .stat-label {
  font-size: 0.75rem;
  color: var(--ps-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 0.25rem;
}

.stat-card.stat-success .stat-value { color: var(--ps-success); }
.stat-card.stat-danger .stat-value { color: var(--ps-danger); }
.stat-card.stat-primary .stat-value { color: var(--ps-primary); }

/* —— Buttons —— */
.btn-primary {
  background: var(--ps-primary);
  border-color: var(--ps-primary);
}
.btn-primary:hover, .btn-primary:focus {
  background: var(--ps-primary-dark);
  border-color: var(--ps-primary-dark);
}

.btn-outline-primary {
  color: var(--ps-primary);
  border-color: var(--ps-primary);
}
.btn-outline-primary:hover {
  background: var(--ps-primary);
  border-color: var(--ps-primary);
}

.btn-sm { font-size: 0.8rem; padding: 0.3rem 0.65rem; }

/* —— Tables —— */
.table-responsive {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.table-app {
  margin: 0;
  font-size: 0.875rem;
  min-width: 36rem;
  width: 100%;
}

.table-app thead th {
  background: #f8fafc;
  border-bottom: 1px solid var(--ps-border);
  color: var(--ps-text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.6rem 0.75rem;
  white-space: nowrap;
}

.table-app tbody td {
  padding: 0.65rem 0.75rem;
  vertical-align: middle;
  border-color: var(--ps-border);
}

.table-app tbody tr:hover { background: #f8fafc; }

/* —— Pedido detalle (responsive) —— */
.app-content-pedido-detalle {
  max-width: 100%;
  overflow-x: hidden;
}

.app-content-pedido-detalle .pedido-detalle-heading {
  min-width: 0;
  flex: 0 1 auto;
}

.app-content-pedido-detalle .pedido-detalle-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
}

.app-content-pedido-detalle .page-actions {
  flex: 0 1 auto;
  max-width: 100%;
}

.app-content-pedido-detalle .pedido-detalle-stats .stat-card {
  min-width: 0;
  overflow: hidden;
}

.app-content-pedido-detalle .stat-value-money {
  font-size: clamp(0.95rem, 3.2vw, 1.2rem);
  word-break: break-word;
  overflow-wrap: anywhere;
}

.app-content-pedido-detalle .pedido-detalle-lineas {
  overflow: hidden;
}

.app-content-pedido-detalle .pedido-lineas-scroll {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.app-content-pedido-detalle .pedido-lineas-scroll .table-app {
  min-width: 40rem;
}

.app-content-pedido-detalle .pedido-lineas-scroll .table-app tbody td:first-child {
  max-width: 14rem;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

@media (max-width: 575.98px) {
  .app-content-pedido-detalle .page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .app-content-pedido-detalle .page-actions {
    width: 100%;
  }

  .app-content-pedido-detalle .page-actions .btn,
  .app-content-pedido-detalle .page-actions form {
    flex: 1 1 auto;
  }

  .app-content-pedido-detalle .page-actions form .btn {
    width: 100%;
  }

  .app-content-pedido-detalle .pedido-detalle-stats .stat-card {
    padding: 0.75rem;
  }

  .app-content-pedido-detalle .pedido-detalle-stats .stat-value:not(.stat-value-money) {
    font-size: 1.35rem;
  }
}

/* —— Clientes filtros —— */
.clientes-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.clientes-filters .form-control {
  flex: 1 1 12rem;
  min-width: 0;
}

.clientes-maps-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ps-primary);
  text-decoration: none;
  border-radius: 6px;
  padding: 0.15rem;
  line-height: 1;
}

.clientes-maps-link:hover {
  color: var(--ps-primary-dark);
  background: var(--ps-primary-light);
}

.clientes-maps-link .material-symbols-outlined {
  font-size: 1.35rem;
}

/* —— Clientes paginador —— */
.clientes-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem 1.25rem;
  padding: 0.55rem 1rem;
  border-top: 1px solid var(--ps-border);
  color: var(--ps-text-muted);
  font-size: 0.8rem;
}

.clientes-perpage {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-size: inherit;
  color: inherit;
  white-space: nowrap;
}

.clientes-perpage-select {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M3 4.5L6 8l3-3.5'/%3E%3C/svg%3E")
    no-repeat right 0.1rem center;
  padding: 0.15rem 1.1rem 0.15rem 0.2rem;
  font: inherit;
  font-weight: 600;
  color: var(--ps-text);
  cursor: pointer;
  line-height: 1.2;
}

.clientes-perpage-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.2);
  border-radius: 4px;
}

.clientes-pager-info {
  margin: 0;
  font-size: inherit;
  color: inherit;
  white-space: nowrap;
}

.clientes-pager-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
}

.clientes-pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--ps-text-muted);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}

.clientes-pager-btn:hover:not(:disabled) {
  background: #f1f5f9;
  color: var(--ps-text);
}

.clientes-pager-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.clientes-empty-filtro {
  padding: 1.25rem 1rem;
  text-align: center;
  color: var(--ps-text-muted);
  font-size: 0.9rem;
}

@media (max-width: 575.98px) {
  .clientes-pager {
    justify-content: center;
    gap: 0.65rem 1rem;
  }
}

/* —— Ventas —— */
.ventas-filtro-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ps-text-muted);
}

.ventas-pedido-select {
  min-width: 9rem;
  font-weight: 600;
  color: var(--ps-text);
}

.ventas-cliente-link {
  color: var(--ps-text);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.ventas-cliente-link:hover,
.ventas-cliente-link:focus {
  color: var(--ps-primary-dark);
  border-bottom-color: var(--ps-primary);
  text-decoration: none;
}

.ventas-cliente-link:focus-visible {
  outline: 2px solid rgba(13, 148, 136, 0.35);
  outline-offset: 2px;
  border-radius: 2px;
}

#ventasKpis .stat-value-money {
  font-size: clamp(0.95rem, 3.2vw, 1.2rem);
}

/* —— Badges —— */
.badge-estado {
  font-weight: 500;
  font-size: 0.72rem;
  padding: 0.3em 0.55em;
  border-radius: 6px;
}

.badge-abierto { background: #dbeafe; color: #1d4ed8; }
.badge-completado { background: #d1fae5; color: #047857; }
.badge-enviado { background: #e0e7ff; color: #4338ca; }
.badge-default { background: #f1f5f9; color: #475569; }
.badge-especial { background: #fef3c7; color: #b45309; }
.badge-success { background: #d1fae5; color: #047857; }

/* —— Forms —— */
.form-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ps-text);
  margin-bottom: 0.3rem;
}

.form-control, .form-select {
  border-radius: 8px;
  border-color: var(--ps-border);
  font-size: 0.875rem;
  padding: 0.45rem 0.75rem;
}

.form-control:focus, .form-select:focus {
  border-color: var(--ps-primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.form-hint {
  font-size: 0.75rem;
  color: var(--ps-text-muted);
  margin-top: 0.25rem;
}

/* —— Alerts —— */
.alert {
  border-radius: var(--ps-radius);
  font-size: 0.875rem;
  border: none;
}

/* —— Login (dark) —— */
.login-body {
  margin: 0;
  font-family: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  --login-bg: #0f172a;
  --login-card: #1e293b;
  --login-card-border: rgba(148, 163, 184, 0.12);
  --login-text: #f1f5f9;
  --login-text-muted: #94a3b8;
  --login-input-bg: #0f172a;
  --login-input-border: rgba(148, 163, 184, 0.18);
  --login-input-border-hover: rgba(148, 163, 184, 0.32);
  --login-icon: #64748b;
  --login-mark-bg: linear-gradient(145deg, rgba(13, 148, 136, 0.22) 0%, rgba(15, 118, 110, 0.12) 100%);
  --login-mark-border: rgba(13, 148, 136, 0.28);
  --login-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  --login-alert-bg: rgba(220, 38, 38, 0.12);
  --login-alert-border: rgba(248, 113, 113, 0.25);
  --login-alert-text: #fca5a5;
  --login-toggle-hover: rgba(148, 163, 184, 0.1);
  --login-checkbox-bg: #0f172a;
  --login-checkbox-border: rgba(148, 163, 184, 0.35);
  --login-status-danger-bg: rgba(220, 38, 38, 0.12);
  --login-status-danger-border: rgba(248, 113, 113, 0.25);
  color: var(--login-text);
  background: var(--login-bg);
  color-scheme: dark;
}

.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  background:
    radial-gradient(ellipse 90% 60% at 50% -15%, rgba(13, 148, 136, 0.2) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(30, 41, 59, 0.6) 0%, transparent 50%),
    var(--login-bg);
}

.login-shell {
  width: 100%;
  max-width: 22.5rem;
  animation: login-enter 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes login-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-card {
  background: var(--login-card);
  border: 1px solid var(--login-card-border);
  border-radius: 16px;
  box-shadow: var(--login-shadow);
  padding: 1.65rem 1.35rem 1.5rem;
}

.login-card--status {
  text-align: center;
  padding: 1.75rem 1.35rem 1.5rem;
}

.login-header {
  text-align: center;
  margin-bottom: 1.35rem;
}

.login-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.75rem;
  border-radius: 12px;
  background: var(--login-mark-bg);
  border: 1px solid var(--login-mark-border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06) inset;
}

.login-mark img {
  display: block;
  width: 1.65rem;
  height: 1.65rem;
}

.login-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1.2;
  color: var(--login-text);
}

.login-title span {
  color: #5eead4;
}

.login-title--sm {
  font-size: 1.1rem;
  margin-top: 0.75rem;
}

.login-subtitle {
  color: var(--login-text-muted);
  font-size: 0.8125rem;
  margin: 0.35rem 0 0;
  line-height: 1.4;
}

.login-subtitle--center {
  margin-bottom: 1.25rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.login-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  background: var(--login-alert-bg);
  border: 1px solid var(--login-alert-border);
  font-size: 0.8125rem;
  color: var(--login-alert-text);
  line-height: 1.4;
}

.login-alert-icon {
  font-size: 1.1rem !important;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.login-alert ul {
  margin: 0;
  padding-left: 1rem;
}

.login-alert li {
  margin: 0;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.login-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--login-text);
  letter-spacing: 0.01em;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input-icon {
  position: absolute;
  left: 0.7rem;
  font-size: 1.15rem !important;
  color: var(--login-icon);
  pointer-events: none;
  transition: color 0.15s;
}

.login-input {
  width: 100%;
  min-height: 2.625rem;
  padding: 0.45rem 2.5rem 0.45rem 2.45rem;
  border: 1px solid var(--login-input-border);
  border-radius: 10px;
  background: var(--login-input-bg);
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--login-text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.login-input::placeholder {
  color: #64748b;
}

.login-input:hover {
  border-color: var(--login-input-border-hover);
}

.login-input:focus {
  outline: none;
  border-color: var(--ps-primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.22);
}

.login-input-wrap:focus-within .login-input-icon {
  color: #5eead4;
}

.login-input-password {
  padding-right: 2.75rem;
}

.login-toggle-pwd {
  position: absolute;
  right: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--login-icon);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.login-toggle-pwd:hover {
  color: var(--login-text-muted);
  background: var(--login-toggle-hover);
}

.login-toggle-pwd .material-symbols-outlined {
  font-size: 1.15rem !important;
}

.login-error {
  font-size: 0.75rem;
  color: #f87171;
  line-height: 1.3;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -0.15rem;
}

.login-remember {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  margin: 0;
}

.login-remember-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.login-remember-box {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  border: 1.5px solid var(--login-checkbox-border);
  border-radius: 4px;
  background: var(--login-checkbox-bg);
  transition: background 0.15s, border-color 0.15s;
  position: relative;
}

.login-remember-box::after {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.05rem;
  width: 0.3rem;
  height: 0.55rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.12s ease;
}

.login-remember-input:checked + .login-remember-box {
  background: var(--ps-primary);
  border-color: var(--ps-primary);
}

.login-remember-input:checked + .login-remember-box::after {
  transform: rotate(45deg) scale(1);
}

.login-remember-input:focus-visible + .login-remember-box {
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.35);
}

.login-remember-text {
  font-size: 0.8125rem;
  color: var(--login-text-muted);
}

.login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  width: 100%;
  min-height: 2.75rem;
  margin-top: 0.15rem;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 10px;
  background: var(--ps-primary);
  color: #fff;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.35);
}

.login-submit:hover {
  background: var(--ps-primary-dark);
  color: #fff;
}

.login-submit:active {
  transform: scale(0.985);
}

.login-submit:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.45);
}

.login-submit-icon {
  font-size: 1.15rem !important;
  transition: transform 0.15s;
}

.login-submit:hover .login-submit-icon {
  transform: translateX(2px);
}

.login-submit--link:hover .login-submit-icon {
  transform: translateX(-2px);
}

.login-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  margin: 0 auto;
}

.login-status-icon--danger {
  background: var(--login-status-danger-bg);
  color: #f87171;
  border: 1px solid var(--login-status-danger-border);
}

.login-status-icon .material-symbols-outlined {
  font-size: 1.5rem !important;
}

.login-body .ps-loading-box {
  background: var(--login-card);
  border: 1px solid var(--login-card-border);
  color: var(--login-text);
}

.login-body .ps-loading-text {
  color: var(--login-text);
}

@media (min-width: 480px) {
  .login-card {
    padding: 1.85rem 1.5rem 1.65rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .login-shell {
    animation: none;
  }

  .login-submit:active {
    transform: none;
  }

  .login-submit:hover .login-submit-icon,
  .login-submit--link:hover .login-submit-icon {
    transform: none;
  }
}

/* —— Proveedor surtido (tabla en card, ancho amplio) —— */
.app-content-proveedor {
  padding: 0.7rem 0.9rem 1.25rem !important;
  max-width: 920px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  font-size: 15px;
}

@media (min-width: 400px) {
  .app-content-proveedor { font-size: 15.5px; }
}

.proveedor-page {
  padding-bottom: 0.5rem;
}

.prov-summary {
  background: var(--ps-surface);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius);
  padding: 0.75rem 1rem;
  margin-bottom: 0.65rem;
  box-shadow: var(--ps-shadow);
}

.prov-summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.prov-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}

.prov-badge-pend {
  font-size: 0.82rem;
  font-weight: 600;
  color: #b45309;
  background: #fffbeb;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
}

.prov-progress {
  height: 6px;
  background: #e2e8f0;
  border-radius: 6px;
  margin: 0.55rem 0 0.4rem;
  overflow: hidden;
}

.prov-progress-bar {
  height: 100%;
  background: var(--ps-primary);
  border-radius: 6px;
}

.prov-summary-text {
  font-size: 0.88rem;
  color: var(--ps-text-muted);
  margin: 0;
}

.prov-filters {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.prov-filter {
  flex: 1;
  border: 1px solid var(--ps-border);
  background: var(--ps-surface);
  color: var(--ps-text-muted);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.48rem 0.35rem;
  border-radius: 8px;
  cursor: pointer;
}

.prov-filter.active {
  background: var(--ps-primary);
  border-color: var(--ps-primary);
  color: #fff;
}

.prov-filter-count { font-weight: 700; }

/* Panel de líneas dentro de una card */
.prov-board {
  background: var(--ps-surface);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius);
  box-shadow: var(--ps-shadow);
  overflow: hidden;
}

.prov-row {
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  gap: 0 0.5rem;
  align-items: center;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.94rem;
}

.prov-row:last-child { border-bottom: none; }

.prov-row-pendiente { border-left: 4px solid var(--ps-warning); padding-left: calc(0.65rem - 4px); }
.prov-row-comprada { border-left: 4px solid var(--ps-success); background: #fafffe; padding-left: calc(0.65rem - 4px); }
.prov-row-no-conseguido { border-left: 4px solid var(--ps-danger); background: #fffafa; padding-left: calc(0.65rem - 4px); }

.prov-row-num {
  font-size: 0.8rem;
  font-weight: 700;
  color: #94a3b8;
  text-align: center;
  line-height: 1;
}

.prov-row-body {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.prov-row-foto {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ps-primary);
  text-decoration: none;
  line-height: 1;
}

.prov-row-foto:hover { color: var(--ps-primary-dark); }

.prov-row-foto .material-symbols-outlined {
  font-size: 1.4rem;
}

.prov-row-cli {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ps-primary-dark);
  line-height: 1.2;
  padding-right: 1.75rem;
}

.prov-row-linea {
  margin: 0;
  line-height: 1.3;
  color: var(--ps-text);
}

.prov-row-prod {
  font-weight: 600;
}

.prov-row-bold {
  font-weight: 800;
  color: #0f172a;
}

.prov-row-obs {
  font-size: 0.8rem;
  color: var(--ps-text-muted);
  line-height: 1.25;
}

.prov-row-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.3rem;
}

.prov-row-form {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  width: 100%;
  min-width: 0;
}

.prov-input-precio {
  flex: 1;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--ps-border);
  border-radius: 7px;
  padding: 0.3rem 0.5rem;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: left;
  min-height: 2rem;
}

.prov-input-precio::placeholder {
  font-size: 0.78rem;
  font-weight: 400;
  color: #cbd5e1;
  opacity: 1;
}

.prov-input-precio:focus {
  outline: none;
  border-color: var(--ps-primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.prov-input-precio-ok {
  color: var(--ps-success);
  border-color: #a7f3d0;
  background: #f0fdf9;
}

.prov-btn-save {
  width: 2.4rem;
  height: 2rem;
  border: none;
  border-radius: 7px;
  background: var(--ps-primary);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
}

.prov-btn-save:hover { background: var(--ps-primary-dark); }

.prov-precio-ok {
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--ps-success);
}

.prov-precio-no {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ps-danger);
}

.prov-leyenda {
  font-size: 0.8rem;
  color: var(--ps-text-muted);
  text-align: center;
  margin: 0.55rem 0 0;
}

/* Finalizar pedido — card al final del listado */
.prov-finish {
  margin-top: 0.85rem;
  background: var(--ps-surface);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius);
  box-shadow: var(--ps-shadow);
  overflow: hidden;
}

.prov-finish-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.65rem 0.85rem;
  background: #f8fafc;
  border-bottom: 1px solid var(--ps-border);
}

.prov-finish-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ps-text);
}

.prov-finish-meta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ps-text-muted);
  background: #fff;
  border: 1px solid var(--ps-border);
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.prov-finish-form {
  padding: 0.75rem 0.85rem 0.85rem;
}

.prov-finish-body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

@media (min-width: 480px) {
  .prov-finish-body {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
  }
}

.prov-finish-field {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
}

.prov-finish-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ps-text-muted);
}

.prov-finish-input-wrap {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--ps-border);
  border-radius: 7px;
  background: #fff;
  overflow: hidden;
  min-height: 2rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.prov-finish-input-wrap:focus-within {
  border-color: var(--ps-primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.prov-finish-currency {
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ps-text-muted);
  background: #f8fafc;
  border-right: 1px solid var(--ps-border);
}

.prov-finish-input {
  flex: 1;
  min-width: 0;
  border: none;
  padding: 0.3rem 0.5rem;
  font-size: 0.92rem;
  font-weight: 700;
  min-height: 2rem;
  background: transparent;
}

.prov-finish-input::placeholder {
  font-size: 0.78rem;
  font-weight: 400;
  color: #cbd5e1;
  opacity: 1;
}

.prov-finish-input:focus {
  outline: none;
}

.prov-finish-btn {
  width: 100%;
  border: none;
  border-radius: 7px;
  background: var(--ps-primary-dark);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.3rem 1rem;
  min-height: 2rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

@media (min-width: 480px) {
  .prov-finish-btn {
    width: auto;
    flex-shrink: 0;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

.prov-finish-btn:hover { background: #115e59; }

.prov-finish-hint {
  margin: 0.55rem 0 0;
  font-size: 0.76rem;
  color: var(--ps-text-muted);
  text-align: center;
  line-height: 1.35;
}

.prov-empty {
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--ps-text-muted);
  font-size: 1rem;
  background: var(--ps-surface);
  border-radius: var(--ps-radius);
  border: 1px dashed var(--ps-border);
}

.prov-empty-success {
  background: #ecfdf5;
  border-color: #6ee7b7;
  color: #047857;
}

.swal2-popup {
  font-family: "Segoe UI", system-ui, sans-serif !important;
  border-radius: 12px !important;
}

/* —— Inventario / entregas —— */
.app-content-inventario {
  padding: 0.7rem 0.9rem 1.25rem !important;
  max-width: 960px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  font-size: 15px;
}

@media (min-width: 400px) {
  .app-content-inventario { font-size: 15.5px; }
}

.inv-page { padding-bottom: 0.5rem; }

.inv-summary {
  background: var(--ps-surface);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius);
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.65rem;
  box-shadow: var(--ps-shadow);
}

.inv-summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.inv-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
}

.inv-badge {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ps-primary-dark);
  background: var(--ps-primary-light);
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
}

.inv-summary-text {
  font-size: 0.84rem;
  color: var(--ps-text-muted);
  margin: 0.35rem 0 0;
}

.inv-board {
  background: var(--ps-surface);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius);
  box-shadow: var(--ps-shadow);
  overflow: hidden;
}

.inv-board-head,
.inv-row {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1.2fr) minmax(0, 1fr) 5.5rem;
  gap: 0 0.5rem;
  align-items: start;
  padding: 0.5rem 0.7rem;
}

.inv-board-head {
  background: #f8fafc;
  border-bottom: 1px solid var(--ps-border);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ps-text-muted);
  align-items: center;
}

.inv-row {
  border-bottom: 1px solid #f1f5f9;
  border-left: 4px solid var(--ps-primary);
  padding-left: calc(0.7rem - 4px);
}

.inv-row:last-child { border-bottom: none; }

.inv-row-num {
  font-size: 0.78rem;
  font-weight: 700;
  color: #94a3b8;
  text-align: center;
  padding-top: 0.15rem;
}

.inv-row-art {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0.1rem 0;
}

.inv-row-pedido {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ps-text-muted);
}

.inv-row-linea {
  margin: 0;
  line-height: 1.35;
}

.inv-row-prod { font-weight: 600; }
.inv-row-bold { font-weight: 800; color: #0f172a; }
.inv-row-qty {
  font-weight: 700;
  color: var(--ps-warning);
}

.inv-row-obs {
  font-size: 0.78rem;
  color: var(--ps-text-muted);
}

.inv-link-foto {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ps-primary-dark);
  text-decoration: none;
}

.inv-row-cli {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.1rem 0;
}

.inv-cli-nombre {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ps-primary-dark);
}

.inv-cli-dir {
  font-size: 0.76rem;
  color: var(--ps-text-muted);
  line-height: 1.3;
}

.inv-cli-maps {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ps-primary-dark);
  background: #ecfdf5;
  border: 1px solid #99f6e4;
  padding: 0.22rem 0.4rem;
  border-radius: 6px;
  text-decoration: none;
  width: fit-content;
}

.inv-cli-sin {
  font-size: 0.72rem;
  color: #94a3b8;
  font-style: italic;
}

.inv-row-actions {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: stretch;
}

.inv-btn {
  border: none;
  border-radius: 7px;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.38rem 0.35rem;
  cursor: pointer;
  text-align: center;
  min-height: 2rem;
  white-space: nowrap;
}

.inv-btn-cobrar {
  background: var(--ps-primary);
  color: #fff;
}

.inv-btn-cobrar:hover { background: var(--ps-primary-dark); }

.inv-btn-stock {
  background: #f8fafc;
  color: var(--ps-text-muted);
  border: 1px solid var(--ps-border);
}

.inv-btn-stock:hover {
  background: #f1f5f9;
  color: var(--ps-text);
}

.inv-form-stock { margin: 0; }

.inv-leyenda {
  font-size: 0.76rem;
  color: var(--ps-text-muted);
  text-align: center;
  margin: 0.55rem 0 0;
}

.inv-empty {
  text-align: center;
  padding: 1.25rem 1rem;
  color: var(--ps-text-muted);
  font-size: 0.9rem;
  background: var(--ps-surface);
  border-radius: var(--ps-radius);
  border: 1px dashed var(--ps-border);
}

.inv-empty strong { display: block; color: var(--ps-text); margin-bottom: 0.35rem; }

@media (max-width: 640px) {
  .inv-board-head,
  .inv-row {
    grid-template-columns: 1.75rem minmax(0, 1fr);
    grid-template-rows: auto auto;
  }

  .inv-col-cli,
  .inv-col-acc {
    grid-column: 2;
  }

  .inv-col-acc {
    flex-direction: row;
    margin-top: 0.35rem;
  }

  .inv-row-actions {
    flex-direction: row;
  }

  .inv-btn { flex: 1; }

  .inv-board-head .inv-col-cli,
  .inv-board-head .inv-col-acc { display: none; }
}

/* —— Catálogo público (editorial / streetwear 2025) —— */
.cat-body {
  --cat-bg: #f6f4ef;
  --cat-bg-tint: #edf5f1;
  --cat-surface: #ffffff;
  --cat-ink: #141414;
  --cat-muted: #5f6562;
  --cat-line: rgba(26, 92, 75, 0.1);
  --cat-accent: #1a5c4b;
  --cat-accent-soft: #e4f0eb;
  --cat-accent-glow: rgba(26, 92, 75, 0.12);
  --cat-warm: rgba(196, 120, 78, 0.07);
  --cat-font: "Outfit", system-ui, sans-serif;
  --cat-brand: "Plus Jakarta Sans", "Outfit", system-ui, sans-serif;
  --cat-display: "Outfit", system-ui, sans-serif;
  --cat-max: 1180px;
  --cat-ease: cubic-bezier(0.22, 1, 0.36, 1);

  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 70% 55% at 100% -5%, var(--cat-accent-glow) 0%, transparent 55%),
    radial-gradient(ellipse 55% 45% at -5% 100%, var(--cat-warm) 0%, transparent 50%),
    linear-gradient(180deg, var(--cat-bg-tint) 0%, var(--cat-bg) 42%, #f3f0ea 100%);
  color: var(--cat-ink);
  font-family: var(--cat-font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.cat-nav-logo {
  margin: 0;
  flex: 0 0 auto;
  width: auto;
  max-width: none;
  font-family: var(--cat-brand);
  font-weight: 800;
  font-size: clamp(2rem, 6.5vw, 2.65rem);
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--cat-accent);
  padding: 0;
  white-space: nowrap;
}

.cat-top {
  position: sticky;
  top: 0;
  z-index: 200;
  background: linear-gradient(
    180deg,
    rgba(228, 240, 235, 0.96) 0%,
    rgba(244, 242, 236, 0.92) 100%
  );
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(26, 92, 75, 0.12);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

/* Nav */
.cat-nav {
  padding: 0.85rem 1rem 0.55rem;
  padding-top: max(0.85rem, env(safe-area-inset-top));
  border-bottom: none;
  background: transparent;
  position: static;
}

.cat-nav-inner {
  max-width: var(--cat-max);
  margin: 0 auto;
}

.cat-nav-brand-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3.1rem;
  padding: 0.1rem 0;
}

.cat-nav-actions {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

@media (max-width: 380px) {
  .cat-nav-logo {
    font-size: 1.85rem;
    letter-spacing: 0.05em;
  }

  .cat-nav-count {
    font-size: 0.62rem;
    padding: 0.22rem 0.5rem;
  }
}

.cat-nav-count {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cat-accent);
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: var(--cat-accent-soft);
  border: 1px solid rgba(26, 92, 75, 0.14);
}

.cat-nav-btn {
  width: 2.125rem;
  height: 2.125rem;
  border: 1px solid rgba(26, 92, 75, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--cat-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  transition: transform 0.2s var(--cat-ease), background 0.2s;
}

.cat-nav-btn:hover {
  background: var(--cat-accent);
  color: #fff;
  border-color: var(--cat-accent);
}

/* Badge banner */
.cat-badge-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  max-width: var(--cat-max);
  margin: 0 auto;
  padding: 0 1rem 0.75rem;
  width: 100%;
}

.cat-badge-text {
  margin: 0;
  padding: 0.4rem 0.95rem;
  font-size: 0.72rem;
  line-height: 1.4;
  color: #3d5249;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(26, 92, 75, 0.16);
  border-radius: 999px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.95) inset;
  text-align: center;
}

.cat-badge-text::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 0.45rem;
  margin-bottom: 0.1rem;
  vertical-align: middle;
  border-radius: 50%;
  background: var(--cat-accent);
}

.cat-badge-text strong {
  color: var(--cat-ink);
  font-weight: 600;
}

.cat-badge-link {
  color: var(--cat-accent);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(26, 92, 75, 0.3);
}

.cat-badge-link:hover {
  border-color: var(--cat-accent);
}

/* Search */
.cat-search-wrap {
  margin-bottom: 1rem;
}

.cat-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.85rem;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(26, 92, 75, 0.14);
  border-radius: 999px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  transition: border-color 0.2s var(--cat-ease), box-shadow 0.2s var(--cat-ease);
}

.cat-search:focus-within {
  border-color: rgba(26, 92, 75, 0.32);
  box-shadow: 0 0 0 3px var(--cat-accent-glow);
}

.cat-search-icon {
  flex-shrink: 0;
  color: var(--cat-accent);
}

.cat-search-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--cat-ink);
  min-width: 0;
  outline: none;
}

.cat-search-input::placeholder {
  color: #a3a3a3;
}

.cat-no-results {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--cat-muted);
  text-align: center;
}

.cat-no-results a {
  color: var(--cat-accent);
  font-weight: 600;
}

/* Main grid */
.cat-main {
  flex: 1;
  width: 100%;
  max-width: var(--cat-max);
  margin: 0 auto;
  padding: 1.25rem 1rem 6rem;
}

@media (min-width: 768px) {
  .cat-main {
    padding: 1.5rem 1.25rem 6.5rem;
  }
}

.cat-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

@media (min-width: 640px) {
  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.65rem;
  }
}

@media (min-width: 960px) {
  .cat-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
  }
}

.cat-product[hidden] {
  display: none;
}

/* Product card */
.cat-product {
  animation: cat-rise 0.55s var(--cat-ease) both;
  animation-delay: calc(var(--cat-delay, 0) * 45ms);
}

@keyframes cat-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cat-product-link {
  display: block;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.cat-product-visual {
  position: relative;
  aspect-ratio: 3 / 4;
  background: #e6ede9;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset;
}

.cat-product-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--cat-ease);
}

.cat-product-ph {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 30% 20%, #fff 0%, transparent 50%),
    linear-gradient(160deg, #ebeae6 0%, #d8d7d2 100%);
}

.cat-product-chip {
  position: absolute;
  top: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-size: 0.55rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(228, 240, 235, 0.94);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(26, 92, 75, 0.18);
  color: var(--cat-accent);
  box-shadow: 0 2px 10px rgba(26, 92, 75, 0.1);
}

.cat-product-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  background: linear-gradient(to top, rgba(20, 20, 20, 0.55) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.3s var(--cat-ease);
}

.cat-product-wa {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: #fff;
  color: var(--cat-ink);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transform: translateY(8px);
  transition: transform 0.35s var(--cat-ease);
}

@media (hover: hover) {
  .cat-product-link:hover .cat-product-visual img {
    transform: scale(1.06);
  }

  .cat-product-link:hover .cat-product-overlay {
    opacity: 1;
  }

  .cat-product-link:hover .cat-product-wa {
    transform: translateY(0);
  }
}

@media (hover: none) {
  .cat-product-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(20, 20, 20, 0.35) 0%, transparent 40%);
  }

  .cat-product-wa {
    transform: none;
    padding: 0.45rem 0.85rem;
    font-size: 0.65rem;
  }
}

.cat-product-copy {
  padding: 0.6rem 0.2rem 0.35rem;
}

.cat-product-name {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cat-product-detail {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  color: var(--cat-muted);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cat-product-price {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--cat-accent);
}

.cat-product-price--ask {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--cat-muted);
  letter-spacing: 0;
}

/* Empty */
.cat-empty {
  text-align: center;
  padding: 3.5rem 1.5rem 4rem;
  max-width: 24rem;
  margin: 0 auto;
}

.cat-empty-label {
  margin: 0 0 0.5rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--cat-accent);
}

.cat-empty-title {
  margin: 0 0 0.5rem;
  font-family: var(--cat-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.cat-empty-text {
  margin: 0 0 1.5rem;
  font-size: 0.88rem;
  color: var(--cat-muted);
}

.cat-empty-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.875rem;
  padding: 0 1.75rem;
  border-radius: 999px;
  background: var(--cat-ink);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s var(--cat-ease), background 0.2s;
}

.cat-empty-cta:hover {
  background: #333;
  color: #fff;
  transform: scale(1.02);
}

/* Dock — floating CTA */
.cat-dock {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  padding: 0.75rem 1rem;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  pointer-events: none;
}

.cat-dock-btn {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  max-width: 20rem;
  margin: 0 auto;
  min-height: 3rem;
  padding: 0 1.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #1f6b57 0%, var(--cat-accent) 100%);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  box-shadow: 0 4px 20px rgba(26, 92, 75, 0.35), 0 1px 0 rgba(255, 255, 255, 0.12) inset;
  transition: transform 0.25s var(--cat-ease), box-shadow 0.25s;
}

.cat-dock-btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(26, 92, 75, 0.4);
}

.cat-dock-btn svg {
  flex-shrink: 0;
  opacity: 0.95;
}

@media (prefers-reduced-motion: reduce) {
  .cat-product {
    animation: none;
  }

  .cat-product-visual img,
  .cat-product-overlay,
  .cat-product-wa {
    transition: none;
  }
}

/* Legacy catalogo-* (admin stock link) — keep stock thumb only */
.stock-card-thumb {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
  border-radius: 8px;
}

/* Combo buscable (Tom Select) */
.ts-wrapper.single.full {
  width: 100%;
}

.ts-wrapper .ts-control {
  min-height: 38px;
  border-radius: 8px;
  border-color: var(--ps-border);
  font-size: 0.875rem;
  padding: 0.45rem 0.75rem;
}

.ts-wrapper.focus .ts-control,
.ts-wrapper.dropdown-active .ts-control {
  border-color: var(--ps-primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.ts-wrapper .ts-control input {
  font-size: 0.875rem;
}

.ts-dropdown {
  z-index: 1070;
  border-color: var(--ps-border);
  box-shadow: var(--ps-shadow-md);
  border-radius: 8px;
}

body > .ts-dropdown {
  z-index: 1070;
}

.ts-dropdown .option.active {
  background-color: #ecfdf5;
  color: var(--ps-text);
}

.ts-dropdown .option.selected {
  background-color: var(--ps-primary);
  color: #fff;
}

.ts-wrapper .clear-button {
  color: var(--ps-text-muted);
}

.table-active {
  --bs-table-bg: #ecfdf5;
}

/* —— Reporte de ganancias —— */
.app-content-ganancias {
  max-width: 1200px;
}

.rg-filters .card-body {
  overflow: visible;
}

.rg-stats .stat-card {
  padding: 0.85rem 1rem;
}

.rg-stats .stat-value {
  font-size: clamp(1.1rem, 4vw, 1.55rem) !important;
}

.rg-stats .stat-label {
  font-size: 0.72rem;
}

.rg-table-wrap {
  overflow: visible;
}

.rg-cards {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.75rem;
}

.rg-item {
  background: var(--ps-surface);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius);
  padding: 0.75rem 0.85rem;
}

.rg-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.rg-item-pedido {
  font-weight: 700;
  font-size: 0.9rem;
}

.rg-item-fecha {
  font-size: 0.78rem;
  color: var(--ps-text-muted);
}

.rg-item-desc {
  font-size: 0.82rem;
  color: var(--ps-text);
  line-height: 1.35;
  margin-bottom: 0.55rem;
}

.rg-item-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 0.75rem;
  margin: 0;
}

.rg-item-grid dt {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ps-text-muted);
  margin: 0;
}

.rg-item-grid dd {
  font-size: 0.85rem;
  margin: 0.08rem 0 0;
  font-weight: 600;
}

.rg-item-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--ps-border);
  font-size: 0.82rem;
}

.rg-item-total strong {
  font-size: 0.95rem;
  color: var(--ps-primary-dark);
}

.rg-totals-mobile {
  margin-top: 0.75rem;
  padding: 0.85rem;
  background: #f8fafc;
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius);
}

.rg-totals-mobile dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 0.75rem;
  margin: 0;
}

.rg-totals-mobile dt {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ps-text-muted);
}

.rg-totals-mobile dd {
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0.08rem 0 0;
}

@media (max-width: 575.98px) {
  .app-content-ganancias .page-header {
    flex-direction: column;
    align-items: stretch;
  }

  .app-content-ganancias .page-actions {
    width: 100%;
  }

  .app-content-ganancias .page-actions .btn {
    width: 100%;
  }
}

/* —— Liquidación proveedor —— */
.app-content-liquidacion .liq-stat-monto {
  font-size: clamp(0.85rem, 2.5vw, 1.1rem);
}

.liq-concepto {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ps-primary-dark);
  line-height: 1.3;
}

.liq-pagada {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ps-success);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 4px;
  padding: 0.1rem 0.35rem;
  margin-right: 0.25rem;
}

.liq-pagada-ref {
  font-size: 0.78rem;
  color: var(--ps-text-muted);
  text-decoration: line-through;
}

.liq-row-solo-ganancia,
.liq-item-solo-ganancia {
  background: #f0fdf9;
}

.liq-item-solo-ganancia {
  border-left: 3px solid var(--ps-primary);
}

.liq-cards {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.75rem;
}

.liq-item {
  background: var(--ps-surface);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius);
  padding: 0.75rem 0.85rem;
}

.liq-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.liq-item-pedido {
  font-weight: 700;
  font-size: 0.9rem;
}

.liq-item-desc {
  font-size: 0.82rem;
  color: var(--ps-text);
  line-height: 1.35;
}

.liq-item-cli {
  font-size: 0.8rem;
  color: var(--ps-text-muted);
}

.liq-item-concepto {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ps-primary-dark);
}

.liq-item-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 0.75rem;
  margin: 0 0 0.65rem;
}

.liq-item-grid dt {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ps-text-muted);
  margin: 0;
}

.liq-item-grid dd {
  font-size: 0.85rem;
  margin: 0.1rem 0 0;
}

.liq-item-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--ps-border);
  font-size: 0.85rem;
}

.liq-item-total strong {
  font-size: 1rem;
  color: var(--ps-primary-dark);
}

.liq-item-totales {
  background: #f8fafc;
}

.liq-item-totales-det {
  font-size: 0.75rem;
  color: var(--ps-text-muted);
  margin-top: 0.35rem;
}

.liq-envios-head {
  padding: 0.5rem 0.85rem;
  background: #f8fafc;
  border-top: 1px solid var(--ps-border);
  font-size: 0.8rem;
  font-weight: 600;
}

.liq-notas-wrap {
  flex: 1 1 100%;
  max-width: 28rem;
}

.liq-historial-cards {
  padding: 0.75rem;
}

@media (max-width: 991.98px) {
  .app-content-liquidacion .page-header h1 {
    font-size: 1.15rem;
  }

  .app-content-liquidacion .page-actions {
    width: 100%;
  }

  .app-content-liquidacion .page-actions .btn {
    flex: 1;
  }

  .liq-deposito-footer {
    padding: 1rem;
  }

  .liq-deposito-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .liq-notas-wrap {
    max-width: none;
  }
}

/* Liquidación — total depósito */
.liq-deposito-footer {
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 100%);
}

.liq-deposito-total {
  text-align: center;
  margin-bottom: 1.25rem;
  padding: 1rem;
  background: var(--ps-surface);
  border-radius: var(--ps-radius);
  border: 2px solid var(--ps-primary);
  box-shadow: var(--ps-shadow-md);
}

.liq-deposito-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ps-text-muted);
  margin-bottom: 0.25rem;
}

.liq-deposito-monto {
  display: block;
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--ps-primary-dark);
  line-height: 1.2;
}

.liq-deposito-detalle {
  display: block;
  font-size: 0.8rem;
  color: var(--ps-text-muted);
  margin-top: 0.35rem;
}

.liq-deposito-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  justify-content: space-between;
}

.liq-btn-deposito {
  min-width: 12rem;
  font-weight: 600;
}

@media (max-width: 576px) {
  .liq-deposito-monto { font-size: 1.75rem; }
  .liq-btn-deposito { width: 100%; }
}

/* Loading overlay */
.ps-loading {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
}

.ps-loading[hidden] {
  display: none !important;
}

.ps-loading-box {
  background: var(--ps-surface);
  border-radius: var(--ps-radius);
  padding: 1.75rem 2.25rem;
  box-shadow: var(--ps-shadow-md);
  text-align: center;
  min-width: 11rem;
}

.ps-loading-spinner {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto 0.85rem;
  border: 3px solid var(--ps-border);
  border-top-color: var(--ps-primary);
  border-radius: 50%;
  animation: ps-spin 0.75s linear infinite;
}

.ps-loading-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ps-text);
}

@keyframes ps-spin {
  to { transform: rotate(360deg); }
}

body.ps-loading-active {
  overflow: hidden;
  pointer-events: none;
}

body.ps-loading-active .ps-loading {
  pointer-events: auto;
}

/* —— Dashboard —— */
.app-content-dashboard {
  max-width: 1280px;
}

.dash-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  margin-bottom: 1.75rem;
}

.dash-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ps-text-muted);
  margin: 0 0 0.35rem;
  font-weight: 600;
}

.dash-period-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.dash-title {
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
  line-height: 1.15;
  min-width: 10rem;
  text-align: center;
}

.dash-subtitle {
  margin: 0.4rem 0 0;
  color: var(--ps-text-muted);
  font-size: 0.88rem;
}

.dash-period-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  color: var(--ps-text-muted);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.dash-period-btn:hover {
  background: var(--ps-surface);
  color: var(--ps-primary);
  box-shadow: var(--ps-shadow);
}

.dash-period-btn .material-symbols-outlined {
  font-size: 1.35rem;
}

.dash-period-btn-disabled {
  opacity: 0.25;
  pointer-events: none;
}

.dash-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 992px) {
  .dash-kpi-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
  }
}

.dash-kpi {
  background: var(--ps-surface);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--ps-shadow);
}

.dash-kpi-primary {
  border-top: 3px solid var(--ps-primary);
}

.dash-kpi-success {
  border-top: 3px solid var(--ps-success);
}

.dash-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.dash-kpi-icon {
  font-size: 1.25rem !important;
  color: var(--ps-text-muted);
}

.dash-kpi-label {
  font-size: 0.78rem;
  color: var(--ps-text-muted);
  margin: 0 0 0.2rem;
  font-weight: 500;
}

.dash-kpi-value {
  font-size: clamp(1.25rem, 3.5vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.2;
}

.dash-kpi-hint {
  font-size: 0.72rem;
  color: var(--ps-text-muted);
  margin: 0.35rem 0 0;
}

.dash-kpi-trend {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

.dash-kpi-trend-up {
  background: #d1fae5;
  color: #047857;
}

.dash-kpi-trend-down {
  background: #fee2e2;
  color: #b91c1c;
}

.dash-kpi-trend-neutral {
  background: #f1f5f9;
  color: var(--ps-text-muted);
}

.dash-panel {
  background: var(--ps-surface);
  border: 1px solid var(--ps-border);
  border-radius: var(--ps-radius);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--ps-shadow);
}

.dash-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.dash-panel-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}

.dash-panel-meta,
.dash-panel-link {
  font-size: 0.78rem;
  color: var(--ps-text-muted);
}

.dash-panel-link {
  text-decoration: none;
  font-weight: 500;
}

.dash-panel-link:hover {
  color: var(--ps-primary);
}

.dash-chart-wrap {
  position: relative;
  height: 220px;
}

.dash-chart-donut {
  height: 180px;
}

.dash-legend {
  list-style: none;
  padding: 0.75rem 0 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--ps-text-muted);
}

.dash-legend li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.dash-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dash-legend-compra { background: #94a3b8; }
.dash-legend-prov { background: #64748b; }
.dash-legend-tuyo { background: var(--ps-primary); }

.dash-ops-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.dash-ops-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 0.5rem;
  border-radius: 8px;
  background: var(--ps-bg);
  text-decoration: none;
  color: inherit;
  transition: background 0.15s, box-shadow 0.15s;
  min-height: 4.5rem;
}

.dash-ops-item:hover {
  background: var(--ps-primary-light);
  color: inherit;
}

.dash-ops-static {
  pointer-events: none;
}

.dash-ops-alert .dash-ops-value {
  color: var(--ps-warning);
}

.dash-ops-value {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
}

.dash-ops-label {
  font-size: 0.72rem;
  color: var(--ps-text-muted);
  margin-top: 0.2rem;
  text-align: center;
}

.dash-pedido-num {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}

.dash-progress {
  height: 6px;
  background: var(--ps-bg);
  border-radius: 999px;
  overflow: hidden;
}

.dash-progress-fill {
  height: 100%;
  background: var(--ps-primary);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.dash-pedido-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  font-size: 0.78rem;
  color: var(--ps-text-muted);
  margin-top: 0.5rem;
}

.dash-table {
  font-size: 0.85rem;
}

.dash-table thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ps-text-muted);
  font-weight: 600;
  border-bottom-width: 1px;
  padding-bottom: 0.5rem;
}

.dash-table tbody td {
  padding: 0.65rem 0.5rem;
  vertical-align: middle;
  border-color: var(--ps-border);
}

.dash-desc {
  max-width: 14rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-sales-cards {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.dash-sale-card {
  padding: 0.85rem;
  border-radius: 8px;
  background: var(--ps-bg);
  border: 1px solid var(--ps-border);
}

.dash-sale-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.dash-sale-card-head time {
  font-weight: 400;
  color: var(--ps-text-muted);
  font-size: 0.78rem;
}

.dash-sale-card-desc {
  font-size: 0.8rem;
  color: var(--ps-text-muted);
  line-height: 1.35;
}

.dash-sale-card-foot {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--ps-text-muted);
}

.dash-empty {
  text-align: center;
  padding: 2rem 1rem;
}

.dash-empty-icon {
  font-size: 2.5rem !important;
  color: #cbd5e1;
  display: block;
  margin-bottom: 0.5rem;
}

.dash-empty-text {
  color: var(--ps-text-muted);
  font-size: 0.9rem;
  margin: 0;
}

/* —— Utilities —— */
.text-muted { color: var(--ps-text-muted) !important; }
.gap-2 { gap: 0.5rem; }
.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--ps-text-muted);
}
