/* =====================================================================================
   Benny: design system on Bootstrap 5.3 (brand kit v1.0, CherryBrooks colour system)
   CherryBrooks orange #FC8902 as the accent, Midnight #15171C / Graphite #252932, Warm white #FFF7EC.
   Headlines Plus Jakarta Sans, body Inter. Light (warm white) by default; dark ("voice mode") via the toggle.
   ===================================================================================== */

:root {
    --pa-orange: #fc8902;
    --pa-graphite: #252932;
    --pa-midnight: #15171c;
    --pa-primary: var(--pa-orange);
    --pa-grad: linear-gradient(180deg, #fd9a2a 0%, #fc8902 100%);
    --pa-grad-diag: linear-gradient(135deg, #ffab4a 0%, #fc8902 55%, #e07400 100%);
    --pa-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --pa-head: "Plus Jakarta Sans", var(--pa-font);
    --pa-r-lg: 20px;
    --pa-r-md: 14px;
    --pa-nav-h: 72px;
    --pa-side-w: 264px;
    --pa-ease: cubic-bezier(.16, 1, .3, 1);

    /* light theme */
    --pa-bg: #fff7ec;
    --pa-bg-glow: radial-gradient(70% 50% at 85% -10%, rgba(252, 137, 2, .10) 0%, transparent 60%),
                  radial-gradient(60% 50% at 0% 110%, rgba(252, 137, 2, .10) 0%, transparent 55%);
    --pa-surface: #ffffff;
    --pa-surface-2: #fffbf5;
    --pa-glass: rgba(255, 255, 255, .8);
    --pa-border: rgba(21, 23, 28, .08);
    --pa-border-strong: rgba(21, 23, 28, .14);
    --pa-text: #15171c;
    --pa-muted: #6b6f78;
    --pa-shadow: 0 1px 2px rgba(21, 23, 28, .04), 0 8px 28px rgba(21, 23, 28, .07);
    --pa-shadow-lift: 0 2px 4px rgba(21, 23, 28, .05), 0 18px 44px rgba(21, 23, 28, .12);
    --pa-bot-bubble: #ffffff;

    --bs-body-font-family: var(--pa-font);
    --bs-body-bg: var(--pa-bg);
    --bs-body-color: var(--pa-text);
    --bs-secondary-color: var(--pa-muted);
    --bs-border-color: var(--pa-border);
    --bs-primary: #fc8902;
    --bs-primary-rgb: 252, 137, 2;
    --bs-link-color: #a85b00;
    --bs-link-color-rgb: 168, 91, 0;
    --bs-link-hover-color: #8a4a00;
    --bs-border-radius: var(--pa-r-md);
    --bs-card-bg: var(--pa-surface);
}

[data-bs-theme="dark"] {
    --pa-bg: #15171c;
    --pa-bg-glow: radial-gradient(70% 55% at 85% -10%, rgba(252, 137, 2, .09) 0%, transparent 60%),
                  radial-gradient(60% 55% at -5% 110%, rgba(252, 137, 2, .08) 0%, transparent 55%);
    --pa-surface: rgba(255, 255, 255, .03);
    --pa-surface-2: rgba(255, 255, 255, .05);
    --pa-glass: rgba(8, 12, 18, .72);
    --pa-border: rgba(255, 255, 255, .08);
    --pa-border-strong: rgba(255, 255, 255, .16);
    --pa-text: #fff7ec;
    --pa-muted: #a3a7b0;
    --pa-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 8px 30px rgba(0, 0, 0, .35);
    --pa-shadow-lift: 0 1px 0 rgba(255, 255, 255, .05) inset, 0 20px 50px rgba(0, 0, 0, .5);
    --pa-bot-bubble: rgba(255, 255, 255, .05);

    --bs-body-bg: #15171c;
    --bs-body-color: #fff7ec;
    --bs-secondary-color: #a3a7b0;
    --bs-border-color: rgba(255, 255, 255, .08);
    --bs-link-color: #ffa94d;
    --bs-link-color-rgb: 255, 169, 77;
    --bs-link-hover-color: #ffbe75;
    --bs-card-bg: rgba(255, 255, 255, .03);
    --bs-tertiary-bg: rgba(255, 255, 255, .05);
    --bs-secondary-bg: #252932;
    --bs-list-group-bg: transparent;
}

/* ---------- base ---------- */
html { -webkit-text-size-adjust: 100%; font-size: 14px; } /* compact premium scale: 1rem = 14px */
body { font-family: var(--pa-font); background: var(--pa-bg); color: var(--pa-text); letter-spacing: -.006em; line-height: 1.45; -webkit-font-smoothing: antialiased; }
.pa-glow { position: fixed; inset: 0; background: var(--pa-bg-glow); pointer-events: none; z-index: 0; }
::selection { background: rgba(252, 137, 2, .3); }
a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.min-w-0 { min-width: 0; }
.pa-pre { white-space: pre-wrap; }
.text-primary { color: var(--pa-orange) !important; }
[data-bs-theme="dark"] .text-primary { color: #ffa94d !important; }
.text-body-secondary { color: var(--pa-muted) !important; }
h1, h2, h3, h4, h5, h6, .h5, .h6, .pa-display, .pa-hero h2, .pa-auth-card h2 { font-family: var(--pa-head); letter-spacing: -.02em; font-weight: 700; }
kbd { background: var(--pa-surface-2); color: var(--pa-muted); border: 1px solid var(--pa-border); border-radius: 6px; padding: 0 .35rem; font-size: .7rem; box-shadow: none; }

/* ---------- buttons ---------- */
.btn { --bs-btn-font-size: .95rem; border-radius: 999px; font-weight: 600; padding: .45rem 1rem; transition: transform .2s var(--pa-ease), box-shadow .2s, filter .2s, background .2s, border-color .2s; }
.btn-sm { padding: .32rem .85rem; font-size: .82rem; }
.btn-primary { --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff; --bs-btn-bg: var(--pa-orange); --bs-btn-border-color: transparent;
    --bs-btn-hover-bg: var(--pa-orange); --bs-btn-hover-border-color: transparent; --bs-btn-active-bg: #a85b00; --bs-btn-disabled-bg: var(--pa-orange); --bs-btn-disabled-border-color: transparent;
    background-image: var(--pa-grad); box-shadow: 0 4px 16px rgba(252, 137, 2, .35); }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 8px 24px rgba(252, 137, 2, .42); }
.btn-outline-primary { --bs-btn-color: var(--pa-orange); --bs-btn-border-color: rgba(252, 137, 2, .55); --bs-btn-hover-bg: rgba(252, 137, 2, .12); --bs-btn-hover-color: var(--pa-orange);
    --bs-btn-hover-border-color: var(--pa-orange); --bs-btn-active-bg: rgba(252, 137, 2, .2); --bs-btn-active-color: var(--pa-orange); --bs-btn-active-border-color: var(--pa-orange); }
[data-bs-theme="dark"] .btn-outline-primary { --bs-btn-color: #ffa94d; --bs-btn-hover-color: #ffbe75; }
.btn-outline-secondary { --bs-btn-color: var(--pa-muted); --bs-btn-border-color: var(--pa-border-strong); --bs-btn-hover-bg: var(--pa-surface-2); --bs-btn-hover-color: var(--pa-text); --bs-btn-hover-border-color: var(--pa-border-strong); }
.btn-danger { box-shadow: 0 4px 16px rgba(220, 53, 69, .25); }
.btn-link { font-weight: 600; text-decoration: none; }
.btn-icon { width: 40px; height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; border: 1px solid transparent; color: inherit; background: transparent; font-size: 1.12rem; }
.btn-icon:hover { background: var(--pa-surface-2); border-color: var(--pa-border); }
.btn-icon-filled { width: 44px; height: 44px; border-radius: 50%; padding: 0; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.btn-sm { --bs-btn-font-size: .85rem; }
.btn-lg { --bs-btn-font-size: 1.05rem; }
.small, small { font-size: max(.875em, 11.5px); } /* never smaller than 11.5px */
.btn-group > .btn { border-radius: 999px !important; margin: 0 2px; }
.btn-check:checked + .btn-outline-primary { background-image: var(--pa-grad); color: #fff; border-color: transparent; }

/* ---------- forms ---------- */
.form-control, .form-select, .input-group-text { border-radius: 12px; border-color: var(--pa-border-strong); background-color: var(--pa-surface); color: var(--pa-text); padding: .6rem .85rem; }
[data-bs-theme="dark"] .form-control, [data-bs-theme="dark"] .form-select, [data-bs-theme="dark"] .input-group-text { background-color: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .1); }
[data-bs-theme="dark"] .form-select option { background: #252932; }
.form-control::placeholder { color: var(--pa-muted); opacity: .75; }
.form-control:hover, .form-select:hover { border-color: rgba(252, 137, 2, .35); }
.form-control:focus, .form-select:focus { border-color: var(--pa-orange); box-shadow: 0 0 0 3px rgba(252, 137, 2, .2); background-color: var(--pa-surface); color: var(--pa-text); }
[data-bs-theme="dark"] .form-control:focus, [data-bs-theme="dark"] .form-select:focus { background-color: rgba(255, 255, 255, .06); }
.form-control-lg { padding: .75rem 1rem; font-size: 1rem; border-radius: 14px; }
.input-group > :not(:first-child) { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }
.input-group > :not(:last-child) { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.form-label { font-size: .8rem; font-weight: 600; color: var(--pa-muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .4rem; }
.form-check-label { font-weight: 500; }
.form-check-input:checked { background-color: var(--pa-orange); border-color: var(--pa-orange); }
.form-check-input:focus { box-shadow: 0 0 0 3px rgba(252, 137, 2, .2); border-color: var(--pa-orange); }
.form-text { color: var(--pa-muted); }
.form-control-plaintext { color: var(--pa-text); }

/* ---------- cards, lists, tables, menus ---------- */
.card { background: var(--pa-surface); border: 1px solid var(--pa-border); border-radius: var(--pa-r-lg); box-shadow: var(--pa-shadow); position: relative; z-index: 1;
    transition: transform .25s var(--pa-ease), box-shadow .25s, border-color .25s; }
[data-bs-theme="dark"] .card { backdrop-filter: blur(12px); }
.card-header { background: transparent; border-color: var(--pa-border); padding: .95rem 1.15rem; font-weight: 700; letter-spacing: -.01em; }
.card-header > span > .bi:first-child, .card-header > .bi:first-child { color: var(--pa-orange); }
.card-body { padding: 1.15rem; }
.card-footer { background: transparent; border-color: var(--pa-border); padding: .85rem 1.15rem; }
.list-group { --bs-list-group-bg: transparent; --bs-list-group-border-color: var(--pa-border); --bs-list-group-action-hover-bg: var(--pa-surface-2); --bs-list-group-color: var(--pa-text);
    --bs-list-group-action-color: var(--pa-text); --bs-list-group-action-hover-color: var(--pa-text); border-radius: var(--pa-r-lg); }
.list-group:not(.list-group-flush) { background: var(--pa-surface); border: 1px solid var(--pa-border); box-shadow: var(--pa-shadow); overflow: hidden; position: relative; z-index: 1; }
.list-group:not(.list-group-flush) .list-group-item { border-left: 0; border-right: 0; }
.list-group:not(.list-group-flush) .list-group-item:first-child { border-top: 0; }
.list-group:not(.list-group-flush) .list-group-item:last-child { border-bottom: 0; }
.list-group-item { padding: .85rem 1.15rem; }
.list-group-item-action { transition: background .15s, padding-left .25s var(--pa-ease); }
.list-group-item-action:hover { padding-left: 1.4rem; }
.table { --bs-table-bg: transparent; --bs-table-color: var(--pa-text); --bs-table-border-color: var(--pa-border); --bs-table-hover-bg: var(--pa-surface-2); --bs-table-hover-color: var(--pa-text); }
.table thead th { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--pa-muted); }
.dropdown-menu { border-radius: 16px; border: 1px solid var(--pa-border); box-shadow: var(--pa-shadow-lift); padding: .4rem; min-width: 230px; }
[data-bs-theme="dark"] .dropdown-menu { --bs-dropdown-bg: rgba(13, 19, 28, .97); --bs-dropdown-link-hover-bg: rgba(255, 255, 255, .06); backdrop-filter: blur(16px); }
.dropdown-item { border-radius: 10px; padding: .5rem .7rem; font-weight: 500; display: flex; gap: .65rem; align-items: center; }
.dropdown-item:active { background: rgba(252, 137, 2, .15); color: inherit; }
.alert { border-radius: var(--pa-r-md); position: relative; z-index: 1; }
[data-bs-theme="dark"] .alert-success { background: rgba(32, 201, 151, .1); border-color: rgba(32, 201, 151, .3); color: #7ee2c2; }
[data-bs-theme="dark"] .alert-danger { background: rgba(255, 99, 99, .08); border-color: rgba(255, 99, 99, .3); color: #ff9b9b; }
[data-bs-theme="dark"] .alert-warning { background: rgba(255, 193, 7, .08); border-color: rgba(255, 193, 7, .3); color: #ffd666; }
[data-bs-theme="dark"] .alert-info { background: rgba(252, 137, 2, .08); border-color: rgba(252, 137, 2, .3); color: #ffc27a; }
.badge { font-weight: 600; letter-spacing: .02em; border-radius: 999px; padding: .38em .7em; }
.nav-pills { --bs-nav-pills-link-active-bg: var(--pa-orange); --bs-nav-link-color: var(--pa-muted); --bs-nav-link-hover-color: var(--pa-text); }
.nav-pills .nav-link { border-radius: 999px; font-weight: 600; }
.nav-pills .nav-link.active { background-image: var(--pa-grad); box-shadow: 0 4px 14px rgba(252, 137, 2, .3); color: #fff; }
.pagination { --bs-pagination-bg: var(--pa-surface); --bs-pagination-border-color: var(--pa-border); --bs-pagination-color: var(--pa-text); --bs-pagination-active-bg: var(--pa-orange);
    --bs-pagination-active-border-color: var(--pa-orange); --bs-pagination-hover-bg: var(--pa-surface-2); --bs-pagination-hover-color: var(--pa-text); }
details summary { cursor: pointer; color: var(--pa-orange); font-weight: 600; }
hr { border-color: var(--pa-border); opacity: 1; }
code { color: #ffa94d; }

/* ---------- eyebrow & typography ---------- */
.pa-eyebrow { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .8rem; border-radius: 999px; border: 1px solid rgba(252, 137, 2, .5);
    color: var(--pa-orange); font-size: .64rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; background: rgba(252, 137, 2, .06); }
[data-bs-theme="dark"] .pa-eyebrow { color: #ffa94d; }
.pa-display { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.04; margin: 1.2rem 0 .8rem;
    background: linear-gradient(180deg, #ffa94d, #fc8902); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pa-lede { font-size: clamp(.95rem, 1.2vw, 1.02rem); color: var(--pa-muted); max-width: 38ch; margin: 0; }

/* ---------- animated logo ---------- */
.pa-logo { display: inline-flex; align-items: center; gap: .6rem; color: inherit; text-decoration: none; --logo: 36px; }
.pa-logo-mark { position: relative; flex: none; width: var(--logo); height: var(--logo); border-radius: calc(var(--logo) * .26);
    background: #15171c; display: grid; place-items: center; box-shadow: 0 0 0 1px rgba(255, 255, 255, .07), 0 6px 16px rgba(21, 23, 28, .18); }
.pa-logo-mark b { font-family: var(--pa-head); font-weight: 800; color: #fff; font-size: calc(var(--logo) * .64); line-height: 1; transform: translate(-9%, -5%); }
.pa-logo-mark i { position: absolute; width: calc(var(--logo) * .14); height: calc(var(--logo) * .14); border-radius: 50%; background: #fc8902;
    right: calc(var(--logo) * .19); bottom: calc(var(--logo) * .24); animation: pa-dot 3.2s ease-in-out infinite; }
.pa-logo-word { font-family: var(--pa-head); font-weight: 800; font-size: calc(var(--logo) * .66); letter-spacing: -.035em; line-height: 1; color: var(--pa-text); }
.pa-logo-word i { display: inline-block; width: .2em; height: .2em; border-radius: 50%; background: #fc8902; margin-left: .05em; }
@keyframes pa-dot { 0%, 100% { box-shadow: 0 0 0 0 rgba(252, 137, 2, 0); } 50% { box-shadow: 0 0 0 calc(var(--logo) * .07) rgba(252, 137, 2, .28); } }
@media (prefers-reduced-motion: reduce) { .pa-logo-mark i { animation: none; } }
@keyframes pa-eq { 0%, 100% { transform: scaleY(.55); } 50% { transform: scaleY(1); } }
@keyframes pa-twinkle { 0%, 100% { transform: scale(.7) rotate(0); opacity: .7; } 50% { transform: scale(1.15) rotate(45deg); opacity: 1; } }

/* ---------- icon tiles (glossy, tova-style app icons) ---------- */
.pa-tile { --tile: 38px; width: var(--tile); height: var(--tile); flex-shrink: 0; border-radius: calc(var(--tile) * .3); display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: calc(var(--tile) * .46); position: relative; overflow: hidden; background: var(--tone, var(--pa-grad-diag));
    box-shadow: 0 6px 16px -4px var(--tone-glow, rgba(252, 137, 2, .45)), inset 0 1px 0 rgba(255, 255, 255, .35); transition: transform .35s var(--pa-ease), filter .3s, opacity .3s; }
.pa-tile::after { content: ""; position: absolute; inset: 0 0 50% 0; background: linear-gradient(180deg, rgba(255, 255, 255, .32), rgba(255, 255, 255, 0)); border-radius: inherit; pointer-events: none; }
.pa-tile .bi { position: relative; z-index: 1; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .15)); display: inline-block; }
.pa-tile-sm { --tile: 26px; }
.pa-tile-lg { --tile: 46px; }
.pa-tone-orange { --tone: linear-gradient(135deg, #ffab4a, #fc8902 60%, #e07400); --tone-glow: rgba(252, 137, 2, .5); }
.pa-tone-blue { --tone: linear-gradient(135deg, #4a505e, #252932); --tone-glow: rgba(21, 23, 28, .45); }
.pa-tone-red { --tone: linear-gradient(135deg, #ff7a7a, #ef3b3b); --tone-glow: rgba(239, 59, 59, .45); }
.pa-tone-green { --tone: linear-gradient(135deg, #4ade80, #16a34a); --tone-glow: rgba(22, 163, 74, .45); }
.pa-tone-amber { --tone: linear-gradient(135deg, #fcd34d, #f59e0b); --tone-glow: rgba(245, 158, 11, .45); }
.pa-tone-teal { --tone: linear-gradient(135deg, #2dd4bf, #0d9488); --tone-glow: rgba(13, 148, 136, .45); }
.pa-tone-violet { --tone: linear-gradient(135deg, #ff9e5a, #d9480f); --tone-glow: rgba(217, 72, 15, .45); }
.pa-tone-pink { --tone: linear-gradient(135deg, #f9a8d4, #ec4899); --tone-glow: rgba(236, 72, 153, .45); }
.pa-tone-slate { --tone: linear-gradient(135deg, #8a8f99, #4a4e57); --tone-glow: rgba(74, 78, 87, .45); }
/* animated icons: each icon has its own small motion on hover */
a:hover > .pa-tile, button:hover > .pa-tile, .pa-tile-float:hover { transform: translateY(-2px) rotate(-6deg) scale(1.06); }
a:hover > .pa-tile .bi-bell, a:hover > .pa-tile .bi-alarm, .pa-bell:hover .bi-bell { animation: pa-ring .8s ease-in-out; }
a:hover > .pa-tile .bi-mic, a:hover > .pa-tile .bi-mic-fill { animation: pa-pulse-icon .9s ease-in-out infinite; }
a:hover > .pa-tile .bi-envelope-open, a:hover > .pa-tile .bi-pencil-square { animation: pa-bounce .6s ease; }
a:hover > .pa-tile .bi-telephone-outbound { animation: pa-shake .5s ease; }
a:hover > .pa-tile .bi-calendar-event, a:hover > .pa-tile .bi-calendar-plus { animation: pa-flip .7s ease; }
a:hover > .pa-tile .bi-sliders, a:hover > .pa-tile .bi-gear { animation: pa-spin .9s ease; }
a:hover > .pa-tile .bi-book, a:hover > .pa-tile .bi-journal-text, a:hover > .pa-tile .bi-people { animation: pa-bounce .6s ease; }
.pa-tile-float { animation: pa-float 6s ease-in-out infinite; }
@keyframes pa-ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(16deg); } 30% { transform: rotate(-14deg); } 45% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } }
@keyframes pa-pulse-icon { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.18); } }
@keyframes pa-bounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-4px); } 70% { transform: translateY(1px); } }
@keyframes pa-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-2px) rotate(-8deg); } 75% { transform: translateX(2px) rotate(8deg); } }
@keyframes pa-flip { from { transform: rotateY(0); } to { transform: rotateY(360deg); } }
@keyframes pa-spin { to { transform: rotate(180deg); } }
@keyframes pa-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ---------- shell: sidebar ---------- */
.pa-sidebar { position: fixed; inset: 0 auto 0 0; width: var(--pa-side-w); padding: 22px 14px 14px; z-index: 30; border-right: 1px solid var(--pa-border);
    background: var(--pa-glass); backdrop-filter: blur(18px); }
.pa-brand { display: inline-flex; padding: 0 8px 4px; text-decoration: none; color: inherit; }
.pa-side-nav { margin-top: 20px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; scrollbar-width: none; }
.pa-side-group { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .15em; color: var(--pa-muted); padding: 16px 12px 6px; }
.pa-side-group:first-child { padding-top: 0; }
.pa-side-link { position: relative; display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 10px; color: var(--pa-text); text-decoration: none; font-weight: 500; font-size: 1rem;
    transition: background .2s, color .2s; }
.pa-side-link:hover { background: var(--pa-surface-2); color: var(--pa-text); }
.pa-side-link .pa-tile { filter: saturate(.2) brightness(1.1); opacity: .7; box-shadow: none; }
.pa-side-link:hover .pa-tile, .pa-side-link.active .pa-tile { filter: none; opacity: 1; box-shadow: 0 6px 16px -4px var(--tone-glow); }
.pa-side-link.active { background: linear-gradient(90deg, rgba(252, 137, 2, .14), rgba(252, 137, 2, .02)); font-weight: 650; }
.pa-side-link.active::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 4px 4px 0; background: var(--pa-grad); box-shadow: 0 0 12px rgba(252, 137, 2, .8); }
.pa-live-dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: #22c55e; animation: pa-live 2s infinite; }
@keyframes pa-live { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); } 70% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.pa-side-user { margin-top: 10px; }
.pa-user-chip { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 14px; border: 1px solid var(--pa-border); background: var(--pa-surface); color: inherit; }
.pa-user-chip:hover { border-color: var(--pa-border-strong); }
.pa-user-chip b { font-size: .86rem; } .pa-user-chip small { color: var(--pa-muted); font-size: .72rem; }

/* ---------- shell: main, topbar, page head ---------- */
.pa-main { position: relative; z-index: 1; min-height: 100vh; padding-bottom: calc(var(--pa-nav-h) + env(safe-area-inset-bottom) + 28px); }
@media (min-width: 992px) { .pa-main { margin-left: var(--pa-side-w); padding-bottom: 40px; } }
.pa-topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
    background: var(--pa-glass); backdrop-filter: blur(18px); border-bottom: 1px solid var(--pa-border); }
@media (min-width: 992px) { .pa-topbar { padding: 14px 32px; } }
.pa-topbar-date { align-items: center; gap: .45rem; color: var(--pa-muted); font-size: .85rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.pa-sep { width: 1px; height: 14px; background: var(--pa-border-strong); margin: 0 .35rem; }
.pa-ask { align-items: center; gap: .5rem; padding: .45rem .7rem .45rem .9rem; border-radius: 999px; border: 1px solid var(--pa-border); background: var(--pa-surface); color: var(--pa-muted);
    text-decoration: none; font-size: .85rem; min-width: 230px; transition: border-color .2s, color .2s; margin-right: 4px; }
.pa-ask:hover { border-color: rgba(252, 137, 2, .5); color: var(--pa-text); }
.pa-ask .bi-stars { color: var(--pa-orange); }
.pa-ask kbd { margin-left: auto; }
.pa-badge { position: absolute; top: 3px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--pa-grad); color: #fff; font-size: 10.5px; font-weight: 700;
    line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--pa-bg); }
.pa-bell:has(.pa-badge:not(.d-none)) .bi-bell { display: inline-block; animation: pa-ring 1.2s ease-in-out 3; }
.pa-content { position: relative; z-index: 1; padding: 22px 16px 18px; max-width: 1180px; margin: 0 auto; }
@media (min-width: 992px) { .pa-content { padding: 30px 32px; } }
.pa-page-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.pa-page-head .pa-eyebrow { margin-bottom: .45rem; }
.pa-title { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 700; letter-spacing: -.025em; margin: 0; line-height: 1.12; overflow-wrap: anywhere; }
.pa-subtitle { margin: .3rem 0 0; color: var(--pa-muted); font-size: .95rem; }
.pa-page-actions { display: flex; gap: 6px; align-items: center; margin-left: auto; flex-shrink: 0; }
.pa-page-actions .btn-icon { width: 44px; height: 44px; border: 1px solid var(--pa-border); background: var(--pa-surface); box-shadow: var(--pa-shadow); }
.pa-page-actions .btn-icon:hover { border-color: rgba(252, 137, 2, .5); color: var(--pa-orange); transform: translateY(-1px); }
@media (max-width: 575.98px) { .pa-page-head { gap: 12px; } .pa-page-head .pa-tile-lg { --tile: 40px; } .pa-subtitle { font-size: .85rem; } .pa-page-head .pa-eyebrow { display: none; } }

/* ---------- shell: bottom nav (mobile) ---------- */
.pa-bottomnav { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 40; height: var(--pa-nav-h);
    display: grid; grid-template-columns: repeat(5, 1fr); border-radius: 24px; background: var(--pa-glass); backdrop-filter: blur(20px);
    border: 1px solid var(--pa-border); box-shadow: 0 18px 40px rgba(0, 0, 0, .3); }
.pa-bottomnav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: var(--pa-muted); text-decoration: none; position: relative; }
.pa-bottomnav a > .bi { font-size: 1.28rem; transition: transform .3s var(--pa-ease); }
.pa-bottomnav a.active { color: var(--pa-text); }
.pa-bottomnav a.active > .bi { color: var(--pa-orange); transform: translateY(-2px); }
.pa-bottomnav a.active::after { content: ""; position: absolute; bottom: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--pa-orange); box-shadow: 0 0 8px var(--pa-orange); }
.pa-bottomnav a.pa-mic::after { display: none; }
.pa-mic-orb { position: relative; width: 58px; height: 58px; margin-top: -30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.45rem;
    background: var(--pa-grad-diag); box-shadow: 0 10px 26px rgba(252, 137, 2, .55), inset 0 1px 0 rgba(255, 255, 255, .4); border: 4px solid var(--pa-bg); }
.pa-mic-ring { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid rgba(252, 137, 2, .55); animation: pa-ripple 2.4s ease-out infinite; }
@keyframes pa-ripple { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.55); opacity: 0; } }

/* ---------- avatars, empty states, misc ---------- */
.pa-avatar { width: 42px; height: 42px; border-radius: 14px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .88rem; color: #fff;
    background: linear-gradient(135deg, #2b3445, #161c27); border: 1px solid var(--pa-border-strong); text-decoration: none; }
[data-bs-theme="light"] .pa-avatar { background: linear-gradient(135deg, #ffe2c4, #ffc285); color: #8a3d00; border-color: rgba(252, 137, 2, .25); }
.pa-avatar-sm { width: 34px; height: 34px; border-radius: 11px; font-size: .76rem; }
.pa-avatar-lg { width: 76px; height: 76px; border-radius: 24px; font-size: 1.5rem; }
.pa-empty { text-align: center; padding: 44px 16px; color: var(--pa-muted); position: relative; z-index: 1; }
.pa-empty > i { font-size: 1.6rem; width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 20px; display: flex; align-items: center; justify-content: center; color: var(--pa-orange);
    background: rgba(252, 137, 2, .1); border: 1px solid rgba(252, 137, 2, .3); animation: pa-float 5s ease-in-out infinite; }
.pa-unread { box-shadow: inset 3px 0 0 var(--pa-orange); }
.pa-card-accent { border-color: rgba(252, 137, 2, .45); box-shadow: 0 0 0 1px rgba(252, 137, 2, .1), 0 16px 48px rgba(252, 137, 2, .12); }
.pa-mail-body { line-height: 1.6; overflow-wrap: anywhere; }
.pa-time { width: 58px; flex-shrink: 0; font-weight: 800; line-height: 1.05; text-align: center; font-variant-numeric: tabular-nums; padding: 7px 0; border-radius: 12px;
    background: var(--pa-surface-2); border: 1px solid var(--pa-border); letter-spacing: -.02em; }
.pa-time small { display: block; font-size: .62rem; font-weight: 700; color: var(--pa-muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }
.pa-dictate-note { position: absolute; right: 8px; bottom: 8px; }
.pa-transcript p { font-size: .93rem; }

/* ---------- dashboard ---------- */
.pa-hero { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; align-items: center; padding: clamp(22px, 4vw, 40px);
    border-radius: 28px; border: 1px solid var(--pa-border); box-shadow: var(--pa-shadow); z-index: 1;
    background: var(--pa-surface); }
[data-bs-theme="dark"] .pa-hero { background: #15171c; }
/* Brand waves, fading out towards the text */
.pa-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: url("../brand/waves-light.jpg") right -40px top -30px / auto 125% no-repeat;
    -webkit-mask-image: linear-gradient(100deg, transparent 30%, #000 75%); mask-image: linear-gradient(100deg, transparent 30%, #000 75%); }
[data-bs-theme="dark"] .pa-hero::before { background-image: url("../brand/waves-dark.jpg"); }
.pa-hero h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; margin: 14px 0 10px; }
.pa-hero h2 span { background: linear-gradient(180deg, #ffa94d, #fc8902); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pa-hero .pa-lede { max-width: 44ch; }
.pa-hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.pa-hero-cta .btn { padding: .65rem 1.3rem; }
.pa-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 22px; max-width: 30rem; }
.pa-stat-cell { padding: .8rem .5rem; text-align: center; border-radius: var(--pa-r-md); border: 1px solid var(--pa-border); background: var(--pa-surface-2); transition: border-color .2s, background .2s, transform .25s var(--pa-ease);
    text-decoration: none; color: inherit; }
.pa-stat-cell:hover { border-color: rgba(252, 137, 2, .4); background: rgba(252, 137, 2, .06); transform: translateY(-2px); color: inherit; }
.pa-stat-cell b { display: block; font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pa-stat-cell span { display: block; margin-top: .3rem; font-size: .6rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--pa-muted); }
.pa-stat-cell.is-live b { color: var(--pa-orange); }
@media (max-width: 767.98px) {
    .pa-hero { grid-template-columns: 1fr; }
    .pa-hero .pa-scene { order: -1; height: 200px; margin: -14px 0 -8px; }
    .pa-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: none; }
}
.pa-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; position: relative; z-index: 1; }
@media (min-width: 768px) { .pa-quick { grid-template-columns: repeat(6, 1fr); } }
.pa-quick a { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 8px 14px; border-radius: 18px; background: var(--pa-surface); border: 1px solid var(--pa-border);
    text-decoration: none; color: inherit; font-size: .8rem; font-weight: 600; text-align: center; box-shadow: var(--pa-shadow); transition: transform .3s var(--pa-ease), border-color .2s, box-shadow .3s; }
.pa-quick a:hover { transform: translateY(-4px); border-color: rgba(252, 137, 2, .4); box-shadow: var(--pa-shadow-lift); }
.pa-section-title { display: flex; align-items: center; gap: .6rem; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--pa-muted); margin: 0 0 .8rem; position: relative; z-index: 1; }
.pa-section-title::after { content: ""; flex: 1; height: 1px; background: var(--pa-border); }
.pa-card-head { display: flex; align-items: center; gap: 10px; }
.pa-card-head .pa-tile { --tile: 26px; }
.pa-card-head a { margin-left: auto; font-size: .8rem; font-weight: 600; text-decoration: none; }

/* ---------- the orb scene (dashboard hero + sign-in) ---------- */
.pa-scene { position: relative; height: 300px; }
.pa-scene-orb { position: absolute; left: 50%; top: 50%; width: 132px; height: 132px; transform: translate(-50%, -50%); }
.pa-scene-core { position: absolute; inset: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: radial-gradient(circle at 35% 30%, #ffb867, #fc8902 55%, #b86200); box-shadow: 0 20px 50px rgba(252, 137, 2, .5), inset 0 2px 6px rgba(255, 255, 255, .45), inset 0 -10px 20px rgba(120, 30, 0, .35);
    animation: pa-breathe 4s ease-in-out infinite; }
.pa-scene-ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgba(252, 137, 2, .45); animation: pa-ripple 3.6s ease-out infinite; }
.pa-scene-ring.r2 { animation-delay: 1.2s; border-color: rgba(252, 137, 2, .45); } .pa-scene-ring.r3 { animation-delay: 2.4s; }
.pa-wave { display: flex; gap: 4px; align-items: center; height: 34px; }
.pa-wave i { width: 5px; border-radius: 3px; background: #fff; height: 100%; animation: pa-eq 1.1s ease-in-out infinite; transform-origin: center; }
.pa-wave i:nth-child(2) { animation-delay: -.2s; } .pa-wave i:nth-child(3) { animation-delay: -.45s; } .pa-wave i:nth-child(4) { animation-delay: -.7s; } .pa-wave i:nth-child(5) { animation-delay: -.95s; }
@keyframes pa-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
.pa-float { position: absolute; --tile: 50px; animation: pa-float 6s ease-in-out infinite; }
.pa-float.f1 { left: 8%; top: 8%; animation-delay: -1s; }
.pa-float.f2 { right: 10%; top: 4%; animation-delay: -2.5s; }
.pa-float.f3 { right: 3%; top: 50%; --tile: 44px; animation-delay: -4s; }
.pa-float.f4 { left: 2%; top: 56%; --tile: 46px; animation-delay: -3s; }
.pa-float.f5 { left: 26%; bottom: 2%; --tile: 40px; animation-delay: -5s; }
.pa-float.f6 { right: 26%; bottom: 0; --tile: 42px; animation-delay: -1.8s; }

/* ---------- auth (tova split) ---------- */
.pa-guest { background: #15171c; color: #fff7ec; }
.pa-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-height: 100dvh; }
.pa-split-visual { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; padding: clamp(24px, 5vw, 56px); color: #15171c;
    background: url("../brand/waves-light.jpg") right top / auto 100% no-repeat, #fff7ec; overflow: hidden; }
.pa-split-visual::after { content: none; }
.pa-split-visual > * { position: relative; z-index: 1; }
.pa-split-visual .pa-display { background: none; -webkit-text-fill-color: currentColor; color: #15171c; }
.pa-split-visual .pa-logo-word { color: #15171c; }
.pa-brand-dot { color: #fc8902; -webkit-text-fill-color: #fc8902; }
.pa-split-visual .pa-lede { color: #4a4e57; }
.pa-split-visual .pa-scene { height: 320px; }
.pa-split-points { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pa-split-points li { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .85rem; border-radius: 999px; background: rgba(255, 255, 255, .7); border: 1px solid rgba(21, 23, 28, .08);
    font-size: .82rem; font-weight: 600; color: #252932; box-shadow: 0 4px 14px rgba(21, 23, 28, .06); }
.pa-split-points .bi { color: var(--pa-orange); }
.pa-split-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: clamp(24px, 5vw, 56px) clamp(18px, 4vw, 48px);
    background: radial-gradient(120% 80% at 70% 0%, rgba(252, 137, 2, .07) 0%, transparent 55%), radial-gradient(90% 60% at 10% 100%, rgba(252, 137, 2, .07) 0%, transparent 50%), #15171c;
    border-left: 1px solid rgba(255, 255, 255, .06); }
.pa-auth-card { width: min(100%, 420px); }
.pa-auth-card h2 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.035em; margin: 1rem 0 .35rem; }
.pa-auth-card .btn-primary.btn-lg { padding: .8rem 1rem; }
.pa-auth-foot { margin-top: 32px; display: flex; align-items: center; gap: .5rem; color: #a3a7b0; font-size: .8rem; }
@media (max-width: 960px) {
    .pa-split { grid-template-columns: 1fr; }
    .pa-split-visual { padding-bottom: 10px; }
    .pa-split-visual .pa-scene, .pa-split-points { display: none; }
    .pa-display { font-size: 2rem; margin: .9rem 0 .4rem; }
}

/* ---------- calendar ---------- */
.pa-cal { display: grid; grid-template-columns: repeat(7, 1fr); }
.pa-cal-head { text-align: center; font-size: .64rem; font-weight: 700; color: var(--pa-muted); padding: 10px 0; text-transform: uppercase; letter-spacing: .1em; }
.pa-cal-day { min-height: 56px; padding: 6px 4px; text-align: center; text-decoration: none; color: inherit; border-top: 1px solid var(--pa-border); display: flex; flex-direction: column; align-items: center; gap: 3px;
    transition: background .15s; }
@media (min-width: 768px) { .pa-cal-day { min-height: 92px; align-items: flex-start; text-align: left; padding: 8px 10px; } .pa-cal-day:not(:nth-child(7n + 1)) { border-left: 1px solid var(--pa-border); } }
.pa-cal-day:hover { background: rgba(252, 137, 2, .05); color: inherit; }
.pa-cal-out { opacity: .32; }
.pa-cal-num { width: 30px; height: 30px; line-height: 30px; border-radius: 10px; text-align: center; font-size: .88rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.pa-cal-today .pa-cal-num { color: var(--pa-orange); box-shadow: inset 0 0 0 1.5px var(--pa-orange); }
.pa-cal-selected .pa-cal-num { background-image: var(--pa-grad); color: #fff !important; box-shadow: 0 4px 12px rgba(252, 137, 2, .45); }
.pa-cal-dots { display: flex; gap: 3px; }
.pa-cal-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--pa-orange); box-shadow: 0 0 6px rgba(252, 137, 2, .7); }
.pa-cal-dots i.done { background: var(--pa-muted); box-shadow: none; }
.pa-cal-label { font-size: .72rem; color: var(--pa-muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- notes ---------- */
.pa-notes { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pa-note:hover { transform: translateY(-3px); box-shadow: var(--pa-shadow-lift); border-color: rgba(252, 137, 2, .35); }
.pa-note-body { white-space: pre-wrap; color: var(--pa-muted); display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- assistant ---------- */
.pa-assistant { display: flex; flex-direction: column; height: calc(100dvh - 215px - var(--pa-nav-h) - env(safe-area-inset-bottom)); min-height: 440px; max-width: 820px; margin: 0 auto; position: relative; z-index: 1; }
@media (min-width: 992px) { .pa-assistant { height: calc(100dvh - 220px); } }
.pa-voice { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 22px; margin-bottom: 12px; --level: 0; position: relative; overflow: hidden;
    border: 1px solid var(--pa-border); background: radial-gradient(120% 120% at 0% 0%, rgba(252, 137, 2, .12) 0%, transparent 55%), var(--pa-surface); box-shadow: var(--pa-shadow); }
.pa-orb { position: relative; width: 64px; height: 64px; flex-shrink: 0; border-radius: 50%; border: 0; color: #fff; font-size: 1.5rem;
    background: radial-gradient(circle at 35% 30%, #ffb867, #fc8902 55%, #b86200); box-shadow: 0 10px 26px rgba(252, 137, 2, .5), inset 0 2px 4px rgba(255, 255, 255, .45); transition: transform .3s var(--pa-ease); }
.pa-orb:hover:not(:disabled) { transform: scale(1.06); }
.pa-orb:disabled { opacity: .45; box-shadow: none; }
.pa-orb i { position: relative; z-index: 1; }
.pa-orb-ring { position: absolute; inset: -7px; border-radius: 50%; border: 3px solid rgba(252, 137, 2, .45); transform: scale(calc(1 + var(--level) * .4)); transition: transform .08s linear; opacity: 0; }
.pa-voice[data-state="listening"] .pa-orb-ring, .pa-voice[data-state="speaking"] .pa-orb-ring, .pa-voice[data-state="thinking"] .pa-orb-ring { opacity: 1; }
.pa-voice[data-state="connecting"] .pa-orb, .pa-voice[data-state="thinking"] .pa-orb { animation: pa-pulse 1.2s infinite; }
.pa-voice[data-state="speaking"] .pa-orb { background: radial-gradient(circle at 35% 30%, #4a505e, #252932 55%, #15171c); box-shadow: 0 10px 26px rgba(252, 137, 2, .5); }
.pa-orb-hint { animation: pa-pulse 1.4s 4; }
@keyframes pa-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(252, 137, 2, .55); } 50% { box-shadow: 0 0 0 16px rgba(252, 137, 2, 0); } }
.pa-voice-status { flex-grow: 1; font-size: .95rem; font-weight: 500; color: var(--pa-muted); }
.pa-voice-controls { display: flex; gap: 6px; }
.pa-chat { flex: 1 1 auto; overflow-y: auto; padding: 8px 2px 14px; display: flex; flex-direction: column; gap: 12px; scrollbar-width: thin; }
.pa-msg { display: flex; flex-direction: column; max-width: 84%; animation: pa-in .35s var(--pa-ease); }
@keyframes pa-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.pa-msg-user { align-self: flex-end; align-items: flex-end; }
.pa-msg-assistant { align-self: flex-start; align-items: flex-start; }
.pa-bubble { padding: 11px 15px; border-radius: 20px; white-space: pre-wrap; word-wrap: break-word; line-height: 1.5; font-size: .95rem; }
.pa-msg-user .pa-bubble { background: var(--pa-grad); color: #fff; border-bottom-right-radius: 6px; box-shadow: 0 6px 18px rgba(252, 137, 2, .3); }
.pa-msg-assistant .pa-bubble { background: var(--pa-bot-bubble); border: 1px solid var(--pa-border); border-bottom-left-radius: 6px; }
.pa-msg-error .pa-bubble { border-color: rgba(255, 99, 99, .5); color: #ff8a80; }
.pa-meta { font-size: .68rem; color: var(--pa-muted); margin: 4px 8px 0; }
.pa-divider { text-align: center; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--pa-muted); position: relative; margin: 8px 0; }
.pa-divider span { background: var(--pa-bg); padding: 0 12px; position: relative; z-index: 1; }
.pa-divider::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--pa-border); }
.pa-typing { display: inline-flex; gap: 5px; padding: 15px 18px; }
.pa-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--pa-orange); animation: pa-blink 1.2s infinite; }
.pa-typing span:nth-child(2) { animation-delay: .2s; } .pa-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes pa-blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.pa-suggestions { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; max-width: 640px; margin: 16px auto 0; }
.pa-suggestions button { border: 1px solid var(--pa-border); background: var(--pa-surface); border-radius: 16px; padding: 12px 14px; text-align: left; font-size: .87rem; color: inherit; font-weight: 500;
    transition: border-color .2s, transform .25s var(--pa-ease), background .2s; }
.pa-suggestions button:hover { border-color: rgba(252, 137, 2, .5); background: rgba(252, 137, 2, .06); transform: translateY(-2px); }
.pa-composer { display: flex; align-items: flex-end; gap: 6px; padding: 8px; border-radius: 26px; background: var(--pa-surface); border: 1px solid var(--pa-border-strong); box-shadow: var(--pa-shadow);
    transition: border-color .2s, box-shadow .2s; }
.pa-composer:focus-within { border-color: rgba(252, 137, 2, .6); box-shadow: 0 0 0 4px rgba(252, 137, 2, .12), var(--pa-shadow); }
.pa-composer textarea { border: 0 !important; resize: none; background: transparent !important; box-shadow: none !important; max-height: 160px; padding: 10px 6px; }
.pa-speak-toggle { margin: 8px 0 0 16px; color: var(--pa-muted); }
.pa-listening { color: #ef4444 !important; animation: pa-pulse 1.2s infinite; }

/* ---------- toasts ---------- */
.toast-container { z-index: 1090; }
.pa-toast { min-width: 290px; border-radius: 16px; border: 1px solid var(--pa-border); background: var(--pa-glass); backdrop-filter: blur(18px); box-shadow: var(--pa-shadow-lift); overflow: hidden; }
.pa-toast .toast-header { background: transparent; color: inherit; border-color: var(--pa-border); }
.pa-toast-reminder { box-shadow: inset 4px 0 0 #f59e0b, var(--pa-shadow-lift); }
.pa-toast-call { box-shadow: inset 4px 0 0 var(--pa-orange), var(--pa-shadow-lift); }
.pa-toast-error { box-shadow: inset 4px 0 0 #ef4444, var(--pa-shadow-lift); }

/* ---------- admin ---------- */
.pa-admin-nav { gap: 8px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; position: relative; z-index: 1; }
.pa-admin-nav .nav-link { white-space: nowrap; border: 1px solid var(--pa-border); background: var(--pa-surface); }
.pa-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.pa-stats-sm { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.pa-stats .card:hover { transform: translateY(-3px); border-color: rgba(252, 137, 2, .35); }
.pa-stat-value { font-size: 1.4rem; font-weight: 700; line-height: 1.15; margin-top: 6px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.pa-stats-sm .pa-stat-value { font-size: 1.1rem; }
.pa-settings-groups { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 90px; z-index: 1; }
.pa-settings-groups a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: inherit; border: 1px solid transparent; font-weight: 500; }
.pa-settings-groups a:hover { background: var(--pa-surface-2); }
.pa-settings-groups a.active { background: linear-gradient(90deg, rgba(252, 137, 2, .15), rgba(252, 137, 2, .03)); border-color: rgba(252, 137, 2, .35); font-weight: 650; }
.pa-settings-groups a .bi { color: var(--pa-orange); }
@media (max-width: 991.98px) {
    .pa-settings-groups { flex-direction: row; overflow-x: auto; padding-bottom: 4px; position: static; scrollbar-width: none; }
    .pa-settings-groups a { white-space: nowrap; border-color: var(--pa-border); }
}

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- admin console ---------- */
.pa-console-badge { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .75rem; border-radius: 999px; font-size: .66rem; font-weight: 700; letter-spacing: .1em;
    text-transform: uppercase; color: #ffc27a; background: rgba(252, 137, 2, .1); border: 1px solid rgba(252, 137, 2, .4); width: fit-content; }
.pa-sidebar .pa-console-badge { margin: 14px 8px 0; }
.pa-admin-app .pa-side-link.active::before { background: linear-gradient(180deg, #ffab4a, #fc8902); box-shadow: 0 0 12px rgba(252, 137, 2, .8); }
.pa-admin-app .pa-side-link.active { background: linear-gradient(90deg, rgba(252, 137, 2, .14), rgba(252, 137, 2, .02)); }
.pa-admin-login { position: relative; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px;
    background: radial-gradient(80% 60% at 80% 0%, rgba(252, 137, 2, .12) 0%, transparent 60%), radial-gradient(70% 60% at 0% 100%, rgba(252, 137, 2, .1) 0%, transparent 55%), #15171c; }
.pa-admin-login-card { position: relative; z-index: 1; width: min(100%, 440px); padding: 32px; border-radius: 24px; border: 1px solid rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .03); backdrop-filter: blur(16px); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); }
.pa-checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; padding: 14px; }
.pa-check { display: flex; align-items: center; gap: .55rem; padding: .55rem .75rem; border-radius: 12px; border: 1px solid var(--pa-border); background: var(--pa-surface-2);
    color: var(--pa-text); text-decoration: none; font-size: .85rem; font-weight: 500; transition: border-color .2s, transform .2s var(--pa-ease); }
.pa-check:hover { border-color: rgba(252, 137, 2, .45); transform: translateY(-1px); color: var(--pa-text); }
.pa-check .bi { color: #f59e0b; font-size: 1rem; }
.pa-check.ok .bi { color: #22c55e; }
.pa-check.current { border-color: rgba(252, 137, 2, .5); box-shadow: 0 0 0 1px rgba(252, 137, 2, .2); }
.pa-dot { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; box-shadow: 0 0 8px rgba(245, 158, 11, .7); flex-shrink: 0; }
.pa-dot.ok { background: #22c55e; box-shadow: 0 0 8px rgba(34, 197, 94, .6); }

/* ---------- dashboard: one screen on desktop, natural flow on phones ---------- */
.pa-dash { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); position: relative; z-index: 1; }
.pa-dash-hero { order: 0; } .pa-dash-quick { order: 1; } .pa-dash-today { order: 2; } .pa-dash-card { order: 3; }
.pa-dash-card { display: flex; flex-direction: column; min-height: 0; }
.pa-dash-scroll { overflow-y: auto; scrollbar-width: thin; }
.pa-hero h2 br { display: none; }
@media (min-width: 768px) and (max-width: 991.98px) {
    .pa-dash { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pa-dash-hero, .pa-dash-quick, .pa-dash-today { grid-column: 1 / -1; }
}
@media (min-width: 992px) {
    .pa-dash { grid-template-columns: repeat(12, minmax(0, 1fr)); }
    .pa-dash-hero { grid-column: span 8; order: 0; }
    .pa-dash-today { grid-column: span 4; order: 1; }
    .pa-dash-quick { grid-column: 1 / -1; order: 2; }
    .pa-dash-card:not(.pa-dash-today) { grid-column: span 4; order: 3; }
    .pa-dash-quick { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
    .pa-dash-quick a { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 14px; text-align: left; font-size: .86rem; }
    .pa-dash-quick .pa-tile { --tile: 36px; }
}
/* Tall enough desktop: everything fits one screen, lists scroll inside their cards */
@media (min-width: 992px) and (min-height: 640px) {
    .pa-main:has(.pa-dash) { padding-bottom: 0; }
    .pa-content:has(.pa-dash) { padding-top: 20px; padding-bottom: 20px; max-width: 1480px; }
    .pa-dash { height: calc(100dvh - 69px - 40px); grid-template-rows: minmax(0, 1.25fr) auto minmax(0, 1fr); }
    .pa-dash-hero { padding: clamp(18px, 3vh, 34px) clamp(22px, 2.6vw, 38px); min-height: 0; }
    .pa-dash-hero h2 { font-size: clamp(1.4rem, 3.4vh, 2rem); margin: 10px 0 6px; }
    .pa-dash-hero .pa-lede { font-size: clamp(.88rem, 1.6vh, 1rem); }
    .pa-dash-hero .pa-stat-grid { margin-top: clamp(10px, 2vh, 20px); }
    .pa-dash-hero .pa-stat-cell { padding: clamp(.45rem, 1.1vh, .8rem) .5rem; }
    .pa-dash-hero .pa-stat-cell b { font-size: clamp(1rem, 2.4vh, 1.35rem); }
    .pa-dash-hero .pa-hero-cta { margin-top: clamp(10px, 2.2vh, 22px); }
    .pa-dash-hero .pa-scene { height: 100%; min-height: 200px; }
    .pa-dash-hero .pa-scene-orb { transform: translate(-50%, -50%) scale(clamp(.75, calc(100vh / 900px), 1.1)); }
    .pa-dash-card { overflow: hidden; }
    .pa-dash-card .list-group-item { padding: .65rem 1.05rem; }
}
@media (min-width: 992px) and (min-height: 640px) and (max-height: 760px) {
    .pa-dash-hero .pa-lede { display: none; }
}

/* Dashboard uses the available viewport; full lists remain on their own pages. */
.pa-dash > *, .pa-dash .pa-hero-text { min-width: 0; }
.pa-dash-quick a > span:last-child { min-width: 0; overflow-wrap: anywhere; line-height: 1.2; }
.pa-dash .pa-card-head { min-width: 0; flex-shrink: 0; gap: 8px; }
.pa-dash .pa-card-head a { flex-shrink: 0; white-space: nowrap; }
.pa-dash .badge { flex-shrink: 0; align-self: flex-start; }
.pa-dash .pa-hero-cta .btn { min-width: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.2; }
.pa-bottomnav a { min-width: 0; }
.pa-bottomnav a > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-height: 540px) {
    .pa-main:has(.pa-dash) {
        height: 100dvh; min-height: 0; display: flex; flex-direction: column;
        padding-bottom: calc(var(--pa-nav-h) + env(safe-area-inset-bottom) + 30px);
    }
    .pa-main:has(.pa-dash) .pa-topbar { flex-shrink: 0; }
    .pa-content:has(.pa-dash) {
        width: 100%; max-width: 1480px; flex: 1; min-height: 0;
        display: flex; flex-direction: column; padding: 10px 12px;
    }
    .pa-dash { flex: 1; min-height: 0; height: auto; gap: 8px; }
    .pa-dash-card { overflow: hidden; }
    .pa-dash-hero { min-height: 0; }
    .pa-dash-hero h2 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 991.98px) and (min-height: 540px) {
    .pa-dash { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: minmax(0, 1.5fr) minmax(0, 1.1fr) repeat(2, minmax(0, .8fr)); }
    .pa-dash-hero, .pa-dash-quick { grid-column: 1 / -1; }
    .pa-dash-today { grid-column: auto; }
    .pa-dash-hero { display: block; padding: 10px 12px; }
    .pa-dash-hero .pa-scene, .pa-dash-hero .pa-lede { display: none; }
    .pa-dash-hero .pa-hero-text { height: 100%; display: flex; flex-direction: column; justify-content: space-between; gap: 5px; }
    .pa-dash-hero .pa-eyebrow { font-size: .6rem; line-height: 1; }
    .pa-dash-hero h2 { flex-shrink: 0; font-size: clamp(1rem, 3vw, 1.35rem); margin: 0; line-height: 1.15; }
    .pa-dash-hero .pa-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 0; max-width: none; }
    .pa-dash-hero .pa-stat-cell { padding: 4px 2px; }
    .pa-dash-hero .pa-stat-cell b { font-size: 1.1rem; }
    .pa-dash-hero .pa-stat-cell span { font-size: .55rem; letter-spacing: 0; margin-top: 2px; }
    .pa-dash-hero .pa-hero-cta { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .pa-dash-hero .pa-hero-cta .btn { padding: 7px 4px; font-size: .72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .pa-dash-hero .pa-hero-cta .btn:nth-child(n+3) { display: none; }
    .pa-dash-quick { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .pa-dash-quick a { min-height: 0; padding: 3px; gap: 2px; justify-content: center; font-size: .7rem; text-align: center; border-radius: 12px; }
    .pa-dash-quick .pa-tile { --tile: 24px; }
    .pa-dash-card .pa-card-head { padding: 7px 8px; font-size: .7rem; gap: 4px; }
    .pa-dash-card .pa-card-head .pa-tile { display: none; }
    .pa-dash-card .pa-card-head a { font-size: .6rem; }
    .pa-dash-card .list-group-item { padding: 6px 8px; font-size: .7rem; line-height: 1.25; }
    .pa-dash-card .pa-dash-scroll { overflow: hidden; min-height: 0; }
    .pa-dash-card .list-group-item:not(:first-child) { display: none !important; }
    .pa-dash-card .list-group-item { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .pa-dash-card .pa-time { min-width: 32px; font-size: .8rem; }
    .pa-dash-card .gap-3 { gap: 6px !important; }
    .pa-dash-card .small { font-size: .62rem; }
}
@media (max-width: 991.98px) and (min-height: 540px) and (max-height: 650px) {
    .pa-dash-hero .pa-eyebrow { display: none; }
    .pa-dash-hero .pa-stat-cell { padding: 3px 2px; }
    .pa-dash-quick .pa-tile { --tile: 22px; }
}
@media (min-width: 992px) and (min-height: 540px) {
    .pa-main:has(.pa-dash) { padding-bottom: 0; }
    .pa-dash { grid-template-rows: minmax(0, 1.15fr) minmax(56px, .23fr) minmax(0, 1fr); gap: 12px; }
    .pa-dash-hero { padding: 16px; grid-template-columns: minmax(0, 1fr) minmax(0, .55fr); }
    .pa-dash-hero .pa-scene { min-height: 0; height: 100%; }
    .pa-dash-hero h2 { font-size: clamp(1.15rem, 2vw, 1.6rem); margin: 6px 0; }
    .pa-dash-hero .pa-stat-grid, .pa-dash-hero .pa-hero-cta { margin-top: 8px; }
    .pa-dash-hero .pa-hero-cta .btn { padding: 7px 10px; font-size: .8rem; }
    .pa-dash-quick a { gap: 6px; padding: 8px; font-size: .75rem; }
}
@media (min-width: 992px) and (max-width: 1250px), (min-width: 992px) and (max-height: 700px) {
    .pa-dash-hero { grid-template-columns: minmax(0, 1fr); }
    .pa-dash-hero .pa-scene, .pa-dash-hero .pa-lede { display: none; }
    .pa-dash-quick a { flex-direction: column; }
    .pa-dash-quick .pa-tile { --tile: 26px; }
}

/* Token balance chip in the top bar */
.pa-balance { display: inline-flex; align-items: center; gap: .35rem; height: 34px; padding: 0 .75rem; border-radius: 999px;
  border: 1px solid var(--pa-border, rgba(255,255,255,.12)); color: inherit; text-decoration: none; font-weight: 600; font-size: .85rem; white-space: nowrap; }
.pa-balance i { color: #f5b301; }
.pa-balance:hover { border-color: #f5b301; color: inherit; }
.pa-balance.is-empty { border-color: #ff4d4f; color: #ff4d4f; }
.pa-balance.is-empty i { color: #ff4d4f; }
.pa-token-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }
.pa-token-hero .pa-token-amount { font-size: clamp(1.7rem, 3.4vw, 2.3rem); font-weight: 800; line-height: 1; }
.pa-rate-list { margin: 0; padding: 0; list-style: none; }
.pa-rate-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; border-bottom: 1px dashed var(--pa-border, rgba(255,255,255,.1)); }
.pa-rate-list li:last-child { border-bottom: 0; }
