.company-title {
    font-size: 1.25rem;
    color: #1F2937;
}

/* --- Page Typography --- */
.page-title {
    color: #374151;
    font-weight: 700;
    font-size: 1.4rem;
    margin-bottom: 24px;
}

/* --- Main Sections --- */
.main-section {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
    padding: 24px;
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 12px;
}

.inv-section-header {
    flex-wrap: wrap;
    gap: 12px;
}

.inv-section-pills {
    flex-wrap: wrap;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

    .section-title i {
        color: #059669;
        font-size: 1.2rem;
    }

.inv-section-icon {
    width: 24px;
    height: 24px;
}

.inv-card-icon {
    width: 24px;
    height: 24px;
}

.inv-fallback-icon {
    display: none;
}

.inv-loan-list-icon {
    width: 20px;
    height: 20px;
}

/* --- Pills & Badges --- */
.val-pill {
    background: linear-gradient(90deg, #20c99729, #20c99717 100%);
    color: #4B5563;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 10px 16px;
    border-radius: 6px;
    border: 1px solid #E5E7EB;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    white-space: nowrap;
}

    .val-pill span {
        color: #1F2937;
        font-weight: 700;
    }

.badge-green {
    background-color: #D1FAE5;
    color: #065F46;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid #A7F3D0;
}

/* --- Form Controls --- */
.custom-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #4B5563;
    margin-bottom: 6px;
    display: block;
}

.custom-input, .custom-select {
    background-color: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: #1F2937;
    width: 100%;
    transition: all 0.2s;
}

    .custom-input::placeholder, .custom-select {
        color: #9CA3AF;
    }

        .custom-input:focus, .custom-select:focus {
            background-color: #ffffff;
            border-color: #3B82F6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
            outline: none;
        }

/* --- Buttons --- */
.btn-blue-action {
    background-color: #3372cf;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 10px 24px;
    transition: 0.2s;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

    .btn-blue-action:hover {
        background-color: #2563EB;
        color: white;
    }

.inv-add-loan-wrap {
    width: 100%;
}

.inv-add-loan-btn {
    width: auto;
}

.btn-upload-dashed {
    background-color: #ECFDF5;
    color: #059669;
    border: 1px dashed #6EE7B7;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    width: 100%;
    transition: 0.2s;
}

    .btn-upload-dashed:hover {
        background-color: #D1FAE5;
    }

.upload-clickable {
    cursor: pointer;
}

.file-name-text {
    word-break: break-all;
}

/* --- Sub-Cards --- */
.sub-card {
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 20px;
    background-color: #ffffff;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.08);
}

.sub-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.icon-blue {
    color: #3B82F6;
    background: #EFF6FF;
    padding: 6px;
    border-radius: 6px;
    font-size: 1.1rem;
}

.icon-green {
    color: #10B981;
    background: #ECFDF5;
    padding: 6px;
    border-radius: 6px;
    font-size: 1.1rem;
}

.icon-pink {
    color: #EC4899;
    background: #FCE7F3;
    padding: 6px;
    border-radius: 6px;
    font-size: 1.1rem;
}

/* --- Lists & Saved Items --- */
.list-header {
    font-size: 0.95rem;
    font-weight: 700;
    color: #374151;
    margin-top: 24px;
    margin-bottom: 16px;
}

.asset-row {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid #F3F4F6;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    gap: 24px;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.08);
    flex-wrap: wrap;
}

.asset-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background-color: #F3F4F6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6B7280;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.asset-icon-blue {
    color: #3B82F6;
    background: #EFF6FF;
}

.asset-icon-green {
    color: #10B981;
    background: #ECFDF5;
}

.asset-icon-pink {
    color: #EC4899;
    background: #FCE7F3;
}

.asset-detail {
    flex: 1;
    min-width: 120px;
}

.asset-lbl {
    font-size: 0.65rem;
    color: #6B7280;
    font-weight: 600;
    margin-bottom: 2px;
    text-transform: uppercase;
}

.asset-val {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1F2937;
    word-break: break-word;
}

.asset-val-remarks {
    font-weight: 500;
}

.asset-actions {
    display: flex;
    gap: 12px;
    font-size: 1rem;
    cursor: pointer;
    flex-shrink: 0;
}

    .asset-actions i {
        cursor: pointer;
    }

    .asset-actions .edit {
        color: #3B82F6;
    }

    .asset-actions .delete {
        color: #EF4444;
    }

/* Doc chips inside asset rows */
.doc-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.doc-remove-x {
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1;
    opacity: 0.85;
    transition: opacity 0.15s, transform 0.15s;
}

    .doc-remove-x:hover {
        opacity: 1;
        transform: scale(1.1);
    }

/* --- Financial Position Footer --- */
.financial-footer {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4f8 50%, #f0fdf4 100%);
    border-radius: 16px;
    padding: 28px;
    margin-top: 30px;
    border: 1px solid #E0E7FF;
}

.fin-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.fin-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1F2937;
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge-outline-green {
    background-color: #ECFDF5;
    color: #059669;
    border: 1.5px solid #059669;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.badge-outline-red {
    background-color: #FEF2F2;
    color: #EF4444;
    border: 1.5px solid #EF4444;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.fin-pill-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.fin-card-white {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 1px solid #F3F4F6;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .fin-card-white:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }

.fin-card-highlight {
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border: 2px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .fin-card-highlight:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }

.fin-net-positive {
    background: linear-gradient(135deg, #ECFDF5, #D1FAE5);
    border-color: #6EE7B7;
}

    .fin-net-positive .fin-card-val {
        color: #059669;
    }

    .fin-net-positive .fin-icon-bg {
        background-color: #D1FAE5;
        color: #059669;
    }

.fin-net-negative {
    background: linear-gradient(135deg, #FEF2F2, #FECACA);
    border-color: #FCA5A5;
}

    .fin-net-negative .fin-card-val {
        color: #EF4444;
    }

    .fin-net-negative .fin-icon-bg {
        background-color: #FECACA;
        color: #EF4444;
    }

.fin-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem;
    color: #6B7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.fin-icon-bg {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.fin-card-val {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    word-break: break-word;
}

.fin-card-sub {
    font-size: 0.72rem;
    color: #9CA3AF;
    font-weight: 500;
}

.fin-card-formula {
    font-size: 0.72rem;
    color: #6B7280;
    font-weight: 600;
    background-color: rgba(255,255,255,0.6);
    padding: 4px 10px;
    border-radius: 6px;
    width: fit-content;
    word-break: break-word;
}

.fin-green .fin-icon-bg {
    background-color: #ECFDF5;
    color: #10B981;
}

.fin-green .fin-card-val {
    color: #10B981;
}

.fin-red .fin-icon-bg {
    background-color: #FEF2F2;
    color: #EF4444;
}

.fin-red .fin-card-val {
    color: #EF4444;
}

/* --- Loan Liabilities Section --- */
.loan-list-container {
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 20px;
    background-color: #ffffff;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.08);
}

.loan-card-white {
    background-color: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 16px;
    height: 100%;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.08);
}

.loan-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
    align-items: center;
    gap: 8px;
}

.loan-bank-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1F2937;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    word-break: break-word;
}

    .loan-bank-name i {
        color: #10B981;
        flex-shrink: 0;
    }

.loan-detail-box {
    background: linear-gradient(90deg, #eef9f06b, #d8f0dc 100%);
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

    .loan-detail-box:last-child {
        margin-bottom: 0;
    }

    .loan-detail-box .asset-lbl {
        font-size: 0.65rem;
        color: #6B7280;
        margin-bottom: 2px;
    }

    .loan-detail-box .asset-val {
        font-size: 0.9rem;
        font-weight: 700;
        color: #1F2937;
    }

.pill-light-blue {
    background-color: #F0F9FF;
    border-color: #E0F2FE;
    color: #1E3A8A;
}

/* Delete modal backdrop styling */
.inv-delete-modal {
    background-color: rgba(0,0,0,0.5);
}

/* ═══════════════════════════════════════════
   RESPONSIVE OVERRIDES
   ═══════════════════════════════════════════ */

/* --- Tablet (≤ 991px) --- */
@media (max-width: 991.98px) {
    .company-title {
        font-size: 1.1rem;
    }

    .main-section {
        padding: 18px;
    }

    .section-title {
        font-size: 1rem;
    }

    .sub-card {
        padding: 16px;
    }

    .sub-card-title {
        font-size: 0.95rem;
        margin-bottom: 16px;
    }

    .financial-footer {
        padding: 22px;
    }

    .fin-card-val {
        font-size: 1.2rem;
    }

    .asset-row {
        gap: 16px;
    }
}

/* --- Small Tablet / Large Phone (≤ 767px) --- */
@media (max-width: 767.98px) {
    .company-title {
        font-size: 1rem;
    }

    .main-section {
        padding: 14px;
    }

    .section-title {
        font-size: 0.95rem;
    }

    .inv-section-icon,
    .inv-card-icon {
        width: 20px;
        height: 20px;
    }

    .val-pill {
        font-size: 0.72rem;
        padding: 8px 12px;
        gap: 8px;
    }

    .sub-card {
        padding: 14px;
    }

    .sub-card-title {
        font-size: 0.9rem;
        margin-bottom: 14px;
    }

    /* Asset rows wrap content nicely on tablet */
    .asset-row {
        gap: 12px;
        padding: 12px;
    }

    .asset-detail {
        flex: 1 1 calc(50% - 12px);
        min-width: 100px;
    }

    /* Financial summary cards drop to 1 column */
    .fin-pill-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .financial-footer {
        padding: 18px;
    }

    .fin-top-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .fin-card-val {
        font-size: 1.15rem;
    }

    .loan-list-container {
        padding: 14px;
    }

    .inv-add-loan-btn {
        width: 100%;
    }

    .inv-section-header {
        gap: 8px;
    }

    .badge-outline-green,
    .badge-outline-red {
        font-size: 0.78rem;
        padding: 6px 14px;
    }
}

/* --- Mobile (≤ 575px) --- */
@media (max-width: 575.98px) {
    .company-title {
        font-size: 0.95rem;
    }

    .main-section {
        padding: 12px;
        border-radius: 10px;
        margin-bottom: 14px;
    }

    .section-header {
        margin-bottom: 14px;
        padding-bottom: 8px;
    }

    .section-title {
        font-size: 0.88rem;
        gap: 6px;
    }

    .inv-section-icon,
    .inv-card-icon {
        width: 18px;
        height: 18px;
    }

    .inv-loan-list-icon {
        width: 16px;
        height: 16px;
    }

    .val-pill {
        font-size: 0.7rem;
        padding: 7px 10px;
        gap: 6px;
        width: 100%;
        justify-content: space-between;
    }

    .inv-section-pills {
        width: 100%;
    }

    .sub-card {
        padding: 12px;
        border-radius: 10px;
    }

    .sub-card-title {
        font-size: 0.85rem;
        gap: 8px;
        margin-bottom: 12px;
    }

    .custom-label {
        font-size: 0.7rem;
    }

    .custom-input {
        padding: 9px 12px;
        font-size: 0.8rem;
    }

    .btn-blue-action {
        font-size: 0.8rem;
        padding: 9px 18px;
    }

    .btn-upload-dashed {
        padding: 9px 12px;
        font-size: 0.75rem;
    }

    /* Asset rows stack everything vertically on mobile */
    .asset-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 12px;
        position: relative;
    }

    .asset-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .asset-detail {
        flex: 1 1 100%;
        width: 100%;
        min-width: 0;
    }

    .asset-lbl {
        font-size: 0.6rem;
    }

    .asset-val {
        font-size: 0.8rem;
    }

    .asset-actions {
        position: absolute;
        top: 12px;
        right: 12px;
        gap: 10px;
    }

        .asset-actions i {
            font-size: 0.95rem;
        }

    .list-header {
        font-size: 0.85rem;
        margin-top: 18px;
        margin-bottom: 12px;
    }

    /* Loan section */
    .loan-list-container {
        padding: 12px;
        border-radius: 10px;
    }

    .loan-card-white {
        padding: 12px;
    }

    .loan-bank-name {
        font-size: 0.85rem;
    }

    .loan-detail-box {
        padding: 8px 10px;
    }

        .loan-detail-box .asset-val {
            font-size: 0.82rem;
        }

    /* Financial footer */
    .financial-footer {
        padding: 14px;
        border-radius: 12px;
    }

    .fin-top-row {
        margin-bottom: 16px;
        gap: 10px;
    }

    .fin-title {
        font-size: 0.95rem;
    }

    .fin-card-white,
    .fin-card-highlight {
        padding: 14px;
    }

    .fin-icon-bg {
        width: 28px;
        height: 28px;
        font-size: 0.85rem;
    }

    .fin-card-header {
        font-size: 0.7rem;
    }

    .fin-card-val {
        font-size: 1rem;
    }

    .fin-card-sub {
        font-size: 0.65rem;
    }

    .fin-card-formula {
        font-size: 0.65rem;
        padding: 3px 8px;
    }

    .badge-outline-green,
    .badge-outline-red {
        font-size: 0.7rem;
        padding: 6px 12px;
        width: 100%;
        justify-content: center;
    }
}

/* --- Extra Small Phone (≤ 380px) --- */
@media (max-width: 380px) {
    .main-section {
        padding: 10px;
    }

    .section-title {
        font-size: 0.82rem;
    }

    .sub-card {
        padding: 10px;
    }

    .sub-card-title {
        font-size: 0.8rem;
    }

    .custom-input {
        padding: 8px 10px;
        font-size: 0.75rem;
    }

    .btn-blue-action {
        font-size: 0.75rem;
        padding: 8px 14px;
    }

    .btn-upload-dashed {
        font-size: 0.7rem;
        padding: 8px 10px;
    }

    .asset-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .asset-val {
        font-size: 0.75rem;
    }

    .loan-bank-name {
        font-size: 0.8rem;
    }

    .fin-card-val {
        font-size: 0.92rem;
    }
}
