/* Player profile / wallet modal */

.nav-action-btn.profile {
    flex: 1;
    max-width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 4px 8px;
    border-radius: 14px;
    background: var(--bg-secondary);
    border: none;
    color: var(--text-primary);
    min-height: 36px;
    box-shadow: -3px 0 10px rgba(0, 0, 0, 0.22), 3px 0 10px rgba(0, 0, 0, 0.22);
    transition: box-shadow 0.2s, transform 0.15s;
}

.nav-action-btn.profile .nav-btn-icon {
    font-size: 1.1rem;
    line-height: 1.1;
}

.nav-action-btn.profile .nav-btn-label {
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--accent-color);
}

.nav-action-btn.profile:hover {
    box-shadow: -4px 0 14px color-mix(in srgb, var(--accent-color) 25%, transparent), 4px 0 14px color-mix(in srgb, var(--accent-color) 25%, transparent);
    transform: translateY(-1px);
    border: 1px solid color-mix(in srgb, var(--accent-color) 45%, transparent);
}

.profile-overlay {
    position: fixed;
    inset: 0;
    /* Above top chrome (10000), app menu (10002), loader (9998), and other overlays */
    z-index: 10100;
    background: var(--overlay-bg);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.profile-overlay[hidden] {
    display: none !important;
}

body.profile-open {
    overflow: hidden;
}

.profile-modal {
    width: 100%;
    max-width: 480px;
    /* Keep the same sheet height on every tab (deposit is the tallest). */
    min-height: min(420px, 72dvh);
    height: min(78dvh, 640px);
    max-height: min(92dvh, 720px);
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: none;
    border-radius: 16px 16px 0 0;
    color: var(--text-primary);
    box-shadow:
        0 -8px 32px rgba(0, 0, 0, 0.35),
        -6px 0 20px rgba(0, 0, 0, 0.18),
        6px 0 20px rgba(0, 0, 0, 0.18);
    color-scheme: dark;
}

html[data-theme="light"] .profile-modal {
    color-scheme: light;
}

@media (min-width: 500px) {
    .profile-overlay {
        align-items: center;
        padding: 12px;
    }
    .profile-modal {
        border-radius: 16px;
        min-height: min(440px, 68dvh);
        height: min(72dvh, 620px);
        max-height: min(90dvh, 680px);
    }
}

.profile-header {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 14px 12px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
    flex-shrink: 0;
    overflow: hidden;
}

.profile-header-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    column-gap: 10px;
    width: 100%;
    min-width: 0;
}

.profile-header-grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    min-width: 0;
}

.profile-header-row--bonus:not(:has(#profile-bonus-block:not([hidden]))) {
    display: none;
}

.profile-header-spacer {
    display: block;
    min-width: 0;
}

.profile-header-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 10px;
    width: 100%;
    min-width: 0;
}

.profile-header-row--title {
    align-items: start;
}

.profile-header-row--title h2 {
    min-width: 0;
}

.profile-header-bonus {
    justify-self: end;
    text-align: right;
}

.profile-header-bonus .profile-wallet-line {
    justify-content: flex-end;
}

.profile-header-bonus-note {
    justify-self: end;
    text-align: right;
    margin: 0;
    max-width: 9rem;
    line-height: 1.2;
    font-size: 0.6rem;
    font-weight: 600;
    color: #fbbf24;
}

html[data-theme="light"] .profile-header-bonus-note {
    color: #b45309;
}

.profile-header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 4px;
    flex-shrink: 0;
    justify-self: end;
    min-width: 0;
    width: auto;
    text-align: right;
}

.profile-toolbar-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 4px;
    flex-shrink: 0;
    justify-self: end;
    min-width: 0;
    width: auto;
    text-align: right;
}

.profile-toolbar {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    flex-shrink: 0;
    width: auto;
}

.profile-toolbar-caption {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    width: auto;
    align-self: flex-end;
}

.profile-toolbar-caption .deposit-help-btn,
.profile-toolbar-caption .deposit-help-btn--compact {
    width: auto;
    margin: 0;
}

.profile-toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary, rgba(0, 0, 0, 0.12));
    color: var(--text-primary);
    font-size: 0.68rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    flex-shrink: 0;
}

.profile-toolbar-btn--icon {
    min-width: 28px;
    padding: 4px 8px;
    font-size: 0.82rem;
}

.profile-toolbar-btn:disabled {
    opacity: 0.45;
    cursor: wait;
}

.profile-header-left,
.profile-header-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

.profile-header-identity {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
    max-width: 100%;
}

.profile-header-identity h2 {
    margin: 0;
    line-height: 1.15;
}

.profile-header-caption {
    display: block;
    margin: 1px 0 0;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--text-secondary);
    opacity: 0.82;
    letter-spacing: 0.01em;
    line-height: 1.15;
}

.profile-header-title-row {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 100%;
}

.profile-header h2 {
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.25;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-header-phone {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    line-height: 1.15;
    flex-shrink: 0;
}

.profile-meta-status {
    text-transform: capitalize;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 8px;
    background: rgba(76, 175, 80, 0.15);
    color: var(--primary-600);
}

.profile-meta-status.suspended,
.profile-meta-status.blocked,
.profile-meta-status.inactive {
    background: rgba(244, 67, 54, 0.15);
    color: var(--error);
}

.profile-header .profile-balance {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent-color);
    line-height: 1.2;
}

.profile-wallet-strip {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 0;
    width: 100%;
    max-width: 100%;
}

.profile-wallet-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
    line-height: 1.3;
}

.profile-wallet-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    min-width: 3rem;
}

.profile-wallet-val {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--accent-color);
}

.profile-wallet-bonus {
    --profile-bonus-color: #fbbf24;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

html[data-theme="light"] .profile-wallet-bonus {
    --profile-bonus-color: #b45309;
}

.profile-wallet-bonus .profile-wallet-val,
.profile-wallet-bonus .profile-wallet-unit,
.profile-wallet-bonus .profile-wallet-note {
    color: var(--profile-bonus-color);
}

.profile-wallet-unit {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.profile-wallet-note {
    margin: 0 0 0 3.5rem;
    font-size: 0.6rem;
    font-weight: 600;
    line-height: 1.2;
}

.profile-bonus-hint {
    margin: 0.25rem 0 0;
    font-size: 0.72rem;
    color: var(--text-muted, rgba(255, 255, 255, 0.65));
    line-height: 1.35;
}

/* Deposit response banner — full API message below wallet */
.profile-deposit-message {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    width: 100%;
    margin-top: 0;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
}

.profile-deposit-message[hidden] {
    display: none !important;
}

.profile-deposit-message.is-success {
    border-color: rgba(76, 175, 80, 0.45);
    background: rgba(76, 175, 80, 0.1);
}

.profile-deposit-message.is-error {
    border-color: rgba(244, 67, 54, 0.45);
    background: rgba(244, 67, 54, 0.08);
}

.profile-deposit-message__text {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--text-primary);
    word-break: break-word;
    white-space: pre-wrap;
    max-height: 5.5em;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.profile-deposit-message.is-success .profile-deposit-message__text {
    color: #86efac;
}

.profile-deposit-message.is-error .profile-deposit-message__text {
    color: #fca5a5;
}

html[data-theme="light"] .profile-deposit-message.is-success .profile-deposit-message__text {
    color: #15803d;
}

html[data-theme="light"] .profile-deposit-message.is-error .profile-deposit-message__text {
    color: #b91c1c;
}

.profile-deposit-message__close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 0.75rem;
    line-height: 1;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

html[data-theme="light"] .profile-deposit-message__close {
    border-color: rgba(0, 0, 0, 0.15);
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-primary);
}

.profile-deposit-message__close:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.profile-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 700;
    font-family: inherit;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
}

.profile-close--toolbar,
.profile-toolbar .profile-close {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    font-size: 0.78rem;
    background: var(--bg-primary, rgba(0, 0, 0, 0.12));
}

.profile-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.profile-header-actions .profile-close:disabled {
    opacity: 0.45;
    cursor: wait;
}

.profile-live-notice {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 4px 8px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(16, 185, 129, 0.08));
    border-bottom: 1px solid rgba(34, 197, 94, 0.25);
    flex-shrink: 0;
}

.profile-live-notice[hidden] {
    display: none !important;
}

.profile-live-notice__text {
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    text-align: center;
}

.profile-tabs-row {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 6px 3px 4px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.profile-tabs-help-slot {
    flex-shrink: 0;
    margin-left: auto;
}

.profile-tabs {
    display: flex;
    gap: 3px;
    flex: 1;
    min-width: 0;
    padding: 0;
    border-bottom: none;
    overflow-x: auto;
    flex-shrink: 1;
    scrollbar-width: none;
}

.profile-tabs::-webkit-scrollbar {
    display: none;
}

.profile-tab {
    flex-shrink: 0;
    padding: 4px 9px;
    border: none;
    border-radius: 16px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.66rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.2;
}

.profile-tab.active {
    background: var(--accent-color);
    color: #fff;
}

.profile-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 14px 16px;
    -webkit-overflow-scrolling: touch;
}

.profile-panel {
    display: none;
    min-height: 100%;
}

.profile-panel.active {
    display: block;
}

.profile-info-grid {
    display: grid;
    gap: 10px;
    font-size: 0.82rem;
}

.profile-info-row {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
}

.profile-form .field {
    margin-bottom: 12px;
}

.profile-form label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.profile-form input,
.profile-form select,
.profile-form textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem;
}

.profile-form textarea {
    min-height: 72px;
    resize: vertical;
}

.profile-form .field-reference textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.45;
    padding: 10px 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.38);
    border-radius: 10px;
    background-color: #2d3259;
    color: #f5f7ff;
    box-shadow: none;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

html[data-theme="light"] .profile-form .field-reference textarea {
    background-color: #ffffff;
    color: #1a202c;
    border-color: rgba(0, 0, 0, 0.22);
}

.profile-form .field-reference textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.85;
}

.profile-form .field-reference textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.profile-hint {
    font-size: 0.72rem;
    color: var(--text-secondary);
    line-height: 1.45;
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.profile-submit {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: var(--accent-color);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: inherit;
}

.profile-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.profile-form-actions {
    display: flex;
    gap: 8px;
    align-items: stretch;
    margin-top: 4px;
}

.profile-deposit-actions .profile-submit {
    flex: 1;
    margin-top: 0;
}

.profile-deposit-actions .profile-clear-btn {
    flex: 0 0 auto;
    min-width: 72px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.78rem;
    cursor: pointer;
    font-family: inherit;
    line-height: 1.2;
}

.profile-deposit-actions .profile-clear-btn:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background: var(--bg-secondary);
}

.profile-deposit-actions .profile-clear-btn:active {
    transform: translateY(1px);
}

.profile-deposit-actions .profile-clear-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.profile-clear-btn {
    flex: 0 0 auto;
    min-width: 88px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.86rem;
    cursor: pointer;
    font-family: inherit;
}

.profile-clear-btn:hover {
    border-color: color-mix(in srgb, var(--accent-color) 45%, var(--border-color));
    color: var(--accent-color);
}

.profile-clear-btn:active {
    transform: translateY(1px);
}

.profile-clear-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.profile-tx-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-tx-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -4px;
    padding: 0 4px;
}

.profile-tx-table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    font-size: 0.68rem;
    line-height: 1.25;
}

.profile-tx-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 6px 5px;
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    text-align: left;
    color: var(--text-secondary);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.profile-tx-table tbody td {
    padding: 7px 5px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    color: var(--text-primary);
}

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

.profile-tx-table tbody tr:active {
    background: var(--bg-secondary);
}

.profile-tx-type {
    font-weight: 700;
    white-space: nowrap;
}

.profile-tx-amt {
    font-weight: 800;
    white-space: nowrap;
    font-size: 0.66rem;
}

.profile-tx-amt.plus {
    color: var(--accent-color);
}

.profile-tx-amt.minus {
    color: var(--error);
}

.profile-tx-date {
    white-space: nowrap;
    color: var(--text-secondary);
    font-size: 0.62rem;
}

.profile-tx-ref {
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.62rem;
    color: var(--text-secondary);
}

.profile-tx-col-ref {
    max-width: 72px;
}

.profile-tx-muted {
    color: var(--text-secondary);
}

.profile-tx-status {
    display: inline-block;
    padding: 2px 5px;
    border-radius: 6px;
    font-size: 0.56rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.profile-tx-status.pending {
    background: rgba(255, 193, 7, 0.2);
    color: var(--secondary-600);
}

.profile-tx-status.approved {
    background: rgba(76, 175, 80, 0.2);
    color: var(--primary-600);
}

.profile-tx-status.rejected {
    background: rgba(244, 67, 54, 0.2);
    color: var(--error);
}

@media (max-width: 360px) {
    .profile-tx-table {
        font-size: 0.62rem;
    }

    .profile-tx-table .profile-tx-col-ref {
        display: none;
    }
}

.profile-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-secondary);
    font-size: 0.82rem;
}

.deposit-pay-compact {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-secondary);
}

.deposit-provider-field {
    flex: 0 0 auto;
}

.deposit-provider-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.deposit-provider-select {
    width: auto;
    min-width: 104px;
    max-width: 118px;
    margin-bottom: 0;
    padding: 6px 30px 6px 10px;
    border-radius: 8px;
    border: 1.5px solid rgba(255, 255, 255, 0.38);
    background-color: #2d3259;
    color: #f5f7ff;
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: none;
}

.deposit-provider-chevron {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    pointer-events: none;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #f5f7ff;
}

html[data-theme="light"] .deposit-provider-select {
    background-color: #ffffff;
    color: #1a202c;
    border-color: rgba(0, 0, 0, 0.22);
}

html[data-theme="light"] .deposit-provider-chevron {
    border-top-color: #1a202c;
}

.deposit-provider-select option {
    background-color: #2d3259;
    color: #f5f7ff;
}

html[data-theme="light"] .deposit-provider-select option {
    background-color: #ffffff;
    color: #1a202c;
}

.deposit-pay-compact .field-compact,
.withdraw-pay-compact .field-compact {
    margin-bottom: 8px;
}

.deposit-pay-compact .field-compact:last-child,
.withdraw-pay-compact .field-compact:last-child {
    margin-bottom: 0;
}

.deposit-pay-compact .field-compact label,
.withdraw-pay-compact .field-compact label,
#profile-panel-deposit .field-reference label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

#profile-panel-deposit .field-reference label {
    margin-bottom: 6px;
}

#profile-deposit-form .field {
    margin-bottom: 10px;
}

#profile-deposit-form .deposit-pay-compact .field-compact {
    margin-bottom: 0;
    flex: 0 0 auto;
}

.deposit-pay-compact .deposit-account-card {
    flex: 1;
    min-width: 0;
    margin-left: auto;
    display: flex;
    justify-content: flex-end;
}

.withdraw-pay-compact .field-compact input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: #2d3259;
    color: #f5f7ff;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
}

.withdraw-pay-compact .field-compact input::placeholder {
    color: rgba(245, 247, 255, 0.45);
}

html[data-theme="light"] .withdraw-pay-compact .field-compact input {
    background-color: #ffffff;
    color: #1a202c;
}

html[data-theme="light"] .withdraw-pay-compact .field-compact input::placeholder {
    color: rgba(26, 32, 44, 0.45);
}

.withdraw-pay-compact .field-compact input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Withdrawal form — stacked fields, placeholders only */
#profile-withdraw-form .field {
    margin-bottom: 10px;
}

#profile-withdraw-form .deposit-provider-wrap {
    width: 100%;
}

#profile-withdraw-form .withdraw-provider-select {
    width: 100%;
    min-width: 0;
    max-width: none;
}

#profile-withdraw-form input[type="text"],
#profile-withdraw-form input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1.5px solid rgba(255, 255, 255, 0.38);
    background-color: #2d3259;
    color: #f5f7ff;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
}

#profile-withdraw-form input::placeholder {
    color: rgba(245, 247, 255, 0.45);
}

html[data-theme="light"] #profile-withdraw-form input[type="text"],
html[data-theme="light"] #profile-withdraw-form input[type="number"] {
    background-color: #ffffff;
    color: #1a202c;
}

html[data-theme="light"] #profile-withdraw-form input::placeholder {
    color: rgba(26, 32, 44, 0.45);
}

#profile-withdraw-form input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.deposit-provider-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Visible borders — deposit & withdraw inputs */
#profile-deposit-form .deposit-provider-select,
#profile-deposit-form input[type="number"],
#profile-deposit-form .field-reference textarea,
#profile-withdraw-form .deposit-provider-select,
#profile-withdraw-form input[type="text"],
#profile-withdraw-form input[type="number"] {
    border: 1.5px solid rgba(255, 255, 255, 0.38);
    box-sizing: border-box;
}

#profile-deposit-form input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    background-color: #2d3259;
    color: #f5f7ff;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
}

#profile-deposit-form input[type="number"]::placeholder {
    color: rgba(245, 247, 255, 0.45);
}

html[data-theme="light"] #profile-deposit-form .deposit-provider-select,
html[data-theme="light"] #profile-deposit-form input[type="number"],
html[data-theme="light"] #profile-deposit-form .field-reference textarea,
html[data-theme="light"] #profile-withdraw-form .deposit-provider-select,
html[data-theme="light"] #profile-withdraw-form input[type="text"],
html[data-theme="light"] #profile-withdraw-form input[type="number"] {
    border-color: rgba(0, 0, 0, 0.22);
}

html[data-theme="light"] #profile-deposit-form input[type="number"] {
    background-color: #ffffff;
    color: #1a202c;
}

html[data-theme="light"] #profile-deposit-form input[type="number"]::placeholder {
    color: rgba(26, 32, 44, 0.45);
}

#profile-deposit-form .field-reference textarea:focus,
#profile-deposit-form input[type="number"]:focus,
#profile-withdraw-form input:focus,
#profile-withdraw-form .deposit-provider-select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.profile-deposit-unavailable {
    margin-bottom: 10px;
}

.deposit-account-card {
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    min-width: 0;
}

.deposit-account-card .profile-empty {
    padding: 0;
    font-size: 0.68rem;
    line-height: 1.3;
    text-align: right;
    width: 100%;
}

.deposit-account-card h4 {
    display: none;
}

.deposit-account-paybox {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    padding: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    width: 100%;
    max-width: 100%;
}

.deposit-account-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    text-align: right;
}

.deposit-account-primary {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    word-break: break-all;
    line-height: 1.2;
    color: var(--text-primary);
}

.deposit-account-holder {
    font-size: 0.58rem;
    font-weight: 500;
    color: var(--text-secondary);
    line-height: 1.2;
    text-transform: capitalize;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.deposit-copy-btn {
    flex-shrink: 0;
    padding: 4px 7px;
    border-radius: 6px;
    border: 1px solid var(--accent-color);
    background: transparent;
    color: var(--accent-color);
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}

.deposit-copy-btn:active {
    transform: scale(0.97);
}

.deposit-copy-btn.copied {
    border-color: var(--accent-color);
    color: var(--accent-color);
}

.ethiomark-bottom-navbar.has-profile {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
}

.ethiomark-bottom-navbar.has-profile .nav-action-btn.profile {
    justify-self: start;
}

.ethiomark-bottom-navbar.has-profile .nav-action-btn.start {
    justify-self: center;
    flex: none;
    width: auto;
    min-width: 120px;
}

.ethiomark-bottom-navbar.has-profile .nav-action-btn.prize {
    justify-self: end;
}

.support-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
}

.support-link-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.15));
    border-radius: 10px;
    background: var(--bg-secondary, #1e293b);
    color: var(--text-primary, #f8fafc);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: background 0.15s ease;
}

.support-link-btn:hover {
    background: var(--bg-primary, #0f172a);
}

.support-rules-wrap {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
}

.support-rules-title {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
}

.support-rules-text {
    margin: 0;
    white-space: pre-wrap;
    font-family: inherit;
    font-size: 0.78rem;
    line-height: 1.45;
    color: var(--text-secondary, #94a3b8);
    max-height: 180px;
    overflow: auto;
}

/* Deposit help — red CTA + portrait video modal */
.deposit-help-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 0.75rem;
    padding: 11px 14px;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 45%, #b91c1c 100%);
    box-shadow:
        0 4px 14px rgba(220, 38, 38, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    animation: deposit-help-btn-pulse 2.4s ease-in-out infinite;
}

.deposit-help-btn:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.5);
}

.deposit-help-btn:active {
    transform: translateY(0);
}

.deposit-help-btn--compact {
    width: auto;
    margin: 0;
    padding: 4px 8px;
    border-radius: 14px;
    font-size: 0.62rem;
    font-weight: 700;
    gap: 4px;
    white-space: nowrap;
    animation: none;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
}

.deposit-help-btn--compact:hover {
    transform: none;
    box-shadow: 0 3px 10px rgba(220, 38, 38, 0.42);
}

.deposit-help-btn--compact .deposit-help-btn__icon {
    width: 16px;
    height: 16px;
    font-size: 0.48rem;
}

.deposit-help-btn--compact .deposit-help-btn__text {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0;
}

.deposit-amount-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(9.5rem, auto);
    gap: 8px;
    align-items: stretch;
}

.deposit-amount-row .field-amount {
    margin: 0;
    min-width: 0;
}

.deposit-amount-row .field-amount input {
    height: 100%;
    min-height: 42px;
}

.deposit-help-slot-inline {
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
}

.deposit-help-btn--inline {
    width: auto;
    min-width: 9.5rem;
    margin: 0;
    padding: 0 12px;
    min-height: 42px;
    height: 100%;
    border-radius: 10px;
    font-size: 0.64rem;
    font-weight: 700;
    gap: 5px;
    white-space: nowrap;
    animation: none;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.35);
    align-self: stretch;
    flex-shrink: 0;
}

.deposit-help-btn--inline .deposit-help-btn__icon {
    width: 16px;
    height: 16px;
    font-size: 0.48rem;
}

.deposit-help-btn--inline .deposit-help-btn__text {
    font-size: 0.66rem;
    letter-spacing: 0;
}

.deposit-help-btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    font-size: 0.58rem;
}

@keyframes deposit-help-btn-pulse {
    0%, 100% { box-shadow: 0 4px 14px rgba(220, 38, 38, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
    50% { box-shadow: 0 4px 22px rgba(239, 68, 68, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
}

.deposit-help-steps {
    margin: 0.5rem 0 0;
    padding-left: 1.15rem;
    font-size: 0.74rem;
    line-height: 1.5;
    color: var(--text-secondary, #94a3b8);
}

.deposit-help-steps li + li {
    margin-top: 0.35rem;
}

.support-deposit-help {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
}

.support-deposit-help .deposit-help-btn {
    margin-top: 0.75rem;
    margin-bottom: 0;
}

body.deposit-help-open {
    overflow: hidden;
}

.deposit-help-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10250;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0;
    background: rgba(0, 0, 0, 0.92);
}

.deposit-help-modal-overlay[hidden] {
    display: none !important;
}

.deposit-help-modal {
    width: min(100%, 440px);
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: #000;
    border-radius: 0;
    color: var(--text-primary);
    box-shadow: none;
    overflow: hidden;
}

.deposit-help-modal--video .deposit-help-modal__header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: max(10px, env(safe-area-inset-top)) 12px 10px;
    border-bottom: none;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0) 100%);
}

.deposit-help-modal--video .deposit-help-modal__header h2 {
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.deposit-help-modal--video .deposit-help-modal__close {
    color: #fff;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 50%;
    width: 32px;
    height: 32px;
}

.deposit-help-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-shrink: 0;
}

.deposit-help-modal__header h2 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
}

.deposit-help-modal__close {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
}

.deposit-help-modal__body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.deposit-help-modal__video-stage {
    flex: 1;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.deposit-help-video-wrap {
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: unset;
    border-radius: 0;
    overflow: hidden;
    background: #000;
    box-shadow: none;
}

.deposit-help-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.deposit-help-modal__steps {
    flex-shrink: 0;
    max-height: 26dvh;
    overflow-y: auto;
    padding: 10px 14px max(10px, env(safe-area-inset-bottom));
    background: var(--card-bg, #1e293b);
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
    -webkit-overflow-scrolling: touch;
}

.deposit-help-modal__steps .deposit-help-steps {
    margin-top: 0;
    font-size: 0.72rem;
}

.deposit-help-modal__footer {
    flex-shrink: 0;
    padding: 8px 14px max(10px, env(safe-area-inset-bottom));
    background: var(--card-bg, #1e293b);
}

.deposit-help-modal__done {
    width: 100%;
    padding: 11px 14px;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
}

@media (min-width: 500px) {
    .deposit-help-modal-overlay {
        align-items: center;
        padding: 12px;
        background: rgba(0, 0, 0, 0.88);
    }

    .deposit-help-modal {
        height: min(96dvh, 900px);
        max-height: min(96dvh, 900px);
        border-radius: 16px;
        box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    }

    .deposit-help-modal--video .deposit-help-modal__header {
        position: relative;
        background: var(--bg-secondary, rgba(15, 23, 42, 0.6));
        border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
        padding: 12px 14px;
    }

    .deposit-help-modal--video .deposit-help-modal__header h2 {
        color: var(--text-primary);
        text-shadow: none;
    }

    .deposit-help-modal--video .deposit-help-modal__close {
        color: var(--text-secondary);
        background: transparent;
        border-radius: 0;
        width: auto;
        height: auto;
    }
}

/* ===== Player referral tab ===== */
.referral-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.referral-panel--compact {
    gap: 6px;
}

.referral-stats--compact {
    position: relative;
    padding-top: 2px;
    gap: 4px;
}

.referral-rules-wrap {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 6;
}

.referral-rules-wrap--inline {
    position: relative;
    top: auto;
    right: auto;
    flex-shrink: 0;
    z-index: 8;
}

.referral-rules-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.62rem;
    font-weight: 800;
    font-family: inherit;
    line-height: 1;
    cursor: pointer;
}

.referral-rules-btn:hover,
.referral-rules-wrap.is-open .referral-rules-btn {
    color: var(--accent-color);
    border-color: rgba(59, 130, 246, 0.45);
}

.referral-rules-btn--card {
    width: auto;
    min-width: 0;
    height: auto;
    min-height: 0;
    padding: 6px 9px;
    border-radius: 8px;
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.referral-rules-wrap--inline .referral-rules-tip {
    top: calc(100% + 4px);
    right: 0;
    left: auto;
    z-index: 20;
}

.referral-card--compact {
    padding: 8px 10px;
    border-radius: 8px;
    overflow: visible;
}

.referral-card--compact .referral-card__row {
    gap: 6px;
    position: relative;
    overflow: visible;
}

.referral-rules-tip {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: min(300px, 88vw);
    max-height: min(70vh, 420px);
    overflow-y: auto;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary, #1a1f35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    text-align: left;
}

.referral-rules-tip[hidden] {
    display: none !important;
}

.referral-rules-wrap.is-open .referral-rules-tip {
    display: block;
}

.referral-rules-tip__title {
    display: block;
    margin: 0 0 8px;
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--text-primary);
}

.referral-rules-tip__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.referral-rules-tip__section + .referral-rules-tip__section {
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.referral-rules-tip__heading {
    margin: 0 0 6px;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text-primary);
    opacity: 0.9;
}

.referral-rules-tip__rows {
    margin: 0;
    display: grid;
    gap: 4px;
}

.referral-rules-tip__row {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 8px;
    align-items: start;
    font-size: 0.62rem;
    line-height: 1.4;
}

.referral-rules-tip__row dt {
    margin: 0;
    font-weight: 600;
    color: var(--text-secondary);
}

.referral-rules-tip__row dd {
    margin: 0;
    text-align: right;
    color: var(--text-primary);
    word-break: break-word;
}

.referral-rules-tip__steps,
.referral-rules-tip__bullets {
    margin: 0;
    padding: 0 0 0 16px;
    font-size: 0.62rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

.referral-rules-tip__steps li + li,
.referral-rules-tip__bullets li + li {
    margin-top: 4px;
}

html[data-theme="light"] .referral-rules-tip {
    background: #fff;
}

.referral-stats--compact .referral-stat {
    padding: 6px 4px;
    border-radius: 8px;
}

.referral-stats--compact .referral-stat__value {
    font-size: 0.88rem;
}

.referral-stats--compact .referral-stat__label {
    margin-top: 2px;
    font-size: 0.58rem;
}

.referral-card--compact .referral-code {
    padding: 6px 8px;
    font-size: 0.78rem;
    border-radius: 8px;
}

.referral-card--compact .referral-copy-btn {
    padding: 6px 10px;
    font-size: 0.68rem;
    border-radius: 8px;
}

.referral-copy-btn--primary {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: #fff;
}

.referral-share-btn {
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--accent-color);
    background: var(--accent-color);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
}

.referral-share-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.referral-share-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.referral-share-menu[hidden] {
    display: none !important;
}

.referral-share-menu__btn {
    flex: 1 1 auto;
    min-width: 0;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.62rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}

.referral-share-menu__btn[data-referral-share-action="telegram"] {
    border-color: rgba(59, 130, 246, 0.45);
    color: #60a5fa;
}

.referral-share-menu__btn[data-referral-share-action="whatsapp"] {
    border-color: rgba(34, 197, 94, 0.45);
    color: #4ade80;
}

html[data-theme="light"] .referral-share-menu__btn[data-referral-share-action="telegram"] {
    color: #2563eb;
}

html[data-theme="light"] .referral-share-menu__btn[data-referral-share-action="whatsapp"] {
    color: #15803d;
}

.referral-copy-btn--primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.referral-invites {
    margin-top: 2px;
}

.referral-invites__title {
    display: block;
    margin-bottom: 4px;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}

.referral-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.referral-stat {
    text-align: center;
    padding: 10px 6px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.referral-stat__value {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: var(--accent-color);
    line-height: 1.2;
}

.referral-stat__label {
    display: block;
    margin-top: 4px;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}

.referral-card {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.referral-card__label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.referral-card__row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.referral-code {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px dashed var(--accent-color);
    background: var(--bg-primary, rgba(0, 0, 0, 0.15));
    font-family: ui-monospace, 'Cascadia Code', 'Consolas', monospace;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--text-primary);
    text-align: center;
}

.referral-link-text {
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 10px;
    background: var(--bg-primary, rgba(0, 0, 0, 0.12));
    border: 1px solid var(--border-color);
    font-size: 0.68rem;
    line-height: 1.4;
    word-break: break-all;
    color: var(--text-secondary);
}

.referral-copy-btn {
    flex-shrink: 0;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--accent-color);
    background: transparent;
    color: var(--accent-color);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
}

.referral-copy-btn:active {
    transform: scale(0.97);
}

.referral-copy-btn.copied {
    background: rgba(59, 130, 246, 0.12);
}

.referral-note {
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.68rem;
    line-height: 1.45;
    color: var(--text-secondary);
    background: rgba(234, 179, 8, 0.08);
    border: 1px solid rgba(234, 179, 8, 0.25);
}

.referral-note--paused {
    margin-bottom: 10px;
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(148, 163, 184, 0.28);
}

.referral-steps {
    margin: 0;
    padding: 12px 14px 12px 28px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    font-size: 0.72rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.referral-steps li {
    margin-bottom: 6px;
}

.referral-steps li:last-child {
    margin-bottom: 0;
}

@media (max-width: 360px) {
    .referral-stats {
        grid-template-columns: 1fr;
    }

    .referral-card__row {
        flex-direction: column;
        align-items: stretch;
    }

    .referral-copy-btn {
        width: 100%;
    }
}

.referral-list-empty {
    margin: 4px 0 0;
    font-size: 0.68rem;
    line-height: 1.35;
    color: var(--text-secondary);
    text-align: center;
}

.referral-invites {
    margin-top: 4px;
}

.referral-invites__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.referral-invites__title {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-secondary);
}

.referral-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary, rgba(0, 0, 0, 0.08));
}

.referral-table {
    width: 100%;
    min-width: 320px;
    border-collapse: collapse;
    font-size: 0.62rem;
}

.referral-table th,
.referral-table td {
    padding: 6px 8px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

.referral-table th {
    font-size: 0.58rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    white-space: nowrap;
}

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

.referral-table__row {
    cursor: pointer;
}

.referral-table__row:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.referral-table__phone {
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.referral-table__cell-ok {
    color: #4ade80;
    font-weight: 600;
    white-space: nowrap;
}

html[data-theme="light"] .referral-table__cell-ok {
    color: #15803d;
}

.referral-table__cell-pending {
    color: #fbbf24;
    font-weight: 600;
    white-space: nowrap;
}

html[data-theme="light"] .referral-table__cell-pending {
    color: #a16207;
}

.referral-table__cell-no {
    color: var(--text-secondary);
}

.referral-table__detail td {
    padding: 0;
    background: var(--bg-secondary);
}

.referral-table__detail-inner {
    padding: 6px 8px 8px;
    font-size: 0.6rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

.referral-table__detail-inner strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.65rem;
    margin-bottom: 2px;
}

.referral-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
}

.referral-pagination__btn {
    padding: 4px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.62rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}

.referral-pagination__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.referral-pagination__info {
    font-size: 0.6rem;
    color: var(--text-secondary);
}
