:root {
  color-scheme: light;
  --app-viewport-height: 100vh;
  --primary: #1677ff;
  --primary-strong: #0762d7;
  --primary-soft: #eaf3ff;
  --teal: #20b7a6;
  --bg: #e9eef6;
  --panel: #ffffff;
  --sidebar: #f8faff;
  --chat-bg: #f4f7fb;
  --text: #182130;
  --muted: #7c8799;
  --faint: #aeb7c5;
  --line: #e9edf3;
  --bubble: #ffffff;
  --bubble-me: #1677ff;
  --shadow: 0 24px 70px rgba(34, 54, 86, 0.18);
  --radius: 28px;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(circle at 10% 20%, rgba(22, 119, 255, 0.11), transparent 28%),
    radial-gradient(circle at 90% 80%, rgba(32, 183, 166, 0.09), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button,
[role="button"] {
  -webkit-tap-highlight-color: transparent;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-pending .auth-gate,
.auth-pending .app-shell {
  visibility: hidden;
  opacity: 0;
}

.auth-gate {
  position: fixed;
  inset: 0;
  display: none;
  overflow-y: auto;
  padding: 32px;
  place-items: center;
  background:
    radial-gradient(circle at 8% 15%, rgba(22, 119, 255, 0.14), transparent 30%),
    radial-gradient(circle at 92% 84%, rgba(32, 183, 166, 0.11), transparent 28%),
    var(--bg);
  z-index: 300;
}

body.auth-required .auth-gate {
  display: grid;
}

body.auth-required .app-shell {
  display: none;
}

.auth-card {
  display: grid;
  width: min(1030px, 100%);
  min-height: 650px;
  overflow: hidden;
  grid-template-columns: 46% 54%;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 30px;
  background: var(--panel);
  box-shadow: 0 28px 85px rgba(30, 51, 83, 0.2);
  animation: authCardIn 0.45s cubic-bezier(0.22, 0.75, 0.22, 1) both;
}

.auth-story {
  position: relative;
  display: flex;
  overflow: hidden;
  padding: 36px 40px;
  flex-direction: column;
  background:
    radial-gradient(circle at 82% 16%, rgba(51, 145, 255, 0.38), transparent 28%),
    radial-gradient(circle at 12% 88%, rgba(32, 183, 166, 0.22), transparent 33%),
    #101d32;
  color: white;
}

.auth-story::before,
.auth-story::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  content: "";
}

.auth-story::before {
  top: -145px;
  right: -145px;
  width: 390px;
  height: 390px;
}

.auth-story::after {
  right: -80px;
  bottom: -175px;
  width: 340px;
  height: 340px;
}

.auth-brand,
.auth-mobile-brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1;
}

.auth-logo {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  border-radius: 14px;
  background: var(--primary);
  box-shadow: 0 8px 20px rgba(22, 119, 255, 0.35);
}

.auth-logo .brand-bubble {
  transform: scale(0.88);
}

.auth-brand strong,
.auth-brand small {
  display: block;
}

.auth-brand strong {
  font-size: 17px;
  letter-spacing: 0.08em;
}

.auth-brand small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.46);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.auth-story-copy {
  position: relative;
  margin: auto 0 38px;
  z-index: 1;
}

.auth-kicker {
  margin: 0 0 17px;
  color: #7eb8ff !important;
  font-size: 11px !important;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.auth-story-copy h1 {
  margin: 0 0 22px;
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 730;
  letter-spacing: -0.055em;
  line-height: 1.15;
}

.auth-story-copy h1 span {
  color: #5fa7ff;
}

.auth-story-copy > p:last-child {
  max-width: 330px;
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  line-height: 1.9;
}

.auth-preview {
  position: relative;
  display: grid;
  min-height: 78px;
  padding: 14px 16px;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.075);
  backdrop-filter: blur(16px);
  z-index: 1;
}

.auth-preview-avatar {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, #72b5ff, #477fe7);
  font-weight: 700;
}

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

.auth-preview strong {
  margin-bottom: 5px;
  font-size: 13px;
}

.auth-preview span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
}

.auth-preview > i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #42d493;
  box-shadow: 0 0 0 4px rgba(66, 212, 147, 0.12);
}

.auth-trust {
  position: relative;
  display: flex;
  margin-top: 18px;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.36);
  font-size: 9px;
  z-index: 1;
}

.auth-trust span:first-child::first-letter {
  color: #42d493;
}

.auth-panel {
  display: flex;
  padding: 54px clamp(42px, 5vw, 68px) 38px;
  justify-content: center;
  flex-direction: column;
  background: var(--panel);
}

.auth-mobile-brand {
  display: none;
}

.auth-heading {
  margin-bottom: 25px;
}

.auth-heading h2 {
  margin: 5px 0 8px;
  font-size: 29px;
  letter-spacing: -0.04em;
}

.auth-heading > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: var(--text);
  font-size: 11px;
  font-weight: 650;
}

.auth-field > input,
.auth-field > select,
.password-field {
  width: 100%;
  height: 47px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  background: var(--chat-bg);
  color: var(--text);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

.auth-field > input,
.auth-field > select {
  padding: 0 14px;
}

.auth-field > input:focus,
.auth-field > select:focus,
.password-field:focus-within {
  border-color: rgba(22, 119, 255, 0.48);
  background: var(--panel);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.08);
}

.auth-field input::placeholder {
  color: var(--faint);
  font-size: 11px;
  font-weight: 400;
}

.auth-field > select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 20px,
    calc(100% - 12px) 20px;
  background-repeat: no-repeat;
  background-size: 5px 5px;
  font-family: inherit;
}

.password-field {
  display: flex;
  align-items: center;
}

.password-field input {
  min-width: 0;
  height: 100%;
  padding: 0 8px 0 14px;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.password-toggle,
.text-button {
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-size: 10px;
}

.password-toggle {
  height: 100%;
  padding: 0 13px;
}

.avatar > img,
.rail-avatar > span > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-row {
  display: flex;
  min-height: 20px;
  align-items: center;
  justify-content: space-between;
}

.remember {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
}

.remember input {
  width: 14px;
  height: 14px;
  accent-color: var(--primary);
}

.auth-submit {
  display: flex;
  height: 49px;
  padding: 0 18px;
  align-items: center;
  justify-content: space-between;
  border: 0;
  border-radius: 14px;
  background: var(--primary);
  color: white;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 9px 20px rgba(22, 119, 255, 0.24);
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    opacity 0.2s ease;
}

.auth-submit:hover {
  background: var(--primary-strong);
}

.auth-submit:active {
  transform: scale(0.985);
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.auth-submit i {
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
}

.auth-message {
  min-height: 18px;
  margin-top: 12px;
  color: #e14257;
  font-size: 10px;
  line-height: 1.5;
}

.auth-message.success {
  color: #1fa774;
}

.auth-terms {
  margin: 5px 0 0;
  color: var(--faint);
  font-size: 8px;
  text-align: center;
}

.app-shell {
  position: fixed;
  inset: 50%;
  display: grid;
  grid-template-columns: 76px 320px minmax(420px, 1fr) 0;
  grid-template-rows: minmax(0, 1fr);
  width: min(1240px, calc(100vw - 48px));
  height: calc(100vh - 48px);
  height: min(820px, calc(100vh - 48px));
  height: min(820px, calc(100dvh - 48px));
  height: min(820px, calc(var(--app-viewport-height) - 48px));
  overflow: hidden;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
  transition: grid-template-columns 0.3s ease;
}

.app-shell.details-open {
  grid-template-columns: 76px 300px minmax(390px, 1fr) 280px;
}

.rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 22px 12px 18px;
  color: #8da3bf;
  background: #101a2b;
}

.brand {
  display: grid;
  width: 46px;
  height: 46px;
  margin-bottom: 22px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 15px;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 9px 18px rgba(22, 119, 255, 0.34);
}

.brand-bubble {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 25px;
  height: 19px;
  border-radius: 7px;
  background: white;
}

.brand-bubble::after {
  position: absolute;
  bottom: -4px;
  left: 5px;
  width: 7px;
  height: 7px;
  background: white;
  clip-path: polygon(0 0, 100% 0, 0 100%);
  content: "";
}

.brand-bubble i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--primary);
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-button,
.rail-avatar {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 15px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.nav-button:hover,
.nav-button.is-active {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.nav-button:active,
.rail-avatar:active,
.icon-button:active {
  transform: scale(0.95);
}

.nav-dot {
  position: absolute;
  top: 5px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid #101a2b;
  border-radius: 9px;
  background: #ff4f64;
  color: white;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
}

.nav-dot[hidden] {
  display: none;
}

.rail-spacer {
  flex: 1;
}

.rail-avatar {
  margin-top: 2px;
  overflow: visible !important;
  background: linear-gradient(145deg, #80a8f8, #456fde);
  color: white;
  font-size: 16px;
  font-weight: 700;
}

.rail-avatar > span {
  display: grid;
  width: 100%;
  height: 100%;
  overflow: hidden;
  place-items: center;
  border-radius: inherit;
}

.online-dot {
  position: absolute;
  right: 0;
  bottom: 1px;
  width: 11px;
  height: 11px;
  border: 2px solid #101a2b;
  border-radius: 50%;
  background: #38cf8b;
}

.theme-icon-sun,
body.dark .theme-icon-moon {
  display: none;
}

body.dark .theme-icon-sun {
  display: block;
}

.sidebar {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--sidebar);
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 96px;
  padding: 22px 22px 14px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sidebar h1 {
  margin: 0;
  font-size: 23px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.icon-button:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.icon-button.soft {
  color: var(--primary);
  background: var(--primary-soft);
}

.search-wrap {
  display: flex;
  height: 42px;
  margin: 0 16px 12px;
  padding: 0 12px;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: var(--panel);
  color: var(--faint);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.search-wrap:focus-within {
  border-color: rgba(22, 119, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.08);
}

.search-wrap svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.search-wrap input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}

.search-wrap input::placeholder {
  color: var(--faint);
}

kbd {
  padding: 2px 6px;
  border: 0;
  border-radius: 5px;
  background: var(--chat-bg);
  color: var(--faint);
  font-family: inherit;
  font-size: 10px;
  white-space: nowrap;
}

.sidebar-content {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 9px 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.conversation {
  position: relative;
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr) auto;
  gap: 11px;
  width: 100%;
  min-height: 72px;
  margin-bottom: 3px;
  padding: 10px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.conversation:hover {
  background: var(--panel);
}

.conversation.is-active {
  background: var(--primary-soft);
}

.conversation:active {
  transform: scale(0.985);
}

.create-group-entry {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 70px;
  margin: 2px 0 10px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  border-radius: 16px;
  background: var(--primary-soft);
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}

.create-group-entry:hover {
  border-color: color-mix(in srgb, var(--primary) 48%, var(--line));
}

.create-group-entry:active {
  transform: scale(0.985);
}

.create-group-entry strong,
.create-group-entry small {
  display: block;
}

.create-group-entry strong {
  margin-bottom: 4px;
  color: var(--primary);
  font-size: 14px;
}

.create-group-entry small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.create-group-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  background: var(--primary);
  color: white;
  font-size: 28px;
  font-weight: 350;
  line-height: 1;
}

.avatar {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  overflow: hidden;
  place-items: center;
  border-radius: 15px;
  color: white;
  font-weight: 750;
  letter-spacing: -0.03em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.avatar.large {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  font-size: 18px;
}

.avatar.xlarge {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  font-size: 22px;
}

.avatar .emoji {
  font-size: 23px;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.08));
}

.conversation-copy {
  min-width: 0;
  align-self: center;
}

.conversation-copy strong {
  display: block;
  overflow: hidden;
  margin-bottom: 5px;
  font-size: 14px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-copy p {
  display: flex;
  overflow: hidden;
  align-items: center;
  gap: 3px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-copy p .mini-pin {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
}

.conversation-meta {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 9px;
  padding-top: 3px;
}

.conversation-meta time {
  color: var(--faint);
  font-size: 10px;
}

.unread {
  display: grid;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  place-items: center;
  border-radius: 9px;
  background: #ff5064;
  color: white;
  font-size: 10px;
  font-weight: 700;
}

.muted-badge {
  color: var(--faint);
  font-size: 12px;
}

.main-view {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  flex-direction: column;
  background: var(--chat-bg);
}

.main-view.is-chat-view {
  display: grid;
  grid-template-areas:
    "chat-header"
    "chat-messages"
    "chat-composer";
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.main-view.is-chat-view > .chat-header {
  grid-area: chat-header;
}

.main-view.is-chat-view > .messages {
  grid-area: chat-messages;
}

.main-view.is-chat-view > .composer-shell {
  min-width: 0;
  grid-area: chat-composer;
}

.chat-drop-overlay {
  position: absolute;
  z-index: 92;
  inset: 12px;
  display: flex;
  padding: 24px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  border: 2px dashed rgba(22, 119, 255, 0.72);
  border-radius: 20px;
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.48), 0 18px 55px rgba(31, 69, 122, 0.18);
  backdrop-filter: blur(14px);
  pointer-events: none;
  animation: fadeIn 0.15s ease both;
}

.chat-drop-overlay[hidden] {
  display: none;
}

.chat-drop-overlay > span {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 4px;
  place-items: center;
  border-radius: 18px;
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 12px 25px rgba(22, 119, 255, 0.26);
}

.chat-drop-overlay > span svg {
  width: 28px;
  height: 28px;
}

.chat-drop-overlay strong {
  max-width: min(520px, 86%);
  overflow: hidden;
  font-size: 17px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-drop-overlay small {
  color: var(--muted);
  font-size: 11px;
}

.empty-state {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 32px;
  text-align: center;
}

.empty-art {
  display: flex;
  width: 104px;
  height: 84px;
  margin-bottom: 20px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 28px 28px 28px 8px;
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: 0 14px 34px rgba(22, 119, 255, 0.11);
}

.empty-art span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.empty-state h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.chat-header {
  display: flex;
  min-height: 78px;
  flex: 0 0 auto;
  padding: 12px 18px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  backdrop-filter: blur(18px);
  z-index: 3;
}

.mobile-back {
  display: none;
}

.chat-identity {
  min-width: 0;
  flex: 1;
}

.chat-identity h2 {
  overflow: hidden;
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-status {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38c989;
  box-shadow: 0 0 0 3px rgba(56, 201, 137, 0.12);
}

.header-actions {
  display: flex;
  gap: 4px;
}

.messages {
  display: flex;
  min-height: 0;
  flex: 1 1 0;
  overflow-y: auto;
  flex-direction: column;
  gap: 5px;
  padding: 20px clamp(18px, 4vw, 46px);
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
  background:
    radial-gradient(circle at 80% 10%, rgba(22, 119, 255, 0.04), transparent 22%),
    var(--chat-bg);
}

.day-divider {
  margin: 4px auto 13px;
  padding: 5px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--line) 75%, transparent);
  color: var(--muted);
  font-size: 10px;
}

.message-row {
  display: flex;
  max-width: min(78%, 560px);
  align-items: flex-start;
  gap: 8px;
  animation: messageIn 0.25s ease both;
}

.message-row.me {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-row.them {
  align-self: flex-start;
}

.message-row.recalled-row {
  max-width: 100%;
  align-self: center;
  margin: 4px 0;
}

.recall-notice {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}

.recall-notice button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.recall-notice button:hover,
.recall-notice button:focus-visible {
  text-decoration: underline;
}

.message-row.is-selecting {
  max-width: min(88%, 620px);
}

.message-row.is-selected .message-bubble {
  outline: 3px solid rgba(22, 119, 255, 0.2);
  outline-offset: 2px;
}

.message-select {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  margin-bottom: 4px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.message-row.is-selected .message-select {
  border-color: var(--primary);
  background: var(--primary);
}

.message-avatar {
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  align-self: flex-start;
  border-radius: 9px;
  font-size: 10px;
}

.message-stack {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 4px;
}

.message-row.me .message-stack {
  align-items: flex-end;
}

.message-bubble {
  position: relative;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 5px 16px 16px 16px;
  background: var(--bubble);
  box-shadow: 0 3px 10px rgba(31, 51, 80, 0.04);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.message-row.me .message-bubble {
  border-color: transparent;
  border-radius: 16px 5px 16px 16px;
  background: var(--bubble-me);
  color: white;
  box-shadow: 0 5px 14px rgba(22, 119, 255, 0.2);
}

.message-bubble.image-bubble {
  max-width: min(320px, 52vw);
  padding: 0;
  overflow: hidden;
}

.message-bubble.image-bubble.has-metadata {
  padding: 8px;
}

.message-bubble.image-bubble.has-metadata .image-message {
  margin-top: 6px;
  border-radius: 11px;
}

.forwarded-label {
  display: block;
  margin-bottom: 4px;
  opacity: 0.72;
  font-size: 9px;
  font-weight: 700;
}

.message-quote {
  display: flex;
  min-width: 140px;
  margin-bottom: 7px;
  padding: 7px 9px;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
  border: 0;
  border-left: 3px solid currentColor;
  border-radius: 7px;
  background: rgba(120, 140, 170, 0.12);
  color: inherit;
  cursor: pointer;
  font: inherit;
  opacity: 0.84;
  line-height: 1.35;
  text-align: left;
}

.message-quote:hover {
  opacity: 1;
}

.message-quote:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.message-row.me .message-quote {
  background: rgba(255, 255, 255, 0.16);
}

.message-quote strong {
  font-size: 9px;
}

.message-quote span {
  max-width: 260px;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-row.is-quote-target .message-bubble,
.message-row.is-quote-target .recall-notice {
  animation: quoteTargetPulse 1.5s ease;
}

@keyframes quoteTargetPulse {
  0%, 100% {
    outline: 0 solid rgba(22, 119, 255, 0);
  }
  30%, 65% {
    outline: 5px solid rgba(22, 119, 255, 0.3);
    outline-offset: 3px;
  }
}

.image-message {
  display: grid;
  min-width: 180px;
  min-height: 120px;
  padding: 0;
  place-items: center;
  overflow: hidden;
  border: 0;
  background: rgba(220, 231, 244, 0.55);
  color: var(--muted);
  cursor: zoom-in;
}

.image-message img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 340px;
  object-fit: contain;
}

.image-message img[hidden],
.image-loading[hidden] {
  display: none;
}

.image-loading {
  padding: 24px;
  font-size: 11px;
}

.message-time {
  display: flex;
  align-items: center;
  gap: 3px;
  color: var(--faint);
  font-size: 9px;
}

.message-author {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-time svg {
  width: 12px;
  height: 12px;
  color: var(--primary);
  stroke-width: 2.4;
}

.attachment-bubble {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 22px;
  min-width: 190px;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  outline: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.file-icon {
  display: grid;
  width: 38px;
  height: 42px;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.18);
  font-size: 18px;
}

.file-copy,
.file-copy strong,
.file-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-copy strong {
  font-size: 12px;
}

.file-copy small {
  margin-top: 2px;
  opacity: 0.72;
  font-size: 9px;
}

.download-mark {
  opacity: 0.75;
  font-size: 20px;
  text-align: center;
  transition: transform 0.18s ease;
}

.attachment-bubble:hover .download-mark {
  transform: translateY(2px);
}

.attachment-bubble.is-downloading .download-mark {
  animation: download-pulse 0.8s ease-in-out infinite alternate;
}

.message-bubble.oa-event-message-bubble {
  width: min(310px, 72vw);
  padding: 0;
  overflow: hidden;
  border-color: rgba(22, 119, 255, 0.16);
  border-radius: 18px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 9px 26px rgba(33, 70, 124, 0.12);
  white-space: normal;
}

.message-row.me .message-bubble.oa-event-message-bubble {
  border: 1px solid rgba(22, 119, 255, 0.18);
  border-radius: 18px;
  background: var(--panel);
  color: var(--text);
}

.message-bubble.oa-event-message-bubble.has-metadata {
  padding: 8px;
}

.oa-event-message-card {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.oa-event-message-card:hover {
  background: color-mix(in srgb, var(--panel) 96%, var(--primary));
}

.oa-event-message-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  padding: 13px 14px 11px;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(22, 119, 255, 0.13), rgba(109, 89, 255, 0.06));
}

.oa-event-message-logo {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #1684ff, #395de7);
  color: white;
  box-shadow: 0 6px 14px rgba(22, 119, 255, 0.25);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.2px;
}

.oa-event-message-heading {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.oa-event-message-heading b {
  font-size: 12px;
  line-height: 1.35;
}

.oa-event-message-heading small {
  color: var(--muted);
  font-size: 9px;
}

.oa-event-message-head > i {
  padding: 3px 7px;
  border-radius: 9px;
  background: rgba(22, 119, 255, 0.1);
  color: var(--primary);
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}

.oa-event-message-head > .oa-message-status.is-pending {
  background: rgba(238, 146, 30, 0.13);
  color: #cf750b;
}

.oa-event-message-head > .oa-message-status.is-pending_confirmation {
  background: rgba(31, 143, 222, 0.12);
  color: #187fc2;
}

.oa-event-message-head > .oa-message-status.is-completed {
  background: rgba(31, 167, 116, 0.12);
  color: #16895e;
}

.oa-event-message-body {
  display: grid;
  padding: 13px 14px 12px;
  gap: 7px;
}

.oa-event-message-body > strong,
.oa-event-message-summary,
.oa-event-message-topic {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.oa-event-message-body > strong {
  font-size: 14px;
  line-height: 1.45;
  white-space: nowrap;
}

.oa-event-message-summary {
  display: -webkit-box;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.oa-event-message-topic {
  display: flex;
  margin-top: 2px;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.oa-event-message-topic b {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 8px;
}

.oa-event-message-foot {
  display: flex;
  margin: 0 14px;
  padding: 10px 0 11px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
}

.oa-event-message-foot small {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oa-event-message-foot > b {
  flex: 0 0 auto;
  color: var(--primary);
  font-size: 9px;
  font-weight: 800;
}

.oa-event-message-foot > b i {
  display: inline-grid;
  width: 16px;
  height: 16px;
  margin-left: 2px;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  font-size: 14px;
  font-style: normal;
  line-height: 1;
}

@keyframes download-pulse {
  to {
    opacity: 0.25;
    transform: translateY(3px);
  }
}

.typing-bubble {
  display: flex;
  min-width: 46px;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding-block: 14px;
}

.typing-bubble i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--faint);
  animation: bounce 1s infinite;
}

.typing-bubble i:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-bubble i:nth-child(3) {
  animation-delay: 0.3s;
}

.composer-shell {
  position: relative;
  flex: 0 0 auto;
  padding: 11px 18px 16px;
  border-top: 1px solid var(--line);
  background: var(--panel);
  z-index: 4;
}

.emoji-panel {
  position: absolute;
  left: 18px;
  bottom: calc(100% + 6px);
  display: none;
  width: min(390px, calc(100% - 36px));
  height: min(390px, 52dvh);
  min-height: 280px;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 16px 42px rgba(31, 50, 79, 0.16);
  z-index: 10;
}

.emoji-panel.is-open {
  display: flex;
}

.emoji-panel-header {
  display: flex;
  padding: 13px 15px 9px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.emoji-panel-header strong {
  color: var(--text);
  font-size: 13px;
}

.emoji-panel-header span {
  color: var(--faint);
  font-size: 9px;
}

.emoji-grid {
  display: grid;
  min-height: 0;
  padding: 8px 10px 12px;
  flex: 1 1 auto;
  grid-auto-rows: 42px;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 2px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.emoji-grid button {
  display: grid;
  width: 100%;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  font-size: 23px;
  line-height: 1;
}

.emoji-grid button:hover,
.emoji-grid button:focus-visible {
  background: var(--chat-bg);
}

.emoji-tabs {
  display: flex;
  min-height: 56px;
  padding: 4px 7px max(5px, env(safe-area-inset-bottom));
  gap: 2px;
  overflow-x: auto;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--chat-bg) 70%, var(--panel));
  scrollbar-width: none;
}

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

.emoji-tab {
  display: flex;
  min-width: 48px;
  padding: 4px 5px;
  align-items: center;
  flex: 1 0 48px;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.emoji-tab span {
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  font-size: 17px;
  line-height: 1;
}

.emoji-tab small {
  font-size: 8px;
  white-space: nowrap;
}

.emoji-tab:hover,
.emoji-tab:focus-visible,
.emoji-tab.is-active {
  background: var(--panel);
  color: var(--primary);
}

.composer {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--chat-bg);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.composer-extra-actions {
  display: flex;
  margin: 0 2px 7px;
}

.oa-event-composer-button {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(22, 119, 255, 0.22);
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 800;
}

.oa-event-composer-button:hover {
  border-color: var(--primary);
}

.composer-reference {
  display: flex;
  margin-bottom: 7px;
  padding: 8px 10px 8px 12px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-left: 3px solid var(--primary);
  border-radius: 9px;
  background: var(--chat-bg);
}

.composer-reference > span,
.composer-reference strong,
.composer-reference small {
  display: block;
  min-width: 0;
}

.composer-reference > span {
  overflow: hidden;
}

.composer-reference strong {
  color: var(--primary);
  font-size: 10px;
}

.composer-reference small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-reference button {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
}

.selection-shell {
  padding-block: 12px;
}

.selection-toolbar {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 76px;
  align-items: center;
  gap: 10px;
}

.selection-toolbar strong {
  font-size: 12px;
  text-align: center;
}

.selection-toolbar button {
  height: 38px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
}

.selection-cancel {
  background: var(--chat-bg);
  color: var(--muted);
}

.selection-forward {
  background: var(--primary);
  color: white;
}

.selection-forward:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.composer:focus-within {
  border-color: rgba(22, 119, 255, 0.45);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.08);
}

.composer textarea {
  width: 100%;
  min-height: 38px;
  max-height: 104px;
  padding: 9px 4px 7px;
  resize: none;
  overflow-y: auto;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.composer textarea::placeholder {
  color: var(--faint);
}

.composer .icon-button {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}

.send-button {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 13px;
  background: var(--primary);
  color: white;
  cursor: pointer;
  box-shadow: 0 5px 12px rgba(22, 119, 255, 0.23);
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.send-button:hover {
  background: var(--primary-strong);
}

.send-button:active {
  transform: scale(0.94);
}

.composer-hint {
  margin: 7px 3px 0;
  color: var(--faint);
  font-size: 9px;
  text-align: right;
}

.details-panel {
  display: none;
  min-width: 0;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: var(--panel);
}

.app-shell.details-open .details-panel {
  display: block;
}

.details-inner {
  padding: 28px 20px;
}

.details-close {
  position: absolute;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--chat-bg);
  color: var(--muted);
  cursor: pointer;
  font-size: 22px;
}

.details-profile {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 38px 0 24px;
  text-align: center;
}

.details-profile h3 {
  margin: 13px 0 4px;
  font-size: 17px;
}

.details-profile p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.details-grid button {
  display: flex;
  height: 62px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 0;
  border-radius: 13px;
  background: var(--chat-bg);
  color: var(--muted);
  cursor: pointer;
  font-size: 9px;
}

.details-grid button:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.details-grid svg {
  width: 18px;
  height: 18px;
}

.chat-history-panel {
  min-height: 100%;
  padding: 18px 16px 24px;
}

.chat-history-header {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
}

.chat-history-header > button {
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: var(--chat-bg);
  color: var(--muted);
  cursor: pointer;
  font-size: 22px;
}

.chat-history-header > button:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.chat-history-header svg {
  width: 19px;
  height: 19px;
}

.chat-history-header span,
.chat-history-header strong,
.chat-history-header small {
  display: block;
  min-width: 0;
}

.chat-history-header strong {
  font-size: 15px;
}

.chat-history-header small {
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-history-search {
  display: flex;
  height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--chat-bg);
}

.chat-history-search:focus-within {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--line));
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.chat-history-search svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--faint);
}

.chat-history-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 12px;
}

.chat-history-count {
  padding: 14px 2px 8px;
  color: var(--muted);
  font-size: 10px;
}

.chat-history-results {
  display: grid;
  gap: 7px;
}

.chat-history-item {
  display: block;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.chat-history-item:hover {
  border-color: color-mix(in srgb, var(--primary) 40%, var(--line));
  background: var(--primary-soft);
}

.chat-history-item:disabled {
  cursor: default;
  opacity: 0.75;
}

.chat-history-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chat-history-meta strong {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-history-meta time {
  flex: 0 0 auto;
  color: var(--faint);
  font-size: 9px;
}

.chat-history-summary {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.chat-history-empty {
  padding: 44px 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.group-members-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--chat-bg);
}

.group-members-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
}

.group-members-panel header span {
  color: var(--muted);
  font-size: 10px;
}

.group-member-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 6px;
}

.group-member-chip {
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
}

.group-member-chip > span:last-child {
  width: 100%;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-member-add {
  display: flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px dashed color-mix(in srgb, var(--primary) 45%, var(--line));
  border-radius: 11px;
  background: var(--primary-soft);
  color: var(--primary);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.group-member-add:hover {
  border-style: solid;
}

.group-member-add:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.group-member-add span {
  font-size: 19px;
  font-weight: 400;
  line-height: 1;
}

.setting-row {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.toggle {
  position: relative;
  width: 36px;
  height: 21px;
  border: 0;
  border-radius: 12px;
  background: #cbd3df;
  cursor: pointer;
  transition: background 0.2s ease;
}

.toggle::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: white;
  content: "";
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.toggle.on {
  background: var(--primary);
}

.toggle.on::after {
  transform: translateX(15px);
}

.section-view {
  width: 100%;
  height: 100%;
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  padding: clamp(24px, 5vw, 56px);
  background: var(--chat-bg);
}

.section-view-header {
  max-width: 680px;
  margin: 0 auto 26px;
}

.section-view-header h2 {
  margin: 6px 0 6px;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.035em;
}

.section-view-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.contacts-view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.contacts-view-header h2 {
  margin: 0;
}

.contacts-filter-bar {
  display: grid;
  max-width: 680px;
  margin: -8px auto 10px;
  grid-template-columns: minmax(150px, 1.2fr) minmax(130px, 1fr) minmax(130px, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.contact-filter-field {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.contact-filter-field input,
.contact-filter-field select {
  width: 100%;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
}

.contact-filter-field input:focus,
.contact-filter-field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.09);
}

.contacts-result-count {
  max-width: 680px;
  margin: 0 auto 10px;
  color: var(--muted);
  font-size: 10px;
}

.contacts-refresh-button,
.contact-refresh,
.contact-state button {
  border: 0;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  font-family: inherit;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}

.contacts-refresh-button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 10px 14px;
}

.contacts-refresh-button:disabled,
.contact-refresh:disabled {
  cursor: wait;
  opacity: 0.65;
}

.contact-source {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 1px 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--panel);
}

.contact-source-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
}

.contact-source-icon svg {
  width: 17px;
  height: 17px;
}

.contact-source-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 2px;
}

.contact-source-copy strong {
  font-size: 12px;
}

.contact-source-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-refresh {
  padding: 7px 9px;
}

.contact-list,
.profile-card-wrap {
  max-width: 680px;
  margin: 0 auto;
}

.department-label {
  display: flex;
  margin: 17px 11px 6px;
  align-items: center;
  justify-content: space-between;
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
}

.department-label b {
  display: grid;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  place-items: center;
  border-radius: 9px;
  background: var(--primary-soft);
  font-size: 9px;
}

.department-group {
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}

.department-heading {
  display: flex;
  min-height: 42px;
  padding: 0 14px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  color: var(--primary);
}

.department-heading span {
  font-size: 12px;
  font-weight: 800;
}

.department-heading b {
  color: var(--muted);
  font-size: 10px;
}

.contact-state {
  display: grid;
  min-height: 190px;
  padding: 32px 24px;
  place-items: center;
  align-content: center;
  border: 1px dashed var(--line);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
}

.contact-state.is-compact {
  min-height: 150px;
  margin: 6px 4px;
  padding: 24px 16px;
}

.contact-state strong {
  margin: 9px 0 3px;
  color: var(--text);
  font-size: 13px;
}

.contact-state p {
  max-width: 360px;
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
}

.contact-state.is-error strong {
  color: #e14257;
}

.contact-state button {
  margin-top: 13px;
  padding: 8px 12px;
}

.contact-spinner {
  width: 21px;
  height: 21px;
  border: 2px solid var(--line);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.contact-row:hover {
  border-radius: 15px;
  background: var(--panel);
}

.department-group .contact-row:last-child {
  border-bottom: 0;
}

.department-group .contact-row:hover {
  border-radius: 0;
  background: var(--chat-bg);
}

.contact-row .copy {
  min-width: 0;
  flex: 1;
}

.contact-row strong,
.contact-row span {
  display: block;
}

.contact-row strong {
  margin-bottom: 3px;
  font-size: 14px;
}

.contact-name-line {
  display: flex;
  align-items: center;
  gap: 9px;
}

.contact-name-line strong {
  margin: 0;
}

.contact-row .work-status,
.profile-work-info .work-status {
  display: inline-flex;
  width: fit-content;
  padding: 3px 7px;
  align-items: center;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 750;
  line-height: 1;
}

.work-status.is-normal {
  background: rgba(31, 167, 116, 0.12);
  color: #1a9a6c;
}

.work-status.is-leave {
  background: rgba(242, 157, 56, 0.15);
  color: #d77a10;
}

.contact-meta-line {
  display: flex;
  min-width: 0;
  margin-top: 6px;
  gap: 6px 16px;
  flex-wrap: wrap;
}

.contact-row .contact-meta-line span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-row .go {
  color: var(--faint);
  font-size: 20px;
}

.contact-row.is-selectable {
  cursor: pointer;
}

.contact-row.is-selectable.is-selected {
  background: rgba(22, 119, 255, 0.08);
}

.group-member-check {
  display: grid;
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel);
  color: white;
  font-size: 12px;
  font-weight: 800;
}

.contact-row.is-selected .group-member-check {
  border-color: var(--primary);
  background: var(--primary);
}

.letter-label {
  margin: 18px 12px 6px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
}

.warehouse-sidebar-intro {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 1px 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.warehouse-sidebar-intro > span {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #26c8a4, #14967e);
  color: white;
}

.warehouse-sidebar-intro > div,
.warehouse-step > header > div,
.warehouse-recipient-card > div,
.warehouse-send-summary > div {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.warehouse-sidebar-intro strong,
.warehouse-step > header strong {
  font-size: 13px;
}

.warehouse-sidebar-intro small,
.warehouse-sidebar-tip,
.warehouse-step > header small {
  color: var(--muted);
  font-size: 10px;
}

.warehouse-sidebar-tip {
  margin: 0 8px 16px;
  line-height: 1.6;
}

.warehouse-lookup-flow {
  display: grid;
  gap: 8px;
}

.warehouse-lookup-flow > span {
  display: grid;
  min-width: 0;
  padding: 11px 12px;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
}

.warehouse-lookup-flow b {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px;
}

.warehouse-lookup-flow small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-view {
  padding-top: clamp(24px, 4vw, 42px);
  overflow-anchor: none;
}

.warehouse-view-header {
  display: flex;
  max-width: 860px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.warehouse-view-header h2 {
  margin-top: 3px;
}

.warehouse-mode-badge {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid rgba(32, 183, 166, 0.22);
  border-radius: 999px;
  background: rgba(32, 183, 166, 0.09);
  color: #12947f;
  font-size: 10px;
  font-weight: 800;
}

.warehouse-workbench {
  display: grid;
  max-width: 860px;
  margin: 0 auto;
  gap: 14px;
}

.warehouse-step,
.warehouse-product-card,
.warehouse-awaiting-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: 0 8px 28px rgba(43, 63, 94, 0.055);
}

.warehouse-step {
  padding: 20px;
}

.warehouse-step.is-disabled {
  opacity: 0.62;
}

.warehouse-step > header {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 16px;
}

.warehouse-step > header > b {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
}

.warehouse-step > header > em {
  color: var(--primary);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.warehouse-scan-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 9px;
}

.warehouse-scan-row label {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
}

.warehouse-scan-row label svg {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--muted);
}

.warehouse-scan-row input,
.warehouse-topic-field select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  background: var(--chat-bg);
  color: var(--text);
}

.warehouse-scan-row input {
  padding: 0 14px 0 43px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.025em;
}

.warehouse-scan-row input:focus,
.warehouse-topic-field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.09);
}

.warehouse-lookup-button,
.warehouse-camera-scan-button,
.warehouse-send-summary button {
  min-height: 46px;
  padding: 0 17px;
  border: 0;
  border-radius: 13px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.warehouse-lookup-button,
.warehouse-send-summary button {
  background: var(--primary);
  color: white;
}

.warehouse-camera-scan-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--primary-soft);
  color: var(--primary);
}

.warehouse-camera-scan-button svg {
  width: 16px;
  height: 16px;
}

.warehouse-lookup-message,
.warehouse-photo-summary {
  min-height: 16px;
  margin: 9px 2px 0;
  color: var(--muted);
  font-size: 10px;
}

.warehouse-lookup-message.is-success {
  color: #12947f;
}

.warehouse-lookup-message.is-loading {
  color: var(--primary);
}

.warehouse-lookup-message.is-error {
  color: #e14d5d;
}

.warehouse-scanner-backdrop {
  position: fixed;
  z-index: 175;
  inset: 0;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(8, 16, 29, 0.7);
  backdrop-filter: blur(8px);
}

.warehouse-scanner-dialog {
  display: grid;
  width: min(520px, 100%);
  max-height: min(820px, calc(100dvh - 32px));
  padding: 18px;
  gap: 13px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.3);
}

.warehouse-scanner-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.warehouse-scanner-dialog > header small {
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
}

.warehouse-scanner-dialog > header h2 {
  margin: 2px 0 0;
  font-size: 22px;
}

.warehouse-scanner-dialog > header button {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: var(--chat-bg);
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
}

.warehouse-scanner-reader {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  border-radius: 18px;
  background: #07111f;
}

.warehouse-scanner-reader video,
.warehouse-scanner-reader img,
.warehouse-scanner-reader canvas {
  max-width: 100%;
  border-radius: 18px;
}

.warehouse-scanner-reader > div {
  border: 0 !important;
}

.warehouse-scanner-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}

.warehouse-scanner-status.is-ready,
.warehouse-scanner-status.is-success {
  color: #16895e;
}

.warehouse-scanner-status.is-loading {
  color: var(--primary);
}

.warehouse-scanner-status.is-warning {
  color: #c77a11;
}

.warehouse-scanner-status.is-error {
  color: #d43f50;
}

.warehouse-scanner-actions {
  display: grid;
}

.warehouse-scanner-actions button {
  display: flex;
  min-height: 52px;
  padding: 8px 14px;
  align-items: center;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--line));
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary);
  text-align: left;
  cursor: pointer;
}

.warehouse-scanner-actions button svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

.warehouse-scanner-actions button span {
  display: grid;
  gap: 2px;
}

.warehouse-scanner-actions button b {
  font-size: 12px;
}

.warehouse-scanner-actions button small {
  color: var(--muted);
  font-size: 9px;
}

.warehouse-scanner-tip {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.55;
  text-align: center;
}

.warehouse-burst-backdrop {
  position: fixed;
  z-index: 180;
  inset: 0;
  display: grid;
  padding: 18px;
  place-items: center;
  background: rgba(5, 12, 22, 0.82);
  backdrop-filter: blur(9px);
}

.warehouse-burst-dialog {
  display: grid;
  width: min(620px, 100%);
  max-height: min(900px, calc(100dvh - 24px));
  padding: 17px;
  gap: 12px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.42);
}

.warehouse-burst-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.warehouse-burst-dialog > header small {
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.warehouse-burst-dialog > header h2 {
  margin: 2px 0 0;
  font-size: 21px;
}

.warehouse-burst-dialog > header > button {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: var(--chat-bg);
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
}

.warehouse-burst-stage {
  position: relative;
  min-height: 280px;
  max-height: 58dvh;
  overflow: hidden;
  border-radius: 19px;
  background: #050b13;
  aspect-ratio: 4 / 3;
}

.warehouse-burst-stage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.warehouse-burst-stage-count {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 48px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(4, 11, 20, 0.7);
  color: white;
  font-size: 11px;
  font-weight: 750;
  text-align: center;
  backdrop-filter: blur(8px);
}

.warehouse-burst-flash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: white;
  opacity: 0;
}

.warehouse-burst-flash.is-active {
  animation: warehouse-camera-flash 0.18s ease-out;
}

@keyframes warehouse-camera-flash {
  0% { opacity: 0.85; }
  100% { opacity: 0; }
}

.warehouse-burst-status {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
  text-align: center;
}

.warehouse-burst-status.is-loading {
  color: var(--primary);
}

.warehouse-burst-status.is-ready {
  color: #16895e;
}

.warehouse-burst-status.is-full,
.warehouse-burst-status.is-error {
  color: #d45542;
}

.warehouse-burst-thumbnails {
  display: flex;
  min-height: 70px;
  padding: 7px;
  gap: 7px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--chat-bg);
  scrollbar-width: thin;
}

.warehouse-burst-thumbnails > p {
  display: flex;
  min-width: 100%;
  margin: 0;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10px;
}

.warehouse-burst-thumbnails > p svg {
  width: 18px;
  height: 18px;
}

.warehouse-burst-thumbnails > button {
  position: relative;
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  padding: 0;
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 11px;
  background: #07111f;
  cursor: pointer;
}

.warehouse-burst-thumbnails > button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.warehouse-burst-thumbnails > button span,
.warehouse-burst-thumbnails > button i {
  position: absolute;
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border-radius: 6px;
  background: rgba(4, 11, 20, 0.78);
  color: white;
  font-size: 9px;
  font-style: normal;
}

.warehouse-burst-thumbnails > button span {
  bottom: 3px;
  left: 3px;
}

.warehouse-burst-thumbnails > button i {
  top: 3px;
  right: 3px;
  font-size: 15px;
}

.warehouse-burst-dialog > footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.warehouse-burst-secondary,
.warehouse-burst-done {
  min-height: 43px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--chat-bg);
  color: var(--text);
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.warehouse-burst-done {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.warehouse-burst-shutter {
  display: grid;
  width: 70px;
  height: 70px;
  padding: 5px;
  place-items: center;
  border: 3px solid var(--primary);
  border-radius: 50%;
  background: var(--panel);
  cursor: pointer;
}

.warehouse-burst-shutter span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--primary);
  transition: transform 0.12s ease, opacity 0.12s ease;
}

.warehouse-burst-shutter:active:not(:disabled) span {
  transform: scale(0.86);
}

.warehouse-burst-shutter:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.warehouse-video-recorder-backdrop {
  position: fixed;
  z-index: 181;
  inset: 0;
  display: grid;
  padding: 18px;
  place-items: center;
  background: rgba(5, 12, 22, 0.86);
  backdrop-filter: blur(9px);
}

.warehouse-video-recorder-dialog {
  display: grid;
  width: min(620px, 100%);
  max-height: min(900px, calc(100dvh - 24px));
  padding: 17px;
  gap: 12px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.44);
}

.warehouse-video-recorder-dialog > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.warehouse-video-recorder-dialog > header small {
  color: #e8495b;
  font-size: 10px;
  font-weight: 800;
}

.warehouse-video-recorder-dialog > header h2 {
  margin: 2px 0 0;
  font-size: 21px;
}

.warehouse-video-recorder-dialog > header > button {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: var(--chat-bg);
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
}

.warehouse-video-recorder-stage {
  position: relative;
  min-height: 280px;
  max-height: 58dvh;
  overflow: hidden;
  border-radius: 19px;
  background: #050b13;
  aspect-ratio: 16 / 9;
}

.warehouse-video-recorder-stage video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.warehouse-video-recording-mark {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  min-width: 72px;
  padding: 7px 10px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(4, 11, 20, 0.72);
  color: white;
  font-size: 11px;
  backdrop-filter: blur(8px);
}

.warehouse-video-recording-mark i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9ba5b4;
}

.warehouse-video-recorder-backdrop.is-recording .warehouse-video-recording-mark i {
  background: #ff4055;
  animation: warehouse-video-recording-pulse 1s ease-in-out infinite;
}

@keyframes warehouse-video-recording-pulse {
  50% { opacity: 0.25; }
}

.warehouse-video-recorder-status {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.warehouse-video-recorder-status.is-loading {
  color: var(--primary);
}

.warehouse-video-recorder-status.is-ready {
  color: #16895e;
}

.warehouse-video-recorder-status.is-recording,
.warehouse-video-recorder-status.is-error {
  color: #d43f50;
}

.warehouse-video-recorder-dialog > footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.warehouse-video-recorder-secondary,
.warehouse-video-recorder-cancel {
  min-height: 43px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--chat-bg);
  color: var(--text);
  font-size: 10px;
  font-weight: 750;
  cursor: pointer;
}

.warehouse-video-record-button {
  display: grid;
  width: 76px;
  height: 76px;
  padding: 5px;
  place-items: center;
  border: 3px solid #e8495b;
  border-radius: 50%;
  background: var(--panel);
  color: white;
  cursor: pointer;
}

.warehouse-video-record-button i {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #e8495b;
  transition: border-radius 0.16s ease, transform 0.16s ease;
}

.warehouse-video-record-button span {
  position: relative;
  grid-area: 1 / 1;
  font-size: 9px;
  font-weight: 800;
}

.warehouse-video-recorder-backdrop.is-recording .warehouse-video-record-button i {
  width: 70%;
  height: 70%;
  border-radius: 13px;
}

.warehouse-video-record-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

.warehouse-awaiting-card {
  display: flex;
  min-height: 116px;
  padding: 23px;
  align-items: center;
  justify-content: center;
  gap: 15px;
  border-style: dashed;
  color: var(--muted);
}

.warehouse-awaiting-card > span {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 15px;
  background: var(--primary-soft);
  color: var(--primary);
}

.warehouse-awaiting-card strong {
  color: var(--text);
  font-size: 13px;
}

.warehouse-awaiting-card p {
  margin: 5px 0 0;
  font-size: 10px;
}

.warehouse-product-card {
  overflow: hidden;
}

.warehouse-product-card > header {
  display: flex;
  min-height: 66px;
  padding: 13px 18px;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(115deg, rgba(32, 183, 166, 0.09), rgba(22, 119, 255, 0.04));
}

.warehouse-product-card > header > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #20b7a6;
  color: white;
}

.warehouse-product-card > header > div {
  display: grid;
  flex: 1;
  gap: 1px;
}

.warehouse-product-card > header small,
.warehouse-product-grid small,
.warehouse-recipient-card small {
  color: var(--muted);
  font-size: 9px;
}

.warehouse-product-card > header strong {
  font-size: 14px;
  letter-spacing: 0.03em;
}

.warehouse-product-card > header i,
.warehouse-recipient-card > i {
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(32, 183, 166, 0.12);
  color: #12947f;
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.warehouse-product-grid {
  display: grid;
  padding: 17px 18px;
  grid-template-columns: 1.5fr 1fr;
  gap: 12px;
}

.warehouse-product-grid > div {
  display: grid;
  gap: 5px;
}

.warehouse-product-grid strong,
.warehouse-recipient-card strong {
  font-size: 12px;
}

.warehouse-recipient-card {
  display: flex;
  margin: 0 18px 18px;
  padding: 12px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--chat-bg);
}

.warehouse-recipient-card span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-photo-actions {
  display: grid;
  margin-bottom: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.warehouse-photo-actions button {
  display: flex;
  min-height: 62px;
  padding: 11px 14px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--chat-bg);
  text-align: left;
  cursor: pointer;
}

.warehouse-photo-actions button:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--primary) 30%, var(--line));
  background: var(--primary-soft);
}

.warehouse-photo-actions button:disabled,
.warehouse-lookup-button:disabled,
.warehouse-send-summary button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.warehouse-photo-actions button > svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.warehouse-photo-actions button > span {
  display: grid;
  gap: 2px;
}

.warehouse-photo-actions b {
  font-size: 11px;
}

.warehouse-photo-actions small {
  color: var(--muted);
  font-size: 9px;
}

.warehouse-photo-zone {
  min-height: 118px;
  padding: 10px;
  border: 1px dashed color-mix(in srgb, var(--muted) 38%, transparent);
  border-radius: 16px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.warehouse-photo-zone.is-dragging {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.warehouse-photo-empty {
  display: grid;
  min-height: 96px;
  place-items: center;
  align-content: center;
  gap: 4px;
  color: var(--muted);
  text-align: center;
}

.warehouse-photo-empty svg {
  width: 28px;
  height: 28px;
  margin-bottom: 3px;
  color: var(--faint);
}

.warehouse-photo-empty strong {
  color: var(--text);
  font-size: 11px;
}

.warehouse-photo-empty small {
  font-size: 9px;
}

.warehouse-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.warehouse-photo-grid figure,
.warehouse-photo-add {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  background: var(--chat-bg);
}

.warehouse-photo-grid figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.warehouse-photo-grid figcaption {
  position: absolute;
  right: 5px;
  bottom: 5px;
  left: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.warehouse-photo-grid figcaption span,
.warehouse-photo-grid figcaption button {
  display: grid;
  width: 24px;
  height: 24px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: rgba(11, 20, 33, 0.75);
  color: white;
  font-size: 10px;
}

.warehouse-photo-grid figcaption button {
  cursor: pointer;
  font-size: 17px;
}

.warehouse-photo-add {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  border: 1px dashed var(--line);
  color: var(--primary);
  cursor: pointer;
}

.warehouse-photo-add span {
  font-size: 9px;
  font-weight: 750;
}

.warehouse-video-zone {
  margin-top: 10px;
}

.warehouse-video-empty,
.warehouse-video-preview {
  display: flex;
  min-height: 70px;
  padding: 10px 12px;
  align-items: center;
  gap: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--chat-bg);
}

.warehouse-video-empty > svg {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  color: var(--primary);
}

.warehouse-video-empty > span,
.warehouse-video-preview > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.warehouse-video-empty strong,
.warehouse-video-preview strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-video-empty small,
.warehouse-video-preview small {
  color: var(--muted);
  font-size: 9px;
}

.warehouse-video-preview video {
  width: 106px;
  height: 66px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: #07111f;
  object-fit: cover;
}

.warehouse-video-preview > div {
  flex: 1 1 auto;
}

.warehouse-video-preview > button {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: rgba(232, 73, 91, 0.1);
  color: #d43f50;
  font-size: 19px;
  cursor: pointer;
}

.warehouse-topic-field {
  display: grid;
  margin-bottom: 13px;
  gap: 6px;
}

.warehouse-topic-field > span {
  font-size: 10px;
  font-weight: 750;
}

.warehouse-topic-field select {
  padding: 0 12px;
  font-size: 11px;
}

.warehouse-topic-field small,
.warehouse-send-summary small {
  color: var(--muted);
  font-size: 9px;
}

.warehouse-send-summary {
  display: flex;
  padding: 13px;
  align-items: center;
  gap: 11px;
  border-radius: 15px;
  background: var(--chat-bg);
}

.warehouse-send-summary > span {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
}

.warehouse-send-summary strong {
  font-size: 11px;
}

.warehouse-send-summary small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-remark-field,
.warehouse-supervisor-field {
  display: grid;
  margin-bottom: 13px;
  gap: 6px;
}

.warehouse-supervisor-field.is-hidden {
  display: none;
}

.warehouse-remark-field > span,
.warehouse-supervisor-field > span {
  font-size: 10px;
  font-weight: 750;
}

.warehouse-remark-field textarea,
.warehouse-supervisor-field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: 0;
  background: var(--chat-bg);
  color: var(--text);
  font: inherit;
}

.warehouse-remark-field textarea {
  min-height: 84px;
  padding: 12px;
  resize: vertical;
  line-height: 1.55;
}

.warehouse-supervisor-field select {
  height: 46px;
  padding: 0 12px;
}

.warehouse-remark-field textarea:focus,
.warehouse-supervisor-field select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.09);
}

.warehouse-remark-field small,
.warehouse-supervisor-field small {
  color: var(--muted);
  font-size: 9px;
}

.message-bubble.warehouse-event-message-bubble {
  width: min(336px, 70vw);
  max-width: 100%;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(20, 162, 123, 0.2);
  border-radius: 18px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 9px 26px rgba(23, 105, 78, 0.12);
  white-space: normal;
}

.message-bubble.warehouse-event-message-bubble.has-metadata {
  padding: 8px;
}

.warehouse-event-message-card {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--panel);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.warehouse-event-message-card:hover {
  background: color-mix(in srgb, var(--panel) 96%, #20b7a6);
}

.warehouse-event-message-head {
  display: grid;
  padding: 13px 14px 11px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(32, 183, 166, 0.16), rgba(22, 119, 255, 0.05));
}

.warehouse-event-message-logo {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #20b7a6, #118d78);
  color: #fff;
  box-shadow: 0 6px 14px rgba(20, 153, 128, 0.25);
  font-size: 16px;
  font-weight: 900;
}

.warehouse-event-message-head > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.warehouse-event-message-head b {
  font-size: 12px;
}

.warehouse-event-message-head small {
  color: var(--muted);
  font-size: 9px;
}

.warehouse-event-message-head > i {
  max-width: 132px;
  padding: 4px 7px;
  border-radius: 9px;
  background: rgba(238, 146, 30, 0.13);
  color: #c76f05;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
  text-align: center;
}

.warehouse-event-message-head > i.is-inbound,
.warehouse-event-message-head > i.is-replacement_approved,
.warehouse-event-message-head > i.is-return_approved,
.warehouse-event-message-head > i.is-shipping_notified,
.warehouse-event-message-head > i.is-shipping_completed {
  background: rgba(31, 167, 116, 0.12);
  color: #16895e;
}

.warehouse-event-message-head > i.is-pending_supervisor {
  background: rgba(22, 119, 255, 0.11);
  color: var(--primary);
}

.warehouse-event-message-head > i.is-approval_rejected {
  background: rgba(232, 73, 91, 0.11);
  color: #d43f50;
}

.warehouse-event-message-body {
  display: grid;
  padding: 13px 14px 12px;
  gap: 7px;
}

.warehouse-event-message-body > strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-event-message-body > span {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
}

.warehouse-event-message-body > span b {
  color: #12947f;
  font-size: 9px;
}

.warehouse-event-message-body > small {
  padding: 7px 9px;
  border-radius: 9px;
  background: var(--chat-bg);
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.warehouse-event-message-foot {
  display: flex;
  margin: 0 14px;
  padding: 10px 0 11px;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
}

.warehouse-event-message-foot small {
  color: var(--muted);
  font-size: 8px;
}

.warehouse-event-message-foot > b {
  color: #12947f;
  font-size: 9px;
}

.warehouse-detail-badge {
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(32, 183, 166, 0.13);
  color: #12947f;
  font-size: 9px;
  font-weight: 850;
}

.warehouse-event-detail-status {
  display: grid;
  margin-bottom: 12px;
  padding: 13px;
  gap: 4px;
  border-radius: 14px;
  background: rgba(238, 146, 30, 0.1);
}

.warehouse-event-detail-status small {
  color: var(--muted);
  font-size: 9px;
}

.warehouse-event-detail-status strong {
  color: #c76f05;
  font-size: 13px;
}

.warehouse-event-detail-status.is-inbound,
.warehouse-event-detail-status.is-replacement_approved,
.warehouse-event-detail-status.is-return_approved,
.warehouse-event-detail-status.is-shipping_notified,
.warehouse-event-detail-status.is-shipping_completed {
  background: rgba(31, 167, 116, 0.1);
}

.warehouse-event-detail-status.is-inbound strong,
.warehouse-event-detail-status.is-replacement_approved strong,
.warehouse-event-detail-status.is-return_approved strong,
.warehouse-event-detail-status.is-shipping_notified strong,
.warehouse-event-detail-status.is-shipping_completed strong {
  color: #16895e;
}

.warehouse-event-detail-status.is-approval_rejected {
  background: rgba(232, 73, 91, 0.1);
}

.warehouse-event-detail-status.is-approval_rejected strong {
  color: #d43f50;
}

.warehouse-event-detail-images {
  margin-top: 13px;
}

.warehouse-event-detail-images h3 {
  margin: 0 0 9px;
  font-size: 11px;
}

.warehouse-event-detail-images h3 small {
  color: var(--muted);
  font-weight: 500;
}

.warehouse-event-detail-images > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.warehouse-event-detail-images button {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--chat-bg);
  color: var(--muted);
  cursor: pointer;
}

.warehouse-event-detail-images img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.warehouse-event-detail-videos {
  margin-top: 13px;
}

.warehouse-event-detail-videos h3 {
  margin: 0 0 9px;
  font-size: 11px;
}

.warehouse-event-detail-videos h3 small {
  color: var(--muted);
  font-weight: 500;
}

.warehouse-event-detail-videos > div {
  display: grid;
  gap: 9px;
}

.warehouse-event-detail-videos article {
  display: grid;
  padding: 10px;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--chat-bg);
}

.warehouse-event-detail-videos video {
  width: 100%;
  max-height: 360px;
  border-radius: 11px;
  background: #07111f;
}

.warehouse-event-video-copy {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.warehouse-event-video-copy > svg {
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  color: var(--primary);
}

.warehouse-event-video-copy > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.warehouse-event-video-copy b {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-event-video-copy small {
  color: var(--muted);
  font-size: 9px;
}

.warehouse-event-video-actions {
  display: flex;
  gap: 7px;
}

.warehouse-event-video-actions button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 25%, var(--line));
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 9px;
  font-weight: 750;
  cursor: pointer;
}

.warehouse-event-video-actions button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.warehouse-event-detail-footer {
  flex-wrap: wrap;
}

.warehouse-recipient-actions,
.warehouse-supervisor-actions,
.warehouse-shipping-actions {
  display: flex;
  flex: 1 1 auto;
  justify-content: flex-end;
  gap: 7px;
}

.warehouse-recipient-actions button,
.warehouse-supervisor-actions button,
.warehouse-shipping-actions button {
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 11px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.warehouse-recipient-actions button:last-child,
.warehouse-supervisor-actions button:last-child,
.warehouse-shipping-actions button {
  background: #20a88f;
  color: #fff;
}

.warehouse-supervisor-actions button:first-child {
  background: rgba(232, 73, 91, 0.1);
  color: #d43f50;
}

.warehouse-action-submit-panel {
  display: grid;
  width: 100%;
  flex: 1 0 100%;
  padding: 14px;
  gap: 11px;
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  border-radius: 14px;
  background: var(--chat-bg);
}

.warehouse-action-submit-panel[hidden] {
  display: none;
}

.warehouse-action-submit-panel > header {
  display: grid;
  gap: 2px;
}

.warehouse-action-submit-panel > header strong {
  font-size: 12px;
}

.warehouse-action-submit-panel > header small,
.warehouse-action-submit-panel label small {
  color: var(--muted);
  font-size: 9px;
}

.warehouse-action-submit-panel label {
  display: grid;
  gap: 6px;
}

.warehouse-action-submit-panel label > span {
  font-size: 10px;
  font-weight: 750;
}

.warehouse-action-submit-panel textarea,
.warehouse-action-submit-panel select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  background: var(--panel);
  color: var(--text);
  font: inherit;
}

.warehouse-action-submit-panel textarea {
  min-height: 88px;
  padding: 10px;
  resize: vertical;
  line-height: 1.5;
}

.warehouse-action-submit-panel select {
  height: 42px;
  padding: 0 10px;
}

.warehouse-action-submit-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.warehouse-action-submit-buttons button {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: var(--panel);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.warehouse-action-submit-buttons button:last-child {
  background: var(--primary);
  color: #fff;
}

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

.oa-sidebar-icon svg {
  width: 23px;
  height: 23px;
}

.oa-sidebar-summary {
  display: grid;
  margin: 12px 1px;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.oa-sidebar-summary span {
  display: grid;
  padding: 12px 8px;
  justify-items: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
}

.oa-sidebar-summary b {
  color: var(--primary);
  font-size: 18px;
}

.oa-sidebar-summary small,
.oa-sidebar-tip {
  color: var(--muted);
  font-size: 9px;
}

.oa-sidebar-tip {
  margin: 8px 5px;
  line-height: 1.75;
}

.oa-events-header,
.oa-event-filters,
.oa-event-result-bar,
.oa-event-results {
  width: min(1040px, 100%);
  max-width: none;
  margin-inline: auto;
}

.oa-event-filters {
  display: grid;
  margin-bottom: 14px;
  grid-template-columns: minmax(130px, 0.8fr) minmax(150px, 1fr) minmax(190px, 1.4fr) auto auto;
  align-items: end;
  gap: 10px;
}

.oa-event-filters label {
  display: grid;
  min-width: 0;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.oa-event-filters input,
.oa-event-filters select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
}

.oa-event-filters input:focus,
.oa-event-filters select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.09);
}

.oa-query-button,
.oa-reset-button,
.oa-event-result-bar button,
.oa-event-state button {
  height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
}

.oa-query-button {
  background: var(--primary);
  color: white;
  box-shadow: 0 8px 18px rgba(22, 119, 255, 0.2);
}

.oa-reset-button,
.oa-event-result-bar button,
.oa-event-state button {
  background: var(--primary-soft);
  color: var(--primary);
}

.oa-event-result-bar {
  display: flex;
  min-height: 34px;
  margin-bottom: 9px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 10px;
}

.oa-event-result-bar button {
  height: 30px;
  padding-inline: 11px;
}

.oa-event-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 8px 28px rgba(33, 53, 84, 0.05);
}

.oa-event-table-head,
.oa-event-row {
  display: grid;
  grid-template-columns: 100px minmax(220px, 1fr) 120px 155px minmax(86px, auto);
  align-items: center;
  gap: 14px;
}

.oa-event-table-head {
  min-height: 42px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--chat-bg) 72%, var(--panel));
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.oa-event-row {
  width: 100%;
  min-height: 74px;
  padding: 12px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: background 0.18s ease;
}

.oa-event-row:last-child {
  border-bottom: 0;
}

.oa-event-row:hover,
.oa-event-row:focus-visible {
  background: var(--chat-bg);
  outline: none;
}

.oa-scope-badge,
.oa-status-badge {
  display: inline-flex;
  width: fit-content;
  min-height: 24px;
  padding: 4px 9px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 780;
  line-height: 1;
  white-space: nowrap;
}

.oa-scope-badge.is-personal {
  background: rgba(22, 119, 255, 0.11);
  color: var(--primary);
}

.oa-scope-badge.is-group {
  background: rgba(132, 91, 224, 0.12);
  color: #7954d6;
}

.oa-status-badge.is-pending {
  background: rgba(238, 146, 30, 0.13);
  color: #cf750b;
}

.oa-status-badge.is-pending_confirmation {
  background: rgba(31, 143, 222, 0.12);
  color: #187fc2;
}

.oa-status-badge.is-completed {
  background: rgba(31, 167, 116, 0.12);
  color: #16895e;
}

.oa-event-main {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.oa-event-main strong,
.oa-event-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oa-event-main strong {
  font-size: 13px;
}

.oa-event-main small,
.oa-event-row time {
  color: var(--muted);
  font-size: 10px;
}

.oa-event-go {
  color: var(--faint);
  font-size: 21px;
  text-align: right;
}

.oa-event-action {
  min-width: 78px;
  height: 32px;
  padding: 0 12px;
  justify-self: end;
  border: 0;
  border-radius: 10px;
  color: white;
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 780;
  white-space: nowrap;
  box-shadow: 0 6px 15px rgba(22, 119, 255, 0.18);
}

.oa-event-action.is-complete {
  background: linear-gradient(135deg, #2187ff, #176be0);
}

.oa-event-action.is-confirm {
  background: linear-gradient(135deg, #24ae7d, #16895e);
  box-shadow: 0 6px 15px rgba(31, 167, 116, 0.2);
}

.oa-event-action:disabled {
  cursor: wait;
  opacity: 0.65;
}

.oa-event-state {
  display: grid;
  min-height: 250px;
  padding: 40px 20px;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--panel) 76%, transparent);
  text-align: center;
}

.oa-event-state strong {
  font-size: 14px;
}

.oa-event-state p {
  max-width: 430px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.oa-event-state.is-error strong {
  color: #e14257;
}

.oa-event-detail-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(13, 23, 39, 0.46);
  backdrop-filter: blur(9px);
  z-index: 130;
  animation: fadeIn 0.18s ease both;
}

.screenshot-editor-backdrop {
  position: fixed;
  z-index: 142;
  inset: 0;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(8, 16, 29, 0.68);
  backdrop-filter: blur(10px);
  animation: fadeIn 0.18s ease both;
}

.screenshot-editor {
  display: flex;
  width: min(980px, 100%);
  max-height: calc(100dvh - 40px);
  min-height: 0;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.38);
}

.screenshot-editor > header {
  display: flex;
  padding: 16px 18px 13px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.screenshot-editor > header small {
  display: block;
  margin-bottom: 2px;
  color: var(--primary);
  font-size: 10px;
  font-weight: 800;
}

.screenshot-editor > header h2 {
  margin: 0;
  font-size: 18px;
}

.screenshot-editor > header button {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 10px;
  background: var(--chat-bg);
  color: var(--muted);
  cursor: pointer;
  font-size: 20px;
}

.screenshot-editor-body {
  display: flex;
  min-height: 0;
  padding: 16px 18px 10px;
  flex: 1 1 auto;
  flex-direction: column;
}

.screenshot-canvas-scroll {
  display: flex;
  min-height: 0;
  overflow: auto;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #111827;
}

.screenshot-stage {
  position: relative;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  flex: 0 0 auto;
  cursor: crosshair;
  line-height: 0;
  touch-action: none;
  user-select: none;
}

.screenshot-stage canvas {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 58dvh;
}

.screenshot-selection {
  position: absolute;
  border: 2px solid #ffffff;
  border-radius: 3px;
  box-shadow: 0 0 0 9999px rgba(3, 10, 22, 0.56), 0 0 0 1px rgba(22, 119, 255, 0.9);
  pointer-events: none;
}

.screenshot-editor-body > p {
  margin: 9px 2px 0;
  color: var(--muted);
  font-size: 11px;
}

.screenshot-editor > footer {
  display: flex;
  padding: 12px 18px 16px;
  justify-content: flex-end;
  gap: 9px;
  border-top: 1px solid var(--line);
}

.screenshot-editor > footer button {
  min-width: 92px;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
}

.screenshot-cancel,
.screenshot-full {
  background: var(--chat-bg);
  color: var(--muted);
}

.screenshot-send {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 7px 16px rgba(22, 119, 255, 0.24);
}

.chat-oa-event-composer-backdrop {
  position: fixed;
  z-index: 132;
  inset: 0;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(13, 23, 39, 0.48);
  backdrop-filter: blur(9px);
  animation: fadeIn 0.18s ease both;
}

.chat-oa-event-composer {
  display: flex;
  width: min(560px, 100%);
  max-height: min(760px, calc(100dvh - 40px));
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 28px 80px rgba(13, 27, 48, 0.28);
}

.chat-oa-event-composer > header {
  display: flex;
  padding: 18px 20px 14px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.chat-oa-event-composer > header h2 {
  margin: 0;
  font-size: 20px;
}

.chat-oa-event-composer > header button {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 10px;
  background: var(--chat-bg);
  color: var(--muted);
  cursor: pointer;
  font-size: 20px;
}

.chat-oa-event-fields {
  display: grid;
  min-height: 0;
  overflow-y: auto;
  gap: 14px;
  padding: 18px 20px;
}

.chat-oa-event-fields label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 11px;
  font-weight: 750;
}

.chat-oa-event-fields input,
.chat-oa-event-fields select,
.chat-oa-event-fields textarea {
  width: 100%;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  resize: vertical;
  background: var(--chat-bg);
  color: var(--text);
  font: inherit;
  font-weight: 500;
}

.chat-oa-event-fields input:focus,
.chat-oa-event-fields select:focus,
.chat-oa-event-fields textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.08);
}

.chat-oa-recipient-field {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 11px;
  font-weight: 750;
}

.chat-oa-recipient-field > small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.chat-oa-recipient-card {
  display: flex;
  min-height: 52px;
  padding: 8px 10px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--chat-bg);
}

.chat-oa-recipient-card > span:not(.avatar) {
  display: grid;
  min-width: 0;
  flex: 1;
  gap: 2px;
}

.chat-oa-recipient-card strong,
.chat-oa-recipient-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-oa-recipient-card strong {
  font-size: 12px;
}

.chat-oa-recipient-card small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.chat-oa-recipient-card > b {
  padding: 4px 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(22, 119, 255, 0.1);
  color: var(--primary);
  font-size: 9px;
  font-weight: 750;
}

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

.chat-oa-topic-field {
  position: relative;
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 11px;
  font-weight: 750;
}

.chat-oa-topic-button {
  display: flex;
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--chat-bg);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  text-align: left;
}

.chat-oa-topic-button.has-value {
  color: var(--text);
}

.chat-oa-topic-button:focus-visible,
.chat-oa-topic-button[aria-expanded="true"] {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.08);
}

.chat-oa-topic-button > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-oa-topic-button > b {
  flex: 0 0 auto;
  color: var(--primary);
  font-size: 16px;
}

.chat-oa-topic-picker {
  position: absolute;
  z-index: 5;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--panel);
  box-shadow: 0 15px 40px rgba(18, 34, 58, 0.2);
}

.chat-oa-topic-picker[hidden] {
  display: none;
}

.chat-oa-topic-search {
  padding: 10px 10px 7px;
}

.chat-oa-topic-search input {
  min-height: 38px;
  background: var(--chat-bg);
}

.chat-oa-topic-results {
  display: grid;
  max-height: 230px;
  padding: 0 7px 8px;
  overflow-y: auto;
  align-content: start;
  gap: 4px;
  overscroll-behavior: contain;
}

.chat-oa-topic-option {
  display: flex;
  min-height: 40px;
  padding: 8px 10px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: var(--chat-bg);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.chat-oa-topic-option:hover,
.chat-oa-topic-option.is-active,
.chat-oa-topic-option.is-selected {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.chat-oa-topic-option > span {
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-oa-topic-option > small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 8px;
}

.chat-oa-topic-empty {
  padding: 24px 12px;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.chat-oa-attachment-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 11px;
  font-weight: 750;
}

.chat-oa-attachment-field > span,
.chat-oa-attachment-list {
  grid-column: 1 / -1;
}

.chat-oa-attachment-field > button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(22, 119, 255, 0.24);
  border-radius: 9px;
  background: var(--primary-soft);
  color: var(--primary);
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 750;
}

.chat-oa-attachment-field > small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-oa-attachment-list {
  display: grid;
  margin-top: 4px;
  gap: 7px;
}

.chat-oa-attachment-list[hidden] {
  display: none;
}

.chat-oa-attachment-item {
  display: grid;
  min-width: 0;
  min-height: 52px;
  padding: 7px 8px;
  grid-template-columns: 38px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--chat-bg);
}

.chat-oa-attachment-item > img,
.chat-oa-attachment-item > .file-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--panel);
  object-fit: cover;
}

.chat-oa-attachment-item > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.chat-oa-attachment-item strong,
.chat-oa-attachment-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-oa-attachment-item strong {
  font-size: 10px;
}

.chat-oa-attachment-item small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 550;
}

.chat-oa-attachment-item > button {
  display: grid;
  width: 28px;
  height: 28px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 17px;
}

.chat-oa-event-composer > footer {
  display: flex;
  padding: 13px 20px 17px;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.chat-oa-event-composer > footer button {
  min-width: 92px;
  height: 40px;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
}

.chat-oa-event-composer > footer button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.oa-event-detail {
  display: flex;
  width: min(620px, 100%);
  max-height: min(720px, calc(100dvh - 40px));
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 28px 80px rgba(13, 27, 48, 0.25);
}

.oa-event-detail > header {
  display: flex;
  padding: 18px 20px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--line);
}

.oa-event-detail > header > div {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.oa-event-detail > header small {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oa-event-detail > header button {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 10px;
  background: var(--chat-bg);
  color: var(--muted);
  cursor: pointer;
  font-size: 20px;
}

.oa-event-detail-body {
  min-height: 0;
  padding: 22px;
  overflow-y: auto;
}

.oa-event-detail-body h2 {
  margin: 0 0 18px;
  font-size: 22px;
  line-height: 1.35;
}

.oa-event-detail-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.oa-event-detail-meta > span {
  display: grid;
  min-width: 0;
  padding: 12px;
  gap: 6px;
  border-radius: 12px;
  background: var(--chat-bg);
}

.oa-event-detail-meta small {
  color: var(--muted);
  font-size: 9px;
}

.oa-event-detail-meta b:not(.oa-status-badge) {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oa-event-content {
  margin-top: 18px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--chat-bg) 58%, var(--panel));
}

.oa-event-content h3 {
  margin: 0 0 9px;
  font-size: 12px;
}

.oa-event-content p {
  margin: 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.oa-event-attachments {
  margin-top: 16px;
}

.oa-event-attachments > h3 {
  display: flex;
  margin: 0 0 9px;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  font-size: 12px;
}

.oa-event-attachments > h3 small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
}

.oa-event-image-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.oa-event-attachment-image {
  display: grid;
  min-width: 0;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--chat-bg);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 9px;
  text-decoration: none;
}

.oa-event-attachment-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.oa-event-file-list {
  display: grid;
  gap: 8px;
}

.oa-event-file {
  display: grid;
  width: 100%;
  min-width: 0;
  min-height: 58px;
  padding: 10px 12px;
  grid-template-columns: 34px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--chat-bg);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.oa-event-file > span:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.oa-event-file strong,
.oa-event-file small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.oa-event-file strong {
  font-size: 11px;
}

.oa-event-file small {
  color: var(--muted);
  font-size: 9px;
}

.oa-event-file > b {
  color: var(--primary);
  font-size: 18px;
  text-align: center;
}

.oa-event-file:disabled {
  cursor: wait;
  opacity: 0.65;
}

.oa-event-image {
  display: block;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--chat-bg);
}

.oa-event-image img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
}

.chat-oa-event-detail-image {
  display: grid;
  width: 100%;
  min-height: 110px;
  margin-top: 14px;
  overflow: hidden;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--chat-bg);
  color: var(--muted);
  cursor: pointer;
}

.chat-oa-event-detail-image img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
}

.oa-event-detail > footer {
  display: flex;
  padding: 14px 20px 18px;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.oa-event-detail > footer button {
  min-width: 92px;
  height: 40px;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 750;
}

.oa-detail-cancel {
  background: var(--chat-bg);
  color: var(--muted);
}

.oa-enter-chat {
  background: var(--primary);
  color: white;
  box-shadow: 0 8px 18px rgba(22, 119, 255, 0.2);
}

.oa-event-detail > footer .oa-event-action {
  min-width: 104px;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px;
  border-radius: 22px;
  background: var(--panel);
  box-shadow: 0 8px 26px rgba(34, 54, 86, 0.06);
}

.profile-card h2 {
  margin: 0 0 5px;
  font-size: 20px;
}

.profile-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.profile-identity {
  min-width: 0;
  flex: 1;
}

.profile-work-info {
  display: flex;
  margin: 9px 0 7px;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.profile-work-info > span:not(.work-status) {
  padding: 3px 7px;
  border-radius: 7px;
  background: var(--chat-bg);
  color: var(--muted);
  font-size: 9px;
}

.profile-card .profile-qr {
  margin-left: auto;
  color: var(--faint);
  font-size: 26px;
}

.profile-menu {
  margin-top: 15px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--panel);
}

.profile-menu button {
  display: flex;
  width: 100%;
  min-height: 54px;
  padding: 0 17px;
  align-items: center;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.profile-menu button:last-child {
  border-bottom: 0;
}

.profile-menu button:hover {
  background: var(--chat-bg);
}

.profile-menu button svg {
  width: 19px;
  height: 19px;
  color: var(--primary);
}

.profile-menu button span {
  flex: 1;
  font-size: 13px;
}

.profile-menu button b {
  color: var(--faint);
  font-size: 18px;
  font-weight: 400;
}

.profile-logout {
  display: flex;
  width: 100%;
  height: 52px;
  margin-top: 15px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(225, 66, 87, 0.18);
  border-radius: 16px;
  background: rgba(225, 66, 87, 0.07);
  color: #e14257;
  cursor: pointer;
  font-size: 12px;
  font-weight: 680;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.profile-logout svg {
  width: 18px;
  height: 18px;
  color: #e14257;
}

.profile-logout:hover {
  background: rgba(225, 66, 87, 0.12);
}

.profile-logout:active {
  transform: scale(0.985);
}

.list-empty {
  padding: 50px 20px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.mobile-tabs {
  display: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  padding: 20px;
  place-items: center;
  background: rgba(13, 23, 39, 0.42);
  backdrop-filter: blur(8px);
  z-index: 100;
  animation: fadeIn 0.2s ease both;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  position: relative;
  display: flex;
  width: min(430px, 100%);
  height: min(650px, calc(100dvh - 40px));
  min-height: 0;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 23px;
  background: var(--panel);
  box-shadow: 0 25px 80px rgba(20, 34, 55, 0.28);
  animation: modalIn 0.25s ease both;
}

.modal header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  padding: 20px 21px 13px;
}

.modal h2 {
  margin: 0;
  font-size: 20px;
}

.modal-close {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: var(--chat-bg);
  color: var(--muted);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.modal-mode-tabs {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 4px;
  margin: 0 20px 12px;
  padding: 4px;
  border-radius: 12px;
  background: var(--chat-bg);
}

.modal-mode-tabs[hidden],
.group-create-setup[hidden],
.event-group-create-setup[hidden],
.event-group-member-setup[hidden],
.event-topic-picker[hidden],
.modal-search[hidden],
.modal-list[hidden] {
  display: none;
}

.modal-mode-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.modal-mode-tabs button.is-active {
  background: var(--panel);
  color: var(--primary);
  box-shadow: 0 3px 10px rgba(31, 51, 80, 0.08);
}

.group-create-setup {
  display: grid;
  flex: 0 0 auto;
  gap: 10px;
  margin: 0 20px 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--chat-bg);
}

.group-create-setup label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 10px;
}

.group-create-setup input {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  background: var(--panel);
  color: var(--text);
  font: inherit;
}

.group-create-setup input:focus {
  border-color: var(--primary);
}

.group-create-setup > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
}

.group-create-setup button {
  min-height: 32px;
  padding: 0 13px;
  border: 0;
  border-radius: 9px;
  background: var(--primary);
  color: white;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.group-create-setup button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.modal.event-group-modal {
  height: auto;
  max-height: calc(100dvh - 40px);
}

.modal.event-group-modal.event-group-members-modal {
  height: min(720px, calc(100dvh - 40px));
}

.event-group-create-setup {
  display: grid;
  flex: 0 0 auto;
  gap: 11px;
  margin: 0 20px 12px;
  padding: 12px;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--chat-bg);
}

.event-group-create-setup.is-busy {
  opacity: 0.6;
  pointer-events: none;
}

.event-group-create-setup label {
  display: grid;
  gap: 7px;
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.event-group-create-setup input,
.event-group-create-setup select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-weight: 500;
}

.event-topic-select-button {
  width: 100%;
  min-height: 42px;
  overflow: hidden;
  padding: 9px 36px 9px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 500;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-topic-select-button::after {
  content: "选择";
  float: right;
  margin-right: -25px;
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
}

.event-topic-select-button.has-value {
  color: var(--text);
}

.event-topic-select-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.event-group-create-setup input:focus,
.event-group-create-setup select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(28, 120, 255, 0.1);
}

.event-group-create-setup select:disabled,
.event-group-create-setup input:disabled {
  cursor: wait;
  opacity: 0.65;
}

.event-group-order-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
}

.event-group-order-row input {
  height: 42px;
  overflow: hidden;
  white-space: nowrap;
}

.event-group-order-row button,
.event-group-submit {
  min-height: 40px;
  padding: 0 17px;
  border: 0;
  border-radius: 9px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.event-group-order-row button:disabled,
.event-group-submit:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.event-order-status {
  min-height: 16px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.event-order-status.is-success {
  color: #10a66a;
}

.event-order-status.is-error {
  color: #e24a4a;
}

.event-group-submit {
  min-width: 126px;
  border-radius: 20px;
}

.event-group-create-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.event-group-member-setup {
  display: grid;
  flex: 0 0 auto;
  gap: 9px;
  margin: 0 20px 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--chat-bg);
}

.event-group-member-setup.is-busy {
  opacity: 0.6;
  pointer-events: none;
}

.event-group-member-setup > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
}

.event-group-back {
  justify-self: start;
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}

.event-topic-picker {
  position: absolute;
  z-index: 20;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  border-radius: inherit;
  background: rgba(24, 36, 55, 0.42);
  backdrop-filter: blur(5px);
}

.event-topic-picker-dialog {
  display: flex;
  width: min(380px, 100%);
  height: min(390px, calc(100dvh - 80px));
  min-height: 0;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 18px 55px rgba(20, 34, 55, 0.28);
}

.event-topic-picker-dialog h3 {
  margin: 0;
  font-size: 18px;
}

.event-topic-search {
  flex: 0 0 auto;
  margin: 0 16px 10px;
  background: var(--chat-bg);
}

.event-topic-list {
  display: grid;
  min-height: 0;
  overflow-y: auto;
  align-content: start;
  gap: 5px;
  padding: 0 12px 14px;
  overscroll-behavior: contain;
}

.event-topic-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 45px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--chat-bg);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.event-topic-option:hover,
.event-topic-option.is-selected {
  border-color: var(--primary);
  background: rgba(28, 120, 255, 0.08);
}

.event-topic-option span {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-topic-option small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 9px;
}

.modal-search {
  flex: 0 0 auto;
  margin-inline: 20px;
  background: var(--chat-bg);
}

.modal-list {
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  padding: 0 12px 18px;
}

.modal-list.is-busy {
  opacity: 0.5;
  pointer-events: none;
}

.message-context-menu {
  position: fixed;
  display: grid;
  width: 164px;
  overflow: hidden;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(18, 31, 50, 0.24);
  z-index: 300;
  animation: contextMenuIn 0.14s ease both;
}

.message-context-menu[hidden] {
  display: none;
}

.message-context-menu button {
  display: grid;
  grid-template-columns: 25px 1fr;
  min-height: 38px;
  padding: 6px 9px;
  align-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  text-align: left;
}

.message-context-menu button:hover {
  background: var(--chat-bg);
}

.message-context-menu b {
  color: var(--primary);
  font-size: 15px;
  text-align: center;
}

.message-context-menu .danger-action,
.message-context-menu .danger-action b {
  color: #e5484d;
}

@keyframes contextMenuIn {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.97);
  }
}

.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  max-width: calc(100vw - 40px);
  padding: 10px 16px;
  transform: translate(-50%, 20px);
  border-radius: 12px;
  background: #101a2b;
  color: white;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

body.dark {
  color-scheme: dark;
  --bg: #0b1019;
  --panel: #151d29;
  --sidebar: #111925;
  --chat-bg: #0f1722;
  --text: #eef3fb;
  --muted: #91a0b5;
  --faint: #637087;
  --line: #243042;
  --bubble: #1b2635;
  --primary-soft: #172d4c;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

body.dark .app-shell {
  border-color: rgba(255, 255, 255, 0.05);
}

body.dark .rail {
  background: #090e16;
}

body.dark .nav-dot {
  border-color: #090e16;
}

body.dark .search-wrap {
  background: #192331;
}

@keyframes authCardIn {
  from {
    transform: translateY(18px) scale(0.985);
    opacity: 0;
  }
}

@keyframes messageIn {
  from {
    transform: translateY(7px);
    opacity: 0;
  }
}

@keyframes bounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-4px);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
}

@keyframes modalIn {
  from {
    transform: translateY(12px) scale(0.98);
    opacity: 0;
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  .app-shell {
    width: calc(100vw - 12px);
    height: calc(100vh - 12px);
    height: calc(100dvh - 12px);
    height: calc(var(--app-viewport-height) - 12px);
    border-radius: 16px;
  }

  .rail {
    position: relative;
    min-height: 0;
    overflow: hidden;
    padding: 5px;
    gap: 3px;
  }

  .rail .brand,
  .rail #themeToggle,
  .rail-spacer {
    display: none;
  }

  .rail-nav {
    width: 100%;
    min-height: 0;
    padding-bottom: 38px;
    align-items: center;
    gap: 2px;
    overflow-y: auto;
    scrollbar-width: none;
  }

  .rail-nav::-webkit-scrollbar {
    display: none;
  }

  .rail .nav-button,
  .rail .rail-avatar {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .rail .rail-avatar {
    position: absolute;
    right: 50%;
    bottom: 5px;
    margin: 0;
    transform: translateX(50%);
    box-shadow: 0 0 0 2px #101a2b;
    z-index: 2;
  }

  .chat-header {
    min-height: 48px;
    padding: 5px 11px;
    gap: 8px;
  }

  .chat-header .avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .chat-identity h2 {
    font-size: 13px;
  }

  .chat-status {
    margin-top: 1px;
    font-size: 8px;
  }

  .header-actions .call-action {
    display: none;
  }

  .header-actions .icon-button {
    width: 32px;
    height: 32px;
  }

  .messages {
    padding: 7px 18px;
  }

  .day-divider {
    margin-block: 1px 5px;
  }

  .composer-shell {
    padding: 4px 9px 6px;
  }

  .composer-extra-actions,
  .composer-hint {
    display: none;
  }

  .composer {
    padding: 3px;
    gap: 3px;
    border-radius: 14px;
  }

  .composer textarea {
    min-height: 34px;
    max-height: 58px;
    padding: 7px 3px 5px;
  }

  .composer .icon-button {
    width: 34px;
    height: 34px;
  }

  .send-button {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 72px 290px minmax(380px, 1fr);
  }

  .app-shell.details-open {
    grid-template-columns: 72px 280px minmax(380px, 1fr);
  }

  .app-shell.details-open .details-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    display: block;
    width: 280px;
    box-shadow: -20px 0 50px rgba(25, 44, 71, 0.12);
    z-index: 20;
  }
}

@media (max-width: 900px) {
  .auth-card {
    grid-template-columns: 42% 58%;
  }

  .auth-story {
    padding-inline: 30px;
  }

  .auth-panel {
    padding-inline: 38px;
  }
}

@media (max-width: 760px) {
  body {
    background: var(--sidebar);
  }

  .auth-gate {
    padding: 0;
    place-items: start stretch;
    background: var(--panel);
  }

  .auth-card {
    display: block;
    width: 100%;
    min-height: 100dvh;
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .auth-story {
    min-height: 190px;
    padding: max(22px, calc(env(safe-area-inset-top) + 12px)) 24px 25px;
    border-radius: 0 0 30px 30px;
  }

  .auth-brand {
    display: none;
  }

  .auth-story-copy {
    margin: auto 0 0;
  }

  .auth-kicker {
    margin-bottom: 9px;
  }

  .auth-story-copy h1 {
    margin: 0 0 8px;
    font-size: 30px;
    line-height: 1.15;
  }

  .auth-story-copy h1 br {
    display: none;
  }

  .auth-story-copy > p:last-child {
    max-width: 310px;
    font-size: 10px;
    line-height: 1.65;
  }

  .auth-preview,
  .auth-trust {
    display: none;
  }

  .auth-panel {
    min-height: calc(100dvh - 190px);
    padding: 26px 22px max(26px, env(safe-area-inset-bottom));
    justify-content: flex-start;
  }

  .auth-mobile-brand {
    display: flex;
    margin-bottom: 25px;
  }

  .auth-mobile-brand .auth-logo {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .auth-mobile-brand > strong {
    font-size: 17px;
  }

  .auth-heading {
    margin-bottom: 20px;
  }

  .auth-heading h2 {
    font-size: 25px;
  }

  .app-shell,
  .app-shell.details-open {
    inset: 0;
    display: block;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    height: var(--app-viewport-height);
    overflow: hidden;
    transform: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .rail {
    display: none;
  }

  .sidebar {
    position: absolute;
    inset: 0 0 66px;
    border: 0;
    transition: transform 0.28s ease;
  }

  .sidebar-header {
    min-height: 88px;
    padding: max(18px, env(safe-area-inset-top)) 18px 10px;
    padding-top: max(18px, calc(env(safe-area-inset-top) + 8px));
  }

  .sidebar h1 {
    font-size: 25px;
  }

  .search-wrap {
    height: 44px;
    margin-inline: 14px;
    background: var(--panel);
  }

  kbd {
    display: none;
  }

  .sidebar-content {
    padding-inline: 7px;
  }

  .conversation {
    min-height: 76px;
    padding: 11px;
  }

  .main-view {
    position: absolute;
    inset: 0;
    transform: translateX(100%);
    z-index: 30;
    transition: transform 0.28s cubic-bezier(0.22, 0.75, 0.22, 1);
  }

  .chat-drop-overlay {
    inset: 8px;
    padding: 16px;
    border-radius: 17px;
  }

  .chat-drop-overlay > span {
    width: 50px;
    height: 50px;
    border-radius: 15px;
  }

  .chat-drop-overlay strong {
    font-size: 15px;
  }

  .app-shell.chat-open .main-view {
    inset: 0 0 calc(66px + env(safe-area-inset-bottom));
    transform: translateX(0);
    z-index: 30;
  }

  .app-shell.section-open .main-view {
    inset: 0 0 calc(66px + env(safe-area-inset-bottom));
    transform: translateX(0);
    z-index: 5;
  }

  .chat-header {
    min-height: 70px;
    padding: max(10px, env(safe-area-inset-top)) 11px 10px;
    padding-top: max(10px, calc(env(safe-area-inset-top) + 4px));
  }

  .chat-header .avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .mobile-back {
    display: grid;
    width: 34px;
    height: 40px;
    margin-right: -4px;
    padding: 0;
    place-items: center;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
  }

  .header-actions .call-action {
    display: none;
  }

  .header-actions .icon-button {
    width: 36px;
    height: 36px;
  }

  .messages {
    gap: 7px;
    padding: 18px 13px;
  }

  .message-row {
    max-width: 88%;
  }

  .message-bubble {
    padding: 9px 12px;
    font-size: 14px;
  }

  .message-bubble.image-bubble {
    max-width: min(260px, 76vw);
    padding: 0;
  }

  .image-message {
    min-width: 150px;
    min-height: 100px;
  }

  .image-message img {
    max-height: 300px;
  }

  .message-avatar {
    display: none;
  }

  .composer-shell {
    padding: 8px 9px max(9px, env(safe-area-inset-bottom));
  }

  .composer-hint,
  #voiceButton {
    display: none;
  }

  .composer {
    gap: 3px;
    border-radius: 16px;
  }

  .composer textarea {
    min-width: 0;
    min-height: 39px;
    font-size: 14px;
  }

  .composer .icon-button {
    width: 32px;
    height: 38px;
  }

  .emoji-panel {
    left: 9px;
    right: 9px;
    bottom: calc(100% + 5px);
    width: auto;
    height: min(380px, 48dvh);
    min-height: 260px;
  }

  .emoji-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .details-panel,
  .app-shell.details-open .details-panel {
    position: absolute;
    inset: 0;
    display: none;
    width: 100%;
    border: 0;
    background: var(--panel);
    box-shadow: none;
    z-index: 50;
  }

  .app-shell.details-open .details-panel {
    display: block;
  }

  .details-inner {
    min-height: 100%;
    padding: max(18px, calc(env(safe-area-inset-top) + 10px)) 22px 24px;
  }

  .details-profile {
    padding-top: 64px;
  }

  .mobile-tabs {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    height: calc(66px + env(safe-area-inset-bottom));
    padding: 6px 12px max(6px, env(safe-area-inset-bottom));
    grid-template-columns: repeat(6, 1fr);
    border-top: 1px solid var(--line);
    background: var(--panel);
    background: color-mix(in srgb, var(--panel) 94%, transparent);
    backdrop-filter: blur(18px);
    z-index: 40;
  }

  .mobile-tab {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    border: 0;
    background: transparent;
    color: var(--faint);
    cursor: pointer;
    font-size: 10px;
  }

  .mobile-tab svg {
    width: 21px;
    height: 21px;
  }

  .mobile-tab.is-active {
    color: var(--primary);
    font-weight: 700;
  }

  .mobile-tab .nav-dot {
    position: absolute;
    top: 1px;
    right: auto;
    left: 50%;
    display: inline-grid;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    place-items: center;
    transform: translateX(5px);
    border: 2px solid var(--panel);
    border-radius: 9px;
    background: #ff5064;
    color: white;
    font-size: 9px;
    font-style: normal;
    line-height: 1;
    z-index: 2;
  }

  .mobile-tab .nav-dot[hidden] {
    display: none;
  }

  .section-view {
    padding: 24px 16px 90px;
  }

  .warehouse-view {
    padding-inline: 12px;
  }

  .warehouse-view-header {
    align-items: flex-start;
  }

  .warehouse-mode-badge {
    padding: 6px 8px;
    font-size: 9px;
  }

  .warehouse-step {
    padding: 16px;
    border-radius: 17px;
  }

  .warehouse-scan-row {
    grid-template-columns: 1fr;
  }

  .warehouse-scan-row label {
    grid-column: auto;
  }

  .warehouse-lookup-button,
  .warehouse-camera-scan-button {
    width: 100%;
  }

  .warehouse-product-grid {
    grid-template-columns: 1fr;
  }

  .warehouse-photo-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .warehouse-photo-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .warehouse-photo-actions [data-warehouse-video-record-button] {
    grid-column: 1 / -1;
  }

  .warehouse-burst-backdrop {
    padding: 0;
  }

  .warehouse-burst-dialog {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    padding: max(14px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom));
    grid-template-rows: auto minmax(0, 1fr) auto auto auto;
    border: 0;
    border-radius: 0;
  }

  .warehouse-burst-stage {
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
  }

  .warehouse-burst-thumbnails {
    min-height: 66px;
  }

  .warehouse-video-recorder-backdrop {
    padding: 0;
  }

  .warehouse-video-recorder-dialog {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    padding: max(14px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom));
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    border: 0;
    border-radius: 0;
  }

  .warehouse-video-recorder-stage {
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
  }

  .warehouse-send-summary {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .warehouse-send-summary > div {
    align-content: center;
  }

  .warehouse-send-summary button {
    width: 100%;
  }

  .section-view-header {
    margin-bottom: 18px;
  }

  .section-view-header h2 {
    font-size: 25px;
  }

  .contacts-filter-bar {
    grid-template-columns: 1fr 1fr;
  }

  .contact-filter-field:first-child,
  .contacts-filter-bar .contacts-refresh-button {
    grid-column: 1 / -1;
  }

  .oa-event-filters {
    grid-template-columns: 1fr 1fr;
  }

  .oa-order-filter {
    grid-column: 1 / -1;
  }

  .oa-query-button,
  .oa-reset-button {
    width: 100%;
  }

  .oa-event-table {
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .oa-event-table-head {
    display: none;
  }

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

  .oa-event-row {
    min-height: 0;
    padding: 14px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: var(--panel);
    box-shadow: 0 6px 20px rgba(33, 53, 84, 0.04);
  }

  .oa-event-main {
    grid-column: 2;
    grid-row: 1;
  }

  .oa-status-badge {
    grid-column: 1;
    grid-row: 2;
  }

  .oa-event-row time {
    grid-column: 2;
    grid-row: 2;
  }

  .oa-event-go {
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: center;
  }

  .oa-event-row .oa-event-action {
    grid-column: 3;
    grid-row: 1 / 3;
    min-width: 76px;
    align-self: center;
  }

  .oa-event-detail-backdrop {
    padding: 12px;
  }

  .screenshot-editor-backdrop {
    padding: 8px;
  }

  .screenshot-editor {
    max-height: calc(100dvh - 16px);
    border-radius: 18px;
  }

  .screenshot-editor > header {
    padding: 13px 14px 11px;
  }

  .screenshot-editor-body {
    padding: 10px 10px 8px;
  }

  .screenshot-stage canvas {
    max-height: 56dvh;
  }

  .screenshot-editor > footer {
    padding: 10px 10px max(11px, env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .screenshot-editor > footer button {
    min-width: 0;
    padding: 0 7px;
  }

  .oa-event-detail {
    max-height: calc(100dvh - 24px);
    border-radius: 19px;
  }

  .oa-event-detail-meta {
    grid-template-columns: 1fr;
  }

  .toast {
    bottom: calc(78px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 420px) {
  .warehouse-view-header {
    display: block;
  }

  .warehouse-mode-badge {
    display: inline-flex;
    margin-top: 10px;
  }

  .warehouse-photo-actions,
  .warehouse-product-grid {
    grid-template-columns: 1fr;
  }

  .warehouse-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .warehouse-burst-dialog > footer {
    gap: 8px;
  }

  .warehouse-burst-secondary,
  .warehouse-burst-done {
    padding-inline: 8px;
    font-size: 9px;
  }

  .warehouse-burst-shutter {
    width: 62px;
    height: 62px;
  }

  .warehouse-video-recorder-dialog > footer {
    gap: 8px;
  }

  .warehouse-video-recorder-secondary,
  .warehouse-video-recorder-cancel {
    padding-inline: 8px;
    font-size: 9px;
  }

  .warehouse-video-record-button {
    width: 66px;
    height: 66px;
  }

  .warehouse-video-preview {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .warehouse-video-preview video {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .warehouse-product-card > header i,
  .warehouse-recipient-card > i {
    display: none;
  }

  .contacts-filter-bar {
    grid-template-columns: 1fr;
  }

  .contact-filter-field:first-child,
  .contacts-filter-bar .contacts-refresh-button {
    grid-column: auto;
  }

  .oa-event-filters {
    grid-template-columns: 1fr;
  }

  .oa-order-filter {
    grid-column: auto;
  }

  .oa-event-detail-body {
    padding: 18px;
  }

  .oa-event-image-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .emoji-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
