/* ==========================================================================
   Nexa collaboration: professional refinement, 2026-10-12.
   Presentation only: type, spacing, elevation, focus, density and responsive
   layout. No behaviour, visibility or functional-state colour (mute, enabled,
   destructive) is changed; those stay in nexa-enterprise-theme.css.
   Loaded after the theme and style.css.
   ========================================================================== */
:root {
  --font-ui: Inter, "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-lg: 14px;
  --radius-md: 10px;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 28px -14px rgba(0, 0, 0, .7);
  --ring: 0 0 0 3px rgba(129, 140, 248, .5);
  --header-h: 56px;
}

.collaboration-theme { font-family: var(--font-ui); font-size: 14px; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.collaboration-theme p { font-size: 13px; line-height: 1.55; }
.collaboration-theme h1 { font-size: 20px; letter-spacing: -.012em; color: #fff; }
.collaboration-theme h2 { font-size: 15px; letter-spacing: -.005em; }
.collaboration-theme :focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--accent); }
.collaboration-theme button { font-weight: 600; border-radius: var(--radius-md); transition: background-color .15s, border-color .15s, box-shadow .15s, transform .05s; }
.collaboration-theme button:active:not(:disabled) { transform: translateY(1px); }
.collaboration-theme input,
.collaboration-theme textarea,
.collaboration-theme select { border-radius: var(--radius-md); transition: border-color .15s, box-shadow .15s; }

/* Header ------------------------------------------------------------------ */
.collaboration-theme .app-header { height: var(--header-h); padding: 0 22px; background: rgba(20, 24, 52, .92); -webkit-backdrop-filter: saturate(1.3) blur(10px); backdrop-filter: saturate(1.3) blur(10px); box-shadow: 0 1px 0 rgba(165, 174, 230, .12); }
.collaboration-theme .app-shell { height: calc(100% - var(--header-h)); grid-template-columns: 268px minmax(0, 1fr); }
.collaboration-theme .brand { gap: 12px; }
.collaboration-theme .brand-mark { width: 36px; height: 36px; border-radius: 11px; font-size: 18px; box-shadow: 0 6px 18px -6px rgba(99, 102, 241, .7); }
.collaboration-theme .brand strong { font-size: 19px; color: #fff; letter-spacing: -.01em; }
.collaboration-theme .brand-subtitle { font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: #8f95bd; }
.collaboration-theme .app-divider { margin: 0 10px; height: 22px; }
.collaboration-theme .app-name { font-size: 12px; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: var(--accent-soft); border: 1px solid var(--border); color: #dfe3ff; }
.collaboration-theme .account { gap: 10px; }
.collaboration-theme #identity { padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: rgba(13, 16, 38, .55); color: #dfe3ff; font-size: 12px; font-weight: 500; }

/* Sidebar ----------------------------------------------------------------- */
.collaboration-theme .room-sidebar { padding: 18px 14px 14px; gap: 12px; background: linear-gradient(180deg, #151a3a, #121631); }
.collaboration-theme .eyebrow { font-size: 10px; letter-spacing: .14em; color: #8f95bd; }
.collaboration-theme .login-card { padding: 18px 16px; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); background: #1b2044; }
.collaboration-theme .login-card h2 { font-size: 17px; color: #fff; margin-bottom: 2px; }
.collaboration-theme .login-card input,
.collaboration-theme .login-card button { min-height: 40px; }
.collaboration-theme #login button,
.collaboration-theme #sso { margin-top: 6px; }
.collaboration-theme .dev-login { margin-top: 10px; }
.collaboration-theme .dev-login summary { color: #c7d2fe; font-size: 12px; font-weight: 600; padding: 4px 0; }
.collaboration-theme .dev-login form { display: grid; gap: 10px; margin-top: 10px; }
.collaboration-theme .room-heading h2 { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #8f95bd; font-weight: 700; }
.collaboration-theme .search-label input { min-height: 38px; background: #0d1026; }
.collaboration-theme #rooms { gap: 3px; }
.collaboration-theme #rooms button { border-radius: var(--radius-md); min-height: 40px; background: transparent; border-color: transparent; font-weight: 500; }
.collaboration-theme #rooms button:hover { background: rgba(99, 102, 241, .12); border-color: transparent; filter: none; }
.collaboration-theme #rooms button.selected { background: rgba(99, 102, 241, .2); border-color: rgba(129, 140, 248, .35); box-shadow: inset 3px 0 0 var(--accent); font-weight: 600; }
.collaboration-theme .nav-section { color: #8f95bd; letter-spacing: .12em; }
.collaboration-theme .workspace-info { color: #8f95bd; }
.collaboration-theme .workspace-info summary { font-weight: 600; color: #aab0d6; }

/* Workspace header and tabs ---------------------------------------------- */
.collaboration-theme .room-toolbar { padding: 14px 24px 12px; border-bottom: 0; }
.collaboration-theme #status { font-size: 12px; color: #9aa0c8; }
.collaboration-theme .workspace-tabs { padding: 0 24px; gap: 2px; background: transparent; border-bottom: 1px solid var(--border); }
.collaboration-theme .workspace-tabs button { padding: 11px 14px; font-size: 13px; font-weight: 600; color: #9aa0c8; background: transparent; border-radius: 0; min-height: 44px; }
.collaboration-theme .workspace-tabs button:hover:not(:disabled) { color: #fff; filter: none; }
.collaboration-theme .workspace-tabs button[aria-selected=true] { color: #fff; border-bottom: 2px solid var(--accent); }
.collaboration-theme .workspace-tabs button:disabled { opacity: .4; }
.collaboration-theme .live-indicator { background: rgba(34, 197, 94, .16); color: #86efac; border: 1px solid rgba(34, 197, 94, .4); border-radius: 999px; padding: 2px 8px; font-weight: 700; letter-spacing: .02em; }

/* Welcome and empty states ----------------------------------------------- */
.collaboration-theme .welcome-symbol { width: 64px; height: 64px; border-radius: 18px; box-shadow: var(--shadow-card); }
.collaboration-theme .welcome-panel h2 { font-size: 24px; letter-spacing: -.015em; color: #fff; }
.collaboration-theme .welcome-features { letter-spacing: .06em; text-transform: uppercase; font-size: 11px; font-weight: 600; color: #8f95bd; }

/* Chat -------------------------------------------------------------------- */
.collaboration-theme #messages { padding: 4px 24px 16px; }
.collaboration-theme .message { max-width: min(72%, 680px); margin: 12px 0; gap: 10px; }
.collaboration-theme .message .avatar { width: 34px; height: 34px; font-size: 13px; font-weight: 700; box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .6); }
.collaboration-theme .bubble { padding: 10px 14px; border-radius: 14px 14px 14px 5px; box-shadow: var(--shadow-card); line-height: 1.55; font-size: 14px; }
.collaboration-theme .message.own .bubble { border-radius: 14px 14px 5px 14px; }
.collaboration-theme .message span { font-size: 12px; font-weight: 700; color: #dfe3ff; margin-right: 10px; }
.collaboration-theme .message time { font-size: 10.5px; color: #8f95bd; letter-spacing: .02em; }
.collaboration-theme .system-pill { font-size: 11px; font-weight: 600; letter-spacing: .02em; padding: 5px 14px; }
.collaboration-theme .history-toolbar { padding: 10px 24px; }
.collaboration-theme .composer { padding: 12px 24px 16px; background: rgba(20, 24, 52, .55); border-top: 1px solid var(--border); }
.collaboration-theme #send textarea { min-height: 44px; border-radius: 14px; padding: 11px 14px; background: #0d1026; }
.collaboration-theme #send button { min-height: 44px; border-radius: 12px; padding: 0 20px; box-shadow: 0 8px 20px -10px rgba(99, 102, 241, .8); }
.collaboration-theme .composer-help { color: #7f86b0; }

/* Files ------------------------------------------------------------------- */
.collaboration-theme .scroll-panel { padding: 20px 24px; }
.collaboration-theme .panel-heading h2 { font-size: 18px; color: #fff; }
.collaboration-theme .upload-bar { padding: 16px; border: 1px dashed rgba(129, 140, 248, .5); border-radius: var(--radius-lg); background: rgba(99, 102, 241, .07); }
.collaboration-theme #file-list { gap: 10px; margin: 16px 0; }
.collaboration-theme #file-list li { padding: 14px 16px; border-radius: var(--radius-lg); background: #1b2044; box-shadow: var(--shadow-card); transition: border-color .15s, transform .15s; }
.collaboration-theme #file-list li:hover { border-color: rgba(129, 140, 248, .55); transform: translateY(-1px); }
/* Pure-CSS document glyph: the workspace CSP is img-src 'self' blob:, so no data: URIs. */
.collaboration-theme #file-list li::before { content: ""; flex: 0 0 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: linear-gradient(#c7d2fe, #c7d2fe) 50% 36% / 14px 2px no-repeat, linear-gradient(#c7d2fe, #c7d2fe) 50% 50% / 14px 2px no-repeat, linear-gradient(#c7d2fe, #c7d2fe) 50% 64% / 9px 2px no-repeat, rgba(99, 102, 241, .16); }
.collaboration-theme #file-list strong { color: #fff; font-weight: 600; }
.collaboration-theme #file-list small { color: #8f95bd; }
.collaboration-theme .panel-footnote { color: #7f86b0; }

/* Meeting ----------------------------------------------------------------- */
.collaboration-theme #meeting-panel { background: transparent; border: 0; padding-top: 18px; }
.collaboration-theme .meeting-heading h2 { font-size: 18px; color: #fff; }
.collaboration-theme #meeting-tracks { gap: 14px; }
/* min-height/min-width 0: the legacy 180px floor plus an aspect ratio forced a
   minimum width wider than the grid track and made tiles overflow. */
.collaboration-theme #meeting-tracks figure { position: relative; width: 100%; min-width: 0; min-height: 0; border-radius: var(--radius-lg); aspect-ratio: 16 / 9; background: #070a1b; box-shadow: var(--shadow-card); }
.collaboration-theme #meeting-tracks figcaption { position: absolute; left: 10px; bottom: 10px; padding: 4px 10px; border-radius: 999px; background: rgba(8, 10, 28, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); font-size: 12px; font-weight: 600; color: #fff; }
.collaboration-theme .tile-avatar { width: clamp(44px, 26%, 76px); aspect-ratio: 1; height: auto; font-size: clamp(16px, 2.2vw, 26px); font-weight: 700; box-shadow: 0 10px 28px -10px rgba(0, 0, 0, .7); }
.collaboration-theme .meeting-actions { justify-content: center; margin-top: 16px; }
.collaboration-theme .meeting-controls { padding: 8px; gap: 8px; border-radius: 999px; background: rgba(20, 24, 52, .92); box-shadow: var(--shadow-card); }
.collaboration-theme .meeting-controls button { min-width: 46px; height: 46px; border-radius: 999px; padding: 0 14px; }
.collaboration-theme .meeting-controls .danger { padding: 0 20px; }
.collaboration-theme .meeting-sidebar { border-radius: var(--radius-lg); background: #1b2044; box-shadow: var(--shadow-card); }
.collaboration-theme .meeting-sidebar h3 { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #8f95bd; }
.collaboration-theme .device-popover { border-radius: var(--radius-lg); box-shadow: 0 20px 50px -16px rgba(0, 0, 0, .85); }
.collaboration-theme #media-preview { border-radius: var(--radius-lg); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .9); }

/* Scrollbars and motion --------------------------------------------------- */
.collaboration-theme * { scrollbar-width: thin; scrollbar-color: rgba(165, 174, 230, .28) transparent; }
@media (prefers-reduced-motion: reduce) {
  .collaboration-theme * { transition: none !important; animation: none !important; }
}

/* Responsive: tablet and phone ------------------------------------------- */
@media (max-width: 900px) {
  .collaboration-theme .app-shell { grid-template-columns: 1fr; grid-template-rows: minmax(0, auto) minmax(0, 1fr); }
  .collaboration-theme .room-sidebar { max-height: 38vh; border-right: 0; border-bottom: 1px solid var(--border); }
  .collaboration-theme .meeting-layout { grid-template-columns: 1fr; }
  .collaboration-theme .message { max-width: 88%; }
}
@media (max-width: 560px) {
  .collaboration-theme .app-header { padding: 0 12px; }
  .collaboration-theme .brand-subtitle,
  .collaboration-theme .app-divider { display: none; }
  .collaboration-theme #meeting-tracks { grid-template-columns: 1fr; }
  .collaboration-theme .scroll-panel,
  .collaboration-theme #messages,
  .collaboration-theme .composer { padding-left: 14px; padding-right: 14px; }
  .collaboration-theme .workspace-tabs { padding: 0 8px; overflow-x: auto; }
}
