:root {
    --primary-color: #4361ee;
    --secondary-color: #4cc9f0;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    --dark-color: #121826;
    --light-color: #f8f9fa;
    --gray-color: #6c757d;
    --text-color: #333333;
    --background-color: #ffffff;
    --card-background: #f8f9fa;
    --border-color: #dee2e6;
    --ai-color: #4285f4;
}

/* Add smooth scrolling */
html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
    padding-top: 70px;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar.fixed-top {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color) !important;
}

.navbar-brand i {
    margin-right: 0.5rem;
}

.nav-link {
    color: var(--text-color) !important;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
    padding: 5rem 0 3rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

.hero-section h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.text-gradient {
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* AI Chat Section */
.ai-chat-section {
    padding: 4rem 0 3rem;
    background: #f8f9fa;
}

.chat-container {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    height: 500px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.message {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 10px;
    max-width: 80%;
}

.user-message {
    background: #e3f2fd;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.ai-message {
    background: #f5f5f5;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--ai-color);
}

.message-header i {
    font-size: 1.2rem;
}

.message-content {
    line-height: 1.5;
}

.message-time {
    font-size: 0.8rem;
    color: #999;
    margin-top: 0.5rem;
    text-align: right;
}

.chat-input {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: #fafafa;
}

.quick-questions {
    margin-top: 0.5rem;
}

/* Section Title */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.section-title i {
    margin-right: 0.5rem;
}

/* Cards */
.card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.card-header {
    background: var(--card-background);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    border-radius: 12px 12px 0 0 !important;
}

.card-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.card-header i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.card-body {
    padding: 1.5rem;
}

/* Inputs */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    display: block;
}

.form-control, .form-select {
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 100%;
}

.form-control:focus, .form-select:focus {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
    color: var(--text-color);
    outline: none;
}

.form-control::placeholder {
    color: #6c757d;
}

.input-with-icon {
    position: relative;
}

.input-with-icon span {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-weight: 500;
}

.input-with-icon input {
    padding-left: 2.5rem;
}

.text-muted {
    color: #6c757d !important;
    font-size: 0.875rem;
}

/* Form Notes */
.form-note {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #6c757d;
    border-left: 3px solid var(--primary-color);
}

.form-note i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* Expense Warning */
.expense-warning {
    background: #fff8e1;
    border-radius: 8px;
    padding: 1rem;
    border-left: 4px solid var(--warning-color);
}

.warning-text {
    margin-top: 0.5rem;
    color: #e65100;
    font-size: 0.9rem;
}

/* Debt Warning */
.debt-warning {
    background: #ffebee;
    border-radius: 8px;
    padding: 1rem;
    border-left: 4px solid var(--danger-color);
    margin-top: 1rem;
}

.debt-metrics {
    display: flex;
    gap: 2rem;
    margin: 1rem 0;
}

.debt-metric {
    display: flex;
    flex-direction: column;
}

.debt-metric span:first-child {
    font-size: 0.9rem;
    color: #666;
}

.debt-metric .value {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary-color), #3a56d4);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #3a56d4, var(--primary-color));
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.2);
    color: white;
}

.btn-outline-primary {
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-outline-secondary {
    border: 1px solid var(--gray-color);
    color: var(--gray-color);
    background: transparent;
}

.btn-outline-secondary:hover {
    background: var(--gray-color);
    border-color: var(--gray-color);
    color: white;
}

.btn-outline-danger {
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
    background: transparent;
}

.btn-outline-danger:hover {
    background: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
}

.btn-group .btn {
    padding: 0.5rem 1rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Summary Cards */
.summary-card {
    background: var(--card-background);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
}

.summary-card h5 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.summary-item {
    text-align: center;
}

.summary-item .label {
    display: block;
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.summary-item .value {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
}

#summarySavings.text-success {
    color: var(--success-color) !important;
}

#summarySavings.text-danger {
    color: var(--danger-color) !important;
}

/* Chart Containers */
.chart-container {
    height: 300px;
    position: relative;
    margin-bottom: 1rem;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
}

.comparison-chart-container {
    height: 250px;
    margin: 1.5rem 0;
}

.chart-container-fullscreen {
    height: 400px;
    position: relative;
}

/* Metrics */
.metric-large {
    text-align: center;
    margin: 1.5rem 0;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    line-height: 1;
}

.metric-change {
    font-size: 1.2rem;
    margin-top: 0.5rem;
}

.metric-change.text-success {
    color: var(--success-color) !important;
}

.metric-change.text-danger {
    color: var(--danger-color) !important;
}

.metric-label {
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.metric-details {
    background: var(--card-background);
    padding: 1rem;
    border-radius: 8px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item .label {
    color: #6c757d;
}

.detail-item .value {
    font-weight: 500;
    color: var(--text-color);
}

/* Credit Score */
.credit-score {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.score-meter {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, #f44336, #ff9800, #4caf50);
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

/* Retirement Progress */
.retirement-progress {
    margin: 1.5rem 0;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: #6c757d;
}

.progress-bar {
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 5px;
    transition: width 1s ease-in-out;
}

.retirement-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Health Meter */
.health-score {
    text-align: center;
    margin-bottom: 2rem;
}

.score-display {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.score-value {
    color: var(--primary-color);
}

.score-label {
    font-size: 1.5rem;
    color: #6c757d;
}

.health-meter {
    margin: 1.5rem 0;
}

.meter-track {
    height: 12px;
    background: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.meter-fill {
    height: 100%;
    background: linear-gradient(90deg, #f72585, #7209b7, #4361ee, #4cc9f0);
    border-radius: 6px;
    transition: width 1s ease-in-out;
}

.meter-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    color: #6c757d;
    font-size: 0.85rem;
}

.health-chart-container {
    height: 200px;
    margin: 2rem 0;
}

.health-factors {
    background: var(--card-background);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.factors-grid {
    display: grid;
    gap: 0.5rem;
}

.factors-grid p {
    margin: 0;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Events Grid */
.events-grid {
    display: grid;
    gap: 1rem;
}

.event-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.event-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.event-card.disabled {
    opacity: 0.6;
    background: #f5f5f5;
}

.event-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.event-header i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.event-header h5 {
    flex: 1;
    margin: 0;
    font-size: 1rem;
}

.event-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-color);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.event-inputs {
    display: grid;
    gap: 0.75rem;
}

.event-input {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.event-input label {
    font-size: 0.85rem;
    color: #6c757d;
}

.event-note {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    color: #6c757d;
    font-size: 0.85rem;
}

.add-event-card {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: rgba(67, 97, 238, 0.05);
    border: 2px dashed var(--primary-color);
    min-height: 100px;
}

.add-event-card:hover {
    background: rgba(67, 97, 238, 0.1);
}

.add-event-content {
    text-align: center;
    color: var(--primary-color);
}

.add-event-content i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* Milestones */
.milestones-timeline {
    min-height: 200px;
    position: relative;
}

.milestone-placeholder, .insights-placeholder, .empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.milestone-placeholder i, .insights-placeholder i, .empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #adb5bd;
}

.milestone-placeholder p, .insights-placeholder p, .empty-state p {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.milestone-placeholder small, .insights-placeholder small, .empty-state small {
    font-size: 0.9rem;
}

.milestone-item {
    position: relative;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: var(--card-background);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.milestone-item.success {
    border-left-color: var(--success-color);
}

.milestone-item.danger {
    border-left-color: var(--danger-color);
}

.milestone-item.warning {
    border-left-color: var(--warning-color);
}

.milestone-year {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    text-align: right;
}

.milestone-year span {
    display: block;
    font-weight: bold;
    color: var(--primary-color);
}

.milestone-year small {
    display: block;
    font-size: 0.85rem;
    color: #6c757d;
}

.milestone-content {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.milestone-icon {
    width: 40px;
    height: 40px;
    background: rgba(67, 97, 238, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.milestone-icon i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.milestone-details h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.milestone-details p {
    margin: 0;
    color: #6c757d;
    font-size: 0.95rem;
}

/* Insights */
.insight-card {
    background: var(--card-background);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.insight-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.insight-card.primary {
    border-left: 4px solid var(--primary-color);
}

.insight-icon {
    width: 50px;
    height: 50px;
    background: rgba(67, 97, 238, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.insight-icon i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.insight-content h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1.2rem;
}

.insight-content h5 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.insight-content p {
    margin: 0 0 1rem 0;
    color: #6c757d;
    line-height: 1.6;
}

.insight-suggestion {
    background: rgba(15, 23, 42, 0.05);
    padding: 1rem;
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
    font-size: 0.95rem;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}
/* Debt Summary */
.debt-summary {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--card-background);
    border-radius: 8px;
}

.debt-summary h5 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

/* Scenarios */
.scenarios-list {
    min-height: 100px;
}

.scenario-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--card-background);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.scenario-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.scenario-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
}

.scenario-info p {
    margin: 0 0 0.25rem 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.scenario-info small {
    color: #6c757d;
    font-size: 0.85rem;
}

.scenario-actions {
    display: flex;
    gap: 0.5rem;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-lg {
    max-width: 800px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h4 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
}

.modal-close {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.modal-close:hover {
    background: rgba(244, 67, 54, 0.1);
    color: var(--danger-color);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Features Section */
.features-section {
    padding: 4rem 0;
    background: var(--card-background);
}

.feature-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    height: 100%;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-icon i {
    color: white;
    font-size: 1.8rem;
}

.feature-card h4 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    color: var(--text-color);
}

.feature-card p {
    color: #6c757d;
    line-height: 1.6;
}

/* Footer */
.footer {
    background: var(--card-background);
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    margin-top: 3rem;
}

.footer h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer p {
    color: #6c757d;
    margin: 0.5rem 0;
}

.disclaimer {
    font-size: 0.85rem;
    color: #6c757d !important;
    margin-top: 1rem !important;
    font-style: italic;
}

/* Toast Notifications */
.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    max-width: 350px;
    z-index: 10000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.hide {
    opacity: 0;
    transform: translateX(100%);
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-content h6 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    color: var(--text-color);
}

.toast-content p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
}

.toast-close {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    flex-shrink: 0;
}

.toast-close:hover {
    background: rgba(244, 67, 54, 0.1);
    color: var(--danger-color);
}

.toast-success {
    border-left: 4px solid var(--success-color);
}

.toast-warning {
    border-left: 4px solid var(--warning-color);
}

.toast-danger {
    border-left: 4px solid var(--danger-color);
}

.toast-info {
    border-left: 4px solid var(--primary-color);
}

/* Progress Bar */
.progress {
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #ff9800, #f44336);
    transition: width 0.3s ease;
}

/* Loading Animation */
.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: ''; }
    40% { content: '.'; }
    60% { content: '..'; }
    80%, 100% { content: '...'; }
}

/* Chat message formatting */
.chat-messages pre {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 10px 0;
    font-size: 0.9rem;
}

.chat-messages code {
    background: #e8e8e8;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
}

.chat-messages ul, .chat-messages ol {
    margin-left: 20px;
    margin-bottom: 10px;
}

.chat-messages li {
    margin-bottom: 5px;
}

.chat-messages strong {
    color: var(--primary-color);
}

.chat-messages .alert {
    margin: 10px 0;
    padding: 10px;
    border-radius: 5px;
}
/* ====== NEW AI CHAT STYLING ====== */

/* AI Loading Animation */
.loading-ai {
    color: var(--primary-color);
    font-style: italic;
}

.loading-ai .fa-spinner {
    margin-right: 8px;
    color: var(--secondary-color);
}

/* Professional AI Response Styling */
.ai-response {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
    margin: 1rem 0;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.1);
    border: 1px solid rgba(67, 97, 238, 0.1);
}

.ai-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(67, 97, 238, 0.2);
}

.ai-header i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.ai-header strong {
    font-size: 1.1rem;
    color: var(--dark-color);
}

.ai-content {
    line-height: 1.6;
    font-size: 0.95rem;
    color: var(--text-color);
}

.ai-content h4 {
    color: var(--primary-color);
    margin: 1.25rem 0 0.75rem 0;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.25rem;
    font-weight: 600;
}

.ai-content p {
    margin-bottom: 1rem;
}

.ai-content ul, .ai-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.ai-content li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.ai-footer {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border-color);
    text-align: right;
    color: var(--gray-color);
    font-size: 0.85rem;
}

.ai-footer i {
    color: #ff6b00;
    margin-right: 5px;
}

.ai-footer small {
    font-size: 0.85rem;
}

/* API Key Status Styling */
#apiKeyStatus {
    padding: 0.5rem;
    border-radius: 6px;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

#apiKeyStatus .text-success {
    background: rgba(76, 175, 80, 0.1);
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    display: inline-block;
    border-left: 3px solid var(--success-color);
}

#apiKeyStatus .text-danger {
    background: rgba(244, 67, 54, 0.1);
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    display: inline-block;
    border-left: 3px solid var(--danger-color);
}

#apiKeyStatus .text-warning {
    background: rgba(255, 152, 0, 0.1);
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    display: inline-block;
    border-left: 3px solid var(--warning-color);
}

#apiKeyStatus .text-info {
    background: rgba(33, 150, 243, 0.1);
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    display: inline-block;
    border-left: 3px solid var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding-top: 60px;
    }
    
    .hero-section {
        padding: 2rem 0 1rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chart-legend {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .milestone-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .milestone-year {
        position: static;
        text-align: left;
        margin-bottom: 0.5rem;
    }
    
    .features-section {
        padding: 2rem 0;
    }
    
    .footer {
        text-align: center;
    }
    
    .footer .text-md-end {
        text-align: center !important;
        margin-top: 1rem;
    }
    
    .modal-lg {
        margin: 1rem;
    }
    
    .chart-container-fullscreen {
        height: 300px;
    }
    
    .quick-questions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .quick-questions .btn {
        margin: 0.25rem 0;
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .debt-metrics {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-section .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .hero-section .btn-lg {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .features-section .row {
        margin: 0 -10px;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
    }
    
    .feature-icon i {
        font-size: 1.5rem;
    }
}
/* Professional AI Response Styling */
.ai-response {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
    margin: 1rem 0;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.1);
    border: 1px solid rgba(67, 97, 238, 0.1);
}

.ai-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(67, 97, 238, 0.2);
}

.ai-header i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.ai-header strong {
    font-size: 1.1rem;
    color: var(--dark-color);
}

.ai-content {
    line-height: 1.6;
    font-size: 0.95rem;
    color: var(--text-color);
}

.ai-content h4 {
    color: var(--primary-color);
    margin: 1.25rem 0 0.75rem 0;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.25rem;
    font-weight: 600;
}

.ai-content p {
    margin-bottom: 1rem;
}

.ai-content ul, .ai-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.ai-content li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.ai-footer {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border-color);
    text-align: right;
    color: var(--gray-color);
    font-size: 0.85rem;
}

.ai-footer i {
    color: #ff6b00;
    margin-right: 5px;
}

.ai-footer small {
    font-size: 0.85rem;
}

/* API Key Status Styling */
#apiKeyStatus {
    padding: 0.5rem;
    border-radius: 6px;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

#apiKeyStatus .text-success {
    background: rgba(76, 175, 80, 0.1);
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    display: inline-block;
    border-left: 3px solid var(--success-color);
}

#apiKeyStatus .text-danger {
    background: rgba(244, 67, 54, 0.1);
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    display: inline-block;
    border-left: 3px solid var(--danger-color);
}

#apiKeyStatus .text-warning {
    background: rgba(255, 152, 0, 0.1);
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    display: inline-block;
    border-left: 3px solid var(--warning-color);
}

#apiKeyStatus .text-info {
    background: rgba(33, 150, 243, 0.1);
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    display: inline-block;
    border-left: 3px solid var(--primary-color);
}
/* AI Loading Animation */
.loading-ai {
    color: var(--primary-color);
    font-style: italic;
}

.loading-ai .fa-spinner {
    margin-right: 8px;
    color: var(--secondary-color);
}

/* Professional AI Response Styling */
.ai-response {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
    margin: 1rem 0;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.1);
    border: 1px solid rgba(67, 97, 238, 0.1);
}

.ai-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(67, 97, 238, 0.2);
}

.ai-header i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.ai-header strong {
    font-size: 1.1rem;
    color: var(--dark-color);
}

.ai-content {
    line-height: 1.6;
    font-size: 0.95rem;
    color: var(--text-color);
}

.ai-content h4 {
    color: var(--primary-color);
    margin: 1.25rem 0 0.75rem 0;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.25rem;
    font-weight: 600;
}

.ai-content p {
    margin-bottom: 1rem;
}

.ai-content ul, .ai-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.ai-content li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.ai-footer {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border-color);
    text-align: right;
    color: var(--gray-color);
    font-size: 0.85rem;
}

.ai-footer i {
    color: #ff6b00;
    margin-right: 5px;
}

.ai-footer small {
    font-size: 0.85rem;
}

/* API Key Status Styling */
#apiKeyStatus {
    padding: 0.5rem;
    border-radius: 6px;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

#apiKeyStatus .text-success {
    background: rgba(76, 175, 80, 0.1);
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    display: inline-block;
    border-left: 3px solid var(--success-color);
}

#apiKeyStatus .text-danger {
    background: rgba(244, 67, 54, 0.1);
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    display: inline-block;
    border-left: 3px solid var(--danger-color);
}

#apiKeyStatus .text-warning {
    background: rgba(255, 152, 0, 0.1);
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    display: inline-block;
    border-left: 3px solid var(--warning-color);
}

#apiKeyStatus .text-info {
    background: rgba(33, 150, 243, 0.1);
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    display: inline-block;
    border-left: 3px solid var(--primary-color);
}
/* ====== NEW AI CHAT STYLING ====== */

/* AI Loading Animation */
.loading-ai {
    color: var(--primary-color);
    font-style: italic;
}

.loading-ai .fa-spinner {
    margin-right: 8px;
    color: var(--secondary-color);
}

/* Professional AI Response Styling */
.ai-response {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid var(--primary-color);
    margin: 1rem 0;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.1);
    border: 1px solid rgba(67, 97, 238, 0.1);
}

.ai-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(67, 97, 238, 0.2);
}

.ai-header i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.ai-header strong {
    font-size: 1.1rem;
    color: var(--dark-color);
}

.ai-content {
    line-height: 1.6;
    font-size: 0.95rem;
    color: var(--text-color);
}

.ai-content h4 {
    color: var(--primary-color);
    margin: 1.25rem 0 0.75rem 0;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.25rem;
    font-weight: 600;
}

.ai-content p {
    margin-bottom: 1rem;
}

.ai-content ul, .ai-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.ai-content li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.ai-footer {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px dashed var(--border-color);
    text-align: right;
    color: var(--gray-color);
    font-size: 0.85rem;
}

.ai-footer i {
    color: #ff6b00;
    margin-right: 5px;
}

.ai-footer small {
    font-size: 0.85rem;
}

/* API Key Status Styling */
#apiKeyStatus {
    padding: 0.5rem;
    border-radius: 6px;
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

#apiKeyStatus .text-success {
    background: rgba(76, 175, 80, 0.1);
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    display: inline-block;
    border-left: 3px solid var(--success-color);
}

#apiKeyStatus .text-danger {
    background: rgba(244, 67, 54, 0.1);
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    display: inline-block;
    border-left: 3px solid var(--danger-color);
}

#apiKeyStatus .text-warning {
    background: rgba(255, 152, 0, 0.1);
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    display: inline-block;
    border-left: 3px solid var(--warning-color);
}

#apiKeyStatus .text-info {
    background: rgba(33, 150, 243, 0.1);
    padding: 0.35rem 0.65rem;
    border-radius: 4px;
    display: inline-block;
    border-left: 3px solid var(--primary-color);
}