/* FinanzaPY - main stylesheet (shared across all microapps) */
:root {
    /* System font stack: no external font requests (privacy + speed) */
    --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    --accent-gradient: linear-gradient(135deg, #818cf8 0%, #c084fc 100%);
    --coffee-gradient: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
}

body {
    background-color: var(--bs-dark-bg-subtle);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-bar {
    max-width: 1200px;
    margin: 1rem auto 0;
    padding: 0 1rem;
    width: 100%;
}

.brand-badge {
    background: var(--accent-gradient);
}

.brand-accent {
    color: #c084fc;
}

/* Suite Navigation Pills */
.tool-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    background-color: var(--bs-dark);
    padding: 0.3rem;
    border-radius: 0.65rem;
    border: 1px solid var(--bs-border-color-translucent);
}

.tool-pill {
    color: var(--bs-secondary-color);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    border-radius: 0.45rem;
    transition: background-color 0.15s ease, color 0.15s ease;
    white-space: nowrap;
}

.tool-pill:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.06);
}

.tool-pill.active {
    color: #fff;
    background: var(--accent-gradient);
    font-weight: 600;
}

.main-container {
    max-width: 1200px;
    margin: 1rem auto 2.5rem;
    background-color: var(--bs-dark);
    padding: 2.25rem;
    border-radius: 1rem;
    border: 1px solid var(--bs-border-color-translucent);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

@media (max-width: 576px) {
    .main-container {
        padding: 1.25rem;
        margin: 0.75rem;
    }
}

h1 {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.form-section-box {
    background-color: var(--bs-dark-bg-subtle);
}

.list-box {
    max-height: 155px;
}

.table-container {
    max-height: 62vh;
    overflow-y: auto;
    position: relative;
}

.table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: var(--bs-dark-bg-subtle);
    border-bottom-width: 2px;
    white-space: nowrap;
    text-align: center;
}

.list-group-item {
    background-color: var(--bs-dark-bg-subtle);
}

.list-group-item-action:hover {
    background-color: var(--bs-tertiary-bg);
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

.summary-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border-width: 1px;
    background-color: var(--bs-dark-bg-subtle);
}

.summary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

td.text-end {
    text-align: right !important;
    font-variant-numeric: tabular-nums;
}

/* Optional inputs next to switches */
.insurance-rate-group {
    width: 195px;
}

.tax-rate-group {
    width: 170px;
}

/* Verdict Banner Cards */
.verdict-card {
    border-radius: 0.85rem;
    padding: 1.5rem;
    border: 1px solid var(--bs-border-color);
    background-color: var(--bs-dark-bg-subtle);
}

.verdict-good {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.14) 0%, rgba(59, 130, 246, 0.12) 100%);
    border-color: rgba(16, 185, 129, 0.45);
}

.verdict-bad {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.14) 0%, rgba(239, 68, 68, 0.12) 100%);
    border-color: rgba(245, 158, 11, 0.45);
}

.verdict-neutral {
    background: linear-gradient(135deg, rgba(129, 140, 248, 0.12) 0%, rgba(192, 132, 252, 0.12) 100%);
    border-color: rgba(129, 140, 248, 0.4);
}

/* Horizontal Comparison Bars */
.cmp-bar-track {
    height: 14px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 50rem;
    overflow: hidden;
}

.cmp-bar-fill {
    height: 100%;
    border-radius: 50rem;
    width: 50%;
    transition: width 0.35s ease;
}

.cmp-bar-primary {
    background: linear-gradient(90deg, #6366f1 0%, #818cf8 100%);
}

.cmp-bar-success {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
}

/* Next-Step Cross-Promotion Cards */
.next-step-card {
    display: block;
    text-decoration: none;
    background-color: var(--bs-dark-bg-subtle);
    border: 1px solid var(--bs-border-color-translucent);
    border-radius: 0.85rem;
    padding: 1.15rem 1.25rem;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.next-step-card:hover {
    transform: translateY(-3px);
    border-color: #818cf8;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
}

/* Coffee banner & buttons */
.coffee-banner {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.12) 0%, rgba(192, 132, 252, 0.12) 100%);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 0.85rem;
}

.btn-coffee {
    background: var(--coffee-gradient);
    color: #fff;
    font-weight: 600;
    border: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn-coffee:hover,
.btn-coffee:focus {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35);
    opacity: 0.95;
}

.btn-kofi {
    background-color: #29abe0;
    color: #fff;
    font-weight: 600;
    border: none;
}

.btn-kofi:hover {
    background-color: #1f97c9;
    color: #fff;
}

.floating-coffee {
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    z-index: 1030;
    border-radius: 50rem;
    padding: 0.6rem 1.1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

/* Leave room so the floating button never covers the footer */
footer {
    padding-bottom: 4.5rem !important;
}

.lang-btn.active {
    background-color: var(--bs-primary);
    color: #fff;
    border-color: var(--bs-primary);
}

.print-only {
    display: none;
}

@media print {
    .no-print {
        display: none !important;
    }

    .print-only {
        display: block !important;
    }

    .main-container {
        border: none;
        box-shadow: none;
        padding: 0;
        margin: 0;
    }

    .table-container {
        max-height: none;
        overflow: visible;
    }
}
