.pm-page {
    min-height: 100%;
    background:
        radial-gradient(120% 70% at 50% -10%, rgba(46, 164, 110, 0.14) 0%, rgba(46, 164, 110, 0) 55%),
        linear-gradient(180deg, #f4f8f7 0%, #edf3f2 100%);
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px));
}

.pm-header {
    background: linear-gradient(160deg, #236a44 0%, #2f8259 38%, var(--primary) 100%);
    padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 26px;
    border-radius: 0 0 28px 28px;
    box-shadow: 0 14px 30px rgba(27, 95, 63, 0.32);
}

.pm-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.pm-header-btn {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.pm-header-center {
    flex: 1;
    text-align: center;
}

.pm-title {
    margin: 0;
    color: #fff;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.pm-subtitle {
    margin: 2px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
}

.pm-main {
    max-width: 780px;
    margin: 0 auto;
    padding: 0 10px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pm-card {
    margin: 0;
    border-radius: 22px;
    padding: 18px;
    border: 1px solid rgba(146, 172, 167, 0.24);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 249, 248, 0.92));
    box-shadow: 0 12px 28px rgba(10, 25, 21, 0.1);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.pm-hero {
    margin-top: -12px;
}

.pm-identity {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.pm-avatar {
    width: 92px;
    height: 92px;
    border-radius: 24px;
    border: 2px solid rgba(57, 157, 118, 0.66);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(41, 132, 97, 0.25);
    margin-bottom: 12px;
}

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

.pm-avatar-fallback {
    font-size: 2rem;
    font-weight: 800;
    color: #f3fffb;
}

.pm-name {
    margin: 0;
    font-size: 2rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: #101827;
    font-weight: 900;
}

.pm-name-secondary {
    margin: 2px 0 0;
    color: #516171;
    font-size: 1rem;
    font-weight: 600;
}

.pm-rating {
    margin-top: 14px;
    width: 100%;
    border-radius: 14px;
    border: 1px solid rgba(115, 164, 151, 0.5);
    background: linear-gradient(180deg, rgba(226, 238, 236, 0.95), rgba(218, 231, 229, 0.95));
    padding: 10px 12px;
}

.pm-rating-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 6px;
}

.pm-rating-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    color: #6f8498;
}

.pm-rating-value {
    font-size: 1.9rem;
    font-weight: 900;
    color: #111827;
}

.pm-stars-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pm-stars {
    display: flex;
    gap: 4px;
}

.pm-stars .star-filled,
.pm-stars .star-half {
    color: #f59e0b;
    width: 18px;
    height: 18px;
}

.pm-stars .star-empty {
    color: #7f95b3;
    width: 18px;
    height: 18px;
    stroke-width: 1.9;
}

.pm-rating-count {
    color: #667085;
    font-size: 0.95rem;
    font-weight: 600;
}

.pm-section-title {
    margin: 0 0 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #111827;
    font-size: 1.2rem;
    font-weight: 800;
}

.pm-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pm-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 4px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.24);
    color: #1f2937;
    text-decoration: none;
    transition: background 0.18s ease, transform 0.18s ease;
}

.pm-list-item:last-child {
    border-bottom: none;
}

.pm-list-label {
    flex: 1;
    font-size: 1.05rem;
    font-weight: 700;
}

.pm-icon-badge {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pm-badge-green { background: rgba(16, 185, 129, 0.16); color: #16a34a; }
.pm-badge-blue { background: rgba(59, 130, 246, 0.16); color: #2563eb; }
.pm-badge-purple { background: rgba(139, 92, 246, 0.16); color: #7c3aed; }
.pm-badge-orange { background: rgba(249, 115, 22, 0.16); color: #ea580c; }
.pm-badge-gray { background: rgba(107, 114, 128, 0.16); color: #4b5563; }

.pm-completion {
    display: grid;
    grid-template-columns: 76px 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.pm-ring {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: conic-gradient(var(--primary) calc(var(--p, 0) * 1%), rgba(148, 163, 184, 0.26) 0);
    position: relative;
    display: grid;
    place-items: center;
}

.pm-ring::before {
    content: '';
    position: absolute;
    inset: 7px;
    border-radius: 50%;
    background: #f7fbfb;
}

.pm-ring-value {
    position: relative;
    font-size: 1.15rem;
    font-weight: 900;
    color: #2f8f6a;
}

.pm-tips {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pm-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4b5563;
    font-size: 0.98rem;
}

.pm-tip.done {
    color: #1f2937;
}

.pm-tip.done svg {
    color: #16a34a;
}

.pm-cta {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 46px;
    border-radius: 14px;
    border: 1px solid rgba(110, 169, 151, 0.5);
    background: linear-gradient(180deg, rgba(214, 231, 227, 0.95), rgba(200, 223, 217, 0.95));
    color: #23865f;
    font-size: 1.15rem;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.pm-cta:active {
    transform: translateY(1px) scale(0.995);
}

.pm-reviews-empty {
    margin: 0;
    color: #667085;
    font-size: 0.98rem;
}

.pm-reviews-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pm-review-item {
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.66);
    padding: 12px;
}

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

.pm-reviewer-name {
    color: #111827;
    font-weight: 800;
    font-size: 0.95rem;
}

.pm-review-date {
    color: #6b7280;
    font-size: 0.82rem;
    font-weight: 600;
}

.pm-review-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
}

.pm-review-stars .star-filled,
.pm-review-stars .star-half {
    color: #f59e0b;
    width: 16px;
    height: 16px;
}

.pm-review-stars .star-empty {
    color: #7f95b3;
    width: 16px;
    height: 16px;
    stroke-width: 1.9;
}

.pm-review-text {
    margin: 0 0 6px;
    color: #1f2937;
    font-size: 0.96rem;
    line-height: 1.45;
}

.pm-review-request {
    margin: 0;
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 600;
}

.pm-danger-card {
    border-color: color-mix(in srgb, var(--danger) 32%, var(--border));
}

.pm-danger-label {
    margin: 0 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    color: var(--muted);
    font-weight: 800;
}

.pm-danger-title {
    color: var(--danger);
}

.pm-danger-text {
    margin: 0 0 12px;
    color: var(--muted);
}

.pm-danger-btn {
    width: 100%;
    min-height: 44px;
    border-radius: 12px;
    border: 1px solid var(--danger);
    background: var(--danger);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.pm-danger-btn:active {
    transform: translateY(1px) scale(0.995);
}

.pm-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.pm-modal.hidden {
    display: none;
}

.pm-modal-card {
    width: min(100%, 420px);
    border-radius: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 16px;
}

.pm-modal-card h3 {
    margin: 0 0 8px;
}

.pm-modal-card p {
    margin: 0 0 14px;
    color: var(--muted);
}

.pm-modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.pm-modal-btn {
    min-height: 38px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    padding: 0 14px;
    cursor: pointer;
    font: inherit;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.pm-modal-btn-danger {
    border-color: var(--danger);
    background: var(--danger);
    color: #fff;
}

[data-theme='dark'] .pm-page {
    background:
        radial-gradient(135% 80% at 50% -10%, rgba(16, 185, 129, 0.22) 0%, rgba(16, 185, 129, 0) 54%),
        linear-gradient(180deg, #091523 0%, #08121f 100%);
}

[data-theme='dark'] .pm-card {
    border-color: rgba(148, 163, 184, 0.24);
    background: linear-gradient(180deg, rgba(11, 24, 38, 0.96), rgba(9, 19, 33, 0.94));
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
}

[data-theme='dark'] .pm-name,
[data-theme='dark'] .pm-section-title,
[data-theme='dark'] .pm-rating-value,
[data-theme='dark'] .pm-list-label {
    color: #ecf3ff;
}

[data-theme='dark'] .pm-name-secondary,
[data-theme='dark'] .pm-rating-count,
[data-theme='dark'] .pm-tip {
    color: #a8b8cc;
}

[data-theme='dark'] .pm-rating {
    border-color: rgba(131, 180, 166, 0.4);
    background: linear-gradient(180deg, rgba(18, 40, 56, 0.9), rgba(14, 31, 47, 0.9));
}

[data-theme='dark'] .pm-reviews-empty,
[data-theme='dark'] .pm-review-date,
[data-theme='dark'] .pm-review-request {
    color: #9fb0c6;
}

[data-theme='dark'] .pm-review-item {
    border-color: rgba(148, 163, 184, 0.28);
    background: rgba(10, 22, 36, 0.65);
}

[data-theme='dark'] .pm-reviewer-name,
[data-theme='dark'] .pm-review-text {
    color: #ecf3ff;
}

[data-theme='dark'] .pm-ring::before {
    background: rgba(10, 22, 36, 0.95);
}

.pm-header-btn:focus-visible,
.pm-cta:focus-visible,
.pm-danger-btn:focus-visible,
.pm-modal-btn:focus-visible,
.pm-list-item:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--primary) 72%, #fff);
    outline-offset: 2px;
}

@media (min-width: 769px) {
    .pm-header {
        display: none;
    }

    .mobile-menu-overlay,
    .mobile-menu-drawer {
        display: none !important;
    }

    .pm-page {
        padding-top: 22px;
        background:
            radial-gradient(120% 90% at 20% 0%, rgba(46, 164, 110, 0.1) 0%, rgba(46, 164, 110, 0) 56%),
            radial-gradient(120% 90% at 80% 10%, rgba(59, 130, 246, 0.07) 0%, rgba(59, 130, 246, 0) 58%),
            linear-gradient(180deg, #f3f8f7 0%, #ecf3f2 100%);
    }

    .pm-main {
        max-width: 1280px;
        padding: 14px 30px 44px;
        display: grid;
        grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
        grid-template-areas:
            "hero completion"
            "actions danger"
            "reviews danger";
        gap: 20px;
        align-items: start;
    }

    .pm-hero {
        grid-area: hero;
        min-height: 340px;
        position: sticky;
        top: 22px;
    }

    .pm-completion-card {
        grid-area: completion;
    }

    .pm-actions-card {
        grid-area: actions;
    }

    .pm-danger-card {
        grid-area: danger;
    }

    .pm-reviews-card {
        grid-area: reviews;
    }

    .pm-name {
        font-size: 2.55rem;
        line-height: 1.08;
    }

    .pm-card {
        border-radius: 26px;
        padding: 24px;
        border: 1px solid color-mix(in srgb, var(--border) 74%, var(--primary) 26%);
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(242, 248, 247, 0.92));
        box-shadow:
            0 16px 34px rgba(10, 28, 22, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.75);
    }

    .pm-card:hover {
        transform: translateY(-3px);
        border-color: color-mix(in srgb, var(--primary) 30%, var(--border));
        box-shadow: 0 18px 34px rgba(11, 28, 23, 0.14);
    }

    .pm-section-title {
        font-size: 1.3rem;
        margin-bottom: 16px;
    }

    .pm-list-item {
        padding: 15px 8px;
        border-bottom-color: color-mix(in srgb, var(--border) 82%, transparent);
    }

    .pm-list-item:hover {
        background: color-mix(in srgb, var(--primary) 8%, transparent);
        transform: translateX(2px);
    }

    .pm-rating {
        max-width: 560px;
        margin: 18px auto 0;
        border-radius: 16px;
        padding: 12px 14px;
    }

    .pm-rating-value {
        font-size: 2.1rem;
    }

    .pm-completion {
        grid-template-columns: 90px 1fr;
        gap: 14px;
    }

    .pm-ring {
        width: 90px;
        height: 90px;
    }

    .pm-ring::before {
        inset: 8px;
    }

    .pm-ring-value {
        font-size: 1.25rem;
    }

    .pm-tip {
        font-size: 1rem;
    }

    .pm-cta {
        min-height: 48px;
        border-radius: 15px;
        font-size: 1.08rem;
    }

    .pm-cta:hover {
        transform: translateY(-1px);
        box-shadow: 0 12px 22px rgba(35, 134, 95, 0.24);
        border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
    }

    .pm-danger-btn:hover {
        box-shadow: 0 10px 20px rgba(220, 38, 38, 0.28);
        filter: saturate(1.06);
    }

    [data-theme='dark'] .pm-page {
        background:
            radial-gradient(120% 90% at 20% 0%, rgba(41, 143, 102, 0.22) 0%, rgba(41, 143, 102, 0) 56%),
            radial-gradient(120% 90% at 80% 10%, rgba(59, 130, 246, 0.16) 0%, rgba(59, 130, 246, 0) 58%),
            linear-gradient(180deg, #091523 0%, #08121f 100%);
    }

    [data-theme='dark'] .pm-card {
        border-color: rgba(148, 163, 184, 0.24);
        background: linear-gradient(180deg, rgba(11, 24, 38, 0.96), rgba(9, 19, 33, 0.94));
        box-shadow:
            0 18px 36px rgba(0, 0, 0, 0.36),
            inset 0 1px 0 rgba(255, 255, 255, 0.03);
    }
}

.pm-main > .pm-card {
    animation: pm-card-in 320ms ease both;
}

.pm-main > .pm-card:nth-child(2) { animation-delay: 60ms; }
.pm-main > .pm-card:nth-child(3) { animation-delay: 110ms; }
.pm-main > .pm-card:nth-child(4) { animation-delay: 150ms; }

@keyframes pm-card-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .pm-card,
    .pm-list-item,
    .pm-cta,
    .pm-danger-btn,
    .pm-modal-btn {
        transition: none !important;
    }

    .pm-main > .pm-card {
        animation: none !important;
    }
}
