/* ==========================================================================
   Modern dashboard / statement styles
   Scoped to the `mdash-*` and `badge-status-*` class names so the existing
   theme is left untouched.
   ========================================================================== */

:root {
    --mdash-bg: #f5f7fb;
    --mdash-surface: #ffffff;
    --mdash-border: #e8ecf6;
    --mdash-ink: #0f1b3d;
    --mdash-muted: #7a839e;
    --mdash-primary: #4361ee;
    --mdash-primary-soft: #eef1ff;
    --mdash-credit: #0aa06e;
    --mdash-credit-soft: #e6f7f1;
    --mdash-debit: #e7515a;
    --mdash-debit-soft: #fdeced;
    --mdash-warning: #e2a03f;
    --mdash-warning-soft: #fdf5e8;
    --mdash-radius: 16px;
    --mdash-shadow: 0 1px 2px rgba(15, 27, 61, .04), 0 8px 24px rgba(15, 27, 61, .06);
}

.mdash {
    font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--mdash-ink);
}

.mdash *,
.mdash *::before,
.mdash *::after {
    box-sizing: border-box;
}

/* ---------- page heading ---------- */
.mdash-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

.mdash-head h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--mdash-ink);
    margin: 0 0 4px;
    letter-spacing: -.2px;
}

.mdash-head p {
    font-size: 13px;
    color: var(--mdash-muted);
    margin: 0;
}

.mdash-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--mdash-surface);
    border: 1px solid var(--mdash-border);
    color: var(--mdash-muted);
}

.mdash-chip .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--mdash-credit);
    box-shadow: 0 0 0 3px var(--mdash-credit-soft);
}

.mdash-chip.is-hold .dot {
    background: var(--mdash-debit);
    box-shadow: 0 0 0 3px var(--mdash-debit-soft);
}

/* ---------- grid ---------- */
.mdash-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 20px;
}

.mdash-col-8 { grid-column: span 8; }
.mdash-col-6 { grid-column: span 6; }
.mdash-col-4 { grid-column: span 4; }
.mdash-col-12 { grid-column: span 12; }

@media (max-width: 1199px) {
    .mdash-col-8, .mdash-col-4, .mdash-col-6 { grid-column: span 12; }
}

/* ---------- cards ---------- */
.mdash-card {
    background: var(--mdash-surface);
    border: 1px solid var(--mdash-border);
    border-radius: var(--mdash-radius);
    box-shadow: var(--mdash-shadow);
    padding: 22px;
}

.mdash-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.mdash-card-head h2 {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: var(--mdash-ink);
}

.mdash-card-head a {
    font-size: 12px;
    font-weight: 600;
    color: var(--mdash-primary);
    text-decoration: none;
}

.mdash-card-head a:hover { text-decoration: underline; }

/* ---------- balance hero ---------- */
.mdash-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--mdash-radius);
    padding: 26px;
    color: #fff;
    background: linear-gradient(135deg, #3730c9 0%, #4361ee 45%, #5b8def 100%);
    box-shadow: 0 14px 34px rgba(67, 97, 238, .28);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.mdash-hero::after {
    content: "";
    position: absolute;
    right: -70px;
    top: -90px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .09);
}

.mdash-hero::before {
    content: "";
    position: absolute;
    right: 30px;
    bottom: -120px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
}

.mdash-hero > * { position: relative; z-index: 1; }

.mdash-hero-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 26px;
}

.mdash-hero-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mdash-hero-user img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, .5);
}

.mdash-hero-user span {
    display: block;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}

.mdash-hero-user small {
    font-size: 11px;
    opacity: .75;
    letter-spacing: .4px;
}

.mdash-hero-label {
    font-size: 12px;
    letter-spacing: .8px;
    text-transform: uppercase;
    opacity: .8;
    margin-bottom: 6px;
}

.mdash-hero-amount {
    font-size: 38px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1px;
    word-break: break-word;
}

.mdash-hero-amount .cur {
    font-size: 22px;
    font-weight: 600;
    vertical-align: super;
    margin-right: 2px;
    opacity: .9;
}

.mdash-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: auto;
    padding-top: 24px;
}

.mdash-hero-meta div {
    flex: 1 1 130px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 12px;
    padding: 12px 14px;
    backdrop-filter: blur(4px);
}

.mdash-hero-meta span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .6px;
    opacity: .78;
    margin-bottom: 4px;
}

.mdash-hero-meta strong {
    font-size: 16px;
    font-weight: 700;
    word-break: break-all;
}

.mdash-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.mdash-hero-actions a {
    flex: 1 1 140px;
    text-align: center;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}

.mdash-hero-actions a:hover {
    transform: translateY(-1px);
    text-decoration: none;
}

.mdash-hero-actions .solid {
    background: #fff;
    color: var(--mdash-primary);
}

.mdash-hero-actions .ghost {
    background: rgba(255, 255, 255, .16);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .32);
}

/* ---------- stat tiles ---------- */
.mdash-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
}

.mdash-stat {
    background: var(--mdash-surface);
    border: 1px solid var(--mdash-border);
    border-radius: var(--mdash-radius);
    box-shadow: var(--mdash-shadow);
    padding: 18px 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.mdash-stat-icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mdash-primary-soft);
    color: var(--mdash-primary);
}

.mdash-stat-icon svg { width: 20px; height: 20px; }

.mdash-stat-icon.credit { background: var(--mdash-credit-soft); color: var(--mdash-credit); }
.mdash-stat-icon.debit { background: var(--mdash-debit-soft); color: var(--mdash-debit); }
.mdash-stat-icon.warn { background: var(--mdash-warning-soft); color: var(--mdash-warning); }

.mdash-stat-body span {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--mdash-muted);
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 5px;
}

.mdash-stat-body strong {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--mdash-ink);
    line-height: 1.2;
    word-break: break-word;
}

.mdash-stat-body small {
    display: block;
    font-size: 11px;
    color: var(--mdash-muted);
    margin-top: 4px;
}

/* ---------- transaction feed ---------- */
.mdash-feed { margin: 0; padding: 0; list-style: none; }

.mdash-feed li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--mdash-border);
}

.mdash-feed li:last-child { border-bottom: 0; padding-bottom: 0; }

.mdash-feed-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mdash-feed-icon svg { width: 18px; height: 18px; }
.mdash-feed-icon.credit { background: var(--mdash-credit-soft); color: var(--mdash-credit); }
.mdash-feed-icon.debit { background: var(--mdash-debit-soft); color: var(--mdash-debit); }

.mdash-feed-body { flex: 1 1 auto; min-width: 0; }

.mdash-feed-body strong {
    display: block;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--mdash-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mdash-feed-body small {
    display: block;
    font-size: 11.5px;
    color: var(--mdash-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mdash-feed-amount {
    flex: 0 0 auto;
    text-align: right;
}

.mdash-feed-amount b {
    display: block;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.mdash-feed-amount b.credit { color: var(--mdash-credit); }
.mdash-feed-amount b.debit { color: var(--mdash-debit); }

.mdash-empty {
    text-align: center;
    padding: 34px 10px;
    color: var(--mdash-muted);
    font-size: 13px;
}

.mdash-empty svg {
    width: 34px;
    height: 34px;
    display: block;
    margin: 0 auto 10px;
    opacity: .4;
}

/* ---------- status badges (shared with the tables) ---------- */
.badge-status {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .3px;
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
}

.badge-status-success { background: var(--mdash-credit-soft); color: var(--mdash-credit); border-color: rgba(10, 160, 110, .2); }
.badge-status-danger { background: var(--mdash-debit-soft); color: var(--mdash-debit); border-color: rgba(231, 81, 90, .2); }
.badge-status-warning { background: var(--mdash-warning-soft); color: var(--mdash-warning); border-color: rgba(226, 160, 63, .22); }
.badge-status-pending { background: #eef1f8; color: #64708f; border-color: #dde3f0; }

/* ---------- amount colouring in tables ---------- */
.amount-credit { color: var(--mdash-credit); font-weight: 700; white-space: nowrap; }
.amount-debit { color: var(--mdash-debit); font-weight: 700; white-space: nowrap; }
.amount-plain { font-weight: 700; white-space: nowrap; color: var(--mdash-ink); }

/* ---------- statement tabs ---------- */
.mdash-tabs {
    display: inline-flex;
    padding: 5px;
    gap: 4px;
    background: #eef1f8;
    border-radius: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.mdash-tabs button {
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--mdash-muted);
    padding: 9px 18px;
    border-radius: 9px;
    cursor: pointer;
    transition: all .15s ease;
}

.mdash-tabs button:hover { color: var(--mdash-ink); }

.mdash-tabs button.is-active {
    background: var(--mdash-surface);
    color: var(--mdash-primary);
    box-shadow: 0 1px 3px rgba(15, 27, 61, .12);
}

.mdash-pane { display: none; }
.mdash-pane.is-active { display: block; }

/* ---------- modern table ---------- */
.mdash-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table.mdash-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
}

table.mdash-table thead th {
    background: #f7f9fd;
    color: var(--mdash-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    padding: 13px 14px;
    border-bottom: 1px solid var(--mdash-border);
    white-space: nowrap;
    text-align: left;
}

table.mdash-table thead th:first-child { border-top-left-radius: 12px; }
table.mdash-table thead th:last-child { border-top-right-radius: 12px; }

table.mdash-table tbody td {
    padding: 14px;
    border-bottom: 1px solid var(--mdash-border);
    color: #495273;
    vertical-align: middle;
}

table.mdash-table tbody tr:last-child td { border-bottom: 0; }
table.mdash-table tbody tr:hover td { background: #fafbff; }

.mdash-cell-title {
    font-weight: 700;
    color: var(--mdash-ink);
    display: block;
}

.mdash-cell-sub {
    display: block;
    font-size: 11.5px;
    color: var(--mdash-muted);
    margin-top: 2px;
}

.mdash-type {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 12px;
}

.mdash-type::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.mdash-type.credit { color: var(--mdash-credit); }
.mdash-type.credit::before { background: var(--mdash-credit); }
.mdash-type.debit { color: var(--mdash-debit); }
.mdash-type.debit::before { background: var(--mdash-debit); }

/* ---------- receipt / thank you page ---------- */
.mdash-receipt {
    max-width: 620px;
    margin: 0 auto;
    background: var(--mdash-surface);
    border: 1px solid var(--mdash-border);
    border-radius: var(--mdash-radius);
    box-shadow: var(--mdash-shadow);
    overflow: hidden;
}

.mdash-receipt-head {
    text-align: center;
    padding: 34px 26px 26px;
    background: linear-gradient(160deg, #f5f8ff 0%, #ffffff 100%);
    border-bottom: 1px dashed var(--mdash-border);
}

.mdash-receipt-mark {
    width: 68px;
    height: 68px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mdash-credit-soft);
    color: var(--mdash-credit);
}

.mdash-receipt-mark.pending { background: var(--mdash-warning-soft); color: var(--mdash-warning); }
.mdash-receipt-mark.failed { background: var(--mdash-debit-soft); color: var(--mdash-debit); }
.mdash-receipt-mark svg { width: 32px; height: 32px; }

.mdash-receipt-head h1 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--mdash-ink);
}

.mdash-receipt-head p {
    font-size: 13px;
    color: var(--mdash-muted);
    margin: 0 auto;
    max-width: 420px;
    line-height: 1.6;
}

.mdash-receipt-amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--mdash-ink);
    letter-spacing: -.6px;
    margin: 18px 0 6px;
}

.mdash-receipt-body { padding: 24px 26px; }

.mdash-receipt-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 0;
    border-bottom: 1px solid var(--mdash-border);
    font-size: 13px;
}

.mdash-receipt-row:last-child { border-bottom: 0; }

.mdash-receipt-row span {
    color: var(--mdash-muted);
    font-weight: 600;
    white-space: nowrap;
}

.mdash-receipt-row strong {
    color: var(--mdash-ink);
    font-weight: 700;
    text-align: right;
    word-break: break-word;
}

.mdash-receipt-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 26px 26px;
}

.mdash-receipt-foot a {
    flex: 1 1 150px;
    text-align: center;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
}

.mdash-receipt-foot a.primary { background: var(--mdash-primary); color: #fff; }
.mdash-receipt-foot a.primary:hover { background: #3550d8; color: #fff; text-decoration: none; }
.mdash-receipt-foot a.outline { background: #fff; color: var(--mdash-ink); border-color: var(--mdash-border); }
.mdash-receipt-foot a.outline:hover { background: #f5f7fb; color: var(--mdash-ink); text-decoration: none; }

.mdash-note {
    font-size: 11.5px;
    color: var(--mdash-muted);
    text-align: center;
    padding: 0 26px 22px;
    line-height: 1.6;
}

/* ---------- pin pad (login) ---------- */
.pinpad {
    max-width: 260px;
    margin: 0 auto;
}

.pinpad-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.pinpad-grid button {
    all: unset;
    box-sizing: border-box;
    text-align: center;
    font-family: 'Quicksand', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #0f1b3d;
    background: #fff;
    border: 1px solid #e0e6f5;
    border-radius: 14px;
    padding: 14px 0;
    cursor: pointer;
    user-select: none;
    transition: background .12s ease, transform .08s ease;
}

.pinpad-grid button:hover { background: #eef1ff; }
.pinpad-grid button:active { transform: scale(.96); background: #dfe5ff; }
.pinpad-grid button.pin-action { font-size: 14px; color: #7a839e; background: #f5f7fb; }

.pin-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 6px 0 18px;
}

.pin-dots i {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #e0e6f5;
    display: block;
    transition: background .15s ease, transform .15s ease;
}

.pin-dots i.filled { background: #4361ee; transform: scale(1.12); }

@media print {
    .d-print-none, .mdash-receipt-foot, #sidebar, .sidebar-wrapper, .header-container, .footer-wrapper { display: none !important; }
    .mdash-receipt { box-shadow: none; border: 0; }
}

/* ---------- balance card: period in / out ---------- */
.mdash-hero-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 26px;
    margin-top: 20px;
}

.mdash-hero-flow > div {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mdash-hero-flow svg {
    width: 16px;
    height: 16px;
    flex: 0 0 28px;
    box-sizing: content-box;
    padding: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
}

.mdash-hero-flow span {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .5px;
    opacity: .75;
}

.mdash-hero-flow strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
}
