/* KPIxTrack Global Styles */
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Navigation Styles */
.navbar {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: white !important;
    transform: translateY(-2px);
}

.nav-link.active {
    color: white !important;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 25px;
}

/* Card Styles */
.card, .content-card, .hero-section {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.hero-section {
    margin-top: 2rem;
    padding: 3rem;
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 20px 20px 0 0 !important;
    color: white;
    padding: 2rem;
}

/* Form Styles */
.form-control, .form-select {
    border-radius: 5px;
    border: 2px solid #e9ecef;
    padding: 5px 8px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-control:disabled {
    background-color: #f8f9fa;
    opacity: 0.8;
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
}

/* Button Styles */
.btn-modern {
    border-radius: 8px;
    padding: 6px 12px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: linear-gradient(135deg, #007bff 0%, #6610f2 100%);
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 123, 255, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(40, 167, 69, 0.3);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    color: white;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(23, 162, 184, 0.3);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(220, 53, 69, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(108, 117, 125, 0.3);
}

/* Alert Styles */
.alert {
    border-radius: 15px;
    border: none;
    padding: 20px;
}

/* Table Styles */
.table {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: none;
}

.table th {
    background: #6c757d;
    color: white;
    font-weight: 600;
    border: none;
}

.table td {
    vertical-align: middle;
    border-color: #e9ecef;
}

/* Feature Card Styles */
.feature-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: none;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

/* Badge Styles */
.badge {
    padding: 8px 15px;
    border-radius: 25px;
    font-weight: 500;
}

/* KPI Type Styles */
.kpi-type-common {
    border-left: 4px solid #0dcaf0 !important;
    background: linear-gradient(to right, rgba(13, 202, 240, 0.1), transparent);
}

.kpi-type-challenge {
    border-left: 4px solid #ffc107 !important;
    background: linear-gradient(to right, rgba(255, 193, 7, 0.1), transparent);
}

.kpi-type-project {
    border-left: 4px solid #dc3545 !important;
    background: linear-gradient(to right, rgba(220, 53, 69, 0.1), transparent);
}

.kpi-type-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-type-badge.common {
    background: linear-gradient(45deg, #0dcaf0, #0bb5e0);
    color: white;
}

.kpi-type-badge.challenge {
    background: linear-gradient(45deg, #ffc107, #e6a900);
    color: #000;
}

.kpi-type-badge.project {
    background: linear-gradient(45deg, #dc3545, #c42a3a);
    color: white;
}

.kpi-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.kpi-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.kpi-item {
    transition: all 0.3s ease;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.kpi-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Task Management Styles */
.stat-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

.task-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.task-title {
    color: var(--bs-primary);
    cursor: pointer;
    transition: color 0.2s ease;
}

.task-title:hover {
    color: var(--bs-dark);
    text-decoration: underline;
}

.task-description {
    font-size: 0.9rem;
    line-height: 1.4;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.task-priority {
    width: 4px;
    height: 100%;
    border-radius: 2px;
    margin-top: 0.25rem;
}

.priority-low {
    background-color: #28a745;
}

.priority-normal {
    background-color: #17a2b8;
}

.priority-high {
    background-color: #ffc107;
}

.priority-critical {
    background-color: #dc3545;
}

.section-divider {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.section-title {
    color: var(--bs-primary);
    font-weight: 600;
    margin: 0;
}

.form-label.required::after {
    content: " *";
    color: #dc3545;
}

.progress {
    background-color: #e9ecef;
}

.task-detail .priority-indicator {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
}

.task-detail .priority-indicator.priority-low {
    background-color: #28a745;
}

.task-detail .priority-indicator.priority-normal {
    background-color: #17a2b8;
}

.task-detail .priority-indicator.priority-high {
    background-color: #ffc107;
    color: #000;
}

.task-detail .priority-indicator.priority-critical {
    background-color: #dc3545;
}

/* File upload area */
.file-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 0.375rem;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.2s ease;
}

.file-upload-area:hover {
    border-color: var(--bs-primary);
}

.file-upload-area.dragover {
    border-color: var(--bs-primary);
    background-color: rgba(13, 110, 253, 0.1);
}

/* Task status badges */
.badge.bg-secondary {
    background-color: #6c757d !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.badge.bg-info {
    background-color: #0dcaf0 !important;
    color: #000 !important;
}

.badge.bg-success {
    background-color: #198754 !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
}

/* Responsive adjustments for task cards */
@media (max-width: 768px) {
    .task-card .card-body {
        padding: 1rem;
    }
    
    .task-meta {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .stat-card .card-body {
        text-align: center;
    }
    
    .stat-icon {
        margin-top: 0.5rem;
    }
}

/* Toast container positioning */
.toast-container {
    z-index: 1080;
}

/* Loading states */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Custom scrollbar for task modals */
.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1rem;
    }
    
    .card-header {
        padding: 1.5rem;
    }
}

/* Task Group and Type Modal Styles */
.input-group .btn {
    border-left: 0;
}

.input-group .form-select {
    border-right: 0;
}

.input-group .btn-outline-primary {
    color: var(--bs-primary);
    border-color: #ced4da;
}

.input-group .btn-outline-primary:hover {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

.input-group .btn-outline-primary:focus {
    box-shadow: none;
}

/* Modal form improvements */
.modal .form-label.required::after {
    content: " *";
    color: #dc3545;
    font-weight: bold;
}

.modal .form-control:focus,
.modal .form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(139, 107, 77, 0.25);
}

/* Small modal adjustments */
.modal-dialog {
    max-width: 500px;
}

.modal-header {
    background: linear-gradient(135deg, var(--bs-primary), #a67c5a);
    color: white;
}

.modal-header .btn-close {
    filter: invert(1);
}
