:root {
  --background: #f7f9fc;
  --foreground: #151515;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: #ffffff;
  --line: rgba(21, 21, 21, 0.1);
  --sidebar: #111827;
  --sidebar-line: rgba(255, 255, 255, 0.08);
  --sidebar-text: rgba(255, 255, 255, 0.72);
  --sidebar-active: rgba(255, 255, 255, 0.12);
  --accent: #b87b2d;
  --accent-dark: #8c5b1d;
  --success: #35614f;
  --shadow: 0 24px 80px rgba(24, 25, 31, 0.12);
  --title-indigo: #4f46e5;
  --title-emerald: #059669;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-app, Inter), sans-serif;
  color: var(--foreground);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.08), transparent 24%),
    radial-gradient(circle at right center, rgba(15, 23, 42, 0.06), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #f5f7fb 100%);
}

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

button,
input,
textarea {
  font: inherit;
}

.eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  background: #f5f5f5;
}

.login-simple-shell {
  width: 100%;
  max-width: 410px;
  display: grid;
  justify-items: center;
  gap: 1.25rem;
}

.login-simple-logo {
  display: flex;
  justify-content: center;
}

.topbar h1,
.hero-panel h2,
.section-heading h3,
.login-card-copy h2,
.info-card h3 {
  margin: 0;
  font-family: var(--font-app, Inter), sans-serif;
}

.login-card-copy p,
.hero-panel p,
.info-card p,
.metric-list span,
.summary-card small,
.table-wrap td,
.table-wrap th,
.check-list li,
.sidebar-section-label,
.topbar-status {
  color: rgba(21, 21, 21, 0.58);
}

.login-card {
  width: 100%;
  padding: 2rem;
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-top: 3px solid #1f1f1f;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(21, 21, 21, 0.08);
}

.login-logo {
  max-width: 100%;
  height: auto;
}

.login-card-copy {
  margin-bottom: 1.25rem;
  text-align: center;
}

.login-card-copy h2 {
  font-size: 1.15rem;
  margin-bottom: 0.45rem;
}

.login-card-copy p {
  margin: 0;
  font-size: 0.95rem;
}

.auth-form {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field label {
  font-size: 0.95rem;
  font-weight: 700;
}

.field input {
  height: 46px;
  border-radius: 999px;
  border: 1px solid rgba(21, 21, 21, 0.12);
  background: #ffffff;
  padding: 0 1rem;
  outline: none;
  box-shadow: inset 0 1px 2px rgba(21, 21, 21, 0.05);
}

.field input:focus {
  border-color: rgba(21, 21, 21, 0.24);
  box-shadow: 0 0 0 3px rgba(21, 21, 21, 0.08);
}

.primary-button,
.ghost-link,
.inline-link,
.sidebar-logout {
  transition: transform 150ms ease, opacity 150ms ease, background-color 150ms ease;
}

.primary-button {
  height: 46px;
  margin-top: 0.35rem;
  border: none;
  border-radius: 999px;
  background: #1b1b1b;
  color: white;
  font-weight: 700;
  cursor: pointer;
}

.primary-button:hover,
.ghost-link:hover,
.inline-link:hover,
.sidebar-logout:hover {
  transform: translateY(-1px);
}

.primary-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.login-feedback {
  border-radius: 16px;
  padding: 0.85rem 1rem;
  background: #eef4ff;
  color: var(--accent-dark);
}

.login-feedback p {
  margin: 0;
}

.dashboard-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.dashboard-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: #111827;
}

.sidebar-shell {
  height: 100%;
  padding: 1.75rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: white;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.sidebar-main,
.sidebar-footer {
  display: grid;
}

.sidebar-main {
  gap: 0;
  padding-bottom: 1rem;
}

.sidebar-footer {
  gap: 0.8rem;
}

.sidebar-logo {
  position: relative;
  display: block;
  width: 100%;
  height: 170px;
  margin-bottom: 1.8rem;
}

.sidebar-logo-image {
  object-fit: contain;
}

.sidebar-section-label {
  margin: 0 0 0.85rem;
  padding: 0 0.95rem;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.sidebar-section-gap {
  margin-top: 1.4rem;
}

.sidebar-nav {
  display: grid;
  gap: 0.55rem;
}

.sidebar-group {
  display: grid;
  gap: 0.42rem;
}

.sidebar-group-head {
  display: flex;
  align-items: stretch;
  gap: 0.45rem;
}

.sidebar-link,
.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  border-radius: 22px;
  padding: 1rem 1.05rem;
  color: var(--sidebar-text);
  background: transparent;
  border: 1px solid transparent;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.sidebar-group-link {
  flex: 1;
}

.sidebar-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  border-radius: 22px;
  color: var(--sidebar-text);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.sidebar-group-head.active .sidebar-toggle-button,
.sidebar-toggle-button.active {
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.sidebar-toggle-icon {
  transition: transform 180ms ease;
}

.sidebar-toggle-icon.open {
  transform: rotate(180deg);
}

.sidebar-link.active {
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.sidebar-link:hover,
.sidebar-logout:hover,
.sidebar-toggle-button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}

.sidebar-subnav {
  display: grid;
  gap: 0.3rem;
  padding-left: 1.1rem;
}

.sidebar-sublink {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 36px;
  padding: 0.55rem 0.9rem;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.92rem;
}

.sidebar-sublink.active {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-shell::-webkit-scrollbar {
  width: 8px;
}

.sidebar-shell::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-shell::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.sidebar-shell::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

.sidebar-logout {
  color: white;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.sidebar-link span,
.sidebar-logout span {
  font-size: 0.98rem;
}

.sidebar-icon-sky {
  color: #0ea5e9;
}

.sidebar-icon-violet {
  color: #8b5cf6;
}

.sidebar-icon-pink {
  color: #ec4899;
}

.sidebar-icon-emerald {
  color: #10b981;
}

.sidebar-icon-amber {
  color: #f59e0b;
}

.sidebar-icon-orange {
  color: #f97316;
}

.sidebar-icon-slate {
  color: #a1a1aa;
}

.dashboard-main {
  min-width: 0;
  padding: 1.2rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.4rem;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
}

.topbar h1 {
  font-size: 1.65rem;
}

.topbar-status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background: rgba(53, 97, 79, 0.12);
  color: var(--success);
  font-weight: 700;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--success);
}

.content-area,
.page-stack {
  display: grid;
  gap: 1.4rem;
}

.content-area {
  padding-top: 0;
}

.hero-panel,
.panel-card,
.info-card,
.summary-card {
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.hero-panel,
.panel-card {
  padding: 1.45rem;
}

.hero-panel {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
}

.hero-panel h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0.5rem;
}

.ghost-link,
.inline-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.card-grid,
.summary-grid,
.two-column-grid {
  display: grid;
  gap: 1rem;
}

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

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

.two-column-grid {
  grid-template-columns: 1.3fr 1fr;
}

.info-card,
.summary-card {
  padding: 1.35rem;
}

.info-card-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.08);
  margin-bottom: 0.85rem;
}

.summary-card span,
.metric-list span {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.summary-card strong,
.metric-list strong {
  display: block;
  font-size: 1.6rem;
  font-family: var(--font-app, Inter), sans-serif;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.section-heading h3 {
  font-size: 1.5rem;
}

.metric-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.accent-panel {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.08), rgba(255, 255, 255, 0.92));
}

.check-list {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.7rem;
}

.dashboard-orders-panel {
  display: grid;
  gap: 1rem;
}

.dashboard-orders-list {
  display: grid;
  gap: 0.9rem;
}

.dashboard-order-item {
  display: grid;
  grid-template-columns: minmax(220px, 0.95fr) minmax(0, 1.6fr) 180px;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 22px;
  border: 1px solid rgba(21, 21, 21, 0.08);
  background: rgba(255, 255, 255, 0.78);
}

.dashboard-order-client {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.dashboard-order-client strong {
  font-size: 1rem;
  font-family: var(--font-app, Inter), sans-serif;
}

.dashboard-order-copy {
  display: grid;
  gap: 0.22rem;
  min-width: 0;
  justify-items: flex-start;
  text-align: left;
}

.dashboard-order-copy strong {
  font-size: 1rem;
  line-height: 1.4;
}

.dashboard-order-copy span {
  font-size: 0.9rem;
  color: rgba(21, 21, 21, 0.56);
}

.dashboard-order-copy p {
  margin: 0;
  color: rgba(21, 21, 21, 0.74);
  white-space: pre-wrap;
}

.dashboard-order-meta {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0.7rem;
  text-align: center;
}

.dashboard-order-meta span {
  font-size: 0.95rem;
  color: rgba(21, 21, 21, 0.6);
}

.dashboard-order-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 128px;
  height: 44px;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid rgba(21, 21, 21, 0.1);
  background: #ffffff;
  color: #151515;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(21, 21, 21, 0.08);
}

.dashboard-task-list,
.tasks-list {
  display: grid;
  gap: 0.9rem;
}

.dashboard-task-item,
.task-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 22px;
  border: 1px solid rgba(21, 21, 21, 0.08);
  background: rgba(255, 255, 255, 0.78);
  justify-items: stretch;
  text-align: left;
}

.dashboard-task-item strong,
.task-card-copy strong {
  font-size: 1rem;
  font-family: var(--font-app, Inter), sans-serif;
}

.dashboard-task-item p,
.task-card-copy p {
  margin: 0;
  color: rgba(21, 21, 21, 0.72);
  white-space: pre-wrap;
}

.tasks-form-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) 260px;
}

.tasks-notes-field {
  grid-column: 1 / -1;
}

.tasks-notes-field textarea {
  min-height: 140px;
  resize: vertical;
}

.tasks-day-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.task-card.done {
  opacity: 0.76;
}

.task-card-copy {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.task-card-copy span {
  font-size: 0.9rem;
  color: rgba(21, 21, 21, 0.56);
}

.dashboard-task-item {
  grid-template-columns: minmax(0, 1fr);
  justify-items: flex-start;
  text-align: left;
  position: relative;
  padding-left: 2rem;
}

.dashboard-task-item::before {
  content: "-";
  position: absolute;
  left: 1rem;
  top: 1rem;
  color: rgba(21, 21, 21, 0.6);
  font-weight: 700;
}

.task-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-width: 138px;
  height: 44px;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid rgba(21, 21, 21, 0.1);
  background: #ffffff;
  color: #151515;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(21, 21, 21, 0.08);
}

.task-actions-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.task-delete-button {
  background: rgba(188, 55, 55, 0.08);
  color: #8f2727;
}

.tareas-module-title svg {
  color: var(--title-emerald);
}

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

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
}

.table-wrap th,
.table-wrap td {
  text-align: left;
  padding: 0.95rem 0.8rem;
  border-bottom: 1px solid rgba(21, 21, 21, 0.08);
}

.table-wrap th {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cash-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.caja-grande-layout {
  margin-top: 1rem;
}

.caja-sections-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: stretch;
}

.caja-sections-grid .section-summary-card {
  width: 100%;
  border: none;
  text-align: left;
  cursor: pointer;
  min-height: 96px;
}

.cash-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  align-items: end;
}

.cash-meta-grid-top {
  align-items: stretch;
}

.cash-meta-grid .field span {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: rgba(21, 21, 21, 0.68);
}

.cash-result-card {
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.05);
}

.cash-result-card span,
.final-summary-list span {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
  color: rgba(21, 21, 21, 0.68);
}

.cash-result-card strong,
.final-summary-list strong {
  display: block;
  font-family: var(--font-app, Inter), sans-serif;
  font-size: 1.2rem;
}

.cash-result-card small {
  color: rgba(21, 21, 21, 0.58);
}

.cash-meta-grid .field input {
  height: 48px;
}

.cash-result-neutral {
  background: rgba(63, 138, 77, 0.14);
}

.cash-result-over {
  background: rgba(184, 123, 45, 0.18);
}

.cash-result-missing {
  background: rgba(188, 55, 55, 0.12);
}

.cash-total-chip {
  padding: 0.6rem 0.9rem;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.08);
  font-weight: 700;
}

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

.cash-table {
  width: 100%;
  border-collapse: collapse;
}

.cash-table th,
.cash-table td {
  padding: 0.85rem 0.7rem;
  border-bottom: 1px solid rgba(21, 21, 21, 0.08);
  text-align: left;
}

.cash-table th {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cash-table input,
.expenses-list input {
  width: 100%;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(21, 21, 21, 0.12);
  background: white;
  padding: 0 0.85rem;
  outline: none;
}

.cash-table input:focus,
.expenses-list input:focus {
  border-color: rgba(21, 21, 21, 0.24);
  box-shadow: 0 0 0 3px rgba(21, 21, 21, 0.08);
}

.expenses-list {
  display: grid;
  gap: 0.8rem;
}

.expense-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 180px 120px;
  gap: 0.75rem;
}

.expenses-panel {
  position: relative;
  z-index: 6;
  isolation: isolate;
}

.secondary-button,
.danger-button {
  height: 42px;
  border: none;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
}

.secondary-button {
  padding: 0 1.15rem;
  background: #171717;
  color: white;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.16);
}

.cash-live-button {
  pointer-events: auto;
  position: relative;
  z-index: 3;
}

.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
}

.danger-button {
  background: rgba(188, 55, 55, 0.14);
  color: #8f2727;
}

.final-summary-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.summary-ok {
  background: rgba(63, 138, 77, 0.14);
}

.summary-over {
  background: rgba(184, 123, 45, 0.18);
}

.summary-missing {
  background: rgba(188, 55, 55, 0.12);
}

.caja-grande-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 1rem 0;
}

.caja-grande-inner-card {
  padding: 1.2rem;
  border: 1px solid rgba(21, 21, 21, 0.08);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: none;
}

.caja-grande-form-grid {
  grid-template-columns: 160px minmax(0, 1.3fr) 180px 180px;
}

.caja-grande-submit {
  align-self: end;
}

.caja-grande-movimientos {
  max-height: 560px;
  overflow-y: auto;
}

.caja-grande-movimiento-card {
  background: rgba(255, 255, 255, 0.8);
}

.section-subcopy {
  margin: 0.35rem 0 0;
  color: rgba(21, 21, 21, 0.58);
  font-size: 0.98rem;
}

.config-link-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  min-height: 90px;
  border-radius: 24px;
  border: 1px solid rgba(21, 21, 21, 0.08);
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(21, 21, 21, 0.06);
  font-size: 1.1rem;
  font-weight: 700;
}

.section-summary-card {
  cursor: pointer;
}

.section-summary-active {
  outline: 2px solid rgba(17, 24, 39, 0.14);
  background: rgba(184, 123, 45, 0.12);
}

.users-header {
  align-items: end;
}

.users-title {
  margin: 0;
  font-family: var(--font-app, Inter), sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
}

.module-title-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.pedidos-module-title {
  color: var(--title-indigo);
}

.pedidos-history-title {
  color: #ea7a00;
}

.clientes-module-title {
  color: var(--title-emerald);
}

.pedidos-hero-heading {
  align-items: flex-start;
}

.pedidos-top-button {
  align-self: flex-start;
}

.pedidos-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pedidos-outline-button {
  background: white;
  color: #171717;
  border: 1px solid rgba(21, 21, 21, 0.12);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.08);
}

.user-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  align-items: end;
  margin-top: 1.3rem;
}

.employee-form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  align-items: end;
  margin-top: 1.3rem;
}

.employee-notes {
  grid-column: span 2;
}

.user-form-grid select {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(21, 21, 21, 0.12);
  background: white;
  padding: 0 0.85rem;
  outline: none;
}

.user-form-grid select:focus {
  border-color: rgba(21, 21, 21, 0.24);
  box-shadow: 0 0 0 3px rgba(21, 21, 21, 0.08);
}

.employee-form-grid select,
.employee-form-grid input,
.employee-form-grid textarea,
.salary-toolbar .field select,
.salary-toolbar .field input,
.salary-rate-field input,
.salary-table input {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(21, 21, 21, 0.12);
  background: white;
  padding: 0 0.85rem;
  outline: none;
}

.employee-form-grid textarea {
  min-height: 132px;
  height: auto;
  padding: 0.9rem 0.85rem;
  resize: vertical;
}

.employee-form-grid select:focus,
.employee-form-grid input:focus,
.salary-toolbar .field select:focus,
.salary-toolbar .field input:focus,
.salary-rate-field input:focus,
.salary-table input:focus {
  border-color: rgba(21, 21, 21, 0.24);
  box-shadow: 0 0 0 3px rgba(21, 21, 21, 0.08);
}

.form-advanced-panel {
  grid-column: 1 / -1;
  border: 1px solid rgba(21, 21, 21, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  padding: 0.85rem 1rem;
}

.form-advanced-panel summary {
  cursor: pointer;
  font-weight: 800;
}

.form-advanced-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  align-items: end;
  margin-top: 1rem;
}

.user-form-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.salary-toolbar {
  display: grid;
  grid-template-columns: 1.2fr 160px minmax(180px, 220px) auto;
  gap: 1rem;
  align-items: end;
}

.salary-home-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.salary-home-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.salary-receipt-toolbar {
  display: flex;
  align-items: end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.salary-receipt-list {
  display: grid;
  gap: 0.75rem;
}

.salary-receipt-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(21, 21, 21, 0.08);
  background: rgba(255, 255, 255, 0.9);
}

.salary-receipt-item.active {
  border-color: rgba(184, 123, 45, 0.4);
  background: rgba(184, 123, 45, 0.1);
}

.salary-receipt-item input {
  width: 18px;
  height: 18px;
}

.salary-receipt-item span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.88rem;
  color: rgba(21, 21, 21, 0.58);
}

.salary-toolbar-card {
  min-height: 48px;
  padding: 0.75rem 1rem;
  border-radius: 16px;
  background: rgba(17, 24, 39, 0.05);
}

.salary-toolbar-card span {
  display: block;
  font-size: 0.82rem;
  color: rgba(21, 21, 21, 0.58);
}

.salary-toolbar-card strong {
  display: block;
  margin-top: 0.2rem;
}

.salary-toolbar-actions {
  display: flex;
  justify-content: flex-end;
}

.salary-month-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.salary-overview-grid,
.salary-employee-grid {
  display: grid;
  gap: 1rem;
}

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

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

.salary-overview-card,
.salary-employee-card {
  border-radius: 24px;
  border: 1px solid rgba(21, 21, 21, 0.08);
  background: rgba(255, 255, 255, 0.86);
  padding: 1.2rem;
}

.salary-overview-card span,
.salary-employee-metrics span {
  display: block;
  font-size: 0.85rem;
  color: rgba(21, 21, 21, 0.58);
  margin-bottom: 0.25rem;
}

.salary-overview-card strong,
.salary-employee-metrics strong {
  display: block;
  font-size: 1.2rem;
  font-family: var(--font-app, Inter), sans-serif;
}

.salary-employee-top {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.salary-employee-top h3 {
  margin: 0;
}

.salary-employee-top p {
  margin: 0.2rem 0 0;
  color: rgba(21, 21, 21, 0.58);
}

.salary-employee-metrics {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.salary-month-card {
  border-radius: 28px;
  border: 1px solid rgba(21, 21, 21, 0.08);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 30px rgba(17, 24, 39, 0.06);
  padding: 1rem;
}

.salary-month-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.salary-month-top h3 {
  margin: 0.25rem 0 0;
  font-size: 1.6rem;
}

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

.salary-table {
  width: 100%;
  border-collapse: collapse;
}

.salary-table th,
.salary-table td {
  text-align: left;
  padding: 0.7rem 0.35rem;
  border-bottom: 1px solid rgba(21, 21, 21, 0.08);
  vertical-align: middle;
}

.salary-table th {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(21, 21, 21, 0.58);
}

.salary-table td input {
  width: 100%;
}

.salary-total-cell {
  font-weight: 700;
  white-space: nowrap;
}

.salary-month-actions {
  margin-top: 1rem;
}

.salary-month-footer {
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.salary-month-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.06);
  font-weight: 700;
}

.salary-month-stat.total {
  background: rgba(184, 123, 45, 0.18);
}

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

.users-table {
  width: 100%;
  border-collapse: collapse;
}

.users-table th,
.users-table td {
  text-align: left;
  padding: 1rem 0.7rem;
  border-bottom: 1px solid rgba(21, 21, 21, 0.08);
}

.users-table th {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(21, 21, 21, 0.58);
}

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

.ceo-section-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.08);
  color: var(--accent-dark);
}

.ceo-client-cell {
  display: grid;
  gap: 0.2rem;
  min-width: 210px;
}

.ceo-client-cell strong {
  font-size: 0.98rem;
}

.ceo-client-cell span {
  color: rgba(21, 21, 21, 0.56);
  font-size: 0.86rem;
}

.ceo-stats-table td:nth-child(2),
.ceo-stats-table td:nth-child(3),
.ceo-stats-table td:nth-child(4) {
  white-space: nowrap;
}

.crm-page {
  position: relative;
}

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

.crm-summary-grid .summary-card {
  min-height: 112px;
  padding: 1.35rem 1.45rem;
}

.crm-filters-card .section-heading svg,
.crm-charts-grid .section-heading svg,
.crm-page > .panel-card .section-heading svg {
  color: var(--accent-dark);
}

.crm-filters-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

.crm-filters-grid label {
  display: grid;
  gap: 0.45rem;
}

.crm-filters-grid span,
.crm-profile-stats span,
.crm-muted {
  color: rgba(21, 21, 21, 0.58);
  font-size: 0.86rem;
}

.crm-filters-grid input,
.crm-filters-grid select,
.crm-message-box,
.crm-followup-form input,
.crm-followup-form select,
.crm-followup-form textarea {
  width: 100%;
  border: 1px solid rgba(21, 21, 21, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  outline: none;
  color: #151515;
}

.crm-filters-grid input,
.crm-filters-grid select,
.crm-followup-form input,
.crm-followup-form select {
  min-height: 44px;
  padding: 0 0.85rem;
}

.crm-filters-grid input:focus,
.crm-filters-grid select:focus,
.crm-message-box:focus,
.crm-followup-form input:focus,
.crm-followup-form select:focus,
.crm-followup-form textarea:focus {
  border-color: rgba(184, 123, 45, 0.45);
  box-shadow: 0 0 0 3px rgba(184, 123, 45, 0.1);
}

.crm-charts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.crm-bars {
  display: grid;
  gap: 0.8rem;
}

.crm-bar-row {
  display: grid;
  gap: 0.35rem;
}

.crm-bar-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
}

.crm-bar-copy strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crm-bar-copy span {
  flex: 0 0 auto;
  color: #0f766e;
  font-weight: 800;
}

.crm-bar-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.07);
}

.crm-bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #059669);
}

.crm-alert-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.crm-alert-card {
  display: grid;
  gap: 0.4rem;
  min-height: 104px;
  padding: 1rem;
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  text-align: left;
  cursor: pointer;
}

.crm-alert-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  color: #8a5a19;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.crm-alert-card strong {
  font-family: var(--font-app, Inter), sans-serif;
}

.crm-alert-card span {
  color: rgba(21, 21, 21, 0.66);
  line-height: 1.45;
}

.crm-alert-card small {
  color: var(--accent-dark);
  font-weight: 900;
}

.crm-alert-alta {
  border-color: rgba(185, 28, 28, 0.2);
  background: rgba(254, 242, 242, 0.82);
}

.crm-alert-media {
  border-color: rgba(194, 65, 12, 0.2);
  background: rgba(255, 247, 237, 0.82);
}

.crm-alert-baja {
  border-color: rgba(4, 120, 87, 0.16);
  background: rgba(236, 253, 245, 0.72);
}

.crm-table th,
.crm-table td {
  vertical-align: middle;
}

.crm-table tbody tr {
  transition: background 0.16s ease, transform 0.16s ease;
}

.crm-table tbody tr:hover {
  background: rgba(184, 123, 45, 0.06);
}

.crm-client-button {
  display: grid;
  gap: 0.2rem;
  min-width: 210px;
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.crm-client-button strong {
  font-size: 0.98rem;
}

.crm-client-button span {
  color: rgba(21, 21, 21, 0.56);
  font-size: 0.86rem;
}

.crm-status-badge,
.crm-risk-badge,
.crm-priority-badge,
.crm-soft-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 30px;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.06);
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.crm-status-badge span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.crm-status-fuerte {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
}

.crm-status-medio {
  color: #a16207;
  background: rgba(234, 179, 8, 0.16);
}

.crm-status-bajo {
  color: #475569;
  background: rgba(100, 116, 139, 0.12);
}

.crm-status-riesgo {
  color: #c2410c;
  background: rgba(249, 115, 22, 0.14);
}

.crm-status-dormido {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.12);
}

.crm-status-perdido {
  color: #111827;
  background: rgba(17, 24, 39, 0.12);
}

.crm-risk-bajo {
  color: #a16207;
  background: rgba(234, 179, 8, 0.16);
}

.crm-risk-medio {
  color: #c2410c;
  background: rgba(249, 115, 22, 0.14);
}

.crm-risk-alto {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.12);
}

.crm-priority-baja {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
}

.crm-priority-media {
  color: #a16207;
  background: rgba(234, 179, 8, 0.16);
}

.crm-priority-alta {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.12);
}

.crm-soft-debt {
  color: #7c2d12;
  background: rgba(251, 146, 60, 0.16);
}

.crm-soft-risk,
.crm-soft-dormant {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.12);
}

.crm-soft-vip {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
}

.crm-positive {
  color: #047857;
  font-weight: 800;
}

.crm-negative {
  color: #b91c1c;
  font-weight: 800;
}

.crm-actions {
  display: flex;
  gap: 0.45rem;
}

.crm-icon-button,
.crm-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid rgba(21, 21, 21, 0.08);
  background: rgba(255, 255, 255, 0.84);
  color: #151515;
  cursor: pointer;
}

.crm-icon-button {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.crm-action-button {
  min-height: 42px;
  padding: 0 0.9rem;
  border-radius: 999px;
  font-weight: 800;
}

.crm-icon-button:hover,
.crm-action-button:hover,
.crm-alert-card:hover {
  background: #ffffff;
  transform: translateY(-1px);
}

.crm-icon-button:disabled,
.crm-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
}

.crm-action-primary {
  border-color: rgba(184, 123, 45, 0.22);
  background: #151515;
  color: #ffffff;
}

.crm-action-primary:hover {
  background: #2a2a2a;
}

.crm-button-row,
.crm-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.crm-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 1.2rem;
  background: rgba(17, 24, 39, 0.46);
}

.crm-modal {
  width: min(1180px, calc(100vw - 2.4rem));
  max-height: calc(100vh - 2.4rem);
  overflow: hidden;
  padding: 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 26px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.crm-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.crm-profile-head {
  position: sticky;
  top: -1.35rem;
  z-index: 2;
  margin: -1.35rem -1.35rem 1rem;
  padding: 1.2rem 1.35rem;
  border-bottom: 1px solid rgba(21, 21, 21, 0.08);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
}

.crm-profile-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.crm-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 18px;
  background: #151515;
  color: #ffffff;
  font-family: var(--font-app, Inter), sans-serif;
  font-size: 1.25rem;
}

.crm-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.crm-modal-head h3 {
  margin: 0;
  font-family: var(--font-app, Inter), sans-serif;
  font-size: 1.8rem;
}

.crm-modal-head span {
  color: rgba(21, 21, 21, 0.58);
}

.crm-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 1rem;
  max-height: calc(100vh - 9rem);
  overflow: auto;
  padding-right: 0.25rem;
}

.crm-profile-main,
.crm-profile-side,
.crm-profile-main section,
.crm-profile-side section {
  display: grid;
  gap: 1rem;
}

.crm-profile-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.crm-profile-stats div,
.crm-history-row,
.crm-product-list div,
.crm-alert-list p,
.crm-comparison-grid div,
.crm-similar-list div,
.crm-timeline-item {
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 16px;
  background: rgba(17, 24, 39, 0.03);
}

.crm-profile-stats div {
  display: grid;
  gap: 0.35rem;
  align-content: start;
  min-height: 86px;
  padding: 0.85rem;
}

.crm-profile-stats strong {
  font-size: 1.05rem;
}

.crm-section-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.crm-profile-main h4,
.crm-profile-side h4 {
  margin: 0;
  font-family: var(--font-app, Inter), sans-serif;
}

.crm-history-list,
.crm-product-list,
.crm-alert-list,
.crm-similar-list,
.crm-timeline {
  display: grid;
  gap: 0.55rem;
}

.crm-history-row,
.crm-product-list div,
.crm-similar-list div,
.crm-timeline-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.25rem 0.8rem;
  padding: 0.75rem 0.85rem;
}

.crm-history-row small,
.crm-similar-list small,
.crm-timeline-item small {
  grid-column: 1 / -1;
  color: rgba(21, 21, 21, 0.55);
}

.crm-product-list strong {
  min-width: 0;
}

.crm-product-list span {
  color: #0f766e;
  font-weight: 800;
}

.crm-alert-list p {
  margin: 0;
  padding: 0.8rem 0.9rem;
  color: rgba(21, 21, 21, 0.76);
}

.crm-visual-alert {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 16px;
}

.crm-visual-alert strong {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.crm-visual-alert span {
  color: rgba(21, 21, 21, 0.72);
}

.crm-visual-alert-alta {
  color: #b91c1c;
  background: rgba(254, 242, 242, 0.82);
}

.crm-visual-alert-media {
  color: #c2410c;
  background: rgba(255, 247, 237, 0.82);
}

.crm-visual-alert-baja {
  color: #047857;
  background: rgba(236, 253, 245, 0.72);
}

.crm-comparison-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
}

.crm-comparison-grid div {
  display: grid;
  gap: 0.35rem;
  padding: 0.8rem;
}

.crm-comparison-grid span,
.crm-followup-form span {
  color: rgba(21, 21, 21, 0.58);
  font-size: 0.84rem;
}

.crm-note-cell {
  max-width: 320px;
  white-space: normal;
}

.crm-followup-modal {
  width: min(720px, calc(100vw - 2.4rem));
}

.crm-followup-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  max-height: calc(100vh - 13rem);
  overflow: auto;
}

.crm-followup-form label {
  display: grid;
  gap: 0.45rem;
}

.crm-followup-note-field {
  grid-column: 1 / -1;
}

.crm-followup-form textarea {
  min-height: 120px;
  padding: 0.85rem;
  resize: vertical;
}

.crm-modal-actions {
  justify-content: flex-end;
  margin-top: 1rem;
}

.crm-message-box {
  min-height: 110px;
  padding: 0.85rem;
  resize: vertical;
  line-height: 1.45;
}

.crm-toast,
.crm-floating-note {
  position: fixed;
  right: 1.2rem;
  z-index: 140;
  border-radius: 999px;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.16);
  font-weight: 800;
}

.crm-toast {
  bottom: 1.2rem;
  padding: 0.85rem 1rem;
  background: #111827;
  color: white;
}

.crm-floating-note {
  bottom: 4.4rem;
  padding: 0.75rem 0.95rem;
  background: #ffffff;
  color: #151515;
  border: 1px solid rgba(21, 21, 21, 0.08);
}

.history-months {
  display: grid;
  gap: 1rem;
}

.history-toolbar {
  display: grid;
  gap: 0.75rem;
}

.history-filter-group {
  display: grid;
  gap: 0.7rem;
}

.history-filter-group span {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(21, 21, 21, 0.58);
}

.history-month-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.history-month-pill {
  min-height: 40px;
  padding: 0 1rem;
  border: 1px solid rgba(21, 21, 21, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #171717;
  font-weight: 700;
  cursor: pointer;
}

.history-month-pill.active {
  background: #171717;
  border-color: #171717;
  color: #ffffff;
}

.history-month-card {
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 1.4rem;
  background: rgba(255, 255, 255, 0.8);
  overflow: hidden;
}

.history-month-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1.2rem 1.3rem;
  background: linear-gradient(135deg, rgba(184, 123, 45, 0.1), rgba(184, 123, 45, 0.02));
  border-bottom: 1px solid rgba(21, 21, 21, 0.08);
}

.history-month-header h4 {
  margin: 0.2rem 0 0;
  text-transform: capitalize;
  font-size: 1.2rem;
}

.history-month-header span {
  font-weight: 700;
  color: rgba(21, 21, 21, 0.68);
}

.history-month-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(21, 21, 21, 0.08);
  background: rgba(247, 249, 252, 0.9);
}

.history-month-summary span {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(21, 21, 21, 0.55);
}

.history-month-summary strong {
  font-size: 1.05rem;
  font-family: var(--font-app, Inter), sans-serif;
}

.history-days-list {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
}

.history-day-card {
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 1.2rem;
  padding: 1rem;
  background: white;
}

.history-edit-field {
  min-width: 0;
}

.history-edit-field input,
.history-edit-input {
  width: 100%;
  height: 46px;
  padding: 0 0.95rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(21, 21, 21, 0.12);
  background: white;
  font: inherit;
}

.history-day-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.history-day-top,
.history-day-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.history-day-top {
  margin-bottom: 0.9rem;
}

.history-day-card span {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(21, 21, 21, 0.55);
  margin-bottom: 0.2rem;
}

.history-day-card strong {
  font-size: 1.02rem;
}

.empty-state-inline {
  padding: 1rem 1.1rem;
  border: 1px dashed rgba(21, 21, 21, 0.14);
  border-radius: 1rem;
  color: rgba(21, 21, 21, 0.6);
  background: rgba(255, 255, 255, 0.72);
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.06);
  font-weight: 700;
  font-size: 0.85rem;
}

.role-badge.admin {
  background: rgba(184, 123, 45, 0.18);
}

.users-actions {
  display: flex;
  gap: 0.5rem;
}

.faltantes-tabs {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.faltantes-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.faltantes-select-all {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: rgba(21, 21, 21, 0.76);
  font-weight: 600;
}

.faltantes-select-all input,
.faltantes-check {
  width: 18px;
  height: 18px;
  accent-color: #111827;
}

.faltantes-tab {
  height: 42px;
  padding: 0 1rem;
  border: 1px solid rgba(21, 21, 21, 0.1);
  border-radius: 999px;
  background: white;
  font-weight: 700;
  cursor: pointer;
}

.faltantes-tab.active {
  background: #111827;
  color: white;
}

.faltantes-table {
  width: 100%;
  border-collapse: collapse;
}

.faltantes-table th,
.faltantes-table td {
  text-align: left;
  padding: 0.9rem 0.7rem;
  border-bottom: 1px solid rgba(21, 21, 21, 0.08);
  vertical-align: middle;
}

.faltantes-table th {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(21, 21, 21, 0.58);
}

.faltantes-table input {
  width: 100%;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(21, 21, 21, 0.12);
  background: white;
  padding: 0 0.85rem;
  outline: none;
}

.faltantes-table input:focus {
  border-color: rgba(21, 21, 21, 0.24);
  box-shadow: 0 0 0 3px rgba(21, 21, 21, 0.08);
}

.faltantes-table td:first-child,
.faltantes-table th:first-child {
  width: 80px;
  text-align: center;
}

.deposito-table td:first-child,
.deposito-table th:first-child {
  width: 96px;
}

.deposito-muted-line {
  display: block;
  margin-top: 0.22rem;
  color: rgba(21, 21, 21, 0.52);
  font-weight: 600;
}

.deposito-toolbar {
  align-self: end;
  margin-bottom: 0;
  padding-bottom: 0.2rem;
}

.readonly-field {
  background: rgba(17, 24, 39, 0.05) !important;
  color: rgba(21, 21, 21, 0.72);
}

.icon-button {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 12px;
  background: rgba(17, 24, 39, 0.06);
  color: #111827;
  cursor: pointer;
}

.icon-button.danger {
  background: rgba(188, 55, 55, 0.12);
  color: #b22222;
}

.actions-grid {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.export-launch-row {
  display: flex;
  justify-content: flex-start;
}

.copy-feedback {
  margin: 0.9rem 0 0;
  color: var(--success);
  font-weight: 700;
}

.faltantes-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(17, 24, 39, 0.56);
}

.faltantes-modal {
  position: relative;
  width: min(640px, 100%);
  border-radius: 28px;
  background: #ffffff;
  color: #111827;
  padding: 1.8rem;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.22);
}

.faltantes-modal h3 {
  margin: 0.2rem 0 0;
  font-size: 1.8rem;
}

.bill-withdrawal-modal {
  width: min(760px, 100%);
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
}

.supplier-order-modal {
  width: min(860px, 100%);
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
}

.supplier-order-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 1rem;
  align-items: start;
  margin-top: 1.4rem;
}

.supplier-order-provider-field,
.supplier-order-notes-field {
  grid-column: 1;
}

.supplier-order-notes-field textarea {
  min-height: 112px;
  resize: vertical;
}

.supplier-order-selected-summary {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.95);
}

.supplier-order-items-preview {
  display: grid;
  gap: 0.55rem;
  max-height: 330px;
  overflow-y: auto;
}

.supplier-order-items-preview div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 0.4rem 0.7rem;
  padding: 0.65rem 0.7rem;
  border-radius: 14px;
  background: #ffffff;
}

.supplier-order-items-preview span,
.supplier-order-items-preview small {
  color: rgba(21, 21, 21, 0.58);
  font-weight: 700;
}

.supplier-order-items-preview strong {
  min-width: 0;
}

.supplier-order-items-preview small {
  grid-column: 2;
  font-size: 0.78rem;
}

.bill-withdrawal-fields {
  margin-top: 1.35rem;
}

.bill-withdrawal-heading {
  margin: 1.3rem 0 0.5rem;
}

.bill-withdrawal-summary {
  margin-top: 1rem;
}

.faltantes-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.08);
  color: #111827;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.faltantes-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.4rem;
}

.faltantes-modal-product {
  grid-column: span 2;
}

.faltantes-product-search {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.faltantes-product-search input {
  min-width: 0;
  flex: 1;
}

.faltantes-product-search-button {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  border-radius: 999px;
}

.faltantes-product-search-button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.faltantes-product-search-hint {
  display: block;
  color: rgba(21, 21, 21, 0.58);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
}

.faltantes-product-results {
  display: grid;
  gap: 0.55rem;
  max-height: 220px;
  overflow-y: auto;
  padding: 0.35rem;
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 18px;
  background: rgba(247, 249, 252, 0.96);
}

.faltantes-product-result {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 14px;
  background: #ffffff;
  padding: 0.75rem 0.85rem;
  color: #111827;
  cursor: pointer;
  text-align: left;
}

.faltantes-product-result:hover {
  border-color: rgba(17, 24, 39, 0.14);
  background: rgba(17, 24, 39, 0.03);
}

.faltantes-product-result strong {
  display: block;
  line-height: 1.25;
}

.faltantes-product-result span {
  display: block;
  margin-top: 0.25rem;
  color: rgba(21, 21, 21, 0.55);
  font-size: 0.88rem;
}

.faltantes-product-use-manual {
  display: grid;
  gap: 0.7rem;
  padding: 0.95rem 1rem;
  border: 1px dashed rgba(21, 21, 21, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
}

.faltantes-product-use-manual strong {
  line-height: 1.25;
}

.faltantes-product-use-manual span {
  color: rgba(21, 21, 21, 0.58);
  line-height: 1.45;
}

.faltantes-product-use-manual .secondary-button {
  justify-self: flex-start;
}

.faltantes-modal-actions {
  margin-top: 1.4rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.pedidos-submenu-wrap {
  margin-top: 1.2rem;
}

.pedidos-submenu {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem;
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.06);
  border: 1px solid rgba(21, 21, 21, 0.06);
}

.pedidos-submenu-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 42px;
  padding: 0.7rem 1rem;
  border: 1px solid transparent;
  border-radius: 14px;
  color: rgba(21, 21, 21, 0.62);
  font-weight: 700;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.pedidos-submenu-item.active {
  background: white;
  border-color: rgba(21, 21, 21, 0.08);
  color: #111827;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.06);
}

.pedidos-mysql-card {
  padding: 1.2rem;
  border-radius: 24px;
  background: rgba(17, 24, 39, 0.04);
}

.mysql-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.mysql-form-grid input {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(21, 21, 21, 0.12);
  background: white;
  padding: 0 0.85rem;
  outline: none;
}

.mysql-form-grid input:focus {
  border-color: rgba(21, 21, 21, 0.24);
  box-shadow: 0 0 0 3px rgba(21, 21, 21, 0.08);
}

.mysql-form-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

.pedidos-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.pedidos-summary-text {
  font-size: 1rem !important;
  line-height: 1.4;
}

.pedidos-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.06);
  font-weight: 700;
}

.pedidos-clientes-table {
  table-layout: fixed;
}

.pedidos-clientes-table th,
.pedidos-clientes-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  vertical-align: top;
}

.pedidos-clientes-table th:nth-child(1),
.pedidos-clientes-table td:nth-child(1) {
  width: 70px;
}

.pedidos-clientes-table th:nth-child(2),
.pedidos-clientes-table td:nth-child(2) {
  width: 170px;
}

.pedidos-clientes-table th:nth-child(3),
.pedidos-clientes-table td:nth-child(3) {
  width: 150px;
}

.pedidos-clientes-table th:nth-child(4),
.pedidos-clientes-table td:nth-child(4) {
  width: 210px;
}

.pedidos-clientes-table th:nth-child(5),
.pedidos-clientes-table td:nth-child(5) {
  width: 170px;
}

.pedidos-clientes-table th:nth-child(6),
.pedidos-clientes-table td:nth-child(6) {
  width: 220px;
}

.pedidos-clientes-table th:nth-child(7),
.pedidos-clientes-table td:nth-child(7) {
  width: 150px;
}

.pedidos-clientes-table th:nth-child(8),
.pedidos-clientes-table td:nth-child(8) {
  width: 110px;
}

.pedido-form-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
  align-items: start;
}

.pedido-search-block {
  position: relative;
  display: grid;
  gap: 0.75rem;
}

.pedido-search-input {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  height: 48px;
  padding: 0 0.95rem;
  border-radius: 14px;
  border: 1px solid rgba(21, 21, 21, 0.12);
  background: white;
}

.pedido-search-input input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
}

.pedido-search-results {
  display: grid;
  gap: 0.45rem;
  padding: 0.65rem;
  border-radius: 18px;
  background: white;
  border: 1px solid rgba(21, 21, 21, 0.08);
  box-shadow: 0 16px 40px rgba(21, 21, 21, 0.08);
}

.pedido-search-item {
  display: grid;
  gap: 0.2rem;
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-radius: 14px;
  border: none;
  background: rgba(17, 24, 39, 0.04);
  cursor: pointer;
}

.pedido-search-item span {
  color: rgba(21, 21, 21, 0.58);
  font-size: 0.9rem;
}

.pedido-manual-card {
  display: grid;
  gap: 0.45rem;
  align-content: start;
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px dashed rgba(21, 21, 21, 0.14);
  background: rgba(255, 255, 255, 0.82);
}

.pedido-manual-card strong {
  font-size: 0.98rem;
}

.pedido-manual-card p {
  margin: 0;
  color: rgba(21, 21, 21, 0.6);
  font-size: 0.92rem;
  line-height: 1.45;
}

.pedido-manual-button {
  justify-self: flex-start;
}

.pedido-detail-field textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  border-radius: 18px;
  border: 1px solid rgba(21, 21, 21, 0.12);
  background: white;
  padding: 1rem;
  outline: none;
  font: inherit;
}

.pedido-detail-field textarea:focus {
  border-color: rgba(21, 21, 21, 0.24);
  box-shadow: 0 0 0 3px rgba(21, 21, 21, 0.08);
}

.pedido-form-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

.envios-form-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
  align-items: start;
}

.envios-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.envios-template-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}

.envios-template-card {
  display: grid;
  gap: 0.35rem;
  text-align: left;
  padding: 1rem 1.1rem;
  border-radius: 22px;
  border: 1px solid rgba(21, 21, 21, 0.08);
  background: #fff;
  cursor: pointer;
}

.envios-template-card strong {
  font-size: 1rem;
}

.envios-template-card span {
  color: rgba(21, 21, 21, 0.58);
  font-size: 0.9rem;
  line-height: 1.45;
}

.envios-template-card.active {
  border-color: rgba(21, 21, 21, 0.18);
  background: rgba(17, 24, 39, 0.04);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05);
}

.envios-fields-grid .field input,
.envios-notes-field textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(21, 21, 21, 0.12);
  background: white;
  outline: none;
  font: inherit;
}

.envios-fields-grid .field input {
  height: 48px;
  padding: 0 0.85rem;
}

.envios-notes-field {
  grid-column: span 2;
}

.envios-notes-field textarea {
  min-height: 150px;
  resize: vertical;
  padding: 1rem;
}

.envios-fields-grid .field input:focus,
.envios-notes-field textarea:focus {
  border-color: rgba(21, 21, 21, 0.24);
  box-shadow: 0 0 0 3px rgba(21, 21, 21, 0.08);
}

.envios-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.85rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(21, 21, 21, 0.08);
}

.envios-client-card {
  display: grid;
  gap: 0.3rem;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.05);
}

.envios-client-card span,
.envios-client-card small,
.envios-history-grid span,
.envios-history-block span,
.envios-history-meta {
  color: rgba(21, 21, 21, 0.58);
}

.envios-client-card strong {
  font-size: 1rem;
}

.envios-history-list {
  display: grid;
  gap: 1rem;
}

.envios-history-card {
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
  border-radius: 24px;
  border: 1px solid rgba(21, 21, 21, 0.08);
  background: rgba(250, 250, 250, 0.88);
}

.envios-history-card.archived {
  background: rgba(17, 24, 39, 0.03);
}

.envios-history-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.envios-history-top h4 {
  margin: 0.2rem 0 0;
  font-size: 1.15rem;
}

.envios-history-top p {
  margin: 0.25rem 0 0;
  color: rgba(21, 21, 21, 0.58);
}

.envios-history-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.envios-status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  background: rgba(180, 83, 9, 0.12);
  color: #9a5b10;
}

.envios-status-badge.enviado {
  background: rgba(15, 118, 110, 0.12);
  color: #0f766e;
}

.envios-status-badge.archivado {
  background: rgba(17, 24, 39, 0.1);
  color: #374151;
}

.envios-status-badge.cancelado {
  background: rgba(220, 38, 38, 0.12);
  color: #b91c1c;
}

.envios-history-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.envios-history-grid div,
.envios-history-block {
  display: grid;
  gap: 0.22rem;
}

.envios-history-grid strong,
.envios-history-block strong {
  font-size: 0.98rem;
}

.envios-tracking-row {
  display: flex;
  gap: 0.9rem;
  align-items: end;
}

.envios-tracking-field {
  flex: 1;
}

.envios-tracking-field input {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(21, 21, 21, 0.12);
  background: white;
  padding: 0 0.85rem;
  outline: none;
  font: inherit;
}

.envios-tracking-field input:focus {
  border-color: rgba(21, 21, 21, 0.24);
  box-shadow: 0 0 0 3px rgba(21, 21, 21, 0.08);
}

.envios-status-field {
  min-width: 200px;
}

.envios-status-field select {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  border: 1px solid rgba(21, 21, 21, 0.12);
  background: white;
  padding: 0 0.85rem;
  outline: none;
  font: inherit;
}

.envios-status-field select:focus {
  border-color: rgba(21, 21, 21, 0.24);
  box-shadow: 0 0 0 3px rgba(21, 21, 21, 0.08);
}

.supplier-orders-filters {
  margin-top: 1rem;
  grid-template-columns: minmax(180px, 240px) minmax(260px, 1fr);
}

.supplier-order-card.status-recibido {
  background: rgba(15, 118, 110, 0.04);
}

.supplier-order-card.status-cancelado {
  background: rgba(220, 38, 38, 0.04);
}

.supplier-order-items-table {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 18px;
}

.supplier-order-items-head,
.supplier-order-items-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 130px;
  gap: 0.8rem;
  align-items: center;
  padding: 0.75rem 0.9rem;
}

.supplier-order-items-table.with-delivery .supplier-order-items-head,
.supplier-order-items-table.with-delivery .supplier-order-items-row {
  grid-template-columns: 110px minmax(0, 1fr) 130px 150px;
}

.supplier-order-items-head {
  background: rgba(17, 24, 39, 0.04);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(21, 21, 21, 0.58);
}

.supplier-order-items-row + .supplier-order-items-row {
  border-top: 1px solid rgba(21, 21, 21, 0.07);
}

.supplier-order-items-row span {
  color: rgba(21, 21, 21, 0.62);
  font-weight: 700;
}

.supplier-order-items-row strong {
  min-width: 0;
}

.supplier-order-history {
  display: grid;
  gap: 0.35rem;
  color: rgba(21, 21, 21, 0.62);
  font-size: 0.9rem;
}

.supplier-order-detail-button {
  min-height: 40px;
  padding: 0.62rem 0.86rem;
  box-shadow: none;
}

.supplier-order-preview-list {
  display: grid;
  gap: 0.55rem;
  padding: 0.75rem;
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 18px;
  background: #ffffff;
}

.supplier-order-preview-row {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) 110px;
  gap: 0.65rem;
  align-items: center;
}

.supplier-order-preview-row span,
.supplier-order-preview-row small,
.supplier-order-history-summary span,
.supplier-order-modal-meta span {
  color: rgba(21, 21, 21, 0.58);
  font-weight: 700;
}

.supplier-order-preview-row strong {
  min-width: 0;
}

.supplier-order-more-line {
  justify-self: flex-start;
  min-height: 36px;
  padding: 0.45rem 0.8rem;
  border: 1px solid rgba(21, 21, 21, 0.1);
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.04);
  color: #111827;
  font-weight: 800;
  cursor: pointer;
}

.supplier-order-history-summary {
  display: grid;
  gap: 0.25rem;
  padding: 0.78rem 0.9rem;
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
}

.supplier-order-modal-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 1rem 0;
}

.supplier-order-modal-meta div {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem;
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.92);
}

.supplier-order-detail-modal .supplier-order-items-table {
  margin-top: 1rem;
}

.supplier-order-receive-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
}

.supplier-order-receive-toolbar span {
  color: rgba(21, 21, 21, 0.62);
  font-weight: 800;
}

.supplier-order-receive-toolbar div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: flex-end;
}

.supplier-order-receive-list {
  display: grid;
  gap: 0.65rem;
  max-height: min(420px, 48vh);
  overflow-y: auto;
  margin-top: 1rem;
  padding-right: 0.25rem;
}

.supplier-order-receive-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  padding: 0.85rem;
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.94);
  cursor: pointer;
}

.supplier-order-receive-row input {
  width: 20px;
  height: 20px;
  accent-color: #111827;
}

.supplier-order-receive-row div {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.supplier-order-receive-row span {
  color: rgba(21, 21, 21, 0.58);
  font-weight: 700;
}

.envios-banner-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.envios-banner-config-card {
  display: grid;
  gap: 1rem;
  padding: 1.1rem;
  border-radius: 24px;
  border: 1px solid rgba(21, 21, 21, 0.08);
  background: rgba(250, 250, 250, 0.88);
}

.envios-banner-config-head {
  display: grid;
  gap: 0.3rem;
}

.envios-banner-config-head span {
  color: rgba(21, 21, 21, 0.58);
  font-size: 0.9rem;
  line-height: 1.45;
}

.envios-banner-upload-block {
  display: grid;
  gap: 0.75rem;
}

.envios-banner-preview {
  width: 100%;
  min-height: 150px;
  max-height: 220px;
  object-fit: contain;
  border-radius: 18px;
  border: 1px solid rgba(21, 21, 21, 0.08);
  background: white;
  padding: 0.35rem;
}

.envios-banner-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  border-radius: 18px;
  border: 1px dashed rgba(21, 21, 21, 0.16);
  color: rgba(21, 21, 21, 0.52);
  background: rgba(17, 24, 39, 0.02);
}

.envio-print-sheet {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 1.4rem 1.1rem 1.8rem;
  border-radius: 26px;
  border: 1px solid rgba(21, 21, 21, 0.12);
  background: white;
  box-shadow: 0 18px 50px rgba(21, 21, 21, 0.08);
}

.envio-print-banner {
  margin-bottom: 1rem;
  width: 100%;
}

.envio-print-banner.bottom {
  margin-top: 1.4rem;
  margin-bottom: 0;
}

.envio-print-banner img {
  width: 100%;
  display: block;
  height: auto;
  max-height: none;
  object-fit: contain;
  border-radius: 12px;
}

.envios-preview-actions {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.envio-print-header {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.envio-print-mark {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(21, 21, 21, 0.7);
}

.envio-print-header h3 {
  margin: 0;
  font-size: 1.4rem;
  letter-spacing: 0.02em;
}

.envio-print-section + .envio-print-section {
  margin-top: 1.35rem;
}

.envio-print-section h4 {
  margin: 0 0 0.9rem;
  font-size: 1rem;
}

.envio-print-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem 1.5rem;
}

.envio-print-grid div {
  display: grid;
  gap: 0.18rem;
  min-height: 56px;
  align-content: start;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(21, 21, 21, 0.16);
}

.envio-print-grid .envio-print-wide {
  grid-column: 1 / -1;
  white-space: pre-line;
}

.envio-print-grid span {
  font-size: 0.82rem;
  color: rgba(21, 21, 21, 0.62);
  font-weight: 700;
}

.print-only-shipping-sheet {
  display: none;
}

.envio-print-grid strong {
  font-size: 1rem;
}

.envio-print-footer {
  margin-top: 1.6rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(21, 21, 21, 0.18);
  text-align: center;
  font-size: 0.92rem;
  font-weight: 700;
}

.pedido-user-banner {
  margin-top: 1.25rem;
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  border-radius: 18px;
  background: rgba(17, 24, 39, 0.05);
}

.pedido-user-banner span {
  color: rgba(21, 21, 21, 0.58);
  font-size: 0.86rem;
}

.pedido-user-banner strong {
  font-size: 1rem;
}

.pedido-orders-list {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pedido-table-wrap {
  border: 1px solid rgba(79, 70, 229, 0.12);
  border-radius: 26px;
  overflow: hidden;
  background: rgba(247, 249, 255, 0.64);
}

.pedido-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.pedido-table thead th {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid rgba(21, 21, 21, 0.08);
  background: rgba(239, 243, 255, 0.86);
  color: rgba(21, 21, 21, 0.58);
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
}

.pedido-table tbody td {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid rgba(21, 21, 21, 0.08);
  background: rgba(255, 255, 255, 0.88);
  vertical-align: middle;
  text-align: center;
}

.pedido-table tbody tr:last-child td {
  border-bottom: none;
}

.pedido-table th:nth-child(1),
.pedido-table td:nth-child(1) {
  width: 88px;
}

.pedido-table th:nth-child(2),
.pedido-table td:nth-child(2) {
  width: 27%;
}

.pedido-table th:nth-child(3),
.pedido-table td:nth-child(3) {
  width: 46%;
}

.pedido-table th:nth-child(4),
.pedido-table td:nth-child(4) {
  width: 132px;
}

.pedido-table th:nth-child(5),
.pedido-table td:nth-child(5) {
  width: 112px;
}

.pedido-table th:nth-child(6),
.pedido-table td:nth-child(6) {
  width: 150px;
}

.pedido-table-code {
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
}

.pedido-table-client,
.pedido-table-detail,
.pedido-table-date,
.pedido-table-user {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  min-width: 0;
  align-items: center;
  text-align: center;
}

.pedido-table th:nth-child(2),
.pedido-table td:nth-child(2),
.pedido-table th:nth-child(3),
.pedido-table td:nth-child(3) {
  text-align: left;
}

.pedido-table-client,
.pedido-table-detail {
  align-items: flex-start;
  text-align: left;
}

.pedido-table-client strong,
.pedido-table-detail strong,
.pedido-table-date strong,
.pedido-table-user strong {
  font-size: 1rem;
}

.pedido-table-client span,
.pedido-table-detail span,
.pedido-table-date span,
.pedido-table-user span {
  color: rgba(21, 21, 21, 0.58);
  font-size: 0.92rem;
}

.pedido-table-detail strong,
.pedido-table-detail span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  width: 100%;
}

.pedido-table-detail strong {
  max-width: 100%;
}

.pedido-table-user span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pedido-table-actions {
  display: flex;
  justify-content: center;
  white-space: nowrap;
}

.pedido-order-card {
  border: 1px solid rgba(21, 21, 21, 0.08);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 249, 255, 0.88));
  padding: 1.05rem 1.1rem;
  box-shadow: 0 14px 36px rgba(17, 24, 39, 0.08);
}

.pedido-order-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.pedido-order-meta {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pedido-order-top h4 {
  margin: 0.2rem 0 0;
  font-size: 1.1rem;
}

.pedido-order-top p {
  margin: 0.3rem 0 0;
  color: rgba(21, 21, 21, 0.58);
  font-size: 0.92rem;
}

.pedido-order-code {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.08);
  color: var(--title-indigo);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pedido-age-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: rgba(184, 123, 45, 0.16);
  color: var(--accent-dark);
  font-weight: 700;
  white-space: nowrap;
}

.pedido-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}

.pedido-status-chip.status-pendiente {
  background: rgba(185, 117, 24, 0.14);
  color: #9a6510;
}

.pedido-status-chip.status-en_preparacion {
  background: rgba(29, 78, 216, 0.12);
  color: #1d4ed8;
}

.pedido-status-chip.status-en_reparto {
  background: rgba(8, 145, 178, 0.12);
  color: #0f766e;
}

.pedido-status-chip.status-entregado {
  background: rgba(22, 163, 74, 0.14);
  color: #15803d;
}

.pedido-status-chip.status-archivado {
  background: rgba(100, 116, 139, 0.16);
  color: #475569;
}

.pedido-order-body {
  margin-top: 0.9rem;
  padding: 1rem;
  border-radius: 20px;
  background: white;
  border: 1px solid rgba(21, 21, 21, 0.06);
  display: grid;
  gap: 0.3rem;
}

.pedido-order-body strong {
  font-size: 1rem;
  line-height: 1.45;
}

.pedido-order-body span {
  color: rgba(21, 21, 21, 0.6);
  line-height: 1.55;
}

.pedido-order-footer {
  margin-top: 0.95rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.pedido-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.pedido-detail-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(21, 21, 21, 0.1);
  background: white;
  color: #111827;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.08);
}

.pedido-edit-button {
  background: rgba(17, 24, 39, 0.06);
}

.pedido-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.95rem;
}

.pedido-status-button {
  min-height: 40px;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(21, 21, 21, 0.1);
  background: white;
  color: #111827;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.pedido-status-button.active {
  background: #111827;
  border-color: #111827;
  color: white;
}

.pedido-order-card.archived {
  opacity: 0.86;
}

.pedido-history-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.pedido-history-more-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(21, 21, 21, 0.1);
  background: white;
  color: #111827;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.08);
}

.pedidos-history-shell {
  padding: 1.4rem;
  border-radius: 28px;
  border: 1px solid rgba(184, 123, 45, 0.16);
  background: linear-gradient(180deg, rgba(251, 246, 233, 0.84), rgba(255, 255, 255, 0.96));
}

.pedidos-history-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.pedidos-history-toolbar h3 {
  margin: 0;
  font-size: 1.45rem;
  font-family: var(--font-app, Inter), sans-serif;
}

.pedidos-history-toolbar p {
  margin: 0.35rem 0 0;
  color: rgba(21, 21, 21, 0.58);
}

.pedidos-history-search {
  min-width: min(320px, 100%);
  height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0 1rem;
  border-radius: 18px;
  border: 1px solid rgba(21, 21, 21, 0.1);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
}

.pedidos-history-search input {
  width: 100%;
  padding: 0;
  border: none;
  outline: none;
  background: transparent;
}

.pedidos-history-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.pedidos-history-client-card {
  width: 100%;
  text-align: left;
  display: grid;
  gap: 0.95rem;
  padding: 1.35rem 1.4rem;
  border-radius: 24px;
  border: 1px solid rgba(184, 123, 45, 0.16);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.pedidos-history-client-card:hover,
.pedidos-history-client-card.active {
  transform: translateY(-2px);
  border-color: rgba(234, 122, 0, 0.34);
  box-shadow: 0 18px 34px rgba(17, 24, 39, 0.08);
}

.pedidos-history-client-name {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.pedidos-history-client-name strong {
  font-size: 1.05rem;
  font-family: var(--font-app, Inter), sans-serif;
  line-height: 1.25;
}

.pedidos-history-client-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pedidos-history-client-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: rgba(21, 21, 21, 0.62);
}

.pedidos-history-client-count {
  min-height: 34px;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.06);
  font-size: 0.88rem;
  font-weight: 700;
  color: #111827;
}

.pedidos-history-orders {
  display: grid;
  gap: 1rem;
}

.pedidos-history-order-card {
  padding: 1.2rem;
  border-radius: 22px;
  border: 1px solid rgba(21, 21, 21, 0.08);
  background: rgba(255, 255, 255, 0.9);
}

.pedidos-history-order-top,
.pedidos-history-order-meta,
.pedidos-history-order-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.pedidos-history-order-top {
  align-items: flex-start;
}

.pedidos-history-order-top strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.4;
}

.pedidos-history-order-top p {
  margin: 0.35rem 0 0;
  color: rgba(21, 21, 21, 0.6);
  line-height: 1.5;
}

.pedidos-history-order-meta {
  margin-top: 0.9rem;
}

.pedidos-history-order-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: rgba(21, 21, 21, 0.62);
}

.pedidos-history-order-actions {
  margin-top: 1rem;
}

.pedidos-history-status-readonly {
  min-height: 44px;
  display: flex;
  align-items: center;
}

.pedido-archive-shell {
  padding: 1.45rem;
  border-radius: 28px;
  border: 1px solid rgba(184, 123, 45, 0.16);
  background: linear-gradient(180deg, rgba(246, 240, 224, 0.8), rgba(255, 255, 255, 0.96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.pedido-archive-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.pedido-archive-toolbar h4,
.pedido-archive-modal-header h3 {
  margin: 0;
  font-size: 1.5rem;
  font-family: var(--font-app, Inter), sans-serif;
}

.pedido-archive-toolbar p,
.pedido-archive-modal-header p,
.pedido-archive-card p {
  margin: 0.35rem 0 0;
  color: rgba(21, 21, 21, 0.6);
}

.pedido-archive-search {
  min-width: min(320px, 100%);
  height: 48px;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0 1rem;
  border-radius: 18px;
  border: 1px solid rgba(21, 21, 21, 0.1);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
}

.pedido-archive-search input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  padding: 0;
}

.pedido-archive-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.pedido-archive-card {
  width: 100%;
  text-align: left;
  display: grid;
  gap: 0.95rem;
  padding: 1.35rem 1.4rem;
  border: 1px solid rgba(184, 123, 45, 0.18);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.06);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.pedido-archive-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(17, 24, 39, 0.09);
  border-color: rgba(184, 123, 45, 0.32);
}

.pedido-archive-card strong {
  font-size: 1.35rem;
  line-height: 1.2;
  font-family: var(--font-app, Inter), sans-serif;
}

.pedido-archive-card-top,
.pedido-archive-meta,
.pedido-archive-modal-card-top,
.pedido-archive-modal-card-meta,
.pedido-archive-modal-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.pedido-archive-code,
.pedido-archive-count,
.pedido-archive-modal-stats span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.06);
  color: #111827;
  font-size: 0.88rem;
  font-weight: 700;
}

.pedido-archive-count {
  background: rgba(184, 123, 45, 0.12);
  color: var(--accent-dark);
}

.pedido-archive-meta span,
.pedido-archive-modal-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: rgba(21, 21, 21, 0.62);
  font-size: 0.94rem;
}

.pedido-archive-footer {
  display: flex;
  justify-content: center;
  margin-top: 1.2rem;
}

.pedido-archive-more {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(21, 21, 21, 0.1);
  border-radius: 999px;
  background: white;
  color: #111827;
  font-weight: 700;
  cursor: pointer;
}

.pedido-archive-modal {
  position: relative;
  width: min(980px, 100%);
  max-height: calc(100vh - 3rem);
  overflow: auto;
  border-radius: 28px;
  background: linear-gradient(180deg, #fffdf9 0%, #ffffff 100%);
  color: #111827;
  padding: 1.8rem;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(21, 21, 21, 0.08);
}

.pedido-archive-modal-stack,
.pedido-archive-modal-list {
  display: grid;
  gap: 1rem;
}

.pedido-archive-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-right: 3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(21, 21, 21, 0.08);
}

.pedido-archive-modal-title svg {
  color: #ea7a00;
}

.pedido-archive-modal-stats {
  display: grid;
  justify-items: end;
  gap: 0.45rem;
}

.pedido-archive-modal-stats strong {
  font-size: 1.35rem;
  font-family: var(--font-app, Inter), sans-serif;
}

.pedido-archive-modal-card {
  padding: 1.2rem;
  border-radius: 22px;
  border: 1px solid rgba(21, 21, 21, 0.08);
  background: rgba(255, 255, 255, 0.96);
}

.pedido-archive-modal-card-top {
  align-items: flex-start;
}

.pedido-archive-modal-card-top strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.4;
}

.pedido-archive-modal-card-top p {
  margin: 0.35rem 0 0;
  color: rgba(21, 21, 21, 0.6);
  line-height: 1.5;
}

@media (max-width: 1200px) {
  .pedido-orders-list {
    grid-template-columns: 1fr;
  }
}

.pedido-history-modal {
  position: relative;
  width: min(1020px, 100%);
  max-height: calc(100vh - 3rem);
  overflow: auto;
  border-radius: 28px;
  background: white;
  color: #111827;
  padding: 2rem;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.28);
}

@media (max-width: 1200px) {
  .pedido-table-wrap {
    overflow-x: auto;
  }
}

.pedido-history-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.06);
  color: #111827;
  cursor: pointer;
}

.pedido-history-stack {
  display: grid;
  gap: 1.75rem;
}

.pedido-history-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-right: 3rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(21, 21, 21, 0.08);
}

.pedido-history-header h3 {
  margin: 0;
  font-size: 1.85rem;
  line-height: 1.12;
}

.pedido-history-header p {
  margin: 0.35rem 0 0;
  color: rgba(21, 21, 21, 0.58);
}

.pedido-history-status-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pedido-history-panel {
  padding: 1.1rem 1.2rem;
  border-radius: 22px;
  border: 1px solid rgba(21, 21, 21, 0.08);
  background: rgba(248, 246, 242, 0.72);
}

.pedido-history-panel h4 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}

.pedido-history-top-card {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 320px);
  gap: 1.25rem;
  align-items: start;
  padding: 0 0 1.2rem;
  border: none;
  border-radius: 0;
  background: transparent;
  border-bottom: 1px solid rgba(21, 21, 21, 0.08);
}

.pedido-history-client-block {
  display: grid;
  gap: 0.5rem;
  min-width: 0;
}

.pedido-history-client-block strong {
  display: block;
  font-size: 1.55rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.pedido-history-description-text {
  white-space: pre-line;
  line-height: 1.4;
}

.pedido-history-client-block small {
  display: block;
  color: rgba(21, 21, 21, 0.58);
  line-height: 1.45;
}

.pedido-history-label {
  display: block;
  color: rgba(21, 21, 21, 0.58);
  font-size: 0.92rem;
}

.pedido-history-status-editor {
  min-width: 0;
  display: grid;
  gap: 0.6rem;
  align-content: start;
}

.pedido-history-status-box {
  display: grid;
  gap: 0.9rem;
  align-content: start;
}

.pedido-history-status-editor select {
  width: 100%;
  height: 44px;
  border-radius: 16px;
  border: 1px solid rgba(21, 21, 21, 0.12);
  background: white;
  padding: 0 0.95rem;
  outline: none;
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.07);
}

.pedido-history-status-editor select:focus {
  border-color: rgba(79, 70, 229, 0.36);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.pedido-history-status-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.pedido-history-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
}

.pedido-history-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem 1rem;
}

.pedido-history-grid span {
  display: block;
  margin-bottom: 0.25rem;
  color: rgba(21, 21, 21, 0.58);
  font-size: 0.9rem;
}

.pedido-history-grid strong {
  display: block;
  font-size: 1rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.pedido-history-note {
  padding: 1rem 1.05rem;
  border-radius: 18px;
  background: white;
  border: 1px solid rgba(21, 21, 21, 0.06);
  white-space: pre-wrap;
  line-height: 1.6;
}

.pedido-history-section h4 {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}

.pedido-history-divider {
  height: 1px;
  background: rgba(21, 21, 21, 0.08);
}

.pedido-history-timeline {
  position: relative;
  margin-left: 0.4rem;
  padding-left: 1.45rem;
  border-left: 1px solid rgba(21, 21, 21, 0.1);
  display: grid;
  gap: 1.45rem;
}

.pedido-history-entry {
  position: relative;
  padding-bottom: 0.1rem;
}

.pedido-history-dot {
  position: absolute;
  left: -1.78rem;
  top: 0.24rem;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 3px solid white;
  box-shadow: 0 0 0 1px rgba(21, 21, 21, 0.12);
}

.pedido-history-dot.created {
  background: #3b82f6;
}

.pedido-history-dot.updated {
  background: #4f46e5;
}

.pedido-history-dot.pendiente {
  background: #b97718;
}

.pedido-history-dot.preparacion {
  background: #2563eb;
}

.pedido-history-dot.reparto {
  background: #0891b2;
}

.pedido-history-dot.entregado {
  background: #16a34a;
}

.pedido-history-dot.archived {
  background: #64748b;
}

.pedido-history-dot.restored {
  background: #7c3aed;
}

.pedido-history-entry-body {
  display: grid;
  gap: 0.28rem;
}

.pedido-history-entry-body strong {
  font-size: 1rem;
  line-height: 1.35;
}

.pedido-history-entry-body span,
.pedido-history-entry-body small {
  color: rgba(21, 21, 21, 0.58);
  line-height: 1.4;
}

.pedido-history-delivery-card {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1.2rem 1.3rem;
  border-radius: 22px;
  border: 1px solid rgba(21, 21, 21, 0.08);
  background: rgba(255, 255, 255, 0.96);
}

.pedido-history-delivery-card span {
  display: block;
  color: rgba(21, 21, 21, 0.58);
  margin-bottom: 0.3rem;
}

.pedido-history-delivery-card strong {
  display: block;
  font-size: 1.25rem;
  line-height: 1.25;
}

.pedido-delivery-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  color: white;
  white-space: nowrap;
}

.pedido-delivery-chip.ok {
  background: #22c55e;
}

.pedido-delivery-chip.warning {
  background: #f59e0b;
}

.pedido-delivery-chip.late {
  background: #ef4444;
}

.spin-icon {
  animation: spin 1s linear infinite;
}

.share-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(22, 22, 24, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.share-modal {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 3rem);
  overflow: auto;
  border-radius: 28px;
  background: #1f1f22;
  color: white;
  padding: 2rem;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
}

.share-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  z-index: 2;
}

.share-modal-hint {
  margin: 1.8rem 0 1rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
}

.share-preview-card {
  width: 100%;
  border-radius: 24px;
  background: #ffffff;
  color: #111827;
  padding: 1.4rem;
}

.share-preview-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 2px solid rgba(17, 24, 39, 0.08);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
}

.share-brand {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #1d4ed8;
}

.share-preview-top h3,
.share-preview-expenses h4 {
  margin: 0;
  font-family: var(--font-app, Inter), sans-serif;
}

.share-date-block {
  text-align: right;
}

.share-date-block span,
.share-preview-grid span,
.share-preview-difference span,
.share-preview-expenses p {
  display: block;
  font-size: 0.85rem;
  color: rgba(17, 24, 39, 0.66);
}

.share-date-block strong,
.share-preview-grid strong,
.share-preview-difference strong {
  display: block;
  font-size: 1rem;
}

.share-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem 1rem;
}

.share-preview-difference {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: rgba(29, 78, 216, 0.08);
}

.share-preview-expenses {
  margin-top: 1rem;
}

.supplier-order-share-preview {
  border-radius: 20px;
  padding: 1.25rem;
}

.supplier-order-share-banner {
  margin-bottom: 0.75rem;
  border-radius: 14px;
  overflow: hidden;
  background: #f3f4f6;
}

.supplier-order-share-banner img {
  display: block;
  width: 100%;
  height: 132px;
  object-fit: contain;
  object-position: center;
}

.supplier-order-share-top {
  align-items: flex-start;
}

.supplier-order-share-top p {
  margin: 0.35rem 0 0;
  color: #6b7280;
  font-size: 0.95rem;
}

.supplier-order-share-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 1rem;
}

.supplier-order-share-meta div {
  padding: 0.7rem 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #f8fafc;
}

.supplier-order-share-meta span {
  display: block;
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.supplier-order-share-meta strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.92rem;
}

.supplier-order-share-table {
  overflow-x: auto;
}

.supplier-order-share-table table {
  width: 100%;
  border-collapse: collapse;
}

.supplier-order-share-table th,
.supplier-order-share-table td {
  border: 1px solid #d1d5db;
  padding: 11px 12px;
  text-align: left;
  font-size: 0.9rem;
}

.supplier-order-share-table th {
  background: #f8fafc;
  color: #111827;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
}

.supplier-order-share-note {
  margin-top: 1rem;
}

.supplier-order-fallback-modal {
  width: min(760px, 100%);
}

.supplier-order-fallback-image {
  display: block;
  width: 100%;
  max-height: min(62vh, 720px);
  object-fit: contain;
  border-radius: 18px;
  background: #ffffff;
}

.supplier-order-download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.share-preview-bills {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.share-preview-bills-group h4 {
  margin: 0 0 0.65rem;
  font-family: var(--font-app, Inter), sans-serif;
}

.share-preview-bills-group p {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(17, 24, 39, 0.66);
}

.share-preview-bills-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.share-preview-bills-group li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

.share-preview-expenses ul {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
}

.share-preview-expenses li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

.share-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1.4rem;
}

.share-action-tile {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.9rem;
  border: none;
  border-radius: 22px;
  background: #f3f4f6;
  color: #262626;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.share-footer-actions {
  margin-top: 1.2rem;
}

.share-primary-button {
  width: 100%;
  height: 56px;
  border-radius: 18px;
  background: #1976d2;
  border: none;
  color: #ffffff;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  cursor: pointer;
}

.share-secondary-row {
  margin-top: 0.8rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.share-light-button {
  height: 48px;
  border: none;
  border-radius: 16px;
  background: #f3f4f6;
  color: #222;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.share-primary-button,
.secondary-button,
.danger-button {
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 860px) {
  .dashboard-shell,
  .card-grid,
  .summary-grid,
  .two-column-grid,
  .metric-list,
  .cash-layout,
  .cash-meta-grid,
  .final-summary-list,
  .user-form-grid,
  .employee-form-grid,
  .form-advanced-grid,
  .salary-month-grid,
  .salary-overview-grid,
  .salary-employee-grid,
  .crm-summary-grid,
  .crm-filters-grid,
  .crm-charts-grid,
  .crm-alert-grid,
  .crm-profile-grid,
  .crm-profile-stats,
  .crm-comparison-grid,
  .crm-followup-form {
    grid-template-columns: 1fr;
  }

  .crm-profile-grid {
    max-height: calc(100vh - 7rem);
  }

  .crm-profile-title {
    align-items: flex-start;
  }

  .crm-avatar {
    width: 48px;
    height: 48px;
    border-radius: 15px;
  }

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

  .salary-toolbar,
  .salary-month-top,
  .salary-week-row {
    grid-template-columns: 1fr;
  }

  .salary-home-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .salary-receipt-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 110;
    width: min(320px, calc(100vw - 1.5rem));
    height: 100vh;
    transform: translateX(-110%);
    transition: transform 220ms ease;
    box-shadow: 0 24px 70px rgba(17, 24, 39, 0.28);
  }

  .dashboard-sidebar.open {
    transform: translateX(0);
  }

  .dashboard-main {
    padding-top: 0;
  }

  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: sticky;
    top: 0;
    z-index: 90;
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.15rem 0;
  }

  .mobile-menu-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 46px;
    min-width: 120px;
    padding: 0 1rem;
    border: none;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.18);
  }

  .mobile-nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 109;
    border: none;
    background: rgba(17, 24, 39, 0.42);
  }

  .sidebar-mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
  }

  .hero-panel,
  .topbar {
    align-items: start;
    flex-direction: column;
  }

  .dashboard-order-item {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .dashboard-order-meta {
    justify-items: flex-start;
    text-align: left;
  }

  .expense-row {
    grid-template-columns: 1fr;
  }

  .actions-grid {
    flex-direction: column;
  }

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

  .faltantes-tabs {
    flex-direction: column;
  }

  .share-actions-grid,
  .share-preview-grid,
  .share-preview-bills,
  .share-secondary-row {
    grid-template-columns: 1fr;
  }

  .faltantes-modal-grid {
    grid-template-columns: 1fr;
  }

  .faltantes-modal-product {
    grid-column: auto;
  }

  .faltantes-modal-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .pedidos-summary-grid {
    grid-template-columns: 1fr;
  }

  .mysql-form-grid,
  .pedido-form-grid,
  .envios-form-grid,
  .envios-fields-grid,
  .envios-template-switch,
  .envio-print-grid,
  .envios-banner-config-grid,
  .supplier-order-modal-grid,
  .supplier-orders-filters,
  .supplier-order-modal-meta,
  .supplier-order-preview-row,
  .supplier-order-items-head,
  .supplier-order-items-row {
    grid-template-columns: 1fr;
  }

  .supplier-order-items-table.with-delivery .supplier-order-items-head,
  .supplier-order-items-table.with-delivery .supplier-order-items-row {
    grid-template-columns: 1fr;
  }

  .supplier-order-receive-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .supplier-order-receive-toolbar div {
    justify-content: flex-start;
  }

  .supplier-order-provider-field,
  .supplier-order-notes-field,
  .supplier-order-selected-summary {
    grid-column: auto;
    grid-row: auto;
  }

  .envios-notes-field {
    grid-column: auto;
  }

  .pedido-order-top {
    flex-direction: column;
  }

  .pedido-order-meta {
    justify-content: flex-start;
  }

  .pedido-order-footer,
  .pedido-history-header,
  .pedido-history-top-card,
  .pedido-history-sections,
  .pedido-archive-toolbar,
  .pedido-archive-modal-header,
  .pedidos-history-toolbar,
  .pedidos-history-order-top,
  .pedidos-history-order-meta,
  .pedidos-history-order-actions {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .envios-history-top,
  .envios-tracking-row,
  .envios-form-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .pedido-history-status-group {
    justify-content: flex-start;
  }

  .pedido-history-status-editor {
    min-width: 0;
    width: 100%;
  }

  .pedido-history-delivery-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .pedido-history-grid {
    grid-template-columns: 1fr;
  }

  .pedido-archive-grid {
    grid-template-columns: 1fr;
  }

  .pedidos-history-grid {
    grid-template-columns: 1fr;
  }

  .envios-history-grid,
  .envios-history-top {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 8mm;
  }

  html,
  body {
    width: auto;
    min-height: auto;
    margin: 0;
    padding: 0;
    background: #fff;
    overflow: visible;
  }

  .page-stack > * {
    display: none !important;
  }

  .page-stack > .print-only-shipping-sheet {
    display: block !important;
  }

  .print-only-shipping-sheet,
  .print-only-shipping-sheet * {
    visibility: visible !important;
  }

  .print-only-shipping-sheet {
    margin: 0;
    padding: 0;
  }

  .print-only-shipping-sheet .print-sheet {
    position: static;
    width: 100%;
    max-width: 194mm;
    margin: 0 auto;
    padding: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    box-sizing: border-box;
    break-inside: avoid-page;
    page-break-inside: avoid;
    transform: none;
  }

  .envio-print-sheet {
    padding: 0;
  }

  .envio-print-sheet * {
    line-height: 1.2;
  }

  .envio-print-banner {
    width: 100%;
    margin: 0 0 2.5mm;
  }

  .envio-print-banner.bottom {
    margin: 2.5mm 0 0;
  }

  .envio-print-banner img {
    height: auto;
    max-height: none;
    border-radius: 0;
    object-fit: contain;
  }

  .envio-print-header {
    gap: 2mm;
    margin-bottom: 2.5mm;
  }

  .envio-print-mark {
    width: 4mm;
    height: 4mm;
    border-width: 0.6mm;
  }

  .envio-print-header h3 {
    font-size: 11pt;
  }

  .envio-print-section + .envio-print-section {
    margin-top: 2.5mm;
  }

  .envio-print-section h4 {
    margin-bottom: 1.5mm;
    font-size: 8pt;
  }

  .envio-print-grid {
    gap: 1.5mm 3mm;
  }

  .envio-print-grid div {
    min-height: 8mm;
    padding-bottom: 1mm;
  }

  .envio-print-grid .envio-print-wide {
    grid-column: 1 / -1;
  }

  .envio-print-grid span {
    font-size: 6pt;
  }

  .envio-print-grid strong {
    font-size: 7.5pt;
  }

  .envio-print-footer {
    margin-top: 2.5mm;
    padding-top: 1.5mm;
    font-size: 6.5pt;
  }

  .no-print {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .login-page,
  .dashboard-main {
    padding: 1rem;
  }

  .sidebar-shell {
    padding: 1rem 0.85rem 1.2rem;
  }

  .sidebar-logo {
    height: 120px;
    margin-bottom: 1rem;
  }

  .sidebar-link,
  .sidebar-logout {
    padding: 0.85rem 0.95rem;
    border-radius: 18px;
  }

  .login-card,
  .hero-panel,
.panel-card,
.info-card,
.summary-card,
.topbar {
  border-radius: 22px;
}

#caja-diaria,
#caja-grande,
#historial-cajas {
  scroll-margin-top: 1rem;
}

  .employee-notes {
    grid-column: auto;
  }

  .hero-panel,
  .panel-card {
    padding: 1.1rem;
  }

  .users-title,
  .hero-panel h2 {
    font-size: clamp(1.6rem, 8vw, 2.2rem);
  }

  .task-card,
  .dashboard-task-item,
  .dashboard-order-item,
  .history-month-summary,
  .history-day-top,
  .history-day-grid,
  .tasks-day-grid,
  .envios-history-grid {
    grid-template-columns: 1fr;
  }

  .task-action-button,
  .secondary-button,
  .danger-button,
  .dashboard-order-link {
    width: 100%;
  }

  .task-actions-group {
    width: 100%;
  }

  .pedidos-submenu {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .pedidos-submenu-item {
    width: 100%;
  }

  .pedido-form-actions,
  .mysql-form-actions,
  .envios-form-actions,
  .history-day-actions,
  .salary-month-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .pedido-table-wrap,
  .users-table-wrap,
  .cash-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .pedido-archive-shell,
  .pedido-archive-modal,
  .pedidos-history-shell {
    padding: 1.1rem;
  }
}

@media (min-width: 861px) {
  .mobile-topbar,
  .sidebar-mobile-head,
  .mobile-nav-backdrop {
    display: none;
  }
}

.mobile-topbar {
  width: 100%;
}

.mobile-menu-button {
  cursor: pointer;
}

.sidebar-mobile-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.84);
}

.sidebar-mobile-close {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

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

.search-input-shell {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-shell svg {
  position: absolute;
  left: 0.9rem;
  color: rgba(21, 21, 21, 0.42);
  pointer-events: none;
}

.search-input-shell input {
  width: 100%;
  padding-left: 2.7rem;
}

.pedidos-form-modern {
  align-items: start;
}

.pedido-order-card-modern {
  border-left: 4px solid transparent;
}

.pedido-order-card-modern.urgency-warning,
.faltantes-row.urgency-warning td {
  background: rgba(245, 158, 11, 0.08);
}

.pedido-order-card-modern.urgency-late,
.faltantes-row.urgency-late td {
  background: rgba(239, 68, 68, 0.08);
}

.pedido-order-card-modern.urgency-ready {
  background: rgba(16, 185, 129, 0.08);
}

.pedido-order-card-modern.urgency-warning {
  border-left-color: #f59e0b;
}

.pedido-order-card-modern.urgency-late {
  border-left-color: #ef4444;
}

.pedido-order-card-modern.urgency-ready {
  border-left-color: #10b981;
}

.pedido-age-chip.urgency-warning {
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.pedido-age-chip.urgency-late {
  background: rgba(239, 68, 68, 0.14);
  color: #b91c1c;
}

.pedido-age-chip.urgency-ready {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
}

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

.dashboard-action-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.dashboard-action-card:hover {
  transform: translateY(-2px);
}

.faltantes-row td {
  transition: background-color 0.18s ease;
}

.faltantes-tab span {
  margin-left: 0.45rem;
  opacity: 0.65;
}
