:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-radius: 0.5rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #f8f9fa;
    color: #212529;
    line-height: 1.6;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.08);
    padding: 0.75rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
}

.nav-link {
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    color: rgba(255,255,255,.8) !important;
}

/* Cards */
.card {
    border-radius: var(--border-radius);
    border: 0;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0,0,0,.05);
    padding: 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

/* Stats Cards */
.stats-card {
    transition: var(--transition);
}

.stats-card:hover {
    transform: translateY(-5px);
}

.icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    color: var(--secondary-color);
    border-top: 0;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    vertical-align: middle;
    border-color: rgba(0,0,0,.05);
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-sm {
    font-size: 0.875rem;
}

/* Forms */
.form-control, .form-select {
    border-radius: var(--border-radius);
    border: 1px solid #ced4da;
    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.25);
}

/* Modals */
.modal-content {
    border-radius: var(--border-radius);
    border: 0;
}

.modal-header {
    border-bottom: 1px solid rgba(0,0,0,.05);
}

.modal-footer {
    border-top: 1px solid rgba(0,0,0,.05);
}

/* Badges */
.badge {
    font-weight: 500;
    border-radius: var(--border-radius);
}

/* Notification bell */
.notification-badge {
    font-size: 0.65rem;
    min-width: 1.1rem;
    padding: 0.2em 0.45em;
}

.notification-dropdown {
    min-width: 280px;
    max-height: 360px;
    overflow-y: auto;
}

.notification-item {
    white-space: normal;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
}

.notification-item:hover {
    background-color: rgba(13, 110, 253, 0.08);
}

#notificationBell {
    padding-right: 0.75rem;
}

/* Wasted Time */
.wasted-time-list {
    max-height: 300px;
    overflow-y: auto;
}

/* Category Colors */
.category-color {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 8px;
}

/* Color Picker */
.form-control-color {
    padding: 0.25rem;
    border-radius: var(--border-radius);
    border: 1px solid #ced4da;
}

/* Alerts */
.alert {
    border-radius: var(--border-radius);
    border: 0;
}

/* Charts */
canvas {
    max-height: 300px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        border-radius: var(--border-radius);
        margin-bottom: 0.25rem;
    }
    
    .icon-box {
        width: 40px;
        height: 40px;
    }
    
    .stats-card h4 {
        font-size: 1.25rem;
    }
    
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 1rem;
    }
    
    .d-flex.justify-content-between .btn-group {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .card-header {
        padding: 0.75rem;
    }
    
    .table-responsive {
        font-size: 0.8rem;
    }
    
    .btn-sm {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
    
    .icon-box {
        width: 36px;
        height: 36px;
    }
    
    .stats-card h4 {
        font-size: 1.1rem;
    }
    
    .stats-card h6 {
        font-size: 0.8rem;
    }
    
    .modal-dialog {
        margin: 1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: var(--border-radius);
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: var(--border-radius);
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Date Picker Styles */
.flatpickr-calendar {
    font-family: inherit;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: var(--border-radius);
}

.flatpickr-day.selected, 
.flatpickr-day.startRange, 
.flatpickr-day.endRange, 
.flatpickr-day.selected.inRange, 
.flatpickr-day.startRange.inRange, 
.flatpickr-day.endRange.inRange, 
.flatpickr-day.selected:focus, 
.flatpickr-day.startRange:focus, 
.flatpickr-day.endRange:focus, 
.flatpickr-day.selected:hover, 
.flatpickr-day.startRange:hover, 
.flatpickr-day.endRange:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.flatpickr-day.today {
    border-color: var(--primary-color);
}

.flatpickr-day:hover {
    background: rgba(13, 110, 253, 0.1);
    border-color: rgba(13, 110, 253, 0.1);
}

/* Navigation Buttons */
.btn-group .btn {
    border-radius: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: var(--border-radius);
    border-bottom-left-radius: var(--border-radius);
}

.btn-group .btn:last-child {
    border-top-right-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

/* Responsive adjustments for date picker */
@media (max-width: 768px) {
    .d-flex.align-items-center {
        flex-direction: column;
        align-items: stretch !important;
        gap: 1rem;
    }
    
    .input-group {
        max-width: 100% !important;
    }
    
    .btn-group {
        width: 100%;
    }
    
    .btn-group .btn {
        flex: 1;
    }
}

/* Authentication Forms */
.auth-card {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: none;
}

.auth-card .card-body {
    padding: 3rem;
}

.auth-logo {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.auth-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.input-group-text {
    background-color: var(--light-color);
    border-right: none;
}

.form-control {
    border-left: none;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-control:focus + .input-group-text {
    border-color: var(--primary-color);
}

.password-strength {
    height: 5px;
    border-radius: 2px;
    margin-top: 0.5rem;
    transition: all 0.3s ease;
}

.strength-weak {
    background-color: #dc3545;
    width: 33%;
}

.strength-medium {
    background-color: #ffc107;
    width: 66%;
}

.strength-strong {
    background-color: #198754;
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .auth-card .card-body {
        padding: 2rem;
    }
    
    .auth-title {
        font-size: 1.5rem;
    }
}

/* Task timer */
.task-timer-display {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.task-timer-elapsed {
    font-size: 2.25rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    color: var(--dark-color);
}

.task-timer-floating-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    background: linear-gradient(90deg, #0d6efd 0%, #0a58ca 100%);
    color: #fff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.task-timer-floating-bar .task-timer-rec-dot {
    animation: task-timer-pulse 1.5s ease-in-out infinite;
}

body.task-timer-active {
    padding-bottom: 4rem;
}

@keyframes task-timer-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

@media (max-width: 576px) {
    .task-timer-elapsed {
        font-size: 1.75rem;
    }
}