/* Sistema visual global del POS. Los colores indican la intención de la acción. */
:root {
  --pos-primary:#1d4ed8; --pos-primary-dark:#1e3a8a; --pos-primary-soft:#eff6ff;
  --pos-info:#0369a1; --pos-success:#15803d; --pos-warning:#b45309; --pos-danger:#b91c1c;
  --pos-surface:#fff; --pos-background:#f1f5f9; --pos-border:#dbe3ee;
  --pos-text:#172033; --pos-muted:#64748b; --pos-radius:12px;
  --pos-shadow:0 1px 3px rgba(15,23,42,.09); --pos-transition:160ms ease;
}
html{background:var(--pos-background)}
body.pos-app{min-height:100vh;margin:0;color:var(--pos-text);background:radial-gradient(circle at 100% 0,rgba(29,78,216,.07),transparent 28rem),var(--pos-background);font-family:"Inter","Roboto","Segoe UI",sans-serif;-webkit-font-smoothing:antialiased}
body.pos-app *{scrollbar-color:#94a3b8 transparent;scrollbar-width:thin}
body.pos-app *:focus-visible{outline:3px solid rgba(37,99,235,.28);outline-offset:2px}
.pos-shell,.pos-main-content{background:transparent}
.pos-appbar{color:#fff!important;background:linear-gradient(110deg,#172554 0%,#1e3a8a 52%,#1d4ed8 100%)!important;border-bottom:1px solid rgba(255,255,255,.14);box-shadow:0 8px 24px rgba(15,23,42,.16)!important}
.pos-appbar .mud-typography{font-weight:700;letter-spacing:-.02em}
.pos-drawer{background:rgba(255,255,255,.97)!important;border-right:1px solid var(--pos-border)!important;box-shadow:8px 0 28px rgba(15,23,42,.05)!important}
.pos-drawer .mud-nav-link,.pos-drawer .mud-nav-group{border-radius:8px}
.pos-drawer .mud-nav-link{margin:2px 8px;transition:all var(--pos-transition)}
.pos-drawer .mud-nav-link:hover{background:var(--pos-primary-soft);transform:translateX(2px)}
.pos-drawer .mud-nav-link.active:not(.mud-disabled){color:var(--pos-primary-dark);background:#dbeafe;font-weight:700}
.mud-paper{border-color:var(--pos-border)!important}
.mud-paper.rounded-lg,.mud-dialog{border-radius:16px!important}
.mud-paper.mud-paper-outlined{background:rgba(255,255,255,.97);box-shadow:var(--pos-shadow)}
.mud-main-content>.mud-container>.mud-paper:first-of-type{border-left:4px solid var(--pos-primary)!important}
.mud-typography-h4,.mud-typography-h5,.mud-typography-h6{color:var(--pos-text);letter-spacing:-.025em}
.mud-typography-body2,.mud-typography-caption{color:var(--pos-muted)}
/* Botones: verde crea/activa, azul guarda, celeste consulta/edita y rojo destruye. */
.mud-button-root{min-height:40px;border-radius:10px!important;padding-inline:16px!important;font-weight:700!important;letter-spacing:.005em!important;text-transform:none!important;transition:transform var(--pos-transition),box-shadow var(--pos-transition)!important}
.mud-button-root:not(.mud-disabled):hover{transform:translateY(-1px);box-shadow:0 6px 16px rgba(15,23,42,.13)}
.mud-button-root:not(.mud-disabled):active{transform:none;box-shadow:none}
.mud-button-filled-primary{background:var(--pos-primary)!important}
.mud-button-filled-info{background:var(--pos-info)!important}
.mud-button-filled-success{background:var(--pos-success)!important}
.mud-button-filled-warning{background:var(--pos-warning)!important}
.mud-button-filled-error{background:var(--pos-danger)!important}
.mud-button-outlined-primary,.mud-button-outlined-info,.mud-button-outlined-success,.mud-button-outlined-warning,.mud-button-outlined-error{border-width:1px!important;background:#fff!important}
.pos-action-neutral{color:#475569!important;border-color:#cbd5e1!important;background:#fff!important}
.pos-action-neutral:hover{color:var(--pos-text)!important;background:#f8fafc!important}
.pos-action-retry{color:var(--pos-primary)!important;border-color:#93c5fd!important;background:var(--pos-primary-soft)!important}
.mud-icon-button{border-radius:10px!important;transition:all var(--pos-transition)!important}
.mud-icon-button:not(.mud-disabled):hover{transform:translateY(-1px);background:rgba(148,163,184,.14);box-shadow:0 4px 12px rgba(15,23,42,.09)}
.mud-disabled{opacity:.58!important}
.mud-input-outlined-border{border-color:#cbd5e1!important;border-radius:10px!important}
.mud-input-control:focus-within .mud-input-outlined-border{border-color:var(--pos-primary)!important;box-shadow:0 0 0 3px rgba(37,99,235,.11)}
.mud-input-label{color:#475569!important;font-weight:600!important}
.mud-table-container,.mud-data-grid{border:1px solid var(--pos-border);border-radius:var(--pos-radius);background:#fff;overflow-x:auto}
.mud-table-head .mud-table-cell,.table-head-bordered .mud-table-cell{color:#1e3a5f!important;background:#eff6ff!important;border-bottom:1px solid #bfdbfe!important;font-weight:700!important;white-space:nowrap}
.mud-table-row{transition:background-color var(--pos-transition)}
.mud-table-body .mud-table-row:hover,.mud-table-row:hover{background:#f8fbff!important}
.mud-table-cell{border-color:#e8eef6!important}
.mud-pagination .mud-pagination-item{border-radius:9px!important}
.mud-dialog-container{padding:16px}
.mud-dialog{overflow:hidden;border:1px solid var(--pos-border);box-shadow:0 24px 70px rgba(15,23,42,.24)!important}
.mud-alert,.mud-snackbar-content{border-radius:var(--pos-radius)!important}
.mud-snackbar-content{box-shadow:0 10px 30px rgba(15,23,42,.15)!important}
.mud-chip{border-radius:999px!important;font-weight:650}
.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px;background:radial-gradient(circle at 12% 12%,rgba(59,130,246,.32),transparent 28rem),radial-gradient(circle at 88% 90%,rgba(14,165,233,.18),transparent 24rem),linear-gradient(135deg,#0f172a 0%,#172554 55%,#1e3a8a 100%)}
.pos-login-card{width:100%;max-width:440px;border-radius:20px!important;background:rgba(255,255,255,.97)!important;box-shadow:0 30px 80px rgba(2,6,23,.35)!important}
@media(max-width:959.98px){.pos-main-content{padding-inline:16px!important}.mud-main-content>.mud-container{padding-inline:0!important}}
@media(max-width:599.98px){.pos-main-content{padding:72px 10px 16px!important}.mud-paper.rounded-lg,.mud-dialog{border-radius:var(--pos-radius)!important}.mud-dialog-container{padding:8px}.mud-button-root{min-height:44px}.mud-table-cell{padding-inline:10px!important}.login-page{padding:14px}.pos-login-card{padding:24px!important}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}}


/* Uniformidad de páginas y búsquedas. */
.pos-app-title,
.pos-appbar .pos-app-title,
.pos-appbar .mud-typography.pos-app-title {
  color:#fff!important;
  opacity:1!important;
}
.pos-appbar .mud-icon-button,
.pos-appbar .mud-button-root {
  color:#fff!important;
}
.pos-page-container {
  padding-top:24px!important;
  padding-bottom:16px!important;
}
.pos-page-container:first-child {
  margin-top:0!important;
}
.mud-table-toolbar {
  min-height:72px;
  overflow:visible!important;
  align-items:center;
}
.pos-search-field {
  min-width:280px;
  margin-top:10px!important;
  margin-bottom:10px!important;
}
.pos-search-field .mud-input-label {
  z-index:1;
  padding-inline:5px;
  color:#334155!important;
  background:var(--pos-surface);
  font-weight:650!important;
}
.pos-search-field input::placeholder {
  color:#64748b!important;
  opacity:1!important;
}
.mud-table-toolbar .pos-search-field {
  width:min(100%,460px);
}
.mud-dialog .pos-search-field {
  width:100%;
}
.pos-responsive-dialog {
  width:min(100%,calc(100vw - 24px));
  max-width:100%;
  max-height:calc(100vh - 24px);
  max-height:calc(100dvh - 24px);
  overflow:hidden;
}
.pos-responsive-dialog .mud-dialog-content {
  min-width:0;
  max-width:100%;
  max-height:calc(100vh - 9rem);
  max-height:calc(100dvh - 9rem);
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
.pos-responsive-dialog .pos-dialog-body {
  width:100%;
  min-width:0;
  max-width:100%;
}
.pos-responsive-dialog .mud-dialog-actions,
.pos-responsive-dialog .pos-dialog-actions-responsive {
  flex-wrap:wrap;
}
@media(max-width:599.98px) {
  .pos-page-container {
    padding-top:16px!important;
    padding-bottom:10px!important;
  }
  .mud-table-toolbar {
    min-height:82px;
    padding-inline:8px!important;
  }
  .mud-table-toolbar .pos-search-field,
  .pos-search-field {
    width:100%;
    min-width:0;
  }
  .pos-responsive-dialog {
    width:calc(100vw - 16px);
    max-height:calc(100vh - 16px);
    max-height:calc(100dvh - 16px);
    margin:8px;
  }
  .pos-responsive-dialog .mud-dialog-content {
    max-height:calc(100vh - 8rem);
    max-height:calc(100dvh - 8rem);
    padding:12px!important;
  }
  .pos-responsive-dialog .pos-dialog-body {
    padding:0!important;
  }
  .pos-responsive-dialog .mud-dialog-actions,
  .pos-responsive-dialog .pos-dialog-actions-responsive {
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:8px;
    padding:12px!important;
  }
  .pos-responsive-dialog .mud-dialog-actions .mud-button-root,
  .pos-responsive-dialog .pos-dialog-actions-responsive .mud-button-root {
    width:100%;
    margin:0!important;
  }
}
