:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f6f8;
  color: #18202a;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

.status-stack {
  display: grid;
  gap: 8px;
}

.header-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
}

.account-menu {
  position: relative;
}

.account-menu-popover {
  position: absolute;
  z-index: 10;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  width: 190px;
  gap: 6px;
  padding: 8px;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgb(24 32 42 / 16%);
}

.account-menu-popover button {
  width: 100%;
  text-align: left;
}

.secondary {
  border-color: #c6d0dc;
  background: #ffffff;
  color: #25466b;
}

.signin-panel {
  width: min(620px, 100%);
  margin: 52px auto 0;
}

.signin-connection-report {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -4px 0 14px;
}

.signin-connection-report button {
  width: auto;
  padding: 7px 11px;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 32px auto;
}

.app-header,
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 9px;
  padding: 10px 0;
  background: #f4f6f8;
}

.brand h1 {
  font-size: 20px;
  letter-spacing: 0.04em;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.primary-nav {
  display: flex;
  align-self: stretch;
  gap: 4px;
}

.header-actions {
  margin-left: auto;
}

.nav-tab {
  min-height: 38px;
  padding: 6px 14px;
  border-color: transparent;
  background: transparent;
  color: #536273;
}

.nav-tab.active {
  border-color: #2d73b9;
  background: #e4f0fc;
  color: #174d82;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.panel {
  min-width: 0;
  background: #ffffff;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 8px 24px rgb(24 32 42 / 8%);
}

.title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.2;
}

h2 {
  font-size: 18px;
  margin-bottom: 12px;
}

h3 {
  margin: 22px 0 8px;
  font-size: 15px;
}

p {
  color: #5c6875;
  margin-top: 6px;
}

.status {
  min-width: 118px;
  text-align: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: #e9edf2;
  color: #44515f;
  font-weight: 700;
}

.status[data-mode="ok"] {
  background: #ddf6e8;
  color: #1d6b3b;
}

.status[data-mode="warn"] {
  background: #fff1cc;
  color: #805a00;
}

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

.compact-form {
  margin-top: 18px;
}

.wide {
  grid-column: 1 / -1;
}

.effective-ice {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  color: #44515f;
}

.effective-ice code {
  overflow-wrap: anywhere;
  border-radius: 6px;
  padding: 10px 12px;
  background: #eef3f8;
  color: #18202a;
}

label {
  display: grid;
  gap: 6px;
  color: #44515f;
  font-weight: 700;
}

label small {
  color: #697787;
  font-weight: 500;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-label input {
  width: auto;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #c6d0dc;
  border-radius: 6px;
  padding: 10px 12px;
  color: #18202a;
  background: #ffffff;
}

.chat-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.35fr) minmax(0, 1fr);
  gap: 18px;
  margin-top: 0;
}

.chat-sidebar,
.chat-conversation {
  min-width: 0;
}

.team-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
  gap: 18px;
}

.team-sidebar,
.team-workspace {
  min-width: 0;
}

.team-sidebar h2,
.team-workspace h2 {
  margin-top: 0;
}

.team-meeting-list {
  display: grid;
  gap: 4px;
  margin: 12px 0 18px;
  padding: 0;
  list-style: none;
}

.team-meeting {
  display: grid;
  width: 100%;
  gap: 3px;
  border-color: transparent;
  background: transparent;
  color: #18202a;
  text-align: left;
}

.team-meeting span {
  color: #617083;
  font-size: 12px;
  font-weight: 400;
}

.team-meeting.active {
  border-color: #9bbbd8;
  background: #e8f1fb;
}

.team-form {
  display: grid;
  gap: 12px;
}

.team-form fieldset {
  min-width: 0;
  margin: 0;
  border: 1px solid #d7dee7;
  border-radius: 6px;
  padding: 10px 12px;
}

.meet-live-panel {
  display: grid;
  gap: 10px;
  border: 1px solid #c9d7e5;
  border-radius: 8px;
  padding: 12px;
  background: #f5f9fd;
}

.meet-participant-preview {
  display: grid;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid #c9d7e5;
}

.meet-participant-video {
  display: block;
  width: min(100%, 360px);
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: #111820;
  object-fit: cover;
  transform: scaleX(-1);
}

.meet-participant-video.screen-share,
#meet-shared-screen-video {
  object-fit: contain;
  transform: none;
}

.meet-live-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.meet-live-heading h3,
.meet-live-heading p,
.meet-stream-status {
  margin: 0;
}

.meet-stream-participants {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

.meet-recording {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #c9d7e5;
}

.meet-recording-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.meet-recording-heading h4,
.meet-recording-heading p {
  margin: 0;
}

.meet-recording-heading p,
.meet-recording-list {
  color: var(--muted);
  font-size: 13px;
}

.meet-recording-list {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 20px;
}

.meet-recording-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.meet-recording-list li.linked-recording {
  padding: 6px;
  border-radius: 6px;
  background: #e8f3ff;
  color: var(--text);
}

.meet-live-heading p,
.meet-stream-status {
  color: #52657a;
  font-size: 13px;
}

.meet-stream-video {
  display: block;
  width: 100%;
  max-height: min(52vh, 480px);
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: #111820;
  object-fit: contain;
}

.team-file-list,
.team-file-results {
  display: grid;
  gap: 6px;
  margin: 8px 0;
  padding: 0;
  list-style: none;
}

.team-file,
.team-file-search {
  display: flex;
  align-items: center;
  gap: 8px;
}

.team-file > :first-child,
.team-file-search input {
  min-width: 0;
  flex: 1;
}

.team-file-results button {
  width: 100%;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-search {
  position: relative;
  display: block;
  width: min(220px, 42%);
}

.chat-search input {
  height: 30px;
  padding: 6px 34px 6px 31px;
  border-color: #91a4b8;
  border-radius: 999px;
  background: #eef3f8;
  -webkit-appearance: none;
  appearance: none;
}

.chat-search-clear {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 5px;
  min-height: 28px;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: #536273;
  font-size: 20px;
  line-height: 1;
  transform: translateY(-50%);
}

.chat-search input:focus {
  border-color: #2d73b9;
  outline: 2px solid rgb(45 115 185 / 20%);
}

.chat-search-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 10px;
  color: #536273;
  font-size: 18px;
  line-height: 1;
  pointer-events: none;
  transform: translateY(-52%);
}

.chat-sidebar-heading {
  display: flex;
  min-height: 32px;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.chat-search-mobile {
  display: none;
}

.chat-sidebar-first-heading {
  margin-top: 0;
  margin-bottom: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.chat-status:empty {
  display: none;
}

.chat-conversation-heading {
  display: flex;
  min-height: 32px;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.chat-conversation-heading h3 {
  min-width: 0;
  margin-top: 0;
  margin-bottom: 0;
  margin-right: auto;
  overflow: hidden;
  line-height: 32px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-conversation-heading .chat-search {
  flex: 0 1 220px;
}

.chat-conversation-heading > button:not(#chat-back) {
  min-height: 32px;
  padding-block: 4px;
}

.chat-room-management {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #f8fafc;
}

.chat-room-management h3 {
  margin-top: 0;
}

.chat-group-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

#chat-back {
  display: none;
  width: 24px;
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  line-height: 1;
}

#chat-back svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chat-room-list,
.chat-message-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.chat-date-separator {
  align-self: center;
  width: auto;
  margin: 8px auto 2px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #e7ecf2;
  color: #5c6875;
  font-size: 0.78rem;
  line-height: 1.4;
}

.chat-load-earlier {
  display: block;
  margin: 0 auto 8px;
}

.button-link {
  color: #1f5f9e;
  font-weight: 700;
}

.chat-room {
  min-height: 34px;
  width: 100%;
  padding: 4px 8px;
  text-align: left;
  border-color: transparent;
  background: transparent;
  color: #25466b;
}

.chat-room-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 8px;
}

.chat-room-summary .chat-preview {
  grid-column: 1;
  overflow: hidden;
  color: #697787;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-unread {
  align-self: center;
  grid-column: 2;
  grid-row: 1 / span 2;
  min-width: 20px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #1769aa;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.chat-room-summary strong {
  grid-column: 1;
}

.chat-room-summary.has-avatar {
  grid-template-columns: 38px minmax(0, 1fr) auto;
}

.chat-room-summary.has-avatar > .member-avatar {
  grid-row: 1 / span 2;
}

.chat-room-summary.has-avatar > strong,
.chat-room-summary.has-avatar > .chat-preview {
  grid-column: 2;
}

.chat-room-summary.has-avatar > .chat-unread {
  grid-column: 3;
}

.chat-room.active {
  background: #e8f1fb;
}

.chat-search-result {
  display: grid;
  gap: 3px;
}

.chat-search-result span {
  overflow: hidden;
  color: #5c6875;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-room-form,
.chat-message-form {
  display: grid;
  gap: 10px;
}

.chat-member-list {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.chat-member-option {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.member-selection-label {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.chat-member-option input {
  width: auto;
}

.member-avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 50%;
  object-fit: cover;
}

.member-avatar-button {
  display: inline-flex;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
}

.member-avatar-button:hover,
.member-avatar-button:focus-visible {
  outline: 2px solid #1769aa;
  outline-offset: 2px;
  background: transparent;
}

.member-directory-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
}

.member-directory-row .chat-room-summary {
  min-width: 0;
}

.member-avatar-fallback {
  display: inline-grid;
  place-items: center;
  background: #dfefff;
  color: #25466b;
  font-weight: 700;
}

.member-label {
  display: grid;
  min-width: 0;
}

.member-label small {
  overflow: hidden;
  color: #697787;
  font-weight: 400;
  text-overflow: ellipsis;
}

.chat-message-list {
  display: grid;
  gap: 10px;
  min-height: 340px;
  max-height: 58vh;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #f7f9fb;
}

.chat-message {
  max-width: 78%;
  padding: 10px 12px;
  border-radius: 10px;
  background: #ffffff;
}

.chat-message.own {
  justify-self: end;
  background: #dfefff;
}

.chat-message-highlight {
  outline: 3px solid #f0ad26;
  outline-offset: 2px;
  animation: chat-highlight-fade 2.4s ease-out;
}

.chat-message-receipt {
  display: block;
  margin-top: 4px;
  color: #697787;
  font-size: 0.72rem;
  text-align: right;
}

@keyframes chat-highlight-fade {
  from { outline-color: #f0ad26; }
  to { outline-color: transparent; }
}

.chat-message-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.chat-message-heading .member-avatar {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
}

.chat-message-heading .member-avatar-button {
  min-width: 24px;
  min-height: 24px;
}

.chat-message-heading strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-message-heading time {
  flex: 0 0 auto;
  color: #697787;
}

.chat-message p {
  margin-top: 5px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  color: #18202a;
}

.chat-reply-reference {
  margin-bottom: 7px;
  padding: 6px 8px;
  border-left: 3px solid #2d73b9;
  border-radius: 4px;
  background: rgb(45 115 185 / 8%);
  color: #536273;
  font-size: 12px;
}

.chat-reply-reference strong,
.chat-reply-reference span {
  display: block;
}

.chat-reply-reference span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 761px) and (max-width: 1180px) {
  .shell {
    width: calc(100% - 24px);
    margin: 18px 12px;
  }

  .chat-layout {
    grid-template-columns: 250px minmax(0, 1fr);
  }

  .chat-message {
    max-width: 86%;
  }
}

.chat-message-removed {
  color: #697787 !important;
  font-style: italic;
}

.chat-message.manageable {
  position: relative;
  padding-right: 42px;
  cursor: context-menu;
}

.chat-message-action {
  position: absolute;
  top: 4px;
  right: 4px;
  min-height: 28px;
  padding: 1px 7px;
  border-color: transparent;
  background: transparent;
  color: #536273;
  font-size: 18px;
  line-height: 1;
}

@media (hover: hover) and (pointer: fine) {
  .chat-message-action {
    opacity: 0;
  }

  .chat-message:hover .chat-message-action,
  .chat-message:focus-within .chat-message-action {
    opacity: 1;
  }
}

.chat-message-editor {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.chat-message-menu {
  position: fixed;
  z-index: 30;
  display: grid;
  width: 64px;
  min-width: 64px;
  gap: 5px;
  padding: 4px;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgb(24 32 42 / 20%);
}

.chat-message-menu button {
  width: 100%;
  min-height: 32px;
  padding: 5px 4px;
  font-size: 12px;
  text-align: left;
}

.chat-message-form {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 12px;
}

.chat-send {
  min-width: 58px;
  padding-inline: 12px;
}

.chat-reply-preview {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border-left: 3px solid #2d73b9;
  border-radius: 4px;
  background: #eef4fa;
}

.chat-reply-preview div {
  min-width: 0;
}

.chat-reply-preview strong,
.chat-reply-preview span {
  display: block;
}

.chat-reply-preview span {
  overflow: hidden;
  color: #536273;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-reply-preview button {
  min-height: 30px;
  padding: 2px 8px;
}

.chat-attachment-picker {
  grid-column: 1 / -1;
}

.profile-photo-field {
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-photo-field label {
  flex: 1 1 auto;
}

.profile-avatar-preview .member-avatar {
  width: 72px;
  height: 72px;
  flex-basis: 72px;
}

.chat-upload-label {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  font-weight: 700;
}

#chat-upload-progress {
  width: 100%;
  height: 14px;
  margin-top: 8px;
}

.chat-download-recovery {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 8px 0;
  padding: 8px 10px;
  border: 1px solid #d8aa48;
  border-radius: 6px;
  background: #fff8e8;
  font-size: 13px;
}

.chat-download-recovery[hidden] {
  display: none;
}

.chat-download-recovery button {
  flex: 0 0 auto;
  padding: 5px 9px;
}

.chat-file-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 8px;
}

.chat-file-results {
  display: grid;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.chat-file-results button,
.chat-attachments button {
  width: 100%;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#chat-selected-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
  color: #5c6875;
}

.chat-selected-file {
  padding: 4px 8px;
  font-size: 12px;
}

.chat-attachments {
  display: grid;
  gap: 4px;
  margin-top: 8px;
}

button {
  min-height: 42px;
  border: 1px solid #25466b;
  border-radius: 6px;
  padding: 9px 12px;
  background: #25466b;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  border-color: #b7c1cc;
  background: #dce2e8;
  color: #74808d;
  cursor: not-allowed;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.data-toolbar input {
  flex: 1 1 320px;
}

.file-panel {
  margin: 18px 0;
}

.file-toolbar {
  margin-bottom: 12px;
}

.file-toolbar input {
  flex: 1 1 320px;
}

.drive-actions {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}

.drive-action-panel {
  margin-top: 14px;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  padding: 12px 14px;
  background: #f8fafc;
}

.action-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.action-panel-heading h3 {
  margin: 0;
}

.action-panel-heading button {
  min-height: 34px;
  padding: 5px 10px;
}

.transfer-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}
.transfer-progress strong {
  grid-column: 1 / -1;
  overflow-wrap: anywhere;
}
.download-checkpoint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 0;
  color: #684f00;
  font-weight: 650;
}
.download-checkpoint[hidden] {
  display: none;
}
.download-checkpoint span {
  min-width: 0;
  flex: 1;
}
.download-checkpoint button {
  min-height: 34px;
  flex: 0 0 auto;
  padding: 5px 9px;
}
.transfer-progress progress {
  width: 100%;
  height: 18px;
}
.file-status[data-mode="success"] {
  color: #1d6b3b;
  font-weight: 700;
}

.file-status[data-mode="error"] {
  color: #b42318;
  font-weight: 700;
}

.breadcrumbs {
  margin-top: 8px;
  color: #697787;
}

.route-panel[data-panel="files"] > .section-heading {
  padding: 10px 12px;
  border: 1px solid #cbd6e2;
  border-radius: 7px;
  background: #f6f9fc;
}

.link-button,
.file-entry {
  min-height: auto;
  border: 0;
  padding: 0;
  background: transparent;
  color: #25466b;
  text-align: left;
}

.file-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  border: 1px solid #dbe2ea;
  border-radius: 6px;
}

.file-list li {
  padding: 12px 14px;
  border-bottom: 1px solid #e7ecf1;
}

.file-list li:last-child {
  border-bottom: 0;
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.file-row > .file-entry,
.file-row > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.file-row > .file-entry {
  flex: 1 1 auto;
}

.browser-notice {
  margin-top: 16px;
  border: 1px solid #e1a900;
  border-radius: 6px;
  padding: 12px 14px;
  background: #fff8dd;
  color: #664d00;
}

.connection-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.file-list-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.drive-search-form {
  display: flex;
  flex: 1 1 360px;
  gap: 8px;
  margin-right: auto;
}

.drive-search-form input {
  min-width: 120px;
}

.file-list-controls label {
  display: block;
  white-space: nowrap;
}

.file-list-controls select {
  width: auto;
}

.item-summary {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  gap: 4px;
  overflow-wrap: anywhere;
}

.item-summary small {
  color: #697787;
}

.file-list-message {
  color: #697787;
  text-align: center;
}

.file-list-message.loading {
  font-style: italic;
}

.file-list-message.error {
  color: #b42318;
}

.item-details-dialog {
  width: min(560px, calc(100% - 28px));
  border: 0;
  border-radius: 12px;
  padding: 20px;
  color: #18202a;
  box-shadow: 0 24px 70px rgb(24 32 42 / 28%);
}

.item-details-dialog::backdrop {
  background: rgb(24 32 42 / 48%);
}

.member-profile-dialog {
  width: min(360px, calc(100% - 28px));
  border: 0;
  border-radius: 16px;
  padding: 28px 24px 24px;
  color: #18202a;
  text-align: center;
  box-shadow: 0 24px 70px rgb(24 32 42 / 28%);
}

.member-profile-dialog::backdrop {
  background: rgb(24 32 42 / 48%);
}

.member-profile-dialog .dialog-close {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 36px;
  padding: 4px 10px;
  border-color: transparent;
  background: transparent;
  color: #5c6875;
  font-size: 24px;
}

.member-profile-avatar {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.member-profile-avatar .member-avatar {
  width: 88px;
  height: 88px;
  flex-basis: 88px;
  font-size: 28px;
}

.member-profile-dialog h2 {
  margin: 0;
}

.member-profile-email {
  min-height: 1.5em;
  margin: 6px 0 20px;
  overflow-wrap: anywhere;
}

.member-profile-email.muted {
  color: #697787;
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  color: #697787;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.item-details-list {
  display: grid;
  grid-template-columns: minmax(110px, auto) minmax(0, 1fr);
  gap: 10px 16px;
  margin: 20px 0;
}

.item-details-list dt {
  color: #697787;
  font-weight: 700;
}

.item-details-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.technical-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
}

.linked-activity {
  border-top: 1px solid #e7ecf1;
}

.context-menu {
  position: relative;
  flex: 0 0 auto;
}

.context-menu-trigger {
  min-width: 40px;
  border-color: #c6d0dc;
  background: #ffffff;
  color: #25466b;
  font-size: 22px;
  line-height: 1;
}

.context-menu-popover {
  position: absolute;
  z-index: 8;
  top: calc(100% + 4px);
  right: 0;
  display: grid;
  min-width: 220px;
  gap: 4px;
  padding: 6px;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgb(24 32 42 / 16%);
}

.context-menu-popover button {
  width: 100%;
  text-align: left;
}

.file-row button {
  min-height: 34px;
  padding: 5px 10px;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

button.danger {
  border-color: #b42318;
  background: #ffffff;
  color: #b42318;
}

.account-list {
  list-style: none;
  padding: 0;
  margin: 18px 0 0;
  display: grid;
  gap: 8px;
}

.account-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #dbe2ea;
  border-radius: 6px;
  padding: 12px 14px;
}

.member-management-list {
  max-width: 820px;
}

.management-note {
  margin: 18px 0 0;
  color: #697787;
}

.management-section {
  margin-top: 24px;
}

.team-guest-workspace {
  display: grid;
  gap: 14px;
}

.team-guest-workspace section {
  padding-top: 12px;
  border-top: 1px solid #e7ecf1;
}

.account-security-section {
  margin-top: 24px;
  padding-top: 4px;
  border-top: 1px solid #e7ecf1;
}

.account-identity {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.account-identity > span {
  color: #697787;
}

.member-identity {
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.member-identity > div {
  display: grid;
  gap: 4px;
}

.member-identity > div span {
  color: #697787;
}

.settings-section {
  margin-top: 18px;
  border: 1px solid #dbe2ea;
  border-radius: 8px;
  padding: 12px 14px;
}

.settings-section summary {
  color: #25466b;
  font-weight: 700;
  cursor: pointer;
}

.inline-editor {
  flex: 1 0 100%;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #e7ecf1;
}

.clipboard-fallback {
  position: fixed;
  left: -10000px;
  top: 0;
}

.pairing-box {
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  margin-top: 14px;
}

.columns {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
}

.diagnostics-grid {
  margin-top: 24px;
}

.subpanel {
  min-width: 0;
}

.peers {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.peers li {
  border: 1px solid #dbe2ea;
  border-radius: 6px;
  padding: 10px 12px;
  background: #f8fafc;
  cursor: pointer;
}

.log {
  min-height: 360px;
  max-height: 520px;
  overflow: auto;
  margin: 0;
  padding: 14px;
  border-radius: 6px;
  background: #111820;
  color: #d9f7ff;
  line-height: 1.45;
  white-space: pre-wrap;
}

.test-stream-video {
  display: block;
  width: min(100%, 640px);
  min-height: 180px;
  margin-top: 10px;
  border-radius: 6px;
  background: #111820;
}

.stream-status {
  margin: 8px 0 0;
  white-space: pre-wrap;
}

@media (max-width: 820px), (orientation: portrait) and (max-width: 1024px) {
  .shell {
    width: min(100% - 20px, 1120px);
    margin-top: 0;
  }

  .app-header {
    gap: 8px;
  }

  .brand h1 {
    font-size: 17px;
  }

  .primary-nav {
    order: 1;
    flex: 1;
  }

  .header-actions {
    order: 2;
    width: auto;
    margin-left: auto;
  }

  .nav-tab {
    padding-inline: 10px;
  }

  .chat-layout {
    grid-template-columns: 1fr;
  }

  .chat-search-desktop {
    display: none;
  }

  .chat-search-mobile {
    display: block;
    width: min(170px, 62%);
  }

  .chat-sidebar-heading {
    margin-bottom: 12px;
  }

  .route-panel[data-panel="chat"] {
    padding: 10px;
  }

  .team-layout {
    grid-template-columns: 1fr;
  }

  .meet-live-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .chat-layout:not(.conversation-open) .chat-conversation {
    display: none;
  }

  .chat-layout.conversation-open .chat-sidebar {
    display: none;
  }

  .chat-layout.conversation-open .chat-conversation {
    display: flex;
    min-height: calc(100dvh - 132px);
    flex-direction: column;
  }

  .chat-layout.conversation-open .chat-message-list {
    min-height: 260px;
    max-height: none;
    flex: 1 1 auto;
  }

  #chat-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
  }

  .chat-message-form {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    margin-top: 8px;
  }

  .chat-message-form > textarea {
    min-height: 44px;
    padding: 8px 10px;
  }

  .chat-send {
    min-width: 52px;
    padding: 6px 9px;
  }

  .chat-message {
    max-width: 92%;
  }
  .grid,
  .columns {
    grid-template-columns: 1fr;
  }

  .title-row {
    flex-direction: column;
  }

  .section-heading,
  .account-list li {
    align-items: stretch;
    flex-direction: column;
  }

  .header-actions {
    width: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .account-menu-popover {
    right: 0;
    left: auto;
    max-width: calc(100vw - 20px);
  }

  .row-actions {
    justify-content: stretch;
  }

  .file-row {
    align-items: center;
  }

  .row-actions button {
    flex: 1;
  }

  .pairing-box {
    grid-template-columns: 1fr;
  }

  .inline-editor {
    grid-template-columns: 1fr;
  }

  .drive-actions button {
    flex: 1;
  }

  .connection-notice {
    align-items: stretch;
    flex-direction: column;
  }

  .item-details-list {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .item-details-list dd + dt {
    margin-top: 8px;
  }

  .status {
    width: 100%;
  }
}

@media (orientation: landscape) and (min-width: 600px) and (max-width: 820px) {
  .chat-layout {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .chat-layout:not(.conversation-open) .chat-conversation,
  .chat-layout.conversation-open .chat-sidebar {
    display: block;
  }

  .chat-layout.conversation-open .chat-conversation {
    display: block;
    min-height: 0;
  }

  .chat-layout.conversation-open .chat-message-list {
    min-height: 320px;
    max-height: 58vh;
  }

  .chat-search-mobile,
  #chat-back {
    display: none;
  }

  .chat-search-desktop {
    display: flex;
  }
}
