/* =====================================================
   ROOT / THEME
===================================================== */
:root {
    --sea-blue: #0ea5e9;
    --sea-blue-dark: #0284c7;
    --sea-blue-soft: #e0f2fe;
    --sea-blue-deep: #0369a1;
    --white: #ffffff;
    --bg-light: #f4fbff;
    --bg-soft: #eef8fd;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --border-soft: rgba(14, 165, 233, 0.14);
    --shadow-soft: 0 14px 35px rgba(2, 132, 199, 0.08);
    --shadow-hover: 0 18px 45px rgba(2, 132, 199, 0.12);
    --success: #059669;
    --success-bg: rgba(16, 185, 129, 0.12);
    --danger: #dc2626;
    --danger-bg: rgba(239, 68, 68, 0.12);
    --warning: #d97706;
    --warning-bg: rgba(245, 158, 11, 0.14);
    --neutral: #475569;
    --neutral-bg: rgba(100, 116, 139, 0.12);
}

/* =====================================================
   GLOBAL LAYOUT
===================================================== */
.account-wrapper {
    position: relative;
    padding: 115px 24px 60px;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.10), transparent 20%),
        radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.08), transparent 25%),
        linear-gradient(180deg, #ffffff 0%, #f4fbff 45%, #eef8fd 100%);
    overflow: hidden;
    margin-top: 50px;
}

.account-wrapper::before,
.account-wrapper::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(14px);
    pointer-events: none;
    z-index: 0;
}

.account-wrapper::before {
    top: 110px;
    left: -110px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.14), transparent 68%);
}

.account-wrapper::after {
    right: -100px;
    bottom: 30px;
    width: 290px;
    height: 290px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.10), transparent 72%);
}

.account-container {
    max-width: 1380px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.account-layout {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.account-main {
    min-width: 0;
    width: 100%;
}

/* =====================================================
   TOP HERO / INTRO
===================================================== */
.transaction-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    gap: 22px;
    padding: 26px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--border-soft);
    box-shadow: 0 22px 48px rgba(2, 132, 199, 0.10);
    backdrop-filter: blur(12px);
    margin-bottom: 22px;
}

.transaction-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.42), rgba(255,255,255,0.05)),
        linear-gradient(180deg, rgba(14,165,233,0.03), rgba(14,165,233,0));
    pointer-events: none;
}

.transaction-hero-content,
.transaction-hero-side {
    position: relative;
    z-index: 2;
}

.transaction-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.10);
    border: 1px solid rgba(14, 165, 233, 0.12);
    color: var(--sea-blue-deep);
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 16px;
}

.transaction-title {
    margin: 0 0 12px;
    font-size: 38px;
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--text-dark);
}

.transaction-title span {
    display: block;
    color: var(--sea-blue-dark);
}

.transaction-subtitle {
    margin: 0;
    max-width: 700px;
    font-size: 15px;
    line-height: 1.85;
    color: var(--text-muted);
}

.transaction-hero-side {
    display: flex;
    align-items: stretch;
}

.transaction-side-card {
    width: 100%;
    border-radius: 24px;
    padding: 22px 20px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sea-blue) 0%, var(--sea-blue-dark) 100%);
    box-shadow: 0 20px 38px rgba(2, 132, 199, 0.22);
    position: relative;
    overflow: hidden;
}

.transaction-side-card::before {
    content: "";
    position: absolute;
    top: -40px;
    right: -35px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.11);
}

.transaction-side-card::after {
    content: "";
    position: absolute;
    bottom: -55px;
    left: -20px;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.transaction-side-card > * {
    position: relative;
    z-index: 2;
}

.transaction-side-label {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.14);
    font-size: 11px;
    font-weight: 800;
    margin-bottom: 15px;
}

.transaction-side-card h4 {
    margin: 0 0 10px;
    font-size: 24px;
    line-height: 1.18;
    font-weight: 900;
}

.transaction-side-card p {
    margin: 0;
    font-size: 13px;
    line-height: 1.8;
    color: rgba(255,255,255,0.92);
}

/* =====================================================
   SUMMARY CARDS
===================================================== */
.transaction-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.transaction-stat-card {
    background: rgba(255,255,255,0.84);
    border: 1px solid var(--border-soft);
    border-radius: 24px;
    padding: 22px 20px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    transition: all 0.28s ease;
}

.transaction-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.transaction-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.transaction-stat-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
}

.transaction-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0f2fe, #f0f9ff);
    color: var(--sea-blue-dark);
    font-size: 18px;
    flex-shrink: 0;
}

.transaction-stat-value {
    margin: 0 0 6px;
    font-size: 28px;
    line-height: 1.1;
    font-weight: 900;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.transaction-stat-note {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-muted);
}

/* =====================================================
   CARD
===================================================== */
.account-card {
    background: rgba(255, 255, 255, 0.86);
    border-radius: 28px;
    padding: 26px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.06);
    border: 1px solid var(--border-soft);
    backdrop-filter: blur(12px);
    transition: 0.3s ease;
}

.account-card:hover {
    box-shadow: 0 24px 48px rgba(2, 132, 199, 0.10);
}

.card-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(14, 165, 233, 0.10);
}

.card-header-left h4 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 900;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.card-header-left p {
    margin: 0;
    max-width: 700px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.8;
}

.card-header-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.08);
    color: var(--sea-blue-deep);
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

/* =====================================================
   TABLE CONTAINER
===================================================== */
.transaction-table-container {
    width: 100%;
}

.transaction-table-scroll {
    width: 100%;
    overflow-x: auto;
    border-radius: 20px;
    border: 1px solid rgba(14, 165, 233, 0.10);
    background: #ffffff;
}

/* =====================================================
   TABLE DESIGN
===================================================== */
.transaction-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 760px;
}

.transaction-table thead th {
    padding: 16px 14px;
    font-size: 12px;
    font-weight: 800;
    color: var(--text-muted);
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: linear-gradient(180deg, #f7fcff 0%, #f2faff 100%);
    border-bottom: 1px solid rgba(14, 165, 233, 0.10);
}

.transaction-table thead th:first-child {
    border-top-left-radius: 18px;
}

.transaction-table thead th:last-child {
    border-top-right-radius: 18px;
}

.transaction-table td {
    padding: 16px 14px;
    font-size: 14px;
    color: var(--text-dark);
    border-bottom: 1px solid #eef6fb;
    vertical-align: middle;
    background: #ffffff;
}

.transaction-table tbody tr {
    transition: all 0.25s ease;
}

.transaction-table tbody tr:hover td {
    background: #f7fcff;
}

.transaction-table tbody tr:last-child td {
    border-bottom: none;
}

/* =====================================================
   TABLE TEXT
===================================================== */
.date-text {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
}

.reference-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 13px;
    color: #0f172a;
    word-break: break-word;
}

.reference-text i {
    color: var(--sea-blue-dark);
    font-size: 13px;
}

.amount-text {
    font-weight: 900;
    font-size: 14px;
    white-space: nowrap;
}

.amount-credit {
    color: var(--success);
}

.amount-debit {
    color: var(--danger);
}

/* =====================================================
   BADGES
===================================================== */
.tx-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

/* Type */
.type-credit {
    background: var(--success-bg);
    color: var(--success);
}

.type-debit {
    background: var(--danger-bg);
    color: var(--danger);
}

/* Status */
.status-completed,
.status-success {
    background: var(--success-bg);
    color: var(--success);
}

.status-pending {
    background: var(--warning-bg);
    color: var(--warning);
}

.status-failed {
    background: var(--danger-bg);
    color: var(--danger);
}

.status-cancelled {
    background: var(--neutral-bg);
    color: var(--neutral);
}

/* =====================================================
   EMPTY STATE
===================================================== */
.empty-row {
    text-align: center;
    padding: 32px 20px !important;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 700;
}

/* =====================================================
   DATATABLE CUSTOM STYLING
===================================================== */
.dataTables_wrapper {
    margin-top: 6px;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 16px;
}

.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
}

.dataTables_wrapper .dataTables_filter input {
    min-width: 240px;
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(14, 165, 233, 0.16);
    padding: 0 14px;
    background: #ffffff;
    color: var(--text-dark);
    outline: none;
    box-shadow: none;
    margin-left: 8px;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: rgba(2, 132, 199, 0.28);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.08);
}

.dataTables_wrapper .dataTables_length select {
    min-width: 74px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid rgba(14, 165, 233, 0.16);
    padding: 0 10px;
    background: #ffffff;
    color: var(--text-dark);
    margin: 0 6px;
    outline: none;
}

.dataTables_wrapper .dataTables_info {
    margin-top: 16px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
}

.dataTables_wrapper .dataTables_paginate {
    margin-top: 14px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    min-width: 38px;
    height: 38px;
    line-height: 26px !important;
    border-radius: 12px !important;
    padding: 5px 12px !important;
    margin: 0 4px;
    border: 1px solid rgba(14, 165, 233, 0.10) !important;
    background: #ffffff !important;
    color: var(--sea-blue-deep) !important;
    font-weight: 800;
    transition: all 0.25s ease;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, var(--sea-blue), var(--sea-blue-dark)) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 10px 20px rgba(2, 132, 199, 0.20);
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(14, 165, 233, 0.10) !important;
    color: var(--sea-blue-deep) !important;
    border: 1px solid rgba(14, 165, 233, 0.14) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    opacity: 0.45;
    cursor: not-allowed !important;
    background: #ffffff !important;
}

/* =====================================================
   RESPONSIVE
===================================================== */
@media (max-width: 1200px) {
    .transaction-hero {
        grid-template-columns: 1fr;
    }

    .transaction-title {
        font-size: 33px;
    }

    .transaction-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .account-layout {
        grid-template-columns: 1fr;
    }

    .account-wrapper {
        padding: 100px 18px 50px;
    }

    .card-header-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .account-wrapper {
        padding: 92px 12px 42px;
    }

    .transaction-hero,
    .account-card {
        padding: 18px;
        border-radius: 22px;
    }

    .transaction-title {
        font-size: 27px;
    }

    .transaction-subtitle {
        font-size: 13px;
    }

    .transaction-side-card h4 {
        font-size: 22px;
    }

    .transaction-stat-value {
        font-size: 24px;
    }

    .card-header-left h4 {
        font-size: 24px;
    }

    .card-header-left p {
        font-size: 13px;
    }

    .transaction-table th,
    .transaction-table td {
        padding: 14px 12px;
    }

    .dataTables_wrapper .dataTables_filter input {
        min-width: 180px;
    }
}

@media (max-width: 560px) {
    .transaction-badge,
    .card-header-tag,
    .transaction-side-label {
        font-size: 10px;
    }

    .transaction-title {
        font-size: 23px;
    }

    .transaction-side-card h4 {
        font-size: 20px;
    }

    .transaction-stat-card {
        padding: 18px 16px;
    }

    .transaction-stat-value {
        font-size: 21px;
    }

    .card-header-left h4 {
        font-size: 21px;
    }

    .tx-badge {
        font-size: 11px;
        padding: 0 10px;
    }

    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        width: 100%;
    }

    .dataTables_wrapper .dataTables_filter input {
        width: 100%;
        min-width: 100%;
        margin-left: 0;
        margin-top: 8px;
    }
}


/* ===============================
   STAT VALUE COLORS
================================ */

.transaction-stat-value {
    font-weight: 800;
    font-size: 28px;
    letter-spacing: -0.5px;
}

/* CREDIT (GREEN +) */
.transaction-credit-total {
    color: #059669;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.transaction-credit-total::before {
    content: "+";
    font-size: 18px;
    font-weight: 700;
}

/* DEBIT (RED -) */
.transaction-debit-total {
    color: #dc2626;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.transaction-debit-total::before {
    content: "-";
    font-size: 18px;
    font-weight: 700;
}

/* OPTIONAL: subtle glow for premium feel */
.transaction-credit-total {
    text-shadow: 0 2px 10px rgba(5, 150, 105, 0.15);
}

.transaction-debit-total {
    text-shadow: 0 2px 10px rgba(220, 38, 38, 0.15);
}