/* LocoLink partner portal, V5 (2026-10-10).
   Builds on styles.css (theme tokens), v5.css and v5-site.css. Everything is
   scoped to .pp so it never leaks into the shared nav and footer. Works in the
   light and the dark theme (data-theme on <html>, set by script.js). */

.pp {
    --pp-max: 1180px;
    --pp-amber: #f59e0b;
    --pp-orange: #f97316;
    --pp-violet: #8b5cf6;
    --pp-pink: #d946ef;
    --pp-card: rgba(255, 255, 255, .035);
    --pp-card-solid: #121524;
    --pp-line: rgba(255, 255, 255, .09);
    --pp-field: rgba(255, 255, 255, .05);
    --pp-soft: rgba(255, 255, 255, .045);
    --pp-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 26px 60px -34px rgba(0, 0, 0, .8);
    --pp-tabbar: rgba(10, 12, 22, .78);
    --pp-nav: 70px; /* the site nav is position: fixed */
    position: relative;
    isolation: isolate;
    overflow-x: clip;
    padding-top: var(--pp-nav);
    color: var(--text-primary);
}
[data-theme="light"] .pp {
    --pp-card: rgba(255, 255, 255, .88);
    --pp-card-solid: #ffffff;
    --pp-line: rgba(17, 17, 40, .08);
    --pp-field: #f5f5fa;
    --pp-soft: #f7f7fb;
    --pp-shadow: 0 1px 2px rgba(30, 30, 70, .05), 0 24px 54px -30px rgba(30, 30, 70, .32);
    --pp-tabbar: rgba(248, 248, 251, .86);
}
.pp *, .pp *::before, .pp *::after { box-sizing: border-box; }
.pp [hidden] { display: none !important; }
.pp-wrap { max-width: var(--pp-max); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }

/* Soft V5 glows behind the whole portal */
.pp::before {
    content: ""; position: absolute; inset: -120px -10% auto; height: 900px; z-index: -1; pointer-events: none;
    background:
        radial-gradient(38% 36% at 50% 12%, rgba(245, 158, 11, .18), transparent 70%),
        radial-gradient(30% 34% at 12% 36%, rgba(59, 130, 246, .13), transparent 70%),
        radial-gradient(30% 34% at 88% 30%, rgba(139, 92, 246, .14), transparent 70%);
    filter: blur(6px);
}

/* ---------- Shared pieces ---------- */
.pp-pill { display: inline-flex; align-items: center; gap: 10px; padding: 6px 15px 6px 7px; border-radius: 999px;
    background: var(--pp-card); border: 1px solid var(--pp-line); font-size: 13px; font-weight: 700; color: var(--text-secondary);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.pp-pill b { padding: 3px 10px; border-radius: 999px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
    background: linear-gradient(135deg, var(--pp-amber), var(--pp-orange)); color: #1a1204; }
.pp-eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .12em;
    text-transform: uppercase; color: var(--pp-amber); }
.pp-eyebrow::before { content: ""; width: 16px; height: 2px; border-radius: 2px; background: currentColor; }
.pp-grad { background: linear-gradient(95deg, var(--pp-amber) 8%, #fbbf24 55%, #fde68a);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    padding: 0 .06em .14em .02em; margin: 0 -.06em -.14em -.02em; }
.pp-card { position: relative; background: var(--pp-card); border: 1px solid var(--pp-line); border-radius: 24px;
    box-shadow: var(--pp-shadow); padding: clamp(20px, 2.6vw, 28px);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.pp-card h2, .pp-card h3 { margin: 0; color: var(--text-primary); }
.pp-h2 { font-size: clamp(22px, 2.4vw, 28px); line-height: 1.12; font-weight: 900; letter-spacing: -.03em; margin: 0; }
.pp-h3 { font-size: 18px; line-height: 1.25; font-weight: 800; letter-spacing: -.015em; margin: 0; }
.pp-lead { margin: 8px 0 0; color: var(--text-secondary); font-size: 15px; line-height: 1.6; max-width: 60ch; }
.pp-muted { color: var(--text-muted); font-size: 13px; line-height: 1.55; }
.pp-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.pp-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(16px, 2vw, 22px); }
.pp-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 2vw, 22px); }
.pp-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 20px); }
.pp-section-h { display: flex; align-items: center; gap: 12px; margin: 34px 0 14px; }
.pp-section-h:first-child { margin-top: 0; }
.pp-section-h h3 { font-size: 13px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-secondary); margin: 0; white-space: nowrap; }
.pp-section-h::after { content: ""; flex: 1; height: 1px; background: var(--pp-line); }

/* Buttons */
.pp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; padding: 0 20px; border-radius: 999px;
    font: inherit; font-size: 15px; font-weight: 800; text-decoration: none; cursor: pointer; border: 1px solid transparent;
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease; white-space: nowrap; }
.pp-btn svg { width: 17px; height: 17px; flex: none; }
.pp-btn-primary { background: linear-gradient(135deg, var(--pp-amber), var(--pp-orange)); color: #1a1204; box-shadow: 0 10px 26px rgba(245, 158, 11, .30); }
.pp-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(245, 158, 11, .40); }
.pp-btn-ghost { background: var(--pp-soft); color: var(--text-primary); border-color: var(--pp-line); }
.pp-btn-ghost:hover { border-color: rgba(245, 158, 11, .45); transform: translateY(-1px); }
.pp-btn-sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.pp-btn-block { width: 100%; }
.pp-btn:disabled { opacity: .6; cursor: progress; transform: none; }
.pp-btn:focus-visible, .pp-tab:focus-visible, .pp-seg button:focus-visible, .pp-input:focus-visible { outline: 2px solid var(--pp-amber); outline-offset: 2px; }
.pp-link { color: var(--pp-amber); font-weight: 700; text-decoration: none; }
.pp-link:hover { text-decoration: underline; }

/* Form fields */
.pp-field { display: grid; gap: 7px; }
.pp-field > span, .pp-label { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-secondary); }
.pp-input, .pp-select { width: 100%; min-height: 50px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--pp-line);
    background: var(--pp-field); color: var(--text-primary); font: inherit; font-size: 16px; transition: border-color .16s ease, box-shadow .16s ease; }
.pp-input:focus, .pp-select:focus { outline: none; border-color: rgba(245, 158, 11, .7); box-shadow: 0 0 0 4px rgba(245, 158, 11, .16); }
.pp-input.is-error { border-color: #ef4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, .14); }
.pp-select { appearance: none; -webkit-appearance: none; padding-right: 42px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5l3 3 3-3' fill='none' stroke='%23f59e0b' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center; background-size: 12px; }
.pp-error { min-height: 1.4em; margin: 0; color: #ef4444; font-size: 13px; font-weight: 600; }
.pp-ok { margin: 0; padding: 12px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; font-weight: 600;
    background: rgba(34, 197, 94, .12); border: 1px solid rgba(34, 197, 94, .3); color: var(--text-primary); }
.pp-spinner { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
    animation: pp-spin .7s linear infinite; vertical-align: -3px; }
@keyframes pp-spin { to { transform: rotate(360deg); } }

/* Chips */
.pp-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 700;
    background: var(--pp-soft); border: 1px solid var(--pp-line); color: var(--text-secondary); white-space: nowrap; }
.pp-chip i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }
.pp-chip.is-paused i, .pp-chip.is-expired i { background: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .2); }
.pp-chip.is-disabled i { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .2); }
.pp-code-chip { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .06em; color: var(--text-primary); font-weight: 800; }
.pp-copy-chip { cursor: pointer; }
.pp-copy-chip:hover { border-color: rgba(245, 158, 11, .5); }
.pp-copy-chip svg { width: 14px; height: 14px; color: var(--pp-amber); }

/* ---------- Logged out: hero + sign-in card ---------- */
.pp-auth { padding: clamp(36px, 6vw, 88px) 0 clamp(56px, 8vw, 110px); }
.pp-auth-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: clamp(28px, 5vw, 76px); align-items: center; }
.pp-h1 { font-size: clamp(38px, 4.6vw, 66px); line-height: .98; letter-spacing: -.045em; font-weight: 900; margin: 22px 0 18px; }
.pp-h1 .pp-grad { display: block; }
.pp-auth .pp-lead { font-size: clamp(16px, 1.5vw, 19px); }
.pp-benefits { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 16px; }
.pp-benefits li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.pp-benefits b { display: block; font-size: 16px; font-weight: 800; color: var(--text-primary); }
.pp-benefits li > div > span { display: block; margin-top: 2px; font-size: 14px; line-height: 1.5; color: var(--text-secondary); }
.pp-ic { width: 44px; height: 44px; border-radius: 13px; display: flex; align-items: center; justify-content: center; color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 10px 20px -10px rgba(0, 0, 0, .5); }
.pp-ic svg { width: 22px; height: 22px; }
.pp-ic.a { background: linear-gradient(145deg, #fcd34d, #f59e0b 50%, #f97316); color: #1a1204; }
.pp-ic.v { background: linear-gradient(145deg, #a78bfa, #8b5cf6 50%, #d946ef); }
.pp-ic.b { background: linear-gradient(145deg, #38bdf8, #2563eb); }
.pp-ic.g { background: linear-gradient(145deg, #86efac, #22c55e 50%, #059669); }

.pp-plats { margin-top: 30px; }
.pp-plats p { margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--text-secondary); }
.pp-plats ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pp-plat { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 999px; background: var(--pp-card);
    border: 1px solid var(--pp-line); font-size: 13px; font-weight: 800; color: var(--text-primary); }
.pp-plat i { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; color: #fff; flex: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.pp-plat i svg { width: 15px; height: 15px; }
.pi-win { background: linear-gradient(145deg, #38bdf8, #2563eb); }
.pi-mac { background: linear-gradient(145deg, #a1a1aa, #3f3f46); }
.pi-linux { background: linear-gradient(145deg, #ffffff, #e4e1dc); box-shadow: inset 0 0 0 1px rgba(20, 20, 40, .12) !important; }
.pi-iphone { background: linear-gradient(145deg, #34d399, #059669); }
.pi-ipad { background: linear-gradient(145deg, #f472b6, #db2777); }
.pi-watch { background: linear-gradient(145deg, #fb7185, #e11d48); }
.pi-android { background: linear-gradient(145deg, #0d4a63, #073042); }

.pp-auth-card { max-width: 460px; width: 100%; justify-self: end; padding: clamp(24px, 3vw, 34px); }
.pp-auth-card .pp-h2 { margin-bottom: 6px; }
.pp-auth-card form { display: grid; gap: 16px; margin-top: 22px; }
.pp-auth-foot { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--pp-line); display: grid; gap: 8px; font-size: 14px; color: var(--text-secondary); }
.pp-auth-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pp-textbtn { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; font-weight: 700; color: var(--pp-amber); cursor: pointer; }
.pp-textbtn:hover { text-decoration: underline; }

/* ---------- Dashboard ---------- */
.pp-dash { padding: clamp(28px, 4vw, 52px) 0 clamp(56px, 7vw, 96px); }
.pp-dash-head { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.pp-avatar { width: 64px; height: 64px; border-radius: 20px; flex: none; display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 900; letter-spacing: -.03em; color: #1a1204;
    background: linear-gradient(145deg, #fde68a, var(--pp-amber) 45%, var(--pp-orange)); box-shadow: 0 14px 30px -14px rgba(245, 158, 11, .8); }
.pp-dash-title { flex: 1; min-width: 220px; }
.pp-dash-title h1 { margin: 0; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.05; font-weight: 900; letter-spacing: -.04em; }
.pp-dash-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.pp-tabbar { position: sticky; top: var(--pp-nav); z-index: 30; margin: 24px 0 26px; padding: 8px 0;
    background: var(--pp-tabbar); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
    border-top: 1px solid var(--pp-line); border-bottom: 1px solid var(--pp-line); }
.pp-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.pp-tabs::-webkit-scrollbar { display: none; }
.pp-tab { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: 999px;
    border: 1px solid transparent; background: none; color: var(--text-secondary); font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.pp-tab svg { width: 17px; height: 17px; }
.pp-tab:hover { color: var(--text-primary); background: var(--pp-soft); }
.pp-tab[aria-selected="true"] { background: linear-gradient(135deg, var(--pp-amber), var(--pp-orange)); color: #1a1204; box-shadow: 0 8px 20px -8px rgba(245, 158, 11, .6); }

/* Deal tiles: amber = customer discount, violet = commission (like the welcome mail) */
.pp-deal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 20px); }
.pp-deal-tile { position: relative; overflow: hidden; border-radius: 24px; padding: clamp(20px, 2.6vw, 28px); min-height: 150px;
    display: flex; flex-direction: column; justify-content: flex-end; }
.pp-deal-tile::after { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 100% 0%, rgba(255, 255, 255, .35), transparent 60%); pointer-events: none; }
.pp-deal-tile b { font-size: clamp(46px, 6vw, 68px); line-height: .9; font-weight: 900; letter-spacing: -.05em; }
.pp-deal-tile strong { display: block; margin-top: 10px; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.pp-deal-tile span { display: block; margin-top: 3px; font-size: 14px; font-weight: 600; opacity: .85; }
.pp-deal-tile.a { background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 45%, #f97316 100%); color: #1a1204; box-shadow: 0 22px 44px -22px rgba(245, 158, 11, .75); }
.pp-deal-tile.v { background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 45%, #d946ef 100%); color: #fff; box-shadow: 0 22px 44px -22px rgba(139, 92, 246, .75); }
.pp-deal-note { margin: 10px 2px 0; }

.pp-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 18px); }
.pp-kpi { padding: 20px 20px 18px; }
.pp-kpi small { display: block; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-secondary); }
.pp-kpi strong { display: block; margin-top: 10px; font-size: clamp(24px, 2.6vw, 32px); line-height: 1.05; font-weight: 900; letter-spacing: -.035em; color: var(--text-primary); word-break: break-word; }
.pp-kpi span { display: block; margin-top: 6px; font-size: 13px; color: var(--text-muted); }
.pp-kpi.is-amber strong { color: var(--pp-amber); }

.pp-linkbox { display: flex; gap: 8px; align-items: stretch; margin-top: 14px; }
.pp-linkbox .pp-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; min-width: 0; }
.pp-qr { display: inline-flex; flex-direction: column; align-items: center; gap: 10px; }
.pp-qr-box { width: 100%; max-width: 220px; aspect-ratio: 1; padding: 14px; border-radius: 20px; background: #fff;
    box-shadow: 0 0 0 1px rgba(17, 17, 40, .08), 0 18px 36px -22px rgba(0, 0, 0, .6); }
.pp-qr-box svg { display: block; width: 100%; height: 100%; }
.pp-share-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: clamp(18px, 3vw, 32px); align-items: start; }
.pp-share-side { display: grid; justify-items: center; gap: 12px; text-align: center; }
.pp-socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.pp-social { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 16px 0 12px; border-radius: 999px; font-size: 14px; font-weight: 800;
    text-decoration: none; color: #fff; border: 0; cursor: pointer; font-family: inherit; }
.pp-social svg { width: 18px; height: 18px; }
.pp-social.wa { background: #25d366; color: #05300f; }
.pp-social.fb { background: #1877f2; }
.pp-social.x { background: #111; }
.pp-social.li { background: #0a66c2; }
.pp-social.em { background: var(--pp-soft); color: var(--text-primary); border: 1px solid var(--pp-line); }
.pp-social.native { background: linear-gradient(135deg, var(--pp-amber), var(--pp-orange)); color: #1a1204; }
.pp-builder { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }

.pp-steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; counter-reset: pp-step; }
.pp-steps li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; font-size: 15px; line-height: 1.5; color: var(--text-secondary); counter-increment: pp-step; }
.pp-steps li::before { content: counter(pp-step); width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 14px; color: #1a1204; background: linear-gradient(135deg, var(--pp-amber), var(--pp-orange)); }

/* Tables (sales, payouts) */
.pp-table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.pp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pp-table th { text-align: left; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--text-secondary);
    padding: 10px 12px; border-bottom: 1px solid var(--pp-line); white-space: nowrap; }
.pp-table td { padding: 13px 12px; border-bottom: 1px solid var(--pp-line); color: var(--text-primary); vertical-align: middle; }
.pp-table tr:last-child td { border-bottom: 0; }
.pp-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pp-tag { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.pp-tag.paid { background: rgba(34, 197, 94, .14); color: #16a34a; }
.pp-tag.owed { background: rgba(245, 158, 11, .16); color: #d97706; }
.pp-tag.refund { background: rgba(239, 68, 68, .12); color: #dc2626; }
.pp-shared { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: rgba(139, 92, 246, .14); color: #8b5cf6; }
.pp-empty { padding: 26px 16px; text-align: center; color: var(--text-muted); font-size: 14px; line-height: 1.55; }
.pp-strike { text-decoration: line-through; color: var(--text-muted); }

/* Licence */
.pp-lic-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(16px, 2vw, 22px); align-items: start; }
.pp-lic-code { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.pp-lic-code code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: clamp(17px, 2vw, 22px); font-weight: 800;
    letter-spacing: .04em; padding: 12px 16px; border-radius: 14px; background: var(--pp-field); border: 1px solid var(--pp-line); color: var(--text-primary); word-break: break-all; }
.pp-meter { margin-top: 18px; }
.pp-meter-bar { height: 10px; border-radius: 999px; background: var(--pp-field); border: 1px solid var(--pp-line); overflow: hidden; }
.pp-meter-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--pp-amber), var(--pp-orange)); transition: width .4s ease; }
.pp-meter-row { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 14px; font-weight: 700; color: var(--text-secondary); }
.pp-devices { display: grid; gap: 10px; margin-top: 14px; }
.pp-device { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px;
    background: var(--pp-soft); border: 1px solid var(--pp-line); }
.pp-device-ic { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; }
.pp-device-ic svg { width: 20px; height: 20px; }
.pp-device > div > b { display: block; font-size: 15px; font-weight: 800; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-device > div > span { display: block; margin-top: 2px; font-size: 13px; color: var(--text-muted); line-height: 1.45; }
.pp-demo { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }

/* Materials */
.pp-mat-tools { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.pp-seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: var(--pp-soft); border: 1px solid var(--pp-line); }
.pp-seg button { min-height: 34px; padding: 0 14px; border-radius: 999px; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 800;
    color: var(--text-secondary); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.pp-seg button[aria-pressed="true"] { background: var(--pp-card-solid); color: var(--text-primary); box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.pp-seg .ll-flag { width: 18px; height: 13px; border-radius: 3px; }
.pp-mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: clamp(14px, 1.8vw, 20px); align-items: start; }
.pp-mat { display: flex; flex-direction: column; padding: 14px; gap: 14px; }
.pp-mat-preview { position: relative; overflow: hidden; border-radius: 16px; background: #0b1224; border: 1px solid var(--pp-line); width: 100%; }
.pp-mat-preview.is-tall { width: 62%; margin: 0 auto; }
.pp-mat-preview.light { background: #f3f3f7; }
.pp-mat-preview iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; pointer-events: none; background: transparent; }
.pp-mat-preview .pp-spinner { position: absolute; left: 50%; top: 50%; margin: -8px 0 0 -8px; color: var(--pp-amber); }
.pp-mat-body { display: grid; gap: 4px; padding: 0 4px; }
.pp-mat-body b { font-size: 16px; font-weight: 800; color: var(--text-primary); }
.pp-mat-body span { font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
.pp-mat-fmt { display: inline-flex; align-self: flex-start; margin-bottom: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 800;
    letter-spacing: .06em; text-transform: uppercase; background: rgba(245, 158, 11, .14); color: #d97706; }
.pp-mat-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding: 0 4px 2px; }

.pp-texts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 20px); }
.pp-text { display: flex; flex-direction: column; gap: 12px; }
.pp-text pre { margin: 0; padding: 14px 16px; border-radius: 14px; background: var(--pp-field); border: 1px solid var(--pp-line);
    font: inherit; font-size: 14px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; color: var(--text-primary); max-height: 260px; overflow: auto; }
.pp-banner-preview { max-width: 100%; overflow-x: auto; padding: 16px; border-radius: 16px; background: var(--pp-soft); border: 1px dashed var(--pp-line); }
.pp-banner-preview > * { flex: none; }
.pp-code { margin-top: 12px; }
.pp-code summary { cursor: pointer; font-size: 13px; font-weight: 800; color: var(--text-secondary); }
.pp-code textarea { margin-top: 10px; width: 100%; min-height: 120px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--pp-line); background: var(--pp-field);
    color: var(--text-primary); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; line-height: 1.5; resize: vertical; }
.pp-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.pp-shot { margin: 0; padding: 10px; display: grid; gap: 10px; }
.pp-shot-img { position: relative; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: var(--pp-field); border: 1px solid var(--pp-line);
    display: flex; align-items: center; justify-content: center; }
.pp-shot-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pp-shot figcaption { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 4px 2px; font-size: 13px; color: var(--text-secondary); }
.pp-shot figcaption b { display: block; color: var(--text-primary); font-size: 14px; font-weight: 800; }
.pp-logo-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.pp-logo-row img { width: 72px; height: 72px; border-radius: 18px; box-shadow: 0 12px 28px -14px rgba(0, 0, 0, .7); }

/* Account */
.pp-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.pp-form-grid .full { grid-column: 1 / -1; }
.pp-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; }

.pp-help { margin-top: 34px; text-align: center; font-size: 14px; color: var(--text-muted); }

/* Toast */
.pp-toast { position: fixed; left: 50%; bottom: 26px; z-index: 1000; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
    display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 999px; font-size: 14px; font-weight: 800;
    background: #111118; color: #fff; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .7); transition: opacity .2s ease, transform .2s ease; max-width: calc(100vw - 32px); }
.pp-toast::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #22c55e; flex: none; }
.pp-toast.error::before { background: #ef4444; }
.pp-toast.show { opacity: 1; transform: translate(-50%, 0); }
[data-theme="light"] .pp-toast { background: #111118; }

/* Booting: hide everything until the session check is done (no login flash) */
.pp[data-state="booting"] .pp-auth, .pp[data-state="booting"] .pp-dash { visibility: hidden; }
.pp-boot { display: none; }
.pp[data-state="booting"] .pp-boot { display: flex; justify-content: center; padding: 120px 0; color: var(--pp-amber); }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
    .pp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pp-lic-grid, .pp-share-grid { grid-template-columns: minmax(0, 1fr); }
    .pp-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .pp-auth-grid { grid-template-columns: minmax(0, 1fr); }
    .pp-auth-card { justify-self: stretch; max-width: none; }
    .pp-grid-2, .pp-texts, .pp-builder { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
    .pp-deal { grid-template-columns: minmax(0, 1fr); }
    .pp-deal-tile { min-height: 120px; }
    .pp-kpi { padding: 16px; }
    .pp-grid-3, .pp-form-grid { grid-template-columns: minmax(0, 1fr); }
    .pp-dash-head { gap: 14px; }
    .pp-avatar { width: 52px; height: 52px; border-radius: 16px; font-size: 20px; }
    .pp-dash-head .pp-logout { width: 100%; }
    .pp-linkbox { flex-direction: column; }
    .pp-linkbox .pp-btn { width: 100%; }
    /* Tables become cards */
    .pp-table thead { display: none; }
    .pp-table, .pp-table tbody, .pp-table tr, .pp-table td { display: block; width: 100%; }
    .pp-table tr { padding: 12px 14px; margin-bottom: 10px; border-radius: 16px; background: var(--pp-soft); border: 1px solid var(--pp-line); }
    .pp-table td { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border: 0; text-align: right; }
    .pp-table td::before { content: attr(data-label); font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--text-secondary); text-align: left; }
    .pp-table .num { text-align: right; }
    .pp-device { grid-template-columns: 40px minmax(0, 1fr); }
    .pp-device .pp-btn { grid-column: 1 / -1; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    .pp *, .pp *::before, .pp *::after { transition: none !important; animation: none !important; }
}
@media print {
    .pp-tabbar, .pp-toast, nav, footer { display: none !important; }
}
