/* =========================
   RESET Y TIPOGRAFÍA
========================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #0f0f1a, #1a1a2f);
    color: #eaeaea;
    line-height: 1.6;
    min-height: 100vh;
}

/* =========================
   HEADER Y NAVEGACIÓN
========================= */



header {
  background-image: url("/img/header3.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: repeat;
  color: #fff;
  padding: 20px 40px;
  position: relative;
  z-index: 10;
  box-shadow: 0 3px 15px rgba(0, 198, 255, 0.3);
}

header h1 {
    color:whitesmoke;
    margin: 2%;
    font-size: 26px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-align: center;
   
    /*-webkit-background-clip: text;*/
   
}
h2{
    text-align: center;
    margin: 2%;
    
}
.welcome-msg {
    text-align: center;
    margin-top: 5px;
    font-size: 14px;
    color: #cdd9ff;
    opacity: 0.9;
}

/* NAV */
header nav {
    margin-top: 15px;
    text-align: center;
    transition: all 0.3s ease-in-out;
}

header nav a {
    color: #ffffff;
    margin: 5px 10px;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 18px;
    border-radius: 8px;
    transition: all 0.35s ease;
    position: relative;
}

header nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0%;
    height: 2px;
    background: #00c6ff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

header nav a:hover::after {
    width: 60%;
}

header nav a:hover {
    color: #00eaff;
}

/* =========================
   BOTÓN HAMBURGUESA / RESPONSIVE
========================= */
.menu-toggle {
    display: none;
    background: linear-gradient(90deg, #0072ff, #00c6ff);
    color: white;
    font-size: 20px;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    cursor: pointer;
    margin: 10px auto;
    text-align: center;
    box-shadow: 0 0 10px rgba(0, 114, 255, 0.5);
    transition: all 0.3s ease;
    position: relative;
}

.menu-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 198, 255, 0.7);
}

.menu-toggle.active::after {
    content: "✕";
    position: absolute;
    top: 10px;
    right: 18px;
}

/* Menú desplegable */
#nav-menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    #nav-menu {
        display: none;
        flex-direction: column;
        background: #141428;
        border-radius: 12px;
        padding: 10px 0;
        text-align: center;
        animation: fadeIn 0.4s ease forwards;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    }

    #nav-menu.show {
        display: flex;
    }

    #nav-menu a,
    .dropdown {
        margin: 8px 0;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================
   Reajuste del MAIN y secciones
========================= */






main.home-container {
    text-align: center;
    padding: 60px 20px;
    max-width: 1000px;
    margin: 0 auto;
    color: #fff;
}

main.home-container h2 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #ffffff;
    
}

main.home-container p {
    font-size: 16px;
    margin-bottom: 40px;
    color: #ddd;
}

/* Tarjetas del menú principal */
.menu-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.menu-cards .card {
    background-color: #1e1e2f;
    color: #fff;
    text-decoration: none;
    border-radius: 15px;
    padding: 25px;
    width: 260px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #333;
}

.menu-cards .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.4);
}

.card-finalizadas {
    background-color: #004d7a;
}

/* Ajustes responsive */
@media (max-width: 768px) {
    main.home-container {
        padding: 40px 15px;
    }

    .menu-cards {
        flex-direction: column;
        align-items: center;
    }

    .menu-cards .card {
        width: 90%;
    }
}




h3{
  text-align: center;
}


/* =========================
   LOGO HEADER
========================= */

.logo {
    height: 60px;
    width: auto;
    margin-right: 20px;
    transition: all 0.3s ease;
}

/* Estructura del header en PC */
.header-top {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Logo a la izquierda en pantallas grandes */
@media (min-width: 769px) {
    .header-top {
        justify-content: flex-start;
    }

    .logo {
        position: absolute;
        left: 40px;
        height: 80px; /* un poco más grande en escritorio */
    }

    header h1 {
        flex: 1;
        text-align: center;
        margin-left: 80px;
    }
}

/* Logo centrado debajo del título en móviles */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
    }

    .logo {
        margin-top: 10px;
        height: 60px;
    }
}



/* =========================
   DROPDOWN MENÚ
========================= */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropbtn {
    background: linear-gradient(90deg, #00c6ff, #0072ff);
    color: white;
    padding: 10px 15px;
    font-size: 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.dropbtn:hover {
    box-shadow: 0 0 10px rgba(0,198,255,0.6);
    transform: translateY(-2px);
}

.dropdown-content {
    display: none;
    position: absolute;
    background: #1e1e2f;
    min-width: 200px;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    z-index: 1;
    overflow: hidden;
    animation: fadeIn 0.4s ease forwards;
}

.dropdown-content a {
    color: #fafafa;
    padding: 12px 16px;
    display: block;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.dropdown-content a:hover {
    background: rgba(0,198,255,0.2);
    color: #fff;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* =========================
   TARJETAS
========================= */
.card {
    width: 250px;
    padding: 25px;
    background: linear-gradient(145deg, #1c1c2c, #252538);
    border-radius: 15px;
    color: #eaeaea;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    transition: all 0.35s ease;
    text-decoration: none;
}

.card:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: 0 20px 40px rgba(0,198,255,0.2);
}

.card h3 {
    font-size: 22px;
    color: #00eaff;
    margin-bottom: 10px;
}

.card p {
    font-size: 15px;
    color: #ccc;
}

/* =========================
   FORMULARIOS
========================= */
form {
    
    align-items: center;
    max-width: 700px;
    margin: 30px auto;
    background: #1e1e2f;
    padding: 30px 40px;
    border-radius: 15px;
    box-shadow: 0 6px 25px rgba(0,0,0,0.3);
    animation: fadeIn 0.5s ease;
}

form h2 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 28px;
    color: #00eaff;
    text-shadow: 0 0 5px rgba(0,198,255,0.5);
}

form label {
    display: block;
    margin-top: 15px;
    font-weight: 500;
    color: #ccc;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form textarea {
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
    border-radius: 8px;
    border: 1px solid #333;
    background: #2a2a3f;
    color: #eaeaea;
    transition: all 0.3s ease;
}

/* 🔹 Placeholder unificado */
form input::placeholder,
form textarea::placeholder {
    color: #aaa;
    font-style: italic;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

/* 🔹 Estilo al enfocar */
form input:focus,
form textarea:focus {
    border-color: #00c6ff;
    box-shadow: 0 0 8px rgba(0,198,255,0.4);
    outline: none;
}

/* 🔹 Cambia el color del placeholder al enfocar */
form input:focus::placeholder,
form textarea:focus::placeholder {
    color: #00c6ff;
    opacity: 1;
}


/* BOTONES */
button {
    display: inline-block;
    width: 100%;
    padding: 14px 0;
    margin-top: 15px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(90deg, #0072ff, #00c6ff);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0,198,255,0.5);
}

button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 20px rgba(0,198,255,0.7);
}

/* =========================
   TABLAS
========================= */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 25px;
    background: #1e1e2f;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

th {
    background: linear-gradient(90deg, #0072ff, #00c6ff);
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    color: #ddd;
}

tr:nth-child(even) {
    background: #24243a;
}

tr:hover {
    background: rgba(0,198,255,0.1);
    transition: background 0.3s;
}

/* =========================
   ANIMACIONES
========================= */
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(0,198,255,0.5); }
    50% { box-shadow: 0 0 15px rgba(0,198,255,0.8); }
}

/* =========================
   RESPONSIVE EXTRAS
========================= */
@media (max-width: 480px) {
    header h1 {
        font-size: 22px;
    }

    .card {
        width: 90%;
    }

    form {
        padding: 20px;
    }
}


/* =========================
   TABLAS MEJORADAS
========================= */
.table-container {
    width: 95%; /* deja un pequeño margen lateral */
    margin: 30px auto; /* centramos la tabla */
    overflow-x: auto; /* scroll horizontal en pantallas pequeñas */
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    background: #1e1e2f;
    padding: 15px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px; /* evita que las columnas se achiquen demasiado */
}

th {
    background: linear-gradient(90deg, #0072ff, #00c6ff);
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 15px;
    text-align: left;
}

td {
    color: #ddd;
    padding: 12px 15px;
    vertical-align: middle;
}

tr:nth-child(even) {
    background: #24243a;
}

tr:hover {
    background: rgba(0,198,255,0.1);
    transition: background 0.3s;
}

/* Scroll en móviles */
@media (max-width: 768px) {
    .table-container {
        padding: 10px;
    }

    th, td {
        padding: 10px 8px;
        font-size: 14px;
    }
}
/* Dropdown verde para cierres */
.dropdown.cierres .dropbtn {
    background: linear-gradient(90deg, #28a745, #1e7e34);
    color: white;
}

.dropdown.cierres .dropbtn:hover {
    background: linear-gradient(90deg, #218838, #1c7430);
    box-shadow: 0 0 10px rgba(40,167,69,0.6);
    transform: translateY(-2px);
}

.dropdown.cierres .dropdown-content a:hover {
    background: rgba(40,167,69,0.2);
}
/* =========================
   PLACEHOLDERS UNIFICADOS
========================= */
input::placeholder {
    color: #aaa;            /* color gris claro uniforme */
    font-style: italic;     /* estilo sutil */
    letter-spacing: 0.5px;  /* pequeño espaciado */
    opacity: 0.9;
}

input:focus::placeholder {
    color: #00c6ff;         /* cambia de color al enfocar */
    opacity: 1;
    transition: color 0.3s ease;
}

.table-container-scroll {
    max-height: 40em; /* altura de la “ventana” */
    overflow-y: auto;  /* scroll vertical */
    border: 1px solid #08080c;
}

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

.table-container-scroll th, .table-container-scroll td {
    padding: 8px;
    border-bottom: 1px solid #ddd;
}

.table-container-scroll tr:nth-child(even) {
    background-color: #0b0a0f;
}
/* =========================
   TARJETA COTIZACIÓN DÓLAR
========================= */
.cotizacion-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 40px auto;
}

.cotizacion-card {
  background: linear-gradient(145deg, #1a1a2f, #0f0f1a);
  border: 1px solid rgba(0,198,255,0.2);
  border-radius: 16px;
  box-shadow: 0 0 20px rgba(0,198,255,0.15);
  padding: 25px 30px;
  width: 320px;
  text-align: center;
  color: #eaeaea;
  transition: all 0.3s ease;
  animation: pulseGlow 3s infinite ease-in-out;
}

.cotizacion-card:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 0 25px rgba(0,198,255,0.3);
}

.cotizacion-card h3 {
  color: #00eaff;
  font-size: 24px;
  margin-bottom: 15px;
  text-shadow: 0 0 8px rgba(0,198,255,0.4);
  letter-spacing: 0.5px;
}

.cotizacion-precios {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
}

.precio-item {
  display: flex;
  justify-content: space-between;
  background: #222238;
  padding: 10px 15px;
  border-radius: 10px;
  border: 1px solid rgba(0,198,255,0.1);
}

.precio-item.promedio {
  background: linear-gradient(90deg, #0072ff22, #00c6ff22);
  border-color: rgba(0,198,255,0.3);
}

.label {
  color: #9ccfff;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.valor {
  color: #fff;
  font-weight: bold;
  font-size: 18px;
  text-shadow: 0 0 4px rgba(0,198,255,0.3);
}

.update-time {
  font-size: 13px;
  color: #aaa;
  margin-top: 10px;
  opacity: 0.8;
}


.cotizacion-card canvas {
  margin-top: 10px;
}

#cryptoCard {
  width: 360px;
}

/* =========================
   COTIZACIONES (DÓLAR + CRIPTO)
========================= */
.cotizacion-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
  margin: 40px auto;
  max-width: 1000px;
}

.cotizacion-card {
  background: linear-gradient(145deg, #1c1c2c, #252538);
  color: #eaeaea;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  padding: 25px 30px;
  width: 340px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0, 198, 255, 0.1);
}

.cotizacion-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 30px rgba(0, 198, 255, 0.2);
}

.cotizacion-card h3 {
  font-size: 22px;
  margin-bottom: 15px;
  color: #00eaff;
  text-shadow: 0 0 8px rgba(0,198,255,0.4);
}

.cotizacion-precios {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 15px;
}

.precio-item {
  display: flex;
  justify-content: space-between;
  background: rgba(0, 198, 255, 0.08);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 15px;
}

.precio-item.promedio {
  background: rgba(0, 198, 255, 0.15);
  font-weight: bold;
}

.label {
  color: #aaa;
}

.valor {
  color: #00eaff;
  font-weight: 600;
}

.update-time {
  font-size: 13px;
  color: #aaa;
  margin-top: 10px;
  font-style: italic;
}

/* Ajuste del gráfico */
.cotizacion-card canvas {
  margin-top: 10px;
  width: 100% !important;
  height: auto !important;
}

/* =========================
   RESPONSIVE (MEDIA QUERIES)
========================= */
@media (max-width: 1024px) {
  .cotizacion-container {
    gap: 20px;
  }
  .cotizacion-card {
    width: 300px;
  }
}

@media (max-width: 768px) {
  .cotizacion-container {
    flex-direction: column;
    align-items: center;
  }
  .cotizacion-card {
    width: 90%;
    max-width: 380px;
  }
}

@media (max-width: 480px) {
  .cotizacion-card {
    padding: 20px;
  }

  .cotizacion-card h3 {
    font-size: 20px;
  }

  .precio-item {
    font-size: 14px;
    padding: 6px 10px;
  }

  .update-time {
    font-size: 12px;
  }
}
/* =========================
   🔹 AJUSTE DE TAMAÑO: MEDIDORES DÓLAR / CRIPTO / ÓRDENES
========================= */
.cotizacion-card {
  width: 220px !important;     /* antes 340px */
  padding: 15px 20px !important;
  border-radius: 12px;
}

.cotizacion-card h3 {
  font-size: 16px !important;
  margin-bottom: 8px;
}

.precio-item {
  padding: 6px 10px;
  font-size: 13px;
}

.valor {
  font-size: 14px !important;
}

.update-time {
  font-size: 11px !important;
}

/* 🔸 Gráficos más chicos */
.cotizacion-card canvas {
  width: 100% !important;
  height: 120px !important; /* antes era auto, lo fijamos más bajo */
}

/* =========================
   🔹 AJUSTE RESPONSIVE MOBILE
========================= */
@media (max-width: 768px) {
  .cotizacion-card {
    width: 170px !important;
    padding: 12px 16px !important;
  }

  .cotizacion-card h3 {
    font-size: 14px !important;
  }

  .valor {
    font-size: 12px !important;
  }

  .update-time {
    font-size: 10px !important;
  }

  .cotizacion-card canvas {
    height: 100px !important;
  }
}
/* =========================
   🔹 AJUSTE FINO DE GRÁFICOS
========================= */
.cotizacion-card canvas {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 2 / 1; /* mantiene proporción visual */
  display: block;
  margin: 0 auto;
}

/* En móviles, achicamos un poco más */
@media (max-width: 768px) {
  .cotizacion-card canvas {
    aspect-ratio: 1.8 / 1;
  }
}
.cierres-historicos h2 {
  text-align: center;
  margin-bottom: 20px;
}

.filtros-fechas {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 25px;
}

.filtros {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn-generar {
  background: linear-gradient(90deg, #00b4db, #0083b0);
  border: none;
  color: white;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
}

.resumen-cierre {
  margin: 20px auto;
  text-align: center;
}

.resumen-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 10px;
}

.card-resumen {
  background: #f3f3f3;
  border-radius: 10px;
  padding: 10px 15px;
  min-width: 150px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.card-resumen.total {
  background: #dfffd8;
  font-weight: bold;
  color: #006400;
}
/* BOTONES DE ACCIÓN TABLA */
td.acciones .btn {
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    color: #fff;
    margin-right: 5px;
    transition: all 0.25s ease;
    display: inline-block;
}

/* Botón VER: azul claro */
td.acciones .btn.ver {
    background: linear-gradient(90deg, #00c6ff, #0072ff);
}

td.acciones .btn.ver:hover {
    background: linear-gradient(90deg, #00eaff, #00aaff);
    transform: scale(1.05);
    box-shadow: 0 0 8px rgba(0,198,255,0.6);
}

/* Botón EDITAR: amarillo/naranja */
td.acciones .btn.editar {
    background: linear-gradient(90deg, #ffc107, #ff9800);
}

td.acciones .btn.editar:hover {
    background: linear-gradient(90deg, #ffd740, #ffb300);
    transform: scale(1.05);
    box-shadow: 0 0 8px rgba(255,193,7,0.6);
}

/* Botón CAMBIAR ESTADO: verde */
td.acciones .btn.estado {
    background: linear-gradient(90deg, #4caf50, #2e7d32);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

td.acciones .btn.estado:hover {
    background: linear-gradient(90deg, #66bb6a, #388e3c);
    transform: scale(1.05);
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.6);
}


/* Botón BORRAR: rojo */
td.acciones .btn.borrar {
    background: linear-gradient(90deg, #dc3545, #c82333);
}

td.acciones .btn.borrar:hover {
    background: linear-gradient(90deg, #e5535d, #d32f2f);
    transform: scale(1.05);
    box-shadow: 0 0 8px rgba(220,53,69,0.6);
}

/* =========================
   NAVBAR CENTRADO + BOTÓN DERECHA
========================= */
.nav-container {
    display: flex;
    justify-content: center; /* centra el menú */
    align-items: center;
    position: relative;
    width: 100%;
    flex-wrap: wrap;
}

#nav-menu {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.logout-button {
    position: absolute;
    right: 20px;
    background: linear-gradient(90deg, #e74c3c, #c0392b);
    color: #fff !important;
    font-weight: bold;
    border-radius: 8px;
    padding: 10px 16px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logout-button:hover {
    background: linear-gradient(90deg, #ff6b5a, #e74c3c);
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.6);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
    }

    #nav-menu {
        flex-direction: column;
        align-items: center;
    }

    .logout-button {
        position: static;
        margin-top: 10px;
    }
}






/* === CREAR ORDEN (estilos externos) === */
.crear-orden-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 30px;
    background: #121212;
    color: #f0f0f0;
    border-radius: 16px;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.15);
}

.crear-orden-container h2 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.8rem;
    background: linear-gradient(90deg, #00e5ff, #0077ff);
    
    -webkit-text-fill-color: transparent;
}

/* === FORMULARIO === */
.form-orden {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #00e5ff;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: #1e1e1e;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 10px 12px;
    color: #fff;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #00e5ff;
    box-shadow: 0 0 8px rgba(0, 229, 255, 0.3);
    outline: none;
}

/* === BOTONES === */
.form-actions {
  align-items: center;
    display: flex;
    justify-content: center;
    
}

.btn-guardar {
  align-items: center;
    background: linear-gradient(90deg, #00e5ff, #0077ff);
    color: #fff;
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-guardar:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 10px rgba(0, 229, 255, 0.5);
}

.btn-cancelar {
    background: #222;
    color: #fff;
    padding: 12px 25px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s;
}

.btn-cancelar:hover {
    background: #333;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-group.full-width {
        grid-column: 1;
    }
}
/* =========================
   PATCH: correcciones y overrides seguros
   Pegar al final de style.css (no borra nada, solo sobreescribe lo necesario)
========================= */

/* 1) Variables centrales (no rompen nada) */
:root{
  --accent-1: #00eaff;
  --accent-2: #00c6ff;
  --accent-3: #0077ff;
  --bg-dark-1: #121212;
  --bg-dark-2: #1e1e2f;
  --muted: #aaa;
}

/* 2) Evitar que la regla global button { width:100% } rompa botones de fila de acciones
   (anulamos solo dentro de los contenedores de formulario donde queremos botones inline) */
.form-actions,
.footer-actions,
.actions-row {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

/* Forzar que los botones dentro de .form-actions no ocupen 100% */
.form-actions button,
.form-actions a,
.form-actions .btn {
  width: auto !important;
  max-width: 360px;
  display: inline-block;
  text-align: center;
}

/* Mantener un tamaño coherente para guardar/cancelar */
.form-actions .btn-guardar {
  min-width: 140px;
  padding: 10px 20px;
}

.form-actions .btn-cancelar {
  padding: 10px 18px;
}

/* 3) Consolidación segura de .cotizacion-card
   Esto sobreescribe múltiples definiciones conflictivas previas y elimina el uso innecesario de !important */
.cotizacion-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin: 30px auto;
  max-width: 1000px;
}

.cotizacion-card {
  background: linear-gradient(145deg, #1c1c2c, #252538);
  color: #eaeaea;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  padding: 18px 22px;
  width: 300px; /* valor intermedio coherente */
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid rgba(0,198,255,0.08);
}

.cotizacion-card h3 { color: var(--accent-1); font-size: 18px; margin-bottom: 8px; }

/* evitando !important en canvas; si un canvas necesita forzar tamaño, hacerlo en su selector especifico */
.cotizacion-card canvas { width: 100%; height: auto; display: block; margin: 0 auto; }

/* 4) Evitar duplicados en tabla: priorizamos padding + min-width solo en .table-container */
.table-container table,
.table-container-scroll table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

.table-container th,
.table-container-scroll th {
  padding: 12px 15px;
  background: linear-gradient(90deg, var(--accent-3), var(--accent-2));
  color: #fff;
}

/* 5) Scoped form styles: hacemos que los estilos globales de form no afecten módulos que NO queremos.
   Dejamos las reglas globales por compatibilidad, pero damos prioridad a formularios con clase .form-orden o .site-form */
.form-orden,
.site-form,
.crear-orden-container form,
.editar-orden-form {
  max-width: 100%;
  background: var(--bg-dark-1);
  padding: 22px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

/* Inputs: prioridad para formularios scoped */
.form-orden input,
.form-orden textarea,
.form-orden select,
.site-form input,
.site-form textarea,
.site-form select {
  background: #1e1e1e;
  border: 1px solid #333;
  color: #fff;
}

/* 6) Consolidamos media queries frecuentes reduciendo repetición */
@media (max-width: 768px) {
  .form-grid { grid-template-columns: 1fr !important; }
  .cotizacion-card { width: 90% !important; max-width: 380px; padding: 14px; }
  .table-container { padding: 10px; }
}

/* 7) Reglas de alta especificidad para evitar efectos colaterales
   (por ejemplo, si algún botón necesita width:100% deliberadamente lo definimos en su contexto) */
.btn.fullwidth,
.actions-fullwidth .btn {
  width: 100% !important;
}

/* 8) Nota útil para limpieza: buscar y reemplazar (manual)
   - Buscar duplicados de ".cotizacion-card" y dejar solo la definición anterior.
   - Buscar duplicados de "table { ... }" y conservar la sección .table-container.
   - Remover usos innecesarios de !important salvo casos puntuales. 
*/

/* Fin PATCH */
/* COSAS QUE AGREGO DESPUES DE HABER CREADO EL CSS SUPLETE SEPARADO POR CARPETAS  */

/* =========================
   🔹 TABLAS RESPONSIVE
========================= */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 20px;
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px; /* evita que se deforme */
}

.table-container th,
.table-container td {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
}

/* Ajustes visuales en pantallas chicas */
@media (max-width: 768px) {
    .table-container {
        overflow-x: scroll;
    }

    .table-container table {
        font-size: 14px;
        min-width: 600px;
    }

    .table-container th,
    .table-container td {
        padding: 8px;
    }

    /* Botones más compactos */
    .table-container .btn {
        padding: 4px 6px;
        font-size: 12px;
    }
}

/* En pantallas muy chicas (móviles en vertical) */
@media (max-width: 480px) {
    .table-container table {
        display: block;
        overflow-x: auto;
        min-width: 500px;
    }

    .table-container th,
    .table-container td {
        font-size: 12px;
        padding: 6px;
    }

    .acciones {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
}
/* =========================
   NAVBAR CENTRADO + BOTÓN DERECHA
========================= */

.navbar-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.navbar-container nav {
  flex: 1;
  text-align: center;
}

.navbar-container .right-button {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 768px) {
  .navbar-container {
    flex-direction: column;
  }

  .navbar-container .right-button {
    position: static;
    transform: none;
    margin-top: 10px;
  }
}
/* === Menú responsive mejorado === */
.nav-wrapper {
    text-align: center;
    position: relative;
}

/* En escritorio el menú se muestra normal */
@media (min-width: 769px) {
    #nav-menu {
        display: flex !important;
        justify-content: center;
        flex-wrap: wrap;
        align-items: center;
    }
}

/* En móviles: el menú se oculta y se despliega */
@media (max-width: 768px) {
    .menu-toggle {
        display: inline-block;
        margin-bottom: 10px;
    }

    #nav-menu {
        display: none;
        flex-direction: column;
        background: #141428;
        border-radius: 12px;
        padding: 10px 0;
        text-align: center;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
        width: 100%;
        animation: fadeIn 0.4s ease forwards;
    }

    #nav-menu.show {
        display: flex;
    }

    #nav-menu a,
    .dropdown {
        margin: 8px 0;
    }

    .menu-toggle.active {
        background: linear-gradient(90deg, #00c6ff, #0072ff);
    }
}


/* =========================
   🔹 TABLAS COMPACTAS
========================= */

/* Achica columnas automáticamente */
table {
    table-layout: fixed; /* Fuerza columnas más angostas */
    width: 100%;
}

/* Reduce tamaño del texto */
table th, table td {
    font-size: 13px;       /* Antes 15px */
    padding: 6px 8px;      /* Antes 12-15px */
    white-space: nowrap;   /* Evita saltos raros */
    overflow: hidden;      /* Oculta texto muy largo */
    text-overflow: ellipsis; /* Pone "..." si se excede */
}

/* Altura más baja */
table tr {
    height: 32px;
}

/* Compacta tabla en pantallas grandes también */
.table-container {
    padding: 5px;
}

/* Para pantallas chicas: aún más compacto */
@media (max-width: 768px) {
    table th, table td {
        font-size: 11px;
        padding: 5px 6px;
    }

    table {
        min-width: auto !important;
    }
}
/* 🔥 Permitir que la columna de acciones NO se achique */
table th.acciones,
table td.acciones {
    width: 1%;           /* Lo más compacto pero sin cortar botones */
    white-space: nowrap; /* Mantiene los botones en línea */
    overflow: visible !important; /* No los oculta */
    text-overflow: clip !important;
}
/* =========================
   FIX: TABLAS RESPONSIVE
========================= */

.table-container {
    width: 100%;
    margin: 20px auto;
    overflow-x: auto;
    padding: 0; /* opcional para quitar padding */
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 0; /* 🔥 evita el desborde */
    table-layout: auto; /* permite ajustar columnas */
}

th, td {
    padding: 10px;
    word-wrap: break-word;
    white-space: normal; /* 🔥 evita que texto largo estire la tabla */
}
.movimientos-box {
    background: #ffffff;
    padding: 18px 20px;
    margin: 25px auto;
    width: 90%;
    max-width: 420px;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.12);
    font-family: Arial, sans-serif;
}

.movimientos-box h3 {
    text-align: center;
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.mov-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    font-size: 16px;
}

.mov-item span {
    opacity: 0.8;
}

/* Colores */
.mov-item.ingreso {
    background: #6be889;
    border-left: 5px solid #28a745;
}

.mov-item.gasto {
    background: #fd6e6e;
    border-left: 5px solid #dc3545;
}

.mov-item.balance {
    background: #78aafb;
    border-left: 5px solid #007bff;
}
/* =========================
   🔹 CIERRE DIARIO / MOVIMIENTOS
========================= */
.movimientos-box {
    background: linear-gradient(145deg, #1c1c2c, #252538);
    padding: 20px 22px;
    margin: 30px auto;
    width: 95%;
    max-width: 480px;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    color: #eaeaea;
    border: 1px solid rgba(0,198,255,0.1);
}

.movimientos-box h3 {
    text-align: center;
    font-size: 20px;
    margin-bottom: 18px;
    color: #00eaff;
    text-shadow: 0 0 6px rgba(0,198,255,0.4);
}

.mov-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    margin-bottom: 10px;
    border-radius: 10px;
    font-size: 15px;
    background: rgba(255,255,255,0.04);
}

.mov-item span {
    opacity: 0.85;
}

/* Colores coherentes */
.mov-item.ingreso {
    border-left: 4px solid #28a745;
}

.mov-item.gasto {
    border-left: 4px solid #dc3545;
}

.mov-item.balance {
    border-left: 4px solid #007bff;
    font-weight: bold;
}

/* Estado del día */
.estado-dia {
    text-align: center;
    margin-top: 15px;
    font-size: 15px;
    font-weight: 600;
}

/* Info secundaria */
.movimientos-box small {
    display: block;
    margin-top: 10px;
    text-align: center;
    font-size: 12px;
    color: #aaa;
}
/* =========================
   LEYENDA ÓRDENES
========================= */
.ordenes-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 10px;
  font-size: 13px;
}

.ordenes-legend span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Cuadradito base */
.dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

/* Colores (IGUALES al gráfico) */
.dot.amarillo { background-color: #ffbb33; }
.dot.celeste  { background-color: #33b5e5; }
.dot.verde    { background-color: #00C851; }
.dot.rojo     { background-color: #ff4444; }
