/* =========================================================
   AEC Rosario - Movimientos
   Hoja de estilos unificada (11/11/2025)
   ========================================================= */

/* === Reset general === */
body {
  background: #f0f1f5;
  color: #333;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* main {
  max-width: 1200px; 
  max-width: 1500px;
  width: 100%;
  margin: 2rem auto;
  padding: 2rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}*/

main {
    max-width: 1500px;   /* antes seguro era ~1000/1200 */
    margin: 0 auto;
    background:#ffffff;
    padding: 15px 25px;
    border-radius:4px;
}

/* === Header & Nav === */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 2px solid #0056b3;
}

header h1 {
  font-size: 2rem;
  color: #0056b3;
  margin: 0;
}

nav a {
  margin-left: 1.5rem;
  text-decoration: none;
  font-weight: 600;
  color: #6b7280;
  padding: 0.5rem 1.25rem;
  border-radius: 0.75rem;
  transition: background 0.3s ease, color 0.3s ease;
}

nav .button {
  background: #0b5fb3;
  border: 1px solid #2f6ea5;
  color: #fff;
  border-radius: 8px;
  padding: 0.45rem 0.8rem;
  text-decoration: none;
  font-weight: 600;
}

nav .button:hover {
  background: #084b8a;
}

nav .active {
  background: #084b8a;
  color: #fff;
}

/* === Cards === */
.card {
  background: #ffffff;
  box-shadow: 0 4px 8px rgb(0 0 0 / 0.1);
  border-radius: 0.75rem;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-weight: 700;
  font-size: 1.75rem;
  color: #333;
  margin-bottom: 1rem;
}

/* === Banner de Depósito / Proveedor === */
.provider-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #f0f7ff;
  border: 1px solid #cfe0f1;
  color: #0b4d88;
  padding: 0.55rem 0.8rem;
  border-radius: 0.75rem;
  margin: 0.5rem 0 1rem;
  font-weight: 600;
}

.provider-banner .chip {
  background: #e9f3ff;
  border: 1px solid #cfe0f1;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
}

.provider-status {
  margin-left: auto;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.status-open {
  background: #fff7e6;
  color: #a36200;
  border: 1px solid #ffd591;
}
.status-open-foreign {
  background: #ffeaea;
  color: #9a1414;
  border: 1px solid #f3b0b0;
}

/* === Formularios === */
form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 2rem;
}

.field label {
  font-weight: 600;
  display: block;
  margin: 6px 0 4px;
}

input[type="text"],
input[type="number"],
input[type="date"],
select {
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 1rem;
  color: #374151;
  width: 100%;
}

input[readonly] {
  background: #f9fafb;
  color: #555;
}

/* === Botones (sin heredar estilos globales) === */
.button {
  display: inline-block;
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  border: 1px solid transparent;
  background: #0b5fb3;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.button:hover {
  filter: brightness(0.95);
}

/* Variantes */
.button.btn-green {
  background: #16a34a;
  border-color: #15803d;
}
.button.btn-green:hover {
  background: #15803d;
}

.button.btn-red {
  background: #dc2626;
  border-color: #b91c1c;
}
.button.btn-red:hover {
  background: #b91c1c;
}

.button.btn-indigo {
  background: #6366f1;
  border-color: #4f46e5;
}
.button.btn-indigo:hover {
  background: #4f46e5;
}

/* Botonera del formulario */
.action-bar {
  display: flex;
  gap: 12px;
  margin-top: 6px;
}
.action-bar .button {
  grid-column: auto;
}

/* === Tabla === */
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

thead {
  background: #0b5fb3;
  color: #fff;
}

thead th {
  padding: 0.75rem 1rem;
  border-bottom: 2px solid #cfe0f1;
}

td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid #e5e7eb;
}

/* Alternancia por grupo de remito */
.remito-group.rg-1 td {
  background: #eaf4ff;
}
.remito-break td {
  border-top: 2px solid #cfe0f1 !important;
}
.remito-group:hover td {
  filter: brightness(0.98);
}
.remito-group.rg-0:hover td {
  background: #f6fbff;
}

/* === Modales === */
.modal {
  display: none;
  position: fixed;
  z-index: 10;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background: #fff;
  margin: 5% auto;
  padding: 20px;
  border-radius: 10px;
  max-width: 700px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Botón SisT Compras (violeta, letras blancas) */
.button.btn-purple {
    background: #7c3aed;
    border-color: #6d28d9;
    color: #ffffff !important;
}
.button.btn-purple:hover {
    filter: brightness(1.08);
}






/* === Botón circular amarillo de edición === */
.btn-round-yellow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #facc15;
  border: 1px solid #eab308;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}

/* === Hover general === */
tr:hover {
  background: #e5f1ff;
}

/* === Fin lista === */
div[style*="Fin de la lista"] {
  font-weight: 600;
  color: #0b5fb3;
}

/* === Ajustes del bloque proveedor / otros === */
#providerBlock {
  grid-column: 1 / -1;
  display: none;
  margin-top: 0.25rem;
}
#providerBlock .row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}
#providerChosen {
  font-weight: 600;
}
#nro_cbte_prov_row {
  display: none;
  margin-top: 0.5rem;
}

/* === Entradas con “X” de limpiar === */
.article-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.article-input-wrap input {
  width: 100%;
  padding-right: 44px !important;
}
.article-input-wrap .clear-btn {
  all: unset;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #0b5fb3;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 28px;
  text-align: center;
  cursor: pointer;
  z-index: 2;
}
.article-input-wrap .clear-btn:hover {
  filter: brightness(0.9);
}

/* Tooltip de la X */
.article-input-wrap .clear-btn::after {
  content: attr(data-tip);
  position: absolute;
  right: 0;
  top: 115%;
  white-space: nowrap;
  background: #212529;
  color: #fff;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  pointer-events: none;
}
.article-input-wrap .clear-btn:hover::after {
  opacity: 1;
  transform: translateY(0);
}
#article_name[placeholder="Seleccionar artículo"][value=""] ~ .clear-btn {
  display: none;
}

/* === Responsive === */
@media (max-width: 768px) {
  form {
    grid-template-columns: 1fr;
  }
  .action-bar {
    flex-direction: column;
    gap: 8px;
  }
  .provider-banner {
    flex-wrap: wrap;
  }
  header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  nav a {
    margin-left: 0.5rem;
  }
}
/* Botón morado de PROVEEDORES */
.btn-suppliers{
  display:inline-block;
  padding:.6rem .9rem;
  border-radius:.6rem;
  background:#7c3aed;      /* morado */
  color:#fff;
  border:1px solid #6d28d9;
  text-decoration:none;
}
.btn-suppliers:hover{ filter:brightness(1.05); }
/* Botón deshabilitado (mejora visual) */
.button:disabled,
.button[disabled]{background:#a9c3e6!important;border-color:#b7ccec!important;color:#eaf1fb!important;cursor:not-allowed!important;filter:none!important}

/* Botón tamaño pequeño (para export stock) */
.button.small{padding:.35rem .7rem;font-size:.95rem}

/* ================================================
   MÓDULO COMPRAS – ESTILO UNIFICADO
   ================================================ */

body.compras-body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
    background: linear-gradient(to bottom, #75aadb, #ffffff, #75aadb);
    color: #111827;
}

.compras-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #0073cf;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-sizing: border-box;
}

.compras-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.compras-logo {
    height: 40px;
}

.compras-header h1 {
    margin: 0;
    font-size: 1.8rem;
    color: #ffffff; /* título en blanco */
}

.compras-header .user-box {
    font-size: 0.95rem;
}

/* Botón salir reutiliza estilo existente + aseguramos color */
.logout-btn {
    background-color: #ef4444;
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: bold;
    text-decoration: none;
    font-size: 0.9rem;
}

/* Contenedor central */
.compras-main {
    max-width: 720px;          /* antes 960px */
    margin: 110px auto 70px;   /* un poco menos de alto */
    padding: 1.5rem;           /* antes 2rem */
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    text-align: center;
}


/* Cards */
.compras-cards {
    display: flex;
    justify-content: center;
    gap: 1.5rem;     /* antes 2rem */
    flex-wrap: wrap;
}

.compras-card {
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(30,82,133,0.22);
    padding: 1.4rem;           /* antes 2rem */
    width: 220px;              /* antes 280px */
    text-decoration: none;
    color: #0f172a;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}


.compras-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(59,130,246,0.6);
}

.compras-card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #2563eb;
}

.compras-card-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.compras-card-desc {
    font-size: 1rem;
    color: #4b5563;
}

.compras-footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    background: #0073cf;
    color: white;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.9rem;
}
