﻿.fin-page {
    display: flex; /* Shared structural styles for the fin-* component family. */
    flex-direction: column;
    gap: 16px;
}

.fin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.fin-title {
    margin: 0;
    font-size: 22px;
}

.fin-subtitle {
    margin: 6px 0 0;
    opacity: 0.75;
}

.fin-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.fin-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
    overflow: hidden;
    padding: 14px;
}

.fin-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.fin-card-title {
    font-size: 16px;
    font-weight: 900;
}

.fin-table {
    width: 100%;
    border-collapse: collapse;
}

    .fin-table th, .fin-table td {
        padding: 12px 12px;
        border-bottom: 1px solid rgba(0,0,0,0.06);
        text-align: left;
        vertical-align: top;
    }

.fin-td-strong {
    font-weight: 900;
}

.fin-col-actions {
    width: 220px;
}

.fin-td-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.fin-pill {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    border: 1px solid rgba(0,0,0,0.10);
    background: rgba(0,0,0,0.03);
}

.fin-pill--ok {
    background: rgba(76,175,80,0.16);
    border-color: rgba(76,175,80,0.25);
}

.fin-pill--debt {
    background: rgba(244,67,54,0.14);
    border-color: rgba(244,67,54,0.25);
}

.fin-pill--credit {
    background: rgba(33,150,243,0.14);
    border-color: rgba(33,150,243,0.22);
}

.fin-btn {
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.12);
    background: white;
    cursor: pointer;
}

.fin-btn--primary {
    font-weight: 900;
}

.fin-btn--danger {
    border-color: rgba(244,67,54,0.35);
}

.fin-btn--small {
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 13px;
}

.fin-alert {
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.fin-alert--error {
    border-left: 4px solid #d32f2f;
}

.fin-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 14px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}

.fin-loading-spinner {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 2px solid rgba(0,0,0,0.18);
    border-top-color: rgba(0,0,0,0.65);
    animation: fin-spin 0.8s linear infinite;
}

@keyframes fin-spin {
    to {
        transform: rotate(360deg);
    }
}

.fin-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 999;
}

.fin-modal {
    width: min(920px, 98vw);
    background: white;
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(0,0,0,0.18);
    overflow: hidden;
}

.fin-modal-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid rgba(0,0,0,0.08);
}

.fin-modal-title {
    font-size: 18px;
    font-weight: 900;
}

.fin-modal-subtitle {
    margin-top: 4px;
    font-size: 13px;
    opacity: 0.75;
}

.fin-modal-close {
    border: 1px solid rgba(0,0,0,0.12);
    background: white;
    border-radius: 12px;
    padding: 6px 10px;
    cursor: pointer;
}

.fin-form {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fin-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .fin-field span {
        font-size: 13px;
        opacity: 0.85;
        font-weight: 900;
    }

.fin-input {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.12);
    background: white;
}

.fin-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 6px;
}

.fin-grid2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (max-width: 980px) {
    .fin-grid2 {
        grid-template-columns: 1fr;
    }
}

.fin-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}

    .fin-row:last-child {
        border-bottom: none;
    }

.fin-muted {
    opacity: 0.7;
    padding: 10px 0;
}

.fin-trend {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    overflow-x: auto;
    padding: 10px 4px;
}

.fin-trend-col {
    min-width: 72px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.fin-trend-bars {
    height: 140px;
    width: 64px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    align-items: end;
    padding: 8px 8px 6px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #ffffff;
}

.fin-trend-bar {
    border-radius: 10px;
    min-height: 4px;
}

/* Bez hardcodanih “branding” boja, ali da se razlikuju: */
.fin-trend-bar--income {
    background: #16a34a;
}
/* green-ish */
.fin-trend-bar--expenses {
    background: #ef4444;
}
/* red-ish */
.fin-trend-bar--payroll {
    background: #f59e0b;
}
/* amber-ish */

.fin-trend-label {
    font-size: 12px;
    color: #334155;
}

.fin-trend-result .fin-pill {
    font-size: 12px;
    padding: 4px 8px;
}
