:root {
  --bg: #f0f2f5;
  --surface: #ffffff;
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --text: #1f1f1f;
  --muted: #5f6368;
  --border: #dadce0;
  --mine: #d3e3fd;
  --theirs: #ffffff;
  --danger: #d93025;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  height: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

body {
  overscroll-behavior: none;
}

.hidden {
  display: none !important;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: var(--surface);
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.08);
}

.top-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(10px + var(--safe-top)) 12px 10px;
  background: var(--primary);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.top-bar h1 {
  flex: 1;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-btn {
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.icon-svg {
  display: block;
  pointer-events: none;
}

.icon-btn:active {
  background: rgba(255, 255, 255, 0.35);
}

#main {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.panel {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.auth-tabs {
  display: flex;
  margin: 16px;
  background: var(--bg);
  border-radius: 10px;
  padding: 4px;
}

.tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px;
  border-radius: 8px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.auth-form {
  padding: 16px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  margin: 12px 16px 0;
  background: var(--bg);
  border-radius: 10px;
  padding: 4px;
  flex-shrink: 0;
}

.admin-panel {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 16px 16px;
}

.admin-logs-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.admin-logs-filters label {
  flex: 1 1 140px;
  min-width: 120px;
}

.admin-logs-purge {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 8px;
}

.admin-log-list .admin-log-row {
  align-items: flex-start;
}

.admin-log-user,
.admin-log-body,
.admin-log-readers {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.admin-log-body {
  color: var(--text);
  margin-top: 4px;
  white-space: pre-wrap;
  word-break: break-word;
}

.admin-log-readers {
  margin-top: 4px;
}

.admin-log-status {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 2px;
}

.admin-log-status.active {
  color: #137333;
}

.admin-log-status.deleted {
  color: #c5221f;
}

.admin-log-row.is-deleted .admin-log-body {
  opacity: 0.85;
}

.admin-log-user em {
  font-style: normal;
  opacity: 0.85;
}

.admin-form {
  background: var(--bg);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-form h3,
.admin-detail h3,
.admin-assign h4 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.admin-form label,
.admin-inline-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--muted);
}

.admin-form input,
.admin-form select,
.admin-inline-form select {
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
}

.admin-inline-form {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-bottom: 10px;
}

.admin-assign-user-form {
  flex-wrap: wrap;
  align-items: flex-start;
}

.admin-assign-user-form select[multiple] {
  flex: 1 1 100%;
  min-height: 160px;
}

.admin-assign-user-form .admin-field-hint {
  flex: 1 1 100%;
  margin: 0;
}

.admin-assign-user-form .admin-checkbox-inline {
  flex: 1 1 100%;
  order: 3;
}

.admin-assign-user-actions {
  display: flex;
  gap: 8px;
  order: 4;
}

.admin-assign-user-form .btn {
  order: 2;
}

.admin-inline-form select {
  flex: 1;
}

.admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.admin-list.compact .admin-row {
  padding: 10px 0;
}

.admin-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.admin-row-main {
  flex: 1;
  min-width: 0;
}

.admin-row-main strong {
  display: block;
}

.admin-row-main span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.admin-row .btn {
  padding: 8px 10px;
  font-size: 0.85rem;
}

.admin-row-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-form .hint {
  font-weight: normal;
  color: var(--muted);
  font-size: 0.8rem;
}

.btn.danger {
  background: #fce8e6;
  color: #c5221f;
}

.btn.danger:active {
  background: #f5c6c3;
}

.modal-form {
  margin-bottom: 0;
}

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.modal-actions .btn {
  flex: 1;
}

.admin-detail {
  background: var(--bg);
  border-radius: 10px;
  padding: 14px;
  margin-top: 12px;
}

.admin-assign {
  margin-top: 14px;
}

.admin-fieldset {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0;
}

.admin-fieldset legend {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0 4px;
}

.admin-checkbox {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 8px;
}

.admin-checkbox:last-child {
  margin-bottom: 0;
}

.admin-checkbox input {
  width: auto;
  margin-top: 3px;
  flex-shrink: 0;
}

.admin-all-read-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 8px;
}

.admin-checkbox-inline {
  margin-bottom: 0;
}

.admin-all-read-delay {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text);
}

.admin-all-read-delay select {
  width: auto;
  min-width: 4.5rem;
  padding: 4px 8px;
}

.admin-all-read-delay select:disabled {
  opacity: 0.5;
}

.admin-months-row {
  margin-top: 8px;
}

.room-policy-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  background: var(--bg);
  color: var(--muted);
  padding: 2px 5px;
  border-radius: 4px;
  margin-right: 4px;
}

.role-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--primary);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
}

.role-badge.admin {
  background: #137333;
}

.role-badge.supervisor {
  background: #1a73e8;
}

.role-badge.coordinator {
  background: #e37400;
}

.role-badge.member {
  background: #5f6368;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.auth-form input {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
}

.btn.primary:active {
  background: var(--primary-dark);
}

.btn.secondary {
  background: var(--bg);
  color: var(--primary);
}

.error {
  color: var(--danger);
  text-align: center;
  padding: 0 16px;
  font-size: 0.9rem;
}

.rooms-toolbar {
  padding: 12px 16px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ios-banner,
.push-banner {
  margin: 12px 16px 0;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.ios-banner {
  background: #fef7e0;
  border: 1px solid #f9ab00;
  color: #3c4043;
}

.ios-banner strong {
  display: block;
  margin-bottom: 6px;
}

.push-banner {
  background: #e8f0fe;
  border: 1px solid #1a73e8;
  color: #174ea6;
}

.push-banner.warn {
  background: #fce8e6;
  border-color: #d93025;
  color: #a50e0e;
}

.push-banner.ok {
  background: #e6f4ea;
  border-color: #137333;
  color: #137333;
}

.room-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
  width: 100%;
}

.room-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.room-item:active {
  background: var(--bg);
}

.room-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.room-meta {
  flex: 1;
  min-width: 0;
}

.room-meta strong {
  display: block;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.room-meta span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge {
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

#chat-view {
  background: var(--bg);
}

.message-list {
  list-style: none;
  margin: 0;
  padding: 12px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.message {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 0.95rem;
  line-height: 1.4;
  word-wrap: break-word;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.message-body,
.message .sender,
.room-preview {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.message.mine {
  align-self: flex-end;
  background: var(--mine);
  border-bottom-right-radius: 4px;
}

.message.theirs {
  align-self: flex-start;
  background: var(--theirs);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.message .sender {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 4px;
}

.message.all-read {
  background: #c8e6c9 !important;
  border-color: #81c784 !important;
}

.message.mine.all-read {
  background: #c8e6c9 !important;
}

.message.staff-read-blur .message-body,
.message.staff-read-blur .message-image,
.message.staff-read-blur .reply-quote {
  filter: blur(10px);
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}

.message.staff-read-blur .message-image {
  overflow: hidden;
}

.message-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}

.msg-reply-btn {
  margin-right: auto;
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 2px 4px 2px 0;
  cursor: pointer;
  border-radius: 4px;
}

.msg-reply-btn:hover,
.msg-reply-btn:focus {
  text-decoration: underline;
}

.reply-quote {
  display: block;
  width: 100%;
  text-align: left;
  margin: 0 0 8px;
  padding: 6px 8px 6px 10px;
  border: none;
  border-left: 3px solid var(--primary);
  border-radius: 0 8px 8px 0;
  background: rgba(26, 115, 232, 0.1);
  cursor: pointer;
  color: inherit;
}

.message.mine .reply-quote {
  background: rgba(255, 255, 255, 0.45);
}

.reply-quote-name {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
}

.reply-quote-preview {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message.reply-flash {
  box-shadow: 0 0 0 2px var(--primary);
}

.reply-bar {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #eef4fe;
  border-left: 3px solid var(--primary);
}

.reply-bar.hidden {
  display: none;
}

.reply-bar-text {
  flex: 1;
  min-width: 0;
  font-size: 0.8rem;
  line-height: 1.3;
}

.reply-bar-text strong {
  display: block;
  color: var(--primary);
  font-size: 0.75rem;
}

.reply-bar-preview {
  display: block;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reply-bar-cancel {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
  border-radius: 4px;
  flex-shrink: 0;
}

.reply-bar-cancel:hover,
.reply-bar-cancel:focus {
  color: var(--text);
  background: rgba(0, 0, 0, 0.06);
}

.msg-delete-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
  border-radius: 4px;
  flex-shrink: 0;
}

.msg-delete-btn:hover,
.msg-delete-btn:focus {
  color: #c5221f;
  background: rgba(197, 34, 31, 0.08);
}

.read-receipts {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  justify-content: flex-end;
}

.read-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  border-radius: 10px;
  background: rgba(26, 115, 232, 0.15);
  color: var(--primary);
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
}

.message.all-read .read-initial {
  background: rgba(19, 115, 51, 0.2);
  color: #137333;
}

.message .time {
  font-size: 0.7rem;
  color: var(--muted);
  margin-top: 0;
  text-align: right;
  flex-shrink: 0;
}

.message-image {
  display: block;
  max-width: min(240px, 100%);
  max-height: 280px;
  width: auto;
  height: auto;
  border-radius: 10px;
  margin-bottom: 6px;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  pointer-events: none;
}

.app.can-zoom-images .message-image {
  pointer-events: auto;
  cursor: zoom-in;
}

.app.can-zoom-images .message.staff-read-blur .message-image {
  pointer-events: none;
  cursor: default;
}

.image-zoom {
  position: fixed;
  inset: 0;
  z-index: 240;
  background: rgba(10, 12, 16, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  overflow: auto;
  cursor: zoom-out;
}

.image-zoom.hidden {
  display: none !important;
}

.image-zoom img {
  max-width: min(96vw, 1400px);
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  cursor: zoom-in;
  transition: transform 0.15s ease;
}

.image-zoom img.is-zoomed {
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
  transform: none;
  cursor: zoom-out;
}

.image-zoom-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  z-index: 241;
}

.image-zoom-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

body.image-zoom-open {
  overflow: hidden;
}

.composer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px calc(10px + var(--safe-bottom));
  background: var(--surface);
  border-top: 1px solid var(--border);
}

.composer-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.private-msg-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px 12px;
  padding: 0 2px;
}

.private-msg-bar.hidden {
  display: none;
}

.private-msg-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--muted, #64748b);
  white-space: nowrap;
  margin-top: 4px;
}

.private-recipients {
  flex: 1;
  min-width: 140px;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px 8px;
  font-size: 0.875rem;
  background: #fff;
}

.private-recipients:disabled {
  opacity: 0.55;
  background: #f3f4f6;
}

.private-msg-hint {
  flex-basis: 100%;
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted, #94a3b8);
}

.private-badge {
  font-size: 0.75rem;
  font-weight: 600;
  color: #9a3412;
  margin-bottom: 4px;
}

.message.is-private.mine .private-badge {
  color: #fff;
  opacity: 0.9;
}

.composer.composer-readonly {
  opacity: 0.85;
}

.composer.composer-readonly input:disabled {
  cursor: not-allowed;
  background: #f3f4f6;
}

.composer-row input[type="text"],
.composer input[type="text"] {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 12px 16px;
  font-size: 1rem;
}

.send-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  padding: 0;
  flex-shrink: 0;
}

.attach-btn,
.mic-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  padding: 0;
  flex-shrink: 0;
  font-size: 1.25rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  touch-action: manipulation;
}

.attach-btn .attach-icon {
  pointer-events: none;
}

.attach-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  border: 0;
  cursor: pointer;
  font-size: 16px;
}

.attach-btn.busy {
  opacity: 0.55;
  pointer-events: none;
}

.mic-btn.recording {
  background: #c62828;
  color: #fff;
  border-color: #c62828;
  animation: mic-pulse 1.2s ease-in-out infinite;
}

.mic-btn.transcribing {
  opacity: 0.65;
  pointer-events: none;
}

@keyframes mic-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(198, 40, 40, 0.45);
  }
  50% {
    box-shadow: 0 0 0 10px rgba(198, 40, 40, 0);
  }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--safe-bottom));
  transform: translateX(-50%);
  background: #323232;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  z-index: 100;
  max-width: 90%;
}

.photo-status {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.photo-status.hidden {
  display: none !important;
}

.photo-status-card {
  background: #1b1b1b;
  color: #fff;
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  padding: 28px 32px;
  border-radius: 18px;
  max-width: 90%;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 200;
}

.modal-card {
  background: var(--surface);
  border-radius: 14px;
  padding: 20px;
  max-width: 360px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-card h2 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.modal-lead {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

.modal-steps {
  margin: 0 0 14px;
  padding-left: 20px;
  font-size: 0.95rem;
  line-height: 1.55;
}

.modal-steps li {
  margin-bottom: 8px;
}

.modal-note {
  margin: 0 0 16px;
  font-size: 0.85rem;
  color: var(--muted);
}

.modal-close-btn {
  width: 100%;
}

.admin-field-hint {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

body.conference-open {
  overflow: hidden;
}

.conference-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #0b1628;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: calc(10px + var(--safe-top)) 12px calc(12px + var(--safe-bottom));
}

.conference-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.conference-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conference-status {
  font-size: 0.82rem;
  color: #b8c7e6;
  flex-shrink: 0;
}

.conference-videos {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  align-content: start;
  overflow-y: auto;
  min-height: 0;
}

.conf-tile {
  position: relative;
  background: #152238;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  max-height: 42vh;
}

.conf-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}

.conf-tile.local video {
  transform: scaleX(-1);
}

.conf-name {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  font-size: 0.75rem;
}

.conference-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 12px 0;
}

.conf-btn {
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  min-width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
}

.conf-btn.off {
  background: rgba(217, 48, 37, 0.75);
}

.conf-btn.recording {
  background: #d93025;
  animation: conf-pulse 1.2s infinite;
}

.conf-btn.danger {
  border-radius: 999px;
  min-width: 88px;
  font-size: 0.9rem;
  background: #d93025;
}

@keyframes conf-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

.conference-recordings {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 10px;
  max-height: 22vh;
  overflow-y: auto;
}

.conference-recordings h3 {
  margin: 0 0 8px;
  font-size: 0.85rem;
  color: #b8c7e6;
  font-weight: 600;
}

.conference-recordings ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.conference-recordings li {
  margin-bottom: 6px;
  font-size: 0.85rem;
}

.conference-recordings a {
  color: #8ab4ff;
  text-decoration: none;
}

.conference-recordings .muted {
  color: #8a97b0;
}

.conference-invite-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.conference-invite-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.conference-invite-text strong {
  font-size: 0.9rem;
}

.conference-invite-text span {
  font-size: 0.8rem;
  opacity: 0.92;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conference-invite-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.conference-invite-actions .btn {
  padding: 6px 10px;
  font-size: 0.82rem;
}

.badge.conference-live {
  background: #d93025;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

@media (min-width: 481px) {
  body {
    padding: 16px 0;
    background: #e8eaed;
  }
}
