/* Task Manager Application Custom Styles */

/* Root Variables */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-radius: 0.375rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-color);
}

/* Navigation Enhancements */
.navbar {
    box-shadow: var(--box-shadow);
    background: linear-gradient(135deg, var(--primary-color) 0%, #0a58ca 100%) !important;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link:hover {
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 2px;
    background-color: white;
    border-radius: 1px;
}

/* Card Enhancements */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-lg);
}

.card-header {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1) 0%, rgba(13, 110, 253, 0.05) 100%);
    border-bottom: 1px solid rgba(13, 110, 253, 0.1);
    font-weight: 600;
}

/* Button Enhancements */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0a58ca 100%);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #146c43 100%);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #e6a700 100%);
    border: none;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #b02a37 100%);
    border: none;
}

/* Form Enhancements */
.form-control, .form-select {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.1);
    transform: scale(1.02);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Badge Enhancements */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
    border-radius: 50px;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

/* Priority Badges */
.badge.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #b02a37 100%) !important;
    animation: pulse-danger 2s infinite;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e6a700 100%) !important;
    color: var(--dark-color) !important;
}

.badge.bg-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%) !important;
}

.badge.bg-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%) !important;
}

/* Status Badges */
.badge.bg-success {
    background: linear-gradient(135deg, #198754 0%, #146c43 100%) !important;
    animation: pulse-success 3s infinite;
}

.badge.bg-info {
    background: linear-gradient(135deg, #0dcaf0 0%, #0aa2c0 100%) !important;
}

.badge.bg-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    color: var(--dark-color) !important;
    border: 1px solid #dee2e6;
}

.badge.bg-dark {
    background: linear-gradient(135deg, #212529 0%, #1a1e21 100%) !important;
}

/* Progress Bar Enhancements */
.progress {
    border-radius: 50px;
    background-color: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--success-color) 0%, #20c997 100%);
    transition: width 1s ease-in-out;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 1rem 1rem;
    animation: progress-bar-stripes 1s linear infinite;
}

/* Table Enhancements */
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.table thead th {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0a58ca 100%);
    color: white;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
    transform: scale(1.01);
}

/* List Group Enhancements */
.list-group-item {
    border: none;
    border-bottom: 1px solid #e9ecef;
    transition: var(--transition);
}

.list-group-item:hover {
    background-color: rgba(13, 110, 253, 0.05);
    transform: translateX(5px);
}

.list-group-item:last-child {
    border-bottom: none;
}

/* Alert Enhancements */
.alert {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.alert-success::before {
    background-color: var(--success-color);
}

.alert-warning::before {
    background-color: var(--warning-color);
}

.alert-danger::before {
    background-color: var(--danger-color);
}

.alert-info::before {
    background-color: var(--info-color);
}

/* Modal Enhancements */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--box-shadow-lg);
}

.modal-header {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1) 0%, rgba(13, 110, 253, 0.05) 100%);
    border-bottom: 1px solid rgba(13, 110, 253, 0.1);
}

/* Dashboard Specific Styles */
.dashboard-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.8) 100%);
    backdrop-filter: blur(10px);
}

.stat-card {
    text-align: center;
    padding: 2rem;
    border-radius: var(--border-radius);
    color: white;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: var(--transition);
}

.stat-card:hover::before {
    animation: shimmer 1s ease-in-out;
}

/* Task Card Specific Styles */
.task-card {
    position: relative;
    overflow: hidden;
}

.task-card.overdue {
    border-left: 4px solid var(--danger-color);
    animation: pulse-warning 2s infinite;
}

.task-card.high-priority {
    border-left: 4px solid var(--warning-color);
}

.task-card.completed {
    opacity: 0.8;
    background-color: rgba(25, 135, 84, 0.05);
}

/* Project Card Specific Styles */
.project-card {
    position: relative;
    transition: var(--transition);
}

.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 49%, rgba(13, 110, 253, 0.1) 50%, transparent 51%);
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover::after {
    opacity: 1;
}

/* Animation Keyframes */
@keyframes pulse-danger {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
}

@keyframes pulse-success {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(25, 135, 84, 0);
    }
}

@keyframes pulse-warning {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

@keyframes shimmer {
    0% {
        top: -50%;
        right: -50%;
    }
    100% {
        top: 150%;
        right: 150%;
    }
}

@keyframes progress-bar-stripes {
    0% {
        background-position: 1rem 0;
    }
    100% {
        background-position: 0 0;
    }
}

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

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

/* Utility Classes */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.slide-in {
    animation: slideIn 0.6s ease-out;
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0a58ca 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

/* Responsive Design */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding: 0.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-group .btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Dark Mode Support (Future Enhancement) */
@media (prefers-color-scheme: dark) {
    :root {
        --light-color: #343a40;
        --dark-color: #f8f9fa;
    }
    
    body {
        background-color: #1a1d20;
        color: #f8f9fa;
    }
    
    .card {
        background-color: #2d3238;
        color: #f8f9fa;
    }
    
    .form-control, .form-select {
        background-color: #3c4043;
        border-color: #5f6368;
        color: #f8f9fa;
    }
    
    .table {
        background-color: #2d3238;
        color: #f8f9fa;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    .modal,
    .dropdown {
        display: none !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(13, 110, 253, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Custom Tooltip Styles */
.tooltip {
    font-size: 0.875rem;
}

.tooltip-inner {
    background-color: var(--dark-color);
    border-radius: var(--border-radius);
    padding: 0.5rem 0.75rem;
}

/* Focus Styles for Accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .badge {
        border: 1px solid currentColor;
    }
}