:root {
    /* Color Palette - Dark Premium */
    --bg-deep: #0A0E14;
    --bg-surface: #141B26;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-input: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.08);

    --text-primary: #FFFFFF;
    --text-secondary: #A0AEC0;
    --text-muted: #718096;

    --accent-cyan: #00F2FF;
    --accent-purple: #7000FF;
    --accent-green: #00FFA3;
    --accent-red: #FF3BC1;
    --accent-warning: #FFB800;

    --glass-blur: blur(12px);
    --shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

    --sidebar-width: 90px;
    --header-height: 72px;
    --ai-console-width: 350px;
}

body.light-theme {
    --bg-deep: #F8FAFC;
    --bg-surface: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-input: rgba(0, 0, 0, 0.05);
    --border: rgba(0, 0, 0, 0.1);
    --text-primary: #1A202C;
    --text-secondary: #4A5568;
    --text-muted: #A0AEC0;
    --accent-cyan: #00B5D8;
    --accent-purple: #6B46C1;
    --accent-green: #38A169;
    --accent-red: #E53E3E;
    --accent-warning: #DD6B20;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

body.light-theme .top-header {
    background: rgba(248, 250, 252, 0.8);
}

body.light-theme .ai-console {
    background: rgba(255, 255, 255, 0.95);
}

body.light-theme .suggestion-bubble {
    background: rgba(0, 0, 0, 0.05);
}

body.light-theme .message.assistant {
    background: rgba(0, 0, 0, 0.04);
}

body.light-theme .message.user {
    background: var(--accent-cyan);
    color: #FFFFFF;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-surface);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

body {
    font-family: 'Rubik', sans-serif;
    background-color: var(--bg-deep);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    display: flex;
}

/* Layout */
.app-container {
    display: flex;
    width: 100%;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 64px;
    background-color: var(--bg-surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 12px 6px;
    z-index: 100;
    align-items: center;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar .nav-label {
    display: none;
}

.sidebar:hover {
    width: var(--sidebar-width);
}

.sidebar:hover .nav-label {
    display: block;
}
}

.logo-container {
    display: none;
}

.logo-text {
    display: none;
}

.nav-list {
    list-style: none;
    margin-top: 8px;
    width: 100%;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 4px;
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 4px;
    font-weight: 500;
    text-align: center;
    position: relative;
}

.nav-icon {
    width: 28px;
    height: 28px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.nav-label {
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
}

.nav-item .icon {
    font-size: 18px;
    opacity: 0.7;
}

.nav-item:hover,
.nav-item.active {
    background-color: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
    opacity: 1;
}

.nav-item.active .icon {
    opacity: 1;
}

/* Sidebar Toggle Removed (Hover handled above) */

/* Reports Submenu */
.nav-submenu {
    display: none;
    position: absolute;
    left: calc(100% + 4px);
    top: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 0;
    min-width: 160px;
    z-index: 300;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    list-style: none;
}

.nav-item.has-submenu:hover .nav-submenu,
.nav-item.has-submenu.submenu-open .nav-submenu {
    display: block;
}

.nav-sub-item {
    padding: 8px 16px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}

.nav-sub-item:hover {
    background: rgba(0, 242, 255, 0.1);
    color: var(--text-primary);
}

.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding-top: 24px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 12px;
    transition: background 0.2s;
}

.user-profile:hover {
    background: var(--bg-card);
}

.avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: white;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.username {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.role {
    font-size: 12px;
    color: var(--text-muted);
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    padding: 0 40px 40px 40px;
    position: relative;
}

.top-header {
    height: calc(var(--header-height) + 24px);
    padding-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    position: sticky;
    top: 0;
    background: rgba(10, 14, 20, 0.8);
    backdrop-filter: var(--glass-blur);
    z-index: 90;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(0, 255, 163, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(0, 255, 163, 0.2);
    margin-top: 8px;
}

.status-badge .dot {
    width: 8px;
    height: 8px;
    background-color: var(--accent-green);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-green);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-btn {
    background: transparent;
    border: none;
    font-size: 20px;
    position: relative;
    padding: 8px;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.icon-btn:hover {
    color: var(--text-primary);
}

.badge {
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--accent-red);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-surface);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    backdrop-filter: var(--glass-blur);
    box-shadow: var(--shadow);
}

.col-span-2 {
    grid-column: span 2;
}

.col-span-3 {
    grid-column: span 3;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.metric-header h4 {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.trend {
    font-size: 12px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
}

.trend.up {
    background: rgba(0, 255, 163, 0.1);
    color: var(--accent-green);
}

.trend.down {
    background: rgba(255, 59, 193, 0.1);
    color: var(--accent-red);
}

.trend.stable {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.action-card {
    display: flex;
    flex-direction: column;
}

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

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-text {
    background: none;
    border: none;
    color: var(--accent-cyan);
    font-size: 12px;
    cursor: pointer;
}

.action-list {
    list-style: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid var(--border);
}

.action-item.overdue {
    border-left-color: var(--accent-red);
}

.action-item.warning {
    border-left-color: var(--accent-warning);
}

.action-item.upcoming {
    border-left-color: var(--accent-cyan);
}

.date-badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border-radius: 6px;
    font-size: 11px;
    text-align: center;
    min-width: 50px;
    font-weight: 700;
    color: var(--text-secondary);
}

.action-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.payee {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.amount {
    font-size: 12px;
    color: var(--text-muted);
}

.chart-card {
    height: 400px;
    display: flex;
    flex-direction: column;
}

.chart-placeholder {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-style: italic;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    margin-top: 16px;
}

/* Metrics */
.metric-value {
    font-family: 'Outfit', sans-serif;
    font-size: 32px;
    font-weight: 600;
    margin: 12px 0 4px 0;
}

.metric-footer {
    font-size: 13px;
}

.metric-footer.success {
    color: var(--accent-green);
}

.metric-footer.danger {
    color: var(--accent-red);
}

.metric-footer.warning {
    color: var(--accent-warning);
}

/* Table */
.table-overflow {
    overflow-x: auto;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 13px;
}

/* Compact Forecast Table */
.forecast-compact th,
.forecast-compact td {
    padding: 5px 8px;
    font-size: 12px;
    line-height: 1.3;
}

.forecast-compact th {
    font-size: 11px;
}

/* AI Console Overlay */
.ai-console {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: var(--ai-console-width);
    height: calc(100vh - 48px);
    background: rgba(20, 27, 38, 0.95);
    border: 1px solid var(--accent-cyan);
    border-radius: 20px;
    backdrop-filter: blur(20px);
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    transform: translateY(0);
    opacity: 1;
}

.ai-console.hidden {
    display: flex !important;
    /* Override generic hidden for animation, or use specific logic */
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
}

.ai-trigger {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 24px rgba(0, 242, 255, 0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden; /* This clips any square background from the image */
}

.ai-trigger img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 50%;
    background-color: #000;
}

.ai-trigger:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 242, 255, 0.5);
}

.btn-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
}

.btn-close:hover {
    color: var(--text-primary);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--text-muted);
}

.empty-text {
    margin-bottom: 24px;
    font-size: 14px;
}

.suggestion-bubbles {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.suggestion-bubble {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 10px;
    border-radius: 8px;
    color: var(--accent-cyan);
    font-size: 13px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s;
}

.suggestion-bubble:hover {
    background: rgba(0, 242, 255, 0.1);
    border-color: var(--accent-cyan);
}

.console-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-history {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 85%;
    font-size: 14px;
    line-height: 1.5;
}

.message.assistant {
    background: rgba(255, 255, 255, 0.05);
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.message.user {
    background: var(--accent-purple);
    color: #FFFFFF;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.input-area {
    padding: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

textarea {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    padding: 12px;
    resize: none;
    height: 80px;
    font-family: inherit;
}

textarea:focus {
    outline: none;
    border-color: var(--accent-cyan);
}

/* Buttons */
button {
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--accent-cyan);
    color: var(--bg-deep);
    border: none;
    padding: 12px;
}

.btn-primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.3);
}

.btn-primary:active {
    filter: brightness(0.9);
    transform: scale(0.98);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 16px;
}

.btn-secondary:hover {
    background: var(--bg-card);
}

.btn-secondary:active {
    background: var(--bg-surface);
    transform: scale(0.98);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-surface);
    width: 800px;
    max-width: 90vw;
    max-height: 90vh;
    padding: 40px;
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.legal-scroll {
    flex: 1;
    min-height: 400px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    scroll-behavior: smooth;
}



.legal-text-body {
    white-space: pre-wrap;
    margin-top: 12px;
}

.legal-divider {
    border: 0;
    height: 1px;
    background: var(--border);
    margin: 32px 0;
}

.opt-out-box {
    background: rgba(255, 59, 193, 0.05);
    border: 1px solid rgba(255, 59, 193, 0.2);
    padding: 16px;
    border-radius: 8px;
    color: var(--text-primary);
}

.opt-out-box a {
    color: var(--accent-cyan);
    text-decoration: none;
}

.legal-scroll h3 {
    color: var(--accent-cyan);
    font-size: 16px;
    margin-bottom: 8px;
    font-family: 'Outfit', sans-serif;
}

.hidden {
    display: none !important;
}

/* Disclaimer */
.app-footer {
    margin-top: 60px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.disclaimer {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    max-width: 600px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 12px;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--accent-cyan);
}

/* Markdown Styles in Chat */
.message h3,
.message h4 {
    margin-top: 12px;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.message ul,
.message ol {
    margin-left: 20px;
    margin-bottom: 8px;
}

.message li {
    margin-bottom: 4px;
}

.message strong {
    color: var(--accent-warning);
    font-weight: 600;
}

.message p {
    margin-bottom: 8px;
}

.message p:last-child {
    margin-bottom: 0;
}

/* Planning UI Cards */
.planning-card {
    background: rgba(20, 27, 38, 0.95);
    border: 1px solid var(--accent-purple);
    border-radius: 12px;
    padding: 16px;
    margin: 16px 20px;
    border-left: 4px solid var(--accent-purple);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.planning-card h4 {
    color: var(--accent-cyan);
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.planning-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.btn-confirm {
    background: var(--accent-cyan);
    color: var(--bg-deep);
    border: none;
    padding: 8px 16px;
    font-weight: 600;
    flex: 1;
}

.btn-reject {
    background: transparent;
    border: 1px solid var(--accent-red);
    color: var(--accent-red);
    padding: 8px 16px;
    flex: 1;
}

.btn-reject:hover {
    background: rgba(255, 59, 193, 0.1);
}

/* Scenario Layout */
.scenario-layout {
    display: flex;
    gap: 24px;
    height: 100%;
}

.scenario-controls {
    width: 300px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: fit-content;
}

.scenario-viz {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.full-height {
    flex: 1;
    min-height: 500px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.control-group label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.range-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--accent-cyan);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.4);
}

.range-value {
    min-width: 48px;
    text-align: right;
    font-family: 'Outfit', sans-serif;
    color: var(--accent-cyan);
    font-weight: 600;
}

.counter-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 4px;
}

.btn-counter {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    border-radius: 6px;
}

.btn-counter:hover {
    background: rgba(255, 255, 255, 0.1);
}

.counter-value {
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
}

.control-divider {
    height: 1px;
    background: var(--border);
    margin: 8px 0;
}

.full-btn {
    width: 100%;
    text-align: center;
    font-weight: 600;
    margin-top: auto;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }

    .col-span-2 {
        grid-column: span 2;
    }

    .col-span-3 {
        grid-column: span 2;
    }

    .metric-card {
        grid-column: span 1;
    }

    .scenario-layout {
        flex-direction: column;
        overflow-y: auto;
    }

    .scenario-controls {
        width: 100%;
        height: auto;
    }

    .full-height {
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        padding: 12px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .sidebar-nav,
    .sidebar-footer {
        display: none;
        /* Simplify for mobile MVP or add burger menu */
    }

    .logo-container {
        margin-bottom: 0;
    }

    .main-content {
        padding: 20px;
        height: calc(100vh - 60px);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .col-span-2,
    .col-span-3,
    .metric-card {
        grid-column: span 1;
    }

    .ai-console {
        width: 100%;
        bottom: 0;
        right: 0;
        border-radius: 20px 20px 0 0;
        height: 60vh;
    }
}

/* Thinking Animation */
.thinking-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    align-self: flex-start;
    color: var(--text-muted);
    font-size: 13px;
    font-style: italic;
    border: 1px solid var(--border);
    margin-bottom: 1px;
}

.thinking-dots {
    display: flex;
    gap: 4px;
}

.thinking-dots span {
    width: 6px;
    height: 6px;
    background: var(--accent-cyan);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.thinking-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.thinking-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Unified Input Styling for Consistency */

/* Scenario Table Inputs */
.cell-input {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-primary);
    font-family: inherit;
    font-size: inherit;
    width: 100%;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.cell-input:hover {
    background: var(--bg-input);
    border-color: var(--border);
}

.cell-input:focus {
    background: var(--bg-surface);
    border-color: var(--accent-cyan);
    outline: none;
}

/* Settings & Form Inputs */
.form-input,
.form-select {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 10px 12px;
    font-family: 'Rubik', sans-serif;
    font-size: 14px;
    width: 100%;
    transition: all 0.2s;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a0aec0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.form-select option {
    background-color: var(--bg-surface);
    color: var(--text-primary);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent-cyan);
    background: rgba(0, 242, 255, 0.05);
    box-shadow: 0 0 0 2px rgba(0, 242, 255, 0.1);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* Specificity Boost for Settings */
#view-settings .form-input,
#view-settings .form-select,
#view-settings input[type="number"],
#view-settings select {
    background-color: var(--bg-input) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
    padding: 10px 12px;
    border-radius: 8px;
}

#view-settings input:focus,
#view-settings select:focus {
    border-color: var(--accent-cyan) !important;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 242, 255, 0.1);
}
