/* ============================================
   ESTILOS LANDING PAGE - Cormons App
   ============================================ */

/* Variables de color */
:root {
    --primary-color: #28a745;
    --primary-hover: #218838;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --success-color: #28a745;
    --dark-color: #1f2937;
    --light-gray: #f8f9fa;
    --border-color: #dee2e6;
    --header-height: 60px;
    --header-height-mobile: 70px;
}

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #e8eaf0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 70px;
    padding-bottom: 70px;
}

.container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
}

/* Header/Navbar */
.navbar {
    height: 60px;
    z-index: 1000;
}

.navbar-brand {
    font-size: 1rem;
    color: var(--primary-color) !important;
}

.navbar-brand p {
    margin: 0;
    line-height: 1.2;
}

.logout-button {
    white-space: nowrap;
}

/* Header responsive */
header {
    height: var(--header-height-mobile);
    padding: 0.5rem 0;
}

@media (min-width: 768px) {
    header {
        height: var(--header-height);
        padding: 1rem 0;
    }
}

/* Card principal */
.landing-card {
    background: #e8eaf0;
    border-radius: 12px;
    box-shadow: none;
    padding: 30px;
    width: 100%;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.header-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}

/* Lista de apps - DISEÑO GRID */
.apps-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

/* Item de app - DISEÑO CARD */
.app-item {
    background: white;
    border: 3px solid var(--border-color);
    border-radius: 20px;
    padding: 40px 20px;
    text-decoration: none;
    color: var(--dark-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    min-height: 200px;
    position: relative;
}

/* Colores de borde específicos */
.app-item:nth-child(1) {
    border-color: #3b82f6; /* Azul - Buscador */
}

.app-item:nth-child(2) {
    border-color: #15803d; /* Verde oscuro - Control Stock */
}

.app-item:nth-child(3) {
    border-color: #fbbf24; /* Amarillo - Gastronomía */
}

.app-item:nth-child(4) {
    border-color: #ef4444; /* Rojo - Pedidos */
}

.app-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.app-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
}

/* Icono grande centrado */
.app-icon-small {
    width: 80px;
    height: 80px;
    background: transparent;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    margin-bottom: 10px;
}

.app-item:hover .app-icon-small {
    transform: scale(1.1);
}

.app-icon-small i {
    font-size: 48px;
    color: inherit;
}

/* Color del icono según posición */
.app-item:nth-child(1) .app-icon-small i {
    color: #3b82f6;
}

.app-item:nth-child(2) .app-icon-small i {
    color: #15803d; /* Verde oscuro - Control Stock */
}


.app-item:nth-child(3) .app-icon-small i {
    color: #fbbf24;
}

.app-item:nth-child(4) .app-icon-small i {
    color: #ef4444;
}

.app-info h5 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: var(--dark-color);
}

.app-info p {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 5px 0 0 0;
}

/* Remover flecha */
.app-arrow-right {
    display: none;
}

/* Apps deshabilitadas */
.app-item.app-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f9fa;
    pointer-events: none;
}

.app-item.app-disabled::before {
    content: '\f023';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 20px;
    color: #9ca3af;
}

.app-item.app-disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Sección logout */
.logout-section {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

/* Alertas personalizadas */
.alert {
    border-radius: 12px;
    border: none;
}

.alert-danger {
    background-color: #fee;
    color: var(--danger-color);
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

/* Countdown */
#countdown {
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* Botones */
.btn {
    border-radius: 10px;
    padding: 12px 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-color);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.btn-danger, .btn-logout {
    background: var(--danger-color);
    border: none;
    color: white;
}

.btn-danger:hover, .btn-logout:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.3);
}

.btn-outline-secondary {
    border: 2px solid var(--border-color);
    color: #6b7280;
}

.btn-outline-secondary:hover {
    background-color: var(--light-gray);
    border-color: var(--dark-color);
    color: var(--dark-color);
}

/* Footer */
footer {
    background-color: #1f2937;
    color: white;
    padding: 10px 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    font-size: 1rem;
}

footer a {
    color: white;
    text-decoration: none;
    transition: opacity 0.2s;
}

footer a:hover {
    opacity: 0.8;
}

footer img {
    filter: brightness(1.1);
}

footer .container {
    min-height: auto;
    display: flex;
    flex-direction: row !important;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding-top: 60px;
        padding-bottom: 55px;
    }

    .navbar {
        height: 50px;
        padding: 5px 10px;
    }

    .navbar-brand {
        font-size: 0.85rem;
    }

    .logout-button {
        padding: 6px 12px !important;
        font-size: 0.85rem;
    }

    .logout-button span {
        display: none !important;
    }

    .logout-button i {
        margin: 0 !important;
    }

    .landing-card {
        padding: 20px;
    }

    /* Grid de 2x2 también en móvil */
    .apps-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .app-item {
        padding: 25px 15px;
        min-height: 140px;
    }

    .app-icon-small {
        width: 50px;
        height: 50px;
    }

    .app-icon-small i {
        font-size: 32px;
    }

    .app-info h5 {
        font-size: 0.85rem;
    }

    .app-info p {
        font-size: 0.7rem;
    }
    
    footer {
        padding: 8px 0;
    }
    
    footer .container {
        gap: 12px !important;
        font-size: 0.75rem;
        padding: 0 10px;
    }
    
    footer img[alt="Isologo Cormons"] {
        width: 30px !important;
        height: 30px !important;
        margin-right: 5px !important;
    }
    
    footer img[alt="Logo WhatsApp"] {
        width: 18px !important;
        height: 18px !important;
        margin-right: 4px !important;
    }
}

@media (max-width: 576px) {
    body {
        padding-bottom: 50px;
    }

    .navbar-brand {
        font-size: 0.75rem;
    }

    .apps-list {
        gap: 10px;
    }

    .app-item {
        padding: 20px 10px;
        min-height: 120px;
    }

    .app-icon-small {
        width: 40px;
        height: 40px;
    }

    .app-icon-small i {
        font-size: 28px;
    }

    .app-info h5 {
        font-size: 0.75rem;
    }

    footer {
        padding: 6px 0;
    }
    
    footer .container {
        gap: 8px !important;
        font-size: 0.7rem;
    }
    
    footer img[alt="Isologo Cormons"] {
        width: 24px !important;
        height: 24px !important;
    }
    
    footer img[alt="Logo WhatsApp"] {
        width: 16px !important;
        height: 16px !important;
    }
}

/* Mejoras para touch devices */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
    }
}