@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css');

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Montserrat', sans-serif;
    background: radial-gradient(circle at top right, #0d1b3d 0%, #060d1f 60%, #03070f 100%);
    color: #ffffff;
    display: flex;
    min-height: 100vh;
}

/* ===== MENÚ LATERAL ===== */
.menu {
    width: 260px;
    min-width: 260px;
    height: calc(100vh - 30px);
    position: sticky;
    top: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #1a3a7a 0%, #12295a 55%, #0c1d42 100%);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 18px 14px;
    margin: 15px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.08);
}

.menu::-webkit-scrollbar { width: 6px; }
.menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 10px; }

.logo {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.8px;
    margin-bottom: 18px;
    text-align: center;
}

.menu nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    color: #cfd8ea;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 6px 10px;
    margin-bottom: 2px;
    border-radius: 10px;
    transition: background 0.2s, color 0.2s;
}

.menu nav a:hover,
.menu nav a.activo {
    background: rgba(255,255,255,0.12);
    color: #ffffff;
}

.icono {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.25);
}

.azul      { background: linear-gradient(135deg, #4f9cff, #1e63d6); }
.cian      { background: linear-gradient(135deg, #2fd4f0, #0091b3); }
.indigo    { background: linear-gradient(135deg, #7d8cf0, #3f4fb8); }
.verde     { background: linear-gradient(135deg, #3fd57f, #1b8f4c); }
.naranja   { background: linear-gradient(135deg, #ffb066, #e0761f); }
.morado    { background: linear-gradient(135deg, #b47cf2, #7a35c9); }
.amarillo  { background: linear-gradient(135deg, #ffd966, #e0a800); }
.rojo      { background: linear-gradient(135deg, #ff6b6b, #c62828); }
.turquesa  { background: linear-gradient(135deg, #3fe0c0, #13967c); }
.lima      { background: linear-gradient(135deg, #9ed45a, #5a8f25); }
.coral     { background: linear-gradient(135deg, #ff8a65, #e0482a); }
.rosa      { background: linear-gradient(135deg, #ff7aa8, #d0306a); }
.gris      { background: linear-gradient(135deg, #9fb3bf, #5b707c); }
.acero     { background: linear-gradient(135deg, #5a7bd8, #2b3f8c); }
.violeta   { background: linear-gradient(135deg, #8e7cff, #4b32c3); }
.esmeralda { background: linear-gradient(135deg, #34e0a1, #0f9d6e); }

.pie-menu {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.direccion {
    font-size: 10px;
    font-weight: 400;
    color: rgba(255,255,255,0.4);
    line-height: 1.5;
    margin-bottom: 10px;
}

.btn-salir {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    color: rgba(255,255,255,0.75);
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 5px 12px;
    cursor: pointer;
    margin-bottom: 10px;
}

.btn-salir:hover {
    background: rgba(255,255,255,0.08);
    color: #ffffff;
}

.firma {
    font-size: 9px;
    color: rgba(255,255,255,0.3);
    line-height: 1.4;
}

/* ===== CONTENIDO ===== */
.contenido {
    flex: 1;
    padding: 30px;
}

.contenido h1 {
    font-weight: 700;
    letter-spacing: 0.5px;
}

.encabezado {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.empresa {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 8px 18px;
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(79,156,255,0.25), rgba(155,81,224,0.25));
    border: 1px solid rgba(255,255,255,0.15);
    color: #e6ecff;
}

/* ===== TARJETAS DE INICIO (NUEVO) ===== */
.tarjetas {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-top: 24px;
}

.tarjeta {
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: transform 0.2s;
}

.tarjeta:hover {
    transform: translateY(-4px);
}

.t-icono {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}

.tarjeta h2 {
    font-size: 26px;
    font-weight: 700;
}

.tarjeta p {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.85);
    margin-top: 4px;
}

.t-azul    { background: linear-gradient(135deg, #4f8ff0, #2a5cc4); }
.t-verde   { background: linear-gradient(135deg, #3cc47f, #1d8a55); }
.t-naranja { background: linear-gradient(135deg, #f5a54a, #d4731a); }
.t-rojo    { background: linear-gradient(135deg, #f0605a, #c0362f); }

/* ===== COBROS (NUEVO) ===== */
.cobros {
    margin-top: 28px;
    background: linear-gradient(180deg, rgba(26,58,122,0.35), rgba(12,29,66,0.35));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

.cobros-cabecera {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.cobros-cabecera h3 {
    font-size: 18px;
    font-weight: 700;
}

.pestanas {
    display: flex;
    gap: 8px;
}

.pestana {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #cfd8ea;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 30px;
    padding: 7px 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.pestana:hover {
    background: rgba(255,255,255,0.08);
}

.pestana.activa {
    background: linear-gradient(135deg, #4f9cff, #1e63d6);
    border-color: transparent;
    color: #ffffff;
}

.cobro {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 10px;
}

.cobro-icono {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7d8cf0, #3f4fb8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
}

.cobro-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cobro-info strong {
    font-size: 15px;
}

.cobro-info small {
    font-size: 12.5px;
    color: rgba(255,255,255,0.65);
}

.cobro-info .vence {
    color: #4fb3ff;
}

.btn-whatsapp {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3fd57f, #1b8f4c);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.35);
}

.btn-cobrar {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
    background: linear-gradient(135deg, #ffb066, #e0761f);
    padding: 9px 18px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.35);
}

/* ===== COBROS: vencidas y lista vacía ===== */
.cobro-info .vence.vencida {
    color: #ff6b6b;
}

.sin-cobros {
    text-align: center;
    padding: 24px;
    font-size: 13px;
    color: rgba(255,255,255,0.5);
}

/* ===== PANTALLA EN CONSTRUCCIÓN ===== */
.en-construccion {
    margin-top: 60px;
    text-align: center;
    color: rgba(255,255,255,0.5);
}

.en-construccion i {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
    color: #4f9cff;
}

/* ===== ACCIONES RÁPIDAS ===== */
.acciones {
    margin-top: 28px;
}

.acciones h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 14px;
}

.acciones-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.accion {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
    text-align: left;
    border: none;
    border-radius: 16px;
    padding: 16px;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.2);
    transition: transform 0.2s;
}

.accion:hover {
    transform: translateY(-4px);
}

.a-icono {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

/* ===== BARRA DE ACCIONES Y BOTONES ===== */
.barra-acciones {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
}

.buscador {
    flex: 1;
    max-width: 460px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 0 14px;
}

.buscador i {
    color: rgba(255,255,255,0.5);
}

.buscador input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    padding: 12px 0;
}

.btn-principal,
.btn-secundario {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 11px 20px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-principal {
    background: linear-gradient(135deg, #ffb066, #e0761f);
    box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}

.btn-secundario {
    background: rgba(255,255,255,0.1);
}

.btn-mini {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 9px;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* ===== TABLAS ===== */
.tabla-caja {
    margin-top: 20px;
    background: linear-gradient(180deg, rgba(26,58,122,0.35), rgba(12,29,66,0.35));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    overflow: hidden;
}

.tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.tabla th {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
    padding: 14px 16px;
    background: rgba(0,0,0,0.15);
}

.tabla td {
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.85);
}

.tabla tr:hover td {
    background: rgba(255,255,255,0.03);
}

.botones-fila {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.etiqueta {
    background: rgba(79,156,255,0.2);
    color: #8cc0ff;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}

.sin-datos {
    text-align: center;
    padding: 30px !important;
    color: rgba(255,255,255,0.5) !important;
}

/* ===== VENTANA FLOTANTE (FORMULARIOS) ===== */
.ventana-fondo {
    position: fixed;
    inset: 0;
    background: rgba(3,7,15,0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.ventana {
    width: 560px;
    max-width: 92vw;
    background: linear-gradient(180deg, #16306a, #0c1d42);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
}

.ventana-cabecera {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.ventana-cabecera h3 {
    font-size: 18px;
}

.ventana-cerrar {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.6);
    font-size: 18px;
    cursor: pointer;
}

.formulario label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    margin-bottom: 14px;
}

.formulario input,
.formulario textarea,
.formulario select {
    width: 100%;
    margin-top: 6px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    padding: 10px 12px;
    outline: none;
}

.formulario input:focus,
.formulario textarea:focus {
    border-color: #4f9cff;
}

.dos-columnas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.formulario-botones {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 6px;
}

/* ===== PRÉSTAMOS ===== */
.ventana.ventana-grande {
    width: 820px;
    max-height: 92vh;
    overflow-y: auto;
}

.calculo {
    background: rgba(0,0,0,0.2);
    border: 1px dashed rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 14px;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}

.calculo-datos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}

.calculo-datos div {
    background: rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 10px 12px;
}

.calculo-datos small {
    display: block;
    font-size: 11px;
    color: rgba(255,255,255,0.55);
}

.calculo-datos b {
    font-size: 16px;
    color: #ffffff;
}

.calculo-tabla {
    max-height: 260px;
    overflow-y: auto;
    border-radius: 10px;
    margin-bottom: 14px;
}

.calculo-tabla .tabla td,
.calculo-tabla .tabla th {
    padding: 8px 12px;
    font-size: 12.5px;
}

.detalle-cliente {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.detalle-cliente small {
    display: block;
    font-size: 12px;
    color: rgba(255,255,255,0.6);
}

.chip {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}

.chip-verde   { background: rgba(63,213,127,0.2);  color: #5fe39a; }
.chip-rojo    { background: rgba(255,107,107,0.2); color: #ff8a8a; }
.chip-naranja { background: rgba(255,176,102,0.2); color: #ffc085; }
.chip-azul    { background: rgba(79,156,255,0.2);  color: #8cc0ff; }
.chip-gris    { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.6); }

.texto-rojo    { color: #ff8a8a !important; }
.texto-verde   { color: #5fe39a !important; }
.texto-naranja { color: #ffc085 !important; }

.btn-peligro {
    color: #ff8a8a;
    margin-right: auto;
}

.formulario select option {
    background: #12295a;
}

/* ===== PAGOS Y RECIBO ===== */
.total-hoy {
    font-size: 13px;
    color: rgba(255,255,255,0.65);
    background: rgba(63,213,127,0.12);
    border: 1px solid rgba(63,213,127,0.25);
    padding: 9px 14px;
    border-radius: 12px;
}

.total-hoy b {
    color: #5fe39a;
}

a.btn-secundario {
    text-decoration: none;
}

.recibo {
    background: #ffffff;
    color: #1a2540;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 14px;
}

.recibo h4 {
    text-align: center;
    font-size: 15px;
}

.recibo-sub {
    text-align: center;
    font-size: 12px;
    color: #5d6b85;
    margin-bottom: 12px;
}

.recibo-linea {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    margin: 5px 0;
}

.recibo-linea span {
    color: #5d6b85;
}

.recibo hr {
    border: none;
    border-top: 1px dashed #c5cede;
    margin: 10px 0;
}

.recibo-total {
    font-size: 15px;
    border-top: 1px dashed #c5cede;
    padding-top: 8px;
}

.recibo-gracias {
    text-align: center;
    font-size: 12px;
    color: #5d6b85;
    margin-top: 12px;
}

/* ===== GASTOS, CAJA Y REPORTES ===== */
.total-rojo {
    background: rgba(255,107,107,0.12);
    border-color: rgba(255,107,107,0.25);
}

.total-rojo b {
    color: #ff8a8a;
}

.tarjetas-3 {
    grid-template-columns: repeat(3, 1fr);
}

.t-morado    { background: linear-gradient(135deg, #b47cf2, #7a35c9); }
.t-esmeralda { background: linear-gradient(135deg, #34d39a, #0f8a62); }
.t-indigo    { background: linear-gradient(135deg, #7d8cf0, #3f4fb8); }
.t-cian      { background: linear-gradient(135deg, #2fc4e0, #0a86a6); }
.t-amarillo  { background: linear-gradient(135deg, #f2c94c, #c99700); }

.rango-fechas {
    display: flex;
    gap: 12px;
}

.rango-fechas label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    gap: 8px;
}

.rango-fechas input {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    padding: 9px 10px;
    color-scheme: dark;
}

.fila-total td {
    font-weight: 700;
    background: rgba(0,0,0,0.2);
}

.subtitulo {
    font-size: 16px;
    font-weight: 700;
    margin-top: 28px;
    color: rgba(255,255,255,0.85);
}

.subtitulo + .tarjetas {
    margin-top: 12px;
}

/* Al imprimir reportes: sin menú y en blanco */
@media print {
    .menu, .barra-acciones { display: none !important; }
    body { background: #ffffff; color: #000000; display: block; }
    .tarjeta { box-shadow: none; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .tabla-caja { background: #ffffff; border: 1px solid #cccccc; }
    .tabla td, .tabla th, .subtitulo { color: #000000 !important; }
}

/* ===== CONFIGURACIÓN Y ZONA ROJA ===== */
.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 24px;
}

.config-caja {
    background: linear-gradient(180deg, rgba(26,58,122,0.35), rgba(12,29,66,0.35));
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 20px;
}

.config-caja:first-child {
    grid-row: span 2;
}

.config-caja h3 {
    font-size: 16px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.config-texto {
    font-size: 13px;
    color: rgba(255,255,255,0.65);
    line-height: 1.5;
    margin-bottom: 14px;
}

.config-numeros {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.config-numeros span {
    font-size: 12px;
    background: rgba(255,255,255,0.06);
    padding: 6px 12px;
    border-radius: 20px;
    color: rgba(255,255,255,0.7);
}

.zona-roja {
    background: linear-gradient(180deg, rgba(198,40,40,0.18), rgba(120,20,20,0.18));
    border: 1px solid rgba(255,107,107,0.45);
}

.zona-roja h3 {
    color: #ff8a8a;
}

.zona-opcion {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 12px 0;
    border-top: 1px solid rgba(255,107,107,0.2);
}

.zona-opcion small {
    display: block;
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    margin-top: 3px;
}

.btn-rojo {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #ff6b6b, #c62828);
    border: none;
    border-radius: 10px;
    padding: 10px 16px;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ===== HISTORIAL DE CRÉDITO ===== */
.leyenda {
    display: flex;
    gap: 8px;
}

.texto-suave {
    color: rgba(255,255,255,0.45);
    font-size: 11.5px;
}

.historial-cabecera {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.historial-cabecera .detalle-cliente {
    margin-bottom: 0;
}

.nota-grande {
    font-size: 16px;
    padding: 10px 20px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== SOLICITUDES ===== */
.aviso-historial {
    font-size: 12.5px;
    color: rgba(255,255,255,0.7);
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    padding: 10px 12px;
    margin: -4px 0 14px;
}

/* ===== INICIO DE SESIÓN ===== */
.login-fondo {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, #1a3a7a 0%, #0c1d42 45%, #03070f 100%);
}

.login-caja {
    width: 400px;
    max-width: 92vw;
    background: linear-gradient(180deg, #16306a, #0c1d42);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 32px 28px 22px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.6);
    text-align: center;
}

.login-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, #4f9cff, #1e63d6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 8px 20px rgba(30,99,214,0.45);
}

.login-caja h2 {
    font-size: 20px;
    font-weight: 700;
}

.login-sub {
    font-size: 12.5px;
    color: rgba(255,255,255,0.55);
    margin: 4px 0 20px;
}

.login-caja .formulario {
    text-align: left;
}

.login-aviso {
    font-size: 12.5px;
    background: rgba(79,156,255,0.15);
    border: 1px solid rgba(79,156,255,0.3);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 16px;
    text-align: left;
    color: #cfe2ff;
}

.login-error {
    color: #ff8a8a;
    font-size: 12.5px;
    min-height: 18px;
    margin: -4px 0 8px;
}

.login-boton {
    width: 100%;
    justify-content: center;
}

.login-firma {
    font-size: 9.5px;
    color: rgba(255,255,255,0.3);
    margin-top: 18px;
}

.usuario-chip {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 7px 14px;
    border-radius: 30px;
}

.usuario-chip i {
    font-size: 18px;
    color: #4f9cff;
}

.usuario-chip small {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
}

/* ===== USUARIOS Y PERMISOS ===== */
.usuarios-form {
    margin-bottom: 20px;
}

.usuarios-form h3 {
    font-size: 16px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tres-columnas {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.modulos-titulo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    margin-bottom: 10px;
}

.modulos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.formulario .modulo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 8px 12px;
    margin: 0;
    cursor: pointer;
}

.formulario .modulo input {
    width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
    flex: none;
    accent-color: #4f9cff;
    cursor: pointer;
}

.btn-texto {
    background: none;
    border: none;
    color: #8cc0ff;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.formulario-botones.izquierda {
    justify-content: flex-start;
}

.celda-modulos {
    font-size: 12.5px;
    max-width: 520px;
}

/* Opción sin permiso: se ve igual, pero con un candado */
.candado {
    color: rgba(255,255,255,0.75);
}

.menu nav a .candado {
    margin-left: auto;
    font-size: 11px;
}

.accion.bloqueado {
    position: relative;
}

.accion .candado {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 14px;
}
