﻿:root {
    --primary: #1976d2;
    --primary-dark: #155fb0;
    --warning: #f9a825;
    --warning-dark: #f57f17;
    --danger: #d32f2f;
    --card: rgba(255,255,255,.96);
    --bg1: #0f172a;
    --bg2: #1e293b;
    --muted: #6b7280;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    //font-family: "Segoe UI", Arial, sans-serif;
    min-height: 100vh;
    padding: 25px;
    color: #111827;
    background: radial-gradient(800px 400px at 20% 10%, rgba(25,118,210,.35), transparent 60%), radial-gradient(700px 400px at 80% 20%, rgba(16,185,129,.22), transparent 55%), linear-gradient(135deg, var(--bg1), var(--bg2));
}

.wrap {
    width: 100%;
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    color: #fff;
}

.logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    backdrop-filter: blur(6px);
}

.brand h1 {
    font-size: 18px;
    margin: 0;
    font-weight: 700;
}

.brand p {
    margin: 2px 0 0;
    font-size: 12px;
    color: rgba(255,255,255,.75);
}

.card {
    background: var(--card);
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 18px 50px rgba(0,0,0,.35);
}

.cardTitleRow {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.cardTitle {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: .2px;
}

.muted {
    color: var(--muted);
    font-size: 12px;
}

.row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

label {
    display: block;
    color: #374151;
    margin: 10px 0 6px;
    text-transform: uppercase;
}

input, select {
    height: 42px;
    padding: 10px 12px;
    border: 1px solid #393d45;
    border-radius: 12px;
    outline: none;
    background: #fff;
    min-width: 240px;
    font-size: 14px;
    transition: .15s ease;
}

    input::placeholder {
        color: #9ca3af;
    }

    input:focus, select:focus {
        border-color: rgba(25,118,210,.6);
        box-shadow: 0 0 0 4px rgba(25,118,210,.12);
    }

.fltPanel input[type="checkbox"] {
    height: 16px !important;
    width: 16px !important;
    min-width: 16px !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}

button {
    height: 42px;
    padding: 10px 14px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    text-transform: uppercase;
}

    button:active {
        transform: translateY(1px);
    }

    button:disabled {
        opacity: .7;
        cursor: not-allowed;
        transform: none;
    }

.primary {
    background: var(--primary);
    color: #fff;
}

    .primary:hover {
        background: var(--primary-dark);
    }

.warning {
    background: var(--warning);
    color: #fff;
}

    .warning:hover {
        background: var(--warning-dark);
    }

.secondary {
    background: #64748b;
    color: #fff;
}

    .secondary:hover {
        background: #475569;
    }

.danger {
    background: var(--danger);
    color: #fff;
}

    .danger:hover {
        filter: brightness(.9);
    }

.ghost {
    background: rgba(100,116,139,.18);
    color: #334155;
}

    .ghost:hover {
        background: rgba(100,116,139,.28);
    }

#msg {
    margin-bottom: 14px;
}

.msgErr, .msgOk {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 10px 28px rgba(0,0,0,.18);
}

    .msgErr::before {
        content: "⚠️";
    }

    .msgOk::before {
        content: "✅";
    }

.msgErr {
    background: #ffebee;
    border: 1px solid rgba(211,47,47,.35);
    color: #b71c1c;
}

.msgOk {
    background: #e8f5e9;
    border: 1px solid rgba(27,94,32,.28);
    color: #1b5e20;
}

.tools {
    margin-left: auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.importBox {
    margin: 10px 0 12px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: rgba(248,250,252,.9);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.importLeft {
    min-width: 320px;
}

.importTitle {
    font-weight: 900;
    font-size: 14px;
    color: #0f172a;
}

.importControls {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.fileHidden {
    display: none;
}

.fileChip {
    height: 42px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-size: 13px;
    color: #334155;
    min-width: 260px;
    max-width: 520px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.importRight {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.table-wrapper {
    max-height: 460px;
    overflow: auto;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #fff;
}

table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

th, td {
    padding: 2px 8px;
    text-align: center;
    border-bottom: 1px solid #0071ff;
    font-size: small;
}

thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #334155;
}

tr:hover td {
    background: #f9fbff;
}

td button {
    height: 34px;
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 10px;
}

.sortable {
    cursor: pointer;
    user-select: none;
}

.sortIcon {
    font-size: 12px;
    margin-left: 6px;
    color: #64748b;
}

.fltWrap {
    position: relative;
    display: flex;
    justify-content: center;
}

.fltBtn {
    height: 28px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    color: #334155;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .fltBtn::after {
        content: "⏷";
        font-size: 11px;
        opacity: .75;
    }

    .fltBtn.active {
        border-color: rgba(25,118,210,.55);
        box-shadow: 0 0 0 3px rgba(25,118,210,.12);
    }

.fltPanel {
    position: absolute;
    top: 32px;
    left: 0;
    z-index: 9999;
    width: 260px;
    max-height: 320px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0,0,0,.22);
    padding: 10px;
    display: none;
    overflow: hidden; /* ✅ remove horizontal scroll */
}

    .fltPanel.open {
        display: block;
    }

.fltHead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.fltTitle {
    font-size: 12px;
    font-weight: 900;
    color: #0f172a;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.fltTools {
    display: flex;
    gap: 6px;
}

.fltMiniBtn {
    height: 26px;
    padding: 0 10px;
    border-radius: 10px;
    border: 0;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
    background: rgba(100,116,139,.18);
    color: #334155;
}

    .fltMiniBtn:hover {
        background: rgba(100,116,139,.28);
    }

.fltSearch {
    width: 100%;
    height: 34px;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    outline: none;
    font-size: 13px;
    margin-bottom: 8px;
}

/* ✅ scroll only list, NOT whole panel */
.fltList {
    max-height: 230px;
    overflow: auto;
    padding-right: 4px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.fltItem {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #334155;
    white-space: nowrap;
}

    .fltItem input[type="checkbox"] {
        width: 16px;
        height: 16px;
        flex: 0 0 16px;
        margin: 0;
    }

    .fltItem span {
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
    }

/* optional: nice scrollbar */
.fltList::-webkit-scrollbar {
    width: 8px;
}

.fltList::-webkit-scrollbar-thumb {
    background: rgba(100,116,139,.35);
    border-radius: 10px;
}

.fltEmpty {
    font-size: 12px;
    color: #64748b;
    padding: 6px 0;
}

.pagerBar {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    padding: 0 2px 4px;
}

.pagerLeft {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

#pageSize {
    height: 36px;
    border-radius: 10px;
    min-width: 90px;
}

.pagerRight {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

    .pagerRight button {
        height: 34px;
        padding: 6px 10px;
        border-radius: 10px;
        font-size: 13px;
    }

    .pagerRight .activePage {
        background: var(--primary);
        color: #fff;
    }

@media (max-width:700px) {
    input, select {
        min-width: 100%;
    }

    .tools {
        width: 100%;
        margin-left: 0;
    }

        .tools input, .tools button {
            width: 100%;
        }

    .importLeft, .importRight {
        width: 100%;
    }

        .importRight button {
            width: 100%;
        }

    .fileChip {
        width: 100%;
        min-width: 100%;
    }
}
/* ============================
   DASHBOARD SUMMARY + FINANCER
   ============================ */
/* HEADER AREA (brand) should be column, not row */
.brand {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 14px;
    color: #fff;
}

/* dashboard should take full width */
.dashRow {
    width: 100%;
}

/* financer box should take full width */
.financerBox {
    width: 100%;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,.18);
}

/* text colors inside financer box */
.financerTitle {
    font-weight: 900;
    font-size: 13px;
    color: #0f172a;
    margin-bottom: 10px;
}

.financerList {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.financerPill {
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-size: 12px;
    font-weight: 800;
    color: #334155;
}

    .financerPill b {
        color: #0f172a;
    }

/* =========================
   DASHBOARD SUMMARY (TABLE)
   ========================= */

.dashSummary {
    width: 100%;
    background: rgba(255,255,255,.92);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(0,0,0,.18);
}

.dashSummaryRow {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
}

.dashCell {
    padding: 8px 10px;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
}

.dashSummaryRow .dashCell:last-child {
    border-right: none;
}

.dashSummaryHead .dashCell {
    background: #f8fafc;
    text-transform: uppercase;
    font-weight: bold;
    color: #334155;
}

.dashSummaryValue .dashCell {
    background: #fff;
    font-weight: bold;
    color: #0f172a;
}

/* =========================
   FINANCER WISE (DASH CARDS)
   ========================= */

.financerBox {
    width: 100%;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(255,255,255,.55);
    border-radius: 14px;
    padding: 12px;
    margin-top: 10px;
    box-shadow: 0 12px 30px rgba(0,0,0,.18);
}

.financerTitle {
    font-weight: 900;
    font-size: 13px;
    color: #0f172a;
    margin-bottom: 10px;
}

.financerCards {
    display: grid;
    grid-template-columns: repeat(6, minmax(140px, 1fr));
    gap: 10px;
}

.finDashCard {
    background: rgba(255,255,255,.96);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 10px 22px rgba(0,0,0,.12);
}

.finDashName {
    font-size: 12px;
    font-weight: 900;
    color: #64748b;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.finDashCount {
    font-size: 20px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.1;
}

.finDashTotal {
    font-size: 12px;
    font-weight: 800;
    color: #64748b;
    margin-top: 2px;
}

/* responsive */
@media (max-width: 1200px) {
    .dashSummaryRow {
        grid-template-columns: repeat(3, 1fr);
    }

    .financerCards {
        grid-template-columns: repeat(3, minmax(140px, 1fr));
    }
}

@media (max-width: 700px) {
    .dashSummaryRow {
        grid-template-columns: repeat(2, 1fr);
    }

    .financerCards {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }
}
/* =========================
   FINANCER WISE - STAT CARDS
   ========================= */

.financerCards {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr)); /* like your screenshot */
    gap: 12px;
}

.statCard {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(255,255,255,.96);
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 10px 22px rgba(0,0,0,.12);
}

.statIcon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #eef2ff; /* any color ok */
    flex: 0 0 44px;
}

.statText {
    flex: 1;
    min-width: 0;
}

.statLabel {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.statSub {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin-top: 2px;
    margin-left: auto;
}

.statValue {
    font-size: 22px;
    font-weight: 900;
    color: #0f172a;
    margin-left: auto;
}

/* responsive */
@media (max-width: 1200px) {
    .financerCards {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }
}

@media (max-width: 700px) {
    .financerCards {
        grid-template-columns: 1fr;
    }
}
/* ✅ Import card row like screenshot */
.importRow {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

/* left file controls */
.importControls {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 520px; /* adjust if needed */
}

/* small Upload/Clear buttons */
.importMiniBtns {
    display: flex;
    align-items: center;
    gap: 8px;
}

.miniBtn {
    padding: 8px 14px;
    border-radius: 10px;
    font-weight: 600;
    line-height: 1;
}
.importMsgArea {
    flex: 1; /* ✅ take remaining space */
    min-height: 40px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
    .importMsgArea.ok {
        border: 1px solid #d1d5db;
        border-radius: 12px;
        border-color: #22c55e;
        color: #166534;
        background: #f0fdf4;
    }
    .importMsgArea.err {
        border: 1px solid #d1d5db;
        border-radius: 12px;
        border-color: #ef4444;
        color: #991b1b;
        background: #fef2f2;
    }
.formMsg {
    margin-top: 12px;
    min-height: 44px;
    padding: 10px 12px;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
    .formMsg.ok {
        border: 1px solid #d1d5db;
        border-radius: 12px;
        border-color: #22c55e;
        background: #f0fdf4;
        color: #166534;
    }
    .formMsg.err {
        border: 1px solid #d1d5db;
        border-radius: 12px;
        border-color: #ef4444;
        background: #fef2f2;
        color: #991b1b;
    }
