/* Tarjeta base para login y registro */
.tarjeta-auth {
    background: var(--color-white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 500px;
    /* ancho cómodo para formularios */
    text-align: center;
    border-top: 5px solid var(--color-primary-green);
    margin: 0 auto;
}

.tarjeta-auth img {
    max-width: 150px;
    margin-bottom: 24px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.tarjeta-auth h2 {
    margin-bottom: 32px;
    color: var(--color-dark);
}

/* Campos del formulario */
.tarjeta-auth .campo {
    text-align: left;
    margin-bottom: 16px;
}

.tarjeta-auth .campo label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--color-dark);
}

.tarjeta-auth .campo input,
.tarjeta-auth .campo select,
.tarjeta-auth .campo textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    box-sizing: border-box;
}

/* Botón principal */
.tarjeta-auth .boton-completo {
    width: 100%;
    padding: 12px 0;
    border-radius: 12px;
    background: var(--color-primary-green);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    margin-top: 16px;
    transition: all 0.3s ease;
}

.tarjeta-auth .boton-completo:hover {
    background: var(--color-primary-blue);
}

/* Sección inferior (enlaces) */
.tarjeta-auth .registro-section {
    margin-top: 24px;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.tarjeta-auth .registro-texto {
    margin-bottom: 12px;
    color: #6b7280;
}

.tarjeta-auth .botones-registro {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.tarjeta-auth .botones-registro .boton {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tarjeta-auth .botones-registro .boton-secundario {
    background: var(--color-accent-blue);
    color: white;
}

.tarjeta-auth .botones-registro .boton-borde {
    border: 1px solid var(--color-primary-green);
    color: var(--color-primary-green);
    background: white;
}

.tarjeta-auth .botones-registro .boton:hover {
    opacity: 0.85;
}

@media (max-width: 768px) {
    .tarjeta-auth {
        padding: 32px;
        max-width: 100%;
    }
}

/* Enlaces discretos para navegación de testing */
.dev-links {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #F3F4F6;
    font-size: medium;
    color: #999;
}

.dev-links a {
    color: #999;
    margin: 0 8px;
}

/* Página de error */
.error-container {
    text-align: center;
    padding: 48px 24px;
}

.error-icon {
    font-size: 5rem;
    color: var(--color-error);
    margin-bottom: 24px;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.error-code {
    font-size: 4rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--color-error), #C0392B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.error-message {
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 32px;
}

/* Badges */
.etiqueta {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.etiqueta-exito {
    background-color: var(--color-success);
    color: var(--color-white);
}

.etiqueta-alerta {
    background-color: var(--color-warning);
    color: var(--color-white);
}

.etiqueta-error {
    background-color: var(--color-error);
    color: var(--color-white);
}

.etiqueta-info {
    background-color: var(--color-primary-blue);
    color: var(--color-white);
}

/* Estadísticas */
.estadisticas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

@media (max-width: 600px) {
    .estadisticas {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0;
    }
}

@media (max-width: 480px) {
    .estadisticas {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

.tarjeta-estadistica {
    background: linear-gradient(135deg, var(--color-white), #F8F9FA);
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    text-align: center;
    border-bottom: 4px solid var(--color-accent-blue);
    transition: all 0.3s;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 768px) {
    .tarjeta-estadistica {
        padding: 16px;
        min-height: 100px;
    }
}

.tarjeta-estadistica:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.numero {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--color-primary-blue), var(--color-accent-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.texto {
    font-size: 0.85rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

/* Tablas */

/* Wrapper para scroll horizontal en móvil */
.tabla-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
    border-radius: 12px;
}

@media (max-width: 768px) {
    .tabla-responsive {
        margin: 0 -16px 20px -16px;
        padding: 0 16px;
        width: calc(100% + 32px);
    }
}

.table-responsive {
    padding: 0 20px;
    overflow-x: auto;
}

table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
    background-color: var(--color-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

@media (max-width: 768px) {
    table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 10px 12px;
    }
}

@media (max-width: 600px) {
    table {
        font-size: 0.85rem;
    }
    
    th, td {
        padding: 8px 10px;
    }
}

thead {
    background-color: var(--color-primary-blue);
    color: var(--color-white);
}

th, td {
    padding: 14px 20px;
    text-align: left;
}

tbody tr {
    border-bottom: 1px solid #E5E7EB;
    transition: all 0.2s;
}

tbody tr:last-child {
    border-bottom: none;
}

/* Utilidades adicionales */
.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .flex-between {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
}

.mb-3 {
    margin-bottom: 24px;
}

.mt-4 {
    margin-top: 32px;
}

@media (max-width: 768px) {
    .mb-3 {
        margin-bottom: 16px;
    }
    
    .mt-4 {
        margin-top: 24px;
    }
}

/* Scrollbar para sidebar si necesita scroll en contenido largo */
.menu-lateral::-webkit-scrollbar {
    width: 6px;
}

.menu-lateral::-webkit-scrollbar-track {
    background: transparent;
}

.menu-lateral::-webkit-scrollbar-thumb {
    background: rgba(36, 119, 220, 0.3);
    border-radius: 10px;
}

.menu-lateral::-webkit-scrollbar-thumb:hover {
    background: rgba(36, 119, 220, 0.5);
}

/* Mejoras adicionales de responsividad */
@media (max-width: 768px) {
    h1 {
        font-size: 1.6rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    h4 {
        font-size: 1.1rem;
    }
    
    .boton {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
}

/* Responsive para login */
@media (max-width: 600px) {
    .tarjeta-login {
        padding: 32px 24px;
        border-radius: 16px;
    }
    
    .tarjeta-login img {
        max-width: 120px;
    }
}

/* Mejoras para ofertas - responsive */
@media (max-width: 768px) {
    .oferta-disponible,
    .oferta-ocupada {
        border-left-width: 3px;
    }
}

/* Responsive para badges */
@media (max-width: 600px) {
    .etiqueta {
        font-size: 0.8rem;
        padding: 4px 10px;
    }
}

/* Card footer responsive */
.pie-tarjeta {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #E5E7EB;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .pie-tarjeta {
        flex-direction: column;
        gap: 8px;
    }
    
    .pie-tarjeta .boton {
        width: 100%;
    }
}

/* Logo section responsive */
@media (max-width: 600px) {
    .logo {
        gap: 8px;
    }
    
    .logo img {
        height: 40px;
    }
    
    .logo h1 {
        font-size: 1.2rem;
    }
    
    .logo .eslogan {
        font-size: 0.8rem;
    }
}


@media (max-width: 600px) {
    nav a {
        padding: 8px 14px;
        font-size: 0.9rem;
    }
}


@media (max-width: 600px) {
    .numero {
        font-size: 2rem;
    }
    
    .texto {
        font-size: 0.75rem;
        letter-spacing: 1px;
    }
}

/* ========================================
   NAVEGACIÓN MÓVIL INFERIOR CON ICONOS
   ======================================== */

/* Ocultar texto del nav en móvil y mostrar solo iconos */
@media (max-width: 600px) {
    /* Ocultar header normal en móvil */
    header nav {
        display: none !important;
    }

    .menu-lateral {
        display: none !important;
    }
    
    /* Agregar padding bottom al body para compensar el nav fijo */
    body {
        padding-bottom: 70px;
    }
    
    /* Barra de navegación inferior fija */
    .nav-mobile-bottom {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--color-white);
        box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
        border-top: 2px solid var(--color-primary-green);
        z-index: 1000;
        display: flex;
        justify-content: space-around;
        align-items: center;
        padding: 8px 0;
    }
    
    .nav-mobile-bottom a {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: var(--color-dark);
        padding: 8px 12px;
        border-radius: 12px;
        transition: all 0.3s ease;
        flex: 1;
        max-width: 80px;
    }
    
    .nav-mobile-bottom a .icon {
        font-size: 1.5rem;
        margin-bottom: 4px;
    }
    
    .nav-mobile-bottom a .label {
        font-size: 0.7rem;
        font-weight: 500;
        text-align: center;
    }
    
    .nav-mobile-bottom a:hover,
    .nav-mobile-bottom a.active {
        background-color: var(--color-accent-blue);
        color: var(--color-white);
    }
    
    .nav-mobile-bottom a.active {
        background: linear-gradient(135deg, var(--color-primary-blue), var(--color-secondary-blue));
        box-shadow: 0 2px 8px rgba(36, 119, 220, 0.3);
    }
}

/* Ocultar nav mobile en desktop/tablet por defecto */
.nav-mobile-bottom {
    display: none !important;
}

/* Solo mostrar nav mobile en pantallas pequeñas */
@media (max-width: 600px) {
    .nav-mobile-bottom {
        display: flex !important;
    }
}

/* Danger button (used in profile delete) */
.btn-danger {
    background: var(--color-error);
    color: var(--color-white);
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}
.btn-danger:hover {
    filter: brightness(0.95);
}
