/* ===================================
   Dashboard Styles
   =================================== */

.dashboard-section {
    padding: 40px 0 80px;
    background-color: var(--background-light);
    min-height: calc(100vh - 200px);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-header h1 {
    font-size: 2.5rem;
    color: var(--text-dark);
}

.btn-new-application {
    background-color: var(--secondary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-new-application:hover {
    background-color: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.nav-links a.active {
    color: var(--primary-color);
    font-weight: 600;
}

/* ===================================
   Dashboard Controls
   =================================== */
.dashboard-controls {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-gray);
}

.search-box input {
    width: 100%;
    padding: 12px 12px 12px 45px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.filter-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-box label {
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
}

.filter-box select {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
    min-width: 200px;
}

/* ===================================
   Applications Container
   =================================== */
.applications-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.application-card {
    background-color: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
}

.application-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.application-header-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.application-id {
    font-size: 0.85rem;
    color: var(--text-gray);
    font-weight: 600;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-pending_payment {
    background-color: #fef3c7;
    color: #92400e;
}

.status-payment_received {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-in_review {
    background-color: #e0e7ff;
    color: #3730a3;
}

.status-documents_prepared {
    background-color: #ddd6fe;
    color: #5b21b6;
}

.status-documents_sent {
    background-color: #fce7f3;
    color: #9f1239;
}

.status-completed {
    background-color: #d1fae5;
    color: #065f46;
}

.application-info {
    margin-bottom: 1rem;
}

.application-info h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.application-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.meta-item i {
    width: 16px;
    color: var(--primary-color);
}

.application-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.btn-view,
.btn-action {
    flex: 1;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

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

.btn-view:hover {
    background-color: var(--primary-dark);
}

.btn-action {
    background-color: var(--background-light);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-action:hover {
    background-color: var(--border-color);
}

/* ===================================
   Empty State
   =================================== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background-color: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

/* ===================================
   Loading State
   =================================== */
.loading-state {
    text-align: center;
    padding: 4rem 2rem;
    background-color: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.loading-state i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.loading-state p {
    color: var(--text-gray);
    font-size: 1.1rem;
}

/* ===================================
   Modal
   =================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.5rem;
    color: var(--text-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-gray);
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--text-dark);
}

.modal-body {
    padding: 2rem;
}

.detail-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-section:last-child {
    border-bottom: none;
}

.detail-section h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.detail-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.detail-label {
    font-weight: 600;
    color: var(--text-gray);
}

.detail-value {
    color: var(--text-dark);
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .dashboard-controls {
        flex-direction: column;
    }

    .search-box,
    .filter-box {
        width: 100%;
    }

    .filter-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-box select {
        width: 100%;
    }

    .applications-container {
        grid-template-columns: 1fr;
    }

    .application-actions {
        flex-direction: column;
    }

    .detail-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .modal-content {
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
    }
}