/* Dashboard Modal Styles */
.dashboard-modal .modal-content {
    max-width: 1200px;
    width: 95%;
    height: 90vh;
    margin: 2% auto;
    overflow: hidden;
}

.dashboard-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.dashboard-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background-color: var(--primary-color);
    color: var(--white);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dashboard-header h2 {
    color: var(--white);
    margin: 0;
    font-size: 1.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info span {
    font-weight: var(--font-medium);
}

/* Dashboard Sections */
.dashboard-section {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Dashboard Tabs */
.dashboard-tabs {
    display: flex;
    background-color: var(--light-gray);
    border-bottom: 1px solid var(--gray);
    padding: 0 2rem;
}

.tab-btn {
    padding: 1rem 2rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-family);
    font-weight: var(--font-medium);
    color: var(--dark-gray);
    transition: var(--transition);
    border-bottom: 3px solid transparent;
    position: relative;
}

.tab-btn:hover {
    color: var(--accent-color);
    background-color: rgba(49, 130, 206, 0.1);
}

.tab-btn.active {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
    background-color: var(--white);
}

/* Tab Content */
.tab-content {
    display: none;
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.tab-content.active {
    display: block;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    border-left: 4px solid var(--accent-color);
}

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

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: var(--gray);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-light));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    color: var(--dark-gray);
    font-weight: var(--font-medium);
}

.project-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.project-actions .btn {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.9rem;
}

/* Milestones Container */
.milestones-container {
    max-width: 800px;
}

.milestones-container h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.milestone-form {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.milestone-form .form-group {
    margin-bottom: 1rem;
}

.milestone-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: var(--font-medium);
    color: var(--primary-color);
}

.milestone-form input,
.milestone-form select {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--gray);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    transition: var(--transition);
}

.milestone-form input:focus,
.milestone-form select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.milestones-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.milestone-item {
    background-color: var(--white);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border-left: 4px solid var(--success-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.milestone-info h4 {
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.milestone-info p {
    color: var(--dark-gray);
    font-size: 0.9rem;
    margin: 0;
}

.milestone-progress {
    text-align: right;
}

.milestone-progress .progress-bar {
    width: 100px;
    margin-bottom: 0.25rem;
}

.milestone-progress span {
    font-size: 0.8rem;
    color: var(--dark-gray);
    font-weight: var(--font-medium);
}

/* Documents Container */
.documents-container {
    max-width: 800px;
}

.documents-container h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.document-form {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 2rem;
}

.document-form .form-group {
    margin-bottom: 1rem;
}

.document-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: var(--font-medium);
    color: var(--primary-color);
}

.document-form input,
.document-form select {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--gray);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    transition: var(--transition);
}

.document-form input:focus,
.document-form select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.documents-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.document-item {
    background-color: var(--white);
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border-left: 4px solid var(--accent-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.document-info h4 {
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.document-info p {
    color: var(--dark-gray);
    font-size: 0.9rem;
    margin: 0;
}

.document-actions {
    display: flex;
    gap: 0.5rem;
}

.document-actions .btn {
    padding: 6px 12px;
    font-size: 0.8rem;
}

/* Client Dashboard */
.client-projects {
    max-width: 800px;
    margin: 0 auto;
}

.client-projects h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.client-project-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border-left: 4px solid var(--accent-color);
}

.client-project-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.project-progress {
    margin-bottom: 2rem;
}

.project-progress .progress-bar {
    height: 12px;
    margin-bottom: 0.5rem;
}

.project-progress .progress-text {
    font-size: 1rem;
    font-weight: var(--font-medium);
}

.project-milestones,
.project-documents {
    margin-bottom: 2rem;
}

.project-milestones h5,
.project-documents h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--gray);
    padding-bottom: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-modal .modal-content {
        width: 98%;
        height: 95vh;
        margin: 1% auto;
    }
    
    .dashboard-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .dashboard-tabs {
        padding: 0 1rem;
        overflow-x: auto;
    }
    
    .tab-btn {
        padding: 0.75rem 1rem;
        white-space: nowrap;
    }
    
    .tab-content {
        padding: 1rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-actions {
        flex-direction: column;
    }
    
    .milestone-item,
    .document-item {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .milestone-progress {
        text-align: center;
    }
    
    .milestone-progress .progress-bar {
        width: 100%;
        max-width: 200px;
        margin: 0 auto 0.25rem;
    }
    
    .document-actions {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .dashboard-header h2 {
        font-size: 1.2rem;
    }
    
    .user-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .tab-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .project-card,
    .milestone-form,
    .document-form,
    .client-project-card {
        padding: 1rem;
    }
    
    .milestone-item,
    .document-item {
        padding: 0.75rem;
    }
}

/* Dashboard Specific Styles */

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3182ce;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced Card Hover Effects */
.project-card:hover,
.milestone-item:hover,
.document-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-completed {
    background-color: #38a169;
}

.status-in-progress {
    background-color: #d69e2e;
}

.status-pending {
    background-color: #e53e3e;
}

/* Progress Bar Animations */
.progress {
    animation: progressFill 1s ease-out;
}

@keyframes progressFill {
    from { width: 0%; }
    to { width: var(--progress-width); }
}

/* Enhanced Form Styles */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
    transform: translateY(-1px);
}

/* Button Animations */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Responsive Enhancements */
@media (max-width: 1024px) {
    .admin-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        order: 2;
    }
    
    .main-content {
        order: 1;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .admin-header,
    .client-header {
        padding: 1rem;
    }
    
    .admin-header h1,
    .client-header h1 {
        font-size: 1.4rem;
    }
    
    .welcome-section {
        padding: 2rem 1rem;
    }
    
    .welcome-section h2 {
        font-size: 1.8rem;
    }
    
    .project-overview {
        padding: 1.5rem;
    }
    
    .milestones-section,
    .documents-section {
        padding: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .admin-header,
    .client-header,
    .sidebar,
    .btn,
    .back-button {
        display: none !important;
    }
    
    .admin-container,
    .client-container {
        padding: 0;
        margin: 0;
    }
    
    .project-card,
    .milestone-item,
    .document-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
