/* Account statement — money in / money out */

.statement-page {
    background: #f3f4f8;
}

.statement-page .statement-hero.check-status-hero {
    background: linear-gradient(135deg, #4D1F85 0%, #365def 50%, #6729cb 100%);
    color: #fff;
    padding: 8rem 0 2.5rem;
}

@media (min-width: 1024px) {
    .statement-page .statement-hero.check-status-hero {
        padding: 9rem 0 3rem;
    }
}

@media (max-width: 768px) {
    .statement-page .statement-hero.check-status-hero {
        padding: 6.75rem 0 1.85rem;
    }

    .statement-page .statement-content {
        padding-bottom: calc(1.5rem + var(--mobile-tab-bar-clearance, 4.5rem));
    }
}

.statement-page .statement-hero .container {
    justify-content: center;
}

.statement-page .statement-hero-content.check-status-hero-content {
    max-width: 720px;
    width: 100%;
    text-align: center;
}

.statement-page .statement-hero h1,
.statement-page .statement-hero .hero-subtitle,
html[dir="rtl"] .statement-page .statement-hero h1,
html[dir="rtl"] .statement-page .statement-hero .hero-subtitle {
    text-align: center !important;
}

.statement-page .statement-hero h1 {
    margin: 0 0 0.35rem;
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    line-height: 1.2;
    color: inherit;
}

.statement-page .statement-hero .hero-subtitle {
    margin: 0 auto;
    max-width: 36rem;
    font-size: 1.05rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.9);
}

.statement-content {
    padding: 1.35rem 0 2.5rem;
    background: #f3f4f8;
}

.statement-container {
    max-width: 860px;
}

.statement-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.65rem;
    padding: 2.5rem 1.25rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    background: #fff;
}

.statement-state[hidden] {
    display: none !important;
}

.statement-state__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: #eff6ff;
    color: var(--primary-color, #296ff9);
    font-size: 1.15rem;
}

.statement-state h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-dark, #0f172a);
}

.statement-state p {
    margin: 0;
    max-width: 28rem;
    color: var(--text-muted, #64748b);
    line-height: 1.45;
}

.statement-state--error .statement-state__icon {
    background: #fef2f2;
    color: #dc2626;
}

.statement-skeleton {
    display: grid;
    gap: 0.55rem;
    position: relative;
    isolation: isolate;
    max-width: 100%;
}

.statement-skeleton[hidden] {
    display: none !important;
}

.statement-skeleton__summary,
.statement-skeleton__row {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    background: #e2e8f0;
}

.statement-skeleton__summary {
    height: 5rem;
}

.statement-skeleton__row {
    height: 3.6rem;
}

.statement-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
    margin-bottom: 0.85rem;
}

.statement-summary__card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: #fff;
    box-shadow: none;
    text-align: start;
}

.statement-summary__label {
    font-size: 0.78rem;
    font-weight: 650;
    color: var(--text-muted, #64748b);
}

.statement-summary__value {
    font-size: 1.2rem;
    font-weight: 750;
    letter-spacing: -0.01em;
    color: var(--text-dark, #0f172a);
    unicode-bidi: isolate;
    font-variant-numeric: tabular-nums;
}

.statement-summary__value--in {
    color: #15803d;
}

.statement-summary__value--out {
    color: #b91c1c;
}

.statement-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.statement-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
}

.statement-date {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-width: min(100%, 13.5rem);
    padding: 0.45rem 0.7rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 12px;
    background: #fff;
    color: var(--text-dark, #0f172a);
    cursor: pointer;
    box-shadow: none;
    user-select: none;
}

.statement-date:hover {
    border-color: rgba(41, 111, 249, 0.35);
}

.statement-date:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(41, 111, 249, 0.35);
}

.statement-date > .fa-calendar-alt {
    color: var(--primary-color, #296ff9);
    font-size: 0.95rem;
}

.statement-date__text {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    min-width: 0;
    flex: 1 1 auto;
    text-align: start;
}

.statement-date__label {
    font-size: 0.68rem;
    font-weight: 650;
    color: #94a3b8;
    line-height: 1.2;
}

.statement-date__value {
    font-size: 0.82rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.statement-date__clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
    box-shadow: none;
}

.statement-date__clear[hidden] {
    display: none !important;
}

.statement-date__clear:hover {
    color: #0f172a;
    background: #eff6ff;
}

.statement-date .date-input-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.statement-filter {
    margin: 0;
    padding: 0.42rem 0.9rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 999px;
    background: #fff;
    color: var(--text-muted, #64748b);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 650;
    cursor: pointer;
    box-shadow: none;
}

.statement-filter:hover {
    color: var(--text-dark, #0f172a);
    border-color: rgba(15, 23, 42, 0.18);
}

.statement-filter.is-active {
    color: #fff;
    background: var(--primary-color, #296ff9);
    border-color: var(--primary-color, #296ff9);
}

.statement-filter:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(41, 111, 249, 0.35);
}

.statement-feed {
    display: grid;
    gap: 0.7rem;
}

.statement-feed[hidden] {
    display: none !important;
}

.statement-month {
    display: grid;
    gap: 0.3rem;
    margin: 0;
    padding: 0;
}

.statement-month__label {
    margin: 0;
    padding: 0 0.15rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.01em;
    line-height: 1.2;
}

.statement-group {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    background: #fff;
    overflow: hidden;
}

.statement-row {
    margin: 0;
    padding: 0;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.statement-row:first-child {
    border-top: none;
}

.statement-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    padding: 0.7rem 0.95rem;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-align: start;
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: background-color 0.12s ease;
}

a.statement-item,
button.statement-item {
    text-decoration: none;
}

.statement-item:hover {
    background: #f8fafc;
}

.statement-item:focus-visible {
    outline: none;
    background: #eff6ff;
    box-shadow: inset 0 0 0 2px rgba(41, 111, 249, 0.35);
}

.statement-item.is-open {
    background: #f8fafc;
}

.statement-item__icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.82rem;
}

.statement-item.is-in .statement-item__icon {
    background: #dcfce7;
    color: #15803d;
}

.statement-item.is-out .statement-item__icon {
    background: #fee2e2;
    color: #b91c1c;
}

.statement-item__body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.12rem;
}

.statement-item__title {
    margin: 0;
    font-size: 0.94rem;
    font-weight: 700;
    color: var(--text-dark, #0f172a);
    line-height: 1.25;
    text-align: start;
    word-break: break-word;
}

.statement-item__sub {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.15rem 0.4rem;
    margin: 0;
    font-size: 0.74rem;
    color: #94a3b8;
    line-height: 1.25;
}

.statement-item__time {
    unicode-bidi: isolate;
}

.statement-item__via {
    color: #64748b;
}

.statement-item__via-value {
    color: #475569;
    font-weight: 650;
    unicode-bidi: isolate;
}

.statement-item__amount {
    flex: 0 0 auto;
    align-self: center;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.02rem;
    text-align: end;
    white-space: nowrap;
    unicode-bidi: isolate;
}

.statement-item__amount-value {
    font-size: 0.98rem;
    font-weight: 750;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

.statement-item.is-in .statement-item__amount-value {
    color: #15803d;
}

.statement-item.is-out .statement-item__amount-value {
    color: #b91c1c;
}

.statement-item__amount-unit {
    font-size: 0.66rem;
    font-weight: 650;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: end;
}

.statement-item__chev {
    flex: 0 0 auto;
    align-self: center;
    color: #cbd5e1;
    font-size: 0.72rem;
    transition: transform 0.15s ease, color 0.15s ease;
}

.statement-item.is-open .statement-item__chev {
    transform: rotate(180deg);
    color: var(--primary-color, #296ff9);
}

.statement-details {
    display: none;
    padding: 0.85rem 1rem 1rem;
    padding-inline-start: 3.9rem;
}

.statement-row.is-open .statement-details {
    display: block;
}

.statement-details__panel {
    display: grid;
    gap: 0.7rem;
    padding: 1.05rem 1.05rem 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: #f8fafc;
}

.statement-details__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}

.statement-details__cell {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.3rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    background: #fff;
    min-width: 0;
    text-align: start;
}

.statement-details__cell-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 650;
    color: #94a3b8;
    line-height: 1.2;
}

.statement-details__cell-value {
    display: block;
    font-size: 0.84rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    word-break: break-word;
    unicode-bidi: isolate;
    text-align: start;
}

.statement-details__actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.15rem;
}

.statement-details__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 0.9rem;
    border: 1px solid rgba(41, 111, 249, 0.22);
    border-radius: 10px;
    background: #eff6ff;
    color: var(--primary-color, #296ff9);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}

.statement-details__link:hover {
    background: #dbeafe;
}

.statement-details__link:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(41, 111, 249, 0.35);
}

.statement-more {
    display: block;
    width: 100%;
    margin-top: 0.45rem;
    padding: 0.7rem 1rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    background: #fff;
    color: var(--text-dark, #0f172a);
    font: inherit;
    font-weight: 650;
    cursor: pointer;
    box-shadow: none;
}

.statement-more:hover {
    border-color: rgba(41, 111, 249, 0.35);
    color: var(--primary-color, #296ff9);
}

.statement-more:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(41, 111, 249, 0.35);
}

.statement-more[hidden] {
    display: none !important;
}

.statement-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.55rem;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(185, 28, 28, 0.22);
    border-radius: 12px;
    background: #fff;
    color: #b91c1c;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: none;
}

.statement-download:hover {
    background: #fef2f2;
    border-color: rgba(185, 28, 28, 0.35);
}

.statement-download:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.28);
}

.statement-download:disabled {
    opacity: 0.65;
    cursor: wait;
}

.statement-download[hidden] {
    display: none !important;
}

/* Off-screen capture sheet for PDF */
.statement-pdf-capture {
    position: fixed;
    left: 0;
    top: 0;
    width: 794px;
    max-width: 794px;
    opacity: 0.01;
    pointer-events: none;
    z-index: -1;
}

.statement-pdf-sheet {
    box-sizing: border-box;
    width: 794px;
    padding: 36px 40px 40px;
    background: #fff;
    color: #0f172a;
    font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", Arial, sans-serif;
    direction: inherit;
}

.statement-pdf-sheet__brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
    padding-bottom: 0.85rem;
    border-bottom: 2px solid #296ff9;
}

.statement-pdf-sheet__title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
}

.statement-pdf-sheet__meta {
    margin: 0.2rem 0 0;
    font-size: 12px;
    color: #64748b;
}

.statement-pdf-sheet__brand-name {
    font-size: 18px;
    font-weight: 800;
    color: #296ff9;
}

.statement-pdf-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 0 0 1.1rem;
}

.statement-pdf-summary__card {
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}

.statement-pdf-summary__label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 4px;
}

.statement-pdf-summary__value {
    display: block;
    font-size: 16px;
    font-weight: 800;
    unicode-bidi: isolate;
}

.statement-pdf-summary__value.is-in { color: #15803d; }
.statement-pdf-summary__value.is-out { color: #b91c1c; }

.statement-pdf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.statement-pdf-table th,
.statement-pdf-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e2e8f0;
    text-align: start;
    vertical-align: top;
}

.statement-pdf-table th {
    font-size: 11px;
    font-weight: 750;
    color: #64748b;
    background: #f8fafc;
}

.statement-pdf-table__amount {
    white-space: nowrap;
    font-weight: 800;
    unicode-bidi: isolate;
    text-align: end !important;
}

.statement-pdf-table__amount.is-in { color: #15803d; }
.statement-pdf-table__amount.is-out { color: #b91c1c; }

.statement-pdf-table__sub {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    color: #94a3b8;
}

.statement-pdf-foot {
    margin-top: 1.25rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
    font-size: 11px;
    color: #94a3b8;
}

@media (max-width: 720px) {
    .statement-summary {
        grid-template-columns: 1fr;
    }

    .statement-details {
        padding: 0.75rem 0.85rem 0.9rem;
        padding-inline-start: 0.85rem;
    }

    .statement-details__panel {
        padding: 1rem 0.9rem;
        gap: 0.65rem;
    }

    .statement-details__grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .statement-details__cell {
        padding: 0.7rem 0.8rem;
    }
}

@media (max-width: 640px) {
    .statement-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .statement-filters {
        width: 100%;
    }

    .statement-date {
        width: 100%;
        min-width: 0;
    }

    .statement-filter {
        flex: 1 1 auto;
        text-align: center;
        justify-content: center;
    }

    .statement-item {
        padding: 0.75rem 0.8rem;
        gap: 0.6rem;
    }

    .statement-item__title {
        font-size: 0.9rem;
    }

    .statement-item__amount-value {
        font-size: 0.92rem;
    }
}
