/* Dashboard Styles */

.dashboard-section {
    margin-top: 80px;
    padding: 40px 20px;
    min-height: calc(100vh - 80px);
    background-color: #F7FAFC;
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.dashboard-welcome h1 {
    color: var(--azul-marino);
    font-size: 28px;
    margin-bottom: 8px;
}

.dashboard-welcome p {
    color: var(--gris-medio);
    font-size: 15px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-avatar {
    width: 50px;
    height: 50px;
    background: var(--azul-marino);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 20px;
}

.user-details span {
    display: block;
}

.user-email {
    color: var(--gris-oscuro);
    font-weight: 500;
}

.user-folio {
    color: var(--gris-medio);
    font-size: 13px;
    font-family: monospace;
}

.btn-logout {
    background: none;
    border: 1px solid var(--gris-claro);
    color: var(--gris-medio);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    border-color: #E53E3E;
    color: #E53E3E;
}

/* Status Card */
.status-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.status-title {
    font-size: 20px;
    color: var(--azul-marino);
    font-weight: 600;
}

.status-badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.status-pending { background: #FEF3C7; color: #92400E; }
.status-review { background: #DBEAFE; color: #1E40AF; }
.status-approved { background: #D1FAE5; color: #065F46; }
.status-provisional { background: #FEF3C7; color: #92400E; }
.status-rejected { background: #FEE2E2; color: #991B1B; }

/* Progress Bar */
.progress-container {
    margin-bottom: 30px;
}

.progress-bar {
    height: 8px;
    background: var(--gris-claro);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 16px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--azul-marino), #4299E1);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
}

.progress-step {
    text-align: center;
    flex: 1;
}

.step-indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gris-claro);
    color: var(--gris-medio);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 14px;
    font-weight: 600;
}

.step-indicator.completed {
    background: #10B981;
    color: white;
}

.step-indicator.completed::after {
    content: '';
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
}

.step-indicator.current {
    background: var(--azul-marino);
    color: white;
}

.step-label {
    font-size: 12px;
    color: var(--gris-medio);
}

.step-label.active {
    color: var(--azul-marino);
    font-weight: 500;
}

/* Action Card */
.action-card {
    background: linear-gradient(135deg, var(--azul-marino) 0%, #1E3A5F 100%);
    color: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.action-content h3 {
    font-size: 22px;
    margin-bottom: 8px;
}

.action-content p {
    opacity: 0.9;
    font-size: 15px;
}

.btn-action {
    background: white;
    color: var(--azul-marino);
    padding: 14px 30px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Info Cards Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.info-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.info-card h4 {
    color: var(--azul-marino);
    font-size: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-card-icon {
    width: 24px;
    height: 24px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--gris-claro);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: var(--gris-medio);
    font-size: 14px;
}

.info-value {
    color: var(--gris-oscuro);
    font-weight: 500;
    font-size: 14px;
}

/* Checklist */
.checklist {
    list-style: none;
}

.checklist li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gris-claro);
}

.checklist li:last-child {
    border-bottom: none;
}

.check-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.check-icon.done {
    background: #10B981;
    color: white;
}

.check-icon.done::after {
    content: '';
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.check-icon.pending {
    background: var(--gris-claro);
    color: var(--gris-medio);
}

.check-text {
    flex: 1;
    font-size: 14px;
    color: var(--gris-oscuro);
}

.check-text.completed {
    text-decoration: line-through;
    color: var(--gris-medio);
}

/* Result Card */
.result-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.result-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 40px;
}

.result-icon.success { background: #D1FAE5; }
.result-icon.warning { background: #FEF3C7; }
.result-icon.error { background: #FEE2E2; }

.result-icon.success::after {
    content: '';
    width: 24px;
    height: 24px;
    background: #10B981;
    border-radius: 50%;
}

.result-icon.error::after {
    content: '';
    width: 24px;
    height: 24px;
    background: #EF4444;
    border-radius: 50%;
}

.result-title {
    font-size: 24px;
    color: var(--azul-marino);
    margin-bottom: 12px;
}

.result-description {
    color: var(--gris-medio);
    font-size: 15px;
    max-width: 500px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

.result-notes {
    background: #F7FAFC;
    padding: 20px;
    border-radius: 8px;
    text-align: left;
    margin-top: 20px;
}

.result-notes h5 {
    color: var(--azul-marino);
    margin-bottom: 10px;
}

.result-notes p {
    color: var(--gris-oscuro);
    font-size: 14px;
    line-height: 1.6;
}

/* Download Certificate Button */
.btn-download-cert {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: white;
    padding: 16px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-download-cert:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-download-cert:active {
    transform: translateY(0);
}

.btn-download-cert svg {
    flex-shrink: 0;
}

/* Loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gris-claro);
    border-top-color: var(--azul-marino);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .dashboard-section {
        padding: 20px 12px;
        margin-top: 70px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 24px;
    }

    .dashboard-welcome h1 {
        font-size: 22px;
    }

    .dashboard-welcome p {
        font-size: 13px;
    }

    .user-info {
        width: 100%;
        padding: 12px;
        background: white;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }

    .user-avatar {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .user-email {
        font-size: 14px;
    }

    .user-folio {
        font-size: 11px;
    }

    /* Status card */
    .status-card {
        padding: 20px 16px;
        border-radius: 10px;
        margin-bottom: 20px;
    }

    .status-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        margin-bottom: 20px;
    }

    .status-title {
        font-size: 16px;
    }

    .status-badge {
        font-size: 12px;
        padding: 6px 12px;
    }

    /* Progress steps */
    .progress-steps {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
    }

    .progress-step {
        min-width: auto;
    }

    .step-indicator {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .step-label {
        font-size: 10px;
        word-break: break-word;
    }

    /* Action card */
    .action-card {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
        border-radius: 10px;
        margin-bottom: 20px;
    }

    .action-content h3 {
        font-size: 18px;
    }

    .action-content p {
        font-size: 14px;
    }

    .btn-action {
        width: 100%;
        padding: 14px 24px;
        font-size: 15px;
    }

    /* Info grid */
    .info-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-bottom: 20px;
    }

    .info-card {
        padding: 20px 16px;
        border-radius: 10px;
    }

    .info-card h4 {
        font-size: 14px;
    }

    .info-item {
        padding: 10px 0;
    }

    .info-label,
    .info-value {
        font-size: 13px;
    }

    /* Checklist */
    .checklist li {
        padding: 14px 0;
    }

    .check-icon {
        width: 22px;
        height: 22px;
        font-size: 12px;
    }

    .check-text {
        font-size: 13px;
    }

    /* Result card */
    .result-card {
        padding: 30px 20px;
        border-radius: 10px;
    }

    .result-icon {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }

    .result-title {
        font-size: 20px;
    }

    .result-description {
        font-size: 14px;
    }

    .result-notes {
        padding: 16px;
    }

    .result-notes h5 {
        font-size: 13px;
    }

    .result-notes p {
        font-size: 13px;
    }

    /* Download button */
    .btn-download-cert {
        width: 100%;
        padding: 14px 20px;
        font-size: 14px;
    }

    /* Logout button in menu */
    .btn-logout {
        width: 100%;
        padding: 12px 16px;
        text-align: center;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .progress-steps {
        grid-template-columns: repeat(3, 1fr);
    }

    .progress-step:nth-child(4),
    .progress-step:nth-child(5) {
        grid-column: span 1;
    }

    .dashboard-welcome h1 {
        font-size: 20px;
    }

    .status-title {
        font-size: 14px;
    }
}
