/* ═══════════════════════════════════════════════════════════════════════════
   Member portal

   Deliberately its own system rather than a reskin of the admin panel. The two
   have opposite jobs: the admin screen is an operational desk — dense, many rows,
   scanned all day. This is read by somebody who visits twice a year to answer one
   question ("is my thing still working, do I owe anything?"), so it trades
   density for calm: fewer things per screen, larger type, one accent colour, and
   whitespace doing the grouping that borders do next door.

   Everything below is scoped to .portal so it cannot leak into the admin panel.
   ═══════════════════════════════════════════════════════════════════════════ */

.portal {
    /* One accent, three greys, and a spacing scale everything snaps to. */
    --pt-bg: #f7f8fc;
    --pt-surface: #ffffff;
    --pt-line: #e9ebf2;
    --pt-line-soft: #f1f3f8;
    --pt-ink: #131a2b;
    --pt-ink-2: #5a6478;
    --pt-ink-3: #8b93a7;

    --pt-ok: #0f9d58;
    --pt-ok-bg: #e7f7ee;
    --pt-warn: #b45309;
    --pt-warn-bg: #fef4e2;
    --pt-danger: #d33b3b;
    --pt-danger-bg: #fdecec;

    --pt-r-sm: 10px;
    --pt-r: 14px;
    --pt-r-lg: 20px;

    --pt-shadow: 0 1px 2px rgba(19, 26, 43, .04), 0 8px 24px rgba(19, 26, 43, .05);
    --pt-shadow-lift: 0 2px 4px rgba(19, 26, 43, .05), 0 16px 40px rgba(19, 26, 43, .09);

    background: var(--pt-bg);
    color: var(--pt-ink);
    font-family: Cairo, system-ui, sans-serif;
    margin: 0;
    -webkit-font-smoothing: antialiased;
}

.portal *,
.portal *::before,
.portal *::after { box-sizing: border-box; }

/* ══════════════════════════ Shell ══════════════════════════ */

.pt-shell {
    display: grid;
    grid-template-columns: 264px minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
        "side top"
        "side main"
        "side foot";
    min-height: 100vh;
}

.pt-side { grid-area: side; }
.pt-top  { grid-area: top; }
.pt-main { grid-area: main; }
.pt-foot { grid-area: foot; }

/* ══════════════════════════ Sidebar ══════════════════════════
   The old one had no rhythm: rows of different heights, icons drifting from
   their labels, and an active state that shouted. Every row is now the same
   height with the icon in a fixed box, so the labels form one clean column. */

.pt-side {
    display: flex;
    flex-direction: column;
    background: #10172a;
    padding: 20px 14px 16px;
    border-inline-start: 0;
}

.pt-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px 20px;
    text-decoration: none;
    color: #fff;
}

.pt-brand__mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 13px;
    background: linear-gradient(140deg, var(--brand, #4f46e5), #8b5cf6);
    font-weight: 800;
    font-size: 15px;
    letter-spacing: .4px;
    box-shadow: 0 6px 18px rgba(79, 70, 229, .4);
}

.pt-brand strong {
    display: block;
    font-size: 14.5px;
    line-height: 1.3;
}

.pt-brand small {
    display: block;
    color: #8792ab;
    font-size: 11.5px;
    margin-top: 1px;
}

.pt-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.pt-nav__group {
    padding: 16px 12px 7px;
    font-size: 10.5px;
    font-weight: 700;
    color: #616d87;
    letter-spacing: .6px;
}

.pt-nav__group:first-child { padding-top: 4px; }

.pt-nav__link {
    display: flex;
    align-items: center;
    gap: 11px;
    height: 42px;
    padding: 0 12px;
    border-radius: var(--pt-r-sm);
    color: #b9c2d6;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    position: relative;
    transition: background .15s, color .15s;
}

.pt-nav__link:hover {
    background: rgba(255, 255, 255, .055);
    color: #fff;
}

.pt-nav__link.is-active {
    background: rgba(255, 255, 255, .09);
    color: #fff;
    font-weight: 700;
}

/* A quiet accent bar rather than a solid block: it marks the row without
   becoming the loudest thing on screen. */
.pt-nav__link.is-active::before {
    content: "";
    position: absolute;
    inset-inline-start: -14px;
    top: 10px;
    bottom: 10px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--brand, #4f46e5);
}

[dir="ltr"] .pt-nav__link.is-active::before {
    border-radius: 3px 0 0 3px;
}

/* Fixed box so every label starts at the same x. */
.pt-nav__icon {
    display: grid;
    place-items: center;
    width: 20px;
    flex: none;
}

.pt-nav__icon svg {
    width: 17px;
    height: 17px;
    display: block;
}

.pt-nav__badge {
    margin-inline-start: auto;
    min-width: 21px;
    height: 19px;
    padding: 0 6px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--pt-danger);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.pt-side__foot {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, .07);
}

.pt-side__user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px;
}

.pt-side__avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
}

.pt-side__user .stack { min-width: 0; }

.pt-side__user strong {
    display: block;
    color: #e6eaf4;
    font-size: 12.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pt-side__user small {
    display: block;
    color: #757f96;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pt-side__support {
    display: block;
    margin-top: 10px;
    padding: 0 4px;
    color: #6d7896;
    font-size: 11.5px;
    text-decoration: none;
}

/* ══════════════════════════ Top bar ══════════════════════════ */

.pt-top {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 28px;
    height: 68px;
    background: var(--pt-surface);
    border-bottom: 1px solid var(--pt-line);
    position: sticky;
    top: 0;
    z-index: 30;
}

.pt-top h1 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.pt-top p {
    margin: 2px 0 0;
    color: var(--pt-ink-3);
    font-size: 12.5px;
}

.pt-top__right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-inline-start: auto;
}

.pt-burger {
    display: none;
    border: 1px solid var(--pt-line);
    background: #fff;
    border-radius: var(--pt-r-sm);
    padding: 8px;
    cursor: pointer;
    color: var(--pt-ink-2);
}

.pt-burger svg { width: 18px; height: 18px; display: block; }

.pt-main {
    padding: 24px 28px 32px;
    min-width: 0;
}

.pt-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 28px;
    border-top: 1px solid var(--pt-line);
    color: var(--pt-ink-3);
    font-size: 12.5px;
}

.pt-foot a { color: var(--pt-ink-2); text-decoration: none; }
.pt-foot a:hover { color: var(--brand, #4f46e5); }

.pt-scrim {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(16, 23, 42, .55);
    z-index: 40;
}

@media (max-width: 1000px) {
    .pt-shell {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "top" "main" "foot";
    }

    .pt-side {
        position: fixed;
        inset-inline-start: 0;
        top: 0;
        bottom: 0;
        width: 264px;
        z-index: 50;
        transform: translateX(105%);
        transition: transform .22s ease;
    }

    [dir="ltr"] .pt-side { transform: translateX(-105%); }
    .pt-side.is-open { transform: none; }
    .pt-scrim.is-open { display: block; }
    .pt-burger { display: block; }
    .pt-top { padding: 0 16px; }
    .pt-main { padding: 16px; }
    .pt-foot { padding: 14px 16px; }
    .pt-hide-sm { display: none; }
}

/* ══════════════════════════ Page furniture ══════════════════════════ */

.pt-section {
    margin-bottom: 22px;
}

.pt-section:last-child { margin-bottom: 0; }

.pt-section__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.pt-section__head h2 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.pt-section__head p {
    margin: 2px 0 0;
    color: var(--pt-ink-3);
    font-size: 12.5px;
}

.pt-section__more {
    margin-inline-start: auto;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--brand, #4f46e5);
    text-decoration: none;
    white-space: nowrap;
}

/* Panel — the portal's card. Softer than the admin card, no heavy header bar. */
.pt-panel {
    background: var(--pt-surface);
    border: 1px solid var(--pt-line);
    border-radius: var(--pt-r-lg);
    box-shadow: var(--pt-shadow);
}

.pt-panel__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--pt-line-soft);
}

.pt-panel__head h2 {
    margin: 0;
    font-size: 14.5px;
    font-weight: 700;
}

.pt-panel__head p {
    margin: 2px 0 0;
    color: var(--pt-ink-3);
    font-size: 12.5px;
}

.pt-panel__body { padding: 20px; }
.pt-panel__body--flush { padding: 0; }

/* ══════════════════════════ Hero greeting ══════════════════════════ */

.pt-hero {
    position: relative;
    overflow: hidden;
    padding: 26px 28px;
    margin-bottom: 18px;
    border-radius: var(--pt-r-lg);
    background: linear-gradient(135deg, #1e1b4b, #312e81 55%, #4c1d95);
    color: #fff;
}

.pt-hero::after {
    content: "";
    position: absolute;
    inset-inline-end: -60px;
    top: -80px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 62%);
    pointer-events: none;
}

.pt-hero h1 {
    margin: 0;
    font-size: 21px;
    font-weight: 800;
    position: relative;
}

.pt-hero p {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, .78);
    font-size: 13.5px;
    line-height: 1.8;
    max-width: 60ch;
    position: relative;
}

/* ══════════════════════════ Stat tiles ══════════════════════════
   The admin .stats grid assumed a wider column and wrapped into an awkward
   orphan here. Four across, two on tablet, two on phone — never one lonely
   tile on its own row. */

.pt-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

@media (max-width: 1200px) { .pt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px)  { .pt-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } }

.pt-stat {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px;
    background: var(--pt-surface);
    border: 1px solid var(--pt-line);
    border-radius: var(--pt-r);
    box-shadow: var(--pt-shadow);
    text-decoration: none;
    color: inherit;
    transition: transform .15s, box-shadow .15s, border-color .15s;
}

a.pt-stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--pt-shadow-lift);
    border-color: #d9deec;
}

.pt-stat__icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 12px;
}

.pt-stat__icon svg { width: 19px; height: 19px; }

.pt-stat__value {
    display: block;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

.pt-stat__label {
    display: block;
    color: var(--pt-ink-3);
    font-size: 12px;
    margin-top: 2px;
}

.pt-stat--brand .pt-stat__icon { background: #eef0ff; color: var(--brand, #4f46e5); }
.pt-stat--ok    .pt-stat__icon { background: var(--pt-ok-bg); color: var(--pt-ok); }
.pt-stat--warn  .pt-stat__icon { background: var(--pt-warn-bg); color: var(--pt-warn); }
.pt-stat--danger .pt-stat__icon { background: var(--pt-danger-bg); color: var(--pt-danger); }
.pt-stat--mute  .pt-stat__icon { background: #f2f4f9; color: var(--pt-ink-3); }

/* A tile that is at zero should not look like an alarm. */
.pt-stat--quiet .pt-stat__icon { background: #f2f4f9; color: var(--pt-ink-3); }
.pt-stat--quiet .pt-stat__value { color: var(--pt-ink-2); }

/* ══════════════════════════ Two-column body ══════════════════════════ */

.pt-cols {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

@media (max-width: 1100px) { .pt-cols { grid-template-columns: minmax(0, 1fr); } }

/* ══════════════════════════ Licence card ══════════════════════════ */

.pt-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 14px;
}

.lic {
    display: flex;
    flex-direction: column;
    background: var(--pt-surface);
    border: 1px solid var(--pt-line);
    border-radius: var(--pt-r-lg);
    box-shadow: var(--pt-shadow);
    overflow: hidden;
    transition: box-shadow .15s, border-color .15s;
}

.lic:hover { box-shadow: var(--pt-shadow-lift); }

/* A hairline of state along the top, instead of tinting the whole border. */
.lic__stripe { height: 3px; background: var(--pt-line); }
.lic--ok     .lic__stripe { background: var(--pt-ok); }
.lic--warn   .lic__stripe { background: #eab308; }
.lic--danger .lic__stripe { background: var(--pt-danger); }

.lic__head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px 12px;
}

.lic__logo {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 11px;
    background: #eef0ff;
    color: var(--brand, #4f46e5);
}

.lic__logo svg { width: 19px; height: 19px; }

.lic__title { min-width: 0; flex: 1; }

.lic__title strong {
    display: block;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.35;
}

.lic__title small {
    display: block;
    color: var(--pt-ink-3);
    font-size: 11.5px;
    margin-top: 2px;
}

/* The key is what people came for: a copy field, not a paragraph. */
.lic__key {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 0 18px 14px;
    border: 1px solid var(--pt-line);
    border-radius: var(--pt-r-sm);
    overflow: hidden;
    background: #fafbfe;
}

.lic__key code {
    flex: 1;
    min-width: 0;
    padding: 9px 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    letter-spacing: .3px;
    color: var(--pt-ink);
    overflow-x: auto;
    white-space: nowrap;
    direction: ltr;
    text-align: left;
    background: none;
}

.lic__copy {
    flex: none;
    border: 0;
    border-inline-start: 1px solid var(--pt-line);
    background: #fff;
    padding: 0 14px;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    color: var(--brand, #4f46e5);
    cursor: pointer;
    white-space: nowrap;
}

.lic__copy:hover { background: #f5f6fb; }

.lic__facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 0 18px 16px;
}

.pt-fact small {
    display: block;
    color: var(--pt-ink-3);
    font-size: 11px;
    margin-bottom: 3px;
}

.pt-fact strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
}

.lic__foot {
    display: flex;
    gap: 8px;
    padding: 13px 18px;
    border-top: 1px solid var(--pt-line-soft);
    background: #fbfcfe;
    margin-top: auto;
}

/* ══════════════════════════ Meters and pills ══════════════════════════ */

.pt-meter {
    height: 6px;
    border-radius: 999px;
    background: var(--pt-line);
    overflow: hidden;
    margin-top: 6px;
}

.pt-meter__fill {
    height: 100%;
    border-radius: 999px;
    background: var(--brand, #4f46e5);
    transition: width .3s ease;
}

.pt-meter__fill.is-full { background: var(--pt-danger); }
.pt-meter__fill.is-high { background: #eab308; }

.pt-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}

.pt-pill--ok     { background: var(--pt-ok-bg); color: var(--pt-ok); }
.pt-pill--warn   { background: var(--pt-warn-bg); color: var(--pt-warn); }
.pt-pill--danger { background: var(--pt-danger-bg); color: var(--pt-danger); }
.pt-pill--mute   { background: #f2f4f9; color: var(--pt-ink-3); }
.pt-pill--brand  { background: #eef0ff; color: var(--brand, #4f46e5); }

/* ══════════════════════════ Rows ══════════════════════════ */

.pt-rows {
    display: flex;
    flex-direction: column;
}

.pt-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--pt-line-soft);
}

.pt-row:last-child { border-bottom: 0; }
.pt-row:hover { background: #fbfcfe; }

.pt-row__icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: none;
    border-radius: 10px;
    background: #f2f4f9;
    color: var(--pt-ink-2);
}

.pt-row__icon svg { width: 16px; height: 16px; }

.pt-row__main { flex: 1; min-width: 0; }

.pt-row__main strong {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pt-row__main small {
    display: block;
    color: var(--pt-ink-3);
    font-size: 12px;
    margin-top: 2px;
}

.pt-row__end {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: none;
}

/* ══════════════════════════ Alert strip ══════════════════════════ */

.pt-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--pt-r);
    margin-bottom: 16px;
    font-size: 13.5px;
    line-height: 1.8;
}

.pt-alert svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.pt-alert ul { margin: 0; padding-inline-start: 18px; }

.pt-alert--ok     { background: var(--pt-ok-bg); color: #0b6b3d; }
.pt-alert--warn   { background: var(--pt-warn-bg); color: #8a4708; }
.pt-alert--danger { background: var(--pt-danger-bg); color: #9f2626; }

/* ══════════════════════════ Buttons ══════════════════════════
   The portal has its own, so a change to the admin button never surprises a
   customer-facing screen. */

.pt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 38px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: var(--pt-r-sm);
    background: var(--brand, #4f46e5);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: filter .15s, background .15s, border-color .15s;
}

.pt-btn:hover { filter: brightness(1.07); }
.pt-btn svg { width: 15px; height: 15px; }

.pt-btn--ghost {
    background: #fff;
    border-color: var(--pt-line);
    color: var(--pt-ink-2);
}

.pt-btn--ghost:hover { border-color: #cfd5e6; color: var(--pt-ink); filter: none; }

.pt-btn--danger { background: var(--pt-danger); }
.pt-btn--plain { background: transparent; color: var(--pt-ink-2); }
.pt-btn--plain:hover { background: #f2f4f9; filter: none; }

.pt-btn--sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.pt-btn--block { width: 100%; }

/* ══════════════════════════ Tables ══════════════════════════ */

.pt-table-wrap { overflow-x: auto; }

.pt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.pt-table th {
    text-align: start;
    padding: 12px 20px;
    background: #fafbfe;
    border-bottom: 1px solid var(--pt-line);
    color: var(--pt-ink-3);
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}

.pt-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--pt-line-soft);
    vertical-align: middle;
}

.pt-table tr:last-child td { border-bottom: 0; }
.pt-table tbody tr:hover { background: #fbfcfe; }

.pt-num { font-variant-numeric: tabular-nums; font-weight: 700; }
.pt-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; direction: ltr; }
.pt-muted { color: var(--pt-ink-3); }

/* ══════════════════════════ Key/value ══════════════════════════ */

.pt-kv {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 12px 20px;
    margin: 0;
    font-size: 13px;
}

.pt-kv dt { color: var(--pt-ink-3); font-size: 12.5px; }
.pt-kv dd { margin: 0; font-weight: 600; min-width: 0; }

@media (max-width: 520px) {
    .pt-kv { grid-template-columns: 1fr; gap: 4px 0; }
    .pt-kv dd { margin-bottom: 10px; }
}

/* ══════════════════════════ Empty state ══════════════════════════ */

.pt-empty {
    display: grid;
    place-items: center;
    gap: 10px;
    padding: 44px 20px;
    text-align: center;
}

.pt-empty__icon {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: #f2f4f9;
    color: var(--pt-ink-3);
}

.pt-empty__icon svg { width: 22px; height: 22px; }

.pt-empty strong { font-size: 14px; }
.pt-empty p { margin: 0; color: var(--pt-ink-3); font-size: 12.5px; max-width: 38ch; line-height: 1.8; }

/* ══════════════════════════ Forms ══════════════════════════ */

.pt-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }

.pt-field__label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--pt-ink);
}

.pt-field input,
.pt-field select,
.pt-field textarea {
    width: 100%;
    padding: 10px 13px;
    border: 1px solid var(--pt-line);
    border-radius: var(--pt-r-sm);
    background: #fff;
    font: inherit;
    font-size: 13.5px;
    color: var(--pt-ink);
    transition: border-color .15s, box-shadow .15s;
}

.pt-field input:focus,
.pt-field select:focus,
.pt-field textarea:focus {
    outline: 0;
    border-color: var(--brand, #4f46e5);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
}

.pt-field input[readonly] { background: #f7f8fc; color: var(--pt-ink-2); }

.pt-field__hint { font-size: 11.5px; color: var(--pt-ink-3); line-height: 1.7; }
.pt-field__error { font-size: 11.5px; color: var(--pt-danger); }

.pt-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.pt-grid--1 { grid-template-columns: minmax(0, 1fr); }
.pt-span-2 { grid-column: span 2; }

@media (max-width: 700px) {
    .pt-grid { grid-template-columns: minmax(0, 1fr); }
    .pt-span-2 { grid-column: span 1; }
}

.pt-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    cursor: pointer;
}

.pt-check input { width: auto; }

/* ══════════════════════════ Filters ══════════════════════════ */

.pt-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

.pt-filters .pt-field { flex: 1; min-width: 170px; }
.pt-filters .pt-field--wide { flex: 2.2; }

/* ══════════════════════════ Pagination ══════════════════════════ */

.pt-pages {
    padding: 14px 20px;
    border-top: 1px solid var(--pt-line-soft);
}

.pt-pages .pagination { margin: 0; }

/* ══════════════════════════ Auth screens ══════════════════════════ */

body.portal-auth {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 32px 16px;
    background:
        radial-gradient(760px 420px at 100% 0%, rgba(99, 102, 241, .18), transparent 60%),
        radial-gradient(640px 420px at 0% 100%, rgba(139, 92, 246, .14), transparent 58%),
        var(--pt-bg);
}

.pt-auth { width: min(440px, 100%); }

.pt-auth__brand { text-align: center; margin-bottom: 24px; }

.pt-auth__mark {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 14px;
    border-radius: 17px;
    background: linear-gradient(140deg, var(--brand, #4f46e5), #8b5cf6);
    color: #fff;
    font-weight: 800;
    font-size: 19px;
    box-shadow: 0 10px 26px rgba(79, 70, 229, .35);
}

.pt-auth__brand strong { display: block; font-size: 17px; }
.pt-auth__brand small { color: var(--pt-ink-3); font-size: 12.5px; }

.pt-auth__card {
    background: var(--pt-surface);
    border: 1px solid var(--pt-line);
    border-radius: var(--pt-r-lg);
    padding: 28px;
    box-shadow: var(--pt-shadow-lift);
}

.pt-auth__card h1 { margin: 0 0 6px; font-size: 19px; font-weight: 800; }

.pt-auth__lead {
    margin: 0 0 22px;
    color: var(--pt-ink-2);
    font-size: 13px;
    line-height: 1.9;
}

.pt-auth__alt {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--pt-line-soft);
    text-align: center;
    font-size: 12.5px;
    color: var(--pt-ink-3);
}

.pt-auth__alt a { color: var(--brand, #4f46e5); font-weight: 700; text-decoration: none; }

/* ══════════════════════════ Print ══════════════════════════ */

@media print {
    .pt-side, .pt-top, .pt-foot, .pt-btn, .pt-scrim { display: none !important; }
    .pt-shell { grid-template-columns: 1fr; grid-template-areas: "main"; }
    .pt-main { padding: 0; }
    .pt-panel { box-shadow: none; border-color: #ddd; }
}
