.ea-container {
    box-sizing: border-box;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ea-container *,
.ea-container *::before,
.ea-container *::after {
    box-sizing: border-box;
}

/* --- Admin preview banner --- */

.ea-admin-banner {
    padding: 10px 16px;
    border-radius: 8px;
    background: #2a1f3d;
    border: 1px solid #6c4fa0;
    color: #c4a7e7;
    font-size: 0.875rem;
}

.ea-admin-banner strong {
    color: #e0d0f7;
}

/* --- Pending balance card --- */

.ea-balance-card {
    gap: 16px;
}

.ea-balance-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.ea-balance-label {
    font-size: 0.85rem;
    color: #b0b0b8;
    font-weight: 500;
}

.ea-balance-value {
    display: flex;
    align-items: baseline;
    gap: 6px;
    line-height: 1;
}

.ea-balance-amount {
    font-size: 2.1rem;
    font-weight: 700;
    color: #ffffff;
}

.ea-balance-unit {
    font-size: 0.95rem;
    font-weight: 600;
    color: #b0b0b8;
}

.ea-balance-fx {
    margin: 0;
    font-size: 0.75rem;
    color: #b0b0b8;
}

.ea-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 500;
}

.ea-status--ready {
    color: #a6e3a1;
}

.ea-status--warn {
    color: #fadb6b;
}

.ea-status-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    background-color: currentColor;
    mask-repeat: no-repeat;
    mask-position: center;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    -webkit-mask-position: center;
    -webkit-mask-size: contain;
}

.ea-metrics-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.ea-metric-tile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.ea-metric-label {
    font-size: 0.75rem;
    color: #b0b0b8;
    white-space: nowrap;
}

.ea-metric-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #efeff1;
    white-space: nowrap;
}

/* --- Columns --- */

.ea-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}

.ea-columns--top {
    grid-template-columns: 1.35fr 1fr;
}

/* --- Card --- */

.ea-card {
    min-width: 0;
    background: #1f1f23;
    border: 1px solid #35353b;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ea-card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.ea-card-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ea-card-title {
    margin: 0;
    font-size: 1rem;
    color: #efeff1;
}

.ea-card-desc {
    margin: 0;
    font-size: 0.85rem;
    color: #b0b0b8;
    line-height: 1.5;
}

.ea-card-meta {
    font-size: 0.8rem;
    color: #5ebdff;
    white-space: nowrap;
}

label {
    margin: 0;
}

/* --- Fields --- */

.ea-field-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ea-field-label {
    font-size: 0.9rem;
    color: #efeff1;
    font-weight: 500;
}

.ea-field-error {
    margin: 0;
    font-size: 0.8rem;
    color: #f38ba8;
}

/* --- Network toggle --- */

.ea-network-toggle {
    display: inline-flex;
    align-self: flex-start;
    gap: 8px;
}

[data-network="polygon"] { --network-rgb: 130, 71, 229; }
[data-network="base"]    { --network-rgb: 0, 82, 255; }

.ea-network-name {
    color: rgb(var(--network-rgb));
    font-weight: 600;
}

.ea-network-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid #51515a;
    background: transparent;
    color: #b0b0b8;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    white-space: nowrap;
}

.ea-network-btn:hover {
    color: #efeff1;
    border-color: #6b6b76;
}

.ea-network-btn.selected {
    background: rgba(var(--network-rgb), 0.15);
    border-color: rgb(var(--network-rgb));
    color: #efeff1;
    font-weight: 500;
}

.ea-network-btn.selected:hover {
    border-color: rgb(var(--network-rgb));
}

.ea-network-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    object-fit: contain;
}

/* --- Wallet input --- */

.ea-wallet-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #35353b;
    border-radius: 8px;
    padding: 0 10px;
    background: #0e0e10;
    transition: border-color 0.15s;
}

.ea-wallet-input-row.is-invalid {
    border-color: #f38ba8;
}

.ea-wallet-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 10px 0;
    font-family: monospace;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    color: #efeff1;
    outline: none;
}

/* --- Checkbox --- */

.ea-checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.ea-checkbox-row input[type="checkbox"] {
    margin-top: 2px;
    min-width: 16px;
    width: 16px;
    height: 16px;
    accent-color: #a6e3a1;
    cursor: pointer;
}

.ea-checkbox-label {
    font-size: 0.875rem;
    color: #b0b0b8;
    line-height: 1.55;
}

/* --- Card footer --- */

.ea-card-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ea-save-btn {
    width: 100%;
}

.ea-save-error {
    margin: 0;
    color: #f87171;
    font-size: 0.875rem;
    text-align: center;
    transition: opacity 0.4s;
}

.ea-save-success {
    margin: 0;
    color: #a6e3a1;
    font-size: 0.875rem;
    text-align: center;
    transition: opacity 0.4s;
}

/* --- Tables (earnings + payouts) --- */

.ea-table-wrap {
    overflow-x: auto;
}

.ea-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.ea-table th {
    text-align: left;
    padding: 10px 14px;
    color: #b0b0b8;
    font-weight: 500;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid #35353b;
    white-space: nowrap;
}

.ea-table td {
    padding: 12px 14px;
    color: #efeff1;
    border-bottom: 1px solid #35353b;
}

.ea-empty-row td {
    text-align: center;
    color: #75757d;
    padding: 36px 14px;
    border-bottom: none;
}

.ea-empty-field {
    color: #75757d;
    font-style: italic;
}

.ea-payout-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.ea-payout-status--sent {
    color: #a6e3a1;
}

.ea-payout-status--failed {
    color: #f38ba8;
}

.ea-payout-status--pending {
    color: #fadb6b;
}

.ea-tx-link {
    color: #5ebdff;
    text-decoration: none;
    font-family: monospace;
    font-size: 0.85rem;
}

.ea-tx-link:hover {
    text-decoration: underline;
}

/* --- Pagination --- */

.ea-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.ea-page-btn {
    padding: 6px 16px;
    border-radius: 6px;
    border: 1px solid #35353b;
    background: #0e0e10;
    color: #efeff1;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.ea-page-btn:hover:not(:disabled) {
    background: #2b2c3c;
    border-color: #585b70;
}

.ea-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ea-page-info {
    font-size: 0.875rem;
    color: #b0b0b8;
    white-space: nowrap;
    min-width: 90px;
    text-align: center;
}

/* --- Responsive --- */

@media (max-width: 900px) {
    .ea-columns--top {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .ea-table thead {
        display: none;
    }

    .ea-table,
    .ea-table tbody,
    .ea-table tr,
    .ea-table td {
        display: block;
        width: 100%;
    }

    .ea-table tr {
        padding: 12px 0;
        border-bottom: 1px solid #35353b;
    }

    .ea-table tr:last-child {
        border-bottom: none;
    }

    .ea-table td {
        border-bottom: none;
        padding: 2px 0;
    }

    .ea-table td:first-child {
        font-weight: 600;
        color: #efeff1;
        font-size: 0.95rem;
        margin-bottom: 6px;
    }

    .ea-table td[data-label] {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        font-size: 0.85rem;
    }

    .ea-table td[data-label]::before {
        content: attr(data-label);
        text-transform: uppercase;
        letter-spacing: 0.05em;
        font-size: 0.7rem;
        color: #b0b0b8;
    }

    .ea-empty-row {
        border-bottom: none;
    }

    .ea-empty-row td {
        padding: 24px 0;
    }
}

@media (max-width: 600px) {
    .ea-balance-amount {
        font-size: 1.8rem;
    }

    .ea-card {
        padding: 16px;
    }
}
