/* Identidad visual tomada del logotipo de Se Vienen Cositas. */
:root {
  --ink: #20292c;
  --muted: #677174;
  --canvas: #f5f5f2;
  --paper: #fff;
  --accent: #ed792d;
  --accent-dark: #ca5e1d;
  --mint: #e2eee8;
  --blue: #e5ebec;
}

[hidden] { display: none !important; }
.sidebar { background: #222b2e; }
.brand {
  display: block;
  margin: 0 0 34px;
  padding: 5px 0;
}
.brand-logo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 92px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .3));
}

nav a.active, nav a:hover { background: #374246; }
.sidebar-note { background: #303a3d; }
.stat:first-child .stat-icon { background: #fff0e4; color: #bf561a; }
.stat:nth-child(2) .stat-icon { color: #47775d; }
.stat:nth-child(3) .stat-icon { color: #a85e1c; }
.stat:nth-child(4) .stat-icon { color: #496d77; }
.primary { box-shadow: 0 4px 10px rgba(237, 121, 45, .25); }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.logout-button { padding: 10px 12px; border: 1px solid #e5d8d0; border-radius: 9px; background: #fffaf7; color: #9d5123; font-size: 12px; font-weight: 700; }
.logout-button:hover, .logout-button:focus-visible { background: #fff0e6; outline-color: #ed792d; }
.sidebar-overlay { display: none; }
.bar { background: #ed9b67; }
.alert-number { color: #c6601d; }

/* Los accesos del dashboard se sienten como botones sin perder la estética. */
.stat button.stat-icon { transition: transform .15s ease, filter .15s ease; }
.stat button.stat-icon:hover, .stat button.stat-icon:focus-visible {
  transform: translateY(-2px);
  filter: brightness(.94);
  outline: 2px solid #ed792d;
  outline-offset: 2px;
}

.product-cell { display: flex; align-items: center; gap: 10px; }
.product-thumbnail, .product-placeholder {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 9px;
}
.product-thumbnail { object-fit: cover; border: 1px solid #e4e0db; cursor: zoom-in; }
.product-placeholder {
  display: grid;
  place-items: center;
  background: #fff0e4;
  color: #bd5d23;
  font-size: 14px;
  font-weight: 700;
}
.image-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px;
  border: 1px dashed #d8a783;
  border-radius: 9px;
  background: #fff9f5;
}
.image-preview.hidden { display: none; }
.image-preview img { width: 64px; height: 64px; object-fit: cover; border-radius: 7px; }
.address-form-heading { border-top: 1px solid #ece8e3; margin-top: 4px; padding-top: 16px; }
.address-form-heading h3 { margin: 0; font-size: 15px; }
.address-form-heading p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.client-address { margin: 0 0 16px; padding: 12px; border-radius: 8px; background: #fff8f2; font-size: 12px; }
.client-address strong, .client-address span { display: block; }
.client-address span { color: var(--muted); margin-top: 4px; }
.order-delivery-address { margin: 0 0 15px; padding: 12px; border-left: 3px solid #ed792d; border-radius: 0 8px 8px 0; background: #fff8f2; font-size: 12px; }
.order-delivery-address strong, .order-delivery-address span { display: block; }
.order-delivery-address span { color: var(--muted); margin-top: 4px; line-height: 1.45; }
.order-delivery-address.missing { border-left-color: #c8a46b; background: #fffaf0; }
.sent { color: #3f7183; background: #e3f0f4; }
.standby { color: #716490; background: #eeeafb; }
.banned { color: #b93f3f; background: #ffe5e5; }
.payment-history { margin: 0 0 16px; padding: 12px; border: 1px solid #ece8e3; border-radius: 9px; background: #fffdfa; }
.payment-history h3 { margin: 0 0 7px; font-size: 13px; }
.payment-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid #f0ede8; font-size: 12px; }
.payment-row span { color: var(--muted); }
.payment-row strong { color: #39785b; }
.checkbox-label { display: flex; align-items: center; gap: 9px; padding: 10px 0 0; cursor: pointer; }
.checkbox-label input { width: 17px; height: 17px; accent-color: #ed792d; }
.checkbox-label span { font-size: 12px; font-weight: 600; }
.danger-link { color: #b75050; }
.auth-root { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 20px; background: #222b2e; }
.auth-card { width: min(410px, 100%); padding: 28px; border-radius: 16px; background: #fffefa; box-shadow: 0 18px 50px rgba(0,0,0,.3); }
.auth-logo { width: 190px; display: block; margin: 0 auto 22px; }
.auth-card h1 { font-family: "Playfair Display", serif; font-size: 25px; margin: 0; }
.auth-card p { margin: 7px 0 21px; color: var(--muted); font-size: 13px; }
.auth-card form { display: grid; gap: 13px; }
.auth-card .primary { width: 100%; margin-top: 5px; }
.auth-switch { width: 100%; margin-top: 12px; background: transparent; color: #9e501f; font-size: 12px; font-weight: 700; }
.auth-error { min-height: 18px; color: #b93f3f; font-size: 12px; margin: 0 !important; }
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-row select { width: 170px; }
@media (max-width: 520px) {
  .topbar-actions { gap: 6px; }
  .logout-button { padding: 10px; }
  .logout-button span { display: none; }
  .orders-toolbar { align-items: flex-start; }
  .filter-row { width: 100%; }
  .filter-row .search, .filter-row select { width: 100%; }
}
.full-product-image {
  display: block;
  width: 100%;
  max-height: 65vh;
  object-fit: contain;
  border-radius: 10px;
  background: #f5f5f2;
}
.monthly-heading { margin-top: 34px; }
.pending-orders-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 17px; }
.order-panel-head { display: flex; justify-content: space-between; align-items: flex-start; }
.order-count { display: grid; place-items: center; min-width: 29px; height: 29px; border-radius: 50%; font-size: 12px; font-weight: 700; }
.payment-count { color: #a85e1c; background: #fff0df; }
.shipping-count { color: #497078; background: #e6f0f1; }
.order-alert-list { margin-top: 8px; }
.order-alert { width: 100%; background: transparent; text-align: left; padding: 12px 0; border-top: 1px solid #ece8e3; display: flex; justify-content: space-between; align-items: center; gap: 12px; color: var(--ink); }
.order-alert:first-child { border-top: 0; }
.order-alert strong, .order-alert small { display: block; }
.order-alert strong { font-size: 13px; }
.order-alert small { color: var(--muted); font-size: 11px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 210px; }
.order-alert span { color: #bd5d23; font-size: 11px; font-weight: 700; white-space: nowrap; }
.compact-empty { padding: 22px 0 8px; }
.monthly-profit-card { padding: 24px 26px 18px; }
.monthly-chart {
  height: 235px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: 18px;
}
.monthly-column { height: 100%; display: grid; grid-template-rows: 22px 1fr 21px; gap: 7px; text-align: center; }
.monthly-column strong { font-size: 11px; color: #566166; white-space: nowrap; }
.monthly-column > span { font-size: 11px; color: #70797c; text-transform: capitalize; }
.monthly-track { display: flex; align-items: end; height: 100%; border-bottom: 1px solid #e8e4df; }
.monthly-bar { width: 100%; min-height: 4px; border-radius: 7px 7px 0 0; background: linear-gradient(180deg, #f3a166, #e66f25); }
.monthly-bar.zero { min-height: 0; }
@media (max-width: 520px) {
  .pending-orders-grid { grid-template-columns: 1fr; }
  .monthly-profit-card { padding: 18px 11px 13px; }
  .monthly-chart { gap: 6px; height: 205px; }
  .monthly-column strong { font-size: 9px; transform: rotate(-38deg); transform-origin: center; }
  .monthly-column > span { font-size: 10px; }
}

@media (max-width: 800px) {
  .sidebar-overlay { position: fixed; inset: 0; z-index: 3; border: 0; background: rgba(18, 29, 32, .42); }
  .sidebar-overlay.open { display: block; }
}
