:root {
  color-scheme: light;
  --bg: #eef2f0;
  --surface: #ffffff;
  --surface-soft: #f7faf9;
  --line: #d7dfdc;
  --line-strong: #b9c8c2;
  --text: #17211e;
  --muted: #63716d;
  --accent: #0f766e;
  --accent-dark: #115e59;
  --blue: #1d4ed8;
  --amber: #a16207;
  --red: #b91c1c;
  --mine: #dcfce7;
  --incoming: #ffffff;
  --shadow: 0 22px 60px rgba(23, 33, 30, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  min-height: 100dvh;
  background: #dfe5e2;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

#app {
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
}

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

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.file-picker:focus-within {
  outline: 2px solid rgba(15, 118, 110, 0.72);
  outline-offset: 2px;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.tab:focus-visible,
.conversation-item:focus-visible,
.tag-option:focus-visible {
  outline-offset: -2px;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.brand h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1;
}

.brand p {
  margin: 4px 0 0;
  color: var(--muted);
}

.brand.compact {
  margin-bottom: 0;
}

.brand.compact h1 {
  font-size: 20px;
}

.brand.compact .brand-mark {
  width: 36px;
  height: 36px;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.field span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 11px 12px;
  outline: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.password-control {
  position: relative;
}

.password-control input {
  padding-right: 46px;
}

.password-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
}

.password-toggle:hover,
.password-toggle:focus-visible {
  background: var(--surface-soft);
  color: var(--accent-dark);
}

.file-picker {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 45px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 6px;
}

.file-picker input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-picker-button {
  display: inline-grid !important;
  place-items: center;
  min-height: 32px;
  border-radius: 7px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--text) !important;
  padding: 0 10px;
  font-size: 13px !important;
  font-weight: 800 !important;
}

.file-picker-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted) !important;
  font-size: 13px !important;
}

.file-picker:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.primary {
  min-height: 40px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 750;
  padding: 0 14px;
}

.primary:hover {
  background: var(--accent-dark);
}

.secondary,
.icon-btn {
  min-height: 36px;
  border-radius: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--text);
  font-weight: 700;
  padding: 0 12px;
}

.secondary:hover,
.icon-btn:hover {
  border-color: var(--line-strong);
  background: #fff;
}

.icon-only {
  width: 40px;
  padding: 0;
  display: inline-grid;
  place-items: center;
}

.sound-toggle.active {
  border-color: rgba(15, 118, 110, 0.35);
  background: #d9f3ee;
  color: var(--accent-dark);
}

.btn-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.danger {
  color: var(--red);
}

.danger-action {
  background: var(--red);
}

.danger-action:hover {
  background: #991b1b;
}

.danger-action:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.error {
  min-height: 22px;
  color: var(--red);
  font-size: 13px;
  margin-top: 10px;
}

.app-shell {
  width: 100vw;
  height: 100dvh;
  min-height: 0;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(340px, 31vw) 1fr;
  background: var(--surface);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
}

.sidebar {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  min-width: 0;
  min-height: 0;
  border-right: 1px solid var(--line);
  background: var(--surface-soft);
}

.topbar,
.chat-header {
  flex: 0 0 auto;
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #f0f2f5;
}

.topbar {
  height: 62px;
  max-height: 62px;
  overflow: hidden;
}

.chat-header {
  height: auto;
  align-items: flex-start;
  overflow: visible;
  flex-wrap: wrap;
}

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

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

.tenant-logo {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  object-fit: contain;
  padding: 3px;
}

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

.profile strong,
.chat-title strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile span,
.chat-title span,
.meta {
  color: var(--muted);
  font-size: 13px;
}

.meta.assigned-mine {
  color: var(--accent-dark);
  font-weight: 850;
}

.toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.tab {
  min-height: 32px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  min-width: 0;
  padding: 0 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab.active {
  background: #d9f3ee;
  color: var(--accent-dark);
}

.search {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
  background: #fff;
}

.conversation-list {
  min-height: 0;
  overflow-y: auto;
}

.conversation-item {
  width: 100%;
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 11px;
  align-items: start;
  padding: 13px 14px;
  background: transparent;
  border-bottom: 1px solid rgba(215, 223, 220, 0.8);
  color: var(--text);
  text-align: left;
}

.conversation-item:hover,
.conversation-item.active {
  background: #fff;
}

.conversation-item.is-closed {
  opacity: 0.52;
  filter: grayscale(0.75);
}

.conversation-item.is-closed:hover,
.conversation-item.is-closed.active {
  opacity: 0.72;
  background: #f3f6f5;
}

.conversation-item.is-closed .avatar {
  background: #8a9692;
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  font-weight: 850;
}

.conversation-main {
  min-width: 0;
}

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

.conversation-row strong,
.last-message {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-row .meta {
  flex: 0 0 auto;
}

.last-message {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.badge {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  padding: 3px 8px;
  background: #e8efed;
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
}

.badge.color {
  color: #fff;
}

.empty {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.chat-pane {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    linear-gradient(rgba(239, 232, 222, 0.76), rgba(239, 232, 222, 0.76)),
    repeating-linear-gradient(45deg, rgba(23, 33, 30, 0.035) 0 1px, transparent 1px 18px),
    #efe8de;
}

.chat-pane.is-closed {
  filter: grayscale(0.35);
}

.chat-pane.is-closed .messages {
  opacity: 0.72;
}

.chat-pane > .empty {
  flex: 1 1 auto;
}

.chat-actions {
  flex: 1 1 360px;
  min-width: min(100%, 280px);
  max-width: 100%;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: flex-start;
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-gutter: stable;
}

.chat-actions > * {
  flex: 0 0 auto;
}

.chat-actions,
.tag-bar {
  scrollbar-width: thin;
  scrollbar-color: rgba(99, 113, 109, 0.42) transparent;
}

.chat-actions::-webkit-scrollbar,
.tag-bar::-webkit-scrollbar {
  height: 8px;
}

.chat-actions::-webkit-scrollbar-thumb,
.tag-bar::-webkit-scrollbar-thumb {
  background: rgba(99, 113, 109, 0.38);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.status-pill {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 800;
}

.status-pill.closed {
  background: #e5e7eb;
  color: #4b5563;
}

.status-pill.busy {
  background: #dbeafe;
  color: #1d4ed8;
}

.status-pill.active {
  background: #d9f3ee;
  color: var(--accent-dark);
}

.status-pill.history {
  background: #fef3c7;
  color: #92400e;
}

.status-pill.window-open {
  background: #ecfdf5;
  color: #047857;
}

.status-pill.window-closed {
  background: #fee2e2;
  color: #b91c1c;
}

.tag-bar {
  flex: 0 0 53px;
  height: 53px;
  min-height: 53px;
  max-height: 53px;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(248, 251, 250, 0.92);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-gutter: stable;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.tag-bar.disabled {
  opacity: 0.58;
}

.tag-option {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 750;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.tag-option.active {
  background: #d9f3ee;
  border-color: rgba(15, 118, 110, 0.45);
  color: var(--accent-dark);
}

.tag-option:disabled {
  cursor: wait;
  opacity: 0.72;
}

.tag-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.messages {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  overflow-y: auto;
  padding: 22px 22px 56px;
  scrollbar-gutter: stable;
}

.messages::after {
  content: "";
  flex: 0 0 12px;
}

.messages::-webkit-scrollbar,
.conversation-list::-webkit-scrollbar {
  width: 10px;
}

.messages::-webkit-scrollbar-thumb,
.conversation-list::-webkit-scrollbar-thumb {
  background: rgba(99, 113, 109, 0.34);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}

.message {
  width: fit-content;
  max-width: min(640px, 76%);
  padding: 9px 11px 7px;
  border: 1px solid rgba(23, 33, 30, 0.08);
  border-radius: 8px;
  background: var(--incoming);
  box-shadow: 0 1px 2px rgba(23, 33, 30, 0.06);
}

.message.mine {
  align-self: flex-end;
  background: var(--mine);
}

.message.ai {
  background: #fff7ed;
  border-color: rgba(194, 65, 12, 0.16);
}

.message.system {
  align-self: center;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 13px;
}

.message-label {
  color: #9a3412;
  font-size: 11px;
  font-weight: 850;
  margin-bottom: 3px;
}

.message-body {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.38;
}

.message-time {
  color: var(--muted);
  font-size: 11px;
  margin-top: 4px;
  text-align: right;
}

.composer {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #f0f2f5;
}

.readonly-bar {
  flex: 0 0 auto;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: #f0f2f5;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.composer textarea {
  min-height: 44px;
  max-height: 130px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  outline: none;
}

.composer textarea:focus {
  border-color: var(--accent);
}

.notice {
  position: fixed;
  right: 22px;
  top: 76px;
  width: min(360px, calc(100vw - 44px));
  background: #0f766e;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f7fffd;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 18px 45px rgba(15, 118, 110, 0.24);
  font-weight: 750;
  z-index: 10;
}

.platform-shell {
  width: 100vw;
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
  background: #eef2f0;
  overflow: hidden;
}

.platform-topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 22px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.platform-user {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.platform-user div {
  min-width: 0;
  text-align: right;
}

.platform-user strong,
.platform-user span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-user span {
  color: var(--muted);
  font-size: 13px;
}

.platform-content {
  min-height: 0;
  overflow-y: auto;
  padding: 22px;
}

.platform-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.platform-heading h2,
.platform-heading p {
  margin: 0;
}

.platform-heading h2 {
  font-size: 22px;
}

.platform-heading p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.tenant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
}

.tenant-card {
  min-width: 0;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(23, 33, 30, 0.06);
}

.tenant-card.inactive {
  background: #f8faf9;
}

.tenant-card.inactive .tenant-card-header,
.tenant-card.inactive .tenant-card-body {
  opacity: 0.58;
  filter: grayscale(0.55);
}

.tenant-card.inactive footer .secondary,
.tenant-card.inactive footer .icon-btn {
  background: #fff;
  color: var(--text);
  border-color: var(--line-strong);
}

.tenant-card.inactive footer .danger {
  color: var(--red);
}

.tenant-card-header {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.tenant-card-logo {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--accent-dark);
  font-weight: 850;
  overflow: hidden;
}

.tenant-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  background: #fff;
}

.tenant-card-header strong,
.tenant-card-header span,
.tenant-card-body strong,
.tenant-card-body span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tenant-card-header > div:nth-child(2) {
  min-width: 0;
}

.tenant-card-header > div:nth-child(2) > strong {
  font-size: 17px;
}

.tenant-card-header > div:nth-child(2) > span {
  color: var(--muted);
  font-size: 13px;
}

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

.tenant-card-body div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  padding: 10px;
}

.tenant-card-body span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.tenant-card-body strong {
  margin-top: 3px;
  font-size: 14px;
}

.tenant-card footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.tenant-status {
  align-self: start;
  padding-top: 4px;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}

.tenant-status.active {
  color: var(--accent-dark);
}

.tenant-status.inactive {
  color: #6b7280;
}

.platform-dialog {
  width: min(640px, 100%);
}

.delete-dialog {
  width: min(460px, 100%);
}

.history-dialog {
  width: min(760px, 100%);
}

.dialog-subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.history-modal-messages {
  height: min(68vh, 620px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #f4ede4 0%, #efe7db 100%);
}

.confirm-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}

.dialog-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(23, 33, 30, 0.38);
  padding: 20px;
  z-index: 20;
}

.dialog {
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 20px;
}

.dialog header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

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

.admin-section {
  display: grid;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.admin-section h3 {
  margin: 0;
  font-size: 15px;
}

.section-hint {
  margin: -4px 0 2px;
  color: var(--muted);
  font-size: 13px;
}

.logo-setting {
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: center;
  gap: 12px;
}

.logo-preview {
  width: 72px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  overflow: hidden;
  text-align: center;
}

.logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
  background: transparent;
}

.user-list {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

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

.user-row div {
  min-width: 0;
}

.user-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-row strong,
.user-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-row span {
  color: var(--muted);
  font-size: 13px;
}

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

.user-form button {
  align-self: end;
}

.admin-wide-action {
  width: 100%;
}

.user-form .admin-wide-action {
  grid-column: 1 / -1;
}

.tag-admin-list {
  display: grid;
  gap: 8px;
}

.tag-admin-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.tag-admin-row .tag-dot {
  justify-self: center;
}

.tag-admin-row input[type="text"],
.tag-admin-row input[name="name"] {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
}

.compact-empty {
  padding: 12px;
  font-size: 13px;
}

.dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.hidden {
  display: none !important;
}

@media (max-width: 1200px) {
  .tenant-card-header {
    grid-template-columns: 48px minmax(0, 1fr) auto;
  }
}

@media (max-width: 900px) {
  .notice {
    top: 12px;
    right: 12px;
    width: min(360px, calc(100vw - 24px));
  }

  .app-shell {
    width: 100vw;
    height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
    grid-template-columns: 1fr;
  }

  .app-shell.chat-open .sidebar {
    display: none;
  }

  .app-shell:not(.chat-open) .chat-pane {
    display: none;
  }

  .message {
    max-width: 88%;
  }

  .mobile-back {
    display: inline-grid;
  }

  .chat-header {
    align-items: stretch;
  }

  .chat-actions {
    flex-basis: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    padding-bottom: 2px;
  }

  .platform-topbar,
  .platform-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .platform-user {
    justify-content: space-between;
  }

  .platform-user div {
    text-align: left;
  }

  .tenant-grid {
    grid-template-columns: 1fr;
  }

  .tenant-card-body,
  .user-form {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 901px) {
  .mobile-back {
    display: none;
  }
}
