/* ==========================================================
   FynorCoin User Pages
   Black / Red / Gold — Bootstrap-compatible
   ========================================================== */

.fynor-user-page {
    min-height: calc(100vh - 150px);
    color: var(--fynor-text);
}

.fynor-page-heading {
    position: relative;
    display: flex;
    margin-bottom: 26px;
    padding: 25px 27px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    overflow: hidden;
    border: 1px solid var(--fynor-border);
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(225, 6, 0, .11), rgba(245, 197, 24, .04)),
        var(--fynor-surface);
    box-shadow: var(--fynor-shadow-soft);
}

.fynor-page-heading::after {
    position: absolute;
    top: -70px;
    right: -50px;
    width: 180px;
    height: 180px;
    border: 1px solid rgba(245, 197, 24, .13);
    border-radius: 50%;
    content: "";
}

.fynor-page-heading__content,
.fynor-page-heading__icon {
    position: relative;
    z-index: 1;
}

.fynor-page-heading__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
    color: var(--fynor-gold);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.fynor-page-heading__eyebrow::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--fynor-red);
    box-shadow: 0 0 12px rgba(225, 6, 0, .85);
    content: "";
}

.fynor-page-heading h1,
.fynor-page-heading h2 {
    margin: 0;
    color: var(--fynor-white);
    font-size: clamp(1.7rem, 4vw, 2.45rem);
    font-weight: 800;
    letter-spacing: -.04em;
    line-height: 1.14;
}

.fynor-page-heading p {
    max-width: 700px;
    margin: 9px 0 0;
    color: var(--fynor-muted);
    font-size: .88rem;
    line-height: 1.7;
}

.fynor-page-heading__icon {
    display: grid;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    place-items: center;
    border: 1px solid rgba(245, 197, 24, .26);
    border-radius: 16px;
    background: rgba(245, 197, 24, .075);
    color: var(--fynor-gold);
    font-size: 1.35rem;
}

.fynor-panel {
    overflow: hidden;
    border: 1px solid var(--fynor-border);
    border-radius: 18px;
    background: var(--fynor-surface);
    box-shadow: var(--fynor-shadow-soft);
}

.fynor-panel + .fynor-panel {
    margin-top: 24px;
}

.fynor-panel__header {
    display: flex;
    min-height: 70px;
    padding: 20px 24px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--fynor-border);
    background:
        linear-gradient(135deg, rgba(225, 6, 0, .07), rgba(245, 197, 24, .025)),
        var(--fynor-surface-2);
}

.fynor-panel__header h3,
.fynor-panel__header h4 {
    margin: 0;
    color: var(--fynor-white);
    font-size: 1.1rem;
    font-weight: 750;
}

.fynor-panel__body {
    padding: 25px;
}

.fynor-panel__body--compact {
    padding: 0;
}

.fynor-muted {
    color: var(--fynor-muted) !important;
}

.fynor-gold {
    color: var(--fynor-gold) !important;
}

.fynor-red {
    color: var(--fynor-red) !important;
}

.fynor-success {
    color: var(--fynor-success) !important;
}

/* Stats */
.fynor-stat-card {
    position: relative;
    height: 100%;
    min-height: 150px;
    overflow: hidden;
    padding: 23px;
    border: 1px solid var(--fynor-border);
    border-radius: 17px;
    background: var(--fynor-surface);
    box-shadow: var(--fynor-shadow-soft);
    transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.fynor-stat-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 197, 24, .36);
    box-shadow: var(--fynor-shadow);
}

.fynor-stat-card::before {
    position: absolute;
    top: 0;
    left: 22px;
    width: 56px;
    height: 3px;
    border-radius: 0 0 8px 8px;
    background: linear-gradient(90deg, var(--fynor-red), var(--fynor-gold));
    content: "";
}

.fynor-stat-card__label {
    display: block;
    max-width: calc(100% - 60px);
    color: var(--fynor-muted);
    font-size: .75rem;
    font-weight: 650;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.fynor-stat-card__value {
    margin: 16px 0 0;
    color: var(--fynor-white);
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    font-weight: 800;
    letter-spacing: -.025em;
    line-height: 1.15;
    word-break: break-word;
}

.fynor-stat-card__icon {
    position: absolute;
    top: 21px;
    right: 21px;
    display: grid;
    width: 45px;
    height: 45px;
    place-items: center;
    border: 1px solid rgba(245, 197, 24, .24);
    border-radius: 13px;
    background: rgba(245, 197, 24, .07);
    color: var(--fynor-gold);
}

.fynor-stat-card__link {
    position: absolute;
    inset: 0;
    z-index: 2;
}

/* Search/filter */
.fynor-filter-panel {
    margin-bottom: 22px;
    padding: 17px;
    border: 1px solid var(--fynor-border);
    border-radius: 15px;
    background: var(--fynor-surface);
}

.fynor-filter-form {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.fynor-filter-form .form-control,
.fynor-filter-form .form-select {
    width: auto;
    min-width: 185px;
}

/* Forms */
.fynor-form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--fynor-white);
    font-size: .8rem;
    font-weight: 650;
}

.fynor-input,
.fynor-select,
.fynor-textarea,
.fynor-user-page .form-control,
.fynor-user-page .form-select {
    width: 100%;
    border: 1px solid var(--fynor-border) !important;
    border-radius: 12px !important;
    outline: 0;
    background: #0c0c0c !important;
    color: var(--fynor-white) !important;
    box-shadow: none !important;
}

.fynor-input,
.fynor-select,
.fynor-user-page input.form-control,
.fynor-user-page select.form-select {
    min-height: 49px;
    padding: 11px 14px;
}

.fynor-textarea,
.fynor-user-page textarea.form-control {
    min-height: 130px;
    padding: 14px;
    resize: vertical;
}

.fynor-input:focus,
.fynor-select:focus,
.fynor-textarea:focus,
.fynor-user-page .form-control:focus,
.fynor-user-page .form-select:focus {
    border-color: var(--fynor-gold) !important;
    box-shadow: 0 0 0 3px rgba(245, 197, 24, .08) !important;
}

.fynor-user-page input[type="file"].form-control {
    padding: 10px;
}

.fynor-user-page input[type="file"]::file-selector-button {
    margin-right: 12px;
    padding: 8px 12px;
    border: 0;
    border-radius: 9px;
    background: var(--fynor-gold);
    color: var(--fynor-black);
    font-weight: 700;
}

.fynor-field-help {
    display: block;
    margin-top: 7px;
    color: var(--fynor-muted);
    font-size: .72rem;
    line-height: 1.55;
}

/* Table */
.fynor-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--fynor-border);
    border-radius: 17px;
    background: var(--fynor-surface);
    box-shadow: var(--fynor-shadow-soft);
}

.fynor-data-table {
    width: 100%;
    min-width: 820px;
    margin: 0;
    border-collapse: collapse;
}

.fynor-data-table th,
.fynor-data-table td {
    padding: 15px 17px;
    border-bottom: 1px solid var(--fynor-border);
    background: transparent;
    color: var(--fynor-muted);
    font-size: .82rem;
    vertical-align: middle;
}

.fynor-data-table th {
    background: var(--fynor-surface-2);
    color: var(--fynor-white);
    font-size: .7rem;
    font-weight: 750;
    letter-spacing: .055em;
    text-transform: uppercase;
    white-space: nowrap;
}

.fynor-data-table td strong,
.fynor-data-table td a {
    color: var(--fynor-white);
}

.fynor-data-table tr:last-child td {
    border-bottom: 0;
}

.fynor-empty-row {
    padding: 45px 20px !important;
    color: var(--fynor-muted) !important;
    text-align: center;
}

/* Badges */
.fynor-badge {
    display: inline-flex;
    min-height: 27px;
    padding: 5px 10px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: .67rem;
    font-weight: 750;
    text-transform: uppercase;
}

.fynor-badge--success {
    border-color: rgba(34, 197, 94, .25);
    background: rgba(34, 197, 94, .11);
    color: #6ee7a0;
}

.fynor-badge--warning {
    border-color: rgba(245, 158, 11, .25);
    background: rgba(245, 158, 11, .11);
    color: #fbbf24;
}

.fynor-badge--danger {
    border-color: rgba(239, 68, 68, .25);
    background: rgba(239, 68, 68, .11);
    color: #f87171;
}

.fynor-badge--gold {
    border-color: rgba(245, 197, 24, .25);
    background: rgba(245, 197, 24, .09);
    color: var(--fynor-gold);
}

/* Alerts */
.fynor-alert {
    display: flex;
    margin-bottom: 18px;
    padding: 15px 17px;
    align-items: flex-start;
    gap: 11px;
    border: 1px solid var(--fynor-border);
    border-radius: 13px;
    background: var(--fynor-surface-2);
    color: var(--fynor-muted);
}

.fynor-alert--success {
    border-color: rgba(34, 197, 94, .24);
    background: rgba(34, 197, 94, .07);
}

.fynor-alert--danger {
    border-color: rgba(239, 68, 68, .24);
    background: rgba(239, 68, 68, .07);
}

.fynor-alert--gold {
    border-color: rgba(245, 197, 24, .22);
    background: rgba(245, 197, 24, .055);
}

.fynor-alert i {
    margin-top: 3px;
    color: var(--fynor-gold);
}

/* 2FA */
.fynor-security-steps {
    display: grid;
    margin: 22px 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.fynor-security-step {
    padding: 18px;
    border: 1px solid var(--fynor-border);
    border-radius: 14px;
    background: var(--fynor-surface-2);
}

.fynor-security-step span {
    display: grid;
    width: 34px;
    height: 34px;
    margin-bottom: 13px;
    place-items: center;
    border-radius: 50%;
    background: var(--fynor-gold);
    color: var(--fynor-black);
    font-weight: 800;
}

.fynor-security-step h5 {
    margin: 0 0 7px;
    color: var(--fynor-white);
    font-size: .95rem;
}

.fynor-security-step p {
    margin: 0;
    color: var(--fynor-muted);
    font-size: .78rem;
    line-height: 1.6;
}

.fynor-qr-box {
    display: inline-flex;
    margin: 8px 0 20px;
    padding: 14px;
    border: 1px solid rgba(245, 197, 24, .26);
    border-radius: 16px;
    background: #fff;
}

.fynor-qr-box img {
    width: 190px;
    height: 190px;
    object-fit: contain;
}

/* Referral */
.fynor-referral-link {
    display: flex;
    margin: 24px 0;
    gap: 10px;
}

.fynor-referral-link input {
    flex: 1;
}

.fynor-referral-tree,
.fynor-referral-tree ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.fynor-referral-tree .single-child {
    position: relative;
    padding: 7px 9px;
    border-radius: 10px;
}

.fynor-referral-tree .single-child + .single-child {
    margin-top: 10px;
}

.fynor-referral-tree .single-child > p {
    display: inline-flex;
    margin: 0;
    padding: 8px 12px;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--fynor-border);
    border-radius: 12px;
    background: var(--fynor-surface-2);
}

.fynor-referral-tree .single-child img {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border: 2px solid var(--fynor-gold);
    border-radius: 50%;
    object-fit: cover;
}

.fynor-referral-tree .single-child span {
    color: var(--fynor-white);
    font-size: .8rem;
}

.fynor-referral-tree .sub-child-list {
    position: relative;
    padding: 10px 0 0 36px;
}

.fynor-referral-tree .sub-child-list::before {
    position: absolute;
    top: 0;
    bottom: 18px;
    left: 18px;
    width: 1px;
    background: rgba(245, 197, 24, .23);
    content: "";
}

.fynor-referral-tree .sub-child-list > .single-child::before {
    position: absolute;
    top: 29px;
    left: -18px;
    width: 28px;
    height: 1px;
    background: rgba(245, 197, 24, .23);
    content: "";
}

/* Profile */
.fynor-profile-photo {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--fynor-border);
    border-radius: 18px;
    background: var(--fynor-surface-2);
}

.fynor-profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fynor-profile-upload {
    display: grid;
    gap: 12px;
}

/* Transfer */
.fynor-info-grid {
    display: grid;
    margin-bottom: 22px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.fynor-info-chip {
    padding: 15px;
    border: 1px solid var(--fynor-border);
    border-radius: 13px;
    background: var(--fynor-surface-2);
}

.fynor-info-chip small {
    display: block;
    margin-bottom: 5px;
    color: var(--fynor-muted);
}

.fynor-info-chip strong {
    color: var(--fynor-white);
}

/* Public dynamic page */
.fynor-public-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 8% 15%, rgba(225, 6, 0, .09), transparent 30%),
        radial-gradient(circle at 92% 85%, rgba(245, 197, 24, .06), transparent 28%),
        var(--fynor-black);
}

.fynor-public-hero {
    position: relative;
    display: flex;
    min-height: 330px;
    padding: 145px 0 70px;
    align-items: center;
    overflow: hidden;
    isolation: isolate;
    background-position: center;
    background-size: cover;
}

.fynor-public-hero::before {
    position: absolute;
    z-index: -2;
    inset: 0;
    background: linear-gradient(90deg, rgba(10,10,10,.99), rgba(10,10,10,.87), rgba(10,10,10,.65));
    content: "";
}

.fynor-public-hero::after {
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        radial-gradient(circle at 80% 35%, rgba(225,6,0,.18), transparent 30%),
        linear-gradient(180deg, transparent 50%, var(--fynor-black));
    content: "";
}

.fynor-public-hero h1 {
    margin: 0;
    color: var(--fynor-white);
    font-size: clamp(2.4rem, 6vw, 4.3rem);
    font-weight: 800;
    letter-spacing: -.05em;
}

.fynor-public-breadcrumb {
    display: flex;
    margin: 22px 0 0;
    padding: 0;
    flex-wrap: wrap;
    gap: 9px;
    list-style: none;
}

.fynor-public-breadcrumb li {
    color: var(--fynor-muted);
    font-size: .8rem;
}

.fynor-public-breadcrumb li:not(:last-child)::after {
    margin-left: 9px;
    color: #555;
    content: "/";
}

.fynor-public-breadcrumb a {
    color: var(--fynor-white);
}

/* Language selector */
.fynor-language-switcher {
    display: inline-flex;
    min-height: 42px;
    padding: 5px 9px;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--fynor-border);
    border-radius: 11px;
    background: var(--fynor-surface-2);
}

.fynor-language-switcher i {
    color: var(--fynor-gold);
}

.fynor-language-switcher select {
    max-width: 145px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--fynor-white);
    font-size: .76rem;
    font-weight: 650;
}

.fynor-language-switcher option {
    background: var(--fynor-surface);
    color: var(--fynor-white);
}

.fynor-auth-language {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 50;
}

/* Modal */
.fynor-user-modal .modal-content {
    overflow: hidden;
    border: 1px solid var(--fynor-border);
    border-radius: 17px;
    background: var(--fynor-surface);
    color: var(--fynor-white);
    box-shadow: 0 30px 85px rgba(0, 0, 0, .7);
}

.fynor-user-modal .modal-header,
.fynor-user-modal .modal-footer {
    padding: 20px 23px;
    border-color: var(--fynor-border);
}

.fynor-user-modal .modal-header {
    background: var(--fynor-surface-2);
}

.fynor-user-modal .modal-body {
    padding: 24px;
}

@media (max-width: 991px) {
    .fynor-info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .fynor-page-heading {
        padding: 21px;
        align-items: flex-start;
    }

    .fynor-page-heading__icon {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
        font-size: 1.05rem;
    }

    .fynor-panel__header,
    .fynor-panel__body {
        padding: 20px;
    }

    .fynor-filter-form {
        display: grid;
        grid-template-columns: 1fr;
    }

    .fynor-filter-form .form-control,
    .fynor-filter-form .form-select,
    .fynor-filter-form .cmn-btn {
        width: 100%;
        min-width: 0;
    }

    .fynor-security-steps {
        grid-template-columns: 1fr;
    }

    .fynor-referral-link {
        flex-direction: column;
    }

    .fynor-public-hero {
        min-height: 280px;
        padding: 115px 0 55px;
    }
}

@media (max-width: 480px) {
    .fynor-page-heading__icon {
        display: none;
    }

    .fynor-auth-language {
        top: 12px;
        right: 12px;
    }

    .fynor-language-switcher select {
        max-width: 112px;
    }
}
