/* ============================================
   SERVICE CALENDAR STYLES
   ============================================ */

/* Calendar Container */
.service-calendar {
    margin-top: 1.5rem;
    overflow: hidden;
    max-width: 100%;
}

/* Calendar Empty State */
.calendar-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    background: rgba(9, 15, 27, 0.3);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

.calendar-empty .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.calendar-empty h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.calendar-empty p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ============================================
   REVOLUTIONARY CALENDAR CONTROLS
   ============================================ */

/* Calendar Header with Enhanced Navigation */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(59, 130, 246, 0.08) 100%);
    border-radius: 16px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    max-width: 100%;
    overflow: hidden;
    flex-wrap: wrap;
}

.calendar-nav-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.calendar-month-year {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calendar-month-year:hover {
    background: rgba(139, 92, 246, 0.15);
}

.calendar-month-year svg {
    width: 18px;
    height: 18px;
    opacity: 0.6;
}

.calendar-header .btn-icon {
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #a78bfa;
    padding: 0.6rem 0.85rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    font-weight: 600;
}

.calendar-header .btn-icon:hover {
    background: rgba(139, 92, 246, 0.25);
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.3);
}

.calendar-header .btn-icon:active {
    transform: translateY(0);
}

/* View Mode Switcher */
.calendar-view-switcher {
    display: flex;
    gap: 0.35rem;
    background: rgba(15, 23, 42, 0.5);
    padding: 0.35rem;
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.view-mode-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.view-mode-btn:hover {
    background: rgba(139, 92, 246, 0.15);
    color: var(--text-primary);
}

.view-mode-btn.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* Year Selector Modal */
.year-selector-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(15, 23, 42, 0.98);
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 24px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 10000;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 0 100px rgba(139, 92, 246, 0.2);
}

.year-selector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(139, 92, 246, 0.2);
}

.year-selector-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.close-year-selector {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.25rem;
    line-height: 1;
}

.close-year-selector:hover {
    background: rgba(239, 68, 68, 0.25);
    transform: scale(1.1);
}

.year-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
}

.year-option {
    padding: 1rem;
    background: rgba(139, 92, 246, 0.08);
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}

.year-option:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.3);
}

.year-option.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    border-color: #8b5cf6;
    color: white;
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.5);
}

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.6rem;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.5) 0%, rgba(15, 23, 42, 0.3) 100%);
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid rgba(139, 92, 246, 0.15);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
    max-width: 100%;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

/* Day Headers (Sun, Mon, etc.) */
.calendar-day-header {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    min-width: 0;
    overflow: hidden;
}

/* Calendar Days */
.calendar-day {
    aspect-ratio: 1;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1.5px solid rgba(139, 92, 246, 0.12);
    border-radius: 12px;
    padding: 0.6rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
    justify-content: flex-start;
}

.calendar-day::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(139, 92, 246, 0.03), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.calendar-day:hover::before {
    opacity: 1;
}

.calendar-day:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.25),
                0 0 30px rgba(139, 92, 246, 0.1);
}

.calendar-day-empty {
    background: transparent;
    border: none;
    cursor: default;
    pointer-events: none;
}

.calendar-day-empty::before {
    display: none;
}

.calendar-day-number {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fbff;
    margin: 0;
    z-index: 2;
    min-width: 0;
    overflow: visible;
    white-space: nowrap;
    width: 100%;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Today Highlight */
.calendar-day-today {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.25) 0%, rgba(99, 102, 241, 0.2) 100%);
    border: 2px solid #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2),
                0 6px 16px rgba(139, 92, 246, 0.3);
}

.calendar-day-today .calendar-day-number {
    color: #c4b5fd;
    font-weight: 800;
    font-size: 1.05rem;
}

/* Days with Services */
.calendar-day-has-service {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12) 0%, rgba(59, 130, 246, 0.08) 100%);
    border-color: rgba(59, 130, 246, 0.4);
}

.calendar-day-has-service:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25) 0%, rgba(59, 130, 246, 0.15) 100%);
    border-color: #3b82f6;
}

/* Service Indicators (colored dots) */
.service-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    justify-content: center;
    align-items: center;
    margin-top: auto;
    min-width: 0;
    overflow: hidden;
    max-width: 100%;
}

.service-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Service Colors */
/* Blue - Oil Change */
.service-indicator[style*="#3b82f6"] {
    background-color: #3b82f6 !important;
}

/* Red - Brake */
.service-indicator[style*="#ef4444"] {
    background-color: #ef4444 !important;
}

/* Yellow - Tire */
.service-indicator[style*="#eab308"] {
    background-color: #eab308 !important;
}

/* Green - Inspection */
.service-indicator[style*="#10b981"] {
    background-color: #10b981 !important;
}

/* Gray - Other */
.service-indicator[style*="#6b7280"] {
    background-color: #6b7280 !important;
}

/* Calendar Details (Selected Date) */
.calendar-details {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(9, 15, 27, 0.3);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
}

.calendar-details-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.calendar-details-services {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Service Record Card (used in calendar details) */
.service-record-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    transition: all 0.2s ease;
}

.service-record-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.15);
}

.service-card-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.service-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.service-main {
    flex: 1;
    min-width: 0;
}

.service-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.service-meta {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.service-cost {
    font-size: 1.125rem;
    font-weight: 700;
    color: #10b981;
    flex-shrink: 0;
}

.service-card-body {
    padding-left: 3.5rem;
    margin-bottom: 0.75rem;
}

.service-provider {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0 0 0.5rem 0;
}

.service-notes {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-style: italic;
    margin: 0;
}

.service-card-actions {
    display: flex;
    gap: 1rem;
    padding-left: 3.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-text {
    background: none;
    border: none;
    color: #60a5fa;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.btn-text:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.btn-text-danger {
    color: #f87171;
}

.btn-text-danger:hover {
    color: #ef4444;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .calendar-header {
        margin-bottom: 1rem;
    }

    .calendar-month-year {
        font-size: 1.125rem;
    }

    .calendar-grid {
        gap: 0.375rem;
        padding: 0.75rem;
    }

    .calendar-day {
        padding: 0.375rem;
        min-height: 60px;
    }

    .calendar-day-number {
        font-size: 0.75rem;
    }

    .service-indicator {
        width: 7px;
        height: 7px;
    }

    .calendar-details {
        padding: 1rem;
    }

    .calendar-details-title {
        font-size: 1rem;
    }

    .service-record-card:hover {
        transform: none;
    }

    .service-card-header {
        flex-wrap: wrap;
    }

    .service-cost {
        font-size: 1rem;
    }

    .service-card-body {
        padding-left: 0;
    }

    .service-card-actions {
        padding-left: 0;
    }
}

@media (max-width: 480px) {
    .calendar-grid {
        gap: 0.25rem;
        padding: 0.5rem;
    }

    .calendar-day {
        padding: 0.25rem;
        min-height: 50px;
    }

    .calendar-day-number {
        font-size: 0.6875rem;
    }

    .calendar-day-header {
        font-size: 0.625rem;
        padding: 0.375rem;
    }

    .service-indicators {
        gap: 0.125rem;
    }

    .service-indicator {
        width: 6px;
        height: 6px;
    }

    .service-icon {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }

    .service-title {
        font-size: 0.9375rem;
    }

    .service-meta,
    .service-provider,
    .service-notes {
        font-size: 0.8125rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.calendar-day:focus-visible {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}

.calendar-header .btn-icon:focus-visible {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .calendar-day,
    .calendar-header .btn-icon,
    .service-record-card {
        transition: none;
    }

    .calendar-day:hover,
    .service-record-card:hover {
        transform: none;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .calendar-header .btn-icon {
        display: none;
    }

    .service-card-actions {
        display: none;
    }

    .calendar-day {
        cursor: default;
    }

    .calendar-day:hover {
        transform: none;
        box-shadow: none;
    }
}

/* ============================================
   COLOR LEGEND (Optional - for future use)
   ============================================ */

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(9, 15, 27, 0.3);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

.legend-color.oil {
    background-color: #3b82f6;
}

.legend-color.brake {
    background-color: #ef4444;
}

.legend-color.tire {
    background-color: #eab308;
}

.legend-color.inspection {
    background-color: #10b981;
}

.legend-color.other {
    background-color: #6b7280;
}

@media (max-width: 480px) {
    .calendar-legend {
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .legend-item {
        font-size: 0.75rem;
    }

    .legend-color {
        width: 10px;
        height: 10px;
    }
}

/* ============================================
   TIMELINE VIEW
   ============================================ */

.timeline-view {
    margin-top: 2rem;
}

.timeline-container {
    position: relative;
    padding-left: 2rem;
}

.timeline-line {
    position: absolute;
    left: 0.75rem;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg,
        rgba(139, 92, 246, 0.5) 0%,
        rgba(139, 92, 246, 0.3) 50%,
        rgba(139, 92, 246, 0.1) 100%);
    border-radius: 10px;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 2rem;
}

.timeline-dot {
    position: absolute;
    left: -1.75rem;
    top: 0.5rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid rgba(15, 23, 42, 0.9);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3),
                0 4px 12px rgba(139, 92, 246, 0.4);
    z-index: 2;
}

.timeline-date {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.timeline-services {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ============================================
   YEAR OVERVIEW
   ============================================ */

.year-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.month-card {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.6) 0%, rgba(15, 23, 42, 0.4) 100%);
    border: 2px solid rgba(139, 92, 246, 0.15);
    border-radius: 16px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.month-card:hover {
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.2);
}

.month-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.month-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.month-service-count {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.month-mini-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    margin-bottom: 0.75rem;
}

.mini-day {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.mini-day.has-service {
    background: rgba(59, 130, 246, 0.3);
    color: var(--text-primary);
    font-weight: 600;
}

.month-stats {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.month-stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.month-stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
}

.month-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #10b981;
}

/* ============================================
   CALENDAR FILTER & EXPORT TOOLBAR
   ============================================ */

.calendar-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.15);
    max-width: 100%;
    overflow: hidden;
}

.calendar-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-chip {
    padding: 0.5rem 1rem;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 20px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-chip:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
}

.filter-chip.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    border-color: #8b5cf6;
    color: white;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.filter-chip svg {
    width: 14px;
    height: 14px;
}

.calendar-actions {
    display: flex;
    gap: 0.5rem;
}

.export-btn,
.share-btn {
    padding: 0.6rem 1.2rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 10px;
    color: #10b981;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.export-btn:hover,
.share-btn:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
}

.share-btn {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    color: #3b82f6;
}

.share-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.3);
}

/* ============================================
   INSIGHTS PANEL
   ============================================ */

.calendar-insights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-radius: 16px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.insight-card {
    background: rgba(15, 23, 42, 0.6);
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.15);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.insight-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.insight-value {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.insight-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

/* ============================================
   YEAR SELECTOR MODAL
   ============================================ */

.year-selector-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    padding: 0.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.year-option {
    padding: 1rem;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.6) 0%, rgba(15, 23, 42, 0.4) 100%);
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.year-option:hover {
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.2) 0%, rgba(59, 130, 246, 0.15) 100%);
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

.year-option.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 50%, #3b82f6 100%);
    border-color: #8b5cf6;
    color: white;
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.year-option.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(139, 92, 246, 0.5);
}

@media (max-width: 480px) {
    .year-selector-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   ENHANCED TIMELINE VIEW
   ============================================ */

.timeline-events {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.timeline-month-group {
    position: relative;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 12px;
}

.timeline-month-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(139, 92, 246, 0.2);
}

.timeline-month-header h5 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.timeline-month-stats {
    display: flex;
    gap: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.timeline-month-stats span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.timeline-month-stats span:last-child {
    color: #10b981;
    font-weight: 700;
}

.timeline-services {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.timeline-service-item {
    display: flex;
    gap: 1.25rem;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 10px;
    border-left: 3px solid rgba(139, 92, 246, 0.3);
    transition: all 0.2s ease;
}

.timeline-service-item:hover {
    background: rgba(15, 23, 42, 0.5);
    border-left-color: rgba(139, 92, 246, 0.6);
    transform: translateX(4px);
}

.timeline-dot {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-top: 0.25rem;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.8),
                0 4px 12px currentColor;
}

.timeline-service-content {
    flex: 1;
    min-width: 0;
}

.timeline-service-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
    gap: 1rem;
}

.timeline-service-type {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.timeline-service-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
}

.timeline-service-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.timeline-service-details .detail {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.timeline-service-details .cost {
    color: #10b981;
    font-weight: 700;
}

.timeline-service-notes {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgba(139, 92, 246, 0.05);
    border-radius: 6px;
    border-left: 2px solid rgba(139, 92, 246, 0.3);
}

/* ============================================
   ENHANCED MONTH CARD STYLING
   ============================================ */

.month-header {
    margin-bottom: 1rem;
}

.month-header h5 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.month-indicators {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(139, 92, 246, 0.2);
}

.service-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.8),
                0 2px 6px currentColor;
}

.no-services {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: rgba(139, 92, 246, 0.1);
    border-radius: 4px;
}

.month-stats {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    font-size: 0.9rem;
}

.month-count {
    color: var(--text-secondary);
    font-weight: 600;
}

.month-cost {
    color: #10b981;
    font-weight: 700;
}

/* ============================================
   FILTER COUNT BADGE
   ============================================ */

.filter-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 0.35rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-left: 0.25rem;
}

.filter-chip.active .filter-count {
    background: rgba(255, 255, 255, 0.3);
}

/* ============================================
   TIMELINE TITLE STYLING
   ============================================ */

.timeline-title {
    text-align: center;
    flex: 1;
}

.timeline-title h4 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.25rem 0;
}

.timeline-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.calendar-year {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calendar-year:hover {
    background: rgba(139, 92, 246, 0.15);
}

.calendar-year svg {
    width: 18px;
    height: 18px;
    opacity: 0.6;
}

/* ============================================
   RESPONSIVE TIMELINE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .timeline-service-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .timeline-service-details {
        gap: 0.75rem;
    }

    .timeline-month-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .timeline-month-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .filter-chip {
        font-size: 0.75rem;
        padding: 0.4rem 0.75rem;
    }

    .filter-count {
        min-width: 18px;
        height: 18px;
        font-size: 0.65rem;
    }

    .timeline-service-item {
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .timeline-month-group {
        padding: 1rem;
    }

    .year-overview {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .month-card {
        padding: 1rem;
    }
}
