﻿/* Estilos específicos para la página Home (Sistema de Mensajes) */
.home-root {
    min-height: 100vh;
    background: #f3f6fb;
    color: #1f2937;
    width: 100%;
    font-family: sans-serif;
}

    .home-root * {
        box-sizing: border-box;
    }

    .home-root .container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 20px;
    }

    /* Header */
    .home-root .header {
        background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
        padding: 20px 0;
        box-shadow: 0 4px 20px rgba(37, 99, 235, 0.1);
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        width: 100%;
    }

    .home-root .header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .home-root .logo {
        font-size: 2rem;
        font-weight: 700;
        color: white;
        text-decoration: none;
        background: linear-gradient(45deg, #ffffff, #f0f9ff, #dbeafe);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        animation: logoShimmer 3s ease-in-out infinite;
    }

@keyframes logoShimmer {
    0%, 100% {
        opacity: 1;
    }

    50% {
        opacity: 0.8;
    }
}

.home-root .user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
}

.home-root .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, #059669, #10b981);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

    .home-root .user-avatar:hover {
        transform: scale(1.1);
        box-shadow: 0 4px 20px rgba(16, 185, 129, 0.3);
    }

.home-root .logout-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

    .home-root .logout-btn:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-2px);
    }

/* Main Content */
.home-root .main-content {
    padding: 40px 0;
    min-height: calc(100vh - 80px);
    margin-top: 80px; /* Margen para el header fijo */
}

/* Welcome Section */
.home-root .welcome-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: relative;
    overflow: hidden;
}

    .home-root .welcome-section::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(37, 99, 235, 0.03) 0%, transparent 70%);
        animation: pulse 4s ease-in-out infinite;
    }

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.3;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.1;
    }
}

.home-root .welcome-content {
    position: relative;
    z-index: 1;
}

.home-root .welcome-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e3a8a;
    margin-bottom: 15px;
    animation: slideInLeft 1s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.home-root .welcome-subtitle {
    font-size: 1.2rem;
    color: #64748b;
    margin-bottom: 10px;
    animation: slideInLeft 1s ease-out 0.2s both;
}

/* Stats Cards */
.home-root .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.home-root .stat-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .home-root .stat-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    }

.home-root .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    color: white;
}

.home-root .stat-card:hover .stat-icon {
    transform: scale(1.1);
}

.home-root .stat-icon.style-blue {
    background: linear-gradient(45deg, #1e3a8a, #2563eb);
}

.home-root .stat-icon.style-orange {
    background: linear-gradient(45deg, #f97316, #ea580c);
}

.home-root .stat-icon.style-yellow {
    background: linear-gradient(45deg, #f59e0b, #d97706);
}

.home-root .stat-icon.style-red {
    background: linear-gradient(45deg, #dc2626, #ef4444);
}

.home-root .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 5px;
}

.home-root .stat-label {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

/* Action Buttons */
.home-root .actions-section {
    margin-bottom: 40px;
}

.home-root .actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

    /* --- Modificación para 2 columnas --- */
    .home-root .actions-grid.two-column {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        max-width: 1000px;
        margin: 0 auto;
    }


.home-root .action-card {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 35px;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

    .home-root .action-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
        transition: left 0.6s ease;
    }

    .home-root .action-card:hover::before {
        left: 100%;
    }

    .home-root .action-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    }

    .home-root .action-card.primary {
        background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
        color: white;
    }

        .home-root .action-card.primary:hover {
            background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
            border-color: #60a5fa;
        }

    .home-root .action-card.secondary {
        background: linear-gradient(135deg, #059669 0%, #10b981 100%);
        color: white;
    }

        .home-root .action-card.secondary:hover {
            background: linear-gradient(135deg, #047857 0%, #059669 100%);
            border-color: #34d399;
        }

.home-root .action-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.home-root .action-card:hover .action-icon {
    transform: scale(1.1);
}

.home-root .action-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.home-root .action-description {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 25px;
    min-height: 50px;
}

.home-root .action-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: inherit;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.home-root .action-card.primary .action-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.home-root .action-card.secondary .action-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}


.home-root .action-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}


/* Mensajes Recientes */
.home-root .recent-messages-card {
    background: white;
    border-radius: 20px;
    padding: 30px 40px;
    box-shadow: 0 10px 40px rgba(220, 225, 240, 0.7);
    border: 1px solid #e2e8f0;
}

.home-root .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.home-root .card-title {
    font-size: 1.6rem;
    color: #1e3a8a;
    margin: 0;
}

.home-root .view-all-btn {
    background: #f8fafc;
    color: #64748b;
    border: 2px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.9rem;
}

    .home-root .view-all-btn:hover {
        background: #f1f5f9;
        border-color: #cbd5e1;
    }

.home-root .message-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.home-root .message-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 10px;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.3s ease;
}

    .home-root .message-item:last-child {
        border-bottom: none;
    }

    .home-root .message-item:hover {
        background-color: #f8fafc;
        border-radius: 8px;
    }

.home-root .message-info {
    display: flex;
    flex-direction: column;
}

.home-root .message-name {
    font-weight: 600;
    color: #334155;
    font-size: 1.05rem;
    margin-bottom: 5px;
}

.home-root .message-phone {
    font-size: 0.9rem;
    color: #64748b;
    font-family: monospace;
}

.home-root .message-contract {
    text-align: right;
}

.home-root .contract-label {
    font-weight: 500;
    color: #1e3a8a;
    font-size: 0.95rem;
    display: block;
    margin-bottom: 5px;
}

.home-root .message-time {
    font-size: 0.85rem;
    color: #94a3b8;
}

/* Responsive */
@media (max-width: 768px) {
    .home-root .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .home-root .welcome-title {
        font-size: 2rem;
    }

    .home-root .actions-grid.two-column {
        grid-template-columns: 1fr;
    }

    .home-root .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }

    .home-root .message-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .home-root .message-contract {
        text-align: left;
        padding-top: 10px;
        border-top: 1px dashed #e2e8f0;
        width: 100%;
    }
}
