/**
 * Custom Styles
 */

/* General */
body {
    background-color: #f8f9fa;
}

/* Cards */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Dashboard Stats */
.stats-card {
    border-left: 4px solid;
}

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

.stats-card.expenses {
    border-left-color: #dc3545;
}

.stats-card.invoices {
    border-left-color: #007bff;
}

.stats-card.overdue {
    border-left-color: #ffc107;
}

/* Tables */
.table th {
    font-weight: 600;
    background-color: #f8f9fa;
}

.table-hover tbody tr:hover {
    background-color: #f1f3f5;
}

/* Invoice Status Badges */
.badge {
    font-weight: 500;
}

/* Forms */
.form-label {
    font-weight: 500;
}

.required::after {
    content: " *";
    color: #dc3545;
}

/* Invoice Line Items */
.line-item {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
}

.line-item:hover {
    border-color: #adb5bd;
}

/* Action Buttons */
.btn-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Page Header */
.page-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Invoice Preview */
.invoice-preview {
    background: #fff;
    padding: 2rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

.invoice-preview .company-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.invoice-preview .invoice-title {
    font-size: 2rem;
    font-weight: 300;
    color: #3498db;
}

/* Reports */
.report-summary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 0.5rem;
    padding: 1.5rem;
}

.report-summary .amount {
    font-size: 2rem;
    font-weight: 700;
}

/* Category Colors */
.category-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

/* Category Filter Pills (Calendar View) */
.category-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 1rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background-color: #e9ecef;
    color: #6c757d;
    border: 1px solid transparent;
    user-select: none;
}

.category-pill input[type="checkbox"] {
    display: none;
}

.category-pill.active {
    background-color: var(--pill-color, #6c757d);
    color: #fff;
    border-color: var(--pill-color, #6c757d);
}

.category-pill:hover {
    opacity: 0.85;
}

.category-pill .pill-label {
    margin-left: 0;
}

/* Expense Calendar */
#expense-calendar {
    min-height: 600px;
}

#expense-calendar .fc-event {
    cursor: pointer;
    font-size: 0.8rem;
    padding: 2px 4px;
}

#expense-calendar .fc-daygrid-day:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

#expense-calendar .fc-day-today {
    background-color: rgba(255, 193, 7, 0.1) !important;
}

/* Auth Pages */
.auth-container {
    max-width: 400px;
    margin: 2rem auto;
}

.auth-container .card {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.auth-container .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    text-align: center;
    padding: 1.5rem;
}

.auth-container .card-header h3 {
    margin: 0;
    font-weight: 600;
}

/* Settings Page */
.settings-nav .nav-link {
    color: #495057;
    border-radius: 0;
    border-left: 3px solid transparent;
}

.settings-nav .nav-link:hover {
    background-color: #f8f9fa;
}

.settings-nav .nav-link.active {
    background-color: #e9ecef;
    border-left-color: #007bff;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 1.5rem;
    }

    .table-responsive {
        font-size: 0.875rem;
    }

    .btn-group-sm > .btn {
        padding: 0.2rem 0.4rem;
    }
}

/* Upload Zone */
.upload-zone {
    cursor: pointer;
    transition: all 0.2s ease;
}

.upload-zone:hover {
    border-color: #0d6efd !important;
    background-color: rgba(13, 110, 253, 0.05) !important;
}

/* Print styles */
@media print {
    .navbar,
    footer,
    .btn,
    .no-print {
        display: none !important;
    }

    .invoice-preview {
        border: none;
        padding: 0;
    }
}
