:root {
    --pp-primary: #2f6dff;
    --pp-primary-dark: #1f56d6;
    --pp-accent: #5a8bff;
    --pp-bg: #f4f7fc;
    --pp-surface: #ffffff;
    --pp-sidebar-bg: #fdfefe;
    --pp-border: #dfe7f3;
    --pp-border-soft: #ebf0f7;
    --pp-text: #0f172a;
    --pp-muted: #66758f;
    --pp-shadow: 0 14px 35px rgba(20, 38, 84, 0.08);
    --pp-shadow-soft: 0 8px 20px rgba(16, 33, 78, 0.05);
    --pp-radius: 16px;
    --pp-radius-sm: 12px;
    --pp-radius-xs: 10px;
    --pp-sidebar-width: 268px;
}

body.pp-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Poppins", "Manrope", "Segoe UI", sans-serif;
    color: var(--pp-text);
    background:
        radial-gradient(circle at 8% 12%, rgba(47, 109, 255, 0.08), transparent 36%),
        radial-gradient(circle at 92% 84%, rgba(90, 139, 255, 0.1), transparent 40%),
        var(--pp-bg);
}

.pp-app {
    min-height: 100vh;
    display: flex;
}

.pp-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--pp-sidebar-width);
    background: var(--pp-sidebar-bg);
    border-right: 1px solid var(--pp-border);
    box-shadow: var(--pp-shadow-soft);
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    z-index: 40;
}

.pp-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 4px;
}

.pp-brand__logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--pp-primary), #79a0ff);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.pp-brand__title {
    margin: 0;
    font-size: 15px;
    line-height: 1.2;
    font-weight: 700;
}

.pp-brand__meta {
    margin: 2px 0 0;
    font-size: 11px;
    color: var(--pp-muted);
}

.pp-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pp-nav__section {
    font-size: 11px;
    color: #8b98af;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    padding: 8px 10px 4px;
}

.pp-nav__link {
    border: 1px solid transparent;
    border-radius: 12px;
    color: #2e3e5d;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.16s ease;
}

.pp-nav__link i {
    color: #6f83a8;
    font-size: 16px;
}

.pp-nav__link:hover {
    background: #f3f7ff;
    border-color: #e3ebfa;
    color: #1f3765;
}

.pp-nav__link:hover i {
    color: var(--pp-primary);
}

.pp-nav__link.is-active {
    background: #eaf1ff;
    border-color: #cfdfff;
    color: #163f96;
    box-shadow: inset 0 0 0 1px rgba(47, 109, 255, 0.05);
}

.pp-nav__link.is-active i {
    color: #1d4fbc;
}

.pp-sidebar__spacer {
    flex: 1;
}

.pp-support {
    border: 1px solid var(--pp-border);
    border-radius: 14px;
    padding: 13px;
    background: linear-gradient(180deg, #f8fbff, #f2f6ff);
}

.pp-support__title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #19386f;
}

.pp-support__text {
    margin: 6px 0 12px;
    font-size: 12px;
    color: var(--pp-muted);
    line-height: 1.45;
}

.pp-support__link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--pp-primary);
}

.pp-logout {
    margin-top: 10px;
    text-decoration: none;
    border: 1px solid #f7d2d8;
    border-radius: 11px;
    background: #fff6f7;
    color: #9f3048;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 9px 10px;
    font-size: 12px;
    font-weight: 700;
}

.pp-main {
    margin-left: var(--pp-sidebar-width);
    width: calc(100% - var(--pp-sidebar-width));
    min-height: 100vh;
}

.pp-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    background: rgba(244, 247, 252, 0.86);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--pp-border-soft);
    padding: 16px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.pp-topbar__title {
    margin: 0;
    font-size: 23px;
    line-height: 1.15;
    font-weight: 700;
}

.pp-topbar__subtitle {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--pp-muted);
}

.pp-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: min(420px, 100%);
}

.pp-search__box {
    position: relative;
    flex: 1;
}

.pp-search__box i {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    color: #87a0c8;
    font-size: 15px;
}

.pp-search input {
    width: 100%;
    height: 40px;
    border-radius: 11px;
    border: 1px solid var(--pp-border);
    background: #fff;
    padding: 0 12px 0 36px;
    font-size: 13px;
    color: #1e2f53;
}

.pp-search input:focus {
    outline: none;
    border-color: #b7cbf8;
    box-shadow: 0 0 0 3px rgba(47, 109, 255, 0.12);
}

.pp-topbar__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pp-btn {
    border: 1px solid var(--pp-border);
    border-radius: 10px;
    background: #fff;
    color: #2b3b5a;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 12px;
}

.pp-btn:hover {
    color: #1e335d;
    background: #f4f7ff;
}

.pp-btn--primary {
    border-color: #366ffc;
    color: #fff;
    background: linear-gradient(130deg, var(--pp-primary), #6e97ff);
}

.pp-btn--primary:hover {
    color: #fff;
    background: linear-gradient(130deg, var(--pp-primary-dark), #5f8eff);
}

.pp-page {
    padding: 22px;
}

.pp-grid {
    display: grid;
    gap: 16px;
}

.pp-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pp-grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pp-grid--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.pp-grid--6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.pp-card {
    border: 1px solid var(--pp-border);
    border-radius: var(--pp-radius);
    background: var(--pp-surface);
    box-shadow: var(--pp-shadow-soft);
    padding: 18px;
}

.pp-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.pp-card__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #162542;
}

.pp-card__hint {
    margin: 3px 0 0;
    font-size: 12px;
    color: var(--pp-muted);
}

.pp-stat {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.pp-stat__icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(130deg, var(--pp-primary), #7ba5ff);
    box-shadow: 0 9px 18px rgba(47, 109, 255, 0.3);
    font-size: 17px;
}

.pp-stat__label {
    margin: 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7385a6;
    font-weight: 700;
}

.pp-stat__value {
    margin: 3px 0 0;
    font-size: 27px;
    line-height: 1.1;
    font-weight: 700;
    color: #101f3a;
}

.pp-stat__meta {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--pp-muted);
}

.pp-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pp-pill {
    border-radius: 999px;
    border: 1px solid #d7e4ff;
    background: #f4f8ff;
    color: #244a8a;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pp-empty {
    border: 1px dashed #d6dfed;
    border-radius: 12px;
    background: #f9fbff;
    color: #5f7090;
    text-align: center;
    padding: 26px 20px;
    font-size: 13px;
}

.pp-form-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.pp-field label {
    display: block;
    font-size: 12px;
    color: #5f7396;
    margin-bottom: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pp-field input,
.pp-field select {
    width: 100%;
    height: 40px;
    border: 1px solid var(--pp-border);
    border-radius: 10px;
    background: #fff;
    padding: 0 10px;
    font-size: 13px;
    color: #1b2e52;
}

.pp-field input:focus,
.pp-field select:focus {
    outline: none;
    border-color: #b8cdf8;
    box-shadow: 0 0 0 3px rgba(47, 109, 255, 0.11);
}

.pp-field--action {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.pp-table-wrap {
    overflow: auto;
}

.pp-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 760px;
}

.pp-table thead th {
    padding: 10px 11px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #7487aa;
    border-bottom: 1px solid var(--pp-border);
    text-align: left;
    font-weight: 700;
    background: #fbfcff;
}

.pp-table tbody td {
    padding: 11px;
    border-bottom: 1px solid var(--pp-border-soft);
    font-size: 13px;
    color: #1d3159;
    vertical-align: middle;
}

.pp-table tbody tr:hover {
    background: #f9fbff;
}

.pp-mute {
    color: var(--pp-muted);
    font-size: 12px;
}

.pp-badge {
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    line-height: 1.3;
}

.pp-badge--neutral { background: #f2f5fb; color: #41577e; border-color: #d6e0ee; }
.pp-badge--success { background: #e8faef; color: #10633d; border-color: #b8eecf; }
.pp-badge--warning { background: #fff3df; color: #8a5a0b; border-color: #f9d7a8; }
.pp-badge--danger { background: #ffe8ec; color: #9d2742; border-color: #f8c5d0; }
.pp-badge--info { background: #e8f1ff; color: #214ea2; border-color: #bfd4ff; }

.pp-alert {
    border-radius: 11px;
    border: 1px solid;
    padding: 12px;
    font-size: 13px;
    margin-bottom: 12px;
}

.pp-alert--danger { background: #fff3f5; border-color: #fac9d3; color: #9f3048; }
.pp-alert--success { background: #edfdf3; border-color: #bae9cb; color: #136943; }
.pp-alert--warning { background: #fff8eb; border-color: #f6dbac; color: #8b5d12; }

.pp-progress {
    height: 8px;
    border-radius: 999px;
    background: #e4ebf7;
    overflow: hidden;
}

.pp-progress > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(130deg, var(--pp-primary), #7ca6ff);
}

.pp-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.pp-list li {
    border: 1px solid var(--pp-border);
    border-radius: 11px;
    background: #f9fbff;
    padding: 9px 10px;
    font-size: 13px;
    color: #31486f;
}

/* Auth */
body.pp-auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Poppins", "Manrope", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 14% 16%, rgba(47, 109, 255, 0.14), transparent 34%),
        radial-gradient(circle at 84% 82%, rgba(47, 109, 255, 0.11), transparent 38%),
        #f1f6ff;
    color: #10213f;
}

.pp-auth {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.pp-auth__frame {
    width: min(1080px, 100%);
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--pp-border);
    box-shadow: var(--pp-shadow);
    background: #fff;
    display: grid;
    grid-template-columns: 1.03fr 0.97fr;
}

.pp-auth__visual {
    padding: 38px 32px;
    color: #f6f9ff;
    background: linear-gradient(145deg, #1d4fcb, #2f6dff 48%, #79a0ff);
    position: relative;
    overflow: hidden;
}

.pp-auth__visual::before,
.pp-auth__visual::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
}

.pp-auth__visual::before {
    width: 220px;
    height: 220px;
    top: -88px;
    right: -86px;
}

.pp-auth__visual::after {
    width: 180px;
    height: 180px;
    left: -62px;
    bottom: -62px;
}

.pp-auth__badge {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.pp-auth__title {
    position: relative;
    z-index: 1;
    margin: 18px 0 10px;
    font-size: clamp(27px, 3vw, 36px);
    line-height: 1.2;
    font-weight: 700;
}

.pp-auth__subtitle {
    position: relative;
    z-index: 1;
    margin: 0 0 14px;
    font-size: 15px;
    color: rgba(244, 249, 255, 0.94);
}

.pp-auth__copy {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 13px;
    color: rgba(245, 249, 255, 0.9);
    line-height: 1.6;
}

.pp-auth__points {
    position: relative;
    z-index: 1;
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.pp-auth__points li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(247, 251, 255, 0.95);
}

.pp-auth__note {
    position: relative;
    z-index: 1;
    margin-top: 18px;
    border-radius: 12px;
    padding: 11px 12px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 12px;
}

.pp-auth__formwrap {
    padding: 32px 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.pp-auth__form {
    width: min(430px, 100%);
}

.pp-auth__form h1 {
    margin: 0;
    font-size: 29px;
    font-weight: 700;
}

.pp-auth__form p {
    margin: 6px 0 18px;
    font-size: 14px;
    color: var(--pp-muted);
}

.pp-auth__card {
    border: 1px solid var(--pp-border);
    border-radius: 14px;
    background: #fbfcff;
    padding: 20px;
}

.pp-auth__field {
    margin-bottom: 14px;
}

.pp-auth__field label {
    display: block;
    margin-bottom: 7px;
    font-size: 12px;
    color: #4e6287;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pp-auth__field input,
.pp-auth__field select {
    width: 100%;
    height: 46px;
    border: 1px solid var(--pp-border);
    border-radius: 10px;
    background: #fff;
    padding: 0 12px;
    font-size: 14px;
    color: #1d315a;
}

.pp-auth__field input:focus,
.pp-auth__field select:focus {
    outline: none;
    border-color: #b7caf4;
    box-shadow: 0 0 0 3px rgba(47, 109, 255, 0.12);
}

.pp-auth__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin: 4px 0 16px;
}

.pp-auth__link {
    color: var(--pp-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
}

.pp-auth__submit {
    width: 100%;
    height: 46px;
    border: 0;
    border-radius: 11px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--pp-primary), #6f98ff);
}

.pp-auth__submit:hover {
    background: linear-gradient(135deg, var(--pp-primary-dark), #5f8fff);
}

.pp-auth__support {
    margin-top: 14px;
    border-top: 1px dashed var(--pp-border);
    padding-top: 12px;
    font-size: 12px;
    color: var(--pp-muted);
}

.pp-auth__foot {
    margin-top: 12px;
    text-align: center;
    color: #7a8ba8;
    font-size: 12px;
}

@media (max-width: 1199px) {
    .pp-grid--6 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .pp-grid--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pp-form-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1024px) {
    .pp-sidebar {
        position: static;
        width: 100%;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--pp-border);
    }

    .pp-main {
        margin-left: 0;
        width: 100%;
    }

    .pp-app {
        flex-direction: column;
    }

    .pp-auth__frame {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .pp-topbar,
    .pp-page {
        padding: 14px;
    }

    .pp-search {
        min-width: 100%;
    }

    .pp-grid--6,
    .pp-grid--4,
    .pp-grid--3,
    .pp-grid--2,
    .pp-form-grid {
        grid-template-columns: 1fr;
    }

    .pp-auth {
        padding: 12px;
    }

    .pp-auth__visual,
    .pp-auth__formwrap {
        padding: 22px 16px;
    }
}