/* ============================================
   BULLSEYE - Modern Design System
   ============================================ */

/* ============================================
   CSS VARIABLES (Design Tokens) - PHASE 1
   ============================================ */
:root {
    /* Primary Colors - Softer Indigo */
    --primary: #4F46E5;           /* Indigo-600 */
    --primary-hover: #4338CA;     /* Indigo-700 */
    --primary-light: #EEF2FF;     /* Indigo-50 */
    --primary-dark: #312E81;      /* Indigo-900 */

    /* Secondary Colors - Emerald for Growth */
    --secondary: #10B981;         /* Emerald-500 */
    --secondary-hover: #059669;   /* Emerald-600 */
    --secondary-light: #D1FAE5;   /* Emerald-100 */

    /* Accent Colors */
    --accent: #F59E0B;            /* Amber-500 for warnings */
    --accent-light: #FEF3C7;      /* Amber-100 */

    /* Danger/Error */
    --danger: #EF4444;            /* Red-500 */
    --danger-light: #FEE2E2;      /* Red-100 */

    /* Neutrals - Warmer Grays */
    --neutral-50: #F5F5F5;        /* Warmer than previous */
    --neutral-100: #E5E5E5;
    --neutral-200: #D4D4D4;
    --neutral-300: #A3A3A3;
    --neutral-400: #737373;
    --neutral-500: #525252;
    --neutral-600: #404040;
    --neutral-700: #262626;
    --neutral-800: #171717;
    --neutral-900: #0A0A0A;

    /* Semantic Colors */
    --success: #10B981;
    --success-light: #D1FAE5;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --info: #3B82F6;
    --info-light: #DBEAFE;

    /* Text Colors */
    --text-primary: #171717;
    --text-secondary: #525252;
    --text-muted: #737373;

    /* Backgrounds */
    --bg-body: #FAFAFA;
    --bg-surface: #FFFFFF;
    --bg-white: #ffffff;
    --bg-dark: var(--neutral-900);

    /* Shadows - Softer, more subtle */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.07), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);

    /* Border */
    --border-color: #E5E5E5;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;

    /* Legacy aliases for compatibility */
    --radius-sm: 8px;
    --radius: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Spacing (8px base grid) */
    --space-1: 0.5rem;   /* 8px */
    --space-2: 1rem;     /* 16px */
    --space-3: 1.5rem;   /* 24px */
    --space-4: 2rem;     /* 32px */
    --space-5: 2.5rem;   /* 40px */
    --space-6: 3rem;     /* 48px */
    --space-8: 4rem;     /* 64px */

    /* Legacy spacing aliases */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;

    /* Typography Scale (Perfect Fourth - 1.333 ratio) */
    --text-xs: 0.75rem;      /* 12px */
    --text-sm: 0.875rem;     /* 14px */
    --text-base: 1rem;       /* 16px */
    --text-lg: 1.125rem;     /* 18px */
    --text-xl: 1.333rem;     /* ~21px */
    --text-2xl: 1.777rem;    /* ~28px */
    --text-3xl: 2.369rem;    /* ~38px */
    --text-4xl: 3.157rem;    /* ~51px */
    --text-5xl: 4.209rem;    /* ~67px */

    /* Font Weights */
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;

    /* Typography */
    --font-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    --font-heading: 'Inter', var(--font-base);

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
}

/* ============================================
   GLOBAL RESETS & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-base);
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-variant-numeric: tabular-nums;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--neutral-900);
}

/* ============================================
   SIDEBAR NAVIGATION - MODERN DESIGN
   ============================================ */
#sidebar-wrapper {
    background: var(--bg-white) !important;
    border-right: 1px solid var(--neutral-200) !important;
    box-shadow: var(--shadow-sm);
}

.sidebar-heading {
    padding: var(--spacing-md);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    border-bottom: 1px solid var(--neutral-200);
}

.sidebar-heading i {
    color: var(--secondary);
    margin-right: var(--spacing-sm);
}

.list-group-item {
    border: none !important;
    padding: 12px var(--spacing);
    margin: 4px 16px;
    border-radius: var(--radius) !important;
    transition: all 0.2s ease;
    color: var(--neutral-600);
    font-weight: 500;
    background: transparent !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-group-item:hover {
    background: var(--neutral-100) !important;
    color: var(--primary);
    transform: translateX(4px);
}

.list-group-item.active,
.list-group-item:active {
    background: var(--primary) !important;
    color: white !important;
}

.list-group-item i {
    width: 24px;
    margin-right: var(--spacing-sm);
    font-size: 18px;
}

/* ============================================
   CARDS - MODERN DESIGN
   ============================================ */
.card {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    background: var(--bg-surface);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: transparent;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0 !important;
    padding: var(--space-3);
    font-weight: var(--font-semibold);
}

.card-header.bg-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #6366F1 100%);
    color: white;
    border-bottom: none;
}

.card-header.bg-primary h5,
.card-header.bg-primary h4 {
    color: white;
}

.card-header h5,
.card-header h4 {
    margin: 0;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.card-body {
    padding: var(--spacing-md);
}

.card.shadow {
    box-shadow: var(--shadow-lg);
}

/* Card Variants */
.card.border-primary {
    border-color: var(--primary);
}

.card.border-success {
    border-color: var(--success);
}

.card.border-info {
    border-color: var(--info);
}

/* ============================================
   BUTTONS - MODERN DESIGN
   ============================================ */
.btn {
    border-radius: var(--radius);
    font-weight: 600;
    padding: 10px 20px;
    transition: all 0.2s ease;
    border: none;
    box-shadow: var(--shadow-sm);
}

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

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--secondary) 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--secondary-hover) 0%, var(--secondary) 100%);
    color: white;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1.1rem;
    border-radius: var(--radius-md);
}

.btn-sm {
    padding: 6px 16px;
    font-size: 0.875rem;
}

/* ============================================
   FORMS - MODERN DESIGN
   ============================================ */
.form-label {
    font-weight: 600;
    color: var(--neutral-700);
    margin-bottom: var(--spacing-sm);
}

.form-control,
.form-select {
    border: 1px solid var(--neutral-300);
    border-radius: var(--radius);
    padding: 12px 16px;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
    outline: none;
}

.form-floating > label {
    color: var(--neutral-500);
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary);
}

.form-check-input {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--neutral-300);
    border-radius: var(--radius-sm);
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px var(--primary-light);
    border-color: var(--primary);
}

.input-group-text {
    background: var(--neutral-100);
    border: 1px solid var(--neutral-300);
    color: var(--neutral-600);
    font-weight: 500;
}

/* ============================================
   TABLES - MODERN DESIGN
   ============================================ */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead {
    background: #0d6efd;
    color: white !important;
}

.table thead th {
    padding: 16px;
    font-weight: 600;
    border: none;
    white-space: nowrap;
    color: white !important;
    background-color: #0d6efd !important;
}

/* Ensure table-dark class has white text */
.table thead.table-dark {
    color: white !important;
}

.table thead.table-dark th {
    color: white !important;
}

.table tbody tr {
    transition: background 0.2s ease;
}

.table tbody tr:hover {
    background: var(--neutral-50);
}

.table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--neutral-200);
}

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

.table-hover tbody tr:hover {
    background: var(--neutral-50);
}

.table-bordered {
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.sticky-top {
    position: sticky;
    top: 0;
    z-index: 10;
}

/* ============================================
   ALERTS - MODERN DESIGN
   ============================================ */
.alert {
    border-radius: var(--radius-md);
    border: none;
    padding: var(--spacing);
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background: var(--success-light);
    color: #065f46;
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: var(--danger-light);
    color: #991b1b;
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: var(--warning-light);
    color: #92400e;
    border-left: 4px solid var(--warning);
}

.alert-info {
    background: var(--info-light);
    color: #1e40af;
    border-left: 4px solid var(--info);
}

.alert-dismissible .btn-close {
    padding: 12px;
}

/* ============================================
   BADGES - MODERN DESIGN
   ============================================ */
.badge {
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.75rem;
}

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

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

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

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

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

/* ============================================
   TEXT UTILITIES
   ============================================ */
.text-success {
    color: var(--success) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.text-info {
    color: var(--info) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.text-muted {
    color: var(--neutral-500) !important;
}

/* ============================================
   BACKGROUND UTILITIES
   ============================================ */
.bg-light {
    background-color: var(--neutral-50) !important;
}

.bg-dark {
    background-color: var(--neutral-900) !important;
}

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

.bg-black {
    background-color: var(--neutral-900) !important;
}

/* Background opacity variants */
.bg-opacity-25 {
    opacity: 0.25;
}

.bg-opacity-10 {
    background-color: rgba(0, 0, 0, 0.02) !important;
}

/* ============================================
   SPACING UTILITIES
   ============================================ */
.container-fluid {
    padding-left: var(--spacing-md);
    padding-right: var(--spacing-md);
}

/* ============================================
   STAT CARDS (Dashboard)
   ============================================ */
.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--neutral-200);
    height: 100%;
}

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

.stat-card .icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: var(--spacing);
}

.stat-card.primary .icon {
    background: var(--primary-light);
    color: var(--primary);
}

.stat-card.success .icon {
    background: var(--secondary-light);
    color: var(--secondary);
}

.stat-card.warning .icon {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 4px;
}

.stat-card .label {
    font-size: 0.875rem;
    color: var(--neutral-500);
    font-weight: 500;
}

/* ============================================
   FEATURE CARDS
   ============================================ */
.feature-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--neutral-200);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    margin-bottom: var(--spacing-md);
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--spacing);
    color: var(--neutral-900);
}

.feature-card p {
    color: var(--neutral-600);
    line-height: 1.7;
}

/* ============================================
   PROGRESS BARS
   ============================================ */
.progress {
    height: 8px;
    border-radius: var(--radius-full);
    background: var(--neutral-200);
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--neutral-100);
}

::-webkit-scrollbar-thumb {
    background: var(--neutral-400);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neutral-500);
}

/* ============================================
   PAGE HEADER
   ============================================ */
.page-header {
    background: var(--bg-surface);
    border-radius: var(--border-radius-lg);
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-4);
    box-shadow: var(--shadow-sm);
}

.page-header h2 {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    margin: 0;
    color: var(--text-primary);
}

/* ============================================
   ASSUMPTIONS GRID
   ============================================ */
.assumptions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-2);
    margin-top: var(--space-2);
}

.assumption-item {
    padding: var(--space-2);
    background: var(--neutral-50);
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: start;
    gap: var(--space-2);
    transition: all var(--transition-fast);
}

.assumption-item:hover {
    background: var(--neutral-100);
}

.assumption-item i {
    color: var(--primary);
    font-size: 20px;
    margin-top: 2px;
    flex-shrink: 0;
}

.assumption-item .assumption-content {
    flex: 1;
}

.assumption-label {
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    font-size: var(--text-sm);
    margin-bottom: 0.25rem;
    display: block;
}

.assumption-value {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

/* ============================================
   TABLE IMPROVEMENTS
   ============================================ */
.table thead th {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    padding: var(--space-2) var(--space-3);
}

.table tbody td {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
}

/* ============================================
   EMPTY STATES
   ============================================ */
.empty-state {
    text-align: center;
    padding: var(--space-6) var(--space-4);
    background: var(--bg-surface);
    border-radius: var(--border-radius-xl);
    border: 2px dashed var(--border-color);
    margin: var(--space-4) 0;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-light);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-3);
    color: var(--primary);
    font-size: 32px;
}

.empty-state-icon.success {
    background: var(--secondary-light);
    color: var(--secondary);
}

.empty-state-icon.warning {
    background: var(--accent-light);
    color: var(--accent);
}

.empty-state-title {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.empty-state-text {
    font-size: var(--text-base);
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto var(--space-4);
}

/* ============================================
   LOADING STATES
   ============================================ */
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton {
    background: linear-gradient(
        90deg,
        var(--neutral-100) 0%,
        var(--neutral-50) 50%,
        var(--neutral-100) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--border-radius-sm);
}

.skeleton-text {
    height: 16px;
    margin-bottom: var(--space-2);
    border-radius: var(--border-radius-sm);
}

.skeleton-text:last-child {
    width: 60%;
}

.skeleton-card {
    height: 200px;
    border-radius: var(--border-radius-lg);
}

.skeleton-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--neutral-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ============================================
   MODAL IMPROVEMENTS
   ============================================ */
.modal-content {
    border: none;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-header {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: var(--space-4);
}

.modal-title {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--space-4);
    max-height: 70vh;
    overflow-y: auto;
}

.modal-footer {
    background: var(--neutral-50);
    border-top: 1px solid var(--border-color);
    padding: var(--space-3) var(--space-4);
    display: flex;
    gap: var(--space-2);
    justify-content: flex-end;
}

.modal-backdrop.show {
    opacity: 0.6;
    backdrop-filter: blur(4px);
}

/* ============================================
   BADGE IMPROVEMENTS
   ============================================ */
.badge-modern {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius-xl);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    letter-spacing: 0.025em;
}

.badge.bg-success {
    background: var(--secondary-light) !important;
    color: var(--secondary) !important;
}

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

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

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

/* ============================================
   NAVIGATION SECTION TITLES
   ============================================ */
.nav-section-title {
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: var(--space-2) var(--space-3);
    margin-top: var(--space-4);
    margin-bottom: var(--space-2);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 768px) {
    #sidebar-wrapper {
        width: 100%;
        position: relative;
    }

    #page-content-wrapper {
        margin-left: 0 !important;
    }

    .card-header h5 {
        font-size: 1rem;
    }

    .stat-card .value {
        font-size: 1.5rem;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-soft {
    box-shadow: var(--shadow-md);
}

.rounded-lg {
    border-radius: var(--radius-lg) !important;
}

.rounded-xl {
    border-radius: var(--radius-xl) !important;
}

/* ============================================
   EXPENSE CARDS - Consistent with Rentals & Assets
   ============================================ */

/* Expense Card Styling */
.expense-card {
    transition: all var(--transition-base);
    border: 1px solid var(--border-color);
}

.expense-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg) !important;
}

/* Remove any conflicting styles - let Bootstrap handle it */

/* Expense Type Badges */
.expense-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: var(--border-radius-xl);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    letter-spacing: 0.025em;
}

.expense-type-badge.monthly {
    background: #F3E8FF;
    color: #7C3AED;
}

.expense-type-badge.yearly {
    background: #DBEAFE;
    color: #2563EB;
}

.expense-type-badge.onetime {
    background: #FEF3C7;
    color: #D97706;
}

/* Expense Phase Badges */
.expense-phase-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: var(--border-radius-xl);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    letter-spacing: 0.025em;
    margin-left: 0.5rem;
    margin-top: 0.25rem;
}

.expense-phase-badge.all-years {
    background: #F0FDF4;
    color: #15803D;
}

.expense-phase-badge.pre-retirement {
    background: #FEF3C7;
    color: #D97706;
}

.expense-phase-badge.post-retirement {
    background: #DBEAFE;
    color: #2563EB;
}

.expense-phase-badge.specific-years {
    background: #F3E8FF;
    color: #7C3AED;
}

/* Expense Amount Display */
.expense-amount {
    padding: 16px;
    border-radius: var(--border-radius-lg);
    text-align: center;
}

.expense-amount.monthly {
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
    color: #1e293b;
    border: 1px solid #e2e8f0;
}

.expense-amount.yearly {
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    color: #1e293b;
    border: 1px solid #e2e8f0;
}

.expense-amount.onetime {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    color: #1e293b;
    border: 1px solid #e2e8f0;
}

.expense-amount-label {
    font-size: var(--text-xs);
    opacity: 0.9;
    margin-bottom: 0.25rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.expense-amount-value {
    font-size: 1.75rem;
    font-weight: var(--font-bold);
    margin-bottom: 0.25rem;
}

.expense-amount-annual {
    font-size: var(--text-sm);
    opacity: 0.9;
}

/* Expense Category Grid */
.expense-category-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.expense-category-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--neutral-50);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-fast);
}

.expense-category-item:hover {
    background: var(--neutral-100);
    transform: translateX(4px);
}

.expense-category-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.expense-category-content {
    flex: 1;
}

.expense-category-content strong {
    display: block;
    color: var(--text-primary);
    font-weight: var(--font-semibold);
    margin-bottom: 0.25rem;
}

.expense-category-content p {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin: 0;
    line-height: 1.5;
}

/* Budget Guidelines */
.budget-guideline-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.budget-guideline-item {
    display: flex;
    align-items: start;
    gap: 1rem;
    padding: 1rem;
    background: var(--neutral-50);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-fast);
}

.budget-guideline-item:hover {
    background: var(--neutral-100);
    transform: translateX(4px);
}

.budget-percentage {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.125rem;
    font-weight: var(--font-bold);
    flex-shrink: 0;
}

.budget-content {
    flex: 1;
}

.budget-content strong {
    display: block;
    color: var(--text-primary);
    font-weight: var(--font-semibold);
    margin-bottom: 0.25rem;
}

.budget-content p {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin: 0;
    line-height: 1.5;
}

/* Pro Tips Cards */
.pro-tip-card {
    padding: 1.25rem;
    background: var(--neutral-50);
    border-radius: var(--border-radius-lg);
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
    height: 100%;
}

.pro-tip-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.pro-tip-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 1rem;
}

.pro-tip-card h6 {
    color: var(--text-primary);
    font-weight: var(--font-semibold);
    margin-bottom: 0.5rem;
}

.pro-tip-card p {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin: 0;
    line-height: 1.6;
}

/* Stat Icon - For Summary Cards */
.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--border-radius-lg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
}

/* ============================================
   AI MENU ITEM INDICATORS
   ============================================ */
/* AI menu items - subtle purple gradient on hover */
.ai-menu-item:hover {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(99, 102, 241, 0.05) 100%) !important;
    border-left: 3px solid #8b5cf6;
}

/* When AI menu item is active - purple gradient */
.ai-menu-item.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%) !important;
}
