/* Dashboard Styles */

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: calc(100vh - 200px);
}

.dashboard-header {
    background: white;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.dashboard-header h1 {
    color: var(--primary, #4f46e5);
    margin-bottom: 10px;
    font-size: 2rem;
}

.dashboard-header > p {
    color: #64748b;
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.nav-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.section {
    background: white;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.section h2 {
    color: var(--primary, #4f46e5);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
}

.section h2 i {
    font-size: 1.3rem;
}

/* User Info Grid */
.user-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.info-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid var(--primary, #4f46e5);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.info-card label {
    font-size: 0.875rem;
    color: #64748b;
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-card .value {
    font-size: 1.1rem;
    color: var(--dark, #1e293b);
    font-weight: 500;
    word-break: break-word;
}

.info-card .value a {
    color: var(--primary, #4f46e5);
    text-decoration: none;
    transition: color 0.3s;
}

.info-card .value a:hover {
    color: var(--secondary, #f59e0b);
    text-decoration: underline;
}

/* Challenges Grid */
.challenges-grid {
    display: grid;
    gap: 25px;
}

.challenge-card {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    background: white;
}

.challenge-card:hover {
    box-shadow: 0 8px 16px rgba(79, 70, 229, 0.12);
    border-color: var(--primary, #4f46e5);
    transform: translateY(-2px);
}

.challenge-title {
    font-size: 1.4rem;
    color: var(--dark, #1e293b);
    margin-bottom: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.challenge-short {
    color: #64748b;
    margin-bottom: 20px;
    font-size: 1rem;
    line-height: 1.6;
}

.challenge-meta {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: #64748b;
    align-items: center;
}

.challenge-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.challenge-meta i {
    color: var(--primary, #4f46e5);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.status-active {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.status-completed {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

.status-cancelled {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary, #4f46e5) 0%, #6366f1 100%);
    color: white;
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(79, 70, 229, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary, #4f46e5);
    color: var(--primary, #4f46e5);
}

.btn-outline:hover {
    background: var(--primary, #4f46e5);
    color: white;
    transform: translateY(-2px);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #64748b;
}

.empty-state i {
    font-size: 80px;
    margin-bottom: 25px;
    color: #cbd5e1;
    opacity: 0.7;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--dark, #1e293b);
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 25px;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 60px;
    color: #64748b;
    font-size: 1.1rem;
}

.loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 20px 10px;
    }

    .dashboard-header, .section {
        padding: 25px 20px;
    }

    .dashboard-header h1 {
        font-size: 1.5rem;
    }

    .section h2 {
        font-size: 1.25rem;
    }

    .user-info {
        grid-template-columns: 1fr;
    }

    .nav-links {
        flex-direction: column;
    }

    .nav-links .btn {
        width: 100%;
    }

    .challenge-meta {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .challenge-title {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .dashboard-header h1 {
        font-size: 1.3rem;
    }

    .dashboard-header > p {
        font-size: 0.95rem;
    }

    .info-card {
        padding: 15px;
    }

    .challenge-card {
        padding: 20px;
    }
}

/* Print Styles */
@media print {
    .dashboard-header .nav-links,
    .btn-outline,
    .footer,
    nav {
        display: none;
    }

    .dashboard-container {
        padding: 0;
    }

    .section {
        box-shadow: none;
        border: 1px solid #e2e8f0;
        page-break-inside: avoid;
    }
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark, #1e293b);
    line-height: 1;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    max-height: 85vh;
    overflow-y: auto;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal .close {
    color: #94a3b8;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.modal .close:hover {
    color: #ef4444;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark, #1e293b);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary, #4f46e5);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #64748b;
    font-size: 0.85rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}