﻿/* PANWAR PULSE UI — internal design tokens and shared Android-first components. */
:root{
 --surface:#fff;--surface-elevated:#fff;--surface-soft:#f0f4f8;--text-primary:#14283e;--text-secondary:#4b6077;--text-muted:#62758a;--border:#dce5ed;--accent:#007fad;--accent-soft:#e2f4fb;--danger:#bb304c;--success:#187756;--warning:#876323;--shadow-sm:0 2px 8px #14283e08;--shadow-md:0 12px 40px #14283e1c;
 --space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-6:24px;--space-8:32px;--radius-sm:8px;--radius-md:12px;--radius-lg:20px;--font-sm:12px;--font-body:14px;--font-title:20px;--icon-sm:18px;--icon-md:22px;--touch:44px;--nav-height:64px;--pw-viewport-height:100dvh;
 --bg:#f5f7fb;--panel:var(--surface);--panel2:var(--surface-soft);--text:var(--text-primary);--muted:var(--text-muted);--brand:var(--accent);--brand2:#00a3c2;--brand-soft:var(--accent-soft);--shadow:var(--shadow-md);
 --pw-bg:var(--bg);--pw-surface:var(--surface);--pw-surface-2:var(--surface-soft);--pw-line:var(--border);--pw-text:var(--text-primary);--pw-muted:var(--text-muted);--pw-accent:var(--accent);--pw-accent-soft:var(--accent-soft)
}
body.dark{--surface:#102339;--surface-elevated:#162c44;--surface-soft:#1a3048;--text-primary:#eaf2fc;--text-secondary:#bacbdd;--text-muted:#9eb2c9;--border:#2c415a;--accent:#4dc5ed;--accent-soft:#143f55;--danger:#ff8397;--success:#69d8ae;--warning:#e4cc83;--bg:#0b1a2b;--shadow-sm:0 2px 8px #0002;--shadow-md:0 16px 48px #0005}
*,*::before,*::after{box-sizing:border-box}html{color-scheme:light}html:has(body.dark){color-scheme:dark}body{color:var(--text-primary);background:var(--bg);font-family:Inter,system-ui,-apple-system,'Segoe UI',sans-serif}button,input,select,textarea{font:inherit}button,label[role=button]{-webkit-tap-highlight-color:transparent;touch-action:manipulation}button{min-height:var(--touch);border:1px solid var(--border);border-radius:var(--radius-md);padding:10px 14px;background:var(--surface-soft);color:var(--text-primary);font-weight:600;cursor:pointer;transition:background .15s,transform .12s}button:active:not(:disabled){transform:scale(.98);background:var(--accent-soft)}button:disabled{opacity:.48;cursor:default}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--accent);outline-offset:3px}button.primary,.primary,.pro-save-btn,.profile-v5-save{background:var(--accent);border-color:transparent;color:#fff;box-shadow:none}body.dark .primary,body.dark .profile-v5-save{color:#082333}.secondary{background:var(--surface-soft);border-color:var(--border);color:var(--text-primary)}.danger-btn{background:var(--danger);color:#fff;border-color:transparent}.danger-text,.danger-row{color:var(--danger)!important}.icon-btn,.modal-close{width:44px;height:44px;min-width:44px;min-height:44px;padding:10px;display:grid;place-items:center;border:0;background:transparent;border-radius:12px}.ui-icon,.pulse-icon,.pw-nav-icon{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex:none}.panwar-svg,.panwar-svg svg{width:22px;height:22px;display:inline-flex;flex:none}.hidden,[hidden]{display:none!important}
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]),textarea,select{min-height:44px;max-width:100%;width:100%;border:1px solid var(--border);border-radius:10px;padding:10px 12px;color:var(--text-primary);background:var(--surface-soft);box-shadow:none}textarea{resize:vertical;min-height:88px;line-height:1.5}select{appearance:none;padding-right:34px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2362758a' stroke-width='1.8'%3E%3Cpath d='m6 8 4 4 4-4'/%3E%3C/svg%3E");background-size:22px;background-repeat:no-repeat;background-position:right 8px center}input[type=checkbox],input[type=radio]{appearance:none!important;position:relative!important;opacity:1!important;display:inline-grid!important;place-content:center!important;flex:0 0 22px!important;width:22px!important;height:22px!important;margin:0!important;border:1.5px solid var(--text-muted)!important;border-radius:6px!important;background:var(--surface)!important;cursor:pointer}input[type=radio]{border-radius:50%!important}input[type=checkbox]:checked,input[type=radio]:checked{background:var(--accent)!important;border-color:var(--accent)!important}input[type=checkbox]:checked::after{content:'';width:10px;height:6px;border-left:2px solid #fff;border-bottom:2px solid #fff;transform:rotate(-45deg) translateY(-1px)}input[type=radio]:checked::after{content:'';width:8px;height:8px;background:#fff;border-radius:50%}input.pulse-switch[type=checkbox]{width:42px!important;flex-basis:42px!important;height:26px!important;border:0!important;border-radius:20px!important;background:var(--text-muted)!important}input.pulse-switch::after{content:''!important;position:absolute;left:3px;top:3px;width:20px!important;height:20px!important;background:#fff;border:0!important;border-radius:50%;transform:none!important;transition:left .15s}input.pulse-switch:checked{background:var(--accent)!important}input.pulse-switch:checked::after{left:19px}.pro-switch-row>i{display:none!important}input[type=file]{display:none!important}.pulse-file{display:flex;align-items:center;gap:10px;min-height:48px;width:100%;text-align:left;border:1px dashed var(--accent);background:var(--accent-soft);color:var(--accent)}.pulse-file span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}label:has(>input[type=checkbox]){display:flex!important;align-items:center!important;gap:12px!important;min-height:44px}.form-grid{display:grid;gap:16px}.form-grid label{display:grid;gap:8px;font-size:13px;font-weight:500}.muted,small{color:var(--text-muted)}p{line-height:1.55}h2,h3{letter-spacing:-.025em}h2{font-size:20px}h3{font-size:16px}.avatar{position:relative;flex-shrink:0;width:44px;height:44px;border-radius:16px;overflow:hidden;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;font-weight:700}.avatar img{position:absolute;inset:0;display:block;width:100%!important;height:100%!important;max-height:none!important;object-fit:cover!important;border-radius:inherit}.avatar:has(img){font-size:0}.profile-v5-avatar>.avatar{width:100%!important;height:100%!important;border-radius:inherit}
/* One dialog host, three layouts: sheet, full settings page, primary tab page. */
.modal{padding:24px;display:flex;align-items:center;justify-content:center;background:#08162588;backdrop-filter:none;z-index:1500}.modal-card.panwar-sheet{position:relative;width:min(560px,100%);max-width:100%;max-height:calc(var(--pw-viewport-height) - 48px);border:1px solid var(--border);border-radius:20px;padding:0!important;background:var(--surface);color:var(--text-primary);display:flex;flex-direction:column;overflow:hidden;box-shadow:var(--shadow-md)}.panwar-sheet-header{display:flex;align-items:center;gap:8px;flex:0 0 auto;min-height:64px;padding:8px 12px;border-bottom:1px solid var(--border);background:var(--surface);z-index:2}.panwar-sheet-header h2{flex:1;min-width:0;margin:0;padding-left:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.panwar-sheet-header .modal-close{position:static!important;display:grid!important;color:var(--text-secondary);font-size:24px;line-height:1}.panwar-sheet-content{flex:1 1 auto;min-height:0;overflow:auto;overscroll-behavior:contain;padding:20px 20px calc(20px + env(safe-area-inset-bottom));scroll-padding-bottom:88px;max-width:100%}.panwar-sheet-content .pulse-title-source{display:none!important}.panwar-sheet-actions,.profile-v5-actions{position:sticky;bottom:calc(-20px - env(safe-area-inset-bottom));z-index:2;display:flex;gap:8px;justify-content:flex-end;margin:16px -20px -20px;padding:12px 20px calc(12px + env(safe-area-inset-bottom));background:var(--surface);border-top:1px solid var(--border)}.panwar-sheet-row,.context-menu>button,.pro-settings-row,.tool-result,.member-row{display:flex;align-items:center;gap:12px;min-height:56px;width:100%;padding:10px 12px;text-align:left;border:0;border-bottom:1px solid var(--border);border-radius:0;background:transparent;color:var(--text-primary)}.context-menu{gap:0;display:grid}.context-menu>button:last-child{border-bottom:0}.context-menu>button.danger-text{margin-top:8px;border-top:1px solid var(--border)}.context-menu>button .pulse-icon{color:var(--text-muted)}.context-menu>button.danger-text .pulse-icon{color:var(--danger)}.tool-results,.member-list{max-height:none!important;overflow:visible!important}.tool-result>span,.member-copy{display:grid;gap:3px;min-width:0;flex:1}.tool-result b,.tool-result small,.member-copy b,.member-copy small{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.member-check{display:flex;align-items:center;gap:12px;min-height:64px;padding:10px 0!important;border:0!important;border-bottom:1px solid var(--border)!important;border-radius:0!important;background:transparent!important;min-width:0}.member-check>.member-copy{flex:1}.member-check small{font-size:12px}.list-empty,.settings-search-empty{padding:28px 16px;text-align:center;line-height:1.5;color:var(--text-muted)}.list-empty strong{display:block;color:var(--text-primary);font-size:16px;margin:8px}.pro-settings-note,.pulse-helper{border-radius:12px;background:var(--surface-soft);padding:12px;font-size:12px;line-height:1.5;color:var(--text-secondary)}.panwar-sheet-content>p:first-child{margin-top:0}#toast{max-width:calc(100vw - 24px);border-radius:12px;background:var(--surface-elevated);color:var(--text-primary);box-shadow:var(--shadow-md);border:1px solid var(--border)}
/* Settings index and focused subpages share bound controls, not duplicate overlays. */
.professional-settings-modal{width:min(780px,100%)!important;height:min(800px,calc(var(--pw-viewport-height) - 48px))!important}.professional-settings-modal .panwar-sheet-content{padding:0!important;display:flex;flex-direction:column}.settings-toolbar{height:auto!important;flex:none;padding:16px!important;border:0;background:var(--surface)}.settings-toolbar>h2{display:none}.settings-toolbar input{max-width:none!important}.pro-settings{display:block!important;min-height:0!important;flex:1;overflow:auto}.pro-settings-nav{display:block!important;overflow:visible!important;padding:0 16px 24px!important;background:var(--surface)!important;border:0!important}.pro-settings-main{display:none!important;height:auto!important;max-height:none!important;overflow:visible!important;background:var(--surface)!important;padding:0!important}.settings-detail-open .pro-settings-nav,.settings-detail-open .settings-toolbar{display:none!important}.settings-detail-open .pro-settings-main{display:block!important}.pro-settings-profile{display:flex!important;gap:12px;align-items:center;padding:16px!important;margin-bottom:16px;border:1px solid var(--border);background:var(--surface-soft);border-radius:16px;min-width:0}.pro-settings-profile>div:last-child{min-width:0;flex:1}.pro-settings-profile b,.pro-settings-profile small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pro-settings-profile .avatar{width:52px!important;height:52px!important}.pro-settings-tab{display:flex!important;align-items:center;gap:14px;width:100%!important;min-height:60px!important;padding:12px!important;margin:0!important;border:0!important;border-bottom:1px solid var(--border)!important;border-radius:0!important;background:transparent!important;color:var(--text-primary)!important;text-align:left}.pro-settings-tab>span:not(.panwar-svg){flex:1;display:grid;gap:4px}.pro-settings-tab small{font-size:12px;font-weight:400}.pro-settings-tab::after{content:'›';color:var(--text-muted);font-size:24px}.pro-settings-tab .panwar-svg{color:var(--accent)}.pro-settings-page{display:none;padding:16px 16px calc(24px + env(safe-area-inset-bottom))!important;max-width:none!important}.pro-settings-page.active{display:block}.pro-settings-head h2{display:none!important}.pro-settings-head p{font-size:13px;margin:0 0 16px;color:var(--text-muted)}.pro-settings-card,.pro-settings-group{border:1px solid var(--border)!important;border-radius:14px!important;overflow:hidden;margin:0 0 16px!important;background:var(--surface)!important}.pro-settings-group-title,.pro-card-label{padding:12px 14px;background:var(--surface-soft);font-size:11px;letter-spacing:.08em;text-transform:uppercase;font-weight:700}.pro-settings-row,.pro-setting-control,.pro-switch-row,.pro-info-row{min-height:60px!important;padding:12px 14px!important;display:flex!important;flex-direction:row!important;align-items:center!important;gap:12px!important;border-bottom:1px solid var(--border);font-size:14px}.pro-settings-row:last-child,.pro-setting-control:last-child,.pro-switch-row:last-child,.pro-info-row:last-child{border-bottom:0}.pro-row-copy,.pro-setting-control>span,.pro-switch-row>span,.pro-info-row>span,.pro-settings-row>div{min-width:0;flex:1}.pro-row-copy b,.pro-row-copy small,.pro-settings-row b,.pro-settings-row small,.pro-switch-row b,.pro-switch-row small,.pro-info-row b,.pro-info-row small,.pro-setting-control b,.pro-setting-control small{display:block;line-height:1.4;overflow-wrap:anywhere}.pro-settings-row small,.pro-setting-control small,.pro-switch-row small,.pro-info-row small{font-size:12px;margin-top:3px;font-weight:400}.pro-row-icon{display:grid;place-items:center;flex:0 0 32px;width:32px;height:32px;background:transparent;color:var(--accent)}.pro-arrow{margin-left:auto;flex:none}.pro-setting-control select{width:140px!important;flex:0 1 140px}.pulse-choice{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;padding:8px 10px;background:var(--surface-soft);border:0;max-width:100%;font-size:13px;text-align:left}.pulse-choice span{overflow:hidden;text-overflow:ellipsis}.pro-setting-control .pulse-choice{flex:0 1 140px;max-width:45%;color:var(--accent)}select.pulse-select-source{display:none!important}.pulse-choice-panel{position:fixed;inset:auto 12px max(12px,env(safe-area-inset-bottom));max-height:70dvh;overflow:auto;background:var(--surface-elevated);border:1px solid var(--border);border-radius:16px;padding:12px;z-index:1900;box-shadow:0 0 0 100vmax #06121f88,var(--shadow-md)}.pulse-choice-panel h3{margin:8px 8px 12px}.pulse-choice-panel button{display:flex;align-items:center;justify-content:space-between;width:100%;text-align:left;margin:3px 0;border:0;background:transparent}.pulse-choice-panel button[aria-selected=true]{background:var(--accent-soft);color:var(--accent)}.settings-results{padding:0 16px 24px}.settings-results button{width:100%;text-align:left;display:grid;gap:4px;margin:4px 0}.settings-results small{font-weight:400}.settings-results mark{background:var(--accent-soft);color:var(--accent)}.pulse-dirty-save{position:sticky;bottom:0;margin-top:16px;width:100%;min-height:44px!important}.settings-preview{margin-bottom:16px;padding:12px;background:var(--surface-soft);border-radius:12px}.settings-preview>span{font-size:10px}.sample-message{padding:10px 14px;border-radius:12px;font-size:13px}.pro-about{padding:16px!important;text-align:center}.panwar-shortcuts-card{display:none}.pulse-danger-zone{margin-top:24px!important;border-color:color-mix(in srgb,var(--danger) 40%,var(--border))!important}.pulse-danger-zone .pro-card-label{color:var(--danger)}
/* Profile forms and compact contact hero. */
.professional-profile-modal{width:min(620px,100%)!important}.panwar-profile-v5{padding:0!important}.profile-v5-header{display:none!important}.profile-v5-hero{display:flex!important;gap:16px!important;align-items:center!important;margin:0 0 20px!important;padding:12px!important;border-radius:12px!important;background:var(--surface-soft)!important}.profile-v5-avatar{width:68px!important;height:68px!important;border-radius:22px!important}.profile-v5-avatar-wrap{flex:none}.profile-v5-identity{min-width:0;text-align:left!important}.profile-v5-identity strong{display:block;font-size:16px!important;white-space:normal!important;overflow-wrap:anywhere}.profile-v5-identity span{display:block;font-size:13px;overflow-wrap:anywhere}.profile-v5-identity small{font-size:11px!important}.profile-v5-grid{display:grid!important;grid-template-columns:1fr!important;gap:16px!important}.profile-v5-form{padding:0!important;display:grid;gap:16px}.profile-v5-field{display:grid;gap:6px;margin:0!important}.profile-v5-field textarea{min-height:88px!important}.profile-v5-username{display:flex}.profile-v5-username i{padding:10px}.profile-v5-actions button{flex:1;border-radius:10px!important;min-height:44px!important}.contact-profile{text-align:center;display:grid;justify-items:center;gap:4px;padding:4px 0 20px}.contact-profile .avatar{width:68px;height:68px;border-radius:22px}.contact-profile h2{font-size:18px;margin:8px 0 0}.contact-profile p{margin:0;max-width:42ch;overflow-wrap:anywhere}.pulse-contact-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:16px}.pulse-contact-actions button{display:grid;place-items:center;gap:8px;background:var(--accent-soft);color:var(--accent);border:0;font-size:12px}
/* Home, conversation and native viewport geometry. */
.app-shell{background:var(--bg);height:var(--pw-viewport-height);overflow:hidden}.sidebar{background:var(--surface);border-color:var(--border)}.side-top{padding:12px 16px;min-height:64px}.side-top .brand b{font-size:24px;letter-spacing:-.04em}.side-top .brand small{font-size:11px}.search-row{padding:4px 16px 12px}.search-row input{height:44px}.filters{display:flex!important;flex-wrap:wrap!important;overflow:visible!important;gap:4px;padding:0 12px 10px}.filters button{min-height:44px;flex:1 0 auto;padding:6px 8px;font-size:12px;background:transparent;border:0;border-radius:10px}.filters button.active{background:var(--accent-soft);color:var(--accent)}.chat-list{padding:0 8px;overflow:auto;min-height:0}.chat-row{min-height:76px;padding:10px 8px;gap:12px;border-radius:12px;border:0;box-shadow:none;background:transparent}.chat-row.active{background:var(--accent-soft)}.chat-row .avatar{width:48px;height:48px}.chat-row .copy{min-width:0;flex:1}.chat-row .line1{display:flex;align-items:center;gap:8px}.chat-row .line1 b{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:15px;font-weight:650}.chat-row p{font-size:13px;line-height:1.4;margin-top:4px}.chat-row .time{font-size:11px;flex-shrink:0}.chat-row .conversation-menu{width:44px;min-width:44px}.chat-view{display:flex;flex-direction:column;min-height:0;height:100%;overflow:hidden;background:var(--bg)}.chat-header{flex:none;min-height:64px;height:64px;padding:8px;gap:8px;background:var(--surface);border-bottom:1px solid var(--border)}.chat-head-copy{min-width:0;flex:1}.chat-head-copy b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px}.chat-head-copy small{font-size:11px}.chat-tools{display:flex;gap:0}.chat-tools .icon-btn{flex:0 0 44px}.messages{flex:1;min-height:0;padding:16px 12px;overflow:auto;overscroll-behavior:contain;scroll-padding:16px;overflow-anchor:none}.load-older{position:static!important;flex:none;align-self:center;height:36px;min-height:36px;margin:4px 0;padding:4px 12px;font-size:11px;color:var(--accent);background:transparent;border:0;z-index:auto}.message{max-width:84%;margin-bottom:6px}.bubble{padding:9px 12px!important;border-radius:14px 14px 14px 4px!important;background:var(--surface);color:var(--text-primary);box-shadow:var(--shadow-sm);font-size:var(--message-font-size,14px);line-height:1.5}.mine .bubble{background:var(--accent-soft);border-radius:14px 14px 4px 14px!important}.meta{font-size:10px!important;line-height:1.3;color:var(--text-muted);margin-top:4px}.reaction-chip{min-height:28px;padding:3px 7px;font-size:12px;border-radius:12px}.composer{display:flex;align-items:flex-end;gap:2px;flex:none;margin:0;padding:8px 8px calc(8px + env(safe-area-inset-bottom));border-radius:0;border:0;border-top:1px solid var(--border);background:var(--surface);box-shadow:none;min-height:64px}.composer textarea{min-width:0;min-height:44px;max-height:120px;margin:0;flex:1;border:0;font-size:16px;padding:11px 8px}.composer .icon-btn,.send-btn{width:44px;height:44px;min-width:44px;min-height:44px;padding:10px}.send-btn{border-radius:14px;background:var(--accent);color:#fff;border:0}.voice-card{display:grid!important;grid-template-columns:40px minmax(65px,1fr) 40px!important;gap:8px!important;width:250px!important;max-width:100%!important;min-height:64px!important;padding:6px!important;background:transparent!important;border:0!important;box-shadow:none!important}.voice-play{width:40px!important;height:40px!important;min-height:40px!important;min-width:40px!important;border-radius:50%!important;padding:8px!important;background:var(--accent)!important;color:#fff!important}.voice-wave{height:22px!important;max-height:22px}.voice-duration,.voice-time{font-size:11px!important}.voice-speed{padding:4px!important;min-width:36px!important;min-height:32px!important;font-size:11px!important}.recording-bar{position:static!important;flex:none;display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:0;padding:8px 12px calc(8px + env(safe-area-inset-bottom));background:var(--surface);border:0;border-top:1px solid var(--border);border-radius:0;box-shadow:none}.recording-bar button{min-height:36px;padding:6px 8px;font-size:12px}.recording-bar #voiceLevel{width:84px;height:24px}.recording-bar #recordHint{font-size:10px;flex:1 0 100%;text-align:center}.chat-view:has(.recording-bar:not(.hidden)) .composer{display:none}.record-dot{width:7px;height:7px;background:var(--danger)}.reply-bar{margin:0;padding:8px 12px;background:var(--surface-soft);flex:none}.typing-bar{min-height:0}.typing-bar:empty{display:none}
/* Primary tabs and compact tools. */
.mobile-nav{height:calc(var(--nav-height) + env(safe-area-inset-bottom));padding:4px 8px env(safe-area-inset-bottom);background:var(--surface);border-top:1px solid var(--border);box-shadow:none;gap:4px}.mobile-nav button{border:0;background:transparent;min-height:56px;border-radius:10px;display:flex;flex-direction:column;gap:4px;align-items:center;justify-content:center;color:var(--text-muted);font-size:11px;padding:6px}.mobile-nav button.active{background:transparent;color:var(--accent)}.mobile-nav button.active::before{content:'';position:absolute;top:0;width:22px;height:3px;border-radius:3px;background:var(--accent)}.mobile-nav button{position:relative}.pulse-tab-page{position:absolute!important;inset:0 0 calc(var(--nav-height) + env(safe-area-inset-bottom))!important;width:100%!important;max-height:none!important;height:auto!important;border-radius:0!important;border:0!important;box-shadow:none!important}.modal.pulse-tab-host{pointer-events:none;background:transparent;backdrop-filter:none}.pulse-tab-host .pulse-tab-page{pointer-events:auto}.pulse-tab-host{z-index:45}.pulse-tab-host .panwar-sheet-header{padding-top:calc(8px + env(safe-area-inset-top))}.pulse-tab-page .panwar-sheet-content{padding:16px}.panwar-tool-hub{padding:0!important}.panwar-tool-intro p{font-size:13px;margin:0 0 20px}.panwar-tool-section{margin-bottom:24px}.panwar-tool-label{font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted);margin-bottom:8px}.panwar-tool-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px}.panwar-tool-grid button{display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-height:80px!important;padding:12px!important;border-radius:12px;background:var(--surface-soft);border:0;text-align:left;font-size:14px;min-width:0}.panwar-tool-grid button small{display:block;flex-basis:100%;font-size:11px;font-weight:400;line-height:1.4}.panwar-tool-grid .pulse-icon{color:var(--accent)}.call-history-row .call-copy{min-width:0;flex:1}.call-history-row .call-copy b{font-size:14px}.call-history-row .call-copy small{font-size:12px}.call-history-row time{font-size:11px;color:var(--text-muted);white-space:nowrap}.call-history-row.missed{color:var(--danger)}.status-feed{display:grid;gap:8px;margin-top:16px}.status-tile{display:flex;align-items:center;gap:12px;min-height:64px;padding:10px;border:0;border-radius:12px;background:var(--surface-soft);text-align:left}.status-tile .avatar{outline:2px solid var(--accent);outline-offset:2px}.status-tile b{font-size:14px}.status-tile small{margin-left:auto;font-size:11px}.status-feed .status-tile{max-width:100%;min-width:0}.status-feed .status-tile b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pulse-status-actions{display:grid;grid-template-columns:1fr auto;gap:8px;margin-bottom:16px}.pulse-status-actions button{font-size:13px}.pulse-color-swatches{display:flex;flex-wrap:wrap;gap:8px}.pulse-color-swatches button{width:44px;height:44px;min-width:44px;border:3px solid var(--surface);box-shadow:0 0 0 1px var(--border);padding:0}.pulse-color-swatches button[aria-pressed=true]{box-shadow:0 0 0 2px var(--accent)}.status-modal .panwar-sheet-header{background:var(--surface)}.status-modal .panwar-sheet-content{padding:0}.status-modal .status-viewer{border-radius:0}.status-modal #statusReplyForm{padding:12px}.status-modal .status-controls button{color:inherit}.pulse-audience-count{font-size:12px;color:var(--accent)}.pulse-password{display:flex;gap:8px;align-items:center}.pulse-password input{min-width:0}.pulse-password button{flex:none;font-size:12px}.pulse-state{background:var(--surface-soft);border-radius:12px;padding:14px;margin-top:16px;font-size:13px}.pulse-state:empty{display:none}.call-controls button{font-size:12px;min-width:48px;min-height:48px;padding:8px;border-radius:14px}.auth-shell{background:var(--bg)}.auth-card{border-color:var(--border)}
@media(max-width:780px){
 html,body{height:var(--pw-viewport-height);overflow:hidden}.app-shell{height:var(--pw-viewport-height);max-height:var(--pw-viewport-height)}.sidebar{inset:0 0 calc(var(--nav-height) + env(safe-area-inset-bottom));padding-top:env(safe-area-inset-top);height:auto}.main-pane{inset:env(safe-area-inset-top) 0 calc(var(--nav-height) + env(safe-area-inset-bottom));height:auto}.app-shell.chat-open .main-pane{inset:env(safe-area-inset-top) 0 0}.side-top .brand .logo,.side-top .brand small,.top-actions #settingsBtn,.top-actions #themeBtn,.me-card,.inbox-heading,.side-bottom{display:none!important}.side-top{padding:8px 12px}.side-top .brand b{font-size:24px}.search-row{padding:4px 12px 10px}.search-row #newGroupBtn{display:none}.filters{padding-inline:8px}.chat-tools #sharedMediaBtn,.chat-tools #chatInfoBtn,.chat-tools #chatSearchBtn{display:none}.chat-header .avatar{display:none}.chat-header .chat-tools .icon-btn{width:44px;height:44px;min-width:44px}.chat-header .mobile-only{display:grid;width:44px;min-width:44px}.chat-head-copy b{font-size:14px}.messages{padding:12px 8px}.message{max-width:88%}.composer #emojiBtn{display:none}.composer .attach-btn{display:grid!important}.voice-card{width:230px!important}.modal{padding:0;align-items:flex-end}.modal-card.panwar-sheet{width:100%;max-height:calc(var(--pw-viewport-height) - max(24px,env(safe-area-inset-top)));border-radius:20px 20px 0 0;border-bottom:0}.modal-card.panwar-sheet::before{content:'';width:32px;height:4px;background:var(--border);border-radius:4px;position:absolute;left:calc(50% - 16px);top:6px;z-index:3}.panwar-sheet-header{padding-top:14px}.professional-settings-modal,.professional-profile-modal{height:var(--pw-viewport-height)!important;max-height:var(--pw-viewport-height)!important;border-radius:0!important;border:0!important}.professional-settings-modal::before,.professional-profile-modal::before,.pulse-tab-page::before{display:none}.professional-settings-modal .panwar-sheet-header,.professional-profile-modal .panwar-sheet-header{padding-top:calc(8px + env(safe-area-inset-top))}.panwar-sheet-content{padding:16px 16px calc(20px + env(safe-area-inset-bottom))}.panwar-sheet-actions,.profile-v5-actions{margin-inline:-16px;padding-inline:16px}.pro-settings-row,.pro-setting-control,.pro-switch-row{font-size:13px}.pulse-tab-host #modalBody{padding:16px}.pro-info-row strong{font-size:12px;max-width:40%;overflow-wrap:anywhere}.profile-v5-identity small{display:none}.settings-results{padding-bottom:32px}.auth-shell{height:var(--pw-viewport-height);min-height:0;overflow:auto;padding-bottom:calc(20px + env(safe-area-inset-bottom))}.pulse-tab-host+.mobile-nav{z-index:50}.mobile-nav{z-index:50}
}
@media(min-width:781px){.pulse-tab-page{inset:16px 16px 16px 370px!important;width:auto!important;border-radius:16px!important;border:1px solid var(--border)!important}.pulse-tab-host{z-index:45}.app-shell{max-width:1600px;margin:auto}.sidebar{width:350px}}
@media(max-width:350px){.side-top .brand b{font-size:22px}.filters button{font-size:11px;padding-inline:5px}.chat-header{gap:2px;padding-inline:4px}.chat-tools{gap:0}.chat-head-copy b{font-size:12px}.chat-row{gap:8px}.chat-row .avatar{width:40px;height:40px}.voice-card{width:204px!important;grid-template-columns:36px minmax(50px,1fr) 32px!important}.composer{padding-inline:4px}.pro-setting-control{flex-wrap:wrap}.pro-setting-control .pulse-choice{max-width:100%;flex:1 0 100%}.status-tile small{max-width:70px}.panwar-tool-grid button{font-size:13px;padding:10px!important}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
#statusAudiencePeople .member-check[hidden]{display:none!important}

/* PANWAR PULSE FINAL QA FIX */
.professional-settings-modal #modalBody,
.modal-card #modalBody{
  min-height:0;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  -webkit-overflow-scrolling:touch;
  overscroll-behavior:contain;
}

.panwar-sheet-actions{
  position:relative;
  z-index:4;
}

.professional-settings-modal .panwar-sheet-actions{
  background:var(--pw-bg);
}

.member-copy{
  min-width:0;
  overflow:hidden;
}

.member-copy b,
.member-copy small{
  display:block;
  min-width:0;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

#mobileNav{
  z-index:1000;
}

/* ==========================================================
   SHEET ACTION DOCK
   ========================================================== */

.panwar-sheet-action-dock{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex:0 0 auto;
  min-height:72px;
  padding:12px 20px calc(12px + env(safe-area-inset-bottom));
  border-top:1px solid var(--border);
  background:var(--surface);
  z-index:4;
}

.panwar-sheet-action-dock.hidden{
  display:none;
}

.panwar-sheet-action-dock > *{
  flex:1 1 auto;
  max-width:none;
}

.panwar-sheet-action-dock .profile-v5-actions,
.panwar-sheet-action-dock .panwar-sheet-actions,
.panwar-sheet-action-dock .pro-save-btn,
.panwar-sheet-action-dock .profile-v5-cancel,
.panwar-sheet-action-dock .profile-v5-save{
  position:static;
  bottom:auto;
  margin:0;
  padding:12px 16px;
  border-top:0;
  background:transparent;
}

.panwar-sheet-action-dock .profile-v5-actions,
.panwar-sheet-action-dock .panwar-sheet-actions{
  display:flex;
  gap:8px;
  width:100%;
  justify-content:flex-end;
}

.panwar-sheet-action-dock .profile-v5-actions > *,
.panwar-sheet-action-dock .panwar-sheet-actions > *,
.panwar-sheet-action-dock .pro-save-btn,
.panwar-sheet-action-dock .profile-v5-cancel,
.panwar-sheet-action-dock .profile-v5-save{
  flex:1 1 0;
  min-width:0;
}

#saveAppearanceSettings,
#savePrivacySettings,
.profile-v5-actions,
.panwar-sheet-actions{
  position:static !important;
  bottom:auto !important;
  z-index:auto !important;
  display:flex !important;
  width:100% !important;
  margin:0 !important;
  padding:0 !important;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
}

#modalBody { padding-bottom:0; }

.member-row,
.member-check{
  min-width:0 !important;
  max-width:100% !important;
}

.member-copy{
  min-width:0 !important;
  max-width:100% !important;
  overflow:hidden !important;
}

.member-copy b,
.member-copy small{
  display:block;
  max-width:100% !important;
  overflow:hidden !important;
  text-overflow:ellipsis;
  white-space:nowrap;
}

@media(max-width:780px){
  .mobile-nav{
    position:fixed !important;
    left:0 !important;
    right:0 !important;
    bottom:0 !important;
    width:100% !important;
    height:calc(var(--nav-height) + env(safe-area-inset-bottom)) !important;
    z-index:1001 !important;
    pointer-events:auto !important;
  }

  .modal{
    z-index:900 !important;
  }

  .modal.pulse-tab-host,
  .modal.pulse-tab-host .pulse-tab-page{
    pointer-events:auto !important;
  }
}

/* PANWAR_TOOL_SUBGRID_STYLE */
.panwar-tool-subgrid{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:8px;
}

.panwar-tool-subgrid button{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  min-height:80px !important;
  padding:12px !important;
  border-radius:12px;
  background:var(--surface-soft);
  border:0;
  text-align:left;
  font-size:14px;
  min-width:0;
}

.panwar-tool-subgrid button small{
  display:block;
  flex-basis:100%;
  font-size:11px;
  font-weight:400;
  line-height:1.4;
}

.panwar-tool-subgrid .pulse-icon{
  color:var(--accent);
}

@media(max-width:350px){
  .panwar-tool-subgrid button{
    font-size:13px;
    padding:10px !important;
  }
}


/* ==========================================================
   PANWAR FINAL VISUAL QA CLEANUP
   ========================================================== */

/* Settings detail pages must never appear faded */
.settings-detail-open .pro-settings-main,
.settings-detail-open .pro-settings-page.active,
.settings-detail-open .pro-settings-head,
.settings-detail-open .pro-settings-card,
.settings-detail-open .pro-settings-group,
.settings-detail-open .pro-settings-row,
.settings-detail-open .pro-setting-control,
.settings-detail-open .pro-switch-row,
.settings-detail-open .pro-info-row,
.settings-detail-open .pro-settings-note{
  opacity:1 !important;
  filter:none !important;
  visibility:visible !important;
}

.settings-detail-open .pro-settings-main,
.settings-detail-open .pro-settings-page.active{
  color:var(--text-primary) !important;
  background:var(--surface) !important;
}

.settings-detail-open .pro-settings-head p,
.settings-detail-open .pro-settings-row small,
.settings-detail-open .pro-setting-control small,
.settings-detail-open .pro-switch-row small,
.settings-detail-open .pro-info-row small,
.settings-detail-open .pro-row-copy small{
  opacity:1 !important;
  color:var(--text-secondary) !important;
}

.settings-detail-open .pro-settings-row b,
.settings-detail-open .pro-setting-control b,
.settings-detail-open .pro-switch-row b,
.settings-detail-open .pro-info-row b,
.settings-detail-open .pro-row-copy b{
  opacity:1 !important;
  color:var(--text-primary) !important;
}

.settings-detail-open .pro-row-icon,
.settings-detail-open .pro-arrow,
.settings-detail-open .pulse-choice{
  opacity:1 !important;
}

/* Prevent old settings-upgrade cards from duplicating the rebuilt 3.11 UI */
.professional-settings-modal [data-panwar-settings-extension],
.professional-settings-modal .pc-tab-settings-card,
.professional-settings-modal .pc-v4-card{
  display:none !important;
}

/* Account already has these actions in the rebuilt rows.
   Keep the newer mobile rows and hide visual duplicates. */
[data-page="account"] #settingsEmail,
[data-page="account"] #settingsLinkedSignIn,
[data-page="account"] #settingsSessions{
  display:none !important;
}

/* Appearance Save should respect hidden state */
#saveAppearanceSettings[hidden]{
  display:none !important;
}

/* Remove accidental visual overlays on settings details */
.settings-detail-open .pro-settings-main::before,
.settings-detail-open .pro-settings-main::after,
.settings-detail-open .pro-settings-page.active::before,
.settings-detail-open .pro-settings-page.active::after{
  pointer-events:none !important;
}

/* Calls / Updates / Tools are primary mobile pages.
   Do not show the chat composer underneath them. */
body:has(#modal.pulse-tab-host:not(.hidden)) #composer,
body:has(#modal.pulse-tab-host:not(.hidden)) #recordingBar{
  display:none !important;
}

@media(max-width:780px){

  body:has(#modal.pulse-tab-host:not(.hidden)) #mobileNav{
    display:flex !important;
    position:fixed !important;
    left:0 !important;
    right:0 !important;
    bottom:0 !important;
    width:100% !important;
    z-index:1001 !important;
    background:var(--surface) !important;
  }

  body:has(#modal.pulse-tab-host:not(.hidden)) .pulse-tab-page{
    bottom:calc(var(--nav-height) + env(safe-area-inset-bottom)) !important;
  }
}
/* ==========================================================
   PANWAR FINAL MICRO POLISH
   ========================================================== */

/* Dynamic Settings rows use the same visual chevron as native rows */
.pro-settings-row > span:last-child:not(.pro-row-copy):not(.pro-row-icon){
  flex:0 0 24px !important;
  width:24px !important;
  height:24px !important;
  display:grid !important;
  place-items:center !important;
  margin-left:auto !important;
  color:var(--text-muted) !important;
  font-size:24px !important;
  line-height:1 !important;
  font-weight:400 !important;
}

/* Security 3.11 page already contains all account protection actions.
   Hide obsolete legacy blocks appended underneath it. */
[data-page="security"] > :not(.pro-settings-head):not(.pro-settings-card){
  display:none !important;
}



/* Privacy Save should respect hidden state */
#savePrivacySettings[hidden]{
  display:none !important;
}

/* PANWAR FINAL VISUAL POLISH START */

/* The original dock stylesheet later set profile action buttons transparent.
   Restore the intended visible Save / Cancel presentation. */
#sheetActionDock .profile-v5-actions{
  display:flex !important;
  gap:10px !important;
  width:100% !important;
  padding:0 !important;
  margin:0 !important;
  background:transparent !important;
  border:0 !important;
}

#sheetActionDock .profile-v5-cancel{
  background:var(--surface) !important;
  color:var(--text-primary) !important;
  border:1px solid var(--border) !important;
  box-shadow:none !important;
}

#sheetActionDock .profile-v5-save{
  background:var(--accent) !important;
  color:#fff !important;
  border:1px solid var(--accent) !important;
  box-shadow:none !important;
}

body.dark #sheetActionDock .profile-v5-save{
  color:#082333 !important;
}

/* Main app menu should be content-sized, not an almost-empty full screen. */
@media(max-width:780px){
  #modal .modal-card.panwar-sheet.panwar-main-menu-compact{
    height:auto !important;
    min-height:0 !important;
    max-height:calc(var(--pw-viewport-height,100dvh) - 84px) !important;
    align-self:flex-end !important;
  }

  #modal .modal-card.panwar-sheet.panwar-main-menu-compact #modalBody{
    flex:0 1 auto !important;
    min-height:0 !important;
    overflow-y:auto !important;
  }

  #modal .modal-card.panwar-sheet.panwar-main-menu-compact #sheetActionDock{
    display:none !important;
  }
}
/* PANWAR FINAL VISUAL POLISH END */
