:root {
  color-scheme: light;
  --bg: #eef4f7;
  --bg-strong: #dbeaf0;
  --card: rgba(255, 255, 255, 0.94);
  --line: #d6e1ea;
  --line-strong: #bfd0dc;
  --text: #183247;
  --muted: #627789;
  --primary: #008c95;
  --primary-strong: #006f77;
  --secondary: #edf7f8;
  --danger: #b42318;
  --danger-bg: #fef3f2;
  --success: #027a48;
  --success-bg: #ecfdf3;
  --shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

/* WELA chat */
.chat-shell { max-width: 1440px; }
.chat-app {
  display: grid;
  grid-template-columns: minmax(260px, 330px) minmax(0, 1fr);
  min-height: 680px;
  height: min(74vh, 850px);
  padding: 0;
  overflow: hidden;
}
.chat-sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-right: 1px solid var(--border, #dfe4e8);
  background: #f8fafb;
}
.chat-sidebar-head,
.chat-thread-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border, #dfe4e8);
  background: #fff;
}

.chat-thread-action {
  flex: 0 0 auto;
  min-width: 42px;
  padding: 8px 10px;
}
.chat-sidebar-head { justify-content: space-between; }
.chat-sidebar-head .chat-profile-button { display: none; }
.chat-sidebar-head > div { display: grid; gap: 3px; min-width: 0; }
.chat-sidebar-head small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-profile-button,
.chat-icon-button {
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
  color: inherit;
}
.chat-profile-button { border-radius: 50%; }
.chat-icon-button { width: 38px; height: 38px; font-size: 26px; line-height: 1; }
.chat-avatar,
.chat-message-avatar,
.chat-thread-avatar > .chat-avatar,
.chat-profile-avatar-image {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: #dcebe8;
  color: #174f47;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .03em;
}
.chat-avatar img,
.chat-message-avatar img,
.chat-profile-avatar-image img { width: 100%; height: 100%; object-fit: cover; }
.chat-team-avatar { font-size: 20px; background: #e6efe9; }
.chat-message-avatar { width: 32px; height: 32px; font-size: 11px; align-self: flex-end; }
.chat-profile-avatar-image { width: 86px; height: 86px; font-size: 25px; }
.chat-conversation-list,
.chat-people-list { display: grid; gap: 4px; padding: 8px; }
.chat-conversation-list { overflow-y: auto; max-height: 54%; }
.chat-people-list { overflow-y: auto; }
.chat-conversation-item,
.chat-person-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  text-align: left;
  box-shadow: none;
}
.chat-person-item { grid-template-columns: 44px minmax(0, 1fr); }
.chat-conversation-item:hover,
.chat-person-item:hover { background: #edf3f2; }
.chat-conversation-item.is-active { background: #dcebe8; }
.chat-conversation-copy,
.chat-person-item > span:last-child { display: grid; min-width: 0; gap: 2px; }
.chat-conversation-copy strong,
.chat-conversation-copy small,
.chat-person-item strong,
.chat-person-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-conversation-copy small,
.chat-person-item small { color: var(--muted, #69747a); font-weight: 400; }
.chat-unread {
  display: inline-flex;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #147a69;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}
.chat-people-head { padding: 12px 18px 4px; border-top: 1px solid var(--border, #dfe4e8); }
.chat-main { position: relative; min-width: 0; background: #f2f5f4; }
.chat-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px; text-align: center; }
.chat-empty-icon { font-size: 48px; }
.chat-active { display: grid; grid-template-rows: auto auto auto minmax(0, 1fr) auto auto; height: 100%; }
.chat-thread-avatar { flex: 0 0 auto; }
.chat-thread-title { display: grid; flex: 1 1 auto; min-width: 0; gap: 2px; }
.chat-thread-title strong,
.chat-thread-title small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-translate-switch,
.admin-translate-toggle { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.chat-translate-switch input,
.admin-translate-toggle input { width: auto; }
.chat-mobile-back { display: none; width: 38px; min-width: 38px; padding: 5px; font-size: 25px; }
.chat-load-older { justify-self: center; margin: 8px auto 0; padding: 7px 13px; font-size: 12px; }
.chat-messages {
  min-height: 0;
  overflow-y: auto;
  padding: 18px clamp(12px, 3vw, 34px);
  scroll-behavior: smooth;
  background-color: #eef3f1;
  background-image: radial-gradient(circle at 1px 1px, rgba(24, 88, 78, .055) 1px, transparent 0);
  background-size: 22px 22px;
}
.chat-no-messages { display: grid; place-items: center; min-height: 100%; text-align: center; }
.chat-message { display: flex; align-items: flex-end; gap: 8px; margin: 10px 0; }
.chat-message.is-mine { justify-content: flex-end; }
.chat-message-column { display: grid; max-width: min(76%, 720px); }
.chat-message.is-mine .chat-message-column { justify-items: end; }
.chat-message-meta { display: flex; gap: 8px; align-items: baseline; padding: 0 5px 3px; font-size: 11px; color: #68736f; }
.chat-message-meta time { font-weight: 400; }
.chat-bubble {
  min-width: 70px;
  padding: 9px 12px;
  border: 1px solid #d9e1de;
  border-radius: 15px 15px 15px 4px;
  background: #fff;
  box-shadow: 0 3px 11px rgba(36, 62, 56, .055);
  overflow-wrap: anywhere;
}
.chat-message.is-mine .chat-bubble { background: #d9eee8; border-color: #c5e3da; border-radius: 15px 15px 4px 15px; }
.chat-message-text { white-space: normal; line-height: 1.42; }
.chat-message-reply { display: grid; gap: 2px; margin: -3px -5px 8px; padding: 6px 8px; border-left: 3px solid #16816e; border-radius: 7px; background: rgba(15, 103, 88, .08); font-size: 12px; }
.chat-message-reply span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 390px; }
.chat-translation-label { border: 0; background: none; box-shadow: none; padding: 6px 0 0; color: #39766d; font-size: 10px; font-weight: 700; }
.chat-image-thumb { display: block; width: min(340px, 55vw); max-height: 330px; margin: 0 0 6px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: #dfe7e4; box-shadow: none; }
.chat-image-thumb img { display: block; width: 100%; max-height: 330px; object-fit: cover; }
.chat-file-attachment { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; min-width: min(330px, 58vw); margin: 0 0 6px; padding: 10px 12px; border: 1px solid rgba(26, 112, 96, .18); border-radius: 11px; background: rgba(245, 250, 248, .86); color: #183d36; text-decoration: none; }
.chat-file-attachment:hover { border-color: rgba(0, 140, 149, .52); background: #fff; }
.chat-file-attachment > span:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.chat-file-attachment strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-file-attachment small { color: #65746f; }
.chat-file-icon { font-size: 27px; }
.chat-file-download { font-size: 22px; font-weight: 800; color: #087e82; }
.chat-drop-zone { position: absolute; inset: 10px; display: grid; place-items: center; border: 3px dashed #078b91; border-radius: 18px; background: rgba(239, 250, 248, .95); z-index: 20; pointer-events: none; }
.chat-drop-zone-content { display: grid; justify-items: center; gap: 8px; padding: 24px; text-align: center; color: #174b44; }
.chat-drop-zone-content > span { font-size: 52px; }
.chat-drop-zone-content strong { font-size: clamp(17px, 2.3vw, 24px); }
.chat-drop-zone-content small { color: #60746f; }
.chat-reaction-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: -3px; z-index: 1; }
.chat-reaction { padding: 3px 7px; border: 1px solid #d4dfdc; border-radius: 999px; background: #fff; color: inherit; font-size: 12px; box-shadow: none; }
.chat-reaction.is-mine { border-color: #278976; background: #d9eee8; }
.chat-message-actions { display: flex; gap: 3px; padding: 3px 2px; opacity: 0; transition: opacity .15s ease; }
.chat-message:hover .chat-message-actions,
.chat-message:focus-within .chat-message-actions { opacity: 1; }
.chat-message-actions button { padding: 3px 5px; border: 0; background: transparent; color: #586762; font-size: 11px; box-shadow: none; }
.chat-reply-preview { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 14px; border-top: 1px solid var(--border, #dfe4e8); background: #fff; }
.chat-reply-preview > div { display: grid; min-width: 0; }
.chat-reply-preview span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-composer { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 9px; align-items: end; padding: 11px 14px; border-top: 1px solid var(--border, #dfe4e8); background: #fff; }
.chat-composer-action { width: 44px; height: 44px; padding: 0; border-radius: 50%; font-size: 20px; }
.chat-compose-field { position: relative; }
.chat-compose-field textarea { width: 100%; min-height: 44px; max-height: 130px; padding: 10px 44px 10px 13px; resize: none; border-radius: 18px; }
.chat-emoji-button { position: absolute; right: 7px; bottom: 6px; width: 32px; height: 32px; padding: 0; border: 0; background: transparent; box-shadow: none; font-size: 20px; }
.chat-emoji-picker { position: absolute; right: 0; bottom: calc(100% + 8px); display: grid; grid-template-columns: repeat(6, 35px); gap: 3px; padding: 8px; border: 1px solid #d7dfdc; border-radius: 12px; background: #fff; box-shadow: 0 10px 35px rgba(24, 48, 43, .16); z-index: 10; }
.chat-emoji-picker button { width: 35px; height: 35px; padding: 0; border: 0; background: transparent; box-shadow: none; font-size: 20px; }
.chat-send-button { min-height: 44px; padding-inline: 17px; }
.chat-dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow-y: auto; border: 0; border-radius: 18px; padding: 0; box-shadow: 0 22px 70px rgba(12, 36, 31, .28); }
.chat-dialog::backdrop,
.chat-image-dialog::backdrop { background: rgba(12, 28, 25, .64); backdrop-filter: blur(2px); }
.chat-profile-form { display: grid; gap: 16px; padding: 22px; }
.chat-profile-section { display: grid; gap: 12px; margin: 0; padding: 14px; border: 1px solid #d7e1de; border-radius: 12px; }
.chat-profile-section legend { padding: 0 6px; font-weight: 700; color: #284a43; }
.chat-profile-section .small-text { margin: -3px 0 0; }
.chat-dialog-head { display: flex; justify-content: space-between; align-items: flex-start; }
.chat-dialog-head h2 { margin: 2px 0 0; }
.chat-avatar-editor { display: flex; align-items: center; gap: 18px; }
.chat-avatar-editor > div:last-child { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-name-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chat-dialog-actions { display: flex; justify-content: flex-end; gap: 9px; }
.chat-sidebar-tools { display: grid; grid-template-columns: minmax(0, 1fr) 38px 38px; gap: 6px; padding: 9px 9px 5px; }
.chat-search-box { display: flex; align-items: center; gap: 7px; min-width: 0; padding: 0 10px; border: 1px solid #cfddda; border-radius: 12px; background: #fff; }
.chat-search-box:focus-within { border-color: #008c95; box-shadow: 0 0 0 3px rgba(0, 140, 149, .1); }
.chat-search-box input { min-width: 0; min-height: 36px; padding: 6px 0; border: 0; background: transparent; box-shadow: none; }
.chat-search-box input:focus { border: 0; box-shadow: none; }
.chat-search-scope-clear { width: 26px; min-width: 26px; height: 26px; min-height: 26px; padding: 0; border: 0; border-radius: 50%; background: #e6efed; color: #526a65; box-shadow: none; font-size: 18px; }
.chat-sidebar-tool { min-width: 38px; min-height: 38px; padding: 0; border: 1px solid #cfddda; border-radius: 11px; background: #fff; box-shadow: none; }
.chat-filters { display: flex; gap: 5px; padding: 5px 9px 8px; overflow-x: auto; }
.chat-filters button { min-height: 30px; padding: 5px 10px; border: 1px solid #d5e1de; border-radius: 999px; background: #fff; color: #50645f; box-shadow: none; font-size: 11px; white-space: nowrap; }
.chat-filters button.is-active { border-color: #248f7e; background: #dcefeb; color: #145d52; }
.chat-search-results { min-height: 0; overflow-y: auto; padding: 7px; }
.chat-search-result { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 9px; align-items: center; width: 100%; padding: 9px; border: 0; border-radius: 11px; background: transparent; color: inherit; box-shadow: none; text-align: left; }
.chat-search-result:hover { background: #edf3f2; transform: none; }
.chat-search-result .chat-avatar { width: 40px; height: 40px; }
.chat-search-result > span { display: grid; min-width: 0; gap: 2px; }
.chat-search-result small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-search-result time { color: #72817d; font-size: 10px; }
.chat-list-empty { padding: 18px 12px; text-align: center; }
.chat-favorite-mark { color: #c78a08; }
.chat-mention-badge { display: inline-grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; background: #e8f1ff; color: #245da8; font-size: 12px; font-weight: 800; }
.chat-thread-menu-wrap { position: relative; flex: 0 0 auto; }
.chat-thread-menu { position: absolute; top: calc(100% + 5px); right: 0; display: grid; min-width: 230px; padding: 6px; border: 1px solid #d3dfdc; border-radius: 12px; background: #fff; box-shadow: 0 13px 34px rgba(22, 48, 42, .19); z-index: 16; }
.chat-thread-menu button { min-height: 38px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: #334a45; box-shadow: none; text-align: left; }
.chat-thread-menu button:hover { background: #edf4f2; transform: none; }
.chat-conversation-context { position: fixed; display: grid; min-width: 230px; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); padding: 6px; border: 1px solid #d3dfdc; border-radius: 12px; background: #fff; box-shadow: 0 13px 34px rgba(22, 48, 42, .22); overflow-y: auto; z-index: 80; }
.chat-conversation-context button { min-height: 38px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: #334a45; box-shadow: none; text-align: left; }
.chat-conversation-context button:hover,
.chat-conversation-context button:focus-visible { background: #edf4f2; transform: none; }
.chat-conversation-context button.danger-action { color: #a32626; }
.chat-thread-action.is-active { border-color: #258f7e; background: #dcefeb; }
.chat-pinned-messages { display: flex; grid-area: pinned; gap: 6px; align-items: center; min-height: 39px; padding: 6px 12px; border-bottom: 1px solid #d9e3e0; background: #fffdf4; overflow-x: auto; }
.chat-pinned-messages > strong { flex: 0 0 auto; font-size: 11px; }
.chat-pinned-messages button { display: grid; flex: 0 0 auto; max-width: 260px; padding: 5px 9px; border: 1px solid #eadfaf; border-radius: 9px; background: #fff; box-shadow: none; color: inherit; text-align: left; font-size: 11px; }
.chat-pinned-messages button span { color: #6e756c; font-size: 9px; }
.chat-message.mentions-me .chat-bubble { box-shadow: 0 0 0 2px rgba(42, 105, 184, .2), 0 3px 11px rgba(36, 62, 56, .055); }
.chat-mention { padding: 1px 3px; border-radius: 4px; background: #dceaff; color: #20599d; font-weight: 750; }
.chat-message-pinned { margin-left: auto; }
.chat-message-deleted { color: #77837f; font-style: italic; }
.chat-message.is-highlighted .chat-bubble { animation: chat-highlight 2.2s ease; }
@keyframes chat-highlight { 0%, 45% { box-shadow: 0 0 0 4px rgba(0, 140, 149, .35); } 100% { box-shadow: 0 3px 11px rgba(36, 62, 56, .055); } }
.chat-mention-picker { position: absolute; left: 0; bottom: calc(100% + 8px); display: grid; width: min(330px, 85vw); max-height: 260px; padding: 6px; border: 1px solid #d3dfdc; border-radius: 12px; background: #fff; box-shadow: 0 12px 34px rgba(24, 48, 43, .18); overflow-y: auto; z-index: 12; }
.chat-mention-picker button { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; align-items: center; padding: 7px; border: 0; border-radius: 8px; background: transparent; color: inherit; box-shadow: none; text-align: left; }
.chat-mention-picker button:hover { background: #edf4f2; transform: none; }
.chat-mention-picker .chat-avatar { width: 34px; height: 34px; font-size: 11px; }
.chat-mention-picker button span { display: grid; }
.chat-mention-picker small { color: #697a75; }
.chat-edit-dialog form { display: grid; gap: 16px; padding: 22px; }
.chat-edit-dialog textarea { width: 100%; resize: vertical; }
.chat-files-dialog { width: min(760px, calc(100vw - 24px)); padding: 20px; }
.chat-files-search { margin: 14px 0; }
.chat-files-list { display: grid; gap: 7px; max-height: min(65vh, 620px); overflow-y: auto; }
.chat-managed-file { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid #d9e3e0; border-radius: 11px; }
.chat-managed-file > span:nth-child(2) { display: grid; min-width: 0; }
.chat-managed-file strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-managed-file small { color: #687873; }
.chat-image-dialog { max-width: 94vw; max-height: 94vh; border: 0; padding: 0; background: transparent; overflow: visible; }
.chat-image-dialog img { display: block; max-width: 92vw; max-height: 88vh; border-radius: 12px; object-fit: contain; }
.chat-image-close { position: absolute; right: -12px; top: -12px; width: 38px; height: 38px; padding: 0; border-radius: 50%; background: #fff; color: #172622; font-size: 24px; z-index: 2; }

@media (max-width: 760px) {
  .chat-app { display: block; height: calc(100dvh - 155px); min-height: 560px; }
  .chat-sidebar { height: 100%; border-right: 0; }
  .chat-main { display: none; position: absolute; inset: 0; }
  .chat-app.has-active-chat .chat-sidebar { display: none; }
  .chat-app.has-active-chat .chat-main { display: block; }
  .chat-mobile-back { display: inline-flex; align-items: center; justify-content: center; }
  .chat-thread-head { padding: 8px 10px; }
  .chat-translate-switch { display: none; }
  #chat-close { display: none; }
  .chat-thread-menu { position: fixed; top: auto; right: 8px; bottom: calc(64px + env(safe-area-inset-bottom, 0px)); min-width: min(280px, calc(100vw - 16px)); }
  .chat-managed-file { grid-template-columns: auto minmax(0, 1fr) auto; }
  .chat-managed-file .danger-action { grid-column: 3; }
  .chat-message-column { max-width: 88%; }
  .chat-file-attachment { min-width: min(280px, 70vw); }
  .chat-message-actions { opacity: 1; overflow-x: auto; max-width: 82vw; }
  .chat-composer { padding: 8px; grid-template-columns: auto minmax(0, 1fr) auto; }
  .chat-send-button { padding-inline: 10px; }
  .admin-name-grid { grid-template-columns: 1fr; }
}

* { box-sizing: border-box; }
html {
  min-height: 100%;
  background:
    radial-gradient(circle at top right, rgba(0, 140, 149, 0.12), transparent 28%),
    linear-gradient(180deg, #f7fafc 0%, var(--bg) 100%);
  background-attachment: fixed;
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, sans-serif;
  color: var(--text);
  background: transparent;
}
button, input, textarea, select { font: inherit; }
textarea, select, input[type='email'], input[type='search'], input[type='number'], input[type='password'], input[type='text'] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  color: var(--text);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
textarea:focus, input:focus {
  outline: none;
  border-color: rgba(0, 140, 149, 0.55);
  box-shadow: 0 0 0 4px rgba(0, 140, 149, 0.12);
}
textarea { resize: vertical; }
button {
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
button:hover { transform: translateY(-1px); }
a {
  color: inherit;
  text-decoration: none;
}
.primary {
  background: linear-gradient(180deg, #0698a1 0%, var(--primary) 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 12px 26px rgba(0, 140, 149, 0.22);
}
.primary:hover { background: linear-gradient(180deg, #058792 0%, var(--primary-strong) 100%); }
.secondary {
  background: var(--secondary);
  color: var(--text);
}
.small-btn {
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
}
.small-btn.is-active-option {
  background: linear-gradient(180deg, #0698a1 0%, var(--primary) 100%);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 140, 149, 0.18);
}
.is-hidden {
  display: none !important;
}
.wide { width: 100%; }
.shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
}
.card {
  background: var(--card);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 22px;
}
.hero {
  display: grid;
  grid-template-rows: 52px minmax(128px, auto);
  gap: 14px;
  margin-bottom: 20px;
  min-height: 230px;
  position: relative;
}
.hero-topbar {
  display: flex;
  justify-content: flex-end;
  min-height: 52px;
}
.hero-main {
  display: grid;
  grid-template-rows: 28px 42px 24px 54px;
  gap: 8px;
  align-items: start;
}
.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.global-profile { position: relative; }
.global-profile-trigger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 5px 10px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  box-shadow: none;
}
.global-profile-trigger:hover,
.global-profile-trigger[aria-expanded="true"] { border-color: var(--primary); background: #f4fafb; }
.global-profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  overflow: hidden;
  border-radius: 50%;
  background: #dcebe8;
  color: #174f47;
  font-size: 12px;
  font-weight: 800;
}
.global-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.global-profile-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.global-profile-arrow { color: var(--muted); font-size: 13px; }
.global-profile-menu {
  position: absolute;
  z-index: 120;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  overflow: hidden;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, .16);
}
.global-profile-menu[hidden] { display: none; }
.global-profile-menu button {
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  text-align: left;
}
.global-profile-menu button:hover { background: var(--secondary); }
.global-profile-menu form { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--line); }
.global-profile-dialog { width: min(620px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 0; overflow: auto; }
.global-profile-dialog .chat-profile-form { padding: 22px; }
.global-profile-notice { margin: 0 22px; }
.global-profile-notice:empty { display: none; }
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: #f4fafb;
  border: 1px solid var(--line);
}
.lang-btn {
  min-width: 52px;
  padding: 10px 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  box-shadow: none;
}
.lang-btn.is-active {
  background: linear-gradient(180deg, #0698a1 0%, var(--primary) 100%);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 140, 149, 0.18);
}
.hero h1,
.login-card h1,
.section-head h2 {
  margin: 0;
}
.hero-main > h1 {
  display: flex;
  align-items: center;
  min-height: 42px;
  line-height: 1.18;
}
.hero-main > .billing-subtitle,
.hero-main > .shipping-page-subtitle {
  min-height: 24px;
  overflow: hidden;
}
.eyebrow {
  display: table;
  margin: 0 auto 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #dff6f4;
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}
@media (min-width: 961px) {
  .hero .eyebrow {
    position: absolute;
    left: 50%;
    top: 74px;
    transform: translateX(-50%);
    margin: 0;
    z-index: 1;
  }
}
.page-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  height: 54px;
  margin: 0 0 14px;
  padding: 5px;
  border-radius: 999px;
  background: #f4fafb;
  border: 1px solid var(--line);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.page-nav-menu { display: none; }
.desktop-page-nav { display: flex; }
.mobile-nav-summary { display: none; }
.page-nav::-webkit-scrollbar { display: none; }
.page-nav-link {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  height: 42px;
  min-width: max-content;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  text-align: center;
  position: relative;
  gap: 6px;
}
.page-nav-label {
  min-width: max-content;
  line-height: 1.35;
  padding-block: 2px;
}
.page-nav-badge {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(180, 35, 24, 0.2);
}
.page-nav-link.is-active .page-nav-badge {
  background: #fff;
  color: var(--danger);
}
.page-nav-link.is-active {
  background: linear-gradient(180deg, #0698a1 0%, var(--primary) 100%);
  color: #fff;
  box-shadow: 0 8px 18px rgba(0, 140, 149, 0.18);
}
.muted { color: var(--muted); }
.small-text { font-size: 14px; }
.grid {
  display: grid;
  gap: 16px;
}
.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-bottom: 20px;
}
.stat-card {
  display: grid;
  gap: 8px;
  min-height: 116px;
}
.stat-card .label {
  color: var(--muted);
  font-size: 14px;
}
.stat-card strong {
  font-size: clamp(24px, 4vw, 34px);
}
.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 16px;
}
.search-box {
  display: grid;
  gap: 8px;
  min-width: min(480px, 100%);
}
.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
}
.mode-submit-stack {
  display: grid;
  gap: 8px;
  align-items: stretch;
  min-width: 230px;
}
.mode-submit-stack > button {
  width: 100%;
}
.processing-bulk-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.processing-filter-wrap,
.stock-filter-wrap {
  display: inline-grid;
  grid-template-columns: auto minmax(120px, 150px);
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}
.processing-filter-wrap select,
.stock-filter-wrap select {
  min-height: 44px;
  padding: 9px 12px;
  border-radius: 12px;
  font-weight: 700;
}
.refresh-live-btn {
  font-weight: 700;
}
.mode-toggle-btn {
  background: linear-gradient(180deg, #ede9fe 0%, #ddd6fe 100%);
  color: #4c1d95;
  border: 1px solid rgba(124, 58, 237, 0.24);
  box-shadow: 0 8px 18px rgba(124, 58, 237, 0.14);
  font-weight: 800;
  white-space: nowrap;
}
.mode-toggle-btn:hover {
  background: linear-gradient(180deg, #ddd6fe 0%, #c4b5fd 100%);
}
.processing-mode .mode-toggle-btn {
  background: linear-gradient(180deg, #ffedd5 0%, #fed7aa 100%);
  color: #9a3412;
  border-color: rgba(234, 88, 12, 0.18);
  box-shadow: 0 8px 18px rgba(234, 88, 12, 0.12);
}
.processing-mode .mode-toggle-btn:hover {
  background: linear-gradient(180deg, #fed7aa 0%, #fdba74 100%);
}
.names-toggle-btn {
  white-space: nowrap;
}
.refresh-head-actions .refresh-live-btn {
  width: 100%;
}
.refresh-head-actions .names-toggle-btn {
  display: none;
  width: 100%;
}
.refresh-head-actions {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-direction: column;
}
.processing-mode .refresh-head-actions {
  align-items: stretch;
}
.checkbox-row {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  margin-right: 6px;
}
.checkbox-row input { width: auto; }
.table-card { margin-bottom: 20px; }
.compact-head { margin-bottom: 16px; }
.refresh-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f6fbfc;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.refresh-pill.is-running {
  border-color: rgba(0, 140, 149, 0.22);
  background: rgba(0, 140, 149, 0.08);
  color: var(--primary-strong);
}
.refresh-pill.is-ok {
  border-color: rgba(2, 122, 72, 0.2);
  background: rgba(2, 122, 72, 0.08);
  color: var(--success);
}
.refresh-pill.is-error {
  border-color: rgba(180, 35, 24, 0.2);
  background: rgba(180, 35, 24, 0.08);
  color: var(--danger);
}
.refresh-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  opacity: 0;
}
.refresh-pill.is-running .refresh-spinner {
  display: inline-block;
  opacity: 1;
  animation: spin 1s linear infinite;
}
.table-wrap {
  overflow: auto;
  max-height: 70vh;
  border: 1px solid rgba(191, 208, 220, 0.65);
  border-radius: 18px;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
thead th {
  position: sticky;
  top: 0;
  background: #f8fbfd;
  z-index: 1;
}
tbody tr:hover {
  background: #f9fcfd;
}
.sku {
  font-weight: 700;
  white-space: nowrap;
}
.supplier-name {
  min-width: 340px;
}
body.names-hidden #th-name,
body.names-hidden .supplier-name {
  display: none;
}
.live-stock,
.qty-input {
  font-variant-numeric: tabular-nums;
}
.live-stock {
  color: var(--muted);
  font-weight: 700;
}
.live-stock.is-positive {
  color: var(--success);
}
.qty-input {
  max-width: 130px;
}
.alert {
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid transparent;
}
.alert-info {
  background: rgba(0, 140, 149, 0.1);
  color: var(--primary-strong);
  border-color: rgba(0, 140, 149, 0.18);
}
.alert-success {
  background: var(--success-bg);
  color: var(--success);
  border-color: rgba(2, 122, 72, 0.16);
}
.alert-error {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(180, 35, 24, 0.16);
}
.billing-progress-card {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}
.billing-progress-card.is-hidden {
  display: none;
}
.billing-progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.billing-progress-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: #e6eef3;
  border: 1px solid var(--line);
}
.billing-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0698a1 0%, var(--primary) 100%);
  transition: width .25s ease;
}
.history-card {
  margin-top: 0;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.history-list {
  display: grid;
  gap: 12px;
  max-height: min(560px, 62vh);
  overflow: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.history-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.history-download-link {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
}
.danger-btn {
  background: linear-gradient(180deg, #fee2e2 0%, #fecaca 100%);
  color: #991b1b;
  border: 1px solid rgba(220, 38, 38, 0.18);
  box-shadow: 0 8px 18px rgba(220, 38, 38, 0.12);
}
.danger-btn:hover {
  background: linear-gradient(180deg, #fecaca 0%, #fca5a5 100%);
}
.history-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f9fbfc;
  overflow: hidden;
}
.history-toggle {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}
.history-toggle-row {
  cursor: default;
  user-select: text;
}
.history-main {
  display: grid;
  gap: 4px;
  text-align: left;
}
.history-toggle-row .history-main,
.history-toggle-row .history-main code {
  cursor: text;
  user-select: text;
}
.history-item strong {
  display: block;
}
.history-toggle-button {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  min-width: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}
.history-toggle-icon {
  min-width: 24px;
  text-align: center;
  color: var(--primary-strong);
  font-size: 20px;
  line-height: 1;
}
.history-details {
  padding: 0 14px 14px;
}
.history-change-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.history-change-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.history-change-list li.billing-entry-replacement {
  background: #fff7f6;
  border-color: rgba(180, 35, 24, 0.16);
}
.billing-history-replacement-meta {
  display: grid;
  gap: 5px;
  margin-top: 7px;
}
.no-pointer {
  cursor: default;
}
.billing-subtitle {
  margin: 0;
}
.billing-toolbar {
  margin-bottom: 16px;
}
.billing-table-head {
  align-items: end;
}
.billing-search-box {
  min-width: min(360px, 100%);
}
.toolbar-title {
  margin: 0 0 6px;
}
.billing-overview-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  margin-bottom: 20px;
}
.billing-summary-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.billing-summary-scroll {
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
}
.billing-summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.billing-replacement-summary {
  margin-bottom: 10px;
}
.billing-summary-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.billing-summary-list strong {
  font-variant-numeric: tabular-nums;
}
.billing-summary-list-rich li {
  align-items: flex-start;
}
.billing-summary-list-rich li > div {
  display: grid;
  gap: 4px;
}
.billing-country-item.is-missing-rate {
  border-color: rgba(0, 140, 149, 0.22);
  background: #f6fbfc;
}
.billing-country-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 88px;
}
.billing-country-side.is-editing {
  min-width: 0;
}
.billing-country-rate-editor {
  display: flex;
  align-items: center;
  gap: 8px;
}
.billing-country-rate-input {
  width: 90px;
  min-width: 90px;
  padding: 8px 10px;
}
.billing-country-rate-save {
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  white-space: nowrap;
}
.billing-entry-replacement td {
  background: #fff7f6;
  border-color: rgba(180, 35, 24, 0.12);
}
.billing-entry-warning td {
  background: #fffaf0;
}
.billing-status-stack {
  display: grid;
  gap: 7px;
  min-width: 190px;
}
.billing-status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}
.billing-status-pill.is-replacement {
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid rgba(180, 35, 24, 0.18);
}
.billing-status-pill.is-warning {
  color: #8a4b08;
  background: #fff4d8;
  border: 1px solid rgba(180, 105, 15, 0.2);
}
.billing-entry-action {
  justify-self: start;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.billing-dialog {
  width: min(560px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  padding: 0;
  border: 0;
  border-radius: 20px;
  color: var(--text);
  background: #fff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
}
.billing-dialog::backdrop {
  background: rgba(15, 32, 46, 0.56);
  backdrop-filter: blur(3px);
}
.billing-dialog-form {
  display: grid;
  gap: 16px;
  padding: 22px;
}
.billing-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.billing-dialog-head h2,
.billing-dialog-head .eyebrow {
  margin: 0;
}
.billing-dialog-head .eyebrow {
  margin-bottom: 5px;
}
.billing-dialog-close {
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  border-radius: 999px;
  font-size: 24px;
  line-height: 1;
}
.billing-dialog-entry {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7fafc;
}
.billing-dialog-form .field {
  display: grid;
  gap: 7px;
  font-weight: 700;
}
.billing-dialog-form .field textarea,
.billing-dialog-form .field select {
  font-weight: 400;
}
.billing-dialog-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7fafc;
  cursor: pointer;
}
.billing-dialog-check input {
  margin-top: 3px;
}
.billing-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.shipping-page-subtitle {
  margin: 0;
}
.shipping-grid {
  grid-template-columns: minmax(0, 1.8fr) minmax(300px, 1fr);
  align-items: start;
  margin-bottom: 20px;
}
.shipping-rates-list {
  display: grid;
  gap: 12px;
}
.shipping-search-box {
  min-width: min(300px, 100%);
}
.shipping-rate-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}
.shipping-rate-meta {
  display: grid;
  gap: 4px;
}
.shipping-rate-meta strong {
  font-size: 16px;
}
.shipping-rate-code {
  color: var(--muted);
  font-weight: 700;
}
.shipping-rate-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.shipping-rate-input {
  width: 140px;
  min-width: 120px;
}
.shipping-rate-remove {
  background: var(--danger-bg);
  color: var(--danger);
}
.shipping-form {
  display: grid;
  gap: 14px;
}
.shipping-form label {
  display: grid;
  gap: 8px;
  font-weight: 600;
}
.shipping-form-hint {
  margin: 0;
}
.shipping-empty {
  padding: 10px 2px;
}
.shipping-empty-search {
  padding-top: 2px;
}
.history-delta {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.history-delta.is-plus {
  color: var(--success);
}
.history-delta.is-minus {
  color: var(--danger);
}
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #f6fbfc;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.status-pill.is-sent {
  border-color: rgba(2, 122, 72, 0.2);
  background: rgba(2, 122, 72, 0.08);
  color: var(--success);
}
.status-pill.is-open {
  border-color: rgba(0, 140, 149, 0.22);
  background: rgba(0, 140, 149, 0.08);
  color: var(--primary-strong);
}
.status-pill.is-error {
  border-color: rgba(180, 35, 24, 0.18);
  background: var(--danger-bg);
  color: var(--danger);
}
.status-pill.is-muted {
  background: #eef2f5;
  color: var(--muted);
}
.complaints-toolbar {
  align-items: end;
}
.complaints-toolbar-actions {
  justify-content: flex-end;
}
.complaints-search-box {
  min-width: min(390px, 100%);
}
.complaints-board {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
}
.complaints-filter-label {
  font-weight: 800;
}
.complaints-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.complaints-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  background: #f7fafc;
  color: var(--muted);
  font-weight: 800;
  box-shadow: none;
}
.complaints-filter-btn.is-active {
  border-color: rgba(0, 140, 149, 0.35);
  background: var(--secondary);
  color: var(--primary-strong);
  box-shadow: 0 6px 14px rgba(0, 140, 149, 0.1);
}
.complaints-filter-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: #e7eef3;
  color: var(--text);
  font-size: 12px;
}
.complaints-filter-btn.is-active .complaints-filter-count {
  background: var(--primary);
  color: #fff;
}
.complaints-list {
  display: grid;
  gap: 14px;
}
.complaints-empty {
  padding: 28px 10px;
  text-align: center;
}
.complaint-card {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--primary);
  border-radius: 18px;
  background: #fff;
}
.complaint-card.is-approved {
  border-left-color: var(--success);
}
.complaint-card.is-rejected {
  border-left-color: #738393;
}
.complaint-card.has-fulfillment-error {
  border-color: rgba(180, 35, 24, 0.3);
  border-left-color: var(--danger);
}
.complaint-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.complaint-card-heading {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.complaint-card-heading h3,
.complaint-card-heading p,
.complaint-description h4,
.complaint-description p,
.complaint-items h4 {
  margin: 0;
}
.complaint-card-heading h3 {
  overflow-wrap: anywhere;
  font-size: 20px;
}
.complaint-card-type {
  color: var(--primary-strong);
  font-weight: 800;
}
.complaint-card-statuses {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.complaint-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 10px;
  margin: 0;
}
.complaint-definition {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f8fbfd;
}
.complaint-definition dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.complaint-definition dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
  line-height: 1.4;
}
.complaint-effect-definition,
.complaint-wide-definition {
  grid-column: span 2;
}
.complaint-description,
.complaint-items {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 14px;
  background: #f7fafc;
}
.complaint-description p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.55;
}
.complaint-items ul,
.complaint-dialog-items ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 5px;
}
.complaint-items > ul {
  padding-left: 0;
  gap: 10px;
  list-style: none;
}
.complaint-item {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
}
.complaint-item-summary {
  overflow-wrap: anywhere;
  font-weight: 800;
}
.complaint-photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.complaint-photo {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7fafc;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.complaint-photo:hover {
  border-color: rgba(0, 140, 149, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}
.complaint-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  object-fit: cover;
  background: var(--bg-strong);
}
.complaint-photo-meta {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}
.complaint-photo-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 40px;
  padding: 10px 13px;
  border: 1px solid rgba(0, 140, 149, 0.2);
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
}
.complaint-photo-upload:hover {
  background: #dff2f3;
}
.complaint-photo-upload.is-disabled {
  opacity: .62;
  cursor: not-allowed;
}
.complaint-photo-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.complaint-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.complaint-reject-action,
.complaint-reject-confirm {
  color: var(--danger);
  background: var(--danger-bg);
  border: 1px solid rgba(180, 35, 24, 0.16);
  font-weight: 800;
}
.complaint-fulfillment-error {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.complaint-audit {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}
.complaint-audit summary {
  width: fit-content;
  color: var(--primary-strong);
  font-weight: 800;
  cursor: pointer;
}
.complaint-audit-body {
  padding-top: 12px;
}
.complaint-audit-body > p {
  margin: 0;
}
.complaint-audit-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}
.complaint-audit-item {
  position: relative;
  display: grid;
  gap: 5px;
  margin-left: 8px;
  padding: 0 0 18px 22px;
  border-left: 2px solid var(--line);
}
.complaint-audit-item:last-child {
  padding-bottom: 2px;
  border-left-color: transparent;
}
.complaint-audit-item::before {
  content: '';
  position: absolute;
  top: 3px;
  left: -6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px #fff;
}
.complaint-audit-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.complaint-audit-detail {
  margin: 2px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.45;
}
.complaints-load-more-wrap {
  display: flex;
  justify-content: center;
}
.complaint-decision-dialog {
  width: min(680px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  padding: 0;
  border: 0;
  border-radius: 22px;
  color: var(--text);
  background: #fff;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.3);
}
.complaint-decision-dialog::backdrop {
  background: rgba(15, 32, 46, 0.58);
  backdrop-filter: blur(3px);
}
.complaint-decision-dialog-content {
  display: grid;
  gap: 16px;
  padding: 22px;
}
.complaint-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.complaint-dialog-head h2,
.complaint-dialog-head .eyebrow {
  margin: 0;
}
.complaint-dialog-head .eyebrow {
  margin-bottom: 6px;
}
.complaint-dialog-close {
  width: 40px;
  height: 40px;
  min-width: 40px;
  padding: 0;
  border-radius: 999px;
  font-size: 24px;
  line-height: 1;
}
.complaint-dialog-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.complaint-dialog-detail {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f8fbfd;
}
.complaint-dialog-detail strong {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.45;
}
.complaint-dialog-detail-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.complaint-dialog-description,
.complaint-dialog-items {
  grid-column: 1 / -1;
}
.complaint-dialog-alert {
  margin: 0;
}
.complaint-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.complaint-dialog-choice-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.complaint-dialog-choice-actions .complaint-later-action {
  grid-column: 1 / -1;
  justify-self: end;
}
.complaint-decision-impact {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  line-height: 1.55;
  font-weight: 700;
}
.complaint-decision-impact.is-approved {
  border-color: rgba(2, 122, 72, 0.2);
  background: var(--success-bg);
  color: var(--success);
}
.complaint-decision-impact.is-rejected {
  border-color: rgba(180, 35, 24, 0.18);
  background: var(--danger-bg);
  color: var(--danger);
}
.complaint-rejection-field {
  display: grid;
  gap: 8px;
  font-weight: 800;
}
.complaint-dialog-saving {
  margin: 0;
  text-align: right;
}
.gls-table-wrap {
  max-height: min(680px, 70vh);
}
.archive-shell { max-width: 1440px; }
.archive-subtitle { max-width: 760px; }
.archive-stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.archive-toolbar-actions { flex: 1; justify-content: flex-end; }
.archive-search-box { width: min(100%, 430px); }
.archive-search-box input { min-width: 250px; }
.archive-table-wrap { max-height: min(760px, 68vh); }
.archive-table th:nth-child(1) { width: 20%; }
.archive-table th:nth-child(2) { width: 15%; }
.archive-table th:nth-child(3) { width: 40%; }
.archive-table th:nth-child(4) { width: 25%; }
.archive-token-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.archive-token { display: inline-flex; align-items: baseline; gap: 3px; padding: 4px 7px; border-radius: 8px; background: #edf3f2; }
.archive-token small { color: #526a65; font-weight: 700; }
.archive-tracking { display: inline-block; padding: 4px 7px; border-radius: 8px; background: #e8f1ff; color: #245da8; }
.archive-load-more, .archive-empty { padding: 24px !important; text-align: center; }
.gls-error-text {
  max-width: 360px;
  white-space: normal;
  overflow-wrap: anywhere;
}
.gls-action-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.gls-load-more-row td {
  text-align: center;
  background: #f8fbfd;
}
.gls-load-more-row:hover {
  background: #f8fbfd;
}
.gls-address-edit-row td {
  background: #f6fbfc;
}
.gls-address-form {
  display: grid;
  gap: 14px;
}
.gls-address-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.gls-address-form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.gls-address-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.gls-stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.admin-grid {
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
  align-items: start;
}
.admin-system-lock-card {
  grid-column: 1 / -1;
}
.admin-lock-form {
  display: grid;
  gap: 16px;
}
.admin-lock-state {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(2, 122, 72, 0.18);
  border-radius: 999px;
  background: var(--success-bg);
  color: var(--success);
  font-size: 13px;
  font-weight: 800;
}
.admin-lock-state.is-locked {
  border-color: rgba(180, 35, 24, 0.18);
  background: var(--danger-bg);
  color: var(--danger);
}
.admin-lock-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
}
.admin-lock-toggle input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.admin-lock-toggle-track {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: #cad6df;
  transition: background .18s ease;
}
.admin-lock-toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(15, 23, 42, 0.22);
  transition: transform .18s ease;
}
.admin-lock-toggle input:checked + .admin-lock-toggle-track {
  background: var(--danger);
}
.admin-lock-toggle input:checked + .admin-lock-toggle-track::after {
  transform: translateX(20px);
}
.admin-lock-toggle input:focus-visible + .admin-lock-toggle-track {
  box-shadow: 0 0 0 4px rgba(0, 140, 149, 0.16);
}
.admin-lock-toggle > span:last-child {
  display: grid;
  gap: 3px;
}
.admin-lock-toggle small,
.admin-lock-message-field {
  color: var(--muted);
}
.admin-lock-message-field {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 800;
}
.admin-lock-message-field textarea {
  min-height: 96px;
  color: var(--text);
  font-weight: 400;
  line-height: 1.45;
}
.admin-lock-actions {
  align-items: center;
}
.admin-lock-actions .small-text {
  line-height: 1.4;
}
.admin-user-list {
  display: grid;
  gap: 10px;
}
.admin-user-item {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  text-align: left;
  box-shadow: none;
}
.admin-user-item.is-active {
  border-color: rgba(0, 140, 149, 0.55);
  box-shadow: 0 0 0 4px rgba(0, 140, 149, 0.08);
}
.admin-user-item span {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}
.admin-user-item em {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-strong);
  background: #dff6f4;
  border-radius: 999px;
  padding: 4px 8px;
}
.admin-user-item small {
  color: var(--muted);
  line-height: 1.35;
}
.admin-empty {
  padding: 14px 0;
}
.admin-form {
  display: grid;
  gap: 16px;
}
.admin-form label {
  display: grid;
  gap: 8px;
}
.admin-permissions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.admin-permission-item {
  grid-template-columns: 20px 1fr;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.admin-permission-item input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}
.admin-permission-item.is-locked {
  background: #f6fbfc;
  color: var(--muted);
}
.admin-permission-item.is-locked input {
  cursor: not-allowed;
}
.admin-form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.danger-action {
  color: var(--danger);
  background: var(--danger-bg);
}
.system-lock-layout {
  width: min(100%, 620px);
  margin: 0 auto;
  padding: 32px 20px;
}
.system-lock-card {
  display: grid;
  justify-items: start;
  gap: 16px;
}
.system-lock-card h1,
.system-lock-card p {
  margin: 0;
}
.system-lock-symbol {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--danger-bg);
  color: var(--danger);
  font-size: 24px;
  font-weight: 900;
}
.system-lock-message {
  max-width: 52ch;
  white-space: pre-line;
  line-height: 1.6;
}
.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top left, rgba(0, 140, 149, 0.18), transparent 30%),
    linear-gradient(180deg, #f7fafc 0%, var(--bg-strong) 100%);
}
.login-body-simple {
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #edf2fb 0%, #eef4f7 100%);
}
.login-layout {
  width: min(100%, 584px);
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px;
}
.login-copy-block {
  max-width: 520px;
  margin: 0 auto 26px;
  text-align: center;
}
.login-copy-block h1 {
  margin: 10px 0 10px;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.02;
}
.login-copy-block p {
  margin: 0 0 6px;
  font-size: 16px;
}
.login-topbar-simple {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
}
.login-shell {
  width: min(980px, calc(100vw - 32px));
}
.login-shell-compact {
  width: min(560px, calc(100vw - 32px));
}
.login-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 24px;
  align-items: stretch;
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,255,255,.9));
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 28px;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.14);
  padding: 28px;
}
.login-card-simple {
  max-width: 520px;
  margin: 0 auto;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 26px;
  border-radius: 24px;
  background: rgba(255,255,255,.94);
  border: 1px solid rgba(195, 207, 221, .95);
  box-shadow: 0 24px 48px rgba(61, 91, 124, 0.14);
  text-align: center;
}
.login-brand {
  border-radius: 22px;
  padding: 28px;
  background: linear-gradient(145deg, rgba(0, 140, 149, 0.1), rgba(0, 140, 149, 0.04));
  border: 1px solid rgba(0, 140, 149, 0.12);
}
.login-brand-minimal {
  padding: 0;
  background: transparent;
  border: 0;
}
.login-brand p,
.login-brand h1 {
  margin-bottom: 14px;
}
.login-panel {
  display: grid;
  gap: 16px;
  align-content: center;
}
.login-panel-minimal {
  padding-top: 4px;
}
.login-form {
  display: grid;
  gap: 14px;
}
.login-form label {
  display: grid;
  gap: 8px;
  font-weight: 600;
  text-align: center;
}
.login-form .login-remember {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  margin-inline: auto;
  font-weight: 600;
  cursor: pointer;
}
.login-remember input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #147a69;
}
.login-card-simple .login-form input[type='password'],
.login-card-simple .login-form input[type='text'] {
  min-height: 54px;
  border-radius: 16px;
  border: 2px solid #1d2631;
  box-shadow: none;
}
.login-helper {
  margin: 4px 0 0;
  font-size: 14px;
}
.login-submit {
  width: fit-content;
  min-width: 96px;
  margin-inline: auto;
  padding-inline: 22px;
  border-radius: 999px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@media (max-width: 960px) {
  .toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .page-nav {
    width: fit-content;
    margin-left: 0;
    margin-right: 0;
  }
  .page-nav-link {
    flex: 0 0 auto;
    height: 42px;
    padding: 0 14px;
    font-size: 12px;
  }
  .hero-topbar {
    justify-content: flex-start;
  }
  .hero-actions {
    justify-content: space-between;
    width: 100%;
  }
  .hero-actions > form {
    margin-left: auto;
  }
  .compact-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .login-card {
    grid-template-columns: 1fr;
  }
  .login-layout {
    padding: 20px;
  }
  .refresh-head-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }
  .hero .eyebrow {
    position: static;
    transform: none;
    margin: 0 auto 10px;
  }
  .shipping-grid {
    grid-template-columns: 1fr;
  }
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .shipping-rate-item {
    flex-direction: column;
    align-items: stretch;
  }
  .shipping-rate-actions {
    justify-content: stretch;
  }
  .billing-country-side,
  .billing-country-side.is-editing {
    width: 100%;
    justify-content: space-between;
  }
  .billing-country-rate-editor {
    width: 100%;
  }
  .billing-country-rate-input {
    width: 100%;
    min-width: 0;
  }
  .shipping-search-box {
    min-width: 100%;
  }
  .complaints-toolbar-actions,
  .complaints-search-box {
    width: 100%;
  }
}
@media (max-width: 720px) {
  .shell { padding: 14px; }
  .archive-stats-grid { grid-template-columns: 1fr; }
  .archive-toolbar-actions { width: 100%; align-items: stretch; }
  .archive-search-box { width: 100%; }
  .archive-search-box input { min-width: 0; font-size: 16px; }
  .archive-table-wrap { max-height: none; overflow: visible; }
  .archive-table, .archive-table tbody, .archive-table tr, .archive-table td { display: block; width: 100%; min-width: 0 !important; max-width: 100%; }
  .archive-table thead { display: none; }
  .archive-table tbody { display: grid; gap: 10px; }
  .archive-table tr { padding: 12px; border: 1px solid #dbe6e3; border-radius: 12px; overflow: hidden; background: #fff; }
  .archive-table td { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 7px 0; border: 0; }
  .archive-table td::before { content: attr(data-label); color: #6b7c78; font-size: 12px; font-weight: 800; }
  .archive-table td > * { min-width: 0; max-width: 100%; }
  .archive-table td strong { display: block; }
  .archive-table td code { white-space: normal; overflow-wrap: anywhere; }
  .archive-table .archive-load-more, .archive-table .archive-empty { display: block; }
  .archive-table .archive-load-more::before, .archive-table .archive-empty::before { content: none; }
  .hero {
    min-height: 230px;
    z-index: 40;
  }
  .hero-main {
    grid-template-rows: 28px minmax(42px, auto) minmax(24px, auto) 54px;
  }
  .desktop-page-nav { display: none !important; }
  .page-nav-menu {
    display: block;
    position: relative;
    width: 100%;
    min-width: 0;
    z-index: 30;
  }
  .mobile-nav-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 54px;
    padding: 6px 9px 6px 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #f4fafb;
    color: var(--text);
    cursor: pointer;
    list-style: none;
    box-shadow: 0 7px 18px rgba(42, 72, 89, .06);
  }
  .mobile-nav-summary::-webkit-details-marker { display: none; }
  .mobile-nav-menu-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .04em;
    text-transform: uppercase;
  }
  [data-mobile-nav-current] {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
  }
  .mobile-nav-arrow {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #dff2f1;
    color: var(--primary-strong);
    font-size: 22px;
    transition: transform .18s ease;
  }
  .page-nav-menu[open] .mobile-nav-arrow { transform: rotate(180deg); }
  .page-nav-menu:not([open]) > .page-nav { display: none; }
  .page-nav-menu[open] > .page-nav {
    display: grid;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    max-width: none;
    height: auto;
    max-height: min(62dvh, 440px);
    gap: 4px;
    margin: 0;
    padding: 8px;
    border-radius: 18px;
    overflow-x: hidden;
    overflow-y: auto;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 18px 45px rgba(27, 53, 68, .2);
  }
  .page-nav-link {
    justify-content: flex-start;
    width: 100%;
    height: 44px;
    min-height: 44px;
    padding: 0 14px;
    font-size: 14px;
    white-space: nowrap;
    text-align: left;
  }
  .page-nav-link::after {
    content: none;
  }
  .page-nav-link .page-nav-label {
    display: inline;
  }
  .page-nav-badge {
    position: static;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    font-size: 10px;
  }
  .hero-actions {
    gap: 10px;
  }
  .hero-actions > form {
    width: auto;
  }
  .hero-actions .secondary {
    width: auto;
  }
  .toolbar-actions {
    gap: 12px;
  }
  .mode-submit-stack {
    width: 100%;
    min-width: 0;
  }
  .mode-submit-stack > button { min-width: 0; white-space: normal; }
  .processing-filter-wrap,
  .stock-filter-wrap {
    width: 100%;
    grid-template-columns: 1fr;
  }
  .processing-filter-wrap select,
  .stock-filter-wrap select {
    max-width: 220px;
  }
  .refresh-head-actions .names-toggle-btn {
    display: inline-flex;
  }
  th, td {
    padding: 9px 8px;
    font-size: 14px;
  }
  th:first-child, td:first-child {
    padding-left: 14px;
  }
  th:last-child, td:last-child {
    padding-right: 14px;
  }
  thead th {
    padding-top: 8px;
    padding-bottom: 8px;
    vertical-align: middle;
  }
  .table-wrap {
    font-size: 14px;
  }
  .qty-input {
    max-width: 68px;
    min-width: 0;
    padding: 8px 6px;
    text-align: center;
  }
  body.names-hidden .table-wrap {
    overflow-x: hidden;
  }
  body.names-hidden .table-wrap table {
    table-layout: fixed;
    width: 100%;
  }
  body.names-hidden th:nth-child(1),
  body.names-hidden td:nth-child(1) {
    width: 44%;
  }
  body.names-hidden th:nth-child(3),
  body.names-hidden td:nth-child(3) {
    width: 16%;
    text-align: center;
  }
  body.names-hidden th:nth-child(4),
  body.names-hidden td:nth-child(4) {
    width: 40%;
    text-align: center;
  }
  body.names-hidden .sku {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.15;
  }
  body.names-hidden #th-live,
  body.names-hidden #th-new {
    min-width: 0;
  }
  body:not(.names-hidden) th:nth-child(2), body:not(.names-hidden) td:nth-child(2) {
    min-width: 280px;
  }
  .login-card,
  .login-brand,
  .login-card-simple {
    padding: 20px;
  }
  .login-copy-block h1 {
    font-size: 34px;
  }
  .login-topbar-simple {
    justify-content: center;
  }
  .complaints-filter {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .complaints-filter-btn {
    width: 100%;
    padding-inline: 8px;
  }
  .complaint-card {
    padding: 14px;
  }
  .complaint-photo-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .complaint-photo-upload {
    width: 100%;
  }
  .complaint-card-head,
  .complaint-audit-head {
    flex-direction: column;
  }
  .complaint-card-statuses {
    justify-content: flex-start;
  }
  .complaint-facts,
  .complaint-dialog-details {
    grid-template-columns: 1fr;
  }
  .complaint-effect-definition,
  .complaint-wide-definition,
  .complaint-dialog-description,
  .complaint-dialog-items {
    grid-column: auto;
  }
  .complaint-card-actions,
  .complaint-dialog-actions,
  .complaint-dialog-choice-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .complaint-card-actions button,
  .complaint-dialog-actions button,
  .complaint-dialog-choice-actions .complaint-later-action {
    width: 100%;
    justify-self: stretch;
  }
  .complaint-dialog-choice-actions .complaint-later-action {
    grid-column: auto;
  }
  .complaint-decision-dialog-content {
    padding: 18px;
  }
}

/* Chat rules must follow the shared card/button rules in the cascade. */
.chat-app { padding: 0; overflow: hidden; }
.chat-profile-button,
.chat-icon-button,
.chat-conversation-item,
.chat-person-item,
.chat-emoji-button,
.chat-emoji-picker button,
.chat-message-actions button,
.chat-translation-label,
.chat-image-thumb {
  box-shadow: none;
}
.chat-profile-button,
.chat-icon-button,
.chat-emoji-button,
.chat-emoji-picker button,
.chat-message-actions button,
.chat-translation-label,
.chat-image-thumb { border: 0; }
.chat-profile-button,
.chat-icon-button,
.chat-conversation-item,
.chat-person-item,
.chat-emoji-button,
.chat-emoji-picker button,
.chat-message-actions button,
.chat-translation-label { background: transparent; color: inherit; }
.chat-profile-button,
.chat-icon-button,
.chat-emoji-button,
.chat-emoji-picker button,
.chat-image-thumb { padding: 0; }
.chat-conversation-item,
.chat-person-item { padding: 10px; }
.chat-conversation-item:hover,
.chat-person-item:hover,
.chat-profile-button:hover,
.chat-icon-button:hover,
.chat-emoji-button:hover,
.chat-emoji-picker button:hover,
.chat-message-actions button:hover,
.chat-translation-label:hover,
.chat-image-thumb:hover { transform: none; }
.chat-translation-label { color: #39766d; padding-top: 6px; }
.chat-message-actions button { color: #586762; padding: 3px 5px; }

/* Viewport-filling messenger layout. The page header intentionally keeps the
   shared WELA dimensions so navigation does not jump between pages. */
.chat-page {
  height: 100dvh;
  overflow: hidden;
}
.chat-page .chat-shell {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  width: 100%;
  max-width: 1440px;
  height: 100dvh;
  min-height: 0;
}
.chat-page #chat-message-box:not(:empty) { margin-bottom: 8px; }

.chat-app {
  position: relative;
  height: 100%;
  min-height: 0;
  border-radius: 20px;
}
.chat-sidebar,
.chat-main { min-height: 0; }
.chat-main { overflow: hidden; }
.chat-sidebar-head,
.chat-thread-head {
  min-height: 60px;
  padding-block: 9px;
}
.chat-active {
  display: grid;
  grid-template-areas:
    "thread-head"
    "pinned"
    "load-older"
    "messages"
    "reply-preview"
    "composer";
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.chat-thread-head { grid-area: thread-head; }
.chat-load-older { grid-area: load-older; }
.chat-messages {
  grid-area: messages;
  overscroll-behavior: contain;
}
.chat-reply-preview { grid-area: reply-preview; }
.chat-composer {
  grid-area: composer;
  position: relative;
  z-index: 4;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  border-top-color: #dbe5e2;
  background: rgba(250, 252, 251, .97);
  box-shadow: 0 -8px 22px rgba(31, 61, 54, .055);
}
.chat-compose-field {
  border: 1px solid #cad9d5;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(29, 59, 52, .045);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.chat-compose-field:focus-within {
  border-color: rgba(0, 140, 149, .7);
  box-shadow: 0 0 0 4px rgba(0, 140, 149, .12);
}
.chat-compose-field textarea {
  display: block;
  min-height: 44px;
  max-height: 136px;
  padding: 11px 44px 10px 14px;
  border: 0;
  border-radius: 22px;
  outline: 0;
  background: transparent;
  box-shadow: none;
  line-height: 1.42;
  resize: none;
  overflow-y: hidden;
}
.chat-compose-field textarea:focus { border: 0; box-shadow: none; }
.chat-composer-action {
  border: 1px solid #cfe0dc;
  background: #edf7f5;
  color: #146d61;
  box-shadow: none;
}
.chat-send-button {
  border-radius: 22px;
  box-shadow: 0 7px 18px rgba(0, 140, 149, .18);
}
.chat-send-icon { display: none; }
.chat-menu-mobile-action { display: none; }
.chat-emoji-button { border-radius: 50%; }
.chat-message-tools { display: flex; min-width: 0; }
.chat-message.is-mine .chat-message-tools { justify-content: flex-end; }
.chat-message-more { display: none; }

.chat-page button:focus-visible,
.chat-page .page-nav-link:focus-visible,
.chat-dialog button:focus-visible,
.chat-image-dialog button:focus-visible {
  outline: 3px solid rgba(0, 111, 119, .72);
  outline-offset: 2px;
}
.chat-reaction:focus-visible,
.chat-message-actions button:focus-visible,
.chat-image-thumb:focus-visible,
.chat-profile-button:focus-visible,
.chat-icon-button:focus-visible { border-radius: 10px; }

@media (max-width: 760px) {
  .chat-page {
    overflow-x: hidden;
    overflow-y: auto;
  }
  .global-profile-name,
  .global-profile-arrow { display: none; }
  .global-profile-trigger { min-height: 42px; padding: 4px; }
  .global-profile-menu { position: fixed; top: 62px; right: 10px; }
  .global-profile-dialog .chat-profile-form { padding: 14px; }
  .chat-page .chat-shell {
    padding: 8px;
  }
  .chat-page .hero {
    display: flex;
    position: sticky;
    top: 8px;
    flex-direction: column;
    min-height: 0;
    margin-bottom: 8px;
    padding: 8px;
    border-radius: 16px;
    gap: 6px;
    z-index: 50;
  }
  .chat-page .hero-topbar {
    min-height: 42px;
  }
  .chat-page .hero-actions {
    gap: 6px;
  }
  .chat-page .lang-switch { padding: 3px; }
  .chat-page .lang-btn {
    min-width: 44px;
    padding: 7px 10px;
  }
  .chat-page .hero-actions .secondary {
    padding: 9px 12px;
    border-radius: 12px;
  }
  .chat-page .hero-main { display: block; }
  .chat-page .hero-main > .eyebrow,
  .chat-page .hero-main > h1,
  .chat-page .hero-main > .billing-subtitle { display: none; }
  .chat-page .mobile-nav-summary { height: 46px; }
  .chat-app {
    display: block;
    height: 100%;
    min-height: 0;
    border-radius: 15px;
  }
  .chat-sidebar {
    height: 100%;
    overflow-y: auto;
    overscroll-behavior-y: auto;
    touch-action: pan-y;
  }
  .chat-conversation-list,
  .chat-people-list {
    flex: 0 0 auto;
    max-height: none;
    overflow: visible;
  }
  .chat-people-list { padding-bottom: 16px; }
  .chat-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
    overflow: visible;
  }
  .chat-filters button {
    min-width: 0;
    width: 100%;
    padding-inline: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .chat-main {
    display: none;
    position: absolute;
    inset: 0;
    height: 100%;
  }
  .chat-app.has-active-chat .chat-main { display: block; }
  .chat-thread-head {
    min-height: 56px;
    gap: 8px;
    padding: 7px 8px;
  }
  #chat-favorite,
  #chat-pin-conversation { display: none; }
  .chat-menu-mobile-action { display: block; }
  .chat-thread-avatar > .chat-avatar { width: 38px; height: 38px; }
  .chat-thread-action { min-width: 36px; padding: 7px 8px; }
  .chat-messages {
    padding: 10px 9px;
    overscroll-behavior-y: auto;
    touch-action: pan-y;
  }
  .chat-message { margin: 7px 0; }
  .chat-message-column { max-width: 90%; }
  .chat-composer {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
    gap: 6px;
    padding: 7px 7px calc(7px + env(safe-area-inset-bottom, 0px));
  }
  .chat-composer-action { width: 40px; height: 40px; font-size: 18px; }
  .chat-compose-field textarea {
    min-height: 40px;
    max-height: 112px;
    padding: 9px 36px 8px 10px;
    font-size: 16px;
  }
  .chat-emoji-button { right: 5px; bottom: 4px; width: 32px; height: 32px; }
  .chat-send-button {
    display: inline-grid;
    place-items: center;
    width: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 50%;
  }
  .chat-send-label { display: none; }
  .chat-send-icon { display: inline; font-size: 18px; line-height: 1; }
  .chat-reply-preview { padding: 7px 10px; }
  .chat-message-tools {
    position: relative;
    align-self: stretch;
    min-height: 32px;
    padding-top: 2px;
  }
  .chat-message-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #536b65;
    box-shadow: none;
    font-size: 16px;
    letter-spacing: 1px;
  }
  .chat-message-actions {
    display: none;
    position: absolute;
    left: 0;
    bottom: calc(100% + 3px);
    width: max-content;
    max-width: calc(100vw - 32px);
    gap: 2px;
    padding: 5px;
    border: 1px solid #d2dedb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(24, 48, 43, .2);
    opacity: 1;
    overflow-x: auto;
    z-index: 8;
  }
  .chat-message.is-mine .chat-message-actions { right: 0; left: auto; }
  .chat-message-actions.is-open { display: flex; }
  .chat-message-actions button {
    min-width: 36px;
    min-height: 36px;
    padding: 7px;
    border-radius: 9px;
    font-size: 14px;
    white-space: nowrap;
  }
  .chat-message-actions button:first-child { padding-inline: 10px; font-size: 12px; }
  .chat-emoji-picker {
    position: fixed;
    right: 8px;
    bottom: calc(62px + env(safe-area-inset-bottom, 0px));
    grid-template-columns: repeat(6, minmax(34px, 1fr));
    width: min(286px, calc(100vw - 16px));
  }
}
