:root {
  --outer-gap: clamp(8px, 1.1vw, 12px);
  --app-bg-top: #dfe7ef;
  --app-bg-bottom: #cbd8e3;
  --shell-bg: #eef3f6;
  --sidebar-bg: #f9fbfd;
  --chat-topbar: rgba(251, 252, 253, 0.95);
  --chat-canvas: #d7e5ea;
  --chat-canvas-dark: #cfdee5;
  --rail-bg: #18242f;
  --rail-fg: rgba(226, 236, 244, 0.84);
  --rail-fg-muted: rgba(177, 196, 209, 0.7);
  --rail-active: linear-gradient(180deg, #45a8b5, #2f8b96);
  --line: rgba(96, 119, 136, 0.15);
  --line-strong: rgba(96, 119, 136, 0.24);
  --text: #23313d;
  --muted: #738492;
  --muted-strong: #5a6d7c;
  --accent: #3f9fa8;
  --accent-strong: #2f808a;
  --accent-soft: rgba(63, 159, 168, 0.12);
  --success: #4f9c65;
  --warning: #c6902c;
  --danger: #cb6464;
  --incoming: #ffffff;
  --outgoing: #def7ea;
  --pending: #edf4f7;
  --failed: #fde8e7;
  --system: #fff3d7;
  --sidebar-width: clamp(290px, 27vw, 336px);
  --shadow: 0 28px 60px rgba(35, 49, 61, 0.16);
  --shadow-soft: 0 8px 18px rgba(58, 82, 106, 0.05);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  min-height: 100%;
}

body {
  display: flex;
  min-height: 100dvh;
  padding: var(--outer-gap);
  overflow: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.45), transparent 24%),
    linear-gradient(180deg, var(--app-bg-top), var(--app-bg-bottom));
  font-family: "SF Pro Text", "Helvetica Neue", "Segoe UI", sans-serif;
}

body.auth-mode {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
}

body.app-mode {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
}

code {
  font-family: "SFMono-Regular", "Cascadia Mono", "Fira Code", monospace;
}

input,
textarea,
button {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.telegram-shell {
  display: grid;
  grid-template-columns: 76px var(--sidebar-width) 8px minmax(0, 1fr);
  width: 100%;
  height: 100dvh;
  min-height: 0;
  max-height: 100dvh;
  background: var(--shell-bg);
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}

.telegram-shell.dashboard-mode,
.telegram-shell.camera-mode,
.telegram-shell.home-mode,
.telegram-shell.organizer-mode,
.telegram-shell.settings-mode {
  grid-template-columns: 76px minmax(0, 1fr);
}

.telegram-shell.tool-mode .sidebar {
  display: none;
}

.telegram-shell.tool-mode .sidebar-resize-handle {
  display: none;
}

.auth-shell {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at top right, rgba(87, 161, 242, 0.12), transparent 32%),
    radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.36), transparent 28%),
    linear-gradient(180deg, #d7e2ec, #c7d3df);
}

.auth-card {
  width: min(100%, 440px);
  display: grid;
  gap: 22px;
  align-items: stretch;
}

.auth-brand,
.auth-panel {
  border-radius: 24px;
}

.auth-brand {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 8px 18px 0;
  color: #1f2d3a;
  text-align: center;
}

.auth-mark {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 24px;
  color: #ffffff;
  font-size: 1.85rem;
  font-weight: 800;
  background: linear-gradient(160deg, #56aaf7, #2c7fd2);
  box-shadow: 0 20px 36px rgba(44, 127, 210, 0.22);
}

.auth-brand .eyebrow,
.auth-brand .card-label {
  color: rgba(85, 104, 123, 0.78);
}

.auth-brand h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.65rem);
  line-height: 1.05;
}

.auth-copy {
  max-width: 33ch;
  margin: 0;
  color: rgba(85, 104, 123, 0.92);
  font-size: 0.98rem;
  line-height: 1.5;
}

.auth-panel {
  display: grid;
  gap: 18px;
  align-content: center;
  padding: 28px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(99, 120, 141, 0.12);
  box-shadow: 0 28px 64px rgba(38, 57, 77, 0.14);
}

.auth-panel-head,
.session-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-panel-head strong,
.session-card-head strong {
  display: block;
  margin-top: 4px;
  font-size: 1rem;
}

.sidebar,
.dashboard-shell,
.chat-shell,
.camera-shell,
.home-shell,
.organizer-shell,
.settings-shell {
  min-height: 0;
  min-width: 0;
}

.dashboard-shell,
.camera-shell,
.home-shell,
.organizer-shell,
.settings-shell {
  overflow: hidden;
}

.nav-rail {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 14px 10px 12px;
  background: var(--rail-bg);
  color: var(--rail-fg);
}

.rail-top,
.rail-bottom {
  display: grid;
  gap: 8px;
  align-content: start;
}

.rail-bottom {
  align-content: end;
}

.rail-brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 8px;
  border-radius: 16px;
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 800;
  background: linear-gradient(160deg, #4db6c1, #307c87);
  box-shadow: 0 14px 28px rgba(12, 22, 28, 0.28);
}

.rail-button {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 100%;
  padding: 10px 6px;
  color: var(--rail-fg-muted);
  background: transparent;
  border: 0;
  border-radius: 18px;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.rail-button:hover {
  color: var(--rail-fg);
  background: rgba(255, 255, 255, 0.06);
}

.rail-button.active {
  color: #ffffff;
  background: var(--rail-active);
  box-shadow: 0 14px 22px rgba(24, 36, 47, 0.26);
}

.rail-button.rail-button-muted {
  color: var(--rail-fg);
}

.rail-label {
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.15;
}

.rail-icon {
  position: relative;
  display: block;
  width: 22px;
  height: 22px;
}

.rail-icon::before,
.rail-icon::after {
  content: "";
  position: absolute;
}

.rail-icon-all::before,
.rail-icon-dashboard::before {
  inset: 2px;
  border: 2px solid currentColor;
  border-radius: 7px;
}

.rail-icon-all::after,
.rail-icon-dashboard::after {
  left: 6px;
  top: 10px;
  width: 10px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 -5px 0 currentColor, 0 5px 0 currentColor;
}

.rail-icon-direct::before,
.rail-icon-chat::before {
  left: 3px;
  top: 4px;
  width: 16px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 10px;
}

.rail-icon-direct::after,
.rail-icon-chat::after {
  right: 2px;
  bottom: 1px;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: skew(-14deg);
}

.rail-icon-group::before,
.rail-icon-group::after {
  border-radius: 50%;
  background: currentColor;
}

.rail-icon-group::before {
  left: 3px;
  top: 5px;
  width: 7px;
  height: 7px;
  box-shadow: 9px 0 0 currentColor;
}

.rail-icon-group::after {
  left: 1px;
  bottom: 3px;
  width: 18px;
  height: 8px;
  border-radius: 8px 8px 6px 6px;
}

.rail-icon-camera::before {
  left: 2px;
  top: 5px;
  width: 14px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.rail-icon-camera::after {
  right: 1px;
  top: 8px;
  width: 7px;
  height: 8px;
  border-radius: 2px;
  background: currentColor;
  clip-path: polygon(0 18%, 100% 0, 100% 100%, 0 82%);
}

.rail-icon-home::before {
  left: 3px;
  top: 8px;
  width: 16px;
  height: 11px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 5px 5px;
}

.rail-icon-home::after {
  left: 4px;
  top: 3px;
  width: 14px;
  height: 14px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  border-radius: 3px 0 0;
  transform: rotate(45deg);
}

.rail-icon-organizer::before {
  left: 4px;
  top: 3px;
  width: 15px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.rail-icon-organizer::after {
  left: 8px;
  top: 8px;
  width: 10px;
  height: 7px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.rail-icon-exit::before {
  left: 2px;
  top: 4px;
  width: 10px;
  height: 14px;
  border: 2px solid currentColor;
  border-right: 0;
  border-radius: 6px 0 0 6px;
}

.rail-icon-exit::after {
  right: 1px;
  top: 9px;
  width: 11px;
  height: 2px;
  background: currentColor;
  border-radius: 999px;
  box-shadow: 4px -4px 0 -1px currentColor, 4px 4px 0 -1px currentColor;
}

.rail-icon-settings::before {
  inset: 5px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow:
    0 -7px 0 -4px currentColor,
    0 7px 0 -4px currentColor,
    7px 0 0 -4px currentColor,
    -7px 0 0 -4px currentColor;
}

.rail-icon-settings::after {
  left: 9px;
  top: 9px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.sidebar {
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 12px 0 10px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--line);
}

.sidebar-resize-handle {
  position: relative;
  min-width: 8px;
  height: 100%;
  cursor: col-resize;
  touch-action: none;
  background: linear-gradient(90deg, rgba(96, 119, 136, 0), rgba(96, 119, 136, 0.08), rgba(96, 119, 136, 0));
  z-index: 4;
}

.sidebar-resize-handle::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 3px;
  width: 2px;
  border-radius: 999px;
  background: rgba(63, 159, 168, 0.22);
  opacity: 0;
  transition: opacity 140ms ease, background 140ms ease;
}

.sidebar-resize-handle:hover::before,
.sidebar-resize-handle:focus-visible::before,
.telegram-shell.resizing-sidebar .sidebar-resize-handle::before {
  opacity: 1;
}

.sidebar-resize-handle:focus-visible {
  outline: none;
}

.telegram-shell.resizing-sidebar {
  cursor: col-resize;
  user-select: none;
}

.folder-tabs {
  display: flex;
  gap: 6px;
  padding: 0 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.folder-tabs::-webkit-scrollbar {
  display: none;
}

.folder-tab {
  min-height: 30px;
  padding: 0 12px;
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  background: rgba(235, 241, 245, 0.86);
  border-radius: 999px;
}

.folder-tab.active {
  color: #ffffff;
  background: linear-gradient(180deg, #4db6c1, #327f89);
  box-shadow: 0 8px 18px rgba(47, 128, 138, 0.16);
}

.sidebar-toolbar,
.chat-toolbar,
.composer,
.status-strip,
.session-card {
  border: 1px solid rgba(99, 120, 141, 0.1);
  box-shadow: none;
}

.sidebar-toolbar,
.session-card {
  background: transparent;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}

.sidebar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px 12px;
  border-top: 0;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sidebar-brand {
  min-width: 0;
}

.eyebrow,
.card-label,
.section-caption,
.session-meta dt {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--muted);
}

.sidebar-brand h1,
.chat-peer-copy h2,
.empty-card h3 {
  margin: 0;
}

.sidebar-brand h1 {
  font-size: 1.08rem;
  font-weight: 700;
}

.toolbar-button,
.folder-tab,
.primary-button,
.ghost-button,
.toolbar-chip,
.composer-circle,
.send-button {
  border: 0;
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.toolbar-button {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #edf2f5;
  border: 1px solid rgba(103, 122, 141, 0.1);
}

.toolbar-button span,
.attach-button::before,
.send-button::before,
.menu-button span::before,
.menu-button span::after,
.edit-button span::before,
.edit-button span::after,
.search-button span::before,
.search-button span::after,
.search-icon::before,
.search-icon::after {
  content: "";
  display: block;
}

.menu-button span,
.menu-button span::before,
.menu-button span::after {
  position: absolute;
  left: 11px;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: var(--muted-strong);
}

.menu-button span {
  top: 14px;
}

.menu-button span::before {
  top: 6px;
  left: 0;
}

.menu-button span::after {
  top: 12px;
  left: 0;
}

.edit-button span,
.search-button span,
.more-button span {
  position: absolute;
  inset: 0;
}

.edit-button span::before,
.edit-button span::after {
  position: absolute;
  background: var(--muted-strong);
}

.edit-button span::before {
  width: 16px;
  height: 3px;
  left: 12px;
  top: 19px;
  transform: rotate(-35deg);
  border-radius: 999px;
}

.edit-button span::after {
  width: 6px;
  height: 6px;
  left: 22px;
  top: 12px;
  transform: rotate(-35deg);
  border-radius: 2px;
}

.search-button span::before,
.search-button span::after,
.search-icon::before,
.search-icon::after {
  position: absolute;
}

.search-button span::before,
.search-icon::before {
  width: 12px;
  height: 12px;
  border: 2px solid var(--muted-strong);
  border-radius: 50%;
}

.search-button span::after,
.search-icon::after {
  width: 7px;
  height: 2px;
  background: var(--muted-strong);
  border-radius: 999px;
  transform: rotate(45deg);
}

.search-button span::before {
  top: 10px;
  left: 10px;
}

.search-button span::after {
  top: 23px;
  left: 22px;
}

.more-button span {
  top: 18px;
  left: 10px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--muted-strong);
  box-shadow: 7px 0 0 var(--muted-strong), 14px 0 0 var(--muted-strong);
}

.toolbar-button:hover,
.rail-button:hover,
.folder-tab:hover,
.primary-button:hover,
.ghost-button:hover,
.toolbar-chip:hover,
.composer-circle:hover,
.send-button:hover {
  transform: translateY(-1px);
}

.toolbar-button:focus-visible,
.rail-button:focus-visible,
.folder-tab:focus-visible,
.primary-button:focus-visible,
.ghost-button:focus-visible,
.toolbar-chip:focus-visible,
.composer-circle:focus-visible,
.send-button:focus-visible,
.chat-list-item:focus-visible,
.search-shell input:focus-visible,
.composer-field textarea:focus-visible,
.token-field input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(51, 144, 236, 0.16);
}

.toolbar-button:disabled,
.rail-button:disabled,
.folder-tab:disabled,
.primary-button:disabled,
.ghost-button:disabled,
.toolbar-chip:disabled,
.composer-circle:disabled,
.send-button:disabled {
  opacity: 0.58;
  cursor: not-allowed;
  transform: none;
}

.search-shell {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 13px 0 42px;
  margin: 0 16px;
  background: #f0f3f6;
  border: 1px solid rgba(103, 122, 141, 0.12);
  border-radius: 22px;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.search-shell:focus-within {
  background: #f8fbfe;
  border-color: rgba(51, 144, 236, 0.28);
  box-shadow: 0 0 0 3px rgba(51, 144, 236, 0.1);
}

.search-shell input {
  width: 100%;
  padding: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
}

.search-icon::before {
  top: 0;
  left: 0;
}

.search-icon::after {
  top: 12px;
  left: 11px;
}

.chat-list-panel {
  min-height: 0;
  padding: 0 6px 0 10px;
  overflow: auto;
  overflow-x: hidden;
}

.chat-list-body {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.chat-list-empty {
  margin: 0 10px 0 6px;
  padding: 14px 12px;
  border-radius: 16px;
  background: #f7f8fa;
  border: 1px solid rgba(103, 122, 141, 0.1);
  color: var(--muted);
  font-size: 0.85rem;
}

.chat-list-section {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.chat-list-section-body {
  display: grid;
  gap: 0;
  min-width: 0;
}

.chat-list-panel::-webkit-scrollbar {
  width: 6px;
}

.chat-list-panel::-webkit-scrollbar-thumb {
  background: rgba(103, 122, 141, 0.18);
  border-radius: 999px;
}

.chat-list-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  width: 100%;
  padding: 11px 12px;
  overflow: hidden;
  text-align: left;
  border-radius: 0;
  background: transparent;
  border: 0;
  transition: background 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.chat-list-item:hover {
  background: rgba(63, 159, 168, 0.06);
  transform: none;
}

.chat-list-item.active {
  background: linear-gradient(180deg, #4aadb6, #378f99);
  box-shadow: inset 4px 0 0 rgba(255, 255, 255, 0.34);
}

.chat-list-item.active:hover {
  background: linear-gradient(180deg, #4baeb7, #38919b);
}

.chat-list-item.active .chat-avatar {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.22);
}

.chat-list-item.has-unread:not(.active) .chat-list-row strong {
  color: #203548;
}

.chat-list-item.has-unread:not(.active) .preview-row p,
.chat-list-item.has-unread:not(.active) .chat-list-row time {
  color: #51687f;
}

.chat-list-item.has-unread:not(.active) .preview-row p {
  font-weight: 500;
}

.chat-list-item.has-mention:not(.active) .preview-row p {
  color: #496fcf;
}

.chat-list-item.has-mention:not(.active) .chat-avatar {
  box-shadow: 0 0 0 2px rgba(123, 97, 255, 0.12);
}

.chat-list-item.has-draft:not(.active) .chat-list-row strong {
  color: #6b4a1f;
}

.section-caption {
  margin: 6px 0 8px;
  padding-left: 14px;
  color: rgba(113, 133, 154, 0.82);
}

.chat-avatar,
.empty-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #ffffff;
  font-weight: 700;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(160deg, #54a6f5, #2e7bc5);
  box-shadow: 0 8px 16px rgba(46, 123, 197, 0.15);
}

.chat-avatar.large {
  width: 40px;
  height: 40px;
}

.chat-avatar.muted {
  background: linear-gradient(160deg, #9fb2c6, #7d91a5);
  box-shadow: none;
}

.chat-list-content {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.chat-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.chat-list-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
  min-width: 0;
}

.chat-list-row strong,
.chat-list-row time,
.chat-list-row p,
.soon-badge {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-list-row strong {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0;
}

.chat-list-item.active .chat-list-row strong,
.chat-list-item.active .chat-list-row time,
.chat-list-item.active .preview-row p {
  color: rgba(255, 255, 255, 0.96);
}

.chat-list-row time,
.preview-row p,
.token-hint,
.chat-subtitle,
.status-strip p,
.message-meta {
  color: var(--muted);
}

.chat-list-row time,
.preview-row p {
  font-size: 0.77rem;
}

.chat-list-row time {
  flex: 0 0 auto;
  max-width: 72px;
}

.preview-row p {
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
  line-height: 1.28;
}

.chat-list-draft {
  color: #b5682f;
}

.soon-badge,
.chat-list-badge,
.chat-kind-chip,
.status-pill,
.realtime-pill,
.date-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.soon-badge {
  background: #eef2f5;
  color: var(--muted);
}

.chat-list-badge {
  flex: 0 0 auto;
  min-width: 22px;
  min-height: 22px;
  padding: 0 8px;
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 6px 14px rgba(51, 144, 236, 0.18);
}

.chat-list-badge.mention {
  min-width: 20px;
  background: #7b61ff;
  box-shadow: 0 6px 14px rgba(123, 97, 255, 0.18);
}

.chat-list-item.active .chat-list-badge {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.chat-list-item.active .chat-list-badge.mention {
  background: rgba(255, 255, 255, 0.26);
}

.chat-kind-chip {
  flex: 0 0 auto;
  min-height: 20px;
  padding: 0 7px;
  max-width: 58px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  background: #eef2f5;
  font-size: 0.66rem;
}

.toolbar-button:not(:disabled):hover,
.composer-circle:not(:disabled):hover {
  background: #edf3f9;
}

.toolbar-chip:not(:disabled):hover,
.ghost-button:not(:disabled):hover {
  background: #eef4fa;
}

.chat-list-item.active .chat-kind-chip {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.16);
}

.session-card {
  display: grid;
  gap: 10px;
  padding: 14px 16px 0;
  margin-top: auto;
  border-bottom: 0;
  border-top: 1px solid rgba(103, 122, 141, 0.1);
}

.session-card-head strong {
  font-size: 0.92rem;
}

.session-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.session-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 700;
  background: linear-gradient(160deg, #4db6c1, #2f7f8b);
}

.session-copy {
  min-width: 0;
}

.session-subtitle {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.session-chat-line {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted-strong);
  font-size: 0.78rem;
  line-height: 1.35;
}

.session-chat-line span {
  min-width: 0;
}

.token-field {
  display: grid;
  gap: 8px;
}

.token-field span,
.session-meta dd {
  font-weight: 600;
}

.token-field input,
.composer-field textarea {
  width: 100%;
  outline: none;
  color: var(--text);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.token-field input {
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid rgba(103, 122, 141, 0.16);
  border-radius: 14px;
}

.token-field input:focus,
.composer-field textarea:focus {
  border-color: rgba(51, 144, 236, 0.42);
  box-shadow: 0 0 0 4px rgba(51, 144, 236, 0.12);
}

.token-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.primary-button,
.ghost-button,
.toolbar-chip {
  padding: 10px 16px;
  border-radius: 999px;
}

.primary-button {
  color: #ffffff;
  background: linear-gradient(180deg, #47a0f3, #2d84d7);
  box-shadow: 0 10px 22px rgba(45, 132, 215, 0.2);
}

.ghost-button {
  color: var(--text);
  background: #f3f6f9;
  border: 1px solid rgba(103, 122, 141, 0.16);
}

.ghost-button.compact {
  padding: 7px 12px;
  font-size: 0.8rem;
}

.token-hint {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
}

.auth-status-line {
  margin: 0;
  min-height: 1.4em;
  color: var(--muted-strong);
  font-size: 0.9rem;
}

.chat-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  min-width: 0;
  background: #e3edf1;
}

.dashboard-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  background:
    radial-gradient(circle at 16% 10%, rgba(76, 192, 170, 0.18), transparent 27%),
    radial-gradient(circle at 84% 16%, rgba(73, 151, 226, 0.13), transparent 25%),
    linear-gradient(180deg, #edf6f2, #dae8e3);
}

.camera-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  background:
    radial-gradient(circle at 18% 16%, rgba(79, 180, 190, 0.14), transparent 30%),
    radial-gradient(circle at 82% 8%, rgba(47, 128, 138, 0.12), transparent 28%),
    linear-gradient(180deg, #e7f0f2, #d7e5e7);
}

.home-shell {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  background:
    radial-gradient(circle at 14% 10%, rgba(79, 180, 190, 0.16), transparent 28%),
    radial-gradient(circle at 88% 18%, rgba(255, 255, 255, 0.55), transparent 24%),
    linear-gradient(180deg, #eef6f4, #dce9e5);
}

.organizer-shell {
  background:
    radial-gradient(circle at 18% 12%, rgba(76, 192, 170, 0.14), transparent 28%),
    radial-gradient(circle at 78% 18%, rgba(73, 151, 226, 0.12), transparent 26%),
    linear-gradient(180deg, #f2f7f4, #dde9e2);
}

.settings-shell {
  background:
    radial-gradient(circle at 18% 12%, rgba(63, 159, 168, 0.13), transparent 28%),
    radial-gradient(circle at 82% 14%, rgba(255, 255, 255, 0.52), transparent 24%),
    linear-gradient(180deg, #eef5f2, #dce7e3);
}

.camera-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px;
  background: rgba(251, 252, 253, 0.9);
  border-bottom: 1px solid rgba(96, 119, 136, 0.14);
  backdrop-filter: blur(16px);
}

.home-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px;
  background: rgba(251, 252, 253, 0.9);
  border-bottom: 1px solid rgba(96, 119, 136, 0.14);
  backdrop-filter: blur(16px);
}

.camera-peer,
.camera-actions,
.home-peer,
.home-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.camera-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.camera-mode-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: rgba(232, 241, 243, 0.78);
  border: 1px solid rgba(96, 119, 136, 0.13);
  border-radius: 15px;
}

.camera-mode-tab {
  min-height: 30px;
  padding: 7px 10px;
  color: rgba(54, 76, 83, 0.76);
  font: inherit;
  font-size: 0.73rem;
  font-weight: 850;
  line-height: 1;
  background: transparent;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
}

.camera-mode-tab.active {
  color: rgba(24, 72, 86, 0.96);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 18px rgba(34, 58, 65, 0.10);
}

.camera-avatar {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(160deg, #47bdc0, #2f808a);
  box-shadow: 0 12px 28px rgba(47, 128, 138, 0.22);
}

.camera-avatar::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 14px;
  width: 17px;
  height: 13px;
  border-radius: 5px;
  background: #ffffff;
}

.camera-avatar::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 17px;
  width: 9px;
  height: 8px;
  background: #ffffff;
  clip-path: polygon(0 18%, 100% 0, 100% 100%, 0 82%);
}

.home-avatar {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(160deg, #4cc0aa, #2f808a);
  box-shadow: 0 12px 28px rgba(47, 128, 138, 0.2);
}

.dashboard-avatar {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(160deg, #56bfae, #2f808a);
  box-shadow: 0 12px 28px rgba(47, 128, 138, 0.2);
}

.dashboard-avatar::before,
.dashboard-avatar::after {
  content: "";
  position: absolute;
}

.dashboard-avatar::before {
  left: 10px;
  top: 10px;
  width: 24px;
  height: 24px;
  border: 3px solid #ffffff;
  border-radius: 9px;
}

.dashboard-avatar::after {
  left: 16px;
  top: 16px;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 14px 0 0 -5px #ffffff, 0 14px 0 -5px #ffffff;
}

.settings-avatar {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(160deg, #4fb2bd, #2f808a);
  box-shadow: 0 12px 28px rgba(47, 128, 138, 0.2);
}

.settings-avatar::before,
.settings-avatar::after {
  content: "";
  position: absolute;
}

.settings-avatar::before {
  inset: 12px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  box-shadow:
    0 -9px 0 -5px #ffffff,
    0 9px 0 -5px #ffffff,
    9px 0 0 -5px #ffffff,
    -9px 0 0 -5px #ffffff;
}

.settings-avatar::after {
  left: 20px;
  top: 20px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #ffffff;
}

.home-avatar::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 18px;
  width: 24px;
  height: 15px;
  border-radius: 0 0 7px 7px;
  background: #ffffff;
}

.home-avatar::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 9px;
  width: 19px;
  height: 19px;
  border-left: 7px solid #ffffff;
  border-top: 7px solid #ffffff;
  border-radius: 4px 0 0;
  transform: rotate(45deg);
}

.organizer-avatar {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: linear-gradient(160deg, #52bfa8, #2f808a);
  box-shadow: 0 12px 28px rgba(47, 128, 138, 0.2);
}

.organizer-avatar::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 10px;
  width: 17px;
  height: 22px;
  border: 3px solid #ffffff;
  border-radius: 6px;
}

.organizer-avatar::after {
  content: "";
  position: absolute;
  left: 18px;
  top: 19px;
  width: 12px;
  height: 8px;
  border-left: 3px solid #ffffff;
  border-bottom: 3px solid #ffffff;
  transform: rotate(-45deg);
}

.camera-copy,
.home-copy {
  min-width: 0;
}

.camera-copy h2,
.home-copy h2 {
  margin: 2px 0 0;
  font-size: 1rem;
  line-height: 1.2;
}

.camera-copy p,
.home-copy p {
  margin: 2px 0 0;
  color: var(--muted-strong);
  font-size: 0.78rem;
}

.home-state-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(115, 132, 146, 0.12);
  border-radius: 999px;
}

.home-state-pill.state-ok {
  color: var(--success);
  background: rgba(79, 156, 101, 0.13);
}

.home-state-pill.state-attention {
  color: var(--warning);
  background: rgba(198, 144, 44, 0.15);
}

.home-state-pill.state-error {
  color: var(--danger);
  background: rgba(203, 100, 100, 0.14);
}

.home-state-pill.state-offline {
  color: var(--muted-strong);
  background: rgba(115, 132, 146, 0.14);
}

.camera-open-link {
  color: var(--text);
  text-decoration: none;
}

.camera-canvas {
  min-height: 0;
  overflow: auto;
  padding: 18px;
}

.camera-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  min-height: 100%;
}

.camera-manage-mode .camera-grid {
  grid-template-columns: minmax(0, 1fr);
}

.camera-events-mode .camera-grid {
  grid-template-columns: minmax(0, 1fr);
}

.camera-recordings-mode .camera-grid {
  grid-template-columns: minmax(0, 1fr);
}

.home-canvas {
  min-height: 0;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 18px;
  -webkit-overflow-scrolling: touch;
}

.dashboard-canvas {
  min-height: 0;
  overflow: auto;
  padding: 18px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(380px, 1.08fr);
  gap: 16px;
  align-items: start;
}

.dashboard-card {
  padding: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 28px;
  box-shadow: 0 22px 52px rgba(34, 58, 65, 0.1);
  backdrop-filter: blur(18px);
}

.dashboard-weather-card {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.62fr);
  gap: 18px;
  align-items: stretch;
  min-height: 210px;
  color: #14333a;
  background: linear-gradient(135deg, rgba(239, 251, 247, 0.94), rgba(216, 236, 239, 0.9));
  border-color: rgba(255, 255, 255, 0.8);
}

.dashboard-weather-main,
.dashboard-weather-panel {
  min-width: 0;
}

.dashboard-weather-main {
  display: grid;
  align-content: space-between;
  gap: 18px;
}

.dashboard-weather-current {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.dashboard-weather-icon {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 24px;
  overflow: hidden;
  background:
    radial-gradient(circle at 28% 23%, rgba(255, 255, 255, 0.88) 0 9px, transparent 10px),
    linear-gradient(145deg, #d9f7fb 0%, #acdde5 54%, #7dbccb 100%);
  border: 1px solid rgba(50, 113, 127, 0.28);
  box-shadow:
    0 18px 34px rgba(34, 58, 65, 0.17),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    inset 0 -18px 26px rgba(31, 99, 113, 0.14);
}

.dashboard-weather-icon::before,
.dashboard-weather-icon::after {
  content: "";
  position: absolute;
  filter: drop-shadow(0 2px 2px rgba(24, 55, 64, 0.22));
}

.dashboard-weather-icon.weather-clear::before {
  left: 19px;
  top: 19px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f6bf45;
  box-shadow:
    0 0 0 8px rgba(246, 191, 69, 0.25),
    0 0 0 1px rgba(142, 93, 20, 0.14),
    0 12px 20px rgba(213, 150, 29, 0.28);
}

.dashboard-weather-icon.weather-night::before {
  left: 22px;
  top: 18px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f7e6a3;
  box-shadow:
    inset -10px -2px 0 #7dbccb,
    0 0 0 1px rgba(54, 83, 97, 0.16),
    0 12px 20px rgba(30, 72, 88, 0.22);
}

.dashboard-weather-icon.weather-partly::before {
  left: 14px;
  top: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #f6bf45;
  box-shadow:
    0 0 0 7px rgba(246, 191, 69, 0.25),
    0 0 0 1px rgba(142, 93, 20, 0.14),
    0 10px 22px rgba(213, 150, 29, 0.28);
}

.dashboard-weather-icon.weather-partly::after {
  left: 24px;
  top: 33px;
  width: 40px;
  height: 21px;
  border-radius: 999px;
  background: #f5fdff;
  box-shadow:
    -8px 0 0 -2px #f5fdff,
    7px -10px 0 0 #f5fdff,
    -2px -13px 0 -4px #bddde5,
    0 0 0 1px rgba(42, 82, 94, 0.12),
    0 9px 16px rgba(42, 82, 94, 0.22);
}

.dashboard-weather-icon.weather-cloud::before,
.dashboard-weather-icon.weather-rain::before,
.dashboard-weather-icon.weather-hail::before,
.dashboard-weather-icon.weather-snow::before,
.dashboard-weather-icon.weather-storm::before,
.dashboard-weather-icon.weather-fog::before,
.dashboard-weather-icon.weather-wind::before,
.dashboard-weather-icon.weather-unknown::before {
  left: 17px;
  top: 31px;
  width: 40px;
  height: 20px;
  border-radius: 999px;
  background: #f5fdff;
  box-shadow:
    -7px -1px 0 -2px #f5fdff,
    7px -10px 0 0 #f5fdff,
    -2px -14px 0 -4px #bddde5,
    0 0 0 1px rgba(42, 82, 94, 0.12),
    0 9px 16px rgba(42, 82, 94, 0.2);
}

.dashboard-weather-icon.weather-rain::after {
  left: 25px;
  top: 52px;
  width: 4px;
  height: 12px;
  border-radius: 999px;
  background: #0f7480;
  box-shadow: 12px 0 0 #0f7480, 24px 0 0 #0f7480;
  transform: rotate(12deg);
}

.dashboard-weather-icon.weather-hail::after {
  left: 24px;
  top: 51px;
  width: 7px;
  height: 7px;
  border-radius: 3px;
  background: #f6fdff;
  box-shadow: 13px 3px 0 #f6fdff, 26px 0 0 #f6fdff;
  transform: rotate(12deg);
}

.dashboard-weather-icon.weather-snow::after {
  left: 24px;
  top: 51px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f7fdff;
  box-shadow: 13px 3px 0 #f7fdff, 26px 0 0 #f7fdff;
}

.dashboard-weather-icon.weather-storm::after {
  left: 33px;
  top: 48px;
  width: 18px;
  height: 24px;
  background: #d89a2b;
  clip-path: polygon(42% 0, 100% 0, 58% 42%, 100% 42%, 28% 100%, 46% 54%, 0 54%);
}

.dashboard-weather-icon.weather-fog::after,
.dashboard-weather-icon.weather-wind::after {
  left: 18px;
  top: 52px;
  width: 38px;
  height: 3px;
  border-radius: 999px;
  background: rgba(20, 101, 113, 0.72);
  box-shadow: 0 8px 0 rgba(20, 101, 113, 0.5);
}

.dashboard-weather-icon.weather-unknown::after {
  content: "?";
  left: 26px;
  top: 43px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(20, 101, 113, 0.86);
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
}

.dashboard-weather-current-copy {
  min-width: 0;
}

.dashboard-weather-current-copy h3 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 0.96;
}

.dashboard-weather-current-copy p {
  margin: 6px 0 0;
  color: rgba(20, 51, 58, 0.72);
  font-weight: 760;
}

.dashboard-weather-copy {
  max-width: 58ch;
  margin: 0;
  color: rgba(20, 51, 58, 0.78);
  line-height: 1.48;
}

.dashboard-weather-forecast {
  max-width: 58ch;
  margin: -8px 0 0;
  color: rgba(20, 51, 58, 0.84);
  font-size: 0.9rem;
  font-weight: 760;
  line-height: 1.42;
}

.dashboard-weather-updated {
  color: rgba(63, 83, 92, 0.64);
  font-size: 0.74rem;
  font-weight: 760;
}

.dashboard-weather-panel {
  display: grid;
  gap: 12px;
  align-content: start;
}

.dashboard-weather-group {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.dashboard-weather-section-title {
  margin: 0;
  color: rgba(63, 83, 92, 0.68);
  font-size: 0.72rem;
  font-weight: 830;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dashboard-weather-detail {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 18px;
}

.dashboard-weather-detail span {
  color: rgba(63, 83, 92, 0.68);
  font-size: 0.72rem;
  font-weight: 780;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dashboard-weather-detail strong {
  overflow: hidden;
  color: #193c43;
  font-size: 0.98rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-weather-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dashboard-weather-sensors {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.dashboard-weather-sensors .dashboard-weather-detail {
  background: rgba(255, 255, 255, 0.82);
}

.dashboard-weather-sensors .dashboard-weather-detail span {
  color: rgba(28, 78, 83, 0.74);
}

.dashboard-weather-sensors .dashboard-weather-detail strong {
  font-size: 1.05rem;
}

.dashboard-health-card {
  align-self: stretch;
}

.dashboard-health-list {
  display: grid;
  gap: 9px;
}

.dashboard-health-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 11px 12px;
  background: rgba(247, 251, 251, 0.88);
  border: 1px solid rgba(96, 119, 136, 0.1);
  border-radius: 18px;
}

.dashboard-health-marker {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: rgba(96, 119, 136, 0.42);
  box-shadow: 0 0 0 5px rgba(96, 119, 136, 0.08);
}

.dashboard-health-row.state-ok .dashboard-health-marker {
  background: var(--accent);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.dashboard-health-row.state-attention .dashboard-health-marker {
  background: #c6902c;
  box-shadow: 0 0 0 5px rgba(198, 144, 44, 0.14);
}

.dashboard-health-row.state-error .dashboard-health-marker {
  background: var(--danger);
  box-shadow: 0 0 0 5px rgba(203, 100, 100, 0.14);
}

.dashboard-health-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.dashboard-health-copy strong,
.dashboard-health-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-health-copy strong {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 900;
}

.dashboard-health-copy span {
  color: var(--muted-strong);
  font-size: 0.74rem;
  font-weight: 650;
}

.dashboard-health-value {
  max-width: 120px;
  overflow: hidden;
  padding: 6px 9px;
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 850;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--accent-soft);
  border-radius: 999px;
}

.dashboard-health-row.state-attention .dashboard-health-value {
  color: #8a5d12;
  background: rgba(198, 144, 44, 0.14);
}

.dashboard-health-row.state-error .dashboard-health-value {
  color: var(--danger);
  background: rgba(203, 100, 100, 0.14);
}

.dashboard-list {
  display: grid;
  gap: 10px;
}

.dashboard-focus-row {
  display: grid;
  gap: 7px;
  padding: 15px;
  background:
    radial-gradient(circle at 10% 12%, rgba(255, 255, 255, 0.72), transparent 32%),
    linear-gradient(135deg, rgba(44, 116, 104, 0.15), rgba(247, 251, 251, 0.95));
  border: 1px solid rgba(44, 116, 104, 0.14);
  border-radius: 23px;
  box-shadow: 0 15px 34px rgba(34, 76, 70, 0.10);
}

.dashboard-focus-row.is-urgent {
  background:
    radial-gradient(circle at 10% 12%, rgba(255, 255, 255, 0.74), transparent 32%),
    linear-gradient(135deg, rgba(203, 100, 100, 0.15), rgba(252, 249, 246, 0.95));
  border-color: rgba(203, 100, 100, 0.18);
}

.dashboard-focus-head,
.dashboard-focus-meta {
  display: flex;
  align-items: center;
  gap: 7px;
}

.dashboard-focus-head {
  justify-content: space-between;
}

.dashboard-focus-eyebrow {
  color: var(--accent-strong);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-focus-row.is-urgent .dashboard-focus-eyebrow {
  color: var(--danger);
}

.dashboard-focus-title,
.dashboard-focus-subtitle {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-focus-title {
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 900;
}

.dashboard-focus-subtitle {
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 700;
}

.dashboard-list-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 12px;
  color: inherit;
  text-align: left;
  background: rgba(247, 251, 251, 0.9);
  border: 1px solid rgba(96, 119, 136, 0.1);
  border-radius: 20px;
}

button.dashboard-list-row {
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

button.dashboard-list-row:hover {
  background: rgba(255, 255, 255, 0.96);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(34, 58, 65, 0.08);
}

.dashboard-list-marker {
  width: 34px;
  height: 34px;
  border-radius: 13px;
  background: var(--accent-soft);
}

.dashboard-list-row.is-reminder .dashboard-list-marker {
  background: rgba(198, 144, 44, 0.14);
}

.dashboard-list-row.is-urgent .dashboard-list-marker {
  background: rgba(203, 100, 100, 0.14);
}

.dashboard-list-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.dashboard-list-copy strong,
.dashboard-list-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-list-copy strong {
  font-size: 0.9rem;
}

.dashboard-list-copy span {
  color: var(--muted-strong);
  font-size: 0.76rem;
}

.dashboard-list-status {
  min-width: 32px;
  padding: 6px 9px;
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
  background: var(--accent-soft);
  border-radius: 999px;
}

.dashboard-reminders-card {
  align-self: stretch;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(300px, 1.05fr) minmax(360px, 1.4fr);
  gap: 16px;
  align-items: start;
}

.home-panel {
  padding: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 28px;
  box-shadow: 0 22px 52px rgba(34, 58, 65, 0.1);
  backdrop-filter: blur(18px);
}

.home-overview-panel,
.home-actions-panel {
  grid-column: 1;
}

.home-panel:nth-of-type(2) {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.home-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.home-panel-head h3 {
  margin: 3px 0 0;
  font-size: 1.05rem;
  line-height: 1.25;
}

.home-mini-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
  background: var(--accent-soft);
  border-radius: 999px;
}

.home-mini-pill.state-ok {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.home-mini-pill.state-attention {
  color: #8a5d12;
  background: rgba(198, 144, 44, 0.14);
}

.home-mini-pill.state-error {
  color: var(--danger);
  background: rgba(203, 100, 100, 0.14);
}

.home-panel-copy {
  margin: 0 0 14px;
  color: var(--muted-strong);
  font-size: 0.9rem;
  line-height: 1.45;
}

.home-metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.home-metric-card,
.home-empty-card {
  min-height: 92px;
  padding: 13px;
  background: rgba(246, 250, 251, 0.9);
  border: 1px solid rgba(96, 119, 136, 0.12);
  border-radius: 20px;
}

.home-metric-card {
  display: grid;
  gap: 5px;
  align-content: start;
}

.home-metric-card.is-actionable {
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.home-metric-card.is-actionable:hover,
.home-metric-card.is-actionable:focus-visible {
  outline: 0;
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(44, 116, 104, 0.24);
  box-shadow: 0 14px 32px rgba(34, 58, 65, 0.1);
  transform: translateY(-1px);
}

.home-metric-card span,
.home-metric-card small {
  color: var(--muted-strong);
  font-size: 0.76rem;
}

.home-metric-card strong {
  color: var(--text);
  font-size: 1.02rem;
}

.home-metric-card.state-ok {
  border-color: rgba(79, 156, 101, 0.2);
}

.home-metric-card.state-attention {
  border-color: rgba(198, 144, 44, 0.3);
}

.home-metric-card.state-error {
  border-color: rgba(203, 100, 100, 0.28);
}

.home-devices-list {
  display: grid;
  gap: 10px;
}

.home-device-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: rgba(247, 251, 251, 0.88);
  border: 1px solid rgba(96, 119, 136, 0.1);
  border-radius: 20px;
}

.home-device-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-radius: 14px;
}

.home-device-icon::before,
.home-device-icon::after {
  content: "";
  position: absolute;
}

.home-device-icon-light::before {
  top: 8px;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 50% 50% 45% 45%;
}

.home-device-icon-light::after {
  bottom: 8px;
  width: 12px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.home-device-icon-switch::before {
  width: 22px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.home-device-icon-switch::after {
  left: 11px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.home-device-icon-sensor::before,
.home-device-icon-gauge::before,
.home-device-icon-home::before,
.home-device-icon-cover::before {
  inset: 10px;
  border: 2px solid currentColor;
  border-radius: 8px;
}

.home-device-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.home-device-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-device-copy span {
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-device-side {
  display: grid;
  justify-items: end;
  gap: 7px;
}

.home-device-state {
  color: var(--muted-strong);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.home-device-action {
  min-height: 30px;
  padding: 0 11px;
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--accent-soft);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.home-device-action.is-on {
  color: #a65e22;
  background: rgba(198, 144, 44, 0.15);
}

.home-device-action:disabled {
  cursor: wait;
  opacity: 0.6;
}

.home-action-note {
  display: grid;
  gap: 5px;
  padding: 13px;
  margin-bottom: 12px;
  color: #18343a;
  background: rgba(63, 159, 168, 0.1);
  border-radius: 20px;
}

.home-action-note span {
  color: var(--muted-strong);
  font-size: 0.82rem;
  line-height: 1.4;
}

.home-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.home-action-tile {
  display: grid;
  gap: 4px;
  padding: 13px;
  background: rgba(247, 251, 251, 0.9);
  border: 0;
  border-radius: 20px;
}

button.home-action-tile {
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

button.home-action-tile:hover {
  background: rgba(255, 255, 255, 0.98);
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(34, 58, 65, 0.08);
}

.home-action-tile strong {
  font-size: 0.9rem;
}

.home-action-tile span {
  color: var(--muted-strong);
  font-size: 0.76rem;
}

.home-action-tile.muted {
  opacity: 0.72;
}

.organizer-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.74fr) minmax(390px, 1.12fr) minmax(280px, 0.82fr);
  gap: 16px;
  align-items: start;
}

.organizer-shell[data-organizer-entity-mode="reminders"] .organizer-grid,
.organizer-shell[data-organizer-entity-mode="incidents"] .organizer-grid {
  grid-template-columns: minmax(420px, 1.16fr) minmax(300px, 0.84fr);
}

.organizer-shell[data-organizer-entity-mode="tasks"] .organizer-grid {
  grid-template-columns: minmax(0, 1fr);
}

.organizer-shell[data-organizer-entity-mode="notes"] .organizer-grid {
  grid-template-columns: minmax(300px, 0.42fr) minmax(560px, 1.58fr);
}

.organizer-shell[data-organizer-entity-mode="tasks"] .organizer-overview-panel,
.organizer-shell[data-organizer-entity-mode="reminders"] .organizer-overview-panel,
.organizer-shell[data-organizer-entity-mode="notes"] .organizer-overview-panel,
.organizer-shell[data-organizer-entity-mode="incidents"] .organizer-overview-panel {
  display: none;
}

.organizer-shell[data-organizer-entity-mode="tasks"] .organizer-list-panel,
.organizer-shell[data-organizer-entity-mode="reminders"] .organizer-list-panel,
.organizer-shell[data-organizer-entity-mode="notes"] .organizer-list-panel,
.organizer-shell[data-organizer-entity-mode="incidents"] .organizer-list-panel {
  grid-column: 1;
  grid-row: auto;
}

.organizer-shell[data-organizer-entity-mode="reminders"] .organizer-detail-panel,
.organizer-shell[data-organizer-entity-mode="notes"] .organizer-detail-panel,
.organizer-shell[data-organizer-entity-mode="incidents"] .organizer-detail-panel {
  grid-column: 2;
  grid-row: auto;
}

.organizer-shell[data-organizer-entity-mode="tasks"] .organizer-list-panel {
  grid-column: 1;
}

.organizer-shell[data-organizer-entity-mode="tasks"] .organizer-detail-panel {
  display: none;
}

.organizer-shell[data-organizer-entity-mode="tasks"] .organizer-view-tabs,
.organizer-shell[data-organizer-entity-mode="tasks"] .organizer-filter-tabs,
.organizer-shell[data-organizer-entity-mode="notes"] .organizer-view-tabs,
.organizer-shell[data-organizer-entity-mode="notes"] .organizer-filter-tabs,
.organizer-shell[data-organizer-entity-mode="incidents"] .organizer-list-tools,
.organizer-shell[data-organizer-entity-mode="incidents"] .organizer-view-tabs,
.organizer-shell[data-organizer-entity-mode="incidents"] .organizer-filter-tabs {
  display: none;
}

.organizer-detail-panel {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 18px;
}

.organizer-detail-card {
  min-width: 0;
}

.organizer-detail-body {
  display: grid;
  gap: 13px;
  min-width: 0;
}

.organizer-detail-title {
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.24;
}

.organizer-detail-description {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.86rem;
  line-height: 1.48;
  white-space: pre-wrap;
}

.organizer-detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.organizer-detail-fields {
  display: grid;
  grid-template-columns: minmax(78px, auto) minmax(0, 1fr);
  gap: 8px 10px;
  margin: 0;
  padding: 12px;
  background: rgba(247, 251, 251, 0.82);
  border: 1px solid rgba(96, 119, 136, 0.1);
  border-radius: 18px;
}

.organizer-detail-fields dt {
  color: var(--muted-strong);
  font-size: 0.68rem;
  font-weight: 860;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.organizer-detail-fields dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 760;
}

.organizer-detail-link {
  display: inline;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  font: inherit;
  font-weight: 860;
  text-align: left;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}

.organizer-detail-link:hover {
  color: #225f67;
}

.organizer-detail-checklist {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.organizer-detail-checklist li {
  position: relative;
  padding: 9px 10px 9px 30px;
  color: var(--text);
  font-size: 0.8rem;
  line-height: 1.36;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(96, 119, 136, 0.1);
  border-radius: 15px;
}

.organizer-detail-checklist li::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 13px;
  width: 9px;
  height: 6px;
  border-left: 2px solid var(--accent-strong);
  border-bottom: 2px solid var(--accent-strong);
  transform: rotate(-45deg);
}

.organizer-task-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  background: rgba(246, 250, 251, 0.74);
  border: 1px solid rgba(96, 119, 136, 0.12);
  border-radius: 18px;
}

.organizer-task-editor-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.organizer-task-editor-field span,
.organizer-task-editor-check span {
  color: var(--muted-strong);
  font-size: 0.7rem;
  font-weight: 850;
}

.organizer-task-editor-field input,
.organizer-task-editor-field select,
.organizer-task-editor-field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(96, 119, 136, 0.16);
  border-radius: 12px;
  padding: 9px 10px;
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.86);
  outline: none;
}

.organizer-task-editor-field textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.38;
}

.organizer-task-editor-field input:focus,
.organizer-task-editor-field select:focus,
.organizer-task-editor-field textarea:focus {
  border-color: rgba(44, 116, 104, 0.34);
  box-shadow: 0 0 0 3px rgba(44, 116, 104, 0.11);
}

.organizer-task-editor-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.organizer-task-editor-presets button {
  border: 1px solid rgba(44, 116, 104, 0.12);
  border-radius: 999px;
  padding: 6px 8px;
  color: var(--accent-strong);
  font: inherit;
  font-size: 0.66rem;
  font-weight: 850;
  background: rgba(255, 255, 255, 0.7);
  cursor: pointer;
}

.organizer-task-editor-presets button:hover {
  background: var(--accent-soft);
}

.organizer-task-editor-wide,
.organizer-task-editor-actions {
  grid-column: 1 / -1;
}

.organizer-task-editor-check {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(96, 119, 136, 0.1);
  border-radius: 12px;
}

.organizer-task-editor-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.organizer-task-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.organizer-task-editor-actions button {
  border: 1px solid rgba(44, 116, 104, 0.14);
  border-radius: 999px;
  padding: 9px 13px;
  color: var(--accent-strong);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

.organizer-task-editor-actions button[type="submit"] {
  color: white;
  background: linear-gradient(135deg, var(--accent), #245c55);
  border-color: rgba(44, 116, 104, 0.26);
}

.organizer-task-editor-actions button:disabled {
  cursor: progress;
  opacity: 0.7;
}

.organizer-note-editor {
  display: grid;
  gap: 12px;
  padding: 12px;
  background: rgba(246, 250, 251, 0.74);
  border: 1px solid rgba(96, 119, 136, 0.12);
  border-radius: 18px;
}

.organizer-note-editor-head {
  display: grid;
  gap: 8px;
}

.organizer-note-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.organizer-note-toolbar button {
  min-height: 30px;
  border: 1px solid rgba(44, 116, 104, 0.12);
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--accent-strong);
  font: inherit;
  font-size: 0.68rem;
  font-weight: 860;
  background: rgba(255, 255, 255, 0.76);
  cursor: pointer;
}

.organizer-note-toolbar button:hover {
  background: var(--accent-soft);
}

.organizer-note-workspace-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 10px;
  min-width: 0;
}

.organizer-note-content-field,
.organizer-note-preview {
  display: grid;
  grid-template-rows: auto minmax(240px, 1fr);
  gap: 6px;
  min-width: 0;
}

.organizer-note-content-field > span,
.organizer-note-preview > span {
  color: var(--muted-strong);
  font-size: 0.7rem;
  font-weight: 850;
}

.organizer-note-content-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 280px;
  border: 1px solid rgba(96, 119, 136, 0.16);
  border-radius: 14px;
  padding: 12px;
  color: var(--text);
  font: inherit;
  font-size: 0.84rem;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.88);
  outline: none;
  resize: vertical;
}

.organizer-note-content-field textarea:focus {
  border-color: rgba(44, 116, 104, 0.34);
  box-shadow: 0 0 0 3px rgba(44, 116, 104, 0.11);
}

.organizer-note-preview-body {
  min-width: 0;
  min-height: 280px;
  overflow: auto;
  padding: 13px;
  color: var(--text);
  font-size: 0.84rem;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(96, 119, 136, 0.12);
  border-radius: 14px;
}

.organizer-note-preview-body h1,
.organizer-note-preview-body h2,
.organizer-note-preview-body h3,
.organizer-note-preview-body p,
.organizer-note-preview-body ul,
.organizer-note-preview-body ol,
.organizer-note-preview-body blockquote,
.organizer-note-preview-body pre {
  margin-top: 0;
}

.organizer-note-preview-body h1 {
  font-size: 1.22rem;
}

.organizer-note-preview-body h2 {
  font-size: 1rem;
}

.organizer-note-preview-body h3 {
  font-size: 0.92rem;
}

.organizer-note-preview-body ul,
.organizer-note-preview-body ol {
  padding-left: 20px;
}

.organizer-note-preview-body blockquote {
  margin-left: 0;
  padding-left: 10px;
  color: var(--muted-strong);
  border-left: 3px solid rgba(44, 116, 104, 0.24);
}

.organizer-note-preview-body code {
  padding: 1px 4px;
  background: rgba(57, 74, 86, 0.08);
  border-radius: 5px;
}

.organizer-note-preview-body pre {
  overflow: auto;
  padding: 10px;
  background: rgba(57, 74, 86, 0.08);
  border-radius: 10px;
}

.organizer-note-checklist {
  padding-left: 0 !important;
  list-style: none;
}

.organizer-note-checklist li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.organizer-note-checklist li span:first-child {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border: 1px solid rgba(44, 116, 104, 0.34);
  border-radius: 5px;
}

.organizer-note-checklist li.is-done {
  color: var(--muted-strong);
  text-decoration: line-through;
}

.organizer-note-preview-empty {
  color: var(--muted-strong);
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(420px, 1.18fr);
  gap: 16px;
  align-items: start;
}

.settings-profile-panel {
  display: grid;
  gap: 12px;
}

.settings-profile-panel .ghost-button {
  justify-self: start;
}

.settings-connection-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.settings-connection-tile {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 11px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(96, 119, 136, 0.12);
  border-radius: 16px;
}

.settings-connection-tile span {
  color: var(--muted-strong);
  font-size: 0.67rem;
  font-weight: 820;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.settings-connection-tile strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 840;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-sessions-panel {
  display: grid;
  gap: 12px;
}

.settings-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.settings-audit-panel {
  grid-column: 1 / -1;
}

.settings-session-list {
  display: grid;
  gap: 9px;
}

.settings-session-group-label {
  margin-top: 2px;
  color: var(--muted-strong);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.settings-session-group-label + .settings-session-row {
  margin-top: -3px;
}

.settings-session-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(96, 119, 136, 0.12);
  border-radius: 18px;
}

.settings-session-row.is-current {
  border-color: rgba(63, 159, 168, 0.3);
  background: linear-gradient(135deg, rgba(63, 159, 168, 0.12), rgba(255, 255, 255, 0.78));
}

.settings-session-row.is-current .settings-session-revoke {
  color: var(--muted-strong);
}

.settings-session-icon {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 13px;
  background: rgba(63, 159, 168, 0.13);
}

.settings-session-icon::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 11px;
  width: 16px;
  height: 11px;
  border: 2px solid #2f808a;
  border-radius: 4px;
}

.settings-session-icon::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 24px;
  width: 7px;
  height: 2px;
  background: #2f808a;
  border-radius: 999px;
}

.settings-session-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.settings-session-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-session-copy span {
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 0.76rem;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-session-side {
  display: flex;
  align-items: center;
  gap: 7px;
}

.settings-session-current {
  padding: 4px 8px;
  color: #2f806f;
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1;
  background: rgba(69, 169, 148, 0.12);
  border-radius: 999px;
}

.settings-session-revoke {
  min-height: 30px;
  padding: 0 10px;
  color: var(--danger);
}

.settings-session-revoke:disabled {
  color: var(--muted);
}

.settings-sessions-refresh {
  justify-self: start;
}

.settings-audit-list {
  display: grid;
  gap: 9px;
}

.settings-audit-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(96, 119, 136, 0.12);
  border-radius: 18px;
}

.settings-audit-icon {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 13px;
  background: rgba(69, 169, 148, 0.13);
}

.settings-audit-icon::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 9px;
  width: 12px;
  height: 15px;
  border: 2px solid #2f806f;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
}

.settings-audit-icon::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 15px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #2f806f;
  box-shadow: 0 4px 0 -1px #2f806f;
}

.settings-audit-row.is-failure .settings-audit-icon {
  background: rgba(232, 91, 91, 0.12);
}

.settings-audit-row.is-failure .settings-audit-icon::before {
  border-color: #b94a4a;
}

.settings-audit-row.is-failure .settings-audit-icon::after {
  background: #b94a4a;
  box-shadow: 0 4px 0 -1px #b94a4a;
}

.settings-audit-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.settings-audit-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-audit-copy span {
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 0.76rem;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-audit-side {
  display: grid;
  gap: 3px;
  justify-items: end;
}

.settings-audit-outcome {
  padding: 4px 8px;
  color: #2f806f;
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1;
  background: rgba(69, 169, 148, 0.12);
  border-radius: 999px;
}

.settings-audit-row.is-failure .settings-audit-outcome {
  color: #b94a4a;
  background: rgba(232, 91, 91, 0.12);
}

.settings-audit-time {
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 760;
}

.settings-audit-refresh {
  justify-self: start;
  margin-top: 12px;
}

.organizer-list {
  display: grid;
  gap: 10px;
}

.organizer-note-workspace {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.organizer-note-workspace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  background: rgba(246, 250, 251, 0.78);
  border: 1px solid rgba(96, 119, 136, 0.12);
  border-radius: 18px;
}

.organizer-note-workspace-head div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.organizer-note-workspace-head strong {
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 920;
}

.organizer-note-workspace-head span {
  overflow-wrap: anywhere;
  color: var(--muted-strong);
  font-size: 0.76rem;
  line-height: 1.35;
}

.organizer-note-create-button {
  flex: 0 0 auto;
  border: 1px solid rgba(44, 116, 104, 0.18);
  border-radius: 999px;
  padding: 9px 13px;
  color: white;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent), #245c55);
  cursor: pointer;
}

.organizer-note-list {
  display: grid;
  gap: 9px;
}

.organizer-note-row {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(96, 119, 136, 0.1);
  border-radius: 18px;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.organizer-note-row:hover,
.organizer-note-row.is-selected {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(44, 116, 104, 0.22);
  box-shadow: 0 12px 26px rgba(40, 95, 88, 0.08);
  transform: translateY(-1px);
}

.organizer-note-row-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.organizer-note-row-top strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organizer-note-row-top span {
  color: var(--muted-strong);
  font-size: 0.68rem;
  font-weight: 760;
  white-space: nowrap;
}

.organizer-note-row p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin: 0;
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 0.78rem;
  line-height: 1.42;
}

.organizer-note-row-meta,
.organizer-note-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.organizer-note-row-meta span,
.organizer-note-metrics span {
  padding: 4px 7px;
  color: var(--accent-strong);
  font-size: 0.66rem;
  font-weight: 850;
  background: var(--accent-soft);
  border-radius: 999px;
}

.organizer-task-workspace {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.organizer-task-mode-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.organizer-task-mode-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
  align-items: center;
  min-width: 0;
  min-height: 58px;
  padding: 9px 10px;
  color: var(--muted-strong);
  text-align: left;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(96, 119, 136, 0.1);
  border-radius: 16px;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.organizer-task-mode-button:hover,
.organizer-task-mode-button.active {
  color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(44, 116, 104, 0.22);
  box-shadow: 0 10px 22px rgba(40, 95, 88, 0.08);
  transform: translateY(-1px);
}

.organizer-task-mode-button span,
.organizer-task-mode-button small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organizer-task-mode-button span {
  font-size: 0.72rem;
  font-weight: 900;
}

.organizer-task-mode-button strong {
  font-size: 0.98rem;
  font-weight: 950;
  text-align: right;
}

.organizer-task-mode-button small {
  grid-column: 1 / -1;
  color: var(--muted-strong);
  font-size: 0.66rem;
  font-weight: 760;
}

.organizer-task-layout {
  display: grid;
  grid-template-columns: minmax(168px, 0.28fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.organizer-task-layout--projects {
  grid-template-columns: minmax(184px, 0.32fr) minmax(0, 1fr);
}

.organizer-task-layout--table {
  grid-template-columns: 1fr;
}

.organizer-task-context-rail {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  background: rgba(246, 250, 251, 0.78);
  border: 1px solid rgba(96, 119, 136, 0.12);
  border-radius: 18px;
}

.organizer-task-context-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 2px 3px;
}

.organizer-task-context-head strong {
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.organizer-task-context-head span {
  color: var(--accent-strong);
  font-size: 0.68rem;
  font-weight: 900;
}

.organizer-task-context-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px 9px;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(96, 119, 136, 0.1);
  border-radius: 13px;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.organizer-task-context-button:hover,
.organizer-task-context-button.active {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(44, 116, 104, 0.2);
  box-shadow: 0 8px 18px rgba(40, 95, 88, 0.07);
  transform: translateY(-1px);
}

.organizer-task-context-button span {
  overflow: hidden;
  font-size: 0.76rem;
  font-weight: 840;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organizer-task-context-button strong {
  min-width: 22px;
  padding: 3px 7px;
  color: var(--muted-strong);
  font-size: 0.68rem;
  font-weight: 900;
  text-align: center;
  background: rgba(96, 119, 136, 0.09);
  border-radius: 999px;
}

.organizer-task-surface {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.organizer-task-surface-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  background: rgba(246, 250, 251, 0.78);
  border: 1px solid rgba(96, 119, 136, 0.12);
  border-radius: 18px;
}

.organizer-task-surface-head > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.organizer-task-surface-head strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 920;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organizer-task-surface-head span {
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 0.74rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organizer-task-surface-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.organizer-task-surface-metric {
  display: grid;
  gap: 1px;
  min-width: 58px;
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(96, 119, 136, 0.1);
  border-radius: 13px;
}

.organizer-task-surface-metric strong {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 950;
}

.organizer-task-surface-metric small {
  color: var(--muted-strong);
  font-size: 0.62rem;
  font-weight: 820;
}

.organizer-task-surface-metric[data-organizer-tone="danger"] strong {
  color: var(--danger);
}

.organizer-task-table-surface {
  gap: 9px;
}

.organizer-task-layout--tree {
  grid-template-columns: 1fr;
}

.organizer-task-tree-surface {
  gap: 9px;
}

.organizer-task-tree-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  background: rgba(246, 250, 251, 0.78);
  border: 1px solid rgba(96, 119, 136, 0.12);
  border-radius: 18px;
}

.organizer-task-tree-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.organizer-task-tree-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 940;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organizer-task-tree-copy span {
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 0.74rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organizer-task-tree-controls {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}

.organizer-task-tree {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.organizer-task-tree-project {
  min-width: 0;
  overflow: hidden;
  background: rgba(246, 250, 251, 0.74);
  border: 1px solid rgba(96, 119, 136, 0.12);
  border-radius: 16px;
}

.organizer-task-tree-project-head {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 58px;
  padding: 10px 12px;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.58);
  border: 0;
  cursor: pointer;
}

.organizer-task-tree-project-head:hover {
  background: rgba(255, 255, 255, 0.84);
}

.organizer-task-tree-chevron {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--accent-strong);
  font-size: 0.84rem;
  font-weight: 950;
  background: rgba(63, 159, 168, 0.11);
  border: 1px solid rgba(44, 116, 104, 0.12);
  border-radius: 9px;
}

.organizer-task-tree-project-copy,
.organizer-task-tree-task-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.organizer-task-tree-project-copy strong,
.organizer-task-tree-task-copy strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organizer-task-tree-project-copy strong {
  font-size: 0.86rem;
  font-weight: 940;
}

.organizer-task-tree-project-copy small,
.organizer-task-tree-task-copy small {
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 0.68rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organizer-task-tree-project-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.organizer-task-tree-metric {
  display: inline-flex;
  gap: 5px;
  align-items: baseline;
  min-height: 28px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(96, 119, 136, 0.1);
  border-radius: 999px;
}

.organizer-task-tree-metric strong {
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 950;
}

.organizer-task-tree-metric small {
  color: var(--muted-strong);
  font-size: 0.62rem;
  font-weight: 820;
}

.organizer-task-tree-task-list {
  display: grid;
  gap: 0;
  min-width: 0;
  padding: 0 0 6px;
}

.organizer-task-tree-task {
  display: grid;
  min-width: 0;
  margin: 0 8px;
  border-top: 1px solid rgba(96, 119, 136, 0.08);
  cursor: pointer;
}

.organizer-task-tree-task-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(0, auto);
  gap: 10px;
  align-items: center;
  min-height: 52px;
  padding: 9px 6px;
  border-radius: 12px;
}

.organizer-task-tree-task:hover .organizer-task-tree-task-row,
.organizer-task-tree-task.is-selected .organizer-task-tree-task-row {
  background: rgba(255, 255, 255, 0.82);
}

.organizer-task-tree-task.is-done .organizer-task-tree-task-copy strong {
  color: var(--muted-strong);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.organizer-task-tree-task.is-deleted {
  opacity: 0.58;
}

.organizer-task-tree-task-copy strong {
  font-size: 0.84rem;
  font-weight: 900;
}

.organizer-task-tree-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
  max-width: min(42vw, 420px);
}

.organizer-task-table-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  background: rgba(246, 250, 251, 0.78);
  border: 1px solid rgba(96, 119, 136, 0.12);
  border-radius: 18px;
}

.organizer-task-table-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.organizer-task-table-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.94rem;
  font-weight: 940;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organizer-task-table-copy span {
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 0.74rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organizer-task-table-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.organizer-task-scope-bar {
  display: flex;
  gap: 6px;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 1px;
}

.organizer-task-scope-button {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  color: var(--muted-strong);
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(96, 119, 136, 0.12);
  border-radius: 999px;
  cursor: pointer;
}

.organizer-task-scope-button span {
  font-size: 0.72rem;
  font-weight: 880;
}

.organizer-task-scope-button strong {
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 940;
}

.organizer-task-scope-button:hover,
.organizer-task-scope-button.active {
  color: var(--accent-strong);
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(44, 116, 104, 0.22);
  box-shadow: 0 8px 18px rgba(40, 95, 88, 0.07);
}

.organizer-task-project-select {
  width: 168px;
  min-width: 0;
  min-height: 34px;
  padding: 0 10px;
  color: var(--text);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 820;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(96, 119, 136, 0.14);
  border-radius: 12px;
}

.organizer-task-group-stack {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.organizer-task-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(166px, 1fr));
  gap: 9px;
  min-width: 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.organizer-task-board-column {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 166px;
  padding: 9px;
  background: rgba(246, 250, 251, 0.76);
  border: 1px solid rgba(96, 119, 136, 0.12);
  border-radius: 16px;
}

.organizer-task-board-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.organizer-task-board-head div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.organizer-task-board-head strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 920;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organizer-task-board-head span {
  color: var(--muted-strong);
  font-size: 0.64rem;
  font-weight: 760;
}

.organizer-task-board-head > span {
  min-width: 22px;
  padding: 3px 7px;
  color: var(--accent-strong);
  font-size: 0.66rem;
  font-weight: 900;
  text-align: center;
  background: var(--accent-soft);
  border-radius: 999px;
}

.organizer-task-board-stack {
  display: grid;
  gap: 7px;
}

.organizer-task-board-stack p {
  margin: 0;
  padding: 10px 8px;
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 760;
  text-align: center;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
}

.organizer-task-board-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(96, 119, 136, 0.1);
  border-radius: 14px;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.organizer-task-board-card:hover,
.organizer-task-board-card.is-selected {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(44, 116, 104, 0.24);
  box-shadow: 0 10px 22px rgba(40, 95, 88, 0.08);
  transform: translateY(-1px);
}

.organizer-task-board-card > strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organizer-task-table {
  display: grid;
  min-width: 0;
  overflow-x: auto;
  background: rgba(246, 250, 251, 0.74);
  border: 1px solid rgba(96, 119, 136, 0.12);
  border-radius: 16px;
}

.organizer-task-table-row {
  display: grid;
  grid-template-columns:
    minmax(320px, 2fr)
    minmax(120px, 0.7fr)
    minmax(106px, 0.62fr)
    minmax(112px, 0.62fr)
    minmax(128px, 0.72fr)
    minmax(102px, 0.58fr)
    minmax(132px, 0.72fr)
    minmax(98px, 0.54fr);
  min-width: 1120px;
  cursor: pointer;
}

.organizer-task-table-row + .organizer-task-table-row {
  border-top: 1px solid rgba(96, 119, 136, 0.09);
}

.organizer-task-table-row:hover,
.organizer-task-table-row.is-selected {
  background: rgba(255, 255, 255, 0.78);
}

.organizer-task-table-row.is-done .organizer-task-table-title-cell strong {
  color: var(--muted-strong);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.organizer-task-table-row.is-deleted {
  opacity: 0.58;
}

.organizer-task-table-row--head {
  cursor: default;
  background: rgba(255, 255, 255, 0.6);
}

.organizer-task-table-cell {
  min-width: 0;
  overflow: hidden;
  padding: 9px 10px;
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organizer-task-table-row .organizer-task-table-cell:first-child {
  color: var(--text);
  font-weight: 880;
}

.organizer-task-table-title-cell {
  display: grid;
  gap: 2px;
}

.organizer-task-table-title-cell strong,
.organizer-task-table-title-cell small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organizer-task-table-title-cell strong {
  color: var(--text);
  font-size: 0.74rem;
  font-weight: 900;
}

.organizer-task-table-title-cell small {
  color: var(--muted-strong);
  font-size: 0.64rem;
  font-weight: 720;
}

.organizer-task-table-row--head .organizer-task-table-cell {
  color: var(--muted-strong);
  font-size: 0.66rem;
  font-weight: 920;
  text-transform: uppercase;
}

.organizer-task-sheet-backdrop {
  position: fixed;
  z-index: 80;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  overflow: auto;
  background: rgba(18, 34, 37, 0.36);
  backdrop-filter: blur(8px);
}

.organizer-task-sheet {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(1240px, 100%);
  max-height: min(90vh, calc(100dvh - 44px));
  overflow: hidden;
  background: rgba(252, 254, 253, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  box-shadow: 0 22px 70px rgba(22, 54, 55, 0.22);
}

.organizer-task-sheet-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 15px 16px;
  border-bottom: 1px solid rgba(96, 119, 136, 0.12);
}

.organizer-task-sheet-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.organizer-task-sheet-title strong,
.organizer-task-sheet-title span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organizer-task-sheet-title strong {
  color: var(--text);
  font-size: 1.06rem;
  font-weight: 940;
}

.organizer-task-sheet-title span {
  color: var(--muted-strong);
  font-size: 0.76rem;
  font-weight: 780;
}

.organizer-task-sheet-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--muted-strong);
  font: inherit;
  font-size: 1.2rem;
  line-height: 1;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(96, 119, 136, 0.14);
  border-radius: 50%;
  cursor: pointer;
}

.organizer-task-sheet-close:hover {
  color: var(--accent-strong);
  background: white;
}

.organizer-task-sheet-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.35fr);
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding: 14px;
}

.organizer-task-sheet-editor {
  align-content: start;
}

.organizer-task-sheet-editor .organizer-task-editor-field textarea {
  min-height: 210px;
}

.organizer-task-sheet-aside {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  background: rgba(246, 250, 251, 0.78);
  border: 1px solid rgba(96, 119, 136, 0.12);
  border-radius: 18px;
}

.organizer-task-sheet-fields {
  margin: 0;
}

.organizer-project-nav {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  background: rgba(246, 250, 251, 0.78);
  border: 1px solid rgba(96, 119, 136, 0.12);
  border-radius: 18px;
}

.organizer-project-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px 4px;
}

.organizer-project-nav-head strong {
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.organizer-project-nav-head span {
  min-width: 24px;
  padding: 4px 7px;
  color: var(--accent-strong);
  font-size: 0.7rem;
  font-weight: 900;
  text-align: center;
  background: var(--accent-soft);
  border-radius: 999px;
}

.organizer-project-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 9px 10px;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(96, 119, 136, 0.1);
  border-radius: 14px;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.organizer-project-button:hover,
.organizer-project-button.active {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(44, 116, 104, 0.2);
  box-shadow: 0 10px 24px rgba(40, 95, 88, 0.08);
  transform: translateY(-1px);
}

.organizer-project-button.active {
  color: var(--accent-strong);
}

.organizer-project-button-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.organizer-project-button-copy strong,
.organizer-project-button-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organizer-project-button-copy strong {
  font-size: 0.82rem;
  font-weight: 900;
}

.organizer-project-button-copy small {
  color: var(--muted-strong);
  font-size: 0.68rem;
  font-weight: 750;
}

.organizer-project-button-count {
  min-width: 24px;
  padding: 4px 7px;
  color: var(--muted-strong);
  font-size: 0.7rem;
  font-weight: 900;
  text-align: center;
  background: rgba(96, 119, 136, 0.09);
  border-radius: 999px;
}

.organizer-project-button.active .organizer-project-button-count {
  color: var(--accent-strong);
  background: var(--accent-soft);
}

.organizer-task-feed {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.organizer-task-workflow-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.organizer-task-preset {
  display: grid;
  gap: 2px;
  min-width: 0;
  min-height: 74px;
  align-content: start;
  padding: 10px;
  color: var(--text);
  text-align: left;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(96, 119, 136, 0.1);
  border-radius: 16px;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.organizer-task-preset:hover,
.organizer-task-preset.active {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(44, 116, 104, 0.2);
  box-shadow: 0 10px 24px rgba(40, 95, 88, 0.08);
  transform: translateY(-1px);
}

.organizer-task-preset.active {
  color: var(--accent-strong);
}

.organizer-task-preset span,
.organizer-task-preset small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organizer-task-preset span {
  color: inherit;
  font-size: 0.72rem;
  font-weight: 900;
}

.organizer-task-preset strong {
  font-size: 1.15rem;
  font-weight: 950;
}

.organizer-task-preset small {
  color: var(--muted-strong);
  font-size: 0.66rem;
  font-weight: 760;
}

.organizer-task-preset[data-organizer-tone="danger"] strong {
  color: var(--danger);
}

.organizer-task-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.organizer-task-summary-card {
  display: grid;
  gap: 2px;
  min-width: 0;
  min-height: 62px;
  align-content: center;
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(96, 119, 136, 0.1);
  border-radius: 16px;
}

.organizer-task-summary-card strong {
  color: var(--text);
  font-size: 1rem;
  font-weight: 950;
}

.organizer-task-summary-card span {
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 0.68rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organizer-task-summary-card[data-organizer-tone="danger"] strong {
  color: var(--danger);
}

.organizer-task-review-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
  padding: 10px 12px;
  color: var(--muted-strong);
  background: rgba(246, 250, 251, 0.78);
  border: 1px solid rgba(96, 119, 136, 0.1);
  border-radius: 16px;
}

.organizer-task-review-summary strong {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 950;
}

.organizer-task-review-summary span {
  min-width: 0;
  font-size: 0.75rem;
  font-weight: 760;
}

.organizer-empty-card {
  display: grid;
  gap: 12px;
}

.organizer-empty-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.organizer-empty-actions button {
  border: 1px solid rgba(44, 116, 104, 0.14);
  border-radius: 999px;
  padding: 8px 11px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--accent-strong);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 850;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.organizer-empty-actions button:hover {
  background: var(--accent-soft);
  box-shadow: 0 10px 22px rgba(40, 95, 88, 0.1);
  transform: translateY(-1px);
}

.organizer-status-card {
  padding: 10px 12px;
  color: var(--muted-strong);
  font-size: 0.82rem;
  font-weight: 760;
  line-height: 1.35;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(96, 119, 136, 0.12);
  border-radius: 18px;
}

.organizer-status-card[data-state="degraded"] {
  color: #8a641a;
  background: rgba(247, 205, 109, 0.18);
  border-color: rgba(198, 144, 44, 0.2);
}

.organizer-status-card[data-state="error"] {
  color: var(--danger);
  background: rgba(203, 100, 100, 0.12);
  border-color: rgba(203, 100, 100, 0.18);
}

.organizer-status-card[data-state="disabled"] {
  background: rgba(115, 132, 146, 0.1);
}

.organizer-focus-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 255, 255, 0.72), transparent 31%),
    linear-gradient(135deg, rgba(44, 116, 104, 0.16), rgba(248, 252, 250, 0.92));
  border: 1px solid rgba(44, 116, 104, 0.16);
  border-radius: 24px;
  box-shadow: 0 16px 36px rgba(34, 76, 70, 0.12);
  cursor: pointer;
}

.organizer-focus-card.is-urgent {
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 255, 255, 0.76), transparent 31%),
    linear-gradient(135deg, rgba(203, 100, 100, 0.16), rgba(252, 249, 246, 0.94));
  border-color: rgba(203, 100, 100, 0.18);
}

.organizer-focus-card.is-selected,
.organizer-item-row.is-selected {
  border-color: rgba(44, 116, 104, 0.42);
  box-shadow:
    0 16px 34px rgba(34, 76, 70, 0.14),
    inset 0 0 0 1px rgba(44, 116, 104, 0.14);
}

.organizer-focus-top,
.organizer-focus-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.organizer-focus-eyebrow {
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.organizer-focus-card.is-urgent .organizer-focus-eyebrow {
  color: var(--danger);
}

.organizer-focus-title {
  overflow: hidden;
  color: var(--text);
  font-size: 1.02rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organizer-focus-subtitle {
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 0.8rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organizer-focus-meta {
  margin-top: 1px;
}

.organizer-focus-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 4px;
}

.organizer-focus-actions .organizer-item-action {
  padding: 8px 11px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 18px rgba(34, 76, 70, 0.08);
}

.organizer-day-group {
  display: grid;
  gap: 8px;
}

.organizer-day-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 4px 0;
}

.organizer-day-header div {
  display: grid;
  gap: 2px;
}

.organizer-day-header strong {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 900;
}

.organizer-day-header span {
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 750;
}

.organizer-day-count {
  min-width: 24px;
  padding: 4px 7px;
  text-align: center;
  background: rgba(44, 116, 104, 0.1);
  border-radius: 999px;
}

.organizer-day-group[data-organizer-timeline="overdue"] .organizer-day-count {
  color: var(--danger);
  background: rgba(203, 100, 100, 0.13);
}

.organizer-quick-actions,
.organizer-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.organizer-quick-actions {
  margin-top: 8px;
}

.organizer-filter-tabs {
  margin: -2px 0 12px;
}

.organizer-filter-tabs[hidden] {
  display: none;
}

.organizer-filter-toggle {
  margin-left: auto;
}

.organizer-list-state {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.organizer-list-reset {
  border: 1px solid rgba(44, 116, 104, 0.14);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-strong);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 850;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.organizer-list-reset:hover {
  background: var(--accent-soft);
  box-shadow: 0 10px 22px rgba(40, 95, 88, 0.1);
  transform: translateY(-1px);
}

.organizer-list-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin: -2px 0 12px;
}

.organizer-search-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(77, 115, 109, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
}

.organizer-search-field span {
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.organizer-search-field input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
}

.organizer-search-field input::placeholder {
  color: rgba(93, 113, 126, 0.62);
}

.organizer-search-clear {
  border: 1px solid rgba(44, 116, 104, 0.14);
  border-radius: 18px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-strong);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 850;
  cursor: pointer;
}

.organizer-search-clear:hover {
  background: var(--accent-soft);
}

.organizer-view-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: -2px 0 12px;
}

.organizer-view-tabs span {
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.organizer-view-button {
  border: 1px solid rgba(44, 116, 104, 0.14);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted-strong);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 850;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.organizer-view-button:hover,
.organizer-view-button.active {
  border-color: rgba(44, 116, 104, 0.24);
  background: var(--accent-soft);
  color: var(--accent-strong);
  box-shadow: 0 10px 22px rgba(40, 95, 88, 0.1);
  transform: translateY(-1px);
}

.organizer-control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.organizer-workflow-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.organizer-workflow-button {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid rgba(77, 115, 109, 0.12);
  border-radius: 18px;
  padding: 10px 11px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted-strong);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.organizer-workflow-button strong {
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 880;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organizer-workflow-button span {
  justify-self: start;
  min-width: 24px;
  padding: 3px 7px;
  color: var(--accent-strong);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  background: rgba(44, 116, 104, 0.1);
  border-radius: 999px;
}

.organizer-workflow-button:hover,
.organizer-workflow-button.active {
  border-color: rgba(44, 116, 104, 0.24);
  background: var(--accent-soft);
  color: var(--accent-strong);
  box-shadow: 0 12px 26px rgba(40, 95, 88, 0.1);
  transform: translateY(-1px);
}

.organizer-workflow-button.active span {
  background: rgba(255, 255, 255, 0.82);
}

.organizer-primary-control,
.organizer-secondary-control {
  border: 1px solid rgba(44, 116, 104, 0.16);
  border-radius: 999px;
  padding: 10px 14px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.organizer-primary-control {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 12px 28px rgba(40, 95, 88, 0.16);
}

.organizer-secondary-control {
  background: rgba(255, 255, 255, 0.74);
  color: var(--accent-strong);
}

.organizer-primary-control:hover,
.organizer-secondary-control:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(40, 95, 88, 0.12);
}

.organizer-entity-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 34px;
  padding: 4px;
  background: rgba(232, 241, 243, 0.78);
  border: 1px solid rgba(96, 119, 136, 0.13);
  border-radius: 18px;
}

.organizer-shell .home-actions {
  flex-wrap: wrap;
}

.organizer-entity-button {
  border: 0;
  border-radius: 14px;
  padding: 6px 9px;
  background: transparent;
  color: var(--muted-strong);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 850;
  cursor: pointer;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.organizer-entity-button:hover,
.organizer-entity-button.active {
  background: rgba(255, 255, 255, 0.86);
  color: var(--accent-strong);
  box-shadow: 0 8px 18px rgba(40, 95, 88, 0.08);
}

.organizer-assist-actions {
  margin-top: 12px;
}

.organizer-assist-actions summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(44, 116, 104, 0.13);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--accent-strong);
  cursor: pointer;
  list-style: none;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    box-shadow 0.16s ease;
}

.organizer-assist-actions summary::-webkit-details-marker {
  display: none;
}

.organizer-assist-actions summary::after {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 0.16s ease;
}

.organizer-assist-actions[open] summary::after {
  transform: rotate(225deg) translate(-1px, -1px);
}

.organizer-assist-actions summary:hover {
  border-color: rgba(44, 116, 104, 0.22);
  background: var(--accent-soft);
  box-shadow: 0 10px 22px rgba(40, 95, 88, 0.1);
  transform: translateY(-1px);
}

.organizer-assist-actions summary span {
  font-size: 0.78rem;
  font-weight: 880;
}

.organizer-assist-actions summary small {
  min-width: 24px;
  padding: 3px 7px;
  color: var(--accent-strong);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  background: rgba(44, 116, 104, 0.1);
  border-radius: 999px;
}

.organizer-create-panel {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 11px;
  border: 1px solid rgba(77, 115, 109, 0.12);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(232, 246, 239, 0.74), rgba(255, 255, 255, 0.64)),
    rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.organizer-create-panel[hidden] {
  display: none;
}

.organizer-create-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 1px 3px 2px;
}

.organizer-create-head strong {
  color: var(--text);
  font-size: 0.86rem;
}

.organizer-create-head span {
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 750;
  text-align: right;
}

.organizer-create-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 0;
  padding: 8px;
  border: 1px solid rgba(77, 115, 109, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.66);
}

.organizer-create-form[hidden] {
  display: none;
}

.organizer-reminder-form {
  grid-template-columns: minmax(0, 1fr) auto auto auto;
}

.organizer-task-form {
  grid-template-columns: minmax(0, 1fr) auto auto auto auto auto;
}

.organizer-thought-form {
  grid-template-columns: minmax(0, 1fr) auto;
}

.organizer-concept-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 13px;
  background: rgba(247, 251, 251, 0.9);
  border: 1px solid rgba(96, 119, 136, 0.1);
  border-radius: 20px;
}

.organizer-concept-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.organizer-concept-copy strong {
  color: var(--text);
  font-size: 0.92rem;
}

.organizer-concept-copy span {
  color: var(--muted-strong);
  font-size: 0.8rem;
  line-height: 1.38;
}

.organizer-concept-row small {
  flex: 0 0 auto;
  padding: 5px 8px;
  color: var(--accent-strong);
  font-size: 0.68rem;
  font-weight: 850;
  background: rgba(44, 116, 104, 0.1);
  border-radius: 999px;
}

.organizer-concept-detail {
  display: grid;
  gap: 12px;
}

.organizer-concept-detail p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.86rem;
  line-height: 1.48;
}

.organizer-concept-detail ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1rem;
  color: var(--text);
  font-size: 0.8rem;
  line-height: 1.42;
}

.organizer-create-form input,
.organizer-create-form select {
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 10px 12px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.88rem;
}

.organizer-create-form select {
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 800;
}

.organizer-reminder-time,
.organizer-task-deadline {
  width: 10.5rem;
  color: var(--muted-strong);
  font-size: 0.78rem;
  font-weight: 800;
}

.organizer-create-form input::placeholder {
  color: rgba(93, 113, 126, 0.68);
}

.organizer-create-form button {
  border: 0;
  border-radius: 15px;
  padding: 10px 13px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(40, 95, 88, 0.16);
}

.organizer-create-form button:disabled,
.organizer-create-form input:disabled,
.organizer-create-form select:disabled {
  cursor: wait;
  opacity: 0.55;
}

.organizer-prompt-chip,
.organizer-filter-button {
  border: 1px solid rgba(77, 115, 109, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted-strong);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    border-color 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    box-shadow 0.16s ease;
}

.organizer-prompt-chip {
  padding: 9px 11px;
  text-align: left;
}

.organizer-filter-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
}

.organizer-filter-count {
  min-width: 20px;
  padding: 2px 6px;
  color: var(--accent-strong);
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  background: rgba(44, 116, 104, 0.1);
  border-radius: 999px;
}

.organizer-filter-button.active .organizer-filter-count {
  background: rgba(255, 255, 255, 0.78);
}

.organizer-filter-button[data-organizer-attention="true"] .organizer-filter-count {
  color: var(--danger);
  background: rgba(203, 100, 100, 0.14);
}

.organizer-filter-button[data-organizer-attention="true"].active {
  border-color: rgba(203, 100, 100, 0.24);
  background: rgba(203, 100, 100, 0.1);
  color: var(--danger);
}

.organizer-prompt-chip:hover,
.organizer-filter-button:hover,
.organizer-filter-button.active {
  border-color: rgba(44, 116, 104, 0.24);
  background: var(--accent-soft);
  color: var(--accent-strong);
  box-shadow: 0 10px 24px rgba(40, 95, 88, 0.1);
  transform: translateY(-1px);
}

.organizer-item-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  background: rgba(247, 251, 251, 0.9);
  border: 1px solid rgba(96, 119, 136, 0.1);
  border-radius: 20px;
  cursor: pointer;
}

.organizer-item-icon {
  position: relative;
  width: 38px;
  height: 38px;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-radius: 14px;
}

.organizer-item-icon::before {
  content: "";
  position: absolute;
  inset: 10px 11px 9px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.organizer-item-icon::after {
  content: "";
  position: absolute;
  left: 15px;
  top: 18px;
  width: 10px;
  height: 6px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.organizer-item-row.is-reminder .organizer-item-icon {
  color: #a66c22;
  background: rgba(198, 144, 44, 0.14);
}

.organizer-item-row.is-urgent .organizer-item-icon {
  color: var(--danger);
  background: rgba(203, 100, 100, 0.14);
}

.organizer-item-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.organizer-item-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 0.94rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organizer-item-copy span {
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.organizer-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.organizer-item-badge {
  max-width: 100%;
  padding: 4px 7px;
  color: var(--accent-strong);
  font-size: 0.68rem;
  font-weight: 850;
  line-height: 1;
  background: rgba(44, 116, 104, 0.1);
  border: 1px solid rgba(44, 116, 104, 0.1);
  border-radius: 999px;
}

.organizer-item-badge[data-organizer-badge="due"] {
  color: #7a5a1b;
  background: rgba(198, 144, 44, 0.13);
  border-color: rgba(198, 144, 44, 0.12);
}

.organizer-item-badge[data-organizer-badge="urgent"] {
  color: var(--danger);
  background: rgba(203, 100, 100, 0.13);
  border-color: rgba(203, 100, 100, 0.12);
}

.organizer-item-status {
  align-self: center;
  padding: 6px 10px;
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--accent-soft);
  border-radius: 999px;
  white-space: nowrap;
}

.organizer-item-side {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.organizer-item-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  position: relative;
}

.organizer-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px;
  background: rgba(239, 248, 247, 0.72);
  border: 1px solid rgba(44, 116, 104, 0.1);
  border-radius: 16px;
}

.organizer-reschedule-editor,
.organizer-edit-editor {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(77, 115, 109, 0.1);
}

.organizer-reschedule-editor input,
.organizer-edit-editor input {
  min-width: 0;
  border: 1px solid rgba(77, 115, 109, 0.12);
  border-radius: 14px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted-strong);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
}

.organizer-item-action {
  border: 1px solid rgba(44, 116, 104, 0.16);
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--accent-strong);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 850;
  cursor: pointer;
  transition:
    transform 0.16s ease,
    opacity 0.16s ease,
    background 0.16s ease;
}

.organizer-more-menu {
  position: relative;
  display: inline-flex;
}

.organizer-more-menu.is-disabled {
  pointer-events: none;
  opacity: 0.48;
}

.organizer-more-summary {
  list-style: none;
  user-select: none;
}

.organizer-more-summary::-webkit-details-marker {
  display: none;
}

.organizer-more-summary::after {
  content: "···";
  margin-left: 5px;
  letter-spacing: -1px;
}

.organizer-more-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  display: none;
  min-width: 176px;
  padding: 7px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(77, 115, 109, 0.14);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(24, 48, 45, 0.16);
  backdrop-filter: blur(18px);
}

.organizer-more-menu[open] .organizer-more-panel {
  display: grid;
  gap: 5px;
}

.organizer-more-panel .organizer-item-action {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  border-radius: 13px;
  background: transparent;
  box-shadow: none;
}

.organizer-more-panel .organizer-item-action:hover {
  background: var(--accent-soft);
}

.organizer-item-action:hover {
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.organizer-item-action[data-organizer-action="delete"] {
  border-color: rgba(203, 100, 100, 0.22);
  color: var(--danger);
  background: rgba(203, 100, 100, 0.08);
}

.organizer-item-action[data-organizer-action^="category_"] {
  border-color: rgba(44, 116, 104, 0.22);
  background: rgba(44, 116, 104, 0.08);
}

.organizer-reschedule-editor button,
.organizer-edit-editor button {
  border: 1px solid rgba(44, 116, 104, 0.16);
  border-radius: 999px;
  padding: 8px 11px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--accent-strong);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 850;
  cursor: pointer;
}

.organizer-reschedule-editor button:first-of-type,
.organizer-edit-editor button:first-of-type {
  background: var(--accent);
  color: #fff;
}

.organizer-item-action:disabled {
  cursor: wait;
  opacity: 0.48;
  transform: none;
}

.organizer-item-action[data-organizer-busy="true"] {
  position: relative;
  padding-right: 23px;
}

.organizer-item-action[data-organizer-busy="true"]::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 9px;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 999px;
  animation: organizer-action-spin 0.8s linear infinite;
}

@keyframes organizer-action-spin {
  to {
    transform: rotate(360deg);
  }
}

.organizer-item-row.is-reminder .organizer-item-status {
  color: #a66c22;
  background: rgba(198, 144, 44, 0.14);
}

.organizer-item-row.is-urgent .organizer-item-status {
  color: var(--danger);
  background: rgba(203, 100, 100, 0.14);
}

.camera-frame-shell {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 32%),
    #091114;
  box-shadow: 0 28px 70px rgba(34, 58, 65, 0.18);
}

.camera-frame-shell[hidden] {
  display: none;
}

.camera-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  border: 0;
  background: #091114;
}

.camera-glass-card {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 2px;
  max-width: min(390px, calc(100% - 36px));
  padding: 12px 14px;
  color: #173136;
  pointer-events: none;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 20px;
  backdrop-filter: blur(18px);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.16);
}

.camera-live-dot {
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(79, 156, 101, 0.16);
}

.camera-glass-card strong {
  font-size: 0.88rem;
}

.camera-glass-card p {
  grid-column: 2;
  margin: 0;
  color: rgba(35, 49, 61, 0.68);
  font-size: 0.78rem;
  line-height: 1.35;
}

.camera-recordings-panel {
  display: grid;
  gap: 16px;
  min-height: 520px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.80);
  border: 1px solid rgba(96, 119, 136, 0.14);
  border-radius: 26px;
  box-shadow: 0 24px 58px rgba(34, 58, 65, 0.13);
  backdrop-filter: blur(18px);
}

.camera-recordings-panel[hidden] {
  display: none;
}

.camera-recordings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.28fr);
  gap: 14px;
  min-height: 330px;
}

.camera-recordings-player {
  display: grid;
  align-content: center;
  gap: 14px;
  place-items: center;
  min-height: 330px;
  padding: 22px;
  color: rgba(225, 239, 242, 0.92);
  text-align: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.07), transparent 34%),
    #091114;
  border-radius: 22px;
  overflow: hidden;
}

.camera-recordings-panel.has-recording-clip .camera-recordings-player {
  place-items: stretch;
  text-align: left;
}

.camera-recordings-video {
  width: 100%;
  max-height: 280px;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #020506;
  border-radius: 14px;
}

.camera-recordings-video[hidden] {
  display: none;
}

.camera-recordings-playback-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  color: rgba(225, 239, 242, 0.72);
}

.camera-recordings-playback-controls[hidden] {
  display: none;
}

.camera-recordings-playback-button {
  min-height: 34px;
  padding: 0 11px;
  color: rgba(235, 246, 248, 0.92);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 840;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(225, 239, 242, 0.18);
  border-radius: 12px;
  cursor: pointer;
}

.camera-recordings-playback-button:disabled {
  cursor: default;
  opacity: 0.52;
}

.camera-recordings-playback-controls span {
  min-width: 0;
  overflow: hidden;
  color: rgba(225, 239, 242, 0.68);
  font-size: 0.76rem;
  font-weight: 760;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.camera-recordings-player-copy {
  display: grid;
  gap: 8px;
  max-width: 440px;
}

.camera-recordings-player strong {
  font-size: 1.05rem;
}

.camera-recordings-player span {
  color: rgba(225, 239, 242, 0.68);
  font-size: 0.84rem;
  line-height: 1.45;
}

.camera-recordings-side {
  display: grid;
  align-content: start;
  gap: 10px;
}

.camera-recordings-field {
  display: grid;
  gap: 6px;
}

.camera-recordings-field span,
.camera-recordings-legend {
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 820;
}

.camera-recordings-field input,
.camera-recordings-field select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  border: 1px solid rgba(96, 119, 136, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
}

.camera-recordings-control-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.camera-recordings-control {
  min-height: 34px;
  padding: 0 9px;
  color: var(--muted-strong);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 820;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(96, 119, 136, 0.14);
  border-radius: 12px;
  cursor: pointer;
}

.camera-recordings-control.active {
  color: #153a42;
  background: rgba(63, 159, 168, 0.17);
  border-color: rgba(63, 159, 168, 0.34);
}

.camera-recordings-cursor {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  color: rgba(28, 48, 55, 0.72);
  font-size: 0.75rem;
  font-weight: 820;
  background: rgba(232, 241, 243, 0.82);
  border-radius: 999px;
}

.camera-recordings-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.camera-recordings-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.camera-recordings-legend i {
  width: 18px;
  height: 6px;
  border-radius: 999px;
}

.camera-recordings-legend .is-normal {
  background: rgba(63, 159, 168, 0.46);
}

.camera-recordings-legend .is-motion {
  background: rgba(226, 130, 86, 0.72);
}

.camera-recordings-legend .is-event {
  width: 7px;
  height: 7px;
  background: rgba(200, 62, 54, 0.88);
}

.camera-recordings-timeline {
  display: grid;
  gap: 10px;
}

.camera-recordings-track {
  position: relative;
  height: 64px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(63, 159, 168, 0.10), rgba(63, 159, 168, 0.18)),
    rgba(232, 241, 243, 0.72);
  border: 1px solid rgba(96, 119, 136, 0.13);
  border-radius: 16px;
}

.camera-recordings-tick {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  color: rgba(54, 76, 83, 0.58);
  font-size: 0.62rem;
  font-weight: 760;
  background: rgba(96, 119, 136, 0.15);
  transform: translateX(-1px);
}

.camera-recordings-event-marker {
  position: absolute;
  top: 16px;
  width: 12px;
  height: 32px;
  padding: 0;
  background: rgba(200, 62, 54, 0.88);
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  transform: translateX(-50%);
  cursor: pointer;
}

.camera-recordings-segment {
  position: absolute;
  top: 24px;
  height: 16px;
  min-width: 4px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
}

.camera-recordings-segment-normal {
  background: rgba(63, 159, 168, 0.48);
}

.camera-recordings-segment-motion {
  background: rgba(226, 130, 86, 0.78);
}

.camera-recordings-event-window {
  position: absolute;
  top: 46px;
  min-width: 8px;
  height: 9px;
  background: rgba(226, 130, 86, 0.72);
  border-radius: 999px;
  transform: translateY(-50%);
}

.camera-recordings-cursor-line {
  position: absolute;
  top: 8px;
  bottom: 8px;
  min-width: 42px;
  padding-left: 7px;
  color: rgba(9, 17, 20, 0.72);
  font-size: 0.62rem;
  font-weight: 860;
  border-left: 2px solid rgba(51, 144, 236, 0.86);
  transform: translateX(-1px);
}

.camera-recordings-empty {
  color: var(--muted-strong);
  font-size: 0.8rem;
  line-height: 1.4;
}

.camera-admin-panel {
  display: grid;
  align-self: start;
  gap: 16px;
  min-height: 520px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.80);
  border: 1px solid rgba(96, 119, 136, 0.14);
  border-radius: 26px;
  box-shadow: 0 24px 58px rgba(34, 58, 65, 0.13);
  backdrop-filter: blur(18px);
}

.camera-admin-panel[hidden] {
  display: none;
}

.camera-admin-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
  align-items: end;
  gap: 10px;
}

.camera-admin-target {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  overflow: hidden;
  color: rgba(28, 48, 55, 0.76);
  font-size: 0.78rem;
  font-weight: 820;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(232, 241, 243, 0.78);
  border-radius: 12px;
}

.camera-admin-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.camera-admin-card,
.camera-admin-device {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  color: inherit;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(96, 119, 136, 0.12);
  border-radius: 18px;
}

.camera-admin-card:hover {
  border-color: rgba(45, 125, 145, 0.28);
  box-shadow: 0 16px 34px rgba(34, 58, 65, 0.10);
}

.camera-admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.camera-admin-card-head strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.camera-admin-badge,
.camera-admin-status,
.camera-admin-missing-url {
  flex: 0 0 auto;
  max-width: 140px;
  padding: 4px 7px;
  overflow: hidden;
  color: rgba(44, 70, 77, 0.78);
  font-size: 0.66rem;
  font-weight: 860;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(231, 240, 242, 0.82);
  border-radius: 999px;
}

.camera-admin-card-copy,
.camera-admin-card-url,
.camera-admin-meta {
  overflow: hidden;
  color: var(--muted-strong);
  font-size: 0.74rem;
  font-weight: 730;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.camera-admin-card-url {
  color: rgba(26, 95, 112, 0.88);
}

.camera-admin-controls {
  display: grid;
  gap: 7px;
  padding-top: 4px;
}

.camera-admin-control {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(78px, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 6px 8px;
  background: rgba(232, 241, 243, 0.54);
  border-radius: 12px;
}

.camera-admin-control span,
.camera-admin-control strong {
  min-width: 0;
  overflow: hidden;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.camera-admin-control span {
  color: var(--muted-strong);
  font-weight: 780;
}

.camera-admin-control strong {
  color: var(--ink);
  font-weight: 840;
  text-align: right;
}

.camera-admin-control input[type="checkbox"] {
  justify-self: end;
  width: 34px;
  height: 18px;
  accent-color: #2f808a;
}

.camera-admin-control input[type="range"] {
  width: 100%;
  accent-color: #2f808a;
}

.camera-admin-device-list {
  display: grid;
  gap: 9px;
}

.camera-admin-devices-title {
  color: rgba(54, 76, 83, 0.78);
  font-size: 0.72rem;
  font-weight: 880;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.camera-admin-device-meta {
  display: grid;
  gap: 4px;
}

.camera-admin-device-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.camera-admin-status-online {
  color: rgba(42, 108, 69, 0.94);
  background: rgba(213, 244, 224, 0.86);
}

.camera-admin-status-offline {
  color: rgba(132, 42, 34, 0.94);
  background: rgba(255, 222, 214, 0.86);
}

.camera-events-panel {
  display: grid;
  align-self: start;
  gap: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(96, 119, 136, 0.14);
  border-radius: 26px;
  box-shadow: 0 22px 48px rgba(34, 58, 65, 0.12);
  backdrop-filter: blur(18px);
}

.camera-events-panel[hidden] {
  display: none;
}

.camera-events-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.camera-events-refresh {
  position: relative;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(96, 119, 136, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.66);
  color: rgba(30, 54, 61, 0.72);
  cursor: pointer;
}

.camera-events-refresh::before {
  content: "↻";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

.camera-events-refresh:hover {
  border-color: rgba(45, 125, 145, 0.32);
  color: rgba(26, 95, 112, 0.95);
}

.camera-events-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  background: rgba(232, 241, 243, 0.68);
  border: 1px solid rgba(96, 119, 136, 0.12);
  border-radius: 16px;
}

.camera-events-filter {
  min-width: 0;
  min-height: 30px;
  padding: 6px 7px;
  overflow: hidden;
  color: rgba(54, 76, 83, 0.74);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: transparent;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}

.camera-events-filter.active {
  color: rgba(24, 72, 86, 0.96);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 18px rgba(34, 58, 65, 0.10);
}

.camera-events-list {
  display: grid;
  gap: 9px;
  max-height: min(58vh, 640px);
  overflow: auto;
  padding-right: 2px;
}

.camera-events-more {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  color: rgba(26, 95, 112, 0.95);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 850;
  line-height: 1;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(96, 119, 136, 0.14);
  border-radius: 14px;
  cursor: pointer;
}

.camera-events-more:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(45, 125, 145, 0.26);
}

.camera-event-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px 11px;
  color: inherit;
  text-align: left;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(96, 119, 136, 0.12);
  border-radius: 18px;
  cursor: pointer;
}

.camera-event-row:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 28px rgba(34, 58, 65, 0.1);
}

.camera-event-row:disabled {
  cursor: default;
  opacity: 0.72;
}

.camera-event-icon {
  position: relative;
  width: 32px;
  height: 32px;
  border-radius: 13px;
  background: rgba(63, 159, 168, 0.13);
}

.camera-event-icon::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 10px;
  width: 13px;
  height: 10px;
  border: 2px solid #2f808a;
  border-radius: 4px;
}

.camera-event-icon::after {
  content: "";
  position: absolute;
  right: 7px;
  top: 12px;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid #2f808a;
}

.camera-event-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.camera-event-copy strong,
.camera-event-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.camera-event-copy strong {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 830;
}

.camera-event-copy span,
.camera-event-meta {
  color: var(--muted-strong);
  font-size: 0.72rem;
  font-weight: 740;
}

.camera-event-copy .camera-event-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 1px;
  overflow: visible;
  white-space: normal;
}

.camera-event-copy .camera-event-badge {
  max-width: 100%;
  padding: 3px 6px;
  overflow: hidden;
  color: rgba(44, 70, 77, 0.78);
  font-size: 0.64rem;
  font-weight: 860;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(231, 240, 242, 0.78);
  border: 1px solid rgba(96, 119, 136, 0.10);
  border-radius: 999px;
}

.camera-event-copy .camera-event-badge-person {
  color: rgba(122, 72, 18, 0.94);
  background: rgba(255, 231, 184, 0.80);
}

.camera-event-copy .camera-event-badge-motion,
.camera-event-copy .camera-event-badge-pending {
  color: rgba(132, 42, 34, 0.94);
  background: rgba(255, 222, 214, 0.82);
}

.camera-event-copy .camera-event-badge-resolved {
  color: rgba(42, 108, 69, 0.94);
  background: rgba(213, 244, 224, 0.82);
}

.camera-event-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
}

.camera-event-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 32, 41, 0.38);
  backdrop-filter: blur(8px);
}

.camera-event-card {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  width: min(520px, 100%);
  max-height: min(760px, calc(100dvh - 44px));
  overflow: auto;
  padding: 20px;
  color: var(--ink);
  background: rgba(250, 252, 252, 0.96);
  border: 1px solid rgba(96, 119, 136, 0.18);
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(20, 32, 41, 0.28);
}

.camera-event-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: var(--muted-strong);
  background: rgba(227, 236, 244, 0.88);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.camera-event-close:hover {
  color: var(--ink);
  background: rgba(214, 228, 237, 0.95);
}

.camera-event-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding-right: 36px;
}

.camera-event-card-head h3 {
  margin: 3px 0 0;
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.camera-event-preview {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(96, 119, 136, 0.14);
  background: #10191c;
}

.camera-event-preview a,
.camera-event-preview img {
  display: block;
  width: 100%;
}

.camera-event-preview img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.camera-event-body {
  margin: 0;
  color: rgba(35, 49, 61, 0.78);
  font-size: 0.94rem;
  line-height: 1.48;
}

.camera-event-details {
  display: grid;
  grid-template-columns: minmax(90px, auto) minmax(0, 1fr);
  gap: 8px 12px;
  margin: 0;
  padding: 12px;
  background: rgba(235, 241, 245, 0.7);
  border-radius: 18px;
}

.camera-event-details dt,
.camera-event-details dd {
  margin: 0;
  font-size: 0.8rem;
}

.camera-event-details dt {
  color: var(--muted);
  font-weight: 780;
}

.camera-event-details dd {
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.camera-event-attachments {
  display: grid;
  gap: 8px;
}

.camera-event-attachments-title {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 780;
}

.camera-event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.primary-action,
.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 820;
  text-decoration: none;
}

.primary-action {
  border: 0;
  color: white;
  background: linear-gradient(135deg, #2f808a, #3390ec);
  box-shadow: 0 16px 30px rgba(47, 128, 138, 0.2);
  cursor: pointer;
}

.primary-action:hover {
  transform: translateY(-1px);
}

.primary-action:disabled {
  cursor: not-allowed;
  opacity: 0.58;
  transform: none;
}

.ghost-link {
  color: #2f808a;
  font: inherit;
  background: rgba(63, 159, 168, 0.12);
  border: 0;
  cursor: pointer;
}

.ghost-link:hover {
  background: rgba(63, 159, 168, 0.18);
}

.ghost-link:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}

.primary-action:focus-visible,
.ghost-link:focus-visible,
.camera-event-close:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(51, 144, 236, 0.16);
}

.chat-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px;
  background: rgba(251, 252, 253, 0.92);
  border-radius: 0;
  border-left: 0;
  border-top: 0;
  border-right: 0;
  backdrop-filter: blur(14px);
  box-shadow: none;
}

.chat-peer {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.chat-peer-copy {
  min-width: 0;
}

.chat-peer-copy h2 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.chat-subtitle {
  margin: 2px 0 0;
  font-size: 0.76rem;
  line-height: 1.2;
}

.chat-toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.status-pill,
.realtime-pill {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-height: 20px;
  padding: 0 8px;
  font-size: 0.62rem;
}

.status-pill {
  background: #eef2f5;
  color: var(--muted);
}

.status-pill.online {
  background: rgba(75, 158, 95, 0.14);
  color: var(--success);
}

.status-pill.pending {
  background: rgba(199, 140, 37, 0.14);
  color: var(--warning);
}

.status-pill.error {
  background: rgba(210, 92, 92, 0.14);
  color: var(--danger);
}

.realtime-pill {
  background: rgba(51, 144, 236, 0.12);
  color: var(--accent-strong);
}

.realtime-pill.live {
  background: rgba(75, 158, 95, 0.14);
  color: var(--success);
}

.realtime-pill.sync {
  background: rgba(199, 140, 37, 0.14);
  color: var(--warning);
}

.realtime-pill.offline {
  background: rgba(210, 92, 92, 0.14);
  color: var(--danger);
}

.toolbar-chip {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(103, 122, 141, 0.14);
  color: var(--muted-strong);
  font-size: 0.8rem;
  padding: 7px 11px;
  white-space: nowrap;
}

.chat-canvas {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.12), transparent 10%),
    radial-gradient(circle at 82% 28%, rgba(255, 255, 255, 0.08), transparent 8%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%) 0 0 / 32px 32px,
    linear-gradient(225deg, rgba(255, 255, 255, 0.05) 25%, transparent 25%) 0 0 / 32px 32px,
    linear-gradient(180deg, #dde7f0, #d2dfea);
  background-size: auto, auto, 32px 32px, 32px 32px, auto;
}

.chat-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image:
    linear-gradient(125deg, transparent 0 42%, rgba(255, 255, 255, 0.45) 42% 45%, transparent 45% 100%),
    linear-gradient(55deg, transparent 0 47%, rgba(255, 255, 255, 0.35) 47% 49%, transparent 49% 100%);
  background-size: 260px 260px, 320px 320px;
}

.messages-list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  overflow-anchor: none;
  padding: 14px 24px 18px;
}

.messages-list::-webkit-scrollbar {
  width: 10px;
}

.messages-list::-webkit-scrollbar-thumb {
  background: rgba(103, 122, 141, 0.22);
  border-radius: 999px;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 30px 16px;
}

.empty-card {
  width: min(280px, 100%);
  padding: 18px 16px;
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

.empty-card h3 {
  font-size: 1.02rem;
}

.empty-avatar {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  background: linear-gradient(160deg, #54a6f5, #2e7bc5);
}

.empty-card p {
  margin: 10px 0 0;
  line-height: 1.5;
  color: var(--muted-strong);
}

.date-divider {
  display: flex;
  justify-content: center;
  margin: 8px 0 6px;
}

.date-chip {
  background: rgba(227, 236, 244, 0.96);
  color: #607384;
  box-shadow: 0 4px 12px rgba(58, 82, 106, 0.08);
  min-height: 22px;
  padding: 0 9px;
  font-size: 0.67rem;
}

.message-row {
  display: flex;
  align-items: flex-end;
  gap: 0;
  margin-top: 1px;
}

.message-row.group-single,
.message-row.group-start {
  margin-top: 6px;
}

.message-row.human,
.message-row.pending,
.message-row.failed {
  justify-content: flex-end;
}

.message-row.assistant,
.message-row.system {
  justify-content: flex-start;
}

.message-row-highlight .message-bubble {
  box-shadow: 0 0 0 3px rgba(47, 128, 138, 0.22), 0 16px 34px rgba(47, 128, 138, 0.16);
}

.message-bubble {
  position: relative;
  max-width: min(62%, 650px);
  padding: 6px 10px 4px;
  border-radius: 16px;
  box-shadow: 0 1px 1px rgba(58, 82, 106, 0.08);
}

.message-row.assistant .message-bubble,
.message-row.system .message-bubble {
  border: 1px solid rgba(103, 122, 141, 0.08);
}

.message-row.assistant .message-bubble {
  max-width: min(72%, 720px);
  padding: 9px 12px 5px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(246, 251, 250, 0.96));
  border-color: rgba(55, 111, 112, 0.14);
  box-shadow: 0 10px 26px rgba(58, 82, 106, 0.08);
}

.message-row.system .message-bubble {
  background: var(--system);
}

.message-row.human .message-bubble {
  background: var(--outgoing);
}

.message-row.pending .message-bubble {
  background: var(--pending);
}

.message-row.failed .message-bubble {
  background: var(--failed);
}

.message-row.assistant.group-single .message-bubble,
.message-row.assistant.group-start .message-bubble,
.message-row.system.group-single .message-bubble,
.message-row.system.group-start .message-bubble {
  border-top-left-radius: 16px;
  border-bottom-left-radius: 5px;
}

.message-row.assistant.group-middle .message-bubble,
.message-row.assistant.group-end .message-bubble,
.message-row.system.group-middle .message-bubble,
.message-row.system.group-end .message-bubble {
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
}

.message-row.human.group-single .message-bubble,
.message-row.human.group-start .message-bubble,
.message-row.pending.group-single .message-bubble,
.message-row.pending.group-start .message-bubble,
.message-row.failed.group-single .message-bubble,
.message-row.failed.group-start .message-bubble {
  border-top-right-radius: 16px;
  border-bottom-right-radius: 5px;
}

.message-row.human.group-middle .message-bubble,
.message-row.human.group-end .message-bubble,
.message-row.pending.group-middle .message-bubble,
.message-row.pending.group-end .message-bubble,
.message-row.failed.group-middle .message-bubble,
.message-row.failed.group-end .message-bubble {
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
}

.message-row.assistant.group-single .message-bubble::after,
.message-row.assistant.group-end .message-bubble::after,
.message-row.system.group-single .message-bubble::after,
.message-row.system.group-end .message-bubble::after {
  content: "";
  position: absolute;
  left: -3px;
  bottom: 5px;
  width: 8px;
  height: 12px;
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}

.message-row.assistant.group-single .message-bubble::after,
.message-row.assistant.group-end .message-bubble::after {
  background: rgba(255, 255, 255, 0.98);
}

.message-row.system.group-single .message-bubble::after,
.message-row.system.group-end .message-bubble::after {
  background: var(--system);
}

.message-row.human.group-single .message-bubble::after,
.message-row.human.group-end .message-bubble::after,
.message-row.pending.group-single .message-bubble::after,
.message-row.pending.group-end .message-bubble::after,
.message-row.failed.group-single .message-bubble::after,
.message-row.failed.group-end .message-bubble::after {
  content: "";
  position: absolute;
  right: -3px;
  bottom: 5px;
  width: 8px;
  height: 12px;
  clip-path: polygon(0 0, 100% 100%, 0 100%);
}

.message-row.human.group-single .message-bubble::after,
.message-row.human.group-end .message-bubble::after {
  background: var(--outgoing);
}

.message-row.pending.group-single .message-bubble::after,
.message-row.pending.group-end .message-bubble::after {
  background: var(--pending);
}

.message-row.failed.group-single .message-bubble::after,
.message-row.failed.group-end .message-bubble::after {
  background: var(--failed);
}

.message-text {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.38;
  white-space: pre-wrap;
  word-break: break-word;
}

.message-text-rich {
  display: grid;
  gap: 9px;
  white-space: normal;
  color: rgba(30, 47, 54, 0.96);
  font-size: 0.97rem;
  line-height: 1.52;
  letter-spacing: -0.006em;
}

.message-text-rich p {
  margin: 0;
}

.message-text-rich p:first-child {
  font-size: 1rem;
}

.message-text-rich strong {
  color: rgba(21, 72, 76, 0.98);
  font-weight: 760;
}

.message-text-rich code {
  padding: 0.08rem 0.34rem 0.12rem;
  border: 1px solid rgba(55, 111, 112, 0.13);
  border-radius: 7px;
  background: rgba(231, 244, 243, 0.82);
  color: rgba(24, 75, 81, 0.98);
  font-family: "SFMono-Regular", "Cascadia Mono", "Fira Code", monospace;
  font-size: 0.86em;
}

.message-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0 0 0 1.05rem;
}

.message-list li {
  padding-left: 0.1rem;
}

.message-list li::marker {
  color: rgba(47, 128, 138, 0.82);
}

.message-attachments {
  display: grid;
  gap: 8px;
}

.message-attachments + .message-text {
  margin-top: 8px;
}

.attachment-card {
  margin: 0;
}

.attachment-image {
  display: grid;
  gap: 6px;
}

.attachment-image-link {
  display: block;
  width: min(100%, 420px);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(214, 225, 235, 0.52);
  box-shadow: inset 0 0 0 1px rgba(73, 96, 118, 0.08);
}

.attachment-image-media {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attachment-caption {
  font-size: 0.76rem;
  color: rgba(85, 104, 123, 0.88);
}

.attachment-file {
  min-width: 220px;
}

.attachment-file-link,
.attachment-fallback {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(248, 251, 253, 0.84);
  box-shadow: inset 0 0 0 1px rgba(73, 96, 118, 0.08);
}

.attachment-file-link {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
}

.attachment-file-link:hover {
  text-decoration: underline;
}

.attachment-fallback-title {
  font-size: 0.84rem;
}

.attachment-fallback-body {
  font-size: 0.76rem;
  color: rgba(85, 104, 123, 0.82);
}

.typing-bubble {
  display: grid;
  gap: 8px;
  min-width: 112px;
}

.typing-label {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted-strong);
  letter-spacing: 0.01em;
}

.typing-dots {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.typing-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(85, 104, 123, 0.56);
  transform: translateY(0) scale(0.84);
  opacity: 0.32;
  animation: typing-bounce 1.05s cubic-bezier(0.42, 0, 0.22, 1) infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.14s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.28s;
}

.message-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  margin-top: 3px;
  font-size: 0.68rem;
  color: rgba(85, 104, 123, 0.78);
}

.message-sender {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 700;
}

.message-checks {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.08em;
}

.message-checks.delivered {
  color: var(--accent-strong);
}

.message-checks.pending {
  color: var(--warning);
}

.message-checks.failed {
  color: var(--danger);
}

.composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 8px 12px 10px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
}

.composer.read-only {
  background: rgba(246, 249, 251, 0.96);
}

.composer.read-only .composer-circle,
.composer.read-only .send-button {
  opacity: 0.46;
}

.composer.read-only .composer-field textarea {
  color: var(--muted-strong);
  background: rgba(244, 248, 250, 0.96);
}

.composer-circle,
.send-button {
  position: relative;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.composer-circle {
  background: #f1f5f8;
}

.attach-button::before {
  width: 14px;
  height: 14px;
  margin: 0 auto;
  border: 2px solid var(--muted-strong);
  border-radius: 5px;
  transform: rotate(-14deg);
}

.composer-field {
  flex: 1;
  min-width: 0;
}

.composer-field textarea {
  min-height: 38px;
  max-height: 220px;
  padding: 8px 13px;
  resize: none;
  border: 1px solid rgba(103, 122, 141, 0.14);
  border-radius: 19px;
  background: #ffffff;
}

.send-button {
  background: linear-gradient(180deg, #47a0f3, #2d84d7);
  box-shadow: 0 10px 22px rgba(45, 132, 215, 0.24);
}

.send-button::before {
  width: 0;
  height: 0;
  margin: 0 auto;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 13px solid #ffffff;
  transform: translateX(2px);
}

.status-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0 14px 10px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.status-strip p {
  margin: 0;
  font-size: 0.72rem;
  color: rgba(85, 104, 123, 0.82);
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #b7c4d0;
  box-shadow: 0 0 0 3px rgba(113, 133, 154, 0.12);
}

.status-dot.live,
.status-dot.online {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(75, 158, 95, 0.12);
}

.status-dot.sync,
.status-dot.pending {
  background: var(--warning);
  box-shadow: 0 0 0 4px rgba(199, 140, 37, 0.12);
}

.status-dot.error {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(210, 92, 92, 0.12);
}

@keyframes typing-bounce {
  0%,
  70%,
  100% {
    transform: translateY(0) scale(0.84);
    opacity: 0.28;
  }

  35% {
    transform: translateY(-3px) scale(1);
    opacity: 1;
  }
}

@media (max-width: 1080px) {
  .auth-card {
    width: min(100%, 420px);
  }

  .auth-brand {
    min-height: auto;
  }

  .telegram-shell {
    --sidebar-width: clamp(260px, 34vw, 300px);
    grid-template-columns: 70px var(--sidebar-width) 8px minmax(0, 1fr);
  }

  .telegram-shell.dashboard-mode,
  .telegram-shell.camera-mode,
  .telegram-shell.home-mode,
  .telegram-shell.organizer-mode,
  .telegram-shell.settings-mode {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .organizer-task-sheet {
    width: min(1240px, 100%);
  }

  .message-bubble {
    max-width: 72%;
  }
}

@media (max-width: 860px) {
  body.auth-mode {
    padding: 12px;
  }

  .auth-card {
    width: min(100%, 420px);
  }

  .telegram-shell {
    height: 100dvh;
    max-height: none;
    min-height: 100dvh;
    border-radius: 0;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, auto) minmax(0, 1fr);
  }

  .sidebar-resize-handle {
    display: none;
  }

  .telegram-shell.dashboard-mode,
  .telegram-shell.camera-mode,
  .telegram-shell.home-mode,
  .telegram-shell.organizer-mode,
  .telegram-shell.settings-mode {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .nav-rail {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    grid-template-rows: auto;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
  }

  .rail-top,
  .rail-bottom {
    display: contents;
  }

  .rail-brand-mark {
    margin: 0;
    width: 38px;
    height: 38px;
    border-radius: 14px;
  }

  .sidebar {
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    max-height: min(42dvh, 360px);
    overflow: auto;
    padding-bottom: 10px;
  }

  .telegram-shell.tool-mode .sidebar {
    display: none;
  }

  .camera-toolbar,
  .home-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .camera-actions,
  .home-actions {
    width: 100%;
    justify-content: space-between;
  }

  .camera-mode-tabs {
    order: 2;
    width: 100%;
  }

  .camera-mode-tab {
    flex: 1;
  }

  .camera-canvas,
  .dashboard-canvas,
  .home-canvas {
    padding: 10px;
  }

  .dashboard-grid,
  .camera-grid,
  .home-grid,
  .organizer-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .organizer-shell[data-organizer-entity-mode="notes"] .organizer-grid {
    grid-template-columns: 1fr;
  }

  .organizer-shell[data-organizer-entity-mode="tasks"] .organizer-list-panel,
  .organizer-shell[data-organizer-entity-mode="tasks"] .organizer-detail-panel,
  .organizer-shell[data-organizer-entity-mode="reminders"] .organizer-list-panel,
  .organizer-shell[data-organizer-entity-mode="reminders"] .organizer-detail-panel,
  .organizer-shell[data-organizer-entity-mode="notes"] .organizer-list-panel,
  .organizer-shell[data-organizer-entity-mode="notes"] .organizer-detail-panel,
  .organizer-shell[data-organizer-entity-mode="incidents"] .organizer-list-panel,
  .organizer-shell[data-organizer-entity-mode="incidents"] .organizer-detail-panel {
    grid-column: auto;
  }

  .organizer-detail-panel {
    position: static;
  }

  .organizer-task-workspace {
    grid-template-columns: 1fr;
  }

  .organizer-task-layout,
  .organizer-task-layout--projects {
    grid-template-columns: 1fr;
  }

  .organizer-task-tree-toolbar,
  .organizer-task-tree-project-head,
  .organizer-task-tree-task-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .organizer-task-tree-chevron {
    justify-self: start;
  }

  .organizer-task-tree-project-metrics,
  .organizer-task-tree-badges,
  .organizer-task-tree-controls {
    justify-content: flex-start;
  }

  .organizer-note-workspace-editor {
    grid-template-columns: 1fr;
  }

  .organizer-project-nav,
  .organizer-task-context-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .organizer-project-nav-head,
  .organizer-task-context-head {
    grid-column: 1 / -1;
  }

  .dashboard-weather-card {
    grid-template-columns: 1fr;
  }

  .dashboard-weather-details {
    grid-template-columns: 1fr;
  }

  .organizer-workflow-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-overview-panel,
  .home-actions-panel,
  .home-panel:nth-of-type(2) {
    grid-column: auto;
    grid-row: auto;
  }

  .camera-frame-shell {
    min-height: 420px;
    border-radius: 22px;
  }

  .camera-admin-grid {
    grid-template-columns: 1fr;
  }

  .camera-admin-toolbar {
    grid-template-columns: 1fr;
  }

  .camera-recordings-layout {
    grid-template-columns: 1fr;
  }

  .camera-event-card {
    max-height: calc(100dvh - 28px);
  }

  .chat-list-panel {
    max-height: none;
  }
}

@media (max-width: 640px) {
  .auth-card {
    gap: 16px;
  }

  .auth-panel {
    padding: 20px;
  }

  .auth-brand {
    padding-left: 8px;
    padding-right: 8px;
  }

  .sidebar,
  .chat-toolbar {
    padding-left: 12px;
    padding-right: 12px;
  }

  .chat-toolbar-actions {
    gap: 8px;
  }

  .messages-list {
    padding: 14px 12px 18px;
  }

  .home-metrics-grid,
  .organizer-workflow-tabs,
  .settings-connection-grid,
  .settings-link-grid,
  .home-actions-grid {
    grid-template-columns: 1fr;
  }

  .home-device-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .camera-event-sheet {
    align-items: end;
    padding: 10px;
  }

  .camera-event-card {
    width: 100%;
    max-height: calc(100dvh - 20px);
    border-radius: 24px;
    padding: 18px;
  }

  .camera-event-card-head,
  .camera-event-details {
    grid-template-columns: 1fr;
  }

  .camera-event-details dd {
    white-space: normal;
  }

  .home-device-side {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-items: start;
  }

  .settings-session-row,
  .settings-audit-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .settings-session-side {
    grid-column: 2;
    justify-content: start;
  }

  .settings-audit-side {
    grid-column: 2;
    grid-template-columns: auto auto;
    justify-content: start;
    justify-items: start;
  }

  .organizer-list-tools {
    grid-template-columns: 1fr;
  }

  .organizer-task-mode-bar,
  .organizer-project-nav,
  .organizer-task-context-rail,
  .organizer-task-workflow-strip,
  .organizer-task-summary-strip {
    grid-template-columns: 1fr;
  }

  .organizer-task-surface-head {
    grid-template-columns: 1fr;
  }

  .organizer-task-table-toolbar {
    grid-template-columns: 1fr;
  }

  .organizer-task-table-controls {
    justify-content: start;
  }

  .organizer-task-project-select {
    width: min(100%, 220px);
  }

  .organizer-task-sheet-backdrop {
    padding: 10px;
  }

  .organizer-task-sheet {
    width: 100%;
    max-height: calc(100dvh - 20px);
  }

  .organizer-task-sheet-body {
    grid-template-columns: 1fr;
  }

  .organizer-task-surface-metrics {
    justify-content: stretch;
  }

  .organizer-task-surface-metric {
    min-width: 0;
  }

  .organizer-task-board {
    grid-template-columns: repeat(5, minmax(156px, 1fr));
  }

  .organizer-search-clear {
    min-height: 38px;
  }

  .organizer-item-row {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
  }

  .organizer-item-side {
    grid-column: 1 / -1;
    grid-template-columns: auto minmax(0, 1fr);
    justify-items: start;
    align-items: center;
    width: 100%;
  }

  .organizer-item-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .organizer-create-form,
  .organizer-reminder-form {
    grid-template-columns: 1fr;
  }

  .organizer-reminder-time,
  .organizer-task-deadline {
    width: 100%;
  }

  .organizer-reschedule-editor,
  .organizer-edit-editor {
    grid-template-columns: 1fr;
  }

  .organizer-task-editor {
    grid-template-columns: 1fr;
  }

  .composer,
  .status-strip {
    padding-left: 12px;
    padding-right: 12px;
  }

  .message-bubble {
    max-width: 82%;
  }

  .toolbar-chip {
    padding: 9px 12px;
    font-size: 0.85rem;
  }

  .sidebar {
    max-height: min(46dvh, 420px);
  }

  .chat-toolbar-actions {
    justify-content: flex-start;
  }
}
