/* ================================================
   Internet Heads — Client Portal
   Builds on app.css tokens (--blue, --lime, --ink, fonts, --dot-grid).
   Every class is prefixed .pt- so nothing leaks into the marketing site.
   ================================================ */

:root {
    /* Same typeface as the public site (Inter). Syne's heavy weights render extra-wide. */
    --pt-font:      'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --pt-navy:      #0b1b2e;
    --pt-bg:        #f5f7fa;
    --pt-line:      #e3e8ef;
    --pt-line-soft: #eef1f5;
    --pt-field:     #cfd8e3;
    --pt-muted:     #4a5a6c;   /* 7:1 on white */
    --pt-side-text: #c3d1df;
    --pt-side-mute: #9fb2c6;
    --pt-action:    var(--blue-dark);   /* #0a6aa0 — white text passes AA */
    --pt-action-hover: var(--blue-deeper);
    --pt-warn-bg: #fff1d6; --pt-warn-fg: #7a4a00;
    --pt-ok-bg:   #eaf5da; --pt-ok-fg:   #3b650c;
    --pt-bad-bg:  #fbe7e7; --pt-bad-fg:  #9b2323;
    --pt-info-bg: #e3f0f9; --pt-info-fg: #0a5d8f;
}

/* ---------- Shell ---------- */
.pt-shell { display: flex; min-height: 100vh; background: var(--pt-bg); color: var(--ink); font-family: var(--pt-font); }
.pt-main  { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.pt-side {
    width: 260px; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    display: flex; flex-direction: column; gap: 4px; padding: 24px 16px;
    background-color: var(--pt-navy); background-image: var(--dot-grid); background-size: 22px 22px;
    color: var(--pt-side-text);
}
.pt-side__brand { padding: 0 8px; display: block; }
.pt-side__brand img { height: 34px; width: auto; }
.pt-side__tag { padding: 0 8px; margin-top: 8px; color: var(--lime); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.pt-side__client { margin: 20px 0 8px; padding: 12px 14px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); }
.pt-side__label { display: block; font-size: 11px; color: var(--pt-side-mute); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.pt-side__client strong { display: block; margin-top: 2px; font-size: 15px; color: #fff; }
.pt-side__error { margin: 20px 8px; font-size: 14px; color: #f3c6c6; }
.pt-side__user { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid rgba(255,255,255,.1); display: flex; align-items: center; gap: 10px; }
.pt-side__who { flex: 1; min-width: 0; }
.pt-side__who strong { display: block; color: #fff; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-side__who span { font-size: 12px; color: var(--pt-side-mute); }
.pt-signout { margin: 0; }

.pt-nav { display: flex; flex-direction: column; gap: 2px; }
.pt-nav__head { padding: 18px 12px 6px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; color: var(--pt-side-mute); }
.pt-nav__empty { padding: 6px 12px; font-size: 13px; color: var(--pt-side-mute); }
.pt-nav a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 10px 12px; border-radius: 8px; color: var(--pt-side-text); font-size: 14px; font-weight: 500; line-height: 1.3; }
.pt-nav a::before { content: ""; width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; background: transparent; }
.pt-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.pt-nav a.active { background: rgba(12,130,198,.24); color: #fff; font-weight: 700; }
.pt-nav a.active::before { background: var(--lime); }
.pt-nav__text { flex: 1; }

.pt-badge { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--lime); color: var(--pt-navy); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.pt-count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--pt-warn-bg); color: var(--pt-warn-fg); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

.pt-avatar { width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--pt-action); color: #fff; font-size: 13px; font-weight: 700; }
.pt-avatar--lime  { background: var(--lime); color: var(--pt-navy); }
.pt-avatar--staff { background: var(--pt-navy); color: var(--lime); }

.pt-iconbtn { width: 44px; height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--pt-side-text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.pt-iconbtn:hover { background: rgba(255,255,255,.08); color: #fff; }

.pt-top { min-height: 72px; flex-shrink: 0; padding: 12px 40px; background: #fff; border-bottom: 1px solid var(--pt-line); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pt-crumb { font-size: 14px; color: var(--pt-muted); font-weight: 500; white-space: pre; }
.pt-top__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.pt-content { padding: 32px 40px 64px; width: 100%; max-width: 1320px; }
.pt-loading { color: var(--pt-muted); padding: 24px 0; }

/* ---------- Type ---------- */
.pt-shell, .pt-auth { font-family: var(--pt-font); }
.pt-shell :is(h1, h2, h3, h4, h5, h6), .pt-auth :is(h1, h2, h3, h4, h5, h6) { font-family: var(--pt-font); }
.pt-shell h1, .pt-shell h2, .pt-shell h3, .pt-auth h1, .pt-auth h2 { color: var(--ink); }
.pt-h1 { font-family: var(--pt-font); font-size: 30px; font-weight: 800; letter-spacing: -.025em; line-height: 1.15; margin: 0; }
.pt-h2 { font-family: var(--pt-font); font-size: 18px; font-weight: 700; letter-spacing: -.01em; line-height: 1.3; margin: 0; }
.pt-h3 { font-family: var(--pt-font); font-size: 14px; font-weight: 700; letter-spacing: 0; margin: 18px 0 0; }
.pt-sub { color: var(--pt-muted); font-size: 16px; margin-top: 6px; line-height: 1.5; }
.pt-eyebrow { font-size: 13px; color: var(--pt-muted); font-weight: 700; letter-spacing: .04em; }
.pt-muted { color: var(--pt-muted); }
.pt-ink { color: var(--ink); }
.pt-small { font-size: 13px; }
.pt-prose { margin-top: 10px; font-size: 15px; line-height: 1.6; white-space: pre-line; }
.pt-nowrap { white-space: nowrap; }
.pt-break { overflow-wrap: anywhere; }
.pt-warn { color: var(--pt-warn-fg); }
.pt-ok   { color: var(--pt-ok-fg); }
.pt-info { color: var(--pt-info-fg); }
.pt-blue { color: var(--blue); }
.pt-lime { color: var(--lime); }
.pt-a { color: var(--pt-action); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.pt-a:hover { color: var(--pt-action-hover); }
.pt-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.pt-ul { list-style: disc; padding-left: 20px; margin-top: 12px; font-size: 15px; line-height: 1.7; }

/* ---------- Layout helpers ---------- */
.pt-stack { display: flex; flex-direction: column; gap: 24px; }
.pt-stack--tight { gap: 16px; }
.pt-stack--form { gap: 18px; }
.pt-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.pt-row--top { align-items: flex-start; }
.pt-row--end { align-items: flex-end; }
.pt-row--end-only { justify-content: flex-end; gap: 12px; }
.pt-inline { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; }
.pt-inline--end { justify-content: flex-end; gap: 8px; }
.pt-grow { flex: 1; min-width: 0; }
.pt-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pt-grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.pt-grid--end { align-items: end; }
.pt-grid-main { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.pt-grid-main--even { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.pt-grid-req { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 24px; align-items: start; }
.pt-narrow { max-width: 760px; }

/* ---------- Cards ---------- */
.pt-card { background: #fff; border: 1px solid var(--pt-line); border-radius: 14px; padding: 24px; }
.pt-card--accent { border: 2px solid var(--blue); }
.pt-card--ok  { background: #f3f9ea; border-color: #cfe5b0; }
.pt-card--bad { background: #fdf3f3; border-color: #f0c9c9; }
.pt-card--dashed { border-style: dashed; border-color: #9fb2c6; }
.pt-card--dark { background-color: var(--pt-navy); background-image: var(--dot-grid); background-size: 22px 22px; border: 0; color: #fff; }
.pt-card--dark .pt-h2 { color: #fff; }
.pt-card--flush { padding: 0; }
.pt-card__head { padding: 20px 24px; border-bottom: 1px solid var(--pt-line); }
.pt-card__body { padding: 0 24px; }
.pt-card__foot { padding: 16px 24px 24px; border-top: 1px solid var(--pt-line); display: flex; flex-direction: column; gap: 10px; }
.pt-empty { padding: 20px 0; text-align: center; color: var(--pt-muted); font-size: 15px; }
.pt-card.pt-empty { padding: 32px 24px; }

.pt-stat__label { font-size: 13px; color: var(--pt-muted); font-weight: 600; }
.pt-stat__value { font-family: var(--pt-font); font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin-top: 8px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pt-stat__note { font-size: 13px; color: var(--pt-muted); margin-top: 6px; }

.pt-project { display: flex; flex-direction: column; gap: 18px; }
.pt-project__name { font-family: var(--pt-font); font-size: 20px; font-weight: 700; margin-top: 4px; }
.pt-addcard { display: flex; align-items: center; justify-content: center; min-height: 56px; border: 2px dashed var(--pt-field); border-radius: 14px; color: var(--pt-action); font-weight: 600; font-size: 15px; }
.pt-addcard:hover { border-color: var(--blue); background: #fff; }

.pt-progress { height: 8px; border-radius: 4px; background: #e8edf3; overflow: hidden; }
.pt-progress > span { display: block; height: 100%; border-radius: 4px; background: var(--blue); }

.pt-list-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--pt-line-soft); }
.pt-list-row--first { border-top: 0; }
.pt-rowtitle { font-weight: 600; }
.pt-rowsub { font-size: 13px; color: var(--pt-muted); margin-top: 2px; }
.pt-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.pt-dot--warn { background: #e8a317; }
.pt-dot--info { background: var(--blue); }
.pt-fileicon { width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0; background: var(--pt-info-bg); color: var(--pt-info-fg); display: inline-flex; align-items: center; justify-content: center; }

.pt-metric { padding: 14px; border-radius: 10px; background: var(--pt-bg); }
.pt-metric span { display: block; font-size: 13px; color: var(--pt-muted); font-weight: 600; }
.pt-metric strong { display: block; margin-top: 4px; font-family: var(--pt-font); font-size: 24px; }

.pt-budget > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; border-top: 1px solid var(--pt-line-soft); font-size: 14px; }
.pt-budget dt { color: var(--pt-muted); }
.pt-budget dd { margin: 0; font-weight: 600; }
.pt-budget__total { border-top: 2px solid var(--pt-line) !important; font-size: 16px !important; }
.pt-budget__total dt { color: var(--ink); font-weight: 700; }
.pt-budget__total dd { font-weight: 700; }

.pt-process__step { display: flex; gap: 12px; padding: 16px; }
.pt-process__step strong { font-size: 14px; }
.pt-process__step p { font-size: 13px; color: var(--pt-muted); margin-top: 3px; line-height: 1.45; }
.pt-numstep { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--lime); color: var(--pt-navy); font-family: var(--pt-font); font-weight: 700; font-size: 13px; }
.pt-numstep--dark { background: var(--pt-navy); color: var(--lime); }
.pt-next { display: flex; gap: 14px; }
.pt-next strong { font-size: 15px; }
.pt-next p { font-size: 14px; color: var(--pt-side-text); margin-top: 3px; line-height: 1.5; }

.pt-context { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: 10px; background: var(--pt-bg); }
.pt-context__label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--pt-muted); }

.pt-msg { display: flex; gap: 14px; padding: 18px 0; border-top: 1px solid var(--pt-line-soft); }
.pt-card__body .pt-msg:first-child { border-top: 0; }
.pt-msg p { margin-top: 6px; font-size: 15px; line-height: 1.55; white-space: pre-line; }

.pt-signature { margin-top: 16px; padding: 14px 0; border-top: 1px solid #cfe5b0; border-bottom: 1px solid #cfe5b0; font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-size: 26px; color: var(--ink); }
.pt-okmark { width: 30px; height: 30px; border-radius: 50%; background: var(--lime); color: var(--pt-navy); display: inline-flex; align-items: center; justify-content: center; }
.pt-oktext { color: #2f520a !important; }
.pt-badtext { color: #7d1c1c !important; }

.pt-reqcard { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 14px; background: #fff; border: 2px solid var(--pt-line); color: var(--ink); }
.pt-reqcard:hover { border-color: #9fcbe8; }
.pt-reqcard.on { border-color: var(--blue); }
.pt-reqcard__title { font-size: 15px; }

.pt-rolekey { margin-top: 12px; padding: 14px 16px; border-radius: 10px; background: var(--pt-bg); display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--pt-muted); line-height: 1.5; }
.pt-rolekey strong { color: var(--ink); }

.pt-total { padding: 12px 16px; border-radius: 10px; background-color: var(--pt-navy); background-image: var(--dot-grid); background-size: 22px 22px; color: #fff; }
.pt-total span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--pt-side-mute); }
.pt-total strong { display: block; font-family: var(--pt-font); font-size: 26px; color: var(--lime); }

.pt-subform { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--pt-line); }
.pt-dropzone { margin-top: 8px; padding: 18px; border: 2px dashed var(--pt-field); border-radius: 12px; display: flex; flex-direction: column; gap: 8px; }
.pt-file { font: 14px var(--pt-font); }

/* ---------- Pills ---------- */
.pt-pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; background: var(--pt-line-soft); color: var(--pt-muted); }
.pt-pill--warn { background: var(--pt-warn-bg); color: var(--pt-warn-fg); }
.pt-pill--ok   { background: var(--pt-ok-bg);   color: var(--pt-ok-fg); }
.pt-pill--bad  { background: var(--pt-bad-bg);  color: var(--pt-bad-fg); }
.pt-pill--info { background: var(--pt-info-bg); color: var(--pt-info-fg); }
.pt-pill--dark { background: var(--pt-navy);    color: #fff; }

/* ---------- Tables ---------- */
.pt-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pt-table th { text-align: left; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--pt-muted); padding: 8px 12px 8px 0; }
.pt-table td { padding: 12px 12px 12px 0; border-top: 1px solid var(--pt-line-soft); vertical-align: middle; }
.pt-table td:last-child, .pt-table th:last-child { padding-right: 0; text-align: right; }

/* ---------- Tabs & chips ---------- */
.pt-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--pt-line); flex-wrap: wrap; }
.pt-tabs a { min-height: 48px; padding: 0 16px; display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--pt-muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.pt-tabs a:hover { color: var(--ink); }
.pt-tabs a.active { color: var(--pt-action); border-bottom-color: var(--blue); }

.pt-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.pt-chip { min-height: 44px; padding: 0 16px; border-radius: 22px; border: 1px solid var(--pt-field); background: #fff; color: var(--ink); font: 600 14px var(--pt-font); cursor: pointer; display: inline-flex; align-items: center; }
.pt-chip:hover { border-color: var(--blue); }
.pt-chip.on { background: var(--pt-navy); border-color: var(--pt-navy); color: #fff; }
.pt-chip--link { min-height: 36px; font-size: 13px; }

/* ---------- Buttons ---------- */
.pt-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 0; background: var(--pt-action); color: #fff; font: 600 14px var(--pt-font); cursor: pointer; white-space: nowrap; text-decoration: none; }
.pt-btn:hover { background: var(--pt-action-hover); color: #fff; }
.pt-btn:disabled { opacity: .45; cursor: not-allowed; }
.pt-btn--ghost { background: #fff; color: var(--ink); border: 1px solid var(--pt-field); }
.pt-btn--ghost:hover { background: var(--pt-bg); color: var(--ink); }
.pt-btn--danger { background: var(--pt-bad-fg); }
.pt-btn--danger:hover { background: #7d1c1c; }
.pt-btn--lg { min-height: 48px; font-size: 15px; padding: 0 22px; }
.pt-btn--block { width: 100%; }
.pt-link { min-height: 44px; padding: 0; border: 0; background: none; color: var(--pt-action); font: 600 14px var(--pt-font); cursor: pointer; display: inline-flex; align-items: center; }
.pt-link:hover { color: var(--pt-action-hover); text-decoration: underline; }

/* ---------- Forms ---------- */
.pt-form { display: flex; flex-direction: column; gap: 20px; }
.pt-field { display: flex; flex-direction: column; gap: 8px; }
.pt-field__row { display: flex; justify-content: space-between; align-items: baseline; }
.pt-field label, .pt-label { font-size: 14px; font-weight: 600; color: var(--ink); }
.pt-input { width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--pt-field); border-radius: 10px; background: #fff; color: var(--ink); font: 15px/1.4 var(--pt-font); }
textarea.pt-input { line-height: 1.5; resize: vertical; }
.pt-input[readonly] { background: var(--pt-bg); color: var(--pt-muted); }
.pt-input--sm { min-height: 40px; padding: 6px 10px; font-size: 14px; width: auto; }
.pt-hint { font-size: 13px; color: var(--pt-muted); }
.pt-invalid, .validation-message { color: var(--pt-bad-fg); font-size: 13px; }
.pt-check { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; font-size: 14px; line-height: 1.45; cursor: pointer; }
.pt-check input { width: 18px; height: 18px; margin-top: 1px; flex-shrink: 0; accent-color: var(--pt-action); }
.pt-check--field { align-self: end; }
.pt-toggle { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 8px 0; border-top: 1px solid var(--pt-line-soft); cursor: pointer; }
.pt-toggle input { width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--pt-action); }
.pt-toggle strong { display: block; font-size: 15px; }
.pt-toggle small { display: block; font-size: 13px; color: var(--pt-muted); margin-top: 2px; }

.pt-input:focus-visible, .pt-btn:focus-visible, .pt-link:focus-visible, .pt-chip:focus-visible,
.pt-nav a:focus-visible, .pt-tabs a:focus-visible, .pt-reqcard:focus-visible, .pt-a:focus-visible, .pt-iconbtn:focus-visible {
    outline: 2px solid var(--blue); outline-offset: 2px;
}

.pt-alert { padding: 12px 16px; border-radius: 10px; background: var(--pt-bad-bg); color: #7d1c1c; font-size: 14px; line-height: 1.5; }
.pt-alert--ok   { background: var(--pt-ok-bg); color: #2f520a; }
.pt-alert--info { background: var(--pt-info-bg); color: #0a4a73; }

/* ---------- Flash ---------- */
.pt-flash { position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 500; max-width: min(640px, calc(100vw - 32px)); padding: 12px 12px 12px 20px; border-radius: 12px; background: var(--pt-navy); color: #fff; font-size: 15px; line-height: 1.45; box-shadow: 0 12px 32px rgba(11,27,46,.28); display: flex; gap: 12px; align-items: center; }
.pt-flash::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); flex-shrink: 0; }
.pt-flash--error::before { background: #f08a8a; }
.pt-flash__close { width: 32px; height: 32px; border: 0; border-radius: 6px; background: transparent; color: var(--pt-side-text); font-size: 20px; cursor: pointer; }
.pt-flash__close:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ---------- Phase stepper ---------- */
.pt-steps { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pt-step__row { display: flex; align-items: center; }
.pt-step__dot { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--pt-field); background: #fff; color: var(--pt-muted); font-size: 13px; font-weight: 700; }
.pt-step__bar { flex: 1; height: 3px; margin: 0 10px; border-radius: 2px; background: #dfe5ec; }
.pt-step:last-child .pt-step__bar { visibility: hidden; }
.pt-step__label { margin-top: 10px; font-size: 14px; font-weight: 700; }
.pt-step--done .pt-step__dot { background: var(--lime); border-color: var(--lime); color: var(--pt-navy); }
.pt-step--done .pt-step__bar { background: var(--lime); }
.pt-step--current .pt-step__dot { background: var(--pt-action); border-color: var(--pt-action); color: #fff; }
.pt-step--upcoming .pt-step__label { color: var(--pt-muted); }

/* ---------- Sign-in pages ---------- */
.pt-auth { display: flex; min-height: 100vh; background: #fff; font-family: var(--pt-font); color: var(--ink); }
.pt-auth__panel { position: relative; overflow: hidden; width: 44%; max-width: 640px; padding: 56px 64px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; background-color: var(--pt-navy); background-image: var(--dot-grid); background-size: 22px 22px; }
.pt-auth__glow { position: absolute; width: 520px; height: 520px; left: -160px; top: 40%; border-radius: 50%; background: radial-gradient(circle, rgba(12,130,198,.28), rgba(12,130,198,0) 70%); pointer-events: none; }
.pt-auth__brand, .pt-auth__copy, .pt-auth__features { position: relative; }
.pt-auth__brand img { height: 40px; width: auto; }
.pt-auth__headline { font-family: var(--pt-font); font-size: clamp(40px, 4.4vw, 60px); line-height: 1.05; font-weight: 800; letter-spacing: -.035em; color: #fff; }
.pt-auth__headline span { display: block; }
.pt-auth__lede { margin-top: 24px; max-width: 440px; color: var(--pt-side-text); font-size: 17px; line-height: 1.55; }
.pt-auth__features { display: flex; gap: 12px 28px; flex-wrap: wrap; color: var(--pt-side-mute); font-size: 13px; font-weight: 500; }
.pt-auth__form { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.pt-auth__box { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 22px; }
.pt-auth__foot { padding-top: 18px; border-top: 1px solid var(--pt-line); font-size: 14px; color: var(--pt-muted); line-height: 1.5; }
.pt-auth-simple { min-height: 60vh; display: flex; align-items: center; justify-content: center; padding: 40px 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .pt-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pt-grid-req { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
    .pt-shell { flex-direction: column; }
    .pt-side { width: 100%; height: auto; position: static; padding: 16px; }
    .pt-side__user { margin-top: 12px; }
    .pt-top { padding: 12px 16px; }
    .pt-content { padding: 24px 16px 48px; }
    .pt-grid-main, .pt-grid-main--even, .pt-grid-2 { grid-template-columns: minmax(0, 1fr); }
    .pt-row { flex-wrap: wrap; }
    .pt-steps { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .pt-step { display: flex; align-items: center; gap: 12px; }
    .pt-step__bar { display: none; }
    .pt-step__label { margin-top: 0; }
    .pt-table { display: block; overflow-x: auto; }
    .pt-auth__panel { display: none; }
}

@media (max-width: 560px) {
    .pt-grid-4 { grid-template-columns: minmax(0, 1fr); }
    .pt-h1 { font-size: 26px; }
}

/* ---------- Tasks ---------- */
.pt-count--neutral { background: var(--pt-line-soft); color: var(--pt-muted); }
.pt-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: start; }
.pt-board__col { background: #eef2f6; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.pt-board__head { padding: 2px 4px 4px; }
.pt-board__empty { padding: 8px 4px; }
.pt-task { background: #fff; border: 1px solid var(--pt-line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.pt-task__title { font-weight: 600; font-size: 14px; line-height: 1.35; }
.pt-task__meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--pt-muted); align-items: center; }
.pt-pill--xs { padding: 2px 8px; font-size: 11px; }

/* ---------- CartSync subscription ---------- */
.pt-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pt-subcard { display: flex; flex-direction: column; gap: 8px; color: var(--ink); }
.pt-subcard:hover { border-color: var(--blue); }
.pt-stat__value--sm { font-size: 20px; }
.pt-link--inline { min-height: 0; font-size: 13px; }

.pt-meter { padding: 16px; border-radius: 12px; background: var(--pt-bg); display: flex; flex-direction: column; gap: 8px; }
.pt-meter__label { font-size: 13px; font-weight: 600; color: var(--pt-muted); }
.pt-meter__value { font-family: var(--pt-font); font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pt-meter__value span { font-family: var(--pt-font); font-size: 14px; font-weight: 500; color: var(--pt-muted); }
.pt-meter__track { height: 8px; border-radius: 4px; background: #dde4ec; overflow: hidden; }
.pt-meter__fill { display: block; height: 100%; border-radius: 4px; background: var(--blue); }
.pt-meter__fill--warn { background: #d08a0a; }
.pt-meter__fill--bad  { background: var(--pt-bad-fg); }

.pt-minis > div { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-top: 1px solid var(--pt-line-soft); }
.pt-minis span { font-size: 13px; color: var(--pt-muted); }
.pt-minis strong { font-size: 18px; }

.pt-chart { display: flex; flex-direction: column; gap: 10px; }
.pt-chart__plot { position: relative; height: 170px; padding-top: 18px; border-bottom: 1px solid var(--pt-line); }
.pt-chart__max { position: absolute; top: 0; left: 0; font-size: 12px; color: var(--pt-muted); }
.pt-chart__plot::before { content: ""; position: absolute; left: 0; right: 0; top: 18px; border-top: 1px dashed var(--pt-line); }
.pt-chart__bars { height: 100%; display: flex; align-items: flex-end; gap: 2px; }
.pt-chart__bar { flex: 1; min-width: 3px; background: var(--blue); border-radius: 4px 4px 0 0; }
.pt-chart__bar:hover { background: var(--blue-deeper); }
.pt-chart__axis { display: flex; justify-content: space-between; font-size: 12px; color: var(--pt-muted); }
.pt-details summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--pt-action); min-height: 32px; display: flex; align-items: center; }
.pt-details[open] summary { margin-bottom: 8px; }
.pt-chip--sm { min-height: 36px; padding: 0 12px; font-size: 13px; }

.pt-plan { border: 1px solid var(--pt-line); border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.pt-plan--current { border: 2px solid var(--lime); background: #f7fbef; }
.pt-plan--rec { border-color: #9fcbe8; }
.pt-plan__name { font-family: var(--pt-font); font-size: 18px; font-weight: 700; }
.pt-plan__price { font-family: var(--pt-font); font-size: 30px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pt-plan__price span { font-family: var(--pt-font); font-size: 14px; font-weight: 500; color: var(--pt-muted); margin-left: 4px; }
.pt-checks { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14px; flex: 1; }
.pt-checks li { position: relative; padding-left: 22px; }
.pt-checks li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 10px; height: 6px; border-left: 2px solid var(--lime-dark); border-bottom: 2px solid var(--lime-dark); transform: rotate(-45deg); }
.pt-confirm { padding: 12px; border-radius: 10px; background: var(--pt-info-bg); display: flex; flex-direction: column; gap: 10px; }

@media (max-width: 1100px) {
    .pt-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pt-grid-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
    .pt-board { grid-template-columns: minmax(0, 1fr); }
}

/* ---- CartMello billing ---- */
.pt-linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--pt-action); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.pt-linkbtn:hover { color: var(--pt-action-hover); }
.pt-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pt-secret { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; background: var(--pt-bg); border: 1px solid var(--pt-line); border-radius: 8px; padding: 10px 12px; word-break: break-all; user-select: all; }

/* Admin → Emails */
.pt-email-preview { width: 100%; height: 560px; border: 1px solid var(--pt-line-soft); border-radius: 10px; background: #fff; }
.pt-dns { display: grid; gap: 4px; padding: 10px 0; border-top: 1px solid var(--pt-line-soft); }
.pt-dns code { word-break: break-all; }


/* ==========================================================================
   Portal look v2 (Oct 2026): grouped icon sidebar, breadcrumb top bar, tinted icon
   badges on stat cards and section cards, initials avatars, dotted status pills,
   calmer tables. Same palette as before; these rules refine the ones above.
   ========================================================================== */
:root {
    --pt-tint-blue-bg: #e3f0f9;   --pt-tint-blue-fg: #0a6aa0;
    --pt-tint-green-bg: #e9f5dc;  --pt-tint-green-fg: #3b7a12;
    --pt-tint-amber-bg: #fff3dc;  --pt-tint-amber-fg: #b26a00;
    --pt-tint-purple-bg: #eeeafb; --pt-tint-purple-fg: #5b43b5;
    --pt-tint-red-bg: #fbe9e9;    --pt-tint-red-fg: #a52a2a;
    --pt-tint-slate-bg: #edf1f5;  --pt-tint-slate-fg: #4a5a6c;
    --pt-row-hover: #f7fafd;
    --pt-row-selected: #eaf4fb;
    --pt-shadow-sm: 0 1px 2px rgba(11, 27, 46, .04);
}

.pt-icon { display: block; flex-shrink: 0; }

/* ---------- Sidebar ---------- */
.pt-side { width: 248px; padding: 22px 14px 16px; gap: 0; background-image: none; }
.pt-side__brand img { height: 32px; }
.pt-side__tag { margin-top: 6px; color: var(--pt-side-mute); font-size: 11px; letter-spacing: .14em; }
.pt-nav { gap: 2px; }
.pt-nav__head { padding: 22px 12px 8px; font-size: 11px; letter-spacing: .1em; color: var(--pt-side-mute); }
.pt-nav a { min-height: 42px; padding: 9px 12px; gap: 12px; border-radius: 8px; font-size: 14.5px; font-weight: 500; }
.pt-nav a::before { content: none; }
.pt-nav a .pt-icon { color: var(--pt-side-mute); }
.pt-nav a:hover .pt-icon { color: #fff; }
.pt-nav a.active { background: var(--pt-action); color: #fff; font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.pt-nav a.active .pt-icon { color: #fff; }
.pt-nav__sub { padding-left: 44px !important; min-height: 36px !important; font-size: 13.5px !important; }
.pt-nav__empty { padding: 4px 12px 4px 44px; }
.pt-side__client { margin: 18px 0 2px; }
.pt-side__user { padding: 14px 4px 0; gap: 8px; }
.pt-side__me { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px; margin: -6px; border-radius: 10px; color: inherit; }
.pt-side__me:hover { background: rgba(255,255,255,.06); }
.pt-side__me .pt-icon { color: var(--pt-side-mute); }
.pt-side__me:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- Top bar ---------- */
.pt-top { min-height: 64px; padding: 10px 40px; }
.pt-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; font-size: 14px; color: var(--pt-muted); }
.pt-crumbs li + li::before { content: "/"; margin-right: 6px; color: #9fb0c1; }
.pt-crumbs li.is-current { color: var(--ink); font-weight: 600; }
.pt-top__right { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.pt-userchip { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 8px 4px 4px; border-radius: 999px; color: var(--ink); font-size: 14px; font-weight: 600; border-left: 1px solid var(--pt-line); padding-left: 16px; border-radius: 0 999px 999px 0; }
.pt-userchip:hover { color: var(--pt-action); }
.pt-userchip .pt-icon { color: var(--pt-muted); }
.pt-userchip:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ---------- Page header ---------- */
.pt-h1 { font-size: 32px; }
.pt-h1:focus { outline: none; }
.pt-pagehead { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; }
.pt-pagehead__text { min-width: 0; flex: 1; }
.pt-pagehead__titlerow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 2px; }
.pt-pagehead__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pt-eyebrow { font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--pt-muted); }

/* ---------- Tinted icon badge ---------- */
.pt-iconbadge { width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--pt-tint-blue-bg); color: var(--pt-tint-blue-fg); }
.pt-iconbadge--sm { width: 36px; height: 36px; }
.pt-iconbadge--blue   { background: var(--pt-tint-blue-bg);   color: var(--pt-tint-blue-fg); }
.pt-iconbadge--green  { background: var(--pt-tint-green-bg);  color: var(--pt-tint-green-fg); }
.pt-iconbadge--amber  { background: var(--pt-tint-amber-bg);  color: var(--pt-tint-amber-fg); }
.pt-iconbadge--purple { background: var(--pt-tint-purple-bg); color: var(--pt-tint-purple-fg); }
.pt-iconbadge--red    { background: var(--pt-tint-red-bg);    color: var(--pt-tint-red-fg); }
.pt-iconbadge--slate  { background: var(--pt-tint-slate-bg);  color: var(--pt-tint-slate-fg); }

/* ---------- Stat cards ---------- */
.pt-card { box-shadow: var(--pt-shadow-sm); }
.pt-kpi { display: flex; align-items: center; gap: 18px; padding: 20px 22px; color: var(--ink); min-width: 0; }
.pt-kpi--link:hover { border-color: #9fcbe8; }
.pt-kpi--link:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.pt-kpi .pt-iconbadge { width: 56px; height: 56px; }
.pt-kpi__text { display: flex; flex-direction: column; min-width: 0; }
.pt-kpi__value { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.pt-kpi__value--money { font-size: 24px; margin-top: 2px; }
.pt-kpi__label { font-size: 15px; color: var(--pt-muted); line-height: 1.35; }
.pt-kpi__note { font-size: 13px; color: var(--pt-muted); margin-top: 2px; }
.pt-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }

/* ---------- Section cards ---------- */
.pt-section { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 20px; padding: 24px; align-items: start; }
.pt-section__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 16px; flex-wrap: wrap; min-height: 52px; align-content: center; }
.pt-section__titles { min-width: 0; padding-top: 12px; }
.pt-section__head:has(.pt-section__sub) .pt-section__titles { padding-top: 2px; }
.pt-section__title { font-size: 20px; font-weight: 700; letter-spacing: -.015em; line-height: 1.3; margin: 0; color: var(--ink); }
.pt-section__sub { font-size: 14px; color: var(--pt-muted); margin-top: 4px; line-height: 1.45; }
.pt-section__actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 4px; }
.pt-section__body { margin-top: 16px; }
.pt-section__body:empty { display: none; }
.pt-section--flush .pt-section__body { margin-left: -96px; margin-right: -24px; margin-bottom: -24px; }
.pt-section--flush .pt-table th:first-child, .pt-section--flush .pt-table td:first-child { padding-left: 24px; }
.pt-section--flush .pt-table th:last-child, .pt-section--flush .pt-table td:last-child { padding-right: 24px; }

/* ---------- Avatars ---------- */
.pt-av { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 50%; font-weight: 600; letter-spacing: .01em; }
.pt-av--sm { width: 32px; height: 32px; font-size: 12px; }
.pt-av--md { width: 40px; height: 40px; font-size: 14px; }
.pt-av--lg { width: 56px; height: 56px; font-size: 18px; }
.pt-av--square { border-radius: 12px; }
.pt-av--t0 { background: var(--pt-tint-blue-bg);   color: var(--pt-tint-blue-fg); }
.pt-av--t1 { background: var(--pt-tint-purple-bg); color: var(--pt-tint-purple-fg); }
.pt-av--t2 { background: var(--pt-tint-green-bg);  color: var(--pt-tint-green-fg); }
.pt-av--t3 { background: var(--pt-tint-amber-bg);  color: var(--pt-tint-amber-fg); }
.pt-av--t4 { background: #fde8e1; color: #a5401f; }
.pt-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pt-who > div { min-width: 0; }

/* ---------- Status pills: soft tint + dot ---------- */
.pt-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; font-weight: 500; }
.pt-pill--ok::before, .pt-pill--warn::before, .pt-pill--bad::before, .pt-pill--info::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.pt-pill--ok::before { background: #4caf1a; }
.pt-pill--warn::before { background: #e08a00; }
.pt-pill--bad::before { background: #d23b3b; }
.pt-pill--info::before { background: var(--blue); }

/* ---------- Tables ---------- */
.pt-table th { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; color: var(--pt-muted); padding: 12px 16px 12px 0; border-bottom: 1px solid var(--pt-line); }
.pt-table td { padding: 14px 16px 14px 0; border-top: 0; border-bottom: 1px solid var(--pt-line-soft); }
.pt-table tbody tr:last-child td { border-bottom: 0; }
.pt-table--hover tbody tr:hover td { background: var(--pt-row-hover); }
.pt-table tr.is-selected td { background: var(--pt-row-selected) !important; }
.pt-tr-link { cursor: pointer; }
.pt-table .pt-chev { width: 32px; color: var(--pt-muted); }
.pt-rowtitle { color: var(--ink); }

/* ---------- Toolbar, search, select ---------- */
.pt-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; padding: 16px 24px; border-bottom: 1px solid var(--pt-line); }
.pt-search { position: relative; flex: 1 1 280px; max-width: 420px; }
.pt-search .pt-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--pt-muted); pointer-events: none; }
.pt-search .pt-input { padding-left: 42px; }
.pt-select { min-width: 180px; width: auto; }
.pt-tablecard { padding: 0; overflow: hidden; }
.pt-tablecard .pt-table th:first-child, .pt-tablecard .pt-table td:first-child { padding-left: 24px; }
.pt-tablecard .pt-table th:last-child, .pt-tablecard .pt-table td:last-child { padding-right: 24px; }
.pt-tablecard .pt-empty { padding: 32px 24px; }

/* ---------- Tabs ---------- */
.pt-tabs { gap: 8px; }
.pt-tabs a { padding: 0 14px; font-size: 15px; font-weight: 500; }
.pt-tabs a.active { font-weight: 600; }
.pt-tabcount { min-width: 24px; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--pt-line-soft); color: var(--pt-muted); font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.pt-tabs a.active .pt-tabcount { background: var(--pt-tint-blue-bg); color: var(--pt-tint-blue-fg); }
.pt-tabbtns { display: flex; gap: 4px; border-bottom: 1px solid var(--pt-line); flex-wrap: wrap; }
.pt-tabbtn { min-height: 48px; padding: 0 14px; border: 0; background: none; border-bottom: 3px solid transparent; margin-bottom: -1px; color: var(--pt-muted); font: 500 15px var(--pt-font); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.pt-tabbtn:hover { color: var(--ink); }
.pt-tabbtn.active { color: var(--pt-action); border-bottom-color: var(--blue); font-weight: 600; }
.pt-tabbtn:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }

/* ---------- Buttons ---------- */
.pt-btn { border-radius: 8px; }
.pt-btn .pt-icon { margin-left: -2px; }
.pt-btn--icon { width: 44px; padding: 0; }

/* ---------- Detail lists (label above value) ---------- */
.pt-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0; }
.pt-facts > div { padding: 4px 20px; border-left: 1px solid var(--pt-line); }
.pt-facts > div:first-child { padding-left: 0; border-left: 0; }
.pt-facts dt { font-size: 13px; color: var(--pt-muted); font-weight: 500; }
.pt-facts dd { margin: 4px 0 0; font-size: 16px; font-weight: 500; color: var(--ink); }

.pt-note { display: flex; align-items: center; gap: 10px; color: var(--pt-muted); font-size: 14px; }
.pt-banner { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-radius: 12px; border: 1px solid #cfe5b0; background: #f3f9ea; }
.pt-banner--info { border-color: #bcdcf0; background: #f1f8fd; }
.pt-banner__text { flex: 1; min-width: 0; }
.pt-banner__text strong { display: block; font-size: 16px; }
.pt-banner__text span { font-size: 14px; color: var(--pt-muted); }

/* Forms inside section cards: two or three columns that collapse on small screens */
.pt-formgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px 16px; }
.pt-col-12 { grid-column: span 12; } .pt-col-8 { grid-column: span 8; } .pt-col-6 { grid-column: span 6; }
.pt-col-4 { grid-column: span 4; } .pt-col-3 { grid-column: span 3; }
.pt-formfoot { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

@media (max-width: 900px) {
    .pt-top { padding: 10px 16px; }
    .pt-userchip__name { display: none; }
    .pt-section { grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 20px; }
    .pt-section__icon { width: 44px; height: 44px; }
    .pt-section--flush .pt-section__body { margin-left: -20px; margin-right: -20px; margin-bottom: -20px; }
    .pt-toolbar { padding: 14px 16px; }
    .pt-facts > div { padding: 8px 0; border-left: 0; }
    .pt-col-8, .pt-col-6, .pt-col-4, .pt-col-3 { grid-column: span 12; }
}
.pt-money { display: flex; align-items: stretch; }
.pt-money span { display: inline-flex; align-items: center; padding: 0 14px; border: 1px solid var(--pt-field); border-right: 0; border-radius: 10px 0 0 10px; background: var(--pt-bg); color: var(--pt-muted); font-weight: 600; }
.pt-money .pt-input { border-radius: 0 10px 10px 0; }
.pt-advanced { border-radius: 10px; background: var(--pt-bg); padding: 0 16px; }
.pt-advanced[open] { padding-bottom: 16px; }
.pt-advanced summary { list-style: none; display: flex; align-items: center; gap: 10px; min-height: 48px; cursor: pointer; flex-wrap: wrap; }
.pt-advanced summary::-webkit-details-marker { display: none; }
.pt-advanced__chev { transition: transform .15s ease; transform: rotate(-90deg); color: var(--pt-muted); }
.pt-advanced[open] .pt-advanced__chev { transform: none; }
.pt-advanced__title { font-weight: 600; font-size: 14px; }
.pt-advanced__meta { margin-left: auto; display: inline-flex; align-items: center; gap: 14px; font-size: 13px; color: var(--pt-muted); flex-wrap: wrap; }
.pt-advanced summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 8px; }
.pt-inlineform { padding: 20px 24px; margin: 0 0 4px; background: var(--pt-bg); border-top: 1px solid var(--pt-line); border-bottom: 1px solid var(--pt-line); }
.pt-section--flush .pt-empty { padding: 24px; }
.pt-rowlink { color: var(--ink); text-decoration: none; }
.pt-rowlink:hover { color: var(--pt-action); text-decoration: underline; }
.pt-rowlink:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 2px; }
.pt-clientpanel { padding: 0; overflow: hidden; }
.pt-clientpanel__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 22px 24px 18px; }
.pt-clientpanel__body { padding: 24px; }
.pt-clientgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
.pt-clientgrid > div { padding: 0 24px; border-left: 1px solid var(--pt-line); }
.pt-clientgrid > div:first-child { padding-left: 0; border-left: 0; }
.pt-clientgrid > div:last-child { padding-right: 0; }
.pt-miniproject { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--pt-line); border-radius: 10px; color: var(--ink); }
.pt-miniproject:hover { border-color: #9fcbe8; background: var(--pt-row-hover); }
.pt-miniproject strong { display: block; font-size: 14px; }
.pt-miniproject .pt-icon:last-child { color: var(--pt-muted); }
.pt-miniproject:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.pt-link .pt-icon { margin-left: 4px; }
@media (max-width: 1100px) {
    .pt-clientgrid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .pt-clientgrid > div { padding: 0; border-left: 0; }
}
.pt-pill--dark { background: #e4eaf1; color: #1d3550; }
select.pt-input { appearance: none; -webkit-appearance: none; padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234a5a6c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
select.pt-input--sm { padding-right: 34px; background-position: right 10px center; }
.pt-toolbar--bare { padding: 0; border: 0; }
.pt-caps { text-transform: uppercase; letter-spacing: .06em; font-size: 12px; font-weight: 600; }
.pt-grid-req { grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); }
.pt-reqlist { padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.pt-reqlist .pt-empty { padding: 24px 16px; }
.pt-reqrow { display: flex; gap: 14px; align-items: flex-start; padding: 14px 14px 14px 12px; border-radius: 10px; border-left: 3px solid transparent; color: var(--ink); }
.pt-reqrow + .pt-reqrow { border-top: 1px solid var(--pt-line-soft); border-radius: 0; }
.pt-reqrow:hover { background: var(--pt-row-hover); }
.pt-reqrow.on { background: var(--pt-row-selected); border-left-color: var(--blue); border-radius: 10px; border-top-color: transparent; }
.pt-reqrow.on + .pt-reqrow { border-top-color: transparent; }
.pt-reqrow:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.pt-reqrow__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pt-reqrow__top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.pt-reqrow__top strong { font-size: 15px; font-weight: 600; }
.pt-reqdetail { padding: 28px; }
.pt-reqdetail__title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin: 8px 0 6px; }
.pt-reqdetail__facts { margin: 20px 0 8px; padding: 16px 0; border-top: 1px solid var(--pt-line); border-bottom: 1px solid var(--pt-line); }
.pt-okmark { width: 36px; height: 36px; background: #4c9a17; color: #fff; }
.pt-banner--bad { border-color: #f0c9c9; background: #fdf3f3; }
.pt-banner--warn { border-color: #f3d9a4; background: #fff8ea; }

/* Section cards in narrow columns: icon sits beside the title, body uses the full width. */
.pt-grid-main > *, .pt-grid-2 > *, .pt-grid-req > *, .pt-grid-main--even > * { container-type: inline-size; }
@container (max-width: 520px) {
    .pt-section { grid-template-columns: 40px minmax(0, 1fr); gap: 4px 14px; padding: 20px; }
    .pt-section__icon { width: 40px; height: 40px; }
    .pt-section__icon .pt-icon { width: 20px; height: 20px; }
    .pt-section__main { display: contents; }
    .pt-section__head { grid-column: 2; min-height: 40px; }
    .pt-section__titles { padding-top: 7px; }
    .pt-section__head:has(.pt-section__sub) .pt-section__titles { padding-top: 0; }
    .pt-section__title { font-size: 18px; }
    .pt-section__body { grid-column: 1 / -1; margin-top: 12px; }
    .pt-section--flush .pt-section__body { margin-left: -20px; margin-right: -20px; margin-bottom: -20px; }
    .pt-section--flush .pt-table th:first-child, .pt-section--flush .pt-table td:first-child { padding-left: 20px; }
}
@media (min-width: 901px) { .pt-shell { background: linear-gradient(to right, var(--pt-navy) 248px, var(--pt-bg) 248px); } }
.pt-addcard { gap: 10px; }
.pt-list-row:first-child { border-top: 0; padding-top: 0; }
.pt-process__step .pt-numstep, .pt-next .pt-numstep { background: var(--pt-tint-blue-bg); color: var(--pt-tint-blue-fg); }
.pt-section .pt-next p { color: var(--pt-muted); }
@media (max-width: 900px) {
    .pt-side { width: 100%; height: auto; position: static; }
    .pt-tablecard { overflow-x: auto; }
    .pt-clientpanel__head { padding: 18px 16px; }
    .pt-clientpanel__body { padding: 18px 16px; }
    .pt-pagehead__actions { width: 100%; }
}
.pt-table, .pt-tablecard, .pt-section, .pt-card { position: relative; }
@media (max-width: 1100px) { .pt-grid-req { grid-template-columns: minmax(0, 1fr); } }
.pt-menubtn { display: none; }
@media (max-width: 900px) {
    .pt-side { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 12px; padding: 14px 16px; }
    .pt-side__brand, .pt-side__tag { grid-column: 1; }
    .pt-side__tag { margin-top: 2px; }
    .pt-menubtn { grid-column: 2; grid-row: 1 / span 2; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,.18); background: transparent; color: #fff; font: 600 14px var(--pt-font); cursor: pointer; }
    .pt-menubtn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
    .pt-side > .pt-nav, .pt-side > .pt-side__user, .pt-side > .pt-side__client, .pt-side > .pt-side__error { display: none; grid-column: 1 / -1; }
    .pt-side.is-open > .pt-nav, .pt-side.is-open > .pt-side__user, .pt-side.is-open > .pt-side__client, .pt-side.is-open > .pt-side__error { display: flex; }
    .pt-side.is-open > .pt-side__client { display: block; }
}

/* ---------- Drawer ---------- */
.pt-drawer-backdrop { position: fixed; inset: 0; z-index: 400; background: rgba(11, 27, 46, .32); animation: pt-fade .15s ease-out; }
.pt-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 401; width: min(460px, 100vw); background: #fff; display: flex; flex-direction: column; box-shadow: -12px 0 40px rgba(11, 27, 46, .18); animation: pt-slide .18s ease-out; }
.pt-drawer__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--pt-line); }
.pt-drawer__title { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -.015em; }
.pt-drawer__body { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.pt-drawer__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--pt-line); }
.pt-iconbtn--light { color: var(--pt-muted); }
.pt-iconbtn--light:hover { background: var(--pt-bg); color: var(--ink); }
@keyframes pt-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pt-slide { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pt-drawer, .pt-drawer-backdrop { animation: none; } }

/* ---------- Row menu ---------- */
.pt-rowmenu { position: relative; display: inline-block; }
.pt-rowmenu__backdrop { position: fixed; inset: 0; z-index: 300; }
.pt-rowmenu__list { position: absolute; right: 0; top: calc(100% + 4px); z-index: 301; min-width: 200px; padding: 6px; background: #fff; border: 1px solid var(--pt-line); border-radius: 10px; box-shadow: 0 12px 32px rgba(11, 27, 46, .16); display: flex; flex-direction: column; text-align: left; }
.pt-rowmenu__list button, .pt-rowmenu__list a { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: var(--ink); font: 500 14px var(--pt-font); cursor: pointer; text-align: left; white-space: nowrap; }
.pt-rowmenu__list button:hover, .pt-rowmenu__list a:hover { background: var(--pt-bg); }
.pt-rowmenu__list .is-danger { color: var(--pt-bad-fg); }
.pt-rowmenu__list hr { border: 0; border-top: 1px solid var(--pt-line-soft); margin: 4px 0; }
.pt-rowmenu__list .pt-icon { color: var(--pt-muted); }
.pt-rowmenu__list .is-danger .pt-icon { color: inherit; }

/* ---------- Scope items ---------- */
.pt-items { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.pt-items__row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 6px 6px 12px; border: 1px solid var(--pt-line); border-radius: 10px; background: #fff; }
.pt-items__num { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; background: var(--pt-line-soft); color: var(--pt-muted); font-size: 12px; font-weight: 600; }
.pt-items__row .pt-input { flex: 1; }
.pt-insetcard { border: 1px solid var(--pt-line); border-radius: 12px; background: #fff; overflow: hidden; }
.pt-insetcard__bar { display: flex; align-items: center; gap: 16px; padding: 16px 20px; background: var(--pt-bg); border-bottom: 1px solid var(--pt-line); }
.pt-insetcard .pt-table th:first-child, .pt-insetcard .pt-table td:first-child { padding-left: 20px; }
.pt-insetcard .pt-table th:last-child, .pt-insetcard .pt-table td:last-child { padding-right: 12px; }
.pt-mscheck { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; border: 2px solid #a5b3c2; background: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; color: #fff; }
.pt-mscheck:hover { border-color: var(--blue); }
.pt-mscheck--inprogress { border-color: var(--blue); box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 12px var(--pt-tint-blue-bg); }
.pt-mscheck--complete { border-color: #3d8b13; background: #3d8b13; }
.pt-mscheck:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.pt-emptystate { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 32px 20px; text-align: center; }
.pt-emptystate .pt-iconbadge { margin-bottom: 6px; }
.pt-filebtn { position: relative; overflow: hidden; }
.pt-filebtn__input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.pt-filebtn:focus-within { outline: 2px solid var(--blue); outline-offset: 2px; }
.pt-filetype { width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; letter-spacing: .02em; }
.pt-filetype--red { background: #fde7e5; color: #c0281f; }
.pt-filetype--purple { background: var(--pt-tint-purple-bg); color: var(--pt-tint-purple-fg); }
.pt-filetype--green { background: var(--pt-tint-green-bg); color: var(--pt-tint-green-fg); }
.pt-filetype--blue { background: var(--pt-tint-blue-bg); color: var(--pt-tint-blue-fg); }
.pt-filetype--amber { background: var(--pt-tint-amber-bg); color: var(--pt-tint-amber-fg); }
.pt-filetype--slate { background: #1f2a37; color: #fff; }
.pt-iconbtn--blue { color: var(--pt-action); }
.pt-dropzone2 { position: relative; margin-top: 16px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 28px 20px; border: 2px dashed var(--pt-field); border-radius: 12px; text-align: center; cursor: pointer; background: #fff; }
.pt-dropzone2:hover, .pt-dropzone2:focus-within { border-color: var(--blue); background: #f7fbfe; }
.pt-dropzone2 .pt-iconbadge { margin-bottom: 6px; }
.pt-dropzone2--empty { padding: 44px 20px; margin-top: 0; }
.pt-dropzone2__input { position: absolute; inset: 0; opacity: 0; cursor: pointer; font-size: 0; }
.pt-backlink { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; margin-bottom: 4px; color: var(--pt-action); font-size: 14px; font-weight: 600; }
.pt-backlink:hover { text-decoration: underline; }
.pt-summary > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 8px 0; font-size: 15px; }
.pt-summary dt { color: var(--pt-muted); }
.pt-summary dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.pt-summary__total { margin-top: 8px; padding-top: 16px !important; border-top: 1px solid var(--pt-line); }
.pt-summary__total dt { color: var(--ink); font-weight: 700; }
.pt-summary__total dd { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.pt-sticky { position: sticky; top: 24px; }
.pt-content--withbar { padding-bottom: 120px; }
.pt-actionbar { position: fixed; left: 248px; right: 0; bottom: 0; z-index: 200; display: flex; justify-content: flex-end; gap: 10px; padding: 14px 40px; background: rgba(255,255,255,.96); border-top: 1px solid var(--pt-line); box-shadow: 0 -6px 20px rgba(11,27,46,.06); }
.pt-actionbar > :first-child { margin-right: auto; }
@media (max-width: 900px) { .pt-actionbar { left: 0; padding: 12px 16px; } .pt-sticky { position: static; } }

/* ---------- Segmented control, radio rows, info box (New order) ---------- */
.pt-seg { display: inline-flex; padding: 3px; border: 1px solid var(--pt-field); border-radius: 10px; background: #fff; gap: 2px; }
.pt-seg__opt { min-width: 150px; min-height: 40px; padding: 0 18px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: 600 14px var(--pt-font); cursor: pointer; }
.pt-seg__opt:hover { background: var(--pt-bg); }
.pt-seg__opt.on { background: var(--pt-action); color: #fff; }
.pt-seg__opt:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.pt-seg--soft .pt-seg__opt.on { background: var(--pt-tint-blue-bg); color: var(--pt-tint-blue-fg); box-shadow: inset 0 0 0 1px #bcdcf0; }
.pt-seg--full { display: flex; }
.pt-seg--full .pt-seg__opt { flex: 1; min-width: 0; }
.pt-infobox { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 14px 16px; border-radius: 10px; background: var(--pt-bg); }
.pt-infobox__side { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; justify-content: center; }
.pt-asidegroup { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--pt-line); }
.pt-radio { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.pt-radio input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--pt-action); }
.pt-radio strong { display: block; font-size: 15px; font-weight: 600; }
.pt-radio small { display: block; font-size: 13px; color: var(--pt-muted); margin-top: 2px; line-height: 1.45; }
.pt-check strong { font-weight: 600; }
.pt-lines td { vertical-align: top; }
.pt-input--bare { border-color: transparent; padding-left: 0; padding-right: 0; min-height: 0; background: transparent; }
.pt-input--bare:hover { border-color: transparent; }
.pt-input--bare:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.pt-lines__title { font-weight: 600; padding-top: 4px; padding-bottom: 2px; }
.pt-lines__desc { font-size: 13px; color: var(--pt-muted); padding-top: 0; padding-bottom: 4px; }
.pt-money--sm span { padding: 0 10px; }
.pt-summary p { margin: 2px 0 0; }
@media (max-width: 900px) { .pt-infobox__side { align-items: flex-start; } .pt-seg__opt { min-width: 0; } }
.pt-lines__amount { padding-top: 24px !important; font-weight: 600; }
.pt-lines td:last-child { padding-top: 16px; }
.pt-lines__repeat { margin-top: 6px; width: auto; }
.pt-lines td:nth-child(2), .pt-lines td:nth-child(3) { padding-top: 14px; }

/* ---- Products catalog, SLAs ---- */
.pt-planchip { display: inline-flex; align-items: flex-start; gap: 6px; margin-top: 8px; padding: 6px 10px; border-radius: 8px; background: var(--pt-tint-green-bg); color: var(--pt-tint-green-fg); font-size: 13px; line-height: 1.4; }
.pt-planchip svg { flex-shrink: 0; margin-top: 2px; }
.pt-picklist { display: flex; flex-direction: column; gap: 10px; }
.pt-pick { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; width: 100%; padding: 14px 16px; border: 1px solid var(--pt-line); border-radius: 12px; background: #fff; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.pt-pick:hover, .pt-pick:focus-visible { border-color: var(--blue); box-shadow: 0 0 0 3px var(--pt-info-bg); outline: none; }
.pt-pick__main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pt-pick__main .pt-rowtitle { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pt-pick__price { font-weight: 700; white-space: nowrap; text-align: right; }
.pt-pick__price small { display: block; font-weight: 500; color: var(--pt-muted); font-size: 12px; }
.pt-clamp1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; max-width: 360px; }
.pt-row-muted td { color: var(--pt-muted); }
.pt-table tfoot td { border-top: 1px solid var(--pt-line); }
.pt-meter--compact { padding: 0; background: none; gap: 6px; }
.pt-meter--compact .pt-meter__value { font-size: 18px; }
.pt-meter--compact .pt-meter__value span { font-size: 13px; }
.pt-meter--compact .pt-meter__track { height: 6px; }
