:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --success: #4cc9f0;
    --danger: #f72585;
    --warning: #ff9e00;
    --info: #4895ef;
    --light: #f8f9fa;
    --dark: #212529;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fb;
    color: #333;
    font-size: 0.875rem;
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary) !important;
    font-size: 1.1rem;
}

.nav-link {
    color: #555 !important;
    font-weight: 500;
    padding: 6px 12px !important;
    border-radius: 6px;
    margin: 0 2px;
    transition: all 0.3s;
    font-size: 0.85rem;
}

.nav-link:hover,
.nav-link.active {
    background-color: var(--primary);
    color: white !important;
}

.dashboard-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 15px;
    margin-bottom: 15px;
    transition: transform 0.3s;
    border: none;
}

.dashboard-card:hover {
    transform: translateY(-2px);
}

.card-icon {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.stat-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 2px;
}

.stat-label {
    color: #6c757d;
    font-size: 0.75rem;
}

.priority-low {
    border-left: 3px solid #28a745;
}

.priority-medium {
    border-left: 3px solid #ffc107;
}

.priority-high {
    border-left: 3px solid #dc3545;
}

.status-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.status-active {
    background-color: rgba(76, 201, 240, 0.2);
    color: #4cc9f0;
}

.status-completed {
    background-color: rgba(56, 193, 114, 0.2);
    color: #38c172;
}

.status-pending {
    background-color: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.status-frozen {
    background-color: rgba(108, 117, 125, 0.2);
    color: #6c757d;
}

.btn-primary-custom {
    background: var(--primary);
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-weight: 600;
    font-size: 0.8rem;
}

.btn-primary-custom:hover {
    background: var(--secondary);
}

.btn-sm {
    padding: 4px 8px !important;
    font-size: 0.75rem !important;
}

.task-item {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
    font-size: 0.8rem;
}

.task-item:hover {
    background-color: #f8f9fa;
}

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

.task-checkbox {
    margin-right: 10px;
    transform: scale(0.8);
}

.task-content {
    flex: 1;
}

.task-title {
    font-weight: 600;
    margin-bottom: 2px;
    font-size: 0.85rem;
}

.task-meta {
    font-size: 0.75rem;
    color: #6c757d;
}

.task-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.progress-bar-custom {
    background: linear-gradient(90deg, var(--primary) 0%, var(--success) 100%);
    border-radius: 4px;
}

.progress {
    height: 4px;
}

.modal-custom .modal-header {
    background: var(--primary);
    color: white;
    padding: 10px 15px;
}

.modal-title {
    font-size: 1rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.page-header h2 {
    font-size: 1.3rem;
    margin: 0;
}

.finance-income {
    border-left: 3px solid #28a745;
}

.finance-expense {
    border-left: 3px solid #dc3545;
}

.badge {
    font-size: 0.7rem;
    padding: 4px 8px;
}

.table th,
.table td {
    padding: 8px 12px;
    font-size: 0.8rem;
}

.form-control,
.form-select {
    font-size: 0.8rem;
    padding: 6px 12px;
}

.form-label {
    font-size: 0.8rem;
    margin-bottom: 4px;
}

/* Small finance cards */
.finance-card {
    background: white;
    border-radius: 6px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    border-top: 3px solid transparent;
}

.finance-card.income {
    border-top-color: #28a745;
}

.finance-card.expense {
    border-top-color: #dc3545;
}

.finance-card.mandatory {
    border-top-color: #007bff;
}

.finance-card.unnecessary {
    border-top-color: #ffc107;
}

.finance-number {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.finance-label {
    color: #6c757d;
    font-size: 0.7rem;
}

/* Quick actions */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.quick-btn {
    padding: 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    text-align: center;
    border: 1px solid #dee2e6;
    background: white;
    transition: all 0.3s;
}

.quick-btn:hover {
    background: #f8f9fa;
    border-color: var(--primary);
}

/* Login page styles */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.login-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 100%;
    max-width: 400px;
}

/* Category specific styles */
.category-table th {
    font-size: 0.8rem;
    font-weight: 600;
    background-color: #f8f9fa;
}

.category-table td {
    font-size: 0.8rem;
    vertical-align: middle;
}

.action-btns {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.action-btns .btn {
    padding: 4px 8px;
    font-size: 0.7rem;
    border-radius: 4px;
}

/* Badge styles for category types */
.badge.bg-primary {
    background-color: var(--primary) !important;
}

.badge.bg-info {
    background-color: var(--info) !important;
}

.badge.bg-warning {
    background-color: var(--warning) !important;
}

/* Modal enhancements for categories */
.modal-sm {
    max-width: 400px;
}

.modal-content {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Table hover effects */
.table-hover tbody tr:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

/* Empty state styling */
.text-muted {
    color: #6c757d !important;
}

/* Responsive table */
.table-responsive {
    border-radius: 8px;
}

/* Button states */
.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-danger:hover {
    background-color: var(--danger);
    border-color: var(--danger);
}


/* Delete animation styles */
.table-danger {
    background-color: rgba(220, 53, 69, 0.1) !important;
    transition: all 0.3s ease;
}

.fade-out {
    opacity: 0;
    transform: translateX(-100%);
}

/* Delete button states */
.btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

/* Loading state for delete buttons */
.btn-danger[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Bulk selection styles */
.transaction-checkbox {
    transform: scale(0.8);
}

#bulkDeleteBtn {
    transition: all 0.3s ease;
}

/* Confirmation dialog styles */
.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

/* Compact Finance Cards */
.finance-mini-card {
    background: white;
    border-radius: 6px;
    padding: 10px;
    border-left: 3px solid transparent;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.finance-mini-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.finance-mini-card.income {
    border-left-color: #28a745;
}

.finance-mini-card.expense {
    border-left-color: #dc3545;
}

.finance-mini-card.mandatory {
    border-left-color: #007bff;
}

.finance-mini-card.unnecessary {
    border-left-color: #ffc107;
}

.finance-mini-icon {
    font-size: 1rem;
    margin-bottom: 5px;
    opacity: 0.8;
}

.finance-mini-card.income .finance-mini-icon {
    color: #28a745;
}

.finance-mini-card.expense .finance-mini-icon {
    color: #dc3545;
}

.finance-mini-card.mandatory .finance-mini-icon {
    color: #007bff;
}

.finance-mini-card.unnecessary .finance-mini-icon {
    color: #ffc107;
}

.finance-mini-amount {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2px;
}

.finance-mini-label {
    font-size: 0.7rem;
    color: #6c757d;
    font-weight: 500;
}

/* Net Summary Card */
.finance-net-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 6px;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
}

.finance-net-card.net-positive {
    border-left: 3px solid #28a745;
}

.finance-net-card.net-negative {
    border-left: 3px solid #dc3545;
}

.finance-net-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 2px;
}

.finance-net-amount {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

.finance-net-ratio {
    font-size: 0.65rem;
    color: #6c757d;
}

/* Even More Compact Alternative */
.finance-micro-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.finance-micro-card {
    background: white;
    border-radius: 4px;
    padding: 8px;
    text-align: center;
    border-top: 2px solid transparent;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.finance-micro-card.income {
    border-top-color: #28a745;
}

.finance-micro-card.expense {
    border-top-color: #dc3545;
}

.finance-micro-card.mandatory {
    border-top-color: #007bff;
}

.finance-micro-card.unnecessary {
    border-top-color: #ffc107;
}

.finance-micro-amount {
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.1;
}

.finance-micro-label {
    font-size: 0.6rem;
    color: #6c757d;
    margin-top: 2px;
}

/* Ultra Compact Row Style */
.finance-stats-row {
    display: flex;
    background: white;
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.finance-stat-item {
    flex: 1;
    text-align: center;
    padding: 4px 8px;
    border-right: 1px solid #f1f3f4;
}

.finance-stat-item:last-child {
    border-right: none;
}

.finance-stat-amount {
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.2;
}

.finance-stat-label {
    font-size: 0.65rem;
    color: #6c757d;
    margin-top: 1px;
}

.income-stat .finance-stat-amount { color: #28a745; }
.expense-stat .finance-stat-amount { color: #dc3545; }
.mandatory-stat .finance-stat-amount { color: #007bff; }
.unnecessary-stat .finance-stat-amount { color: #ffc107; }


/* Main Plans Specific Styles */
.plan-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.plan-actions .btn {
    padding: 4px 8px;
    font-size: 0.7rem;
    border-radius: 4px;
}

/* Progress bar styles */
.progress {
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-custom {
    background: linear-gradient(90deg, var(--primary) 0%, var(--success) 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Status badges for plans */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.status-active {
    background-color: rgba(76, 201, 240, 0.2);
    color: #4cc9f0;
    border: 1px solid rgba(76, 201, 240, 0.3);
}

.status-completed {
    background-color: rgba(56, 193, 114, 0.2);
    color: #38c172;
    border: 1px solid rgba(56, 193, 114, 0.3);
}

.status-on_hold {
    background-color: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.status-frozen {
    background-color: rgba(108, 117, 125, 0.2);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.3);
}

/* Priority borders */
.priority-low {
    border-left: 3px solid #28a745;
}

.priority-medium {
    border-left: 3px solid #ffc107;
}

.priority-high {
    border-left: 3px solid #dc3545;
}

/* Edit button specific styles */
.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Freeze button styles */
.btn-outline-warning {
    border-color: #ffc107;
    color: #ffc107;
}

.btn-outline-warning:hover {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

/* Modal enhancements for main plans */
.modal-custom .modal-header {
    background: var(--primary);
    color: white;
    padding: 12px 20px;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Responsive task items */
@media (max-width: 768px) {
    .task-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .task-actions {
        margin-top: 10px;
        width: 100%;
        justify-content: flex-end;
    }
    
    .plan-actions {
        flex-wrap: wrap;
    }
}

/* Animation for plan updates */
.plan-updating {
    opacity: 0.7;
    background-color: #f8f9fa;
}

.plan-updated {
    animation: highlightUpdate 2s ease;
}

@keyframes highlightUpdate {
    0% { background-color: rgba(76, 201, 240, 0.3); }
    100% { background-color: transparent; }
}


/* Target Projects Specific Styles */
.table-custom {
    font-size: 0.8rem;
}

.table-custom th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.table-custom td {
    vertical-align: middle;
    padding: 8px 12px;
}

/* Status dropdown styles */
.target-status {
    width: 120px;
    font-size: 0.75rem;
    padding: 4px 8px;
}

/* Table row animations */
.table-updated {
    background-color: rgba(76, 201, 240, 0.1) !important;
    transition: background-color 0.3s ease;
}

/* Action buttons in table */
.action-btns {
    white-space: nowrap;
}

.action-btns .btn {
    padding: 4px 8px;
    font-size: 0.7rem;
    margin: 0 2px;
}

/* Bulk actions */
#bulkActionsContainer {
    display: none;
}

#bulkStatusAction {
    width: 150px;
}

/* Status badges for targets */
.status-lead { background-color: #6c757d; color: white; }
.status-contacted { background-color: #17a2b8; color: white; }
.status-proposal { background-color: #ffc107; color: #212529; }
.status-won { background-color: #28a745; color: white; }
.status-lost { background-color: #dc3545; color: white; }

/* Responsive table */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.7rem;
    }
    
    .target-status {
        width: 100px;
    }
    
    .action-btns .btn {
        padding: 2px 4px;
        font-size: 0.6rem;
    }
}


/* Reports Specific Styles */
.report-header {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.report-actions {
    margin-bottom: 1rem;
}

.report-actions .btn {
    margin-right: 0.5rem;
}

.date-filters {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner-content {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    text-align: center;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Chart Containers */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Report Tables */
.report-table {
    font-size: 0.875rem;
}

.report-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Quick Stats Cards */
.quick-stats .card {
    transition: transform 0.2s ease;
}

.quick-stats .card:hover {
    transform: translateY(-2px);
}

/* Export Buttons */
.export-buttons .btn {
    margin: 0 0.25rem;
}

/* Responsive Reports */
@media (max-width: 768px) {
    .date-filters .row {
        margin-bottom: 0.5rem;
    }
    
    .date-filters .col-md-3,
    .date-filters .col-md-2 {
        margin-bottom: 0.5rem;
    }
    
    .report-table {
        font-size: 0.8rem;
    }
}

/* Print Styles for Reports */
@media print {
    .navbar,
    .page-header .btn,
    .date-filters,
    .report-actions,
    .export-buttons {
        display: none !important;
    }
    
    .dashboard-card {
        border: none !important;
        box-shadow: none !important;
    }
    
    .report-header {
        page-break-after: avoid;
    }
    
    .table-responsive {
        overflow: visible !important;
    }
}

/* Add these styles to your CSS file */
.task-deleting {
    background-color: #ffe6e6 !important;
    transition: all 0.3s ease;
}

.task-item {
    transition: all 0.3s ease;
}

.status-pending { background-color: #ffc107; color: #000; }
.status-completed { background-color: #28a745; color: #fff; }
.status-cancelled { background-color: #dc3545; color: #fff; }

.priority-high { border-left: 4px solid #dc3545; }
.priority-medium { border-left: 4px solid #ffc107; }
.priority-low { border-left: 4px solid #28a745; }