/* FUENTES */

@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-weight: 400;
  src: local("Noto Sans"), local("NotoSans"),
    url(noto_sans/noto_sans_400.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-weight: 700;
  src: local("Noto Sans Bold"), local("NotoSans-Bold"),
    url(noto_sans/noto_sans_700.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212,
    U+2215, U+FEFF, U+FFFD;
}

/* RESET */

* {
  font-family: "Noto Sans", verdana, arial;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-weight: normal;
  color: inherit;
  user-select: none;
}

*:focus {
  outline: 0;
}

html {
  scroll-behavior: smooth;
}

video {
  max-width: 100%;
}

strong {
  font-weight: bold;
}

ul,
ol {
  list-style: none;
}

a {
  text-decoration: none;
}

select option:hover {
  background-color: red;
}

select:disabled {
  opacity: 0.95;
  cursor: not-allowed;
}

/* ELEMENTOS DE FORMULARIO BASE */

input,
textarea,
button,
select {
  border-radius: 10px;
  border: none;
  padding: 6px 8px;
  font-size: 14px;
}

button,
input[type="button"],
input[type="submit"] {
  cursor: pointer;
  background: transparent;
}

button:disabled,
input[type="button"]:disabled,
input[type="submit"]:disabled,
.efectoBoton:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

input:read-only,
textarea:read-only {
  cursor: not-allowed;
}

textarea {
  resize: vertical;
}

/* TABLAS */

table input:not(:nth-of-type("checkbox")),
table select,
table date {
  width: 100%;
}

table.oddStyled tr:nth-child(odd) {
  background: #f7f7f7;
}

table.evenStyled tr:nth-child(even) {
  background: #f7f7f7;
}

.oddStyle>*:nth-child(odd) {
  background: #f7f7f7;
}

.evenStyle>*:nth-child(even) {
  background: #f7f7f7;
}

table {
  text-align: left;
  border-collapse: collapse;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0px 0px 10px 0px #ccc;
}

table td,
table th {
  padding: 8px;
}

table th {
  background: #888;
  color: #fff;
}

table.conOpciones tr td:nth-last-child(1) {
  white-space: nowrap;
}

/* BODY */

body {
  height: 100vh;
  height: 100dvh;
  width: 100%;
  min-width: 360px;
  background: #f7f2ea;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  margin: auto;
}

/* HEADER */

header {
  display: flex;
  justify-content: space-between;
  width: 100%;
  align-items: center;
  padding: 0 20px;
  background: #fff;
  color: #1c2528;
  box-shadow: 0 2px 16px rgba(17, 24, 28, 0.10);
  z-index: 99;
  flex-shrink: 0;
  min-height: 64px;
  border-bottom: 2px solid rgba(41, 150, 182, 0.15);
}

header .logo {
  flex-shrink: 0;
  padding: 8px 0;
}

header .logo a {
  display: flex;
  align-items: center;
  text-decoration: none;
}

header .logo div {
  display: flex;
  align-items: center;
}

header .logo img {
  height: 52px;
  vertical-align: bottom;
}

header .logo .brand-name,
header .logo .company-name {
  color: #1d647b;
  font-size: 18px;
  font-weight: 700;
  margin-left: 12px;
  vertical-align: middle;
  text-decoration: none;
}

/* MENÚ (.mp) */

.mp {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mp i {
  font-size: 15px;
}

.mp > li > a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border-radius: 999px;
  color: #1d647b;
  background: rgba(41, 150, 182, 0.07);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  border: 1.5px solid rgba(41, 150, 182, 0.18);
}

.mp > li > a:hover {
  background: linear-gradient(135deg, #1d647b 0%, #2996b6 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(41, 150, 182, 0.30);
}

.mp > li {
  position: relative;
  white-space: nowrap;
}

/* Dropdown de usuario */
.mp > li > ul {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  padding: 14px 6px 6px;
  border-radius: 0 0 16px 16px;
  background: #fffdf9;
  box-shadow: 0 8px 32px rgba(17, 24, 28, 0.18);
  border: 1px solid rgba(28,37,40,0.08);
  border-top: none;
  min-width: 190px;
  z-index: 200;
}

.mp > li > ul a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 10px;
  color: #1c2528;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  background: transparent;
  margin: 0;
  border: none;
  box-shadow: none;
  transition: background 0.14s, color 0.14s;
}

.mp > li > ul a:hover {
  background: #e8f6fb;
  color: #1d647b;
}

.mp > li > ul > li:last-child > a {
  color: #b91c1c;
}
.mp > li > ul > li:last-child > a:hover {
  background: #fee2e2;
  color: #7f1d1d;
}

.mp > li:hover > ul {
  display: block;
}

/* HAMBURGUESA */

.mmTags {
  display: none;
  align-items: center;
  gap: 8px;
  color: #1d647b;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(41, 150, 182, 0.08);
  border: 1.5px solid rgba(41, 150, 182, 0.20);
  transition: background 0.15s;
}
.mmTags:hover { background: rgba(41, 150, 182, 0.16); }

header .fondoMenu {
  position: fixed;
  display: none;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
}

/* FOOTER */

footer {
  background: #fff;
  color: #5c686e;
  border-top: 1px solid rgba(28, 37, 40, 0.10);
  padding: 5px 18px;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  font-size: 12px;
}

footer a .infoFlotante {
  display: none;
  position: absolute;
  bottom: 40px;
  right: 10px;
  border-radius: 4px;
  padding: 10px;
  background: #fffdf9;
  color: #1c2528;
  box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.4);
}

footer a:hover .infoFlotante {
  display: block;
}

/* LAYOUT PRINCIPAL */

.main {
  flex-grow: 1;
  overflow: hidden;
  background: #f7f2ea;
  display: flex;
  flex-direction: column;
  position: relative;
}

.view {
  max-height: 100%;
  overflow: auto;
  flex-grow: 1;
  background: #f7f2ea;
}

.view>div {
  min-height: 100%;
}

/* BARRA DE HERRAMIENTAS SUPERIOR */

.topFloatingTools {
  position: sticky;
  top: 0;
  background: #fffdf9;
  z-index: 10;
  padding: 14px 20px 12px;
  margin: -24px -20px 20px;
  border-bottom: 1px solid rgba(28, 37, 40, 0.10);
  box-shadow: 0 3px 10px rgba(17, 24, 28, 0.06);
}

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

.shortcuts b {
  font-size: 15px;
  color: #08a1c0;
}

/* SCROLLBAR */

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: #eee;
}

::-webkit-scrollbar-corner {
  background: #ddd;
}

::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 4px;
  border: solid 2px transparent;
  background-clip: content-box;
}

/* ALERTAS */

.alertContainer {
  position: fixed;
  bottom: 48px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
  pointer-events: none;
}

.alertContainer .alert {
  background: #08a1c0;
  color: #fff;
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 13px;
  box-shadow: 0 8px 32px rgba(17, 24, 28, 0.14);
  cursor: pointer;
  pointer-events: all;
  animation: aparecerAlerta 0.25s ease-out 1 forwards;
  max-width: 440px;
  text-align: center;
}

.ocultarAlert {
  overflow: hidden;
  max-height: 0px !important;
  transition: ease-out all 500ms;
  margin-bottom: 0 !important;
  opacity: 0;
}

@keyframes aparecerAlerta {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* popup confirmar si/no → ahora usa .modal-overlay (ver index.html) */

/* SPINNER */

.spinerContainer {
  position: absolute;
  bottom: 20px;
  right: 25px;
  max-width: 50%;
  z-index: 100;
  background: #08a1c0;
  color: #fff;
  padding: 8px 16px;
  border-radius: 50px;
  box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.3);
}

.spinerContainer span {
  font-size: 14px;
}

.spinerContainer i {
  font-size: 22px;
  color: #fff;
  vertical-align: top;
}

/* MODALES */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 37, 40, 0.65);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}

.modal-content {
  background: #fffdf9;
  border: 1px solid rgba(28, 37, 40, 0.10);
  border-radius: 20px;
  width: 90%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 16px 56px rgba(17, 24, 28, 0.20);
  animation: slideInDown 0.3s ease-out;
}

.modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(28, 37, 40, 0.10);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: #fffdf9;
  z-index: 1;
}

.modal-header h3 {
  margin: 0;
  font-size: 16px;
  color: #08a1c0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.btn-cerrar-modal,
.modal-close {
  background: transparent;
  border: none;
  font-size: 16px;
  color: #5c686e;
  cursor: pointer;
  padding: 6px 10px;
  line-height: 1;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
}

.btn-cerrar-modal:hover,
.modal-close:hover {
  background: #f7f2ea;
  color: #1c2528;
}

.modal-body {
  padding: 20px;
  max-height: 60vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid rgba(28, 37, 40, 0.10);
  background: #f7f2ea;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}



@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* RESPONSIVE MENÚ MÓVIL */

@media screen and (max-width: 920px) {
  .hideOnMobile {
    display: none !important;
  }

  header .logo img {
    height: 46px;
  }

  header .logo .brand-name,
  header .logo .company-name {
    color: #1d647b;
    font-size: 16px;
    margin-left: 10px;
  }

  #toggleMenu:checked~.fondoMenu {
    display: block;
  }

  .mmTags {
    display: inline-flex;
  }

  nav {
    position: fixed;
    right: 0;
    top: 0;
    height: 100%;
    background: #fff;
    overflow: auto;
    width: 270px;
    max-width: 85vw;
    transform: translateX(110%);
    will-change: transform;
    box-shadow: -4px 0 24px rgba(17, 24, 28, 0.16);
    display: flex;
    flex-direction: column;
  }

  #toggleMenu:checked~nav {
    transition: ease transform 300ms;
    transform: translateX(0%);
  }

  nav > ul > label {
    display: none !important;
  }

  .mp {
    flex-direction: column;
    padding: 8px 12px 20px;
    gap: 4px;
  }

  .mp > li {
    padding: 0;
    border-top: none;
    white-space: normal;
    width: 100%;
  }

  .mp > li > a {
    width: 100%;
    border-radius: 12px;
    padding: 11px 16px;
    font-size: 15px;
    justify-content: flex-start;
    background: transparent;
    border-color: transparent;
    color: #1c2528;
  }

  .mp > li > a:hover,
  .mp > li > a:active {
    background: linear-gradient(135deg, #1d647b 0%, #2996b6 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(41, 150, 182, 0.25);
  }

  /* Sub-menú de usuario inline */
  .mp > li > ul {
    display: block;
    position: relative;
    top: auto;
    right: auto;
    box-shadow: none;
    border: none;
    border-radius: 12px;
    background: rgba(41, 150, 182, 0.05);
    padding: 4px 6px;
    margin: 2px 0 4px 0;
  }

  .mp > li > ul > li > a {
    font-size: 14px;
    padding: 9px 12px;
    color: #455059;
  }

  .mp > li > ul > li > a:hover {
    background: #e8f6fb;
    color: #1d647b;
  }

  .mp > li > ul > li:last-child > a {
    color: #b91c1c;
  }
  .mp > li > ul > li:last-child > a:hover {
    background: #fee2e2;
    color: #7f1d1d;
  }

  /* Modales */
  .modal-content {
    width: 95%;
    max-width: 600px;
    max-height: 94vh;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 15px;
  }

  .modal-footer {
    flex-direction: column;
  }

  .modal-footer .btn {
    width: 100%;
    justify-content: center;
  }

  /* Toolbar */
  .topFloatingTools {
    margin: -16px -14px 16px;
    padding: 12px 14px 10px;
  }
}

/* SELECTOR DE TRABAJADOR (modal específico) */

.trabajador-modal-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  border-radius: 8px;
  background: #f7f2ea;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.trabajador-modal-item:hover {
  background: #e8f6fb;
  border-color: #2996b6;
  transform: translateX(5px);
}

/* MOVIMIENTOS DE CAJA */

.monto-caja-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-movimiento-caja {
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 2px solid;
  background: white;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-movimiento-caja.incremento {
  border-color: #16a34a;
  color: #16a34a;
}

.btn-movimiento-caja.incremento:hover {
  background: #16a34a;
  color: white;
  transform: scale(1.05);
}

.btn-movimiento-caja.decremento {
  border-color: #dc2626;
  color: #dc2626;
}

.btn-movimiento-caja.decremento:hover {
  background: #dc2626;
  color: white;
  transform: scale(1.05);
}

.sin-movimientos {
  text-align: center;
  padding: 60px 20px;
  color: #9ca3af;
}

.sin-movimientos i {
  font-size: 64px;
  margin-bottom: 15px;
  opacity: 0.3;
}

.sin-movimientos-texto {
  font-size: 16px;
  color: #6b7280;
}