/* ================================================================
   CPM (کنترل پروژه) Module — Styles
   Table prefix: wp_pc_
================================================================ */

/* ── Section wrapper ─────────────────────────────────────────── */
.cpm-section-wrap {
    padding: 16px 0;
}

/* ── Notice bar (no project selected) ───────────────────────── */
.cpm-section-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fffbeb;
    border: 1.5px solid #fcd34d;
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 13px;
    color: #92400e;
    margin: 12px 0;
}

/* ── Header bar ──────────────────────────────────────────────── */
.cpm-header-bar {
    min-height: 40px;
    display: flex;
    align-items: center;
    padding: 6px 0;
    margin-bottom: 4px;
}

.cpm-project-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #eff6ff;
    border: 1.5px solid #93c5fd;
    border-radius: 10px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #1d4ed8;
}

.cpm-badge-icon { font-size: 16px; }

.cpm-badge-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #6b7280;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 6px;
    transition: background .15s;
}
.cpm-badge-close:hover { background: #fee2e2; color: #dc2626; }

/* ── Toolbar ─────────────────────────────────────────────────── */
.cpm-toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

/* ── Project cards grid ──────────────────────────────────────── */
.cpm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.cpm-project-card {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px;
    transition: border-color .2s, box-shadow .2s;
    cursor: default;
    position: relative;
}

.cpm-project-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 4px 20px rgba(37, 99, 235, .08);
}

.cpm-project-card--selected {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15) !important;
}

.cpm-project-card__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.cpm-project-card__code {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: .03em;
}

.cpm-project-card__name {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    line-height: 1.4;
}

.cpm-project-card__meta {
    font-size: 12px;
    color: #64748b;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.cpm-project-card__budget {
    font-size: 12px;
    color: #059669;
    font-weight: 600;
    margin-bottom: 10px;
}

.cpm-project-card__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

/* ── Status badge ────────────────────────────────────────────── */
.cpm-status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 8px;
    padding: 2px 9px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

/* ── Generic badge ───────────────────────────────────────────── */
.cpm-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    border-radius: 8px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.cpm-badge--critical {
    background: #fee2e2;
    color: #dc2626;
}

/* ── Progress bar on project card ───────────────────────────── */
.cpm-progress-bar-wrap {
    background: #f1f5f9;
    border-radius: 99px;
    height: 8px;
    position: relative;
    overflow: visible;
    margin-bottom: 4px;
}

.cpm-progress-bar {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 99px;
    height: 100%;
    transition: width .4s ease;
    max-width: 100%;
}

.cpm-progress-label {
    position: absolute;
    left: 0;
    top: -18px;
    font-size: 11px;
    font-weight: 700;
    color: #2563eb;
}

/* ── WBS groups & task rows ──────────────────────────────────── */
.cpm-wbs-group {
    margin-bottom: 20px;
}

.cpm-wbs-group__header {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 16px;
    margin-bottom: 8px;
    font-weight: 700;
    color: #334155;
    font-size: 14px;
}

.cpm-wbs-icon { font-size: 16px; }

.cpm-wbs-code {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 2px 7px;
    border-radius: 6px;
}

.cpm-task-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 16px;
}

.cpm-task-row {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    transition: border-color .2s;
}

.cpm-task-row:hover { border-color: #93c5fd; }

.cpm-task-row--critical {
    border-color: #fca5a5;
    background: #fff9f9;
}

.cpm-task-row__info { flex: 1; min-width: 0; }

.cpm-task-row__top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.cpm-task-code {
    font-size: 11px;
    font-weight: 700;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 1px 7px;
    border-radius: 6px;
}

.cpm-task-name {
    font-weight: 700;
    font-size: 14px;
    color: #0f172a;
}

.cpm-task-row__meta {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 8px;
}

.cpm-task-progress-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cpm-progress-slider {
    flex: 1;
    max-width: 220px;
    height: 5px;
    cursor: pointer;
    accent-color: #2563eb;
}

.cpm-progress-pct {
    font-size: 12px;
    font-weight: 700;
    color: #2563eb;
    min-width: 36px;
}

.cpm-task-row__actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-end;
    flex-shrink: 0;
}

/* ── Sub-tabs (Resources) ────────────────────────────────────── */
.cpm-sub-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 16px;
}

.cpm-sub-tab {
    background: none;
    border: none;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-bottom: 2.5px solid transparent;
    margin-bottom: -2px;
    transition: color .15s, border-color .15s;
}

.cpm-sub-tab:hover { color: #2563eb; }

.cpm-sub-tab--active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

/* ── Resource cards ──────────────────────────────────────────── */
.cpm-res-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 4px;
}

.cpm-res-card {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    transition: border-color .2s;
}

.cpm-res-card:hover { border-color: #93c5fd; }

.cpm-res-card__type {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 8px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 8px;
}

.cpm-res-card__name {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.cpm-res-card__code {
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 4px;
}

.cpm-res-card__meta {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 12px;
}

.cpm-res-card__actions {
    display: flex;
    gap: 6px;
}

/* ── Member cards ────────────────────────────────────────────── */
.cpm-member-card {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    transition: border-color .2s;
}

.cpm-member-card:hover { border-color: #93c5fd; }

.cpm-member-card--inactive { opacity: .6; }

.cpm-member-card__avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.cpm-member-card__info { flex: 1; min-width: 0; }

.cpm-member-card__name {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 5px;
}

.cpm-member-card__role { margin-bottom: 6px; }

.cpm-member-card__meta {
    font-size: 12px;
    color: #64748b;
    line-height: 1.7;
}

.cpm-member-card__actions {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
}

/* ── Chat ────────────────────────────────────────────────────── */
.cpm-chat-wrap {
    display: flex;
    gap: 0;
    height: 540px;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
}

.cpm-chat-sidebar {
    width: 200px;
    flex-shrink: 0;
    border-left: 1.5px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    background: #f8fafc;
}

.cpm-chat-sidebar__title {
    padding: 14px 16px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 1px solid #e2e8f0;
}

.cpm-chat-member-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.cpm-chat-member {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background .15s;
    font-size: 13px;
    color: #334155;
}

.cpm-chat-member:hover { background: #eff6ff; }

.cpm-chat-member__avatar {
    width: 28px;
    height: 28px;
    background: #3b82f6;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.cpm-chat-identity {
    padding: 12px 14px;
    border-top: 1px solid #e2e8f0;
}

.cpm-chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cpm-chat-header {
    padding: 12px 18px;
    border-bottom: 1.5px solid #e2e8f0;
    font-weight: 700;
    font-size: 14px;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
}

.cpm-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f8fafc;
}

.cpm-chat-empty {
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
    padding: 40px 20px;
}

.cpm-chat-date-sep {
    text-align: center;
    font-size: 11px;
    color: #94a3b8;
    background: #e2e8f0;
    border-radius: 99px;
    padding: 3px 14px;
    align-self: center;
    margin: 4px 0;
}

.cpm-chat-bubble {
    max-width: 75%;
    position: relative;
}

.cpm-chat-bubble--mine {
    align-self: flex-start;
}

.cpm-chat-bubble--other {
    align-self: flex-end;
}

.cpm-chat-bubble__meta {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 3px;
    font-size: 11px;
    flex-wrap: wrap;
}

.cpm-chat-bubble--mine .cpm-chat-bubble__meta { flex-direction: row; }
.cpm-chat-bubble--other .cpm-chat-bubble__meta { flex-direction: row-reverse; }

.cpm-chat-bubble__sender {
    font-weight: 700;
    color: #1e293b;
}

.cpm-chat-bubble__private {
    background: #ede9fe;
    color: #7c3aed;
    border-radius: 6px;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 700;
}

.cpm-chat-bubble__time {
    color: #94a3b8;
}

.cpm-chat-bubble__text {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 13px;
    color: #0f172a;
    line-height: 1.6;
    word-break: break-word;
    white-space: pre-wrap;
}

.cpm-chat-bubble--mine .cpm-chat-bubble__text {
    background: #eff6ff;
    border-color: #93c5fd;
    border-radius: 12px 12px 12px 4px;
}

.cpm-chat-bubble--other .cpm-chat-bubble__text {
    border-radius: 12px 12px 4px 12px;
}

.cpm-chat-del {
    position: absolute;
    top: 0;
    right: -24px;
    background: none;
    border: none;
    cursor: pointer;
    color: #fca5a5;
    font-size: 11px;
    opacity: 0;
    transition: opacity .15s;
}

.cpm-chat-bubble:hover .cpm-chat-del { opacity: 1; }

.cpm-chat-form {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1.5px solid #e2e8f0;
    background: #fff;
    align-items: center;
}

.cpm-chat-form input[type="text"] {
    flex: 1;
    padding: 9px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 10px;
    font-size: 13px;
    outline: none;
    transition: border-color .15s;
}

.cpm-chat-form input[type="text"]:focus { border-color: #3b82f6; }

/* ── Gantt chart ─────────────────────────────────────────────── */
.cpm-gantt-wrap {
    overflow-x: auto;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}

.cpm-gantt-legend {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 12px;
    font-size: 12px;
}

.cpm-gantt-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #64748b;
}

.cpm-gantt-legend-item::before {
    content: "";
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    background: var(--clr);
}

.cpm-gantt-legend-item--critical::before { display: none; }

.cpm-gantt-table {
    min-width: 800px;
}

.cpm-gantt-header {
    display: flex;
    background: #f8fafc;
    border-bottom: 1.5px solid #e2e8f0;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
}

.cpm-gantt-header__label {
    width: 220px;
    flex-shrink: 0;
    padding: 10px 16px;
    border-left: 1.5px solid #e2e8f0;
}

.cpm-gantt-header__track {
    flex: 1;
    position: relative;
    height: 36px;
    overflow: hidden;
}

.cpm-gantt-week {
    position: absolute;
    top: 0;
    font-size: 10px;
    color: #94a3b8;
    border-right: 1px dashed #e2e8f0;
    padding: 10px 4px;
    white-space: nowrap;
}

.cpm-gantt-body { font-size: 13px; }

.cpm-gantt-row {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    min-height: 44px;
    transition: background .15s;
}

.cpm-gantt-row:hover { background: #f8fafc; }

.cpm-gantt-row--critical { background: #fff9f9; }
.cpm-gantt-row--critical:hover { background: #fef2f2; }

.cpm-gantt-row__label {
    width: 220px;
    flex-shrink: 0;
    padding: 8px 16px;
    border-left: 1.5px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.cpm-gantt-wbs {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cpm-gantt-task-name {
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cpm-gantt-row__track {
    flex: 1;
    position: relative;
    height: 44px;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent calc(100% / 7 - 1px),
        #f1f5f9 calc(100% / 7 - 1px),
        #f1f5f9 calc(100% / 7)
    );
}

.cpm-gantt-bar {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 22px;
    border-radius: 6px;
    min-width: 4px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,.12);
    transition: filter .15s;
}

.cpm-gantt-bar:hover { filter: brightness(.9); }

.cpm-gantt-bar__fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255,255,255,.35);
    pointer-events: none;
}

.cpm-gantt-bar__label {
    position: absolute;
    right: 0;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0,0,0,.3);
}

.cpm-gantt-range-info {
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    padding: 10px 0 4px;
}

/* ── Loading ─────────────────────────────────────────────────── */
.cpm-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    color: #94a3b8;
    font-size: 14px;
    gap: 10px;
}

/* ── acc-btn extra variants ──────────────────────────────────── */
.acc-btn--warning {
    background: #fffbeb;
    border: 1.5px solid #fcd34d;
    color: #92400e;
}
.acc-btn--warning:hover { background: #fef3c7; }

.acc-btn--success {
    background: #ecfdf5;
    border: 1.5px solid #6ee7b7;
    color: #065f46;
}
.acc-btn--success:hover { background: #d1fae5; }

.acc-btn--xs {
    padding: 3px 10px;
    font-size: 11px;
    border-radius: 6px;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 700px) {
    .cpm-chat-wrap { flex-direction: column; height: auto; }
    .cpm-chat-sidebar { width: 100%; height: 140px; flex-direction: row; flex-wrap: wrap; }
    .cpm-chat-messages { height: 300px; }
    .cpm-gantt-table { min-width: 600px; }
    .cpm-gantt-row__label { width: 140px; }
    .cpm-gantt-header__label { width: 140px; }
}

/* ══════════════════════════════════════════════════════════════
   Financials Section  (.fin-*)
══════════════════════════════════════════════════════════════ */

/* KPI grid */
.fin-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.fin-kpi-card {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
    transition: box-shadow .15s;
}

.fin-kpi-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); }

.fin-kpi-card__label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.fin-kpi-card__value {
    font-size: 22px;
    font-weight: 800;
    color: #1e293b;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.fin-kpi-card__sub {
    font-size: 11px;
    color: #94a3b8;
}

.fin-kpi-card--total { border-top: 3px solid #3b82f6; }
.fin-kpi-card--total .fin-kpi-card__value { color: #1d4ed8; }

.fin-kpi-card--pl { border-top: 3px solid #059669; }
.fin-kpi-card--pl .fin-kpi-card__value { color: #047857; }
.fin-kpi-card--pl.fin-kpi-card--loss { border-top-color: #dc2626; }
.fin-kpi-card--pl.fin-kpi-card--loss .fin-kpi-card__value { color: #b91c1c; }

/* Budget progress bar */
.fin-budget-bar-wrap {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 22px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.fin-budget-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 6px;
}

.fin-budget-bar-header strong {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
}

.fin-budget-bar-header span {
    font-size: 13px;
    color: #64748b;
}

.fin-budget-bar-track {
    width: 100%;
    height: 14px;
    background: #f1f5f9;
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 8px;
}

.fin-budget-bar-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    transition: width .5s ease;
    min-width: 4px;
}

.fin-budget-bar-fill--over { background: linear-gradient(90deg, #ef4444, #dc2626); }
.fin-budget-bar-fill--warn { background: linear-gradient(90deg, #f59e0b, #d97706); }

.fin-budget-bar-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #94a3b8;
}

/* Cost breakdown stacked bar */
.fin-cost-breakdown {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 22px;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}

.fin-cost-breakdown__title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 14px;
}

.fin-breakdown-bar {
    display: flex;
    height: 28px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 14px;
    background: #f1f5f9;
}

.fin-breakdown-segment {
    height: 100%;
    transition: width .5s ease;
    position: relative;
    overflow: hidden;
    min-width: 0;
}

.fin-breakdown-segment:not(:last-child) {
    border-left: 2px solid rgba(255,255,255,.4);
}

.fin-breakdown-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    font-size: 12px;
}

.fin-breakdown-legend-item {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #475569;
}

.fin-breakdown-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* Table helpers */
.fin-hint {
    font-size: 12px;
    color: #94a3b8;
    padding: 10px 0 4px;
    font-style: italic;
}

.fin-row--confirmed td {
    background: #f0fdf4 !important;
}

.fin-row--confirmed td:first-child {
    border-right: 3px solid #059669;
}

/* Sub-tab re-use inside financials */
.fin-subtab-bar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1.5px solid #e2e8f0;
}

.fin-subtab {
    padding: 7px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    transition: all .15s;
    white-space: nowrap;
}

.fin-subtab:hover { background: #eff6ff; border-color: #93c5fd; color: #1d4ed8; }

.fin-subtab--active {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1d4ed8;
}

/* Empty / no-project state */
.fin-no-project {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 60px 20px;
    color: #94a3b8;
    text-align: center;
}

.fin-no-project__icon {
    font-size: 40px;
    line-height: 1;
}

.fin-no-project__text {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
}

/* ── Responsive financials ───────────────────────────────────── */
@media (max-width: 600px) {
    .fin-kpi-grid { grid-template-columns: 1fr 1fr; }
    .fin-kpi-card__value { font-size: 18px; }
}
