* {
    scrollbar-width: thin;
    scrollbar-color: rgba(207, 211, 216, .32) rgba(4, 5, 6, .42);
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: rgba(4, 5, 6, .42);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
    background: rgba(207, 211, 216, .26);
    border: 2px solid rgba(4, 5, 6, .42);
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(207, 211, 216, .42);
}
* { box-sizing: border-box; }

html { min-height: 100%; overflow-x: hidden; }

body.profile-page {
    overflow-x: hidden;
    min-height: 100vh;
    margin: 0;
    font-family: Arial, "Helvetica Neue", sans-serif;
    letter-spacing: 0;
    color: var(--auth-text);
    background:
        radial-gradient(circle at 18% 18%, rgba(207, 211, 216, .09), transparent 28%),
        radial-gradient(circle at 86% 12%, rgba(156, 169, 181, .06), transparent 26%),
        linear-gradient(135deg, #050505 0%, #101113 52%, #08090a 100%);
}

.profile-shell {
    width: calc(100% - 16px);
    margin: 0 auto;
    padding: 8px 0 12px;
}

.profile-hero,
.profile-panel {
    background: var(--auth-panel);
    border: 1px solid var(--auth-panel-line);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .38);
    backdrop-filter: blur(16px);
}

.profile-hero {
    border-radius: 14px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.profile-identity { display: flex; align-items: center; gap: 8px; min-width: 0; }

.profile-avatar {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #fff 0%, #d3d3d3 58%, #1c1c1c 100%);
    color: #0b0a08;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 1rem;
    flex: 0 0 auto;
    overflow: hidden;
}

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

.eyebrow {
    margin: 0 0 6px;
    color: var(--auth-muted);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

body.profile-page .eyebrow {
    display: none;
}

/* Hero alignment repair */
body.profile-page .profile-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 96px;
    padding: 16px;
}

body.profile-page .profile-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

body.profile-page .profile-identity > div:last-child {
    display: grid;
    gap: 0;
    min-width: 0;
}

html.lk-skeleton-active .main-content {
    position: relative;
    min-height: 100vh;
}

html.lk-skeleton-active .main-content > *:not(.lk-page-skeleton) {
    opacity: 0;
    pointer-events: none;
}

.lk-page-skeleton {
    position: absolute;
    inset: 0;
    z-index: 60;
    display: grid;
    gap: 8px;
    width: calc(100% - 16px);
    margin: 0 auto;
    padding: 8px 0 20px;
}

.lk-page-skeleton[hidden] {
    display: none;
}

.lk-skeleton-block,
.lk-skeleton-card,
.lk-skeleton-line,
.lk-skeleton-pill,
.lk-skeleton-media {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(207, 211, 216, .12);
    background: rgba(4, 5, 6, .38);
}

.lk-skeleton-block::after,
.lk-skeleton-card::after,
.lk-skeleton-line::after,
.lk-skeleton-pill::after,
.lk-skeleton-media::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(207, 211, 216, .13), transparent);
    animation: lk-skeleton-shimmer 1.15s infinite;
}

.lk-skeleton-hero {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 210px;
    gap: 12px;
    align-items: center;
    min-height: 118px;
    border-radius: 14px;
    padding: 16px;
}

.lk-skeleton-avatar {
    width: 64px;
    height: 64px;
    border-radius: 16px;
}

.lk-skeleton-stack {
    display: grid;
    gap: 10px;
}

.lk-skeleton-line {
    height: 14px;
    border-radius: 999px;
}

.lk-skeleton-line.is-title {
    width: min(360px, 78%);
    height: 28px;
}

.lk-skeleton-line.is-text {
    width: min(620px, 92%);
}

.lk-skeleton-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.lk-skeleton-pill {
    width: 92px;
    height: 42px;
    border-radius: 12px;
}

.lk-skeleton-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(90px, 150px)) 120px;
    gap: 8px;
    min-height: 64px;
    border-radius: 14px;
    padding: 10px;
}

.lk-skeleton-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 8px;
}

.lk-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 8px;
}

.lk-skeleton-card {
    display: grid;
    gap: 10px;
    min-height: 280px;
    border-radius: 14px;
    padding: 10px;
}

.lk-skeleton-card:first-child {
    grid-column: 1 / -1;
    min-height: 360px;
}

.lk-skeleton-media {
    min-height: 150px;
    border-radius: 12px;
}

.lk-skeleton-card:first-child .lk-skeleton-media {
    min-height: 210px;
}

.lk-skeleton-side {
    display: grid;
    gap: 8px;
    align-content: start;
}

.lk-skeleton-side .lk-skeleton-card {
    min-height: 170px;
}

html:not(.lk-skeleton-active) .lk-page-skeleton {
    display: none;
}

.main-content .inline-state.is-loading-skeleton {
    position: relative;
    min-height: 180px;
    overflow: hidden;
    border: 1px solid rgba(207, 211, 216, .12);
    border-radius: 14px;
    background:
        linear-gradient(90deg, rgba(207, 211, 216, .08) 18%, transparent 18% 100%) 14px 14px / 160px 18px no-repeat,
        linear-gradient(90deg, rgba(207, 211, 216, .06) 18%, transparent 18% 100%) 14px 48px / 260px 14px no-repeat,
        linear-gradient(90deg, rgba(207, 211, 216, .06) 18%, transparent 18% 100%) 14px 76px / 220px 14px no-repeat,
        rgba(4, 5, 6, .38);
    color: transparent;
}

.main-content .inline-state.is-loading-skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(207, 211, 216, .13), transparent);
    animation: lk-skeleton-shimmer 1.15s infinite;
}

@keyframes lk-skeleton-shimmer {
    100% {
        transform: translateX(100%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .lk-skeleton-block::after,
    .lk-skeleton-card::after,
    .lk-skeleton-line::after,
    .lk-skeleton-pill::after,
    .lk-skeleton-media::after {
        animation: none;
    }

    .main-content .inline-state.is-loading-skeleton::after {
        animation: none;
    }
}

@media (max-width: 1100px) {
    .lk-skeleton-content {
        grid-template-columns: 1fr;
    }

    .lk-skeleton-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .lk-skeleton-hero {
        grid-template-columns: 56px minmax(0, 1fr);
    }

    .lk-skeleton-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .lk-skeleton-toolbar,
    .lk-skeleton-side,
    .lk-skeleton-grid {
        grid-template-columns: 1fr;
    }

    .lk-skeleton-card:first-child {
        min-height: 300px;
    }
}

body.profile-page .profile-identity h1 {
    margin: 0;
    overflow-wrap: anywhere;
}

body.profile-page .profile-avatar {
    display: grid;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    place-items: center;
    border-radius: 14px;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(24px, 2.5vw, 34px); line-height: 1.05; }
h2 { margin-bottom: 0; font-size: 18px; line-height: 1.2; }
.profile-subtitle { max-width: 520px; margin-bottom: 0; color: var(--auth-muted); font-size: 13px; line-height: 1.35; }

.profile-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.primary-action,
.ghost-action {
    min-height: 44px;
    border-radius: 10px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.primary-action { background: var(--auth-accent); color: #0b0a08; }
.primary-action:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(207, 211, 216, .18); }
.ghost-action { color: var(--auth-text); border: 1px solid var(--auth-panel-line); background: rgba(207, 211, 216, .06); }
.ghost-action:hover { background: rgba(207, 211, 216, .1); }

.profile-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 8px;
}

.profile-panel { border-radius: 14px; padding: 12px; }
.profile-shell > .profile-panel { margin-top: 8px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.panel-heading.small { margin-bottom: 8px; }


.data-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}
.data-list.compact { grid-template-columns: 1fr; }
.data-list div,
.contact-item {
    min-width: 0;
    border: 1px solid rgba(207, 211, 216, .12);
    background: rgba(4, 5, 6, .38);
    border-radius: 10px;
    padding: 8px;
}
dt, .contact-item span {
    display: block;
    color: var(--auth-muted);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 4px;
}
dd { margin: 0; color: var(--auth-text); font-size: 13px; overflow-wrap: anywhere; }
.contact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.contact-item strong { display: block; font-size: 13px; overflow-wrap: anywhere; }


@media (max-width: 980px) {
    .profile-hero { align-items: flex-start; flex-direction: column; }
    .profile-actions { justify-content: flex-start; }
    .profile-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 767px) {
    .profile-shell { width: calc(100% - 16px); padding-top: 72px; }
    .profile-hero, .profile-panel { padding: 14px; }
    .profile-identity { align-items: flex-start; }
    .profile-avatar { width: 52px; height: 52px; border-radius: 14px; font-size: 1.1rem; }
    h1 { font-size: 28px; }
    .data-list { grid-template-columns: 1fr; }
    .primary-action, .ghost-action { width: 100%; white-space: normal; text-align: center; }
}

.finance-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
    align-items: start;
    gap: 8px;
    margin-top: 8px;
}

.deposit-panel {
    align-self: start;
}

.icon-action {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--auth-panel-line);
    background: rgba(207, 211, 216, .06);
    color: var(--auth-text);
    cursor: pointer;
}

.operations-list {
    display: grid;
    gap: 8px;
}

.operation-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    border: 1px solid rgba(207, 211, 216, .12);
    background: rgba(4, 5, 6, .38);
    border-radius: 10px;
    padding: 8px;
}

.operation-item div:last-child {
    text-align: right;
}

.operation-item span,
.deposit-form span,
.inline-state,
.form-message {
    display: block;
    color: var(--auth-muted);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.operation-item strong {
    display: block;
    font-size: 13px;
    color: var(--auth-text);
}

.operation-success strong:last-child {
    color: var(--auth-ok);
}

.balance-value {
    color: var(--auth-accent);
    font-size: 18px;
    white-space: nowrap;
}

.deposit-form {
    display: grid;
    gap: 8px;
}

.deposit-form label {
    display: grid;
    gap: 4px;
}

.deposit-form input,
.payment-method,
.deposit-form select {
    width: 100%;
    height: 40px;
    border: 1px solid var(--auth-panel-line);
    border-radius: 10px;
    background: var(--auth-field);
    color: var(--auth-text);
    padding: 0 10px;
    font: inherit;
    outline: none;
}

.deposit-form input:focus,
.payment-method,
.deposit-form select:focus {
    border-color: rgba(207, 211, 216, .84);
    box-shadow: 0 0 0 3px var(--auth-accent-soft);
}

.deposit-submit {
    width: 100%;
    border: 0;
    cursor: pointer;
}

.deposit-submit:disabled {
    cursor: wait;
    opacity: .7;
}

.form-message {
    min-height: 0;
    margin-bottom: 0;
    border: 1px solid rgba(207, 211, 216, .12);
    border-radius: 10px;
    background: rgba(207, 211, 216, .06);
    color: var(--auth-muted);
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    text-transform: none;
}

.form-message:empty,
.form-message[hidden] {
    display: none;
}

.form-message[data-type="success"] {
    border-color: rgba(52, 211, 153, .24);
    background: rgba(52, 211, 153, .1);
    color: #86efac;
}

.form-message[data-type="error"] {
    border-color: rgba(248, 113, 113, .28);
    background: rgba(248, 113, 113, .11);
    color: #fca5a5;
}

@media (max-width: 980px) {
    .finance-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .operation-item {
        grid-template-columns: 1fr;
    }

    .operation-item div:last-child {
        text-align: left;
    }
}
.payment-methods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.payment-method {
    min-height: 40px;
    justify-content: center;
    cursor: pointer;
    color: var(--auth-text);
}

.payment-method.is-active {
    background: var(--auth-accent);
    color: #0b0a08;
    border-color: var(--auth-accent);
}

.payment-method:disabled,
.payment-method.is-disabled {
    cursor: not-allowed;
    opacity: .48;
    filter: grayscale(.35);
}

.operation-pending,
.deposit-request-card {
    border-color: rgba(244, 196, 48, .32);
    background: rgba(244, 196, 48, .08);
}

.deposit-request-card em {
    display: block;
    margin-top: 4px;
    color: var(--auth-muted);
    font-style: normal;
    font-size: 12px;
}

.operations-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 2px;
}

.operations-pagination button {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid var(--auth-panel-line);
    background: rgba(207, 211, 216, .06);
    color: var(--auth-text);
    cursor: pointer;
}

.operations-pagination button:disabled {
    cursor: default;
    opacity: .42;
}

.operations-pagination span {
    color: var(--auth-muted);
    font-size: 12px;
    font-weight: 500;
}
.manager-link {
    color: var(--auth-muted);
    font-size: 12px;
    text-decoration: none;
}

.manager-link:hover {
    color: var(--auth-text);
}
.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid var(--auth-panel-line);
    border-radius: 12px;
    background: rgba(9, 10, 11, .72);
    padding: 8px 10px;
    margin-bottom: 8px;
    backdrop-filter: blur(14px);
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: var(--auth-muted);
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.breadcrumb-item a {
    color: var(--auth-muted);
    text-decoration: none;
}

.breadcrumb-item a:hover,
.breadcrumb-item.is-current span {
    color: var(--auth-text);
}

.breadcrumb-item i,
.breadcrumb-flow i {
    font-size: 10px;
    color: var(--auth-muted);
}

.breadcrumb-flow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--auth-muted);
    font-size: 12px;
    font-weight: 500;
    min-width: 0;
}

.breadcrumb-flow strong {
    color: var(--auth-text);
    font-weight: 500;
}

@media (max-width: 767px) {
    .breadcrumb {
        align-items: center;
        display: block;
        padding: 8px;
        overflow: hidden;
    }

    .breadcrumb-list {
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 1px;
        scrollbar-width: none;
    }

    .breadcrumb-list::-webkit-scrollbar {
        display: none;
    }

    .breadcrumb-item {
        flex: 0 0 auto;
    }

    .breadcrumb-item a,
    .breadcrumb-item span {
        display: block;
        max-width: 44vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .breadcrumb-item.is-current span {
        max-width: 58vw;
    }

    .breadcrumb-flow {
        display: none;
    }
}
.main-content {
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
}

.profile-shell,
.profile-panel,
.profile-hero,
.profile-grid,
.finance-grid,
.data-list,
.contact-grid {
    min-width: 0;
    max-width: 100%;
}
.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 16px;
}

.login-panel {
    width: min(430px, 100%);
    display: grid;
    gap: 14px;
}

.temp-login-form {
    display: grid;
    gap: 10px;
}

.temp-login-form label {
    display: grid;
    gap: 5px;
}

.temp-login-form label span {
    color: var(--auth-muted);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.temp-login-form input {
    height: 40px;
    width: 100%;
    border: 1px solid var(--auth-panel-line);
    border-radius: 10px;
    background: var(--auth-field);
    color: var(--auth-text);
    padding: 0 10px;
    font: inherit;
}

.temp-auth-notice {
    border: 1px solid rgba(255, 180, 180, .28);
    border-radius: 10px;
    background: rgba(255, 180, 180, .1);
    color: var(--auth-error);
    padding: 10px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
}

/* Vitrine redesign layer */
body.profile-page {
    background:
        radial-gradient(circle at 18% 18%, rgba(207, 211, 216, .09), transparent 28%),
        radial-gradient(circle at 86% 12%, rgba(156, 169, 181, .06), transparent 26%),
        linear-gradient(135deg, #050505 0%, #101113 52%, #08090a 100%);
}

.profile-shell {
    display: grid;
    gap: 8px;
    width: 100%;
    padding: 0;
}

.breadcrumb,
.profile-hero,
.profile-panel {
    border-radius: 14px;
    background: var(--auth-panel);
    border: 1px solid var(--auth-panel-line);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .38);
    backdrop-filter: blur(16px);
}

.breadcrumb {
    min-height: 54px;
    padding: 10px 12px;
}

.profile-hero {
    padding: 18px;
}

.profile-panel {
    padding: 12px;
}

.profile-grid,
.finance-grid,
.projects-layout {
    gap: 8px;
    margin-top: 0;
}

.profile-shell > .profile-panel {
    margin-top: 0;
}

.profile-identity {
    gap: 12px;
}

.profile-avatar {
    width: 54px;
    height: 54px;
    border-radius: 14px;
}

h1 {
    font-size: clamp(30px, 4vw, 56px);
    line-height: 1;
}

h2 {
    font-size: 18px;
}

.profile-subtitle {
    max-width: 720px;
    margin: 10px 0 0;
    font-size: 14px;
    line-height: 1.45;
}

.primary-action,
.ghost-action,
.icon-action,
.collapse-action,
.payment-method {
    border-radius: 10px;
}

.primary-action,
.ghost-action {
    min-height: 44px;
}

.icon-action {
    width: 44px;
    height: 44px;
}

.data-list div,
.contact-item,
.finance-summary div,
.operation-item,
.project-total div,
.tariff-card,
.service-card,
.payment-method {
    border-color: rgba(207, 211, 216, .12);
    background: rgba(4, 5, 6, .38);
}

.inline-state,
.form-message {
    border: 1px dashed rgba(207, 211, 216, .18);
    border-radius: 12px;
    background: rgba(4, 5, 6, .28);
    padding: 12px;
    font-size: 13px;
}

.login-shell {
    padding: 16px;
}

.login-panel {
    width: min(460px, 100%);
}

@media (max-width: 767px) {
    .profile-shell {
        padding-top: 64px;
    }

    .profile-hero,
    .profile-panel {
        padding: 14px;
    }

    h1 {
        font-size: 30px;
    }
}

/* Vitrine redesign layer: profile, balance, login */
.account-card .data-list {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.contact-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.data-list div,
.contact-item,
.operation-item {
    border-radius: 12px;
    padding: 10px;
}

.finance-grid {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    gap: 8px;
    margin-top: 0;
}

.deposit-panel {
    position: sticky;
    top: 8px;
}

.balance-value {
    color: var(--auth-text);
    font-size: 24px;
    font-weight: 700;
}

.deposit-form {
    gap: 10px;
}

.deposit-form input,
.deposit-form select,
.payment-method,
.temp-login-form input {
    height: 44px;
    border-radius: 12px;
    background: rgba(4, 5, 6, .48);
}

.payment-methods {
    gap: 8px;
}

.operation-item {
    min-height: 74px;
}

.operations-pagination button {
    width: 38px;
    height: 38px;
}

.login-shell {
    background:
        radial-gradient(circle at 20% 18%, rgba(207, 211, 216, .1), transparent 30%),
        linear-gradient(135deg, #050505 0%, #101113 52%, #08090a 100%);
}

.login-panel {
    width: min(500px, 100%);
    padding: 18px;
}

.login-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    color: var(--auth-text);
    text-decoration: none;
}

.login-brand img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.login-brand span {
    background: linear-gradient(135deg, #fff 0%, #d3d3d3 58%, #8c8c8c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-size: 17px;
    font-weight: 500;
}

.login-panel h1 {
    font-size: clamp(34px, 5vw, 54px);
}

.temp-auth-notice {
    border-radius: 12px;
}

@media (max-width: 980px) {
    .finance-grid {
        grid-template-columns: 1fr;
    }

    .deposit-panel {
        position: static;
    }
}

/* Final mobile normalization for shared page hero blocks */
@media (max-width: 640px) {
    body.profile-page .breadcrumb {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 8px 10px;
        overflow: hidden;
    }

    body.profile-page .breadcrumb-list {
        flex: 1 1 auto;
        min-width: 0;
        gap: 5px;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 0;
        scrollbar-width: none;
    }

    body.profile-page .breadcrumb-list::-webkit-scrollbar {
        display: none;
    }

    body.profile-page .breadcrumb-item {
        flex: 0 0 auto;
        max-width: 52vw;
        font-size: 12px;
    }

    body.profile-page .breadcrumb-item a,
    body.profile-page .breadcrumb-item span {
        display: block;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.profile-page .breadcrumb-item.is-current {
        max-width: 62vw;
    }

    body.profile-page .breadcrumb-flow {
        display: none;
    }

    body.profile-page .profile-hero {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        min-height: auto !important;
        padding: 14px;
    }

    body.profile-page .profile-identity {
        width: 100%;
        align-items: flex-start;
        gap: 10px;
        min-width: 0;
    }

    body.profile-page .profile-avatar {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }

    body.profile-page .profile-identity > div:last-child {
        min-width: 0;
    }

    body.profile-page .profile-identity h1 {
        font-size: clamp(22px, 7vw, 28px);
        line-height: 1.08;
        overflow-wrap: anywhere;
    }

    body.profile-page .profile-subtitle {
        max-width: 100%;
        margin-top: 6px;
        font-size: 13px;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        overflow: hidden;
    }

    body.profile-page .profile-actions {
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
    }

    body.profile-page .profile-actions .primary-action,
    body.profile-page .profile-actions .ghost-action {
        flex: 1 1 170px;
        min-width: 0;
        justify-content: center;
    }

    body.profile-page .profile-actions .icon-action {
        flex: 0 0 44px;
        width: 44px;
        height: 44px;
    }
}

/* Final equal action buttons */
.profile-actions:has(> :nth-child(2)),
.lk-skeleton-actions:has(> :nth-child(2)) {
    align-items: stretch;
}

.profile-actions:has(> :nth-child(2)) > .primary-action,
.profile-actions:has(> :nth-child(2)) > .ghost-action,
.profile-actions:has(> :nth-child(2)) > .icon-action,
.lk-skeleton-actions:has(> :nth-child(2)) > .primary-action,
.lk-skeleton-actions:has(> :nth-child(2)) > .ghost-action {
    flex: 1 1 0;
    min-width: 132px;
    min-height: 42px;
    justify-content: center;
}

/* Polished page skeleton */
.lk-page-skeleton {
    gap: 10px;
}

.lk-skeleton-block,
.lk-skeleton-card,
.lk-skeleton-line,
.lk-skeleton-pill,
.lk-skeleton-media {
    border-color: rgba(207, 211, 216, .13);
    background:
        linear-gradient(135deg, rgba(207, 211, 216, .09), rgba(207, 211, 216, .035)),
        rgba(4, 5, 6, .46);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}

.lk-skeleton-block::after,
.lk-skeleton-card::after,
.lk-skeleton-line::after,
.lk-skeleton-pill::after,
.lk-skeleton-media::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .16), transparent);
    animation-duration: 1.35s;
}

.lk-skeleton-hero {
    grid-template-columns: 72px minmax(0, 1fr) minmax(180px, 260px);
    min-height: 112px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .34);
}

.lk-skeleton-avatar {
    background:
        radial-gradient(circle at 34% 30%, rgba(255, 255, 255, .24), transparent 24%),
        linear-gradient(135deg, rgba(255, 255, 255, .18), rgba(207, 211, 216, .05)),
        rgba(4, 5, 6, .46);
}

.lk-skeleton-toolbar {
    align-items: center;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .24);
}

.lk-skeleton-pill.is-wide {
    width: 100%;
}

.lk-skeleton-card {
    align-content: start;
    gap: 12px;
    padding: 12px;
    min-height: 310px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .26);
}

.lk-skeleton-card:first-child {
    min-height: 380px;
}

.lk-skeleton-media {
    min-height: 164px;
    border-radius: 12px;
}

.lk-skeleton-card:first-child .lk-skeleton-media {
    min-height: 220px;
}

.lk-skeleton-media-chip {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 38px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .28);
}

.lk-skeleton-card-head,
.lk-skeleton-card-body {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.lk-skeleton-line.is-kicker {
    width: min(140px, 45%);
    height: 10px;
}

.lk-skeleton-line.is-title {
    width: min(360px, 82%);
    height: 22px;
}

.lk-skeleton-line.is-short {
    width: min(240px, 64%);
}

.lk-skeleton-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.lk-skeleton-pill.is-small {
    width: 74px;
    height: 26px;
    border-radius: 999px;
}

.lk-skeleton-card-footer {
    display: grid;
    grid-template-columns: minmax(92px, .75fr) minmax(110px, 1fr);
    gap: 8px;
    align-items: end;
    margin-top: auto;
}

.lk-skeleton-line.is-price {
    width: 100%;
    height: 34px;
    border-radius: 10px;
}

.lk-skeleton-pill.is-action {
    width: 100%;
    height: 40px;
    border-radius: 10px;
}

.lk-skeleton-side .lk-skeleton-card {
    min-height: 210px;
}

.lk-skeleton-side .lk-skeleton-card-footer {
    grid-template-columns: 1fr;
}

@media (max-width: 760px) {
    .lk-skeleton-hero {
        grid-template-columns: 56px minmax(0, 1fr);
        min-height: 150px;
    }

    .lk-skeleton-card,
    .lk-skeleton-card:first-child {
        min-height: 320px;
    }

    .lk-skeleton-card-footer {
        grid-template-columns: 1fr;
    }
}

/* Large page rendering optimization */
.profile-panel,
.login-panel,
.data-list div,
.contact-item,
.operation-item,
.deposit-request-card,
.lk-skeleton-card {
    contain: layout paint;
}

.profile-grid,
.finance-grid,
.operations-list,
.lk-skeleton-grid,
.lk-skeleton-side {
    content-visibility: auto;
    contain-intrinsic-size: 720px;
}

.operation-item,
.deposit-request-card,
.lk-skeleton-card {
    content-visibility: auto;
    contain-intrinsic-size: 96px;
}
