/* Modern profile dashboard for account.php. Scoped to #profile-section. */

#profile-section.profile-dashboard {
    --profile-brand: #078b54;
    --profile-brand-dark: #05683f;
    --profile-brand-soft: #edf9f3;
    --profile-ink: #17241d;
    --profile-muted: #738179;
    --profile-border: #e1e9e4;
    --profile-surface: #ffffff;
    --profile-soft: #f7faf8;
    --profile-shadow: 0 12px 30px rgba(26, 61, 43, .07);
    color: var(--profile-ink);
}

#profile-section .profile-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
    padding: 22px 24px;
    border-radius: 20px;
    color: #fff;
    background:
        radial-gradient(circle at 88% 18%, rgba(255,255,255,.17), transparent 28%),
        linear-gradient(135deg, #06794a 0%, #0b9259 58%, #13a667 100%);
    box-shadow: 0 16px 38px rgba(7, 139, 84, .16);
}

#profile-section .profile-hero-icon {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: rgba(255,255,255,.14);
    font-size: 23px;
}

#profile-section .profile-hero-copy {
    min-width: 0;
    flex: 1;
}

#profile-section .profile-eyebrow {
    display: block;
    margin-bottom: 3px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .8px;
    text-transform: uppercase;
    opacity: .82;
}

#profile-section .profile-hero h4 {
    margin: 0 0 4px;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -.4px;
}

#profile-section .profile-hero p {
    margin: 0;
    max-width: 630px;
    color: rgba(255,255,255,.82);
    font-size: 13px;
    line-height: 1.55;
}

#profile-section .profile-hero-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 11px;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    background: rgba(255,255,255,.11);
    font-size: 10px;
    font-weight: 750;
    white-space: nowrap;
}

#profile-section .profile-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr);
    gap: 18px;
    align-items: start;
}

#profile-section .profile-main-column,
#profile-section .profile-side-column {
    min-width: 0;
    display: grid;
    gap: 18px;
}

#profile-section .profile-panel {
    padding: 21px;
    border: 1px solid var(--profile-border);
    border-radius: 18px;
    background: var(--profile-surface);
    box-shadow: var(--profile-shadow);
}

#profile-section .profile-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 17px;
}

#profile-section .profile-panel-heading h5 {
    margin: 2px 0 0;
    color: var(--profile-ink);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.2px;
}

#profile-section .profile-panel-kicker {
    color: var(--profile-brand);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .75px;
    text-transform: uppercase;
}

#profile-section .profile-panel-icon {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: var(--profile-brand);
    background: var(--profile-brand-soft);
}

#profile-section .profile-panel-icon-referral {
    color: #2563eb;
    background: #eef4ff;
}

#profile-section .profile-panel-icon-locked {
    color: #7a6d5b;
    background: #f4f1ec;
}

#profile-section .profile-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

#profile-section .profile-field-wide {
    grid-column: span 2;
}

#profile-section .profile-field .form-label {
    margin-bottom: 7px;
    color: #425249;
    font-size: 11px;
    font-weight: 750;
}

#profile-section .profile-required {
    color: #d14444;
}

#profile-section .profile-input-wrap {
    position: relative;
}

#profile-section .profile-input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 18px;
    color: #8a9991;
    transform: translateY(-50%);
    pointer-events: none;
}

#profile-section .profile-input-wrap .form-control,
#profile-section .profile-input-wrap .form-select {
    min-height: 46px;
    padding-left: 40px;
    border: 1px solid #dce6e0;
    border-radius: 12px;
    color: #24352c;
    background-color: #fff;
    box-shadow: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

#profile-section .profile-input-wrap .form-control:focus,
#profile-section .profile-input-wrap .form-select:focus {
    border-color: #66b691;
    box-shadow: 0 0 0 3px rgba(7, 139, 84, .09);
}

#profile-section .profile-select-wrap .form-select {
    padding-right: 38px;
}

#profile-section .profile-readonly-list {
    display: grid;
    gap: 10px;
}

#profile-section .profile-readonly-item {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 11px;
    align-items: start;
    padding: 12px;
    border: 1px solid #e9eeeb;
    border-radius: 13px;
    background: #fafcfb;
}

#profile-section .profile-readonly-icon {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #718078;
    background: #eef3f0;
}

#profile-section .profile-readonly-content {
    min-width: 0;
}

#profile-section .profile-readonly-content label {
    display: block;
    margin-bottom: 4px;
    color: #59685f;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .35px;
}

#profile-section .profile-readonly-content .form-control {
    min-height: 34px;
    padding: 2px 0;
    border: 0;
    color: #26382f;
    background: transparent;
    box-shadow: none;
    font-size: 13px;
    font-weight: 700;
}

#profile-section .profile-readonly-content span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #909c95;
    font-size: 9px;
}

#profile-section .profile-referral-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 150px;
    gap: 18px;
    align-items: center;
    padding: 17px;
    border: 1px solid #dfe8e3;
    border-radius: 15px;
    background: linear-gradient(135deg, #fbfdfc, #f4faf7);
}

#profile-section .profile-referral-label {
    display: block;
    margin-bottom: 6px;
    color: #708078;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .45px;
    text-transform: uppercase;
}

#profile-section .profile-id-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

#profile-section .profile-id-row .form-control {
    min-height: 42px;
    border: 1px solid #dce6e0;
    border-radius: 11px;
    background: #fff;
    font-size: 13px;
    font-weight: 750;
}

#profile-section .profile-copy-btn,
#profile-section .profile-share-btn,
#profile-section .profile-qr-download,
#profile-section .profile-refresh-btn,
#profile-section .profile-save-btn,
#profile-section .profile-reward-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border-radius: 11px;
    font-weight: 750;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}

#profile-section .profile-copy-btn {
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #d7e3dc;
    color: #53645b;
    background: #fff;
    font-size: 11px;
}

#profile-section .profile-copy-btn:hover {
    border-color: #b9d4c5;
    color: var(--profile-brand);
}

#profile-section .profile-referral-help {
    margin: 9px 0 11px;
    color: #7e8b84;
    font-size: 10px;
    line-height: 1.5;
}

#profile-section .profile-share-btn {
    min-height: 40px;
    padding: 0 13px;
    border: 0;
    color: #fff;
    background: #2563eb;
    font-size: 11px;
    box-shadow: 0 6px 15px rgba(37, 99, 235, .14);
}

#profile-section .profile-share-btn:hover {
    color: #fff;
    background: #1d4ed8;
    transform: translateY(-1px);
}

#profile-section .profile-referral-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #8a9690;
    text-align: center;
    font-size: 9px;
    line-height: 1.4;
}

#profile-section .profile-referral-symbol {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #2563eb;
    background: #eef4ff;
    font-size: 27px;
}

#profile-section .profile-qr-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    margin-top: 14px;
    padding: 16px;
    border: 1px solid #cfe1d8;
    border-radius: 16px;
    background:
        radial-gradient(circle at 92% 10%, rgba(7,139,84,.07), transparent 28%),
        linear-gradient(135deg, #fbfefc, #f3faf6);
    box-shadow: 0 10px 24px rgba(26,61,43,.06);
}

#profile-section .profile-qr-preview {
    overflow: hidden;
    padding: 11px;
    border: 1px solid #d6e5dc;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(23,55,37,.07);
    text-align: center;
}

#profile-section .profile-qr-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: -11px -11px 10px;
    padding: 8px 10px;
    color: #fff;
    background: linear-gradient(135deg, #05683f, #0a9659);
}

#profile-section .profile-qr-logo-wrap {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(255,255,255,.96);
}

#profile-section .profile-qr-logo {
    display: block;
    max-width: 27px;
    max-height: 27px;
    object-fit: contain;
}

#profile-section .profile-qr-brand-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.15;
}

#profile-section .profile-qr-brand-copy strong {
    color: #fff;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: .3px;
}

#profile-section .profile-qr-brand-copy small {
    margin-top: 2px;
    color: rgba(255,255,255,.75);
    font-size: 6px;
    font-weight: 800;
    letter-spacing: .45px;
}

#profile-section .profile-qr-identity {
    margin-bottom: 10px;
    text-align: center;
}

#profile-section .profile-qr-identity small,
#profile-section .profile-qr-identity strong,
#profile-section .profile-qr-identity span {
    display: block;
}

#profile-section .profile-qr-identity small {
    color: var(--profile-brand);
    font-size: 7px;
    font-weight: 850;
    letter-spacing: .5px;
    text-transform: uppercase;
}

#profile-section .profile-qr-identity strong {
    margin-top: 2px;
    color: #21352a;
    font-size: 11px;
    font-weight: 850;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

#profile-section .profile-qr-identity span {
    margin-top: 4px;
    color: #708078;
    font-size: 7px;
}

#profile-section .profile-qr-identity b {
    color: #087849;
    font-weight: 800;
}

#profile-section .profile-qr-image-wrap {
    position: relative;
    display: inline-grid;
    place-items: center;
    padding: 11px;
    border: 1px solid #dbe8e1;
    border-radius: 12px;
    background: #fff;
}

#profile-section .profile-qr-image-wrap .account-referral-qr {
    display: block;
    width: 140px;
    height: 140px;
    border: 0;
    border-radius: 3px;
    image-rendering: pixelated;
}

#profile-section .profile-qr-corner {
    position: absolute;
    width: 18px;
    height: 18px;
    border-color: var(--profile-brand);
    border-style: solid;
    pointer-events: none;
}

#profile-section .profile-qr-corner-tl {
    top: 4px;
    left: 4px;
    border-width: 2px 0 0 2px;
    border-radius: 5px 0 0;
}

#profile-section .profile-qr-corner-tr {
    top: 4px;
    right: 4px;
    border-width: 2px 2px 0 0;
    border-radius: 0 5px 0 0;
}

#profile-section .profile-qr-corner-bl {
    bottom: 4px;
    left: 4px;
    border-width: 0 0 2px 2px;
    border-radius: 0 0 0 5px;
}

#profile-section .profile-qr-corner-br {
    right: 4px;
    bottom: 4px;
    border-width: 0 2px 2px 0;
    border-radius: 0 0 5px;
}

#profile-section .profile-qr-preview-note {
    display: block;
    margin-top: 8px;
    color: #7b8981;
    font-size: 7px;
    font-weight: 700;
}

#profile-section .profile-qr-preview-note i {
    color: var(--profile-brand);
}

#profile-section .profile-qr-copy h6 {
    margin: 2px 0 5px;
    color: #24382d;
    font-size: 14px;
    font-weight: 850;
}

#profile-section .profile-qr-copy p {
    margin: 0 0 9px;
    color: #7b8981;
    font-size: 10px;
    line-height: 1.5;
}

#profile-section .profile-qr-feature-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-bottom: 10px;
}

#profile-section .profile-qr-feature-list span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #66776e;
    font-size: 8px;
    font-weight: 700;
}

#profile-section .profile-qr-feature-list i {
    color: var(--profile-brand);
}

#profile-section .profile-qr-download {
    min-height: 39px;
    padding: 0 13px;
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--profile-brand-dark), var(--profile-brand));
    font-size: 10px;
    box-shadow: 0 7px 16px rgba(7,139,84,.15);
}

#profile-section .profile-qr-download:hover {
    color: #fff;
    background: linear-gradient(135deg, #045d39, #087d4c);
    transform: translateY(-1px);
}

#profile-section .profile-qr-download:disabled {
    opacity: .68;
    transform: none;
    box-shadow: none;
}

#profile-section .profile-system-panel {
    background: linear-gradient(180deg, #fff, #fbfcfb);
}

#profile-section .profile-reward-panel {
    overflow: hidden;
    position: relative;
    color: #fff;
    border: 0;
    background:
        radial-gradient(circle at 90% 10%, rgba(255,255,255,.15), transparent 30%),
        linear-gradient(135deg, #057447 0%, #0b9259 58%, #12a86b 100%);
    box-shadow: 0 14px 30px rgba(7, 139, 84, .16);
}

#profile-section .profile-reward-panel::after {
    content: '';
    position: absolute;
    right: -35px;
    bottom: -42px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 25px solid rgba(255,255,255,.07);
    pointer-events: none;
}

#profile-section .profile-reward-top,
#profile-section .profile-wallet-primary,
#profile-section .profile-wallet-mini-grid,
#profile-section .profile-wallet-money,
#profile-section .profile-reward-action {
    position: relative;
    z-index: 1;
}

#profile-section .profile-reward-top {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 13px;
}

#profile-section .profile-reward-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    border-radius: 12px;
    background: rgba(255,255,255,.14);
}

#profile-section .profile-reward-top span,
#profile-section .profile-reward-top strong {
    display: block;
}

#profile-section .profile-reward-top span {
    color: rgba(255,255,255,.75);
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .45px;
}

#profile-section .profile-reward-top strong {
    margin-top: 1px;
    font-size: 13px;
}

#profile-section .profile-wallet-primary {
    padding: 12px 0 13px;
    border-top: 1px solid rgba(255,255,255,.12);
    border-bottom: 1px solid rgba(255,255,255,.12);
}

#profile-section .profile-wallet-primary-label {
    display: block;
    margin-bottom: 4px;
    color: rgba(255,255,255,.72);
    font-size: 9px;
    font-weight: 750;
    letter-spacing: .45px;
    text-transform: uppercase;
}

#profile-section .profile-wallet-primary-value {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

#profile-section .profile-wallet-primary-value strong {
    color: #fff;
    font-size: 28px;
    line-height: 1;
    font-weight: 850;
    letter-spacing: -.55px;
}

#profile-section .profile-wallet-primary-value span {
    color: rgba(255,255,255,.78);
    font-size: 10px;
    font-weight: 700;
}

#profile-section .profile-wallet-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin-top: 11px;
}

#profile-section .profile-wallet-mini {
    min-width: 0;
    padding: 9px 8px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 10px;
    background: rgba(255,255,255,.08);
}

#profile-section .profile-wallet-mini span,
#profile-section .profile-wallet-mini strong {
    display: block;
}

#profile-section .profile-wallet-mini span {
    min-height: 24px;
    color: rgba(255,255,255,.70);
    font-size: 8px;
    line-height: 1.25;
}

#profile-section .profile-wallet-mini strong {
    margin-top: 3px;
    color: #fff;
    font-size: 12px;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

#profile-section .profile-wallet-money {
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 9px;
    padding: 9px 10px;
    border-radius: 10px;
    color: #32443a;
    background: rgba(255,255,255,.92);
}

#profile-section .profile-wallet-money span,
#profile-section .profile-wallet-money small {
    display: block;
}

#profile-section .profile-wallet-money span {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .35px;
}

#profile-section .profile-wallet-money small {
    margin-top: 2px;
    color: #7c8982;
    font-size: 8px;
    line-height: 1.3;
}

#profile-section .profile-wallet-money strong {
    flex: 0 0 auto;
    color: #078b54;
    font-size: 13px;
    white-space: nowrap;
}

#profile-section .profile-reward-action {
    width: 100%;
    min-height: 40px;
    margin-top: 12px;
    border: 1px solid rgba(255,255,255,.24);
    color: #fff;
    background: rgba(255,255,255,.12);
    font-size: 11px;
}

#profile-section .profile-reward-action:hover {
    color: #fff;
    background: rgba(255,255,255,.18);
}

#profile-section .profile-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 18px;
    padding: 15px 17px;
    border: 1px solid var(--profile-border);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(26, 61, 43, .05);
}

#profile-section .profile-action-note {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #7a8780;
    font-size: 10px;
}

#profile-section .profile-action-note i {
    color: var(--profile-brand);
}

#profile-section .profile-action-buttons {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
}

#profile-section .profile-refresh-btn,
#profile-section .profile-save-btn {
    min-height: 42px;
    padding: 0 14px;
    font-size: 11px;
}

#profile-section .profile-refresh-btn {
    border: 1px solid #d4e1da;
    color: #526159;
    background: #fff;
}

#profile-section .profile-refresh-btn:hover {
    color: var(--profile-brand);
    border-color: #b8d2c4;
}

#profile-section .profile-save-btn {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, #078b54, #10a265);
    box-shadow: 0 7px 17px rgba(7, 139, 84, .16);
}

#profile-section .profile-save-btn:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(7, 139, 84, .22);
}

@media (max-width: 991.98px) {
    #profile-section .profile-layout {
        grid-template-columns: 1fr;
    }

    #profile-section .profile-side-column {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    #profile-section .profile-qr-card {
        grid-template-columns: 1fr;
    }

    #profile-section .profile-qr-preview {
        width: min(210px, 100%);
        margin: 0 auto;
    }

    #profile-section .profile-qr-download {
        width: 100%;
    }


    #profile-section .profile-hero {
        align-items: flex-start;
        gap: 12px;
        padding: 18px 16px;
        border-radius: 17px;
    }

    #profile-section .profile-hero-icon {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
        border-radius: 13px;
        font-size: 19px;
    }

    #profile-section .profile-hero h4 {
        font-size: 20px;
    }

    #profile-section .profile-hero p {
        font-size: 11px;
    }

    #profile-section .profile-hero-badge {
        display: none;
    }

    #profile-section .profile-panel {
        padding: 16px;
        border-radius: 16px;
    }

    #profile-section .profile-field-grid {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    #profile-section .profile-field-wide {
        grid-column: auto;
    }

    #profile-section .profile-side-column {
        grid-template-columns: 1fr;
    }

    #profile-section .profile-referral-card {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    #profile-section .profile-referral-visual {
        flex-direction: row;
        text-align: left;
    }

    #profile-section .profile-referral-symbol {
        width: 46px;
        height: 46px;
        flex: 0 0 46px;
        border-radius: 12px;
        font-size: 20px;
    }

    #profile-section .profile-id-row {
        grid-template-columns: 1fr auto;
    }

    #profile-section .profile-copy-btn span {
        display: none;
    }

    #profile-section .profile-copy-btn {
        width: 42px;
        padding: 0;
    }

    #profile-section .profile-share-btn {
        width: 100%;
    }

    #profile-section .profile-qr-card {
        grid-template-columns: 96px 1fr;
        gap: 12px;
    }

    #profile-section .profile-qr-image-wrap .account-referral-qr {
        width: 80px;
        height: 80px;
    }

    #profile-section .profile-form-actions {
        flex-direction: column;
        align-items: stretch;
        padding: 13px;
    }

    #profile-section .profile-action-note {
        align-items: flex-start;
    }

    #profile-section .profile-action-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    #profile-section .profile-refresh-btn,
    #profile-section .profile-save-btn {
        width: 100%;
    }
}

@media (max-width: 380px) {
    #profile-section .profile-action-buttons {
        grid-template-columns: 1fr;
    }

    #profile-section .profile-qr-card {
        grid-template-columns: 1fr;
    }

    #profile-section .profile-qr-image-wrap {
        width: fit-content;
    }
}

@media (max-width: 600px) {
    #profile-section .profile-wallet-mini-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    #profile-section .profile-wallet-primary-value strong {
        font-size: 25px;
    }

    #profile-section .profile-wallet-money {
        align-items: flex-start;
        flex-direction: column;
    }

    #profile-section .profile-wallet-money strong {
        white-space: normal;
    }
}
