/* ============================================================
   LrmCargo — Premium web theme
   Тёмная «обсидиановая» тема с янтарным акцентом.
   Используется только в браузерной версии (app.lrmbarcode.asia).
   Telegram WebApp продолжает работать на старой теме.
   ============================================================ */

:root {
    /* Base */
    --pm-bg: #08090C;
    --pm-bg-soft: #0B0D12;
    --pm-surface: rgba(255, 255, 255, 0.035);
    --pm-surface-2: rgba(255, 255, 255, 0.06);
    --pm-surface-3: rgba(255, 255, 255, 0.09);
    --pm-line: rgba(255, 255, 255, 0.08);
    --pm-line-2: rgba(255, 255, 255, 0.14);

    /* Text */
    --pm-text: #F3F5F9;
    --pm-text-2: #A8B0BE;
    --pm-text-3: #6C7481;

    /* Accent — «янтарь», наследует бренд-оранжевый */
    --pm-accent: #FFA13C;
    --pm-accent-soft: #FFC978;
    --pm-accent-deep: #FF6A2B;
    --pm-accent-grad: linear-gradient(135deg, #FFC978 0%, #FF7A30 100%);
    --pm-accent-glow: rgba(255, 138, 48, 0.30);

    /* Status */
    --pm-st-wait: #8A93A6;
    --pm-st-china: #8B90FF;
    --pm-st-transit: #FFA842;
    --pm-st-kz: #3FC8E4;
    --pm-st-ready: #34D399;
    --pm-st-done: #34D399;

    /* Geometry */
    --pm-r-sm: 12px;
    --pm-r: 18px;
    --pm-r-lg: 24px;
    --pm-r-xl: 32px;

    --pm-shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.9);
    --pm-shadow-lift: 0 26px 60px -28px rgba(0, 0, 0, 1);

    --pm-nav-h: 72px;
    --pm-side-w: 264px;
    --pm-max: 940px;

    --pm-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--pm-bg);
}

body {
    font-family: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--pm-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100dvh;
    overflow-x: hidden;
    letter-spacing: -0.011em;
}

/* Фоновое свечение + шум: даёт «дорогую» глубину без картинок */
body::before {
    content: '';
    position: fixed;
    inset: -30vh -20vw auto -20vw;
    height: 90vh;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(46% 42% at 22% 12%, rgba(255, 122, 48, 0.16) 0%, transparent 68%),
        radial-gradient(40% 38% at 84% 4%, rgba(120, 130, 255, 0.13) 0%, transparent 70%);
    filter: blur(6px);
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

::selection { background: rgba(255, 138, 48, 0.28); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.09);
    border-radius: 20px;
    border: 3px solid transparent;
    background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.16); background-clip: content-box; }

/* ============================================================
   Каркас
   ============================================================ */

.pm-shell {
    position: relative;
    z-index: 1;
    display: block;
    min-height: 100dvh;
    padding-bottom: calc(var(--pm-nav-h) + env(safe-area-inset-bottom, 0px) + 28px);
}

.pm-container {
    width: 100%;
    max-width: var(--pm-max);
    margin: 0 auto;
    padding: 0 18px;
}

/* Верхняя панель (мобайл + десктоп) */
.pm-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    padding-top: constant(safe-area-inset-top);
    padding-top: env(safe-area-inset-top, 0px);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    background: linear-gradient(to bottom, rgba(8, 9, 12, 0.92), rgba(8, 9, 12, 0.72));
    border-bottom: 1px solid var(--pm-line);
}

.pm-topbar-inner {
    width: 100%;
    max-width: var(--pm-max);
    margin: 0 auto;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 68px;
}

.pm-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    font-weight: 800;
    font-size: 17px;
    letter-spacing: -0.03em;
}

.pm-brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: transparent;
    box-shadow: 0 8px 22px -8px var(--pm-accent-glow);
    flex-shrink: 0;
}
.pm-brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pm-brand-sub {
    font-weight: 600;
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--pm-text-3);
    display: block;
    margin-top: 1px;
}

/* Заголовок страницы в шапке — на телефоне заменяет логотип, экономит высоту */
.pm-topbar-page { display: none; min-width: 0; }

.pm-topbar-eyebrow {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--pm-accent);
    line-height: 1;
}

.pm-topbar-title {
    display: block;
    margin-top: 4px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 1023px) {
    .pm-title-in-bar .pm-brand { display: none; }
    .pm-title-in-bar .pm-topbar-page { display: block; }
    .pm-title-in-bar .pm-page-head-collapsible { padding: 16px 0 14px; }
    .pm-title-in-bar .pm-page-head-collapsible .pm-eyebrow,
    .pm-title-in-bar .pm-page-head-collapsible .pm-title { display: none; }
    .pm-title-in-bar .pm-page-head-collapsible .pm-subtitle { margin-top: 0; }
    .pm-title-in-bar .pm-page-head-empty { display: none; }
    /* На профиле шапка тела скрыта — небольшой отступ до карточки с аватаром */
    .pm-title-in-bar .pm-page-head-empty + .pm-hero { margin-top: 14px; }
}

.pm-top-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pm-icon-btn {
    position: relative;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--pm-text-2);
    font-size: 21px;
    cursor: pointer;
    transition: all 0.2s var(--pm-ease);
    -webkit-tap-highlight-color: transparent;
}
.pm-icon-btn:hover {
    background: var(--pm-surface-2);
    border-color: var(--pm-line);
    color: var(--pm-text);
}
.pm-icon-btn:active { transform: scale(0.94); }

.pm-badge-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9px;
    background: var(--pm-accent-deep);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    display: grid;
    place-items: center;
    border: 2px solid var(--pm-bg);
    line-height: 1;
}

/* Заголовок страницы */
.pm-page-head {
    padding: 28px 0 20px;
}

.pm-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--pm-accent);
    margin: 0 0 10px;
}

.pm-title {
    margin: 0;
    font-size: clamp(27px, 6.4vw, 40px);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.08;
}

.pm-subtitle {
    margin: 9px 0 0;
    color: var(--pm-text-2);
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.5;
}

/* Нижняя навигация (мобайл) */
.pm-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 2px;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(to top, rgba(8, 9, 12, 0.98) 60%, rgba(8, 9, 12, 0.86));
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    border-top: 1px solid var(--pm-line);
}

.pm-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    border-radius: 14px;
    color: var(--pm-text-3);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: -0.01em;
    transition: color 0.2s var(--pm-ease), background 0.2s var(--pm-ease);
    -webkit-tap-highlight-color: transparent;
}
.pm-tab i { font-size: 22px; }
.pm-tab:active { background: var(--pm-surface); }
.pm-tab.is-active { color: var(--pm-text); }
.pm-tab.is-active i {
    background: var(--pm-accent-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Боковая навигация (десктоп) */
.pm-sidenav { display: none; }

/* ============================================================
   Карточки и поверхности
   ============================================================ */

.pm-card {
    position: relative;
    background: var(--pm-surface);
    border: 1px solid var(--pm-line);
    border-radius: var(--pm-r);
    padding: 20px;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: border-color 0.25s var(--pm-ease), transform 0.25s var(--pm-ease), background 0.25s var(--pm-ease);
}

.pm-card-hover:hover {
    border-color: var(--pm-line-2);
    background: var(--pm-surface-2);
    transform: translateY(-2px);
}

.pm-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.pm-card-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.pm-card-note {
    margin: 3px 0 0;
    font-size: 12.5px;
    color: var(--pm-text-3);
    font-weight: 500;
}

.pm-section {
    margin-top: 26px;
}

.pm-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.pm-section-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.pm-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--pm-text-2);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s var(--pm-ease);
}
.pm-link:hover { color: var(--pm-accent); }

/* Hero-карточка на главной */
.pm-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--pm-r-lg);
    border: 1px solid var(--pm-line);
    background:
        radial-gradient(120% 130% at 0% 0%, rgba(255, 138, 48, 0.16) 0%, transparent 58%),
        linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
    padding: 16px 16px 14px;
}

.pm-hero::after {
    content: '';
    position: absolute;
    right: -70px;
    top: -80px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 138, 48, 0.26), transparent 62%);
    pointer-events: none;
}

.pm-hero-top {
    display: flex;
    align-items: center;
    gap: 11px;
    position: relative;
}

.pm-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 16px;
    letter-spacing: -0.02em;
    color: #1A0F06;
    background: var(--pm-accent-grad);
    box-shadow: 0 10px 22px -12px var(--pm-accent-glow);
    flex-shrink: 0;
}

.pm-hero-name {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.pm-hero-meta {
    margin: 4px 0 0;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--pm-text-2);
    font-weight: 500;
}

.pm-code {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: var(--pm-accent-soft);
    background: rgba(255, 161, 60, 0.12);
    border: 1px solid rgba(255, 161, 60, 0.24);
}

/* ============================================================
   Статистика
   ============================================================ */

.pm-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 12px;
    position: relative;
}

.pm-stat {
    padding: 11px 12px;
    border-radius: var(--pm-r-sm);
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--pm-line);
    transition: all 0.22s var(--pm-ease);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.pm-stat:hover { background: var(--pm-surface-3); border-color: var(--pm-line-2); transform: translateY(-2px); }
.pm-stat:active { transform: scale(0.985); }

.pm-stat-top {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--pm-text-3);
    letter-spacing: -0.005em;
}

.pm-stat-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--pm-st-wait);
}

.pm-stat-value {
    margin-top: 5px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

/* ============================================================
   Кнопки
   ============================================================ */

.pm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 20px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: -0.015em;
    cursor: pointer;
    transition: all 0.2s var(--pm-ease);
    -webkit-tap-highlight-color: transparent;
    background: var(--pm-surface-2);
    color: var(--pm-text);
    border-color: var(--pm-line);
}
.pm-btn:hover { background: var(--pm-surface-3); border-color: var(--pm-line-2); }
.pm-btn:active { transform: scale(0.975); }
.pm-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.pm-btn i { font-size: 18px; }

.pm-btn-primary {
    background: var(--pm-accent-grad);
    color: #1A0F06;
    border-color: transparent;
    box-shadow: 0 14px 32px -16px var(--pm-accent-glow);
}
.pm-btn-primary:hover {
    background: var(--pm-accent-grad);
    filter: brightness(1.06);
    box-shadow: 0 18px 40px -16px var(--pm-accent-glow);
}

.pm-btn-ghost {
    background: transparent;
    border-color: var(--pm-line);
    color: var(--pm-text-2);
}
.pm-btn-ghost:hover { color: var(--pm-text); border-color: var(--pm-line-2); background: var(--pm-surface); }

.pm-btn-block { width: 100%; }

.pm-btn-danger {
    background: rgba(255, 76, 76, 0.1);
    border-color: rgba(255, 76, 76, 0.24);
    color: #FF8080;
}
.pm-btn-danger:hover { background: rgba(255, 76, 76, 0.16); border-color: rgba(255, 76, 76, 0.36); }

/* ============================================================
   Поиск и фильтры
   ============================================================ */

.pm-search {
    position: relative;
    display: flex;
    align-items: center;
}

.pm-search i {
    position: absolute;
    left: 16px;
    font-size: 19px;
    color: var(--pm-text-3);
    pointer-events: none;
}

.pm-search input {
    width: 100%;
    padding: 14px 16px 14px 45px;
    border-radius: 15px;
    border: 1px solid var(--pm-line);
    background: var(--pm-surface);
    color: var(--pm-text);
    font-size: 15px;
    font-weight: 500;
    outline: none;
    transition: all 0.2s var(--pm-ease);
}
.pm-search input::placeholder { color: var(--pm-text-3); }
.pm-search input:focus {
    border-color: rgba(255, 161, 60, 0.42);
    background: var(--pm-surface-2);
    box-shadow: 0 0 0 4px rgba(255, 138, 48, 0.09);
}

.pm-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 0 2px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.pm-chips::-webkit-scrollbar { display: none; }

.pm-chip {
    flex-shrink: 0;
    padding: 9px 15px;
    border-radius: 11px;
    border: 1px solid var(--pm-line);
    background: var(--pm-surface);
    color: var(--pm-text-2);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s var(--pm-ease);
    -webkit-tap-highlight-color: transparent;
}
.pm-chip:hover { color: var(--pm-text); border-color: var(--pm-line-2); }
.pm-chip.is-active {
    background: var(--pm-accent-grad);
    color: #1A0F06;
    border-color: transparent;
    box-shadow: 0 10px 24px -14px var(--pm-accent-glow);
}
.pm-chip-count { opacity: 0.66; margin-left: 4px; font-variant-numeric: tabular-nums; }

/* ============================================================
   Карточка посылки
   ============================================================ */

.pm-list { display: flex; flex-direction: column; gap: 10px; }

.pm-parcel {
    position: relative;
    display: block;
    padding: 17px 18px;
    border-radius: var(--pm-r);
    border: 1px solid var(--pm-line);
    background: var(--pm-surface);
    transition: all 0.22s var(--pm-ease);
    overflow: hidden;
}
.pm-parcel::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--pm-st-wait);
    opacity: 0.85;
    transition: all 0.22s var(--pm-ease);
}
.pm-parcel:hover {
    border-color: var(--pm-line-2);
    background: var(--pm-surface-2);
    transform: translateY(-2px);
}
.pm-parcel:hover::before { top: 8px; bottom: 8px; }

.pm-parcel-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 9px;
}

.pm-parcel-code {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
    font-variant-numeric: tabular-nums;
    color: var(--pm-text-2);
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}
.pm-parcel-code i { font-size: 16px; color: var(--pm-text-3); flex-shrink: 0; }
.pm-parcel-code span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pm-parcel-date {
    margin-left: auto;
    font-size: 12px;
    font-weight: 600;
    color: var(--pm-text-3);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.pm-parcel-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.022em;
    line-height: 1.3;
    margin-bottom: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.pm-parcel-bottom {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pm-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 11px 6px 9px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: -0.01em;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--pm-line);
    color: var(--pm-text-2);
}
.pm-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

.pm-parcel-more {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--pm-text-3);
    transition: color 0.2s var(--pm-ease), gap 0.2s var(--pm-ease);
}
.pm-parcel:hover .pm-parcel-more { color: var(--pm-accent); gap: 7px; }

.pm-parcel-del {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    border: 1px solid transparent;
    background: transparent;
    color: var(--pm-text-3);
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s var(--pm-ease);
    font-size: 15px;
}
.pm-parcel:hover .pm-parcel-del { opacity: 1; }
.pm-parcel-del:hover { background: rgba(255, 76, 76, 0.14); color: #FF8080; }

/* Цвета статусов */
.pm-s-wait    { color: var(--pm-st-wait); }
.pm-s-china   { color: var(--pm-st-china); }
.pm-s-transit { color: var(--pm-st-transit); }
.pm-s-kz      { color: var(--pm-st-kz); }
.pm-s-ready   { color: var(--pm-st-ready); }
.pm-s-done    { color: var(--pm-st-done); }

.pm-parcel[data-s="wait"]::before    { background: var(--pm-st-wait); }
.pm-parcel[data-s="china"]::before   { background: var(--pm-st-china); }
.pm-parcel[data-s="transit"]::before { background: var(--pm-st-transit); }
.pm-parcel[data-s="kz"]::before      { background: var(--pm-st-kz); }
.pm-parcel[data-s="ready"]::before   { background: var(--pm-st-ready); }
.pm-parcel[data-s="done"]::before    { background: var(--pm-st-done); }

.pm-parcel[data-s="ready"] {
    background:
        linear-gradient(100deg, rgba(52, 211, 153, 0.09), transparent 46%),
        var(--pm-surface);
    border-color: rgba(52, 211, 153, 0.2);
}

/* ============================================================
   Адрес склада
   ============================================================ */

.pm-addr-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--pm-line);
    cursor: pointer;
    transition: all 0.2s var(--pm-ease);
    -webkit-tap-highlight-color: transparent;
}
.pm-addr-row + .pm-addr-row { margin-top: 8px; }
.pm-addr-row:hover { background: var(--pm-surface-2); border-color: var(--pm-line-2); }
.pm-addr-row:active { transform: scale(0.99); }

.pm-addr-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--pm-text-3);
}

.pm-addr-value {
    margin-top: 3px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    word-break: break-word;
}

.pm-addr-copy {
    margin-left: auto;
    font-size: 17px;
    color: var(--pm-text-3);
    flex-shrink: 0;
    transition: color 0.2s var(--pm-ease);
}
.pm-addr-row:hover .pm-addr-copy { color: var(--pm-accent); }

/* ============================================================
   Пустые состояния и скелетоны
   ============================================================ */

.pm-empty {
    padding: 46px 24px;
    text-align: center;
    border-radius: var(--pm-r);
    border: 1px dashed var(--pm-line-2);
    background: rgba(255, 255, 255, 0.02);
}

.pm-empty-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 15px;
    border-radius: 19px;
    display: grid;
    place-items: center;
    font-size: 27px;
    color: var(--pm-text-3);
    background: var(--pm-surface-2);
    border: 1px solid var(--pm-line);
}

.pm-empty-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.pm-empty-text {
    margin: 7px 0 0;
    font-size: 13.5px;
    color: var(--pm-text-3);
    line-height: 1.55;
}

.pm-skel {
    border-radius: var(--pm-r);
    background: linear-gradient(100deg, rgba(255, 255, 255, 0.04) 30%, rgba(255, 255, 255, 0.09) 50%, rgba(255, 255, 255, 0.04) 70%);
    background-size: 220% 100%;
    animation: pm-shimmer 1.5s var(--pm-ease) infinite;
    border: 1px solid var(--pm-line);
}
.pm-skel-parcel { height: 108px; }
.pm-skel-line { height: 14px; border-radius: 7px; }

@keyframes pm-shimmer {
    0% { background-position: 130% 0; }
    100% { background-position: -30% 0; }
}

/* ============================================================
   Тост
   ============================================================ */

.pm-toast-wrap {
    position: fixed;
    left: 50%;
    bottom: calc(var(--pm-nav-h) + env(safe-area-inset-bottom, 0px) + 18px);
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    pointer-events: none;
    width: max-content;
    max-width: min(92vw, 460px);
}

.pm-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 14px;
    background: rgba(22, 24, 30, 0.97);
    border: 1px solid var(--pm-line-2);
    box-shadow: var(--pm-shadow-lift);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    font-size: 14px;
    font-weight: 600;
    animation: pm-toast-in 0.34s var(--pm-ease);
}
.pm-toast i { font-size: 18px; color: var(--pm-accent); }
.pm-toast.is-out { animation: pm-toast-out 0.28s var(--pm-ease) forwards; }

@keyframes pm-toast-in {
    from { opacity: 0; transform: translateY(14px) scale(0.96); }
    to { opacity: 1; transform: none; }
}
@keyframes pm-toast-out {
    to { opacity: 0; transform: translateY(10px) scale(0.97); }
}

/* ============================================================
   Появление контента
   ============================================================ */

.pm-reveal {
    animation: pm-reveal 0.55s var(--pm-ease) both;
}
.pm-reveal-2 { animation-delay: 0.06s; }
.pm-reveal-3 { animation-delay: 0.12s; }
.pm-reveal-4 { animation-delay: 0.18s; }

@keyframes pm-reveal {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}

/* ============================================================
   Пагинация
   ============================================================ */

.pm-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 18px;
}

.pm-pager-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--pm-text-2);
    font-variant-numeric: tabular-nums;
    min-width: 64px;
    text-align: center;
}

/* ============================================================
   Десктоп
   ============================================================ */

@media (min-width: 1024px) {
    .pm-shell {
        display: grid;
        grid-template-columns: var(--pm-side-w) minmax(0, 1fr);
        padding-bottom: 0;
        max-width: 1220px;
        margin: 0 auto;
        gap: 0;
    }

    .pm-tabbar { display: none; }

    .pm-topbar { grid-column: 1 / -1; }
    .pm-topbar-inner { max-width: none; padding-left: 26px; padding-right: 26px; }

    .pm-sidenav {
        display: block;
        position: sticky;
        top: 69px;
        align-self: start;
        height: calc(100dvh - 69px);
        padding: 26px 16px 26px 22px;
        border-right: 1px solid var(--pm-line);
    }

    .pm-sidenav-group + .pm-sidenav-group { margin-top: 26px; }

    .pm-sidenav-label {
        font-size: 10.5px;
        font-weight: 700;
        letter-spacing: 0.16em;
        text-transform: uppercase;
        color: var(--pm-text-3);
        padding: 0 12px;
        margin-bottom: 9px;
    }

    .pm-sidenav-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 11px 13px;
        border-radius: 13px;
        color: var(--pm-text-2);
        font-size: 14.5px;
        font-weight: 600;
        letter-spacing: -0.015em;
        transition: all 0.2s var(--pm-ease);
        position: relative;
    }
    .pm-sidenav-item i { font-size: 20px; }
    .pm-sidenav-item + .pm-sidenav-item { margin-top: 3px; }
    .pm-sidenav-item:hover { background: var(--pm-surface); color: var(--pm-text); }
    .pm-sidenav-item.is-active {
        background: var(--pm-surface-2);
        color: var(--pm-text);
        border: 1px solid var(--pm-line);
    }
    .pm-sidenav-item.is-active::before {
        content: '';
        position: absolute;
        left: -22px;
        top: 50%;
        transform: translateY(-50%);
        width: 3px;
        height: 22px;
        border-radius: 0 3px 3px 0;
        background: var(--pm-accent-grad);
    }

    .pm-content { padding: 0 32px 60px; min-width: 0; }
    .pm-container { max-width: 860px; margin: 0 auto; padding: 0; }

    .pm-stats { grid-template-columns: repeat(4, 1fr); gap: 12px; }

    .pm-toast-wrap { bottom: 26px; }

    .pm-hero { padding: 22px; }
    .pm-page-head { padding: 34px 0 22px; }
}

/* Двухколоночная сетка на широких экранах */
@media (min-width: 1024px) {
    .pm-grid-2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
        align-items: start;
    }
}

/* ============================================================
   Добавить на экран «Домой» (A2HS)
   ============================================================ */
.pm-a2hs-banner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0 12px;
    padding: 8px 36px 8px 8px;
    border-radius: 14px;
    border: 1px solid rgba(255, 161, 60, 0.22);
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(255, 138, 48, 0.14) 0%, transparent 58%),
        var(--pm-surface);
    animation: pmA2hsIn 0.35s var(--pm-ease);
}
@keyframes pmA2hsIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.pm-a2hs-icon {
    width: 32px; height: 32px; border-radius: 9px;
    flex-shrink: 0;
    background-image: url("/static/icons/icon-96.png");
    background-size: cover;
    box-shadow: 0 6px 14px -8px var(--pm-accent-glow);
}
.pm-a2hs-body { flex: 1; min-width: 0; }
.pm-a2hs-title {
    margin: 0; font-size: 12.5px; font-weight: 700; letter-spacing: -0.01em;
    color: var(--pm-text);
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pm-a2hs-text {
    margin: 1px 0 0; font-size: 11px; font-weight: 500;
    color: var(--pm-text-3); line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pm-a2hs-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.pm-a2hs-btn {
    border: none; cursor: pointer; font: inherit;
    padding: 6px 11px; border-radius: 9px;
    font-size: 12px; font-weight: 800;
    background: var(--pm-accent-grad); color: #1A0F06;
    white-space: nowrap;
}
.pm-a2hs-close {
    position: absolute;
    top: 4px; right: 4px;
    width: 26px; height: 26px; border-radius: 8px; flex-shrink: 0;
    display: grid; place-items: center; border: none;
    background: transparent; color: var(--pm-text-3); cursor: pointer;
    font-size: 13px;
}
.pm-a2hs-close:hover { background: rgba(255, 255, 255, 0.06); color: var(--pm-text-2); }

.pm-a2hs-overlay {
    position: fixed; inset: 0; z-index: 95;
    display: flex; align-items: flex-end; justify-content: center;
    padding: 18px;
    background: rgba(4, 5, 8, 0.72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0; pointer-events: none;
    transition: opacity 0.22s var(--pm-ease);
}
.pm-a2hs-overlay.is-open { opacity: 1; pointer-events: auto; }
.pm-a2hs-sheet {
    width: min(440px, 100%);
    border-radius: 22px 22px 18px 18px;
    border: 1px solid var(--pm-line);
    background:
        radial-gradient(120% 90% at 0% 0%, rgba(255, 138, 48, 0.14) 0%, transparent 55%),
        linear-gradient(180deg, #15171C, #0E1014);
    box-shadow: 0 28px 60px -28px rgba(0, 0, 0, 0.75);
    padding: 22px 20px 20px;
    transform: translateY(18px);
    transition: transform 0.22s var(--pm-ease);
    text-align: center;
}
.pm-a2hs-overlay.is-open .pm-a2hs-sheet { transform: translateY(0); }
.pm-a2hs-sheet-icon {
    width: 66px; height: 66px; border-radius: 20px; margin: 0 auto 14px;
    background-image: url("/static/icons/icon-192.png");
    background-size: cover;
    box-shadow: 0 16px 34px -14px var(--pm-accent-glow);
}
.pm-a2hs-sheet h3 {
    margin: 0 0 6px; font-size: 19px; font-weight: 800; letter-spacing: -0.03em;
}
.pm-a2hs-sheet p {
    margin: 0 0 18px; font-size: 13.5px; line-height: 1.55; color: var(--pm-text-2); font-weight: 500;
}
.pm-a2hs-steps {
    list-style: none; margin: 0 0 18px; padding: 0;
    display: flex; flex-direction: column; gap: 10px;
    text-align: left;
}
.pm-a2hs-steps li {
    display: flex; gap: 12px; align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--pm-line);
    background: var(--pm-surface);
    font-size: 14px; font-weight: 600; color: var(--pm-text);
}
.pm-a2hs-steps li span.num {
    width: 24px; height: 24px; border-radius: 8px; flex-shrink: 0;
    display: grid; place-items: center;
    background: var(--pm-accent-grad); color: #1A0F06;
    font-size: 12.5px; font-weight: 800;
}
.pm-a2hs-steps li i { color: var(--pm-accent-soft); font-size: 18px; flex-shrink: 0; }


/* ============================================================
   Сворачиваемые карточки (профиль)
   ============================================================ */
.pm-collapse-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    padding: 0;
}
.pm-collapse-head .pm-card-title { margin: 0; }
.pm-collapse-caret {
    margin-left: auto;
    flex-shrink: 0;
    font-size: 18px;
    color: var(--pm-text-3);
    transition: transform 0.22s var(--pm-ease);
    margin-top: 2px;
}
.pm-collapse.is-open .pm-collapse-caret { transform: rotate(180deg); }
.pm-collapse-body {
    display: none;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--pm-line);
}
.pm-collapse.is-open .pm-collapse-body { display: block; }
.pm-a2hs-banner.is-sticky { padding-right: 10px; }

.pm-accordion-item + .pm-accordion-item { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--pm-line); }
.pm-accordion-item .pm-collapse-head { padding: 0; }
.pm-accordion-icon {
    width: 40px; height: 40px; border-radius: 13px; flex-shrink: 0;
    display: grid; place-items: center; font-size: 19px;
    background: var(--pm-surface-2); border: 1px solid var(--pm-line); color: var(--pm-text-2);
}


/* ============================================================
   Нижний sheet / модалка
   ============================================================ */
.pm-sheet-overlay {
    position: fixed; inset: 0; z-index: 95;
    display: flex; align-items: center; justify-content: center;
    padding: 18px;
    background: rgba(0, 0, 0, 0.72);
    opacity: 0; pointer-events: none;
    transition: opacity 0.22s var(--pm-ease);
}
.pm-sheet-overlay.is-open { opacity: 1; pointer-events: auto; }
.pm-sheet {
    width: 100%; max-width: 400px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #14171E;
    padding: 20px 18px 16px;
    transform: translateY(10px) scale(0.98);
    transition: transform 0.22s var(--pm-ease);
    box-shadow: 0 24px 60px rgba(0,0,0,.55);
}
.pm-sheet-overlay.is-open .pm-sheet { transform: translateY(0) scale(1); }
.pm-sheet h3 {
    margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -0.02em;
}
.pm-sheet > p {
    margin: 6px 0 0; font-size: 13px; color: var(--pm-text-3); font-weight: 500;
}
.pm-sheet-input {
    width: 100%; margin-top: 16px; box-sizing: border-box;
    padding: 14px 16px; border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.12); background: #0C0E13;
    color: var(--pm-text); font: inherit; font-size: 15.5px; font-weight: 600;
    outline: none;
}
.pm-sheet-input:focus { border-color: rgba(255, 161, 60, 0.45); }
.pm-sheet-hint {
    margin: 10px 0 0; min-height: 1.2em;
    font-size: 12.5px; color: var(--pm-text-3); font-weight: 500;
}
.pm-sheet-actions {
    display: flex; gap: 8px; margin-top: 16px;
}
.pm-sheet-actions .pm-btn { flex: 1; }
.pm-pref-value {
    font-size: 13px; font-weight: 600; color: var(--pm-text-3);
    max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}


.pm-lang-options { display: flex; gap: 8px; margin-top: 16px; }
.pm-lang-option {
    flex: 1;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 10px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #0C0E13;
    color: var(--pm-text-2);
    font: inherit; font-size: 14.5px; font-weight: 700;
    cursor: pointer;
}
.pm-lang-option i { font-size: 18px; color: var(--pm-text-3); }
.pm-lang-option.is-active {
    border-color: rgba(255, 161, 60, 0.5);
    background: rgba(255, 161, 60, 0.12);
    color: var(--pm-text);
}
.pm-lang-option.is-active i { color: var(--pm-accent-soft); }
