:root {
  --bg: #071014;
  --bg-2: #0b171d;
  --panel: rgba(13, 27, 34, 0.86);
  --panel-strong: #10232d;
  --panel-soft: rgba(255, 255, 255, 0.055);
  --text: #eef8f9;
  --text-soft: rgba(238, 248, 249, 0.72);
  --muted: rgba(238, 248, 249, 0.48);
  --line: rgba(151, 232, 232, 0.16);
  --line-strong: rgba(151, 232, 232, 0.28);
  --cyan: #31e7e0;
  --lime: #b6ff5a;
  --coral: #ff6b55;
  --violet: #8f8cff;
  --amber: #ffcf5a;
  --green: #37e58b;
  --red: #ff5964;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  --radius: 8px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f5f7f8;
  --bg-2: #ffffff;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-strong: #ffffff;
  --panel-soft: rgba(6, 16, 20, 0.045);
  --text: #071014;
  --text-soft: rgba(7, 16, 20, 0.72);
  --muted: rgba(7, 16, 20, 0.52);
  --line: rgba(24, 54, 64, 0.14);
  --line-strong: rgba(24, 54, 64, 0.24);
  --shadow: 0 28px 70px rgba(7, 16, 20, 0.14);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(130deg, rgba(49,231,224,0.08), transparent 34%),
    linear-gradient(320deg, rgba(182,255,90,0.07), transparent 30%),
    var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.portal-noise {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.22;
  background-image: linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.portal-app { min-height: 100svh; }
.hovzly-wordmark { width: clamp(142px, 16vw, 190px); height: auto; object-fit: contain; }

.portal-login {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  align-items: center;
  gap: clamp(28px, 6vw, 90px);
  padding: clamp(20px, 5vw, 72px);
  background:
    linear-gradient(120deg, rgba(49,231,224,0.16), transparent 32%),
    linear-gradient(300deg, rgba(143,140,255,0.14), transparent 34%),
    radial-gradient(circle at 52% 78%, rgba(182,255,90,0.12), transparent 32%),
    var(--bg);
}
.login-brand { position: absolute; top: 22px; left: clamp(18px, 5vw, 72px); right: clamp(18px, 5vw, 72px); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.portal-logo { display: inline-flex; align-items: center; min-width: 0; }
.eyebrow, .login-card span, .workspace-head span, .sidebar-title span, .sidebar-footer span, .channel-header span, .panel-card-head span, .thread-head span, .modal-head span, .call-head span, .call-invite span { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; }
.login-copy { max-width: 900px; padding-top: 76px; }
.login-copy h1 { max-width: 980px; margin: 14px 0 0; font-size: clamp(48px, 7vw, 108px); line-height: 0.92; letter-spacing: 0; font-weight: 950; }
.login-copy p:not(.eyebrow) { max-width: 650px; margin: 22px 0 0; color: var(--text-soft); font-size: clamp(16px, 1.5vw, 21px); line-height: 1.55; }
.login-card { position: relative; z-index: 2; display: grid; gap: 16px; padding: 22px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: rgba(8, 18, 23, 0.78); box-shadow: var(--shadow); backdrop-filter: blur(26px) saturate(150%); }
.login-card > div { display: grid; gap: 8px; padding-bottom: 4px; }
.login-card strong { font-size: 28px; line-height: 1; }
.login-card-logo { width: 132px; height: auto; object-fit: contain; }
.login-card label { display: grid; gap: 8px; }
.login-card input, .search-strip input, .composer textarea, .admin-form input, .admin-form select, .ai-form textarea, .profile-form input, .profile-form select, .profile-form textarea, .global-search input, .thread-form textarea, .modal-body input, .modal-body textarea, .modal-body select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255,255,255,0.055);
  color: var(--text);
  outline: none;
}
.login-card input { min-height: 48px; padding: 0 13px; }
.login-card input:focus, .search-strip input:focus, .composer textarea:focus, .admin-form input:focus, .admin-form select:focus, .ai-form textarea:focus, .profile-form input:focus, .profile-form select:focus, .profile-form textarea:focus, .global-search input:focus, .thread-form textarea:focus, .modal-body input:focus, .modal-body textarea:focus, .modal-body select:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(49,231,224,0.13); }
.login-button, .send-button, .channel-actions button, .panel-card button, .thread-form button { min-height: 46px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid rgba(49,231,224,0.46); border-radius: 7px; background: linear-gradient(135deg, var(--cyan), var(--lime)); color: #061014; font-size: 12px; font-weight: 950; text-transform: uppercase; }
.login-link-button { min-height: 38px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,0.045); color: var(--text-soft); font-size: 12px; font-weight: 900; }
.signup-card { align-self: center; }
.login-button span, .send-button span, .panel-card button span, .thread-form button span { color: #061014; }
.login-button svg, .send-button svg, .panel-card button svg, .thread-form button svg { color: #061014; stroke-width: 2.7; }
.login-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.powered-by { display: inline-flex; align-items: center; gap: 8px; width: max-content; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,0.045); padding: 7px 10px; color: var(--muted); font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; }
.portal-login .powered-by { grid-column: 1 / -1; position: relative; z-index: 3; align-self: end; justify-self: start; }
.powered-by img { width: 58px; max-height: 18px; object-fit: contain; filter: brightness(0) invert(1); opacity: 0.86; }

.workspace { min-height: 100svh; display: grid; grid-template-columns: 84px minmax(250px, 300px) minmax(0, 1fr); background: var(--bg); }
.workspace-rail { position: sticky; top: 0; z-index: 70; height: 100svh; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 9px; border-right: 1px solid var(--line); background: #050d11; }
.rail-logo { width: 70px; height: 58px; display: grid; place-items: center; border-radius: 10px; background: rgba(5, 12, 16, 0.86); border: 1px solid rgba(49,231,224,0.32); margin-bottom: 8px; box-shadow: 0 0 34px rgba(49,231,224,0.22); }
.rail-logo img { width: 42px; height: 42px; object-fit: contain; }
.rail-button { position: relative; width: 62px; min-height: 54px; display: grid; place-items: center; gap: 3px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); }
.rail-button span { font-size: 9px; font-weight: 900; line-height: 1; text-transform: uppercase; }
.rail-button::after { content: attr(data-tooltip); position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%); z-index: 120; white-space: nowrap; border: 1px solid var(--line); border-radius: 6px; background: var(--panel-strong); color: var(--text); padding: 7px 9px; box-shadow: var(--shadow); font-size: 11px; font-weight: 900; opacity: 0; pointer-events: none; }
.rail-button:hover::after, .rail-button:focus-visible::after { opacity: 1; }
.rail-button.active, .rail-button:hover { background: rgba(49,231,224,0.12); color: var(--cyan); border-color: rgba(49,231,224,0.22); }
.rail-button.bottom { margin-top: auto; }
.workspace-sidebar { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; gap: 16px; padding: 16px; border-right: 1px solid var(--line); background: rgba(9, 20, 26, 0.82); overflow: auto; }
.workspace-head, .sidebar-title, .panel-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.workspace-head strong { display: block; margin-top: 4px; font-size: 21px; }
.workspace-logo img { width: 118px; height: auto; object-fit: contain; }
.workspace-head button, .sidebar-title button, .composer-tools button, .thread-head button, .mini-button, .panel-drawer-head button, .modal-head button, .call-window-actions button { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,0.05); color: var(--text); }
.quick-switcher { min-height: 42px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,0.045); color: var(--muted); padding: 0 10px; text-align: left; }
.quick-switcher kbd { border: 1px solid var(--line); border-radius: 5px; padding: 2px 5px; background: rgba(255,255,255,0.06); color: var(--muted); font-size: 11px; }
.global-search { padding-right: 8px; }
.global-search input { min-width: 0; min-height: 30px; border: 0; background: transparent; padding: 0; }
.global-search input:focus { box-shadow: none; }
.global-search-results { display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 8px; background: rgba(5,13,17,0.8); padding: 7px; }
.global-search-results button { display: grid; gap: 3px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--text); padding: 8px; text-align: left; }
.global-search-results button:hover, .global-search-results button:focus { border-color: rgba(49,231,224,0.36); background: rgba(49,231,224,0.1); outline: none; }
.global-search-results strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.global-search-results small, .global-search-results p { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }
.sidebar-section { display: grid; gap: 8px; }
.sidebar-link { width: 100%; min-height: 36px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--text-soft); padding: 0 9px; text-align: left; font-size: 14px; }
.sidebar-link div { display: flex; align-items: center; gap: 8px; min-width: 0; }
.sidebar-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-avatar { width: 22px; height: 22px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 50%; background: #061014; color: var(--lime); font-size: 9px; font-weight: 950; }
.mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-link em { min-width: 21px; min-height: 21px; display: grid; place-items: center; border-radius: 99px; background: var(--coral); color: #071014; font-style: normal; font-size: 11px; font-weight: 950; }
.sidebar-link.unread { color: var(--text); font-weight: 850; }
.sidebar-link.active, .sidebar-link:hover { background: rgba(49,231,224,0.11); color: var(--text); border-color: rgba(49,231,224,0.22); }
.presence { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; }
.presence.online { background: var(--green); box-shadow: 0 0 0 3px rgba(55,229,139,0.14); }
.presence.busy { background: var(--amber); box-shadow: 0 0 0 3px rgba(255,207,90,0.16); }
.presence.away { background: var(--violet); box-shadow: 0 0 0 3px rgba(143,140,255,0.16); }
.presence.offline { background: var(--red); box-shadow: 0 0 0 3px rgba(255,89,100,0.15); }
.sidebar-footer { margin-top: auto; border: 1px solid var(--line); border-radius: var(--radius); padding: 13px; background: rgba(255,255,255,0.04); }
.sidebar-footer strong { display: block; margin-top: 7px; }
.sidebar-footer p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.sidebar-profile { width: 100%; display: grid; grid-template-columns: 38px minmax(0, 1fr) 18px; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,0.045); color: var(--text); padding: 9px; text-align: left; }
.sidebar-profile:hover { background: rgba(49,231,224,0.1); border-color: rgba(49,231,224,0.32); }
.sidebar-profile > span:first-child, .sidebar-avatar { width: 38px; height: 38px; display: grid; place-items: center; overflow: hidden; border: 2px solid var(--green); border-radius: 50%; background: #061014; color: var(--lime); font-size: 12px; font-weight: 950; }
.sidebar-avatar.busy { border-color: var(--amber); }
.sidebar-avatar.away { border-color: var(--violet); }
.sidebar-avatar.offline { border-color: var(--red); }
.sidebar-profile img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-profile strong, .sidebar-profile small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-profile strong { font-size: 13px; }
.sidebar-profile small { margin-top: 2px; color: var(--muted); font-size: 11px; }

.workspace-main { min-width: 0; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; height: 100svh; background: linear-gradient(180deg, rgba(255,255,255,0.035), transparent 28%); }
.channel-header { min-height: 94px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 22px; border-bottom: 1px solid var(--line); background: rgba(8,18,23,0.66); backdrop-filter: blur(18px); }
.channel-header h1 { margin: 4px 0 5px; font-size: clamp(26px, 3vw, 38px); line-height: 1; }
.channel-header p { margin: 0; color: var(--muted); font-size: 14px; }
.channel-actions { display: flex; gap: 8px; }
.channel-actions button { min-height: 40px; padding: 0 12px; background: rgba(255,255,255,0.055); color: var(--text); }
.search-strip { position: relative; padding: 12px 22px; border-bottom: 1px solid var(--line); background: rgba(8,18,23,0.38); }
.search-strip svg { position: absolute; left: 36px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search-strip input { min-height: 42px; padding: 0 14px 0 42px; }
.message-feed { min-height: 0; overflow: auto; padding: 10px 0 18px; }
.message { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; padding: 12px 22px; }
.message:hover { background: rgba(255,255,255,0.035); }
.avatar { width: 42px; height: 42px; display: grid; place-items: center; overflow: hidden; border-radius: 8px; background: linear-gradient(135deg, rgba(49,231,224,0.26), rgba(143,140,255,0.18)); color: var(--text); border: 1px solid var(--line); font-size: 13px; font-weight: 950; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.message-body { min-width: 0; }
.message-meta { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.message-meta strong { font-size: 14px; }
.message-meta time { color: var(--muted); font-size: 12px; }
.message-text { margin: 5px 0 0; color: var(--text-soft); line-height: 1.52; }
.message-asset { display: inline-flex; align-items: center; gap: 9px; margin-top: 10px; border: 1px solid rgba(49,231,224,0.22); border-radius: 7px; background: rgba(49,231,224,0.08); color: var(--text); padding: 9px 11px; font-size: 13px; font-weight: 850; }
.message-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.reaction, .thread-link { border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,0.045); padding: 5px 9px; color: var(--text-soft); font-size: 12px; font-weight: 850; }
.thread-link { color: var(--cyan); }
.composer { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: 10px; padding: 14px 22px 18px; border-top: 1px solid var(--line); background: rgba(8,18,23,0.82); }
.composer-tools { display: flex; gap: 6px; padding-bottom: 4px; }
.composer textarea { min-height: 54px; resize: vertical; padding: 13px 14px; line-height: 1.45; }
.send-button { min-height: 54px; padding: 0 15px; }

.workspace-panel { position: fixed; inset: 0 0 0 auto; z-index: 62; width: min(390px, calc(100vw - 84px)); height: 100svh; display: none; flex-direction: column; gap: 12px; padding: 16px; border-left: 1px solid var(--line); background: var(--bg); background: color-mix(in srgb, var(--bg) 92%, transparent); box-shadow: -24px 0 70px rgba(0,0,0,0.35); overflow: auto; overflow-x: hidden; backdrop-filter: blur(22px); }
.workspace-panel.open { display: flex; }
.workspace-panel.settings-mode { left: min(392px, 34vw); width: auto; padding: 22px clamp(18px, 4vw, 46px); }
.workspace-panel.settings-mode .profile-card { max-width: 960px; width: 100%; margin: 0 auto; }
.panel-drawer-head, .panel-card { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,0.055); }
.panel-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; }
.panel-drawer-head strong { font-size: 14px; }
.panel-brand { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.panel-brand img { width: 74px; height: auto; object-fit: contain; opacity: 0.92; }
.modal-logo { width: 76px; height: auto; object-fit: contain; }
.panel-card { display: none; min-width: 0; padding: 14px; box-shadow: 0 12px 34px rgba(0,0,0,0.08); }
.panel-card.active-panel { display: block; }
.panel-card strong { display: block; margin: 12px 0 0; font-size: 18px; line-height: 1.18; }
.panel-card p, .panel-card li { color: var(--muted); font-size: 13px; line-height: 1.48; }
.panel-card ul { margin: 12px 0 0; padding-left: 18px; }
.panel-card button { width: 100%; margin-top: 12px; }
.huddle-card.active { background: linear-gradient(135deg, rgba(49,231,224,0.13), rgba(182,255,90,0.08)); }
.huddle-card.active button { background: var(--coral); color: #071014; border-color: var(--coral); }
.task-list, .file-list, .page-list, .user-list, .meeting-list { display: grid; gap: 9px; margin-top: 12px; }
.task-item, .file-item, .page-item, .user-item, .meeting-item > button { width: 100%; min-width: 0; display: grid; gap: 4px; border: 1px solid var(--line); border-radius: 7px; padding: 9px; background: rgba(255,255,255,0.045); color: var(--text); text-align: left; }
.panel-card .task-item, .panel-card .file-item, .panel-card .page-item, .panel-card .user-item, .panel-card .meeting-item > button { min-height: auto; align-items: start; justify-content: start; border-color: var(--line); background: rgba(255,255,255,0.045); color: var(--text); text-transform: none; }
.panel-card .task-item span, .panel-card .file-item span, .panel-card .page-item span, .panel-card .user-item span, .panel-card .meeting-item span { color: var(--text); }
.panel-card .task-item small, .panel-card .file-item small, .panel-card .page-item small, .panel-card .user-item small, .panel-card .meeting-item small { color: var(--text-soft); }
.panel-card .task-item svg, .panel-card .file-item svg, .panel-card .page-item svg, .panel-card .user-item svg, .panel-card .meeting-item svg { color: var(--cyan); }
.task-item:hover, .file-item:hover, .page-item:hover, .meeting-item > button:hover { border-color: rgba(49,231,224,0.36); background: rgba(49,231,224,0.08); }
.task-item span, .file-item span, .page-item span, .user-item span, .meeting-item span { font-size: 13px; font-weight: 850; }
.task-item span, .file-item span, .page-item span, .user-item span, .meeting-item span, .task-item small, .file-item small, .page-item small, .user-item small, .meeting-item small { min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.user-item span { display: inline-flex; align-items: center; gap: 8px; }
.task-item small, .file-item small, .page-item small, .user-item small, .meeting-item small { color: var(--muted); font-size: 12px; }
.task-item, .file-item, .page-item, .meeting-item > button { margin-top: 0 !important; }
.meeting-item { display: grid; gap: 7px; }
.meeting-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) 34px 34px; gap: 6px; }
.meeting-actions a, .meeting-actions button { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin: 0 !important; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,0.05); color: var(--text); padding: 0 8px; font-size: 11px; font-weight: 900; text-decoration: none; text-transform: uppercase; }
.meeting-actions a:hover, .meeting-actions button:hover { border-color: rgba(49,231,224,0.36); background: rgba(49,231,224,0.10); }
.file-item.stored span::after { content: "Aç"; margin-left: 8px; border-radius: 999px; background: rgba(55,229,139,0.12); color: var(--green); padding: 2px 6px; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.panel-list-item { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.panel-item-actions { display: flex; gap: 6px; align-items: center; }
.panel-card .panel-item-actions button { width: 34px; min-height: 34px; margin: 0; padding: 0; border-radius: 7px; background: rgba(255,255,255,0.045); color: var(--text); }
.panel-card .panel-item-actions button svg { width: 15px; height: 15px; }
.managed-user, .workspace-admin-item { min-width: 0; display: grid; gap: 8px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,0.045); padding: 9px; }
.managed-user { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.managed-user .user-item { border: 0; background: transparent; padding: 0; }
.role-policy { display: grid; gap: 8px; margin-top: 12px; }
.role-policy article, .ticket-item { min-width: 0; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,0.045); padding: 9px; }
.role-policy strong, .ticket-item span, .workspace-admin-item strong, .workspace-admin-users span, .workspace-admin-tickets span { display: block; overflow-wrap: anywhere; word-break: break-word; }
.role-policy p, .ticket-item small, .workspace-admin-item small, .workspace-admin-users small, .workspace-admin-tickets small { color: var(--muted); font-size: 12px; line-height: 1.4; overflow-wrap: anywhere; word-break: break-word; }
.super-admin-list, .ticket-list, .workspace-admin-users, .workspace-admin-tickets { display: grid; gap: 8px; margin-top: 10px; }
.workspace-admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.workspace-admin-actions button, .workspace-admin-users button, .workspace-admin-tickets button { width: 100%; min-width: 0; min-height: 38px; margin: 0; justify-content: flex-start; border: 1px solid var(--line); background: rgba(255,255,255,0.045); color: var(--text); text-align: left; text-transform: none; }
.panel-empty { margin: 12px 0 0; border: 1px dashed var(--line-strong); border-radius: 8px; padding: 12px; color: var(--muted); }
.admin-form, .ai-form, .profile-form { display: grid; gap: 8px; margin-top: 12px; }
.admin-form input, .admin-form select, .profile-form input, .profile-form select { min-height: 40px; padding: 0 10px; }
.ai-form textarea, .profile-form textarea { resize: vertical; padding: 10px; line-height: 1.45; }
.ai-form textarea { min-height: 92px; }
.profile-form textarea { min-height: 82px; }
.profile-preview { --profile-accent: var(--cyan); min-width: 0; display: flex; align-items: center; gap: 12px; margin-top: 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: linear-gradient(135deg, rgba(49,231,224,0.13), rgba(143,140,255,0.1)); padding: 13px; }
.profile-avatar { --profile-accent: var(--cyan); position: relative; width: 64px; height: 64px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; border: 3px solid var(--profile-accent); border-radius: 50%; background: #061014; color: var(--lime); padding: 0; font-size: 16px; font-weight: 950; box-shadow: 0 10px 28px rgba(49,231,224,0.16); cursor: pointer; }
.panel-card .profile-avatar { width: 64px; min-height: 64px; height: 64px; margin: 0; border-radius: 50%; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar .avatar-edit-cue { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(3,8,10,0.58); color: var(--cyan); opacity: 0; transition: opacity 0.16s ease; }
.profile-avatar .avatar-edit-cue svg { width: 20px; height: 20px; filter: drop-shadow(0 0 12px rgba(49,231,224,0.55)); }
.profile-avatar:hover .avatar-edit-cue, .profile-avatar:focus-visible .avatar-edit-cue { opacity: 1; }
.profile-avatar:focus-visible { outline: 3px solid rgba(49,231,224,0.22); outline-offset: 3px; }
.profile-preview > div:last-child { min-width: 0; }
.profile-preview strong { margin: 0; font-size: 17px; overflow-wrap: anywhere; word-break: break-word; }
.profile-preview p { margin: 4px 0 0; }
.profile-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 5px; margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,0.035); padding: 4px; }
.profile-tabs button { width: 100%; min-height: 32px; margin: 0; border: 0; border-radius: 6px; background: transparent; color: var(--muted); padding: 0 8px; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.profile-tabs button.active { background: rgba(49,231,224,0.16); color: var(--cyan); }
.profile-tab-panel { display: none; gap: 8px; }
.profile-tab-panel.active { display: grid; }
.profile-color { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.profile-color input { width: 48px; min-height: 34px; padding: 2px; }
.profile-toggle { min-height: 42px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,0.045); padding: 0 10px; color: var(--text); font-size: 12px; font-weight: 850; }
.profile-toggle input { width: 17px; min-height: 17px; accent-color: var(--cyan); }
.language-setting { display: grid; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.language-setting select { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,0.055); color: var(--text); padding: 0 10px; outline: none; }
.language-setting option { background: var(--panel-strong); color: var(--text); }
.settings-note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.mini-button { width: 34px !important; min-height: 34px !important; margin: 0 !important; padding: 0 !important; background: rgba(255,255,255,0.05) !important; color: var(--text) !important; }

.thread-drawer { position: fixed; top: 0; right: 0; z-index: 50; width: min(420px, 100vw); height: 100svh; display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; border-left: 1px solid var(--line); background: var(--panel-strong); box-shadow: -28px 0 90px rgba(0,0,0,0.34); }
.thread-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px; border-bottom: 1px solid var(--line); }
.thread-head strong { display: block; margin-top: 4px; font-size: 18px; }
.thread-source { padding: 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,0.035); }
.thread-source strong { display: block; font-size: 14px; }
.thread-source p { margin: 8px 0 0; color: var(--text-soft); line-height: 1.48; }
.thread-author { display: flex; align-items: center; gap: 8px; min-width: 0; }
.thread-author strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread-replies { overflow: auto; padding: 10px 16px; display: grid; align-content: start; gap: 10px; }
.thread-reply { border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,0.045); padding: 10px; }
.thread-reply strong { font-size: 13px; }
.thread-reply time { margin-left: 8px; color: var(--muted); font-size: 11px; }
.thread-reply p, .thread-empty { margin: 7px 0 0; color: var(--text-soft); font-size: 13px; line-height: 1.45; }
.thread-form { display: grid; gap: 8px; padding: 14px 16px 18px; border-top: 1px solid var(--line); }

.composer-popover, .hovzly-modal .modal-card, .call-invite { border: 1px solid var(--line-strong); border-radius: 8px; background: var(--panel-strong); color: var(--text); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.composer-popover { position: fixed; z-index: 70; width: min(320px, calc(100vw - 28px)); max-height: 260px; overflow: auto; padding: 8px; }
.composer-popover.emoji-popover { width: min(390px, calc(100vw - 28px)); max-height: min(430px, calc(100svh - 110px)); padding: 9px; }
.popover-title { padding: 7px 8px 9px; color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.popover-option { width: 100%; min-height: 38px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,0.045); color: var(--text); display: flex; align-items: center; gap: 9px; padding: 8px; text-align: left; font-weight: 800; }
.popover-option:hover, .popover-option:focus { border-color: rgba(49,231,224,0.36); background: rgba(49,231,224,0.1); outline: none; }
.popover-option small { display: block; color: var(--muted); font-size: 11px; font-weight: 700; }
.emoji-picker { display: grid; gap: 10px; }
.emoji-section { display: grid; gap: 5px; }
.emoji-section > span { color: var(--muted); font-size: 10px; font-weight: 900; text-transform: uppercase; padding: 0 4px; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, 29px); gap: 3px; justify-content: start; }
.emoji-option { width: 29px; height: 29px; min-width: 29px; min-height: 29px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 7px; background: transparent; font-size: 17px; }
.emoji-option:hover, .emoji-option:focus { border-color: rgba(49,231,224,0.36); background: rgba(49,231,224,0.1); outline: none; }

.hovzly-toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 100; max-width: min(520px, calc(100vw - 32px)); border: 1px solid rgba(49,231,224,0.36); border-radius: 999px; background: rgba(7,16,20,0.94); color: var(--text); box-shadow: var(--shadow); padding: 11px 14px; font-size: 13px; font-weight: 850; }
.hovzly-modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(3,8,10,0.68); padding: 18px; }
.modal-card { width: min(470px, 100%); max-height: calc(100dvh - 36px); display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 14px; overflow: hidden; padding: 16px; }
.modal-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.modal-head strong { display: block; margin-top: 5px; font-size: 22px; }
.modal-body { display: grid; align-content: start; gap: 12px; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding-right: 4px; }
.modal-body > label, .modal-check-list { min-width: 0; }
.modal-body label { display: grid; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.modal-body input, .modal-body select { min-height: 42px; padding: 0 10px; }
.modal-body select[multiple] { min-height: 112px; padding: 8px; }
.modal-body select[multiple] option { padding: 6px 7px; border-radius: 5px; }
.modal-body textarea { min-height: 110px; padding: 10px; resize: vertical; text-transform: none; }
.modal-field-help { color: var(--muted); font-size: 11px; font-weight: 750; line-height: 1.35; text-transform: none; }
.modal-check-list { display: grid; align-content: start; gap: 8px; max-height: 170px; min-height: 76px; overflow-y: auto; overflow-x: hidden; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,0.045); padding: 10px; }
.modal-check-list legend { float: left; width: 100%; margin: 0 0 8px; padding: 0; color: var(--muted); font-size: 11px; font-weight: 900; line-height: 1.25; text-transform: uppercase; }
.modal-check-list label { clear: both; display: flex; grid-template-columns: none; align-items: center; min-height: 22px; gap: 8px; color: var(--text); font-size: 12px; font-weight: 800; line-height: 1.25; text-transform: none; }
.modal-check-list input { width: 16px; min-height: 16px; flex: 0 0 auto; padding: 0; accent-color: var(--cyan); }
.modal-check-list p { margin: 0; color: var(--muted); font-size: 12px; }
.chips-field { display: grid; gap: 8px; min-width: 0; position: relative; }
.chips-field .chips-label { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.04em; }
.chips-field [data-chips-options] { display: none; }
.chips-control { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 48px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,0.05); transition: border-color 0.15s, box-shadow 0.15s; cursor: text; }
.chips-control:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(49,231,224,0.16); }
.chips-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 1 1 auto; min-width: 0; }
.chips-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 999px; background: linear-gradient(135deg, rgba(49,231,224,0.18), rgba(182,255,90,0.18)); border: 1px solid rgba(49,231,224,0.4); color: var(--text); font-size: 12px; font-weight: 700; text-transform: none; letter-spacing: 0; line-height: 1; }
.chips-tag button { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 999px; border: 0; background: rgba(0,0,0,0.18); color: var(--text); font-size: 13px; font-weight: 700; cursor: pointer; padding: 0; line-height: 1; }
.chips-tag button:hover { background: rgba(0,0,0,0.32); }
.chips-empty { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.chips-search { flex: 1 1 140px; min-width: 120px; min-height: 28px !important; padding: 0 4px !important; border: 0 !important; background: transparent !important; box-shadow: none !important; color: var(--text) !important; font-size: 13px !important; font-weight: 600 !important; text-transform: none !important; }
.chips-search:focus { outline: none !important; box-shadow: none !important; }
.chips-toolbar { display: flex; gap: 4px; align-items: center; }
.chips-link { border: 0; background: transparent; color: var(--cyan); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.chips-link:hover { background: rgba(49,231,224,0.12); }
.chips-dropdown { display: grid; gap: 2px; max-height: 220px; overflow-y: auto; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-strong, rgba(15,23,42,0.96)); box-shadow: 0 12px 28px rgba(0,0,0,0.18); }
.chips-option { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 8px; border: 0; background: transparent; color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; text-align: left; text-transform: none; letter-spacing: 0; }
.chips-option:hover { background: rgba(49,231,224,0.1); }
.chips-option.is-selected { background: rgba(49,231,224,0.14); color: var(--text); }
.chips-option i { width: 16px; height: 16px; color: var(--cyan); }
.chips-option span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.modal-actions button { min-height: 40px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,0.05); color: var(--text); padding: 0 12px; font-weight: 900; text-transform: uppercase; }
.modal-actions button[type="submit"] { border-color: rgba(49,231,224,0.46); background: linear-gradient(135deg, var(--cyan), var(--lime)); color: #061014; }

.call-panel { position: fixed; left: 50%; top: 50%; z-index: 80; width: min(880px, calc(100vw - 28px)); height: min(640px, calc(100svh - 28px)); display: grid; grid-template-rows: auto minmax(0,1fr) auto; border: 1px solid rgba(49,231,224,0.28); border-radius: 8px; background: linear-gradient(150deg, rgba(8,18,23,0.98), rgba(5,10,14,0.98) 58%, rgba(13,24,29,0.98)); color: var(--text); box-shadow: 0 28px 90px rgba(0,0,0,0.46), 0 0 0 1px rgba(182,255,90,0.06), 0 0 46px rgba(49,231,224,0.12); transform: translate(-50%, -50%); overflow: hidden; isolation: isolate; }
.call-panel[hidden] { display: none; }
.call-panel::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(circle at 12% 0%, rgba(49,231,224,0.16), transparent 34%), radial-gradient(circle at 88% 20%, rgba(182,255,90,0.10), transparent 30%); }
.call-head { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-bottom: 1px solid rgba(151,232,232,0.14); background: rgba(5,13,17,0.72); backdrop-filter: blur(22px) saturate(150%); cursor: move; }
.call-head-main { min-width: 0; display: flex; align-items: center; gap: 10px; }
.call-brand-mark { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(49,231,224,0.30); border-radius: 8px; background: rgba(255,255,255,0.045); box-shadow: inset 0 0 18px rgba(49,231,224,0.10), 0 0 26px rgba(49,231,224,0.12); }
.call-brand-mark img { width: 25px; height: 25px; object-fit: contain; }
.call-title-block { min-width: 0; }
.call-title-block > span { display: block; color: rgba(238,248,249,0.48); font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: 0.08em; }
.call-head strong { display: block; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; }
.call-meta { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 4px; }
.call-head small { display: inline-flex; align-items: center; color: var(--lime); font-size: 11px; font-weight: 900; }
.call-trust { display: inline-flex; align-items: center; gap: 6px; color: rgba(238,248,249,0.56); font-size: 11px; font-weight: 760; line-height: 1; }
.call-trust::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 14px rgba(55,229,139,0.72); }
.call-window-actions { display: flex; align-items: center; gap: 6px; }
.call-window-actions button { width: 32px; height: 32px; border: 1px solid rgba(151,232,232,0.16); border-radius: 7px; background: rgba(255,255,255,0.045); color: rgba(238,248,249,0.82); box-shadow: none; }
.call-window-actions button:hover, .call-window-actions button:focus-visible { border-color: rgba(49,231,224,0.42); background: rgba(49,231,224,0.12); color: var(--cyan); outline: none; }
.call-window-actions svg { width: 16px; height: 16px; }
.call-stage { position: relative; min-height: 0; background: radial-gradient(circle at 50% 5%, rgba(49,231,224,0.08), transparent 36%), linear-gradient(135deg, #030708, #071116 54%, #04080b); overflow: hidden; }
.call-stage::after { content: ""; position: absolute; right: 16px; bottom: 16px; z-index: 2; width: 54px; height: 54px; pointer-events: none; background: url("assets/hovzly-white-spark.png?v=1") center / contain no-repeat; opacity: 0.12; filter: drop-shadow(0 0 18px rgba(49,231,224,0.30)); }
.call-stage-badge { position: absolute; top: 12px; left: 12px; z-index: 4; display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(151,232,232,0.14); border-radius: 7px; background: rgba(5,13,17,0.66); color: rgba(238,248,249,0.54); padding: 6px 8px; font-size: 10px; font-weight: 850; backdrop-filter: blur(14px); }
.video-grid { height: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 8px; padding: 8px; background: transparent; }
.video-tile { position: relative; min-width: 0; min-height: 0; border: 1px solid rgba(151,232,232,0.14); border-radius: 8px; background: linear-gradient(145deg, rgba(255,255,255,0.045), rgba(255,255,255,0.018)); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.018); }
.video-tile[data-call-tile] { cursor: zoom-in; }
.video-tile:focus-visible { outline: 3px solid rgba(49,231,224,0.22); outline-offset: -4px; }
.video-tile.speaking { border-color: rgba(49,231,224,0.78); box-shadow: inset 0 0 0 1px rgba(49,231,224,0.16), 0 0 28px rgba(49,231,224,0.18); }
.video-tile.video-off video { opacity: 0.18; filter: grayscale(1); }
.video-tile video { width: 100%; height: 100%; min-height: 220px; object-fit: cover; background: #030607; }
.video-tile.local video { transform: scaleX(-1); }
.video-tile > span { position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid rgba(151,232,232,0.12); border-radius: 999px; background: rgba(7,16,20,0.68); color: var(--text-soft); padding: 5px 8px; font-size: 11px; font-weight: 850; backdrop-filter: blur(10px); }
.call-focus-exit { position: absolute; right: 10px; top: 10px; z-index: 5; width: 34px; height: 34px; display: none; place-items: center; border: 1px solid rgba(49,231,224,0.30); border-radius: 7px; background: rgba(5,13,17,0.70); color: var(--cyan); backdrop-filter: blur(12px); }
.call-focus-exit svg { width: 16px; height: 16px; }
.call-panel.focus-layout .call-focus-exit { display: grid; }
.call-panel.focus-layout .video-grid { grid-template-columns: minmax(0, 1fr) minmax(112px, 150px); grid-auto-rows: minmax(86px, 1fr); align-items: stretch; }
.call-panel.focus-layout .video-tile { min-height: 86px; }
.call-panel.focus-layout .video-tile.focused { grid-column: 1; grid-row: 1 / span 8; min-height: 0; cursor: zoom-out; }
.call-panel.focus-layout .video-tile:not(.focused) { grid-column: 2; }
.call-panel.focus-layout .video-tile:not(.focused) video { min-height: 86px; }
.call-panel.focus-layout .video-tile:not(.focused) > span, .call-panel.focus-layout .video-tile:not(.focused) .tile-status { display: none; }
.tile-status { position: absolute; right: 10px; top: 10px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.tile-status em { border-radius: 999px; background: rgba(255,89,100,0.88); color: var(--text); padding: 5px 7px; font-style: normal; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.voice-meter { position: absolute; right: 10px; bottom: 10px; display: flex; align-items: end; gap: 3px; height: 22px; opacity: 0; }
.video-tile.speaking .voice-meter { opacity: 1; }
.voice-meter b { width: 4px; border-radius: 999px; background: var(--cyan); animation: voice 0.8s infinite ease-in-out; }
.voice-meter b:nth-child(1) { height: 10px; }
.voice-meter b:nth-child(2) { height: 18px; animation-delay: 0.1s; }
.voice-meter b:nth-child(3) { height: 14px; animation-delay: 0.2s; }
@keyframes voice { 50% { transform: scaleY(0.45); } }
.call-placeholder { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; align-content: center; gap: 10px; color: rgba(238,248,249,0.52); text-align: center; padding: 22px; pointer-events: none; }
.call-placeholder::before { content: ""; width: 48px; height: 48px; margin-bottom: 2px; background: url("assets/hovzly-white-spark.png?v=1") center / contain no-repeat; opacity: 0.92; filter: drop-shadow(0 0 24px rgba(49,231,224,0.36)); }
.call-placeholder i { display: none; }
.call-placeholder strong { color: var(--text); font-size: 20px; }
.call-placeholder span { max-width: 320px; line-height: 1.45; }
.call-controls { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 7px; padding: 9px 10px; border-top: 1px solid rgba(151,232,232,0.14); background: rgba(5,13,17,0.76); backdrop-filter: blur(22px) saturate(150%); }
.call-controls button { min-width: 42px; width: 42px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid rgba(151,232,232,0.15); border-radius: 7px; background: rgba(255,255,255,0.045); color: rgba(238,248,249,0.84); padding: 0; font-size: 11px; font-weight: 850; text-transform: none; transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, transform 0.16s ease; }
.call-controls button span { display: none; }
.call-controls button:hover, .call-controls button:focus-visible { border-color: rgba(49,231,224,0.42); background: rgba(49,231,224,0.10); color: var(--cyan); outline: none; }
.call-controls button svg { width: 16px; height: 16px; }
.call-controls button.active { background: linear-gradient(135deg, var(--cyan), var(--lime)); border-color: rgba(49,231,224,0.58); color: #061014; }
.call-controls button.off { background: rgba(255,89,100,0.10); border-color: rgba(255,89,100,0.32); color: #ffb8be; }
.call-controls button.off svg { color: #ff5964; filter: drop-shadow(0 0 12px rgba(255,89,100,0.68)); }
.call-controls button.off::after { content: ""; position: absolute; width: 25px; height: 2px; border-radius: 999px; background: #ff5964; transform: rotate(-38deg); box-shadow: 0 0 12px rgba(255,89,100,0.72); }
.call-controls button { position: relative; }
.call-controls button[data-call-end] { min-width: 72px; background: linear-gradient(135deg, var(--coral), var(--red)); border-color: rgba(255,107,85,0.60); color: #fff7f2; }
.call-panel.mini { width: min(360px, calc(100vw - 18px)); height: min(292px, calc(100svh - 18px)); transform: none; }
.call-panel.mini .call-head { min-height: 52px; padding: 8px; }
.call-panel.mini .call-brand-mark { width: 30px; height: 30px; }
.call-panel.mini .call-brand-mark img { width: 20px; height: 20px; }
.call-panel.mini .call-title-block > span, .call-panel.mini .call-trust { display: none; }
.call-panel.mini .call-head strong { max-width: 168px; font-size: 13px; }
.call-panel.mini .call-meta { margin-top: 2px; }
.call-panel.mini .call-stage-badge, .call-panel.mini .call-stage::after { display: none; }
.call-panel.mini .video-grid { gap: 5px; padding: 5px; }
.call-panel.mini .video-tile video { min-height: 130px; }
.call-panel.mini .call-controls { gap: 5px; padding: 7px; }
.call-panel.mini .call-controls button { min-width: 36px; width: 38px; min-height: 34px; padding: 0; }
.call-panel.mini .call-controls button span { display: none; }
.call-panel.fullscreen { inset: 0; width: auto; height: auto; border-radius: 0; transform: none; }
.call-panel.dragging { user-select: none; }
.call-panel.dock-bottom-right { left: auto !important; top: auto !important; right: 14px !important; bottom: 14px !important; transform: none !important; }
.call-panel.dock-bottom-left { left: 14px !important; top: auto !important; right: auto !important; bottom: 14px !important; transform: none !important; }
.call-panel.dock-top-right { left: auto !important; top: 14px !important; right: 14px !important; bottom: auto !important; transform: none !important; }
.call-panel.dock-top-left { left: 14px !important; top: 14px !important; right: auto !important; bottom: auto !important; transform: none !important; }
.call-panel.dock-left { left: 14px !important; top: 50% !important; right: auto !important; bottom: auto !important; transform: translateY(-50%) !important; }
.call-panel.dock-right { left: auto !important; top: 50% !important; right: 14px !important; bottom: auto !important; transform: translateY(-50%) !important; }
.call-panel.dock-top { left: 50% !important; top: 14px !important; right: auto !important; bottom: auto !important; transform: translateX(-50%) !important; }
.call-panel.dock-bottom { left: 50% !important; top: auto !important; right: auto !important; bottom: 14px !important; transform: translateX(-50%) !important; }
.call-invite { position: fixed; right: 18px; top: 18px; z-index: 92; width: min(390px, calc(100vw - 36px)); display: grid; grid-template-columns: 40px minmax(0,1fr); gap: 11px; padding: 13px 13px 13px 32px; border-color: rgba(49,231,224,0.30); background: rgba(5,13,17,0.94); box-shadow: 0 22px 70px rgba(0,0,0,0.38), 0 0 34px rgba(49,231,224,0.10); transform-origin: center; cursor: grab; user-select: none; }
.call-invite.dragging { cursor: grabbing; transition: none; }
.call-invite::before { content: ""; position: absolute; left: 8px; top: 50%; transform: translateY(-50%); width: 4px; height: 32px; border-radius: 4px; background: linear-gradient(180deg, rgba(49,231,224,0.6), rgba(49,231,224,0.15)); }
.call-invite > * { cursor: auto; }
.call-invite-actions button { cursor: pointer; }
.call-invite-icon { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid rgba(49,231,224,0.30); border-radius: 8px; background: rgba(49,231,224,0.12); color: var(--cyan); }
.call-invite strong { display: block; margin-top: 4px; }
.call-invite p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.call-invite-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.call-invite-actions button { flex: 1; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,0.045); color: var(--text); padding: 0 10px; font-size: 12px; font-weight: 850; line-height: 1; text-transform: none; }
.call-invite-actions button svg { width: 15px; height: 15px; flex: 0 0 auto; }
.call-invite-actions button[data-call-accept] { background: linear-gradient(135deg, var(--cyan), var(--lime)); border-color: rgba(49,231,224,0.58); color: #071014; }
.call-invite-actions button[data-call-accept] svg { color: #071014; }
.call-invite-actions button[data-call-decline] { background: rgba(255,107,85,0.12); border-color: rgba(255,107,85,0.38); color: #ffb8ad; }
.call-invite-actions button[data-call-decline] svg { color: #ff9c8d; }
.call-invite.outgoing [data-call-accept], .call-invite.outgoing [data-call-decline], .call-invite.incoming [data-call-cancel] { display: none; }
.call-invite.ringing { animation: hovzly-call-ring 1.1s ease-in-out infinite; }
.call-invite.ringing .call-invite-icon { animation: hovzly-call-icon-pulse 1.1s ease-in-out infinite; }
@keyframes hovzly-call-ring {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  8% { transform: translate3d(-3px, 0, 0) rotate(-0.6deg); }
  16% { transform: translate3d(3px, 0, 0) rotate(0.6deg); }
  24% { transform: translate3d(-2px, 0, 0) rotate(-0.4deg); }
  32% { transform: translate3d(2px, 0, 0) rotate(0.4deg); }
  40% { transform: translate3d(-1px, 0, 0) rotate(-0.2deg); }
  48% { transform: translate3d(1px, 0, 0) rotate(0.2deg); }
  56%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
}
@keyframes hovzly-call-icon-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(49,231,224,0.42); }
  50% { transform: scale(1.08); box-shadow: 0 0 0 9px rgba(49,231,224,0); }
}
@media (prefers-reduced-motion: reduce) {
  .call-invite.ringing, .call-invite.ringing .call-invite-icon { animation: none; }
}

.nudge-shake { animation: nudge 0.7s ease; }
@keyframes nudge { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(2px); } 30%, 50%, 70% { transform: translateX(-4px); } 40%, 60% { transform: translateX(4px); } }

@media (max-width: 980px) {
  .portal-login { grid-template-columns: 1fr; align-content: center; }
  .workspace { grid-template-columns: 72px minmax(0,1fr); }
  .workspace-sidebar { position: fixed; left: 72px; top: 0; z-index: 60; width: min(300px, calc(100vw - 72px)); transform: translateX(calc(-100% - 72px)); transition: transform 0.2s ease; }
  .workspace-sidebar.open { transform: translateX(0); }
  .workspace-panel { width: min(390px, calc(100vw - 72px)); }
  .workspace-panel.settings-mode { left: 72px; width: auto; }
  .composer { grid-template-columns: 1fr; }
  .composer-tools { order: 2; }
  .send-button { order: 3; width: 100%; }
}
@media (max-width: 640px) {
  .login-brand { position: static; align-items: flex-start; margin-bottom: 26px; }
  .portal-login { padding: 18px; }
  .login-copy { padding-top: 0; }
  .login-copy h1 { font-size: 46px; }
  .workspace { grid-template-columns: 62px minmax(0,1fr); }
  .workspace-rail { width: 62px; padding-inline: 6px; }
  .rail-logo { width: 50px; height: 52px; }
  .rail-logo img { width: 44px; }
  .rail-button { width: 50px; }
  .rail-button span { display: none; }
  .workspace-sidebar { left: 62px; width: calc(100vw - 62px); transform: translateX(calc(-100% - 62px)); }
  .channel-header { align-items: flex-start; flex-direction: column; }
  .channel-actions { width: 100%; }
  .channel-actions button { flex: 1; }
  .workspace-panel { width: calc(100vw - 62px); }
  .workspace-panel.settings-mode { left: 62px; width: auto; padding: 14px; }
  .call-panel { width: calc(100vw - 18px); height: min(620px, calc(100svh - 18px)); }
  .call-head { align-items: flex-start; }
  .call-trust { flex-basis: 100%; }
  .call-panel.focus-layout .video-grid { grid-template-columns: 1fr; grid-auto-rows: 86px; }
  .call-panel.focus-layout .video-tile.focused { grid-column: 1; grid-row: 1 / span 4; }
  .call-panel.focus-layout .video-tile:not(.focused) { grid-column: 1; }
  .call-controls button { min-width: 44px; padding: 0 9px; }
  .call-controls button span { display: none; }
}

/* === Light theme — readable, calm palette === */
:root[data-theme="light"] {
  --bg: #f4f6f8;
  --bg-2: #ffffff;
  --panel: #ffffff;
  --panel-strong: #ffffff;
  --panel-soft: rgba(7, 16, 20, 0.04);
  --text: #0b1418;
  --text-soft: rgba(11, 20, 24, 0.74);
  --muted: rgba(11, 20, 24, 0.56);
  --line: rgba(11, 20, 24, 0.10);
  --line-strong: rgba(11, 20, 24, 0.18);
  --cyan: #0c8f97;
  --lime: #4f9b1e;
  --coral: #d8553f;
  --violet: #5b58e0;
  --amber: #c47707;
  --green: #128a55;
  --red: #d63646;
  --shadow: 0 18px 60px rgba(11, 20, 24, 0.10);
  color-scheme: light;
}
[data-theme="light"] body {
  background:
    radial-gradient(circle at 86% 12%, rgba(12,143,151,0.06), transparent 40%),
    radial-gradient(circle at 14% 88%, rgba(79,155,30,0.05), transparent 42%),
    var(--bg);
  color: var(--text);
}
[data-theme="light"] .portal-noise { opacity: 0.08; }
[data-theme="light"] .portal-login {
  background:
    radial-gradient(circle at 80% 18%, rgba(12,143,151,0.10), transparent 36%),
    radial-gradient(circle at 22% 78%, rgba(91,88,224,0.08), transparent 38%),
    var(--bg);
}
[data-theme="light"] .login-card { background: #ffffff; border-color: var(--line-strong); box-shadow: var(--shadow); }
[data-theme="light"] .login-card input,
[data-theme="light"] .search-strip input,
[data-theme="light"] .composer textarea,
[data-theme="light"] .admin-form input, [data-theme="light"] .admin-form select,
[data-theme="light"] .ai-form textarea,
[data-theme="light"] .profile-form input, [data-theme="light"] .profile-form select, [data-theme="light"] .profile-form textarea,
[data-theme="light"] .global-search input,
[data-theme="light"] .thread-form textarea,
[data-theme="light"] .modal-body input, [data-theme="light"] .modal-body textarea, [data-theme="light"] .modal-body select {
  background: #ffffff;
  border-color: var(--line);
  color: var(--text);
}
[data-theme="light"] .login-card input::placeholder,
[data-theme="light"] .composer textarea::placeholder,
[data-theme="light"] .global-search input::placeholder,
[data-theme="light"] .thread-form textarea::placeholder,
[data-theme="light"] .modal-body input::placeholder,
[data-theme="light"] .modal-body textarea::placeholder { color: var(--muted); }
[data-theme="light"] .login-card input:focus,
[data-theme="light"] .search-strip input:focus,
[data-theme="light"] .composer textarea:focus,
[data-theme="light"] .global-search input:focus,
[data-theme="light"] .thread-form textarea:focus,
[data-theme="light"] .modal-body input:focus,
[data-theme="light"] .modal-body textarea:focus,
[data-theme="light"] .modal-body select:focus,
[data-theme="light"] .profile-form input:focus,
[data-theme="light"] .profile-form select:focus,
[data-theme="light"] .profile-form textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(12,143,151,0.14); }
[data-theme="light"] .login-button, [data-theme="light"] .send-button, [data-theme="light"] .channel-actions button, [data-theme="light"] .panel-card button, [data-theme="light"] .thread-form button,
[data-theme="light"] .modal-actions button[type="submit"] { background: linear-gradient(135deg, var(--cyan), var(--lime)); border-color: rgba(12,143,151,0.45); color: #ffffff; }
[data-theme="light"] .login-button span, [data-theme="light"] .send-button span, [data-theme="light"] .panel-card button span, [data-theme="light"] .thread-form button span,
[data-theme="light"] .login-button svg, [data-theme="light"] .send-button svg, [data-theme="light"] .panel-card button svg, [data-theme="light"] .thread-form button svg { color: #ffffff; }
[data-theme="light"] .login-link-button { background: #ffffff; color: var(--text-soft); border-color: var(--line-strong); }
[data-theme="light"] .powered-by { background: #ffffff; color: var(--muted); border-color: var(--line-strong); }
[data-theme="light"] .powered-by img { filter: none; opacity: 0.78; }
[data-theme="light"] .workspace { background: var(--bg); }
[data-theme="light"] .workspace-rail { background: #ffffff; border-right-color: var(--line); }
[data-theme="light"] .rail-logo { background: #ffffff; border-color: rgba(12,143,151,0.32); box-shadow: 0 6px 18px rgba(12,143,151,0.16); }
[data-theme="light"] .rail-button { color: var(--muted); }
[data-theme="light"] .rail-button.active, [data-theme="light"] .rail-button:hover { background: rgba(12,143,151,0.10); color: var(--cyan); border-color: rgba(12,143,151,0.22); }
[data-theme="light"] .rail-button::after { background: #0b1418; color: #ffffff; border-color: rgba(11,20,24,0.6); }
[data-theme="light"] .workspace-sidebar { background: #ffffff; border-right-color: var(--line); }
[data-theme="light"] .workspace-head button, [data-theme="light"] .sidebar-title button, [data-theme="light"] .composer-tools button, [data-theme="light"] .thread-head button, [data-theme="light"] .mini-button, [data-theme="light"] .panel-drawer-head button, [data-theme="light"] .modal-head button, [data-theme="light"] .call-window-actions button { background: #ffffff !important; color: var(--text) !important; border-color: var(--line) !important; }
[data-theme="light"] .quick-switcher, [data-theme="light"] .quick-switcher kbd { background: #ffffff; border-color: var(--line); color: var(--muted); }
[data-theme="light"] .global-search-results { background: #ffffff; border-color: var(--line); box-shadow: var(--shadow); }
[data-theme="light"] .global-search-results button:hover, [data-theme="light"] .global-search-results button:focus { background: rgba(12,143,151,0.08); border-color: rgba(12,143,151,0.32); }
[data-theme="light"] .sidebar-link { color: var(--text-soft); }
[data-theme="light"] .sidebar-link.active, [data-theme="light"] .sidebar-link:hover { background: rgba(12,143,151,0.10); color: var(--text); border-color: rgba(12,143,151,0.24); }
[data-theme="light"] .sidebar-link.unread { color: var(--text); }
[data-theme="light"] .mini-avatar, [data-theme="light"] .sidebar-profile > span:first-child, [data-theme="light"] .sidebar-avatar { background: #0b1418; color: #b6f56a; }
[data-theme="light"] .sidebar-link em { color: #ffffff; }
[data-theme="light"] .sidebar-footer { background: #ffffff; border-color: var(--line); }
[data-theme="light"] .sidebar-profile { background: #ffffff; border-color: var(--line); color: var(--text); }
[data-theme="light"] .sidebar-profile:hover { background: rgba(12,143,151,0.08); border-color: rgba(12,143,151,0.30); }
[data-theme="light"] .workspace-main { background: linear-gradient(180deg, rgba(11,20,24,0.02), transparent 28%); }
[data-theme="light"] .channel-header { background: rgba(255,255,255,0.9); border-bottom-color: var(--line); }
[data-theme="light"] .channel-actions button { background: #ffffff; color: var(--text); border-color: var(--line); }
[data-theme="light"] .channel-actions button:hover { border-color: rgba(12,143,151,0.4); background: rgba(12,143,151,0.06); }
[data-theme="light"] .search-strip { background: rgba(255,255,255,0.78); border-bottom-color: var(--line); }
[data-theme="light"] .message:hover { background: rgba(11,20,24,0.03); }
[data-theme="light"] .avatar { background: linear-gradient(135deg, rgba(12,143,151,0.18), rgba(91,88,224,0.14)); border-color: var(--line); color: var(--text); }
[data-theme="light"] .message-text { color: var(--text); }
[data-theme="light"] .message-asset { background: rgba(12,143,151,0.08); border-color: rgba(12,143,151,0.30); color: var(--text); }
[data-theme="light"] .reaction, [data-theme="light"] .thread-link { background: #ffffff; border-color: var(--line); color: var(--text-soft); }
[data-theme="light"] .thread-link { color: var(--cyan); }
[data-theme="light"] .composer { background: rgba(255,255,255,0.88); border-top-color: var(--line); }
[data-theme="light"] .workspace-panel { background: color-mix(in srgb, #ffffff 96%, transparent); border-left-color: var(--line); box-shadow: -18px 0 50px rgba(11,20,24,0.08); }
[data-theme="light"] .panel-drawer-head, [data-theme="light"] .panel-card { background: #ffffff; border-color: var(--line); }
[data-theme="light"] .panel-card .panel-item-actions button, [data-theme="light"] .task-item, [data-theme="light"] .file-item, [data-theme="light"] .page-item, [data-theme="light"] .user-item, [data-theme="light"] .meeting-item > button, [data-theme="light"] .panel-card .task-item, [data-theme="light"] .panel-card .file-item, [data-theme="light"] .panel-card .page-item, [data-theme="light"] .panel-card .user-item, [data-theme="light"] .panel-card .meeting-item > button { background: #ffffff; color: var(--text); border-color: var(--line); }
[data-theme="light"] .task-item:hover, [data-theme="light"] .file-item:hover, [data-theme="light"] .page-item:hover, [data-theme="light"] .meeting-item > button:hover { background: rgba(12,143,151,0.07); border-color: rgba(12,143,151,0.30); }
[data-theme="light"] .panel-card .task-item svg, [data-theme="light"] .panel-card .file-item svg, [data-theme="light"] .panel-card .page-item svg, [data-theme="light"] .panel-card .user-item svg, [data-theme="light"] .panel-card .meeting-item svg { color: var(--cyan); }
[data-theme="light"] .file-item.stored span::after { background: rgba(18,138,85,0.12); color: var(--green); }
[data-theme="light"] .meeting-actions a, [data-theme="light"] .meeting-actions button { background: #ffffff; border-color: var(--line); color: var(--text); }
[data-theme="light"] .meeting-actions a:hover, [data-theme="light"] .meeting-actions button:hover { background: rgba(12,143,151,0.08); border-color: rgba(12,143,151,0.30); }
[data-theme="light"] .managed-user, [data-theme="light"] .workspace-admin-item, [data-theme="light"] .role-policy article, [data-theme="light"] .ticket-item, [data-theme="light"] .workspace-admin-actions button, [data-theme="light"] .workspace-admin-users button, [data-theme="light"] .workspace-admin-tickets button { background: #ffffff; border-color: var(--line); color: var(--text); }
[data-theme="light"] .panel-empty { border-color: var(--line-strong); color: var(--muted); }
[data-theme="light"] .profile-preview { background: linear-gradient(135deg, rgba(12,143,151,0.10), rgba(91,88,224,0.08)); border-color: var(--line-strong); }
[data-theme="light"] .profile-avatar { background: #0b1418; color: #b6f56a; box-shadow: 0 6px 18px rgba(12,143,151,0.16); }
[data-theme="light"] .profile-tabs { background: rgba(11,20,24,0.04); border-color: var(--line); }
[data-theme="light"] .profile-tabs button { color: var(--muted); }
[data-theme="light"] .profile-tabs button.active { background: rgba(12,143,151,0.14); color: var(--cyan); }
[data-theme="light"] .profile-toggle, [data-theme="light"] .language-setting select { background: #ffffff; border-color: var(--line); color: var(--text); }
[data-theme="light"] .modal-check-list { background: #ffffff; border-color: var(--line); }
[data-theme="light"] .modal-check-list label { color: var(--text); }
[data-theme="light"] .chips-control { background: #ffffff; border-color: var(--line); }
[data-theme="light"] .chips-control:focus-within { box-shadow: 0 0 0 3px rgba(12,143,151,0.14); }
[data-theme="light"] .chips-tag { background: linear-gradient(135deg, rgba(12,143,151,0.14), rgba(79,155,30,0.12)); border-color: rgba(12,143,151,0.38); color: var(--text); }
[data-theme="light"] .chips-tag button { background: rgba(11,20,24,0.08); color: var(--text); }
[data-theme="light"] .chips-tag button:hover { background: rgba(11,20,24,0.16); }
[data-theme="light"] .chips-dropdown { background: #ffffff; border-color: var(--line); box-shadow: var(--shadow); }
[data-theme="light"] .chips-option:hover { background: rgba(12,143,151,0.08); }
[data-theme="light"] .chips-option.is-selected { background: rgba(12,143,151,0.14); }
[data-theme="light"] .modal-actions button { background: #ffffff; color: var(--text); border-color: var(--line); }
[data-theme="light"] .modal-actions button[type="submit"] { color: #ffffff; }
[data-theme="light"] .hovzly-modal { background: rgba(11,20,24,0.40); }
[data-theme="light"] .composer-popover, [data-theme="light"] .hovzly-modal .modal-card { background: #ffffff; border-color: var(--line-strong); box-shadow: var(--shadow); }
[data-theme="light"] .popover-option { background: #ffffff; border-color: var(--line); color: var(--text); }
[data-theme="light"] .popover-option:hover, [data-theme="light"] .popover-option:focus { background: rgba(12,143,151,0.08); border-color: rgba(12,143,151,0.32); }
[data-theme="light"] .hovzly-toast { background: #0b1418; color: #ffffff; border-color: rgba(12,143,151,0.38); }
[data-theme="light"] .thread-drawer { background: #ffffff; border-left-color: var(--line); box-shadow: -18px 0 50px rgba(11,20,24,0.10); }
[data-theme="light"] .thread-source { background: rgba(11,20,24,0.03); border-bottom-color: var(--line); }
[data-theme="light"] .thread-reply { background: #ffffff; border-color: var(--line); }
[data-theme="light"] .huddle-card.active { background: linear-gradient(135deg, rgba(12,143,151,0.10), rgba(79,155,30,0.08)); }
[data-theme="light"] .huddle-card.active button { background: var(--coral); color: #ffffff; border-color: var(--coral); }
[data-theme="light"] .call-panel { background: #ffffff; border-color: var(--line-strong); color: var(--text); box-shadow: 0 22px 70px rgba(11,20,24,0.18); }
[data-theme="light"] .call-head { background: rgba(255,255,255,0.94); border-bottom-color: var(--line); }
[data-theme="light"] .call-trust { color: var(--muted); }
[data-theme="light"] .call-stage { background: #f1f4f6; }
[data-theme="light"] .video-tile { background: #e8eef0; border-color: var(--line); }
[data-theme="light"] .video-tile video { background: #0b1418; }
[data-theme="light"] .video-tile > span { background: rgba(11,20,24,0.78); color: #ffffff; border-color: rgba(255,255,255,0.10); }
[data-theme="light"] .call-controls { background: rgba(255,255,255,0.94); border-top-color: var(--line); }
[data-theme="light"] .call-controls button { background: #ffffff; color: var(--text); border-color: var(--line); }
[data-theme="light"] .call-controls button:hover { background: rgba(12,143,151,0.08); border-color: rgba(12,143,151,0.32); color: var(--cyan); }
[data-theme="light"] .call-controls button.active { background: linear-gradient(135deg, var(--cyan), var(--lime)); color: #ffffff; border-color: rgba(12,143,151,0.45); }
[data-theme="light"] .call-invite { background: #ffffff; color: var(--text); border-color: rgba(12,143,151,0.30); box-shadow: 0 18px 50px rgba(11,20,24,0.18), 0 0 0 1px rgba(12,143,151,0.06); }
[data-theme="light"] .call-invite-icon { background: rgba(12,143,151,0.12); border-color: rgba(12,143,151,0.30); color: var(--cyan); }
[data-theme="light"] .call-invite p { color: var(--muted); }
[data-theme="light"] .call-invite-actions button { background: #ffffff; color: var(--text); border-color: var(--line); }
[data-theme="light"] .call-invite-actions button[data-call-accept] { background: linear-gradient(135deg, var(--cyan), var(--lime)); border-color: rgba(12,143,151,0.45); color: #ffffff; }
[data-theme="light"] .call-invite-actions button[data-call-accept] svg { color: #ffffff; }
[data-theme="light"] .call-invite-actions button[data-call-decline] { background: rgba(214,54,70,0.12); border-color: rgba(214,54,70,0.38); color: var(--red); }
[data-theme="light"] .call-invite-actions button[data-call-decline] svg { color: var(--red); }
[data-theme="light"] .presence.online { box-shadow: 0 0 0 3px rgba(18,138,85,0.14); }
[data-theme="light"] .presence.busy { box-shadow: 0 0 0 3px rgba(196,119,7,0.14); }
[data-theme="light"] .presence.away { box-shadow: 0 0 0 3px rgba(91,88,224,0.14); }
[data-theme="light"] .presence.offline { box-shadow: 0 0 0 3px rgba(214,54,70,0.14); }

/* === File preview modal === */
.file-preview { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 220px; max-height: 64vh; background: rgba(8, 18, 23, 0.55); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.file-preview img, .file-preview video { max-width: 100%; max-height: 64vh; width: auto; height: auto; display: block; border-radius: 10px; background: #050d11; }
.file-preview-audio { padding: 28px 18px; }
.file-preview-audio audio { width: 100%; }
.file-preview-frame { padding: 0; min-height: 60vh; }
.file-preview-frame iframe { width: 100%; height: 60vh; border: 0; background: #ffffff; border-radius: 10px; }
.file-preview-empty { flex-direction: column; gap: 10px; color: var(--muted); padding: 36px 18px; min-height: 180px; }
.file-preview-empty svg { width: 32px; height: 32px; color: var(--cyan); }
.file-preview-meta { margin: 10px 0 0; color: var(--muted); font-size: 12px; }
[data-theme="light"] .file-preview { background: rgba(11, 20, 24, 0.04); }
[data-theme="light"] .file-preview img, [data-theme="light"] .file-preview video { background: #e8eef0; }
[data-theme="light"] .file-preview-frame iframe { background: #ffffff; }

/* Typing indicator */
.typing-indicator { display: flex; align-items: center; gap: 8px; padding: 6px 18px 0; color: var(--portal-muted, #94a3b8); font-size: 12px; min-height: 18px; }
.typing-indicator[hidden] { display: none; }
.typing-indicator .typing-dots { display: inline-flex; gap: 3px; }
.typing-indicator .typing-dots span { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: 0.4; animation: typingDot 1.2s infinite ease-in-out; }
.typing-indicator .typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator .typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* Modal notice (used by destructive confirm) */
.modal-notice { margin: 0 0 4px; padding: 10px 12px; border-radius: 8px; background: rgba(255,255,255,0.04); border: 1px solid var(--line); color: var(--text); font-size: 13px; line-height: 1.45; }
.modal-notice strong { color: var(--cyan); word-break: break-word; }
[data-theme="light"] .modal-notice { background: rgba(11,20,24,0.04); }
