/* FP Digital Portal 10.5 — full-canvas workspaces, native share studio, stream-audio controls */

/* Use the real application viewport. The document itself never becomes the scrolling surface. */
html,body{width:100%;height:100%;min-height:100%;overflow:hidden!important}
.shell{height:100dvh!important;min-height:0!important;overflow:hidden!important}
.main{height:100dvh!important;min-height:0!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
.topbar{flex:0 0 70px!important;min-height:70px!important;padding:10px 14px!important}
.content{flex:1 1 auto!important;min-height:0!important;height:auto!important;padding:8px 10px 10px!important;overflow:hidden!important}
.view{min-width:0;min-height:0}
.view.active{height:100%!important;min-height:0!important;max-height:none!important;overflow:auto}
.section-head{flex:0 0 auto!important;margin:0 0 7px!important;padding:0 2px!important;gap:12px!important}
.section-head h2{margin-top:3px!important;font-size:clamp(1.15rem,1.6vw,1.55rem)!important;line-height:1.06!important}
.section-head p{max-width:840px!important;margin-top:4px!important;font-size:.58rem!important;line-height:1.35!important}
.section-head .eyebrow{font-size:.48rem!important}

/* Messages: one flat, full-height workspace instead of cards inside cards. */
#view-messages.active{display:flex!important;flex-direction:column!important;height:100%!important;min-height:0!important;overflow:hidden!important}
#view-messages .messages-page-head-v10{display:none!important}
.messages-shell-v10{flex:1 1 auto!important;height:auto!important;min-height:0!important;max-height:none!important;grid-template-columns:72px minmax(0,1fr) 218px!important;border:0!important;border-radius:12px!important;background:var(--panel)!important;box-shadow:none!important;overflow:hidden!important}
.dm-orbit-rail-v10{padding:8px 6px!important;border:0!important;border-right:1px solid var(--border)!important;background:color-mix(in srgb,var(--sidebar-bg) 96%,#000 4%)!important}
.dm-orb-button-v10{width:50px!important;height:50px!important;flex-basis:50px!important}.dm-orb-button-v10 .dm-orb-avatar-v10{width:44px!important;height:44px!important}
.dm-home-orb-v10,.dm-rail-team-v10{width:44px!important;height:44px!important;flex-basis:44px!important;border-radius:14px!important}
.dm-conversation-panel-v10{height:100%!important;min-height:0!important;border:0!important;border-radius:0!important;background:var(--panel2)!important;overflow:hidden!important}
.dm-conversation-panel-v10 .chat-room-header{flex:0 0 58px!important;min-height:58px!important;padding:8px 12px!important;border-bottom:1px solid var(--border)!important}
.dm-conversation-panel-v10 .livekit-signal-strip{flex:0 0 30px!important;min-height:30px!important;padding:5px 12px!important}
.dm-conversation-panel-v10 .chat-search-wrap{flex:0 0 42px!important;padding:6px 10px!important}
.dm-conversation-panel-v10 .chat-search-wrap input{height:30px!important;min-height:30px!important}
.dm-conversation-panel-v10 .chat-message-list{flex:1 1 auto!important;min-height:0!important;padding:10px 12px!important;overflow:auto!important}
.dm-conversation-panel-v10 .chat-typing{flex:0 0 20px!important;min-height:20px!important;padding:2px 12px!important}
.dm-conversation-panel-v10 .chat-compose-wrap{flex:0 0 auto!important;padding:7px 10px 9px!important;border-top:1px solid var(--border)!important;background:var(--panel)!important}
.dm-conversation-panel-v10 .chat-media-tools{padding:0 0 5px!important}
.dm-conversation-panel-v10 .chat-attachment-help-v103{display:none!important}
.dm-profile-panel-v10{height:100%!important;border:0!important;border-left:1px solid var(--border)!important;background:var(--panel)!important}
.dm-profile-panel-v10 .chat-member-title{min-height:48px;padding:10px 12px!important}

/* Voice: use every remaining pixel and keep the shared screen inside the workspace. */
#view-voice.active{display:flex!important;flex-direction:column!important;height:100%!important;min-height:0!important;overflow:hidden!important}
#view-voice .voice-page-head-v9{flex:0 0 48px!important;min-height:48px!important;margin:0 0 6px!important;align-items:center!important}
#view-voice .voice-page-head-v9 .eyebrow,#view-voice .voice-page-head-v9 p{display:none!important}
#view-voice .voice-page-head-v9 h2{margin:0!important;font-size:1.18rem!important}
.voice-discord-shell-v9{position:relative!important;flex:1 1 auto!important;height:auto!important;min-height:0!important;max-height:none!important;grid-template-columns:214px minmax(0,1fr) 205px!important;border:0!important;border-radius:12px!important;box-shadow:none!important;overflow:hidden!important;background:var(--panel)!important}
.voice-stage-v9{position:relative!important;height:100%!important;min-height:0!important;overflow:hidden!important}
.voice-channel-rail-v9,.voice-info-rail-v9{height:100%!important;min-height:0!important;overflow:auto!important}
.voice-stage-head-v9{flex:0 0 58px!important;min-height:58px!important;padding:8px 12px!important}
.voice-participant-stage-head-v104{flex:0 0 55px!important;min-height:55px!important;padding:8px 12px!important}
.voice-participant-stage-head-v104 h3{margin:2px 0 0!important}.voice-participant-stage-head-v104 p{display:none!important}
.voice-control-dock-v103{flex:0 0 52px!important;min-height:52px!important;padding:5px 8px!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important}
.voice-control-dock-v103 .voice-control-v9{height:40px!important;min-width:74px!important;padding:0 9px!important}
.voice-participant-grid-v103{min-height:0!important;padding:9px!important;gap:9px!important;grid-template-columns:repeat(auto-fit,minmax(205px,1fr))!important;align-content:stretch!important}
.voice-participant-card-v104{min-height:205px!important;padding:10px!important;border-radius:14px!important}
.voice-participant-avatar-v9{width:88px!important;height:88px!important}.voice-participant-avatar-shell-v104,.voice-participant-avatar-button-v104{width:94px!important;height:94px!important}

/* Shared-screen stage: extended view inside the voice canvas, then true Fullscreen API on demand. */
.voice-stream-viewer-v103{position:absolute!important;inset:0!important;z-index:60!important;width:auto!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;border:0!important;border-radius:0!important;background:#05080d!important;box-shadow:none!important;display:flex!important;flex-direction:column!important}
.voice-stream-viewer-v103[hidden]{display:none!important}
.voice-stream-toolbar-v103{flex:0 0 54px!important;min-height:54px!important;padding:7px 10px!important;background:rgba(8,13,21,.97)!important}
.voice-stream-video-host-v103{flex:1 1 auto!important;min-height:0!important;height:auto!important;display:grid!important;place-items:center!important;background:#020306!important;overflow:hidden!important}
.voice-stream-video-host-v103 video{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;background:#020306!important}
.voice-stream-viewer-v103.fill .voice-stream-video-host-v103 video{object-fit:cover!important}
.voice-stream-viewer-v103.minimized{position:fixed!important;inset:auto 18px 18px auto!important;width:min(430px,calc(100vw - 32px))!important;height:min(290px,44vh)!important;z-index:12020!important;border:1px solid var(--bright)!important;border-radius:16px!important;box-shadow:0 24px 80px rgba(0,0,0,.58)!important;overflow:hidden!important}
.voice-stream-viewer-v103:fullscreen{inset:0!important;width:100vw!important;height:100vh!important;border:0!important;border-radius:0!important;background:#000!important}
.voice-stream-viewer-v103:fullscreen .voice-stream-toolbar-v103{min-height:60px!important}.voice-stream-viewer-v103:fullscreen .voice-stream-video-host-v103 video{object-fit:contain!important}
#voiceScreenFullscreenV103{min-width:40px!important;background:color-mix(in srgb,var(--accent) 18%,var(--surface))!important;border-color:color-mix(in srgb,var(--accent) 55%,var(--border))!important;color:var(--bright)!important;font-size:1rem!important}

/* Stream audio is visible and usable in normal, minimized, and fullscreen views. */
.voice-stream-audio-footer-v105{flex:0 0 54px!important;min-height:54px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;padding:7px 10px!important;background:rgba(8,13,21,.98)!important;border-top:1px solid rgba(255,255,255,.09)!important}
.voice-stream-health-v105{min-width:0}.voice-stream-health-v105 span,.voice-stream-health-v105 small{display:block}.voice-stream-health-v105 span{font-size:.52rem;font-weight:900}.voice-stream-health-v105 small{margin-top:2px;color:var(--muted);font-size:.43rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.voice-stream-audio-controls-v105{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0}.voice-stream-audio-controls-v105 button{width:34px;height:34px;border:1px solid var(--border);border-radius:10px;background:var(--surface);color:var(--text)}
.voice-stream-audio-controls-v105 label{display:grid!important;grid-template-columns:auto minmax(80px,150px) 38px!important;align-items:center!important;gap:7px!important;margin:0!important;color:var(--muted);font-size:.46rem!important}.voice-stream-audio-controls-v105 input{width:100%;accent-color:var(--accent)}.voice-stream-audio-controls-v105 output{color:var(--text);text-align:right;font-size:.43rem}.voice-stream-output-v105{grid-template-columns:auto minmax(105px,150px)!important}.voice-stream-output-v105 select{height:31px;padding:4px 7px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--text);font-size:.47rem}.voice-stream-output-v105.unsupported{display:none!important}
.voice-stream-viewer-v103.minimized .voice-stream-health-v105,.voice-stream-viewer-v103.minimized .voice-stream-output-v105{display:none!important}.voice-stream-viewer-v103.minimized .voice-stream-audio-footer-v105{min-height:44px!important;flex-basis:44px!important}.voice-stream-viewer-v103.minimized .voice-stream-audio-controls-v105{width:100%;justify-content:center}.voice-stream-viewer-v103.minimized .voice-stream-audio-controls-v105 label{grid-template-columns:auto minmax(70px,1fr) 36px!important;flex:1}

/* FP-native screen-share setup menu. */
.share-studio-overlay-v105{z-index:15000!important;padding:16px!important}
.share-studio-modal-v105{width:min(900px,calc(100vw - 28px))!important;max-width:900px!important;max-height:min(870px,calc(100dvh - 28px))!important;display:flex!important;flex-direction:column!important;overflow:hidden!important;border-radius:22px!important}
.share-studio-head-v105{flex:0 0 auto!important;padding:16px 18px 12px!important}.share-studio-head-v105 h3{margin:5px 0 0!important;font-size:1.08rem!important}.share-studio-head-v105 p{margin-top:5px;color:var(--muted);font-size:.58rem;line-height:1.45}
.share-studio-scroll-v105{flex:1 1 auto;min-height:0;overflow:auto;padding:0 16px 14px}
.share-studio-section-v105{margin-top:12px;padding:14px;border:1px solid var(--border);border-radius:16px;background:var(--surface)}
.share-studio-section-v105>header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:11px}.share-studio-section-v105>header b,.share-studio-section-v105>header small{display:block}.share-studio-section-v105>header b{font-size:.68rem}.share-studio-section-v105>header small{margin-top:3px;color:var(--muted);font-size:.5rem;line-height:1.4}
.share-source-grid-v105{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.share-source-grid-v105 button{display:grid;grid-template-columns:42px minmax(0,1fr);grid-template-rows:auto auto;column-gap:10px;align-items:center;padding:12px;border:1px solid var(--border);border-radius:13px;background:var(--panel2);color:var(--text);text-align:left}.share-source-grid-v105 button>span{grid-row:1/3;display:grid;place-items:center;width:42px;height:42px;border-radius:11px;background:var(--surface);color:var(--accent);font-size:1.1rem}.share-source-grid-v105 button b{font-size:.59rem}.share-source-grid-v105 button small{margin-top:3px;color:var(--muted);font-size:.46rem;line-height:1.35}.share-source-grid-v105 button.selected{border-color:var(--accent);background:color-mix(in srgb,var(--accent) 13%,var(--panel2));box-shadow:0 0 0 2px color-mix(in srgb,var(--accent) 11%,transparent)}
.share-profile-badge-v105{padding:7px 10px;border:1px solid color-mix(in srgb,var(--accent) 45%,var(--border));border-radius:999px;background:color-mix(in srgb,var(--accent) 10%,var(--panel2));color:var(--accent);font-size:.52rem;font-weight:950;white-space:nowrap}.share-profile-grid-v105{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.share-profile-grid-v105 label{display:grid;gap:5px}.share-profile-grid-v105 label>span{color:var(--muted);font-size:.5rem;font-weight:850}.share-profile-grid-v105 select{width:100%;min-height:40px;padding:8px 10px;border:1px solid var(--border);border-radius:10px;background:var(--panel2);color:var(--text)}
.share-toggle-grid-v105{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.share-toggle-grid-v105 label{display:grid;grid-template-columns:auto minmax(0,1fr);gap:9px;align-items:start;padding:11px;border:1px solid var(--border);border-radius:12px;background:var(--panel2)}.share-toggle-grid-v105 input{margin-top:3px;accent-color:var(--accent)}.share-toggle-grid-v105 b,.share-toggle-grid-v105 small{display:block}.share-toggle-grid-v105 b{font-size:.57rem}.share-toggle-grid-v105 small{margin-top:3px;color:var(--muted);font-size:.46rem;line-height:1.35}.share-studio-note-v105{display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;margin-top:10px;padding:10px 11px;border:1px dashed color-mix(in srgb,var(--accent) 42%,var(--border));border-radius:11px;background:color-mix(in srgb,var(--accent) 6%,var(--panel2))}.share-studio-note-v105 b{color:var(--accent);font-size:.5rem}.share-studio-note-v105 span{color:var(--muted);font-size:.47rem;line-height:1.4}.share-studio-actions-v105{flex:0 0 auto!important;padding:11px 16px 14px!important}.share-studio-actions-v105 .primary{min-width:220px}

/* Compact the other tabs without breaking their own internal scrolling. */
#view-projects.active,#view-proposals.active,#view-tasks.active,#view-mail.active,#view-documents.active,#view-calendar.active,#view-music.active,#view-team.active,#view-profile.active,#view-settings.active,#view-overview.active{padding-bottom:2px}
#view-calendar.active .calendar-layout,#view-music.active .youtube-music-shell-v9{min-height:0}

@media(max-width:1450px){
  .messages-shell-v10{grid-template-columns:68px minmax(0,1fr)!important}.dm-profile-panel-v10{display:none!important}
  .voice-discord-shell-v9{grid-template-columns:202px minmax(0,1fr)!important}.voice-info-rail-v9{display:none!important}
}
@media(max-width:900px){
  html,body{overflow:hidden!important}.topbar{flex-basis:62px!important;min-height:62px!important}.content{padding:6px!important}
  .messages-shell-v10{display:flex!important;flex-direction:column!important;height:100%!important;min-height:0!important;border-radius:10px!important}.dm-orbit-rail-v10{order:0;flex:0 0 62px!important;min-height:62px!important;flex-direction:row!important;overflow-x:auto!important;overflow-y:hidden!important;border-right:0!important;border-bottom:1px solid var(--border)!important}.dm-avatar-list-v10{flex-direction:row!important;width:auto!important}.dm-rail-spacer-v10,.dm-rail-divider-v10,.dm-connection-v10,.dm-rail-team-v10{display:none!important}.dm-conversation-panel-v10{order:1;flex:1 1 auto!important}.dm-conversation-panel-v10 .livekit-signal-strip{display:none!important}
  #view-voice .voice-page-head-v9{display:none!important}.voice-discord-shell-v9{display:flex!important;flex-direction:column!important;height:100%!important;min-height:0!important;border-radius:10px!important}.voice-channel-rail-v9{flex:0 0 180px!important;max-height:180px!important;border-right:0!important;border-bottom:1px solid var(--border)!important}.voice-stage-v9{flex:1 1 auto!important;min-height:0!important}.voice-participant-stage-head-v104{display:none!important}.voice-control-dock-v103{order:1}.voice-participant-grid-v103{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))!important}.voice-participant-card-v104{min-height:175px!important}
  .voice-stream-toolbar-v103{overflow-x:auto!important}.voice-stream-toolbar-v103>*{flex:0 0 auto}.voice-stream-audio-footer-v105{gap:5px!important}.voice-stream-health-v105,.voice-stream-output-v105{display:none!important}.voice-stream-audio-controls-v105{width:100%!important}.voice-stream-audio-controls-v105 label{grid-template-columns:auto minmax(70px,1fr) 36px!important;flex:1}
  .share-source-grid-v105,.share-profile-grid-v105,.share-toggle-grid-v105{grid-template-columns:1fr!important}.share-studio-modal-v105{max-height:calc(100dvh - 12px)!important}.share-studio-overlay-v105{padding:6px!important}.share-studio-head-v105{padding:13px 13px 9px!important}.share-studio-scroll-v105{padding:0 10px 10px!important}.share-studio-section-v105{padding:11px!important}.share-studio-actions-v105{padding:9px 11px 11px!important}.share-studio-actions-v105 .primary{min-width:0!important}
}
@media(max-width:520px){
  .topbar{padding:7px 8px!important}.content{padding:4px!important}.messages-shell-v10,.voice-discord-shell-v9{border-radius:8px!important}
  .dm-conversation-panel-v10 .chat-room-header{flex-basis:52px!important;min-height:52px!important}.chat-header-tools #openVoiceTab{display:none!important}.dm-conversation-panel-v10 .chat-search-wrap{display:none!important}.dm-conversation-panel-v10 .chat-message-list{padding:7px!important}
  .voice-channel-rail-v9{flex-basis:150px!important;max-height:150px!important}.voice-stage-head-v9{flex-basis:50px!important;min-height:50px!important}.voice-control-dock-v103{flex-basis:48px!important;min-height:48px!important}.voice-control-dock-v103 .voice-control-v9{height:37px!important;min-width:66px!important}.voice-participant-grid-v103{grid-template-columns:1fr!important;padding:6px!important}.voice-participant-card-v104{min-height:155px!important}
  .voice-stream-viewer-v103.minimized{left:6px!important;right:6px!important;bottom:6px!important;width:auto!important;height:245px!important}.voice-stream-toolbar-v103{flex-basis:48px!important;min-height:48px!important}.voice-stream-audio-footer-v105{flex-basis:44px!important;min-height:44px!important}.voice-stream-audio-controls-v105 label>span{display:none!important}
}
