/* ledger-premium.css — Premium Ledger UI */

/* ── Hero Header ─────────────────────────────────── */
.ldg-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 16px 16px;
    background: linear-gradient(135deg, var(--ink) 0%, #2d2420 100%);
    color: #fff;
}
.ldg-avatar {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), #a8824f);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 800; color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(201,169,110,0.4);
}
.ldg-hero-info { flex: 1; }
.ldg-hero-name { font-size: 16px; font-weight: 700; color: #fff; }
.ldg-hero-phone { font-size: 12px; color: rgba(255,255,255,0.6); margin-top: 2px; }
.ldg-hero-right { text-align: right; flex-shrink: 0; }
.ldg-balance-label { font-size: 10px; color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.5px; }
.ldg-balance-amount { font-size: 22px; font-weight: 900; color: var(--gold); line-height: 1.1; }

/* ── Action Buttons ──────────────────────────────── */
.ldg-action-row {
    display: flex; gap: 10px;
    padding: 14px 16px;
    background: #fff;
    border-bottom: 1px solid var(--line);
}
.ldg-btn-payment {
    flex: 1; padding: 12px 8px;
    background: linear-gradient(135deg, var(--ink), #2d2420);
    color: #fff; border: none; border-radius: 14px;
    font-size: 13px; font-weight: 700; cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 12px rgba(26,22,19,0.25);
}
.ldg-btn-payment:active { transform: scale(0.97); }
.ldg-btn-invoice {
    flex: 1; padding: 12px 8px;
    background: linear-gradient(135deg, var(--gold), #a8824f);
    color: #fff; border: none; border-radius: 14px;
    font-size: 13px; font-weight: 700; cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 4px 12px rgba(201,169,110,0.3);
}
.ldg-btn-invoice:active { transform: scale(0.97); }

/* ── Financial Summary Card ──────────────────────── */
.ldg-summary-card {
    margin: 12px 16px;
    background: #fff;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    border: 1px solid var(--line);
}
.ldg-summary-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0ebe3;
    font-size: 13px;
}
.ldg-summary-row:last-child { border-bottom: none; padding-bottom: 0; }
.ldg-summary-label { color: var(--text-dim); font-weight: 500; }
.ldg-summary-value { font-weight: 700; }
.ldg-summary-value.positive { color: var(--green); }
.ldg-summary-value.negative { color: var(--red); }
.ldg-summary-value.gold { color: var(--gold); }
.ldg-summary-total {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 10px; margin-top: 4px;
    border-top: 2px solid var(--line);
    font-size: 15px; font-weight: 800;
}

/* ── Timeline ────────────────────────────────────── */
.ldg-timeline-item {
    display: flex; gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #f0ebe3;
    cursor: pointer;
    transition: background 0.15s;
    border-radius: 12px;
    margin-bottom: 6px;
    background: #fff;
    padding: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.ldg-timeline-item:active { background: var(--cream-2); }
.ldg-tl-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}
.ldg-tl-icon.sale     { background: #fff3e0; }
.ldg-tl-icon.payment  { background: #e8f5e9; }
.ldg-tl-icon.discount { background: #fce4ec; }
.ldg-tl-icon.return   { background: #e3f2fd; }
.ldg-tl-content { flex: 1; }
.ldg-tl-title   { font-size: 14px; font-weight: 700; color: var(--ink); }
.ldg-tl-sub     { font-size: 11px; color: var(--text-dim); margin-top: 3px; }
.ldg-tl-right   { text-align: right; flex-shrink: 0; }
.ldg-tl-amount  { font-size: 14px; font-weight: 800; }
.ldg-tl-amount.debit  { color: var(--red); }
.ldg-tl-amount.credit { color: var(--green); }
.ldg-tl-badge   { font-size: 10px; background: var(--cream-2); color: var(--text-dim); padding: 2px 8px; border-radius: 20px; margin-top: 4px; display: inline-block; }

/* ── Sticky Export Button ────────────────────────── */
.ldg-export-sticky {
    position: fixed; bottom: 80px; left: 0; right: 0;
    padding: 0 16px;
    z-index: 50;
    pointer-events: none;
}
.ldg-export-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--ink), #2d2420);
    color: #fff; border: none; border-radius: 18px;
    font-size: 15px; font-weight: 700; cursor: pointer;
    box-shadow: 0 8px 24px rgba(26,22,19,0.35);
    letter-spacing: 0.3px;
    pointer-events: all;
    transition: transform 0.15s;
}
.ldg-export-btn:active { transform: scale(0.98); }

/* ── Filter Pills ────────────────────────────────── */
.ldg-filter-pill {
    padding: 7px 16px;
    background: var(--cream-2);
    border: 1.5px solid transparent;
    border-radius: 20px;
    font-size: 12px; font-weight: 600;
    color: var(--ink); cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}
.ldg-filter-pill.active,
.ldg-filter-pill:hover {
    background: var(--ink); color: #fff;
    border-color: var(--ink);
}

/* ── Supplier Ledger Hero ────────────────────────── */
.sup-ldg-hero {
    display: flex; align-items: center; gap: 14px;
    padding: 20px 16px 16px;
    background: linear-gradient(135deg, #1a2b1a, #2e4d2e);
    color: #fff;
}
