/**
 * Project Manager App - Custom Styles
 * Custom CSS styles for the Project Manager application
 */

/* Base styles */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: #666;
}

/* Theme toggle button styling */
.theme-toggle-btn {
    transition: all 0.3s ease;
}

.theme-toggle-icon {
    transition: transform 0.3s ease;
}

.theme-toggle-icon--dark {
    transform: rotate(180deg);
}

/* Project card styles */
.project-card {
    transition: all 0.2s ease;
    border-radius: 8px !important;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.project-card .v-card-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.project-status-chip {
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

/* Task card styles */
.task-card {
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
}

.task-card--not-started {
    border-left-color: #9E9E9E;
}

.task-card--in-progress {
    border-left-color: #2196F3;
}

.task-card--completed {
    border-left-color: #4CAF50;
}

.task-card--overdue {
    border-left-color: #F44336;
}

.task-card:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.task-progress-bar {
    height: 6px !important;
    border-radius: 3px;
    overflow: hidden;
}

.task-hierarchy-indent {
    margin-left: 24px;
    border-left: 2px solid #E0E0E0;
    padding-left: 12px;
}

/* Resource assignment styles */
.resource-card {
    border-radius: 12px !important;
    overflow: hidden;
}

.resource-utilization-bar {
    height: 8px;
    border-radius: 4px;
    background: #F5F5F5;
    overflow: hidden;
    position: relative;
}

.resource-utilization-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.resource-utilization-fill--low {
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
}

.resource-utilization-fill--medium {
    background: linear-gradient(90deg, #FF9800, #FFC107);
}

.resource-utilization-fill--high {
    background: linear-gradient(90deg, #F44336, #FF5722);
}

/* Priority indicators */
.priority-indicator {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 500;
}

.priority-indicator--high {
    color: #F44336;
}

.priority-indicator--medium {
    color: #FF9800;
}

.priority-indicator--low {
    color: #4CAF50;
}

/* Dialog styles */
.dialog-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.dialog-content {
    padding: 24px;
}

.form-section {
    margin-bottom: 24px;
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #424242;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #E0E0E0;
}

/* Statistics cards */
.stat-card {
    text-align: center;
    padding: 20px;
    border-radius: 12px !important;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.stat-card--primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.stat-card--success {
    background: linear-gradient(135deg, #4CAF50 0%, #8BC34A 100%);
    color: white;
}

.stat-card--warning {
    background: linear-gradient(135deg, #FF9800 0%, #FFC107 100%);
    color: white;
}

.stat-card--error {
    background: linear-gradient(135deg, #F44336 0%, #FF5722 100%);
    color: white;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

/* Timeline styles */
.timeline-item {
    position: relative;
    padding: 12px 0;
    border-left: 2px solid #E0E0E0;
    margin-left: 12px;
    padding-left: 24px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 20px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2196F3;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #E0E0E0;
}

.timeline-item--completed::before {
    background: #4CAF50;
}

.timeline-item--overdue::before {
    background: #F44336;
}

.timeline-item--milestone::before {
    background: #FF9800;
    transform: rotate(45deg);
    border-radius: 0;
}

.timeline-date {
    font-size: 0.75rem;
    color: #666;
    font-weight: 500;
}

.timeline-title {
    font-weight: 600;
    margin: 4px 0;
}

.timeline-description {
    font-size: 0.875rem;
    color: #666;
}

/* Filters section */
.filters-section {
    background: #F8F9FA;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
}

.filters-title {
    font-weight: 600;
    margin-bottom: 16px;
    color: #424242;
}

/* Data table enhancements */
.v-data-table {
    border-radius: 8px !important;
    overflow: hidden;
}

.v-data-table__wrapper {
    border-radius: 8px;
}

.v-data-table .v-data-table-header {
    background: #F5F5F5;
}

.v-data-table .v-data-table-header th {
    font-weight: 600 !important;
    color: #424242 !important;
}

.v-data-table tbody tr:hover {
    background-color: rgba(25, 118, 210, 0.04) !important;
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.action-btn {
    min-width: 40px !important;
    width: 40px !important;
    height: 40px !important;
}

.action-btn--edit {
    color: #2196F3 !important;
}

.action-btn--delete {
    color: #F44336 !important;
}

.action-btn--view {
    color: #4CAF50 !important;
}

/* Task Tree View Styles */
.task-tree-item {
    margin-bottom: 8px;
}

.task-card {
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.task-card:hover {
    border-left-color: var(--v-theme-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.task-card--completed {
    opacity: 0.7;
    border-left-color: var(--v-theme-success);
}

.task-title {
    font-size: 1rem;
    line-height: 1.4;
}

.task-children {
    margin-top: 8px;
}

/* Resource Assignment Styles */
.assignment-cards {
    min-height: 200px;
}

.assignment-card {
    height: 100%;
    transition: all 0.2s ease;
    border-left: 4px solid var(--v-theme-primary);
}

.assignment-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.assignment-card--inactive {
    opacity: 0.6;
    border-left-color: var(--v-theme-grey);
}

.assignment-details {
    font-size: 0.875rem;
}

.assignment-target {
    padding: 8px 12px;
    background-color: rgba(var(--v-theme-primary), 0.1);
    border-radius: 8px;
}

.assignment-metrics {
    padding: 8px 0;
}

.assignment-item {
    padding: 8px 12px;
    background-color: rgba(var(--v-theme-surface), 0.5);
    border-radius: 8px;
    border-left: 3px solid var(--v-theme-primary);
}

/* Utilization View Styles */
.utilization-view {
    min-height: 300px;
}

.utilization-card {
    height: 100%;
    transition: all 0.2s ease;
}

.utilization-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.utilization-metrics {
    background-color: rgba(var(--v-theme-surface), 0.5);
    padding: 16px;
    border-radius: 12px;
}

/* Progress indicators */
.progress-indicator {
    position: relative;
}

.progress-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    border: 2px solid currentColor;
}

/* Status indicators */
.status-active {
    color: var(--v-theme-success);
}

.status-pending {
    color: var(--v-theme-warning);
}

.status-completed {
    color: var(--v-theme-primary);
}

.status-overdue {
    color: var(--v-theme-error);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.3s ease-out;
}

/* Mobile responsiveness */
@media (max-width: 960px) {
    .stat-number {
        font-size: 2rem;
    }
    
    .project-card,
    .task-card,
    .resource-card {
        margin-bottom: 16px;
    }
    
    .action-buttons {
        flex-wrap: wrap;
    }
    
    .dialog-content {
        padding: 16px;
    }
    
    .task-hierarchy-indent {
        margin-left: 16px;
        padding-left: 8px;
    }
}

@media (max-width: 600px) {
    .stat-card {
        padding: 16px;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .filters-section {
        padding: 12px;
    }
    
    .timeline-item {
        margin-left: 8px;
        padding-left: 16px;
    }
}

/* Dark theme adjustments */
.v-theme--dark .filters-section {
    background: #424242;
}

.v-theme--dark .form-section-title {
    color: #E0E0E0;
    border-bottom-color: #555;
}

.v-theme--dark .timeline-item {
    border-left-color: #555;
}

.v-theme--dark .timeline-item::before {
    box-shadow: 0 0 0 2px #555;
}

.v-theme--dark .v-data-table .v-data-table-header {
    background: #424242;
}

.v-theme--dark .task-hierarchy-indent {
    border-left-color: #555;
}

/* Animation classes */
.fade-enter-active,
.fade-leave-active {
    transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
    opacity: 0;
}

.slide-enter-active,
.slide-leave-active {
    transition: transform 0.3s ease;
}

.slide-enter-from {
    transform: translateX(-100%);
}

.slide-leave-to {
    transform: translateX(100%);
}

/* Utility classes */
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.border-radius-8 {
    border-radius: 8px !important;
}

.border-radius-12 {
    border-radius: 12px !important;
}

.gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-success {
    background: linear-gradient(135deg, #4CAF50 0%, #8BC34A 100%);
}

.gradient-warning {
    background: linear-gradient(135deg, #FF9800 0%, #FFC107 100%);
}

.gradient-error {
    background: linear-gradient(135deg, #F44336 0%, #FF5722 100%);
}

/* Progress indicators */
.progress-circle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.progress-text {
    position: absolute;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Custom scrollbar */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #2196F3 #F5F5F5;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #F5F5F5;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #2196F3;
    border-radius: 3px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #1976D2;
}

/* Elevation utilities */
.elevation-custom-1 {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24) !important;
}

.elevation-custom-2 {
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23) !important;
}

.elevation-custom-3 {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.19), 0 6px 6px rgba(0, 0, 0, 0.23) !important;
}