.pr {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 20px 40px;
    min-height: calc(76vh - var(--header-height) - 60px);
}

.pr-hero {
    padding: 48px 0 0;
    margin-bottom: 0;
}

.pr-hero__inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.pr-hero__left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.pr-avatar {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 50%;
    padding: 4px;
    padding-bottom: 0;
    overflow: hidden;
    border: 2px solid var(--border-color);
}

.pr-avatar__img {
    width: 100%;
    height: 110%;
    object-fit: contain;
    animation: prAvatarIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes prAvatarIn {
    from { opacity: 0; transform: scale(0.7); }
    to   { opacity: 1; transform: scale(1); }
}

.pr-hero__info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.pr-hero__name {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.03em;
    color: var(--text-color);
    line-height: 1.1;
    opacity: 0;
    animation: prFadeUp 0.4s ease 0.18s forwards;
}

.pr-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    opacity: 0;
    animation: prFadeUp 0.4s ease 0.25s forwards;
}

.pr-hero__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.pr-hero__tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    animation: prFadeUp 0.4s ease 0.2s forwards;
}

.pr-tab {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    font-size: 0.83rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.18s, border-color 0.18s, color 0.18s;
    white-space: nowrap;
}

.pr-tab:hover {
    background: var(--surface-color);
    color: var(--text-color);
}

.pr-tab--active {
    background: var(--surface-color);
    color: var(--text-color);
}

.pr-tab__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: var(--primary-color);
    color: #fff;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
}

.pr-tab--logout {
    margin-left: 8px;
    color: #e74c3c;
    border-color: rgba(231, 76, 60, 0.25);
}

.pr-tab--logout:hover {
    background: rgba(231, 76, 60, 0.06);
    border-color: rgba(231, 76, 60, 0.5);
    color: #e74c3c;
}

.pr-body {
    padding-top: 36px;
}

.pr-panel {
    display: none;
    animation: prFadeUp 0.3s ease both;
}

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

.pr-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    border-radius: 9px;
    border: none;
    font-size: 0.87rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.18s, transform 0.12s;
    text-decoration: none;
    white-space: nowrap;
}

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

.pr-btn--primary {
    background: var(--primary-color);
    color: #fff;
}

.pr-btn--primary:hover {
    background: color-mix(in srgb, var(--primary-color) 88%, #000);
}

.pr-btn--danger {
    background: transparent;
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.35);
}

.pr-btn--danger:hover {
    background: rgba(231, 76, 60, 0.06);
    border-color: #e74c3c;
}

.pr-empty {
    padding: 72px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    animation: prFadeUp 0.5s ease both;
}

.pr-empty__icon {
    width: 80px;
    height: 80px;
    color: var(--text-muted);
    opacity: 0.3;
    margin-bottom: 8px;
}

.pr-empty__icon svg { width: 100%; height: 100%; }

.pr-empty__title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
}

.pr-empty__text {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
    max-width: 360px;
    line-height: 1.65;
}

.pr-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pr-order {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 0 32px;
    position: relative;
    padding-bottom: 40px;
    opacity: 0;
    transform: translateY(16px);
    animation: prFadeUp 0.4s ease forwards;
}

.pr-order::before {
    content: '';
    position: absolute;
    left: 100px;
    top: 8px;
    bottom: -8px;
    width: 1px;
    background: var(--border-color);
    margin-left: 15px;
}

.pr-order:last-child::before { display: none; }

.pr-order__date-col {
    text-align: right;
    padding-top: 2px;
    position: relative;
}

.pr-order__date {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
    font-weight: 500;
}

.pr-order__dot {
    position: absolute;
    right: -19px;
    top: 6px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid var(--background-color);
    z-index: 1;
}

.pr-order__card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.pr-order__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
}

.pr-order__id {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.pr-status {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 11px;
    border-radius: 20px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.pr-status--processing {
    background: color-mix(in srgb, var(--text-muted) 10%, transparent);
    color: var(--text-muted);
    border: 1px solid color-mix(in srgb, var(--text-muted) 20%, transparent);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pr-status--processing::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
    animation: prStatusPulse 1.4s ease-in-out infinite;
}

@keyframes prStatusPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.3; transform: scale(0.6); }
}

.pr-status {
    position: relative;
}

.pr-status__tooltip {
    display: none;
    position: fixed;
    bottom: calc(100% - 5px);
    right: 20px;
    width: 180px;
    padding: 10px 12px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--text-muted);
    line-height: 1.55;
    text-transform: none;
    letter-spacing: 0;
    z-index: 100;
    white-space: normal;
    pointer-events: none;
}

.pr-status__tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 14px;
    border: 7px solid transparent;
    border-top-color: var(--border-color);
}

.pr-status--processing:hover .pr-status__tooltip { display: block; }

.pr-status--accepted {
    background: color-mix(in srgb, var(--primary-color) 12%, transparent);
    color: var(--primary-color);
    border: 1px solid color-mix(in srgb, var(--primary-color) 25%, transparent);
}

.pr-status--cancelled {
    background: rgba(231, 76, 60, 0.08);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

.pr-order__body {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pr-order__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-radius: 8px;
}

.pr-order__item-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.pr-order__item-qty {
    font-size: 0.78rem;
    color: var(--text-muted);
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.pr-order__item-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 6px;
    background: white;
    flex-shrink: 0;
}

.pr-order__item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pr-order__item-price {
    font-size: .85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.pr-order__foot {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.pr-order__foot-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.pr-order__foot-item i {
    font-size: 0.7rem;
    color: var(--primary-color);
}

.pr-settings {
    max-width: 560px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pr-settings__group {
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 18px;
    animation: prFadeUp 0.35s ease both;
}

.pr-settings__group:last-child { border-bottom: none; }

.pr-settings__group-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-muted);
    margin: 0;
}

.pr-settings__desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.6;
}

.pr-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pr-field__label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-color);
}

.pr-field__wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.pr-field__input {
    flex: 1;
    padding: 11px 42px 11px 14px;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: var(--background-color);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-color);
    transition: border-color 0.18s;
    appearance: none;
}

.pr-field__input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.pr-field__input::placeholder { color: var(--text-muted); opacity: 0.6; }

.pr-field__save,
.pr-field__eye {
    position: absolute;
    right: 10px;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.pr-field__save:hover { background: color-mix(in srgb, var(--primary-color) 10%, transparent); color: var(--primary-color); }
.pr-field__eye:hover  { color: var(--text-color); }

.pr-field__save.saved { color: var(--primary-color); }

.pr-field__hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.pr-field__err {
    font-size: 0.75rem;
    color: #e74c3c;
    display: none;
}

.pr-field__err.visible { display: block; }

.pr-settings__group--danger .pr-settings__group-title {
    color: rgba(231, 76, 60, 0.7);
    margin-top: 15px;
}

@keyframes prFadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
    .pr-hero__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .pr-hero__name { font-size: 1.4rem; }

    .pr-hero__tabs { width: 100%; overflow-x: auto; padding-bottom: 2px; }

    .pr-order {
        grid-template-columns: 1fr;
        padding-left: 20px;
        padding-bottom: 28px;
    }

    .pr-order::before {
        left: 0;
        top: 0;
        margin-left: 3px;
    }

    .pr-order__date-col {
        text-align: left;
        margin-bottom: 8px;
    }

    .pr-order__dot {
        left: -17px;
        right: auto;
    }

    .pr-order__foot { gap: 12px; }
}

@media (max-width: 480px) {
    .pr { padding: 0 12px 60px; }

    .pr-hero { padding-top: 28px; }

    .pr-hero__left { gap: 14px; }

    .pr-avatar { width: 52px; height: 52px; }

    .pr-avatar__letter { font-size: 1.3rem; }

    .pr-hero__name { font-size: 1.2rem; }

    .pr-tab { padding: 7px 12px; font-size: 0.8rem; }

    .pr-order__head { flex-wrap: wrap; gap: 8px; }

    .pr-order__item-name { font-size: 0.8rem; }

    .pr-settings { max-width: 100%; }
}