/**
 * Partifinans specific styles
 * Restored tabbed layout with clearer navigation and helper UI elements
 */

.finance-tabs {
    top: 68px;
    z-index: 3;
    border: 1px solid #e9ecef;
}

.finance-tab-list .nav-link {
    border-radius: 0.75rem;
    padding: 0.85rem 1rem;
    height: 100%;
    background: #f8f9fa;
    border: 1px solid transparent;
    transition: all 0.15s ease;
}

.finance-tab-list .nav-link:hover {
    background: #eef2ff;
    border-color: #e2e8f0;
}

.finance-tab-list .nav-link.active {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.25);
}

.finance-tab-list small {
    font-size: 0.8rem;
}

.finance-info-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    border-radius: 50%;
    background: #0d6efd;
    color: white;
    font-size: 12px;
    font-weight: bold;
    cursor: help;
    margin-left: 4px;
    vertical-align: middle;
}

.finance-info-icon:hover {
    background: #0a58ca;
}

.finance-insight-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.finance-insight-card {
    padding: 1.1rem 1.15rem;
    border-radius: 1rem;
    border: 1px solid #dbe6f3;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
}

.finance-insight-card--accent {
    border-color: #93c5fd;
    background: linear-gradient(135deg, #eff6ff, #ffffff 58%);
}

.finance-insight-card--warning {
    border-color: #f7c977;
    background: linear-gradient(135deg, #fff7ed, #ffffff 60%);
}

.finance-insight-icon {
    width: 2.6rem;
    height: 2.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.85rem;
    background: #0d6efd;
    color: #fff;
    font-size: 1.1rem;
    box-shadow: 0 10px 18px rgba(13, 110, 253, 0.2);
    margin-bottom: 0.9rem;
}

.finance-insight-card--warning .finance-insight-icon {
    background: #ea580c;
    box-shadow: 0 10px 18px rgba(234, 88, 12, 0.2);
}

.finance-insight-eyebrow,
.finance-section-kicker {
    font-size: 0.74rem;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.55rem;
}

.finance-insight-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.35rem;
}

.finance-insight-text {
    color: #475569;
    font-size: 0.94rem;
    line-height: 1.55;
}

.finance-summary-shell {
    overflow: hidden;
    border-color: #dbe6f3;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.finance-section-head {
    margin-bottom: 1rem;
}

.finance-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.finance-summary-card {
    padding: 1rem 1.1rem;
    border-radius: 1rem;
    border: 1px solid #dbe6f3;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.finance-summary-label {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.4rem;
}

.finance-summary-value {
    font-size: clamp(1.35rem, 2vw, 1.85rem);
    line-height: 1.1;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.4rem;
}

.finance-summary-meta {
    color: #64748b;
    font-size: 0.9rem;
}

.finance-visual-shell {
    border-color: #dbe6f3;
    background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.finance-chart-panel {
    padding: 0.1rem 0;
}

.chart-card-valu {
    position: relative;
    width: 100%;
    min-height: 260px;
}

.finance-empty-state {
    min-height: 320px;
    padding: 1.25rem;
    border: 1px dashed #cbd5e1;
    border-radius: 1rem;
    background: linear-gradient(180deg, #f8fafc, #ffffff);
}

.finance-filter-panel {
    border-color: #dbe6f3;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.finance-overlap-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    border: 1px solid #fed7aa;
    background: linear-gradient(180deg, #fff7ed, #ffffff);
    color: #9a3412;
    box-shadow: 0 10px 24px rgba(154, 52, 18, 0.06);
}

.finance-table-shell {
    border: 1px solid #dbe6f3;
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.05);
}

.finance-table-shell .table {
    margin-bottom: 0;
}

.finance-table-shell thead th {
    background: #eef4ff;
    color: #334155;
    font-weight: 700;
    border-bottom: 1px solid #dbe6f3;
}

.finance-table-shell tbody td {
    vertical-align: top;
}

.finance-details summary {
    list-style: none;
}

.finance-details summary::-webkit-details-marker {
    display: none;
}

.finance-details {
    min-width: 17rem;
}

.finance-details-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid #dbe6f3;
    border-radius: 0.9rem;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.finance-details-toggle:hover {
    border-color: #93c5fd;
    box-shadow: 0 10px 24px rgba(59, 130, 246, 0.08);
}

.finance-details[open] .finance-details-toggle {
    border-color: #93c5fd;
    background: linear-gradient(180deg, #eff6ff, #ffffff);
}

.finance-details-toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    color: #0f172a;
}

.finance-details-toggle-meta {
    font-size: 0.8rem;
    color: #64748b;
    text-align: right;
}

.finance-detail-panel {
    display: grid;
    gap: 1rem;
    margin-top: 0.9rem;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: linear-gradient(180deg, #fcfdff, #f8fafc);
}

.finance-breakdown-section {
    padding: 1rem;
    border-radius: 0.95rem;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.finance-breakdown-section-warning {
    border-color: #fdba74;
    background: linear-gradient(180deg, #fffaf0, #ffffff);
}

.finance-breakdown-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.finance-breakdown-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.finance-breakdown-copy {
    margin: 0.25rem 0 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #64748b;
    max-width: 42rem;
}

.finance-overlap-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    border: 1px solid #fdba74;
    background: #fff7ed;
    color: #9a3412;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.finance-level-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.8rem 0.9rem;
    margin-bottom: 0.85rem;
    border-radius: 0.85rem;
    border: 1px solid #fed7aa;
    background: #fff7ed;
    color: #9a3412;
    font-size: 0.88rem;
    line-height: 1.5;
}

.finance-breakdown-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.finance-breakdown-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.finance-breakdown-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.finance-breakdown-label {
    flex: 1 1 auto;
    color: #0f172a;
    line-height: 1.45;
}

.finance-breakdown-value {
    flex: 0 0 auto;
    white-space: nowrap;
    font-weight: 700;
    color: #0f172a;
}

.finance-kpis {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.finance-kpis .kpi-item {
    min-width: 180px;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
}

.finance-kpis .kpi-label {
    font-size: 0.85rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.finance-kpis .kpi-value {
    font-weight: 700;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .finance-insight-grid,
    .finance-summary-grid {
        grid-template-columns: 1fr;
    }

    .finance-tab-list {
        gap: 0.5rem;
        flex-direction: column;
    }

    .finance-tabs {
        position: sticky;
        top: 56px;
    }

    .chart-card-valu {
        min-height: 220px;
    }

    .finance-empty-state {
        min-height: 220px;
    }

    .finance-details-toggle,
    .finance-breakdown-heading,
    .finance-breakdown-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .finance-details-toggle-meta,
    .finance-breakdown-value {
        text-align: left;
        white-space: normal;
    }
}

@media print {
    .finance-tabs,
    .btn,
    .alert,
    summary,
    select,
    input,
    .finance-kpis {
        display: none !important;
    }

    .chart-card-valu {
        page-break-inside: avoid;
    }
}
