body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #f5f6f8;
}

.header {
  background: #111827;
  color: #fff;
  padding: 16px;
}

.content {
  padding: 20px;
}
/* Deal status badges */
.deal-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.deal-lead {
  background: #e5e7eb;
  color: #374151;
}

.deal-in-progress {
  background: #dbeafe;
  color: #1d4ed8;
}

.deal-invoice-sent {
  background: #ffedd5;
  color: #9a3412;
}

.deal-paid {
  background: #dcfce7;
  color: #166534;
}

.deal-lost {
  background: #fee2e2;
  color: #991b1b;
}
/* ===== WebZip Chat: Super Admin (SA) mobile cards ===== */

.sa-cards {
  margin-top: 12px;
}

.sa-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
  margin: 12px 0;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.sa-card__header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.sa-card__title {
  font-weight: 800;
  font-size: 14px;
  color: #111;
  line-height: 1.2;
  word-break: break-word;
}

.sa-card__subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: #555;
  word-break: break-word;
}

.sa-chips {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.sa-chip {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  background: #eee;
  color: #111;
}

.sa-chip--active {
  background: #e8f5e9;
  color: #2e7d32;
  font-weight: 700;
}

.sa-chip--overdue {
  background: #fdecea;
  color: #b00020;
  font-weight: 700;
}

.sa-box {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f9fafb;
}

.sa-box__title {
  font-size: 12px;
  color: #111;
  font-weight: 700;
  margin-bottom: 6px;
}

.sa-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #333;
}

.sa-meta {
  margin-top: 10px;
  font-size: 12px;
  color: #555;
}

.sa-grid2 {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.sa-btnlink {
  padding: 8px 10px;
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  text-align: center;
}

.sa-btnlink--admin { background: #1976d2; }
.sa-btnlink--audit { background: #374151; }
.sa-btnlink--last  { background: #6a1b9a; }

.sa-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sa-btn {
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  color: #fff;
}

.sa-btn--block   { background: #b00020; }
.sa-btn--archive { background: #374151; }
.sa-btn--restore { background: #2e7d32; }

.sa-btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

.sa-form-row {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.sa-input {
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
}
.sa-remind-last {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.25;
  opacity: 0.9;
}

.sa-remind-err {
  margin-top: 4px;
  color: #b00020;
  word-break: break-word;
}
/* ===== WebZip Chat: Admin UI/UX (mobile-first helpers) ===== */

:root{
  /* Контраст для плохих мониторов */
  --wz-bg: #dfe6ef;              /* фон заметно темнее */
  --wz-card: #ffffff;            /* карточки белые */
  --wz-border: #9aa9bf;          /* границы темнее, читаются */
  --wz-divider: #c4cfde;

  --wz-text: #0b1220;
  --wz-muted: #334155;

  /* Акцент */
  --wz-primary: #1d4ed8;
  --wz-ring: 0 0 0 4px rgba(29,78,216,0.25);

  /* Тень усиленная, чтобы блоки не сливались */
  --wz-shadow: 0 2px 6px rgba(2,6,23,0.12), 0 10px 24px rgba(2,6,23,0.10);
}

/* Фон страницы + базовый текст */
body{
  background: var(--wz-bg);
  color: var(--wz-text);
}

/* Контентный контейнер */
.content{
  max-width: 1100px;
  margin: 0 auto;
}

/* Карточки/секции — сильнее отделяем от фона */
.card{
  background: var(--wz-card);
  border: 2px solid var(--wz-border);
  border-radius: 14px;
  padding: 14px 16px;
  margin: 14px 0;
  box-shadow: var(--wz-shadow);
}

/* Заголовок секции как “шапка”, чтобы блоки различались */
.card h2{
  margin: -14px -16px 12px -16px;
  padding: 12px 16px;
  background: #eef2f7;
  border-bottom: 2px solid var(--wz-divider);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .2px;
  color: var(--wz-text);
}

.card h3{
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--wz-text);
}

.card p{
  margin: 6px 0;
  font-size: 13px;
  color: #0f172a;
}

a{
  color: var(--wz-primary);
}

/* Базовая типографика форм */
button, input, select, textarea{
  font: inherit;
}

/* Кнопка по умолчанию = контрастная secondary */
button{
  border: 2px solid #64748b;
  background: #e2e8f0;
  color: #0b1220;
  border-radius: 12px;
  cursor: pointer;
  padding: 9px 14px;
  font-weight: 800;
  letter-spacing: .2px;
  box-shadow: 0 1px 0 rgba(2,6,23,0.10);
  transition: background .12s ease, border-color .12s ease, transform .02s ease, box-shadow .12s ease;
}

button:hover{
  background: #cbd5e1;
  border-color: #475569;
}

button:active{
  transform: translateY(1px);
}

button:focus{
  outline: none;
  box-shadow: var(--wz-ring);
}


input, select, textarea{
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
  color: #111;
}

input:focus, select:focus, textarea:focus{
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(147,197,253,0.35);
}

table{
  width: 100%;
}

/* Alerts (safe defaults if templates use them) */
.alert{
  border-radius: 12px;
  padding: 10px 12px;
  margin: 10px 0 14px 0;
  font-size: 13px;
  border: 1px solid var(--wz-border);
  background: #fff;
}
.alert-error{
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

/* ===== Mobile ===== */
@media (max-width: 768px){
  .header{
    padding: 12px;
  }

  .header h1{
    font-size: 16px;
    line-height: 1.2;
  }

  .content{
    padding: 12px;
  }

  /* Make header layout stack (template uses inline flex; we override safely) */
  header.header{
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  header.header > div{
    width: 100% !important;
    justify-content: space-between !important;
  }

  /* Tap targets */
  button, input, select, textarea{
    min-height: 44px;
    font-size: 14px;
  }

  /* Forms: one column */
  form[method]{
    width: 100%;
  }

  /* Most admin inputs in templates are inline-styled; force full width on mobile */
  input[type="text"],
  input[type="number"],
  input[type="email"],
  input[type="password"],
  input[type="url"],
  input[type="search"],
  textarea{
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  select{
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Tables: keep readable with horizontal scroll */
  table{
    font-size: 12px;
  }

  /* Any wrapper with overflow-x:auto already exists in templates; reinforce */
  div[style*="overflow-x:auto"]{
    -webkit-overflow-scrolling: touch;
  }
  /* Admin: forms grid (contacts) -> 1 column on mobile */
  .adm-grid-2{
    grid-template-columns: 1fr !important;
  }

}
/* ===== Admin: desktop table / mobile cards switch ===== */

/* default: desktop */
.only-desktop { display: block; }
.only-mobile  { display: none; }

/* mobile cards (history payments) */
.adm-cards{
  margin-top: 10px;
}

.adm-card{
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 12px;
  margin: 10px 0;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.adm-card__header{
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}

.adm-card__title{
  font-weight: 700;
  font-size: 13px;
  color: #111;
  line-height: 1.2;
}

.adm-chips{
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.adm-chip{
  padding: 2px 8px;
  font-size: 12px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #111;
  white-space: nowrap;
}

.adm-card__row{
  margin-top: 8px;
  font-size: 13px;
  color: #333;
  word-break: break-word;
}

/* mobile switch */
@media (max-width: 768px){
  .only-desktop { display: none; }
  .only-mobile  { display: block; }
}
/* ===== Admin: Pay request form (Продлить / оплатить) ===== */

.adm-label{
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 4px;
}

.adm-help{
  font-size: 12px;
  color: #666;
}

.adm-btn-primary{
  border: 1px solid #111827;
  background: #111827;
  color: #fff;
  border-radius: 10px;
}

.adm-btn-primary:hover{
  background: #0b1220;
}

/* Mobile layout */
@media (max-width: 768px){
  .adm-payform{
    display: flex;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .adm-payform__field{
    width: 100%;
  }

  .adm-payform .adm-select{
    width: 100% !important;
    min-width: 0 !important;
  }

  .adm-payform .adm-btn-primary{
    width: 100%;
  }

  .adm-help{
    line-height: 1.35;
  }
}
/* ===== Admin: "Текущий тенант" box ===== */

.adm-tenantbox{
  border: 1px solid #e5e7eb !important;
  background: #ffffff !important;
  border-radius: 14px !important;
}

.adm-tenantbox a{
  text-decoration: none;
}

.adm-tenantbox a:hover{
  text-decoration: underline;
}

/* make the "Public ID" not break layout */
.adm-tenantbox span[style*="monospace"]{
  word-break: break-all;
}

/* Mobile tweaks */
@media (max-width: 768px){
  .adm-tenantbox{
    margin: 10px 0 12px 0 !important;
    padding: 12px !important;
  }

  .adm-tenantbox div[style*="font-size:16px"]{
    font-size: 15px !important;
    line-height: 1.25 !important;
  }

  .adm-tenantbox div[style*="margin-top:8px"]{
    margin-top: 10px !important;
  }
}
/* ===== Admin: Telegram bind block ===== */

#tg_bind_status{
  font-size: 12px;
  color: #6b7280;
  word-break: break-word;
}

#tg_bind_link_wrap{
  border: 1px dashed #d1d5db;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fafafa;
}

#tg_bind_link{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

#tg_bind_link:focus{
  outline: none;
}

/* Mobile: make the button and help text stack nicely */
@media (max-width: 768px){
  /* the button inside the tg-bind flex row */
  #tg_bind_status{
    display: inline-block;
    margin-left: 6px;
  }

  #tg_bind_link_wrap{
    padding: 10px;
  }

  /* Make the bind button wide (only inside the tg-bind row) */
  button[onclick*="adminGenTgBindLink"]{
    width: 100%;
  }

  /* Help text under button becomes full width */
  button[onclick*="adminGenTgBindLink"] + span{
    display: block;
    width: 100%;
    line-height: 1.35;
  }
}
/* ===== Admin: status bar (paid_until / days_left / overdue) ===== */

.adm-statusbar{
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 10px 12px;
  background: #ffffff;
  margin-top: 10px;
}

.adm-statusbar > div{
  line-height: 1.35;
}

/* Make "ПРОСРОЧЕНО" look like a badge */
.adm-statusbar span[style*="#b00020"]{
  display: inline-block;
  margin-left: 8px !important;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b !important;
  font-weight: 700 !important;
}

/* Mobile: tighter spacing */
@media (max-width: 768px){
  .adm-statusbar{
    padding: 10px;
  }
}
/* ===== Admin: stats (Domains / Staff) ===== */

.adm-stats{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.adm-stats > div{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #e5e7eb;
  font-size: 12px;
  color: #111;
  white-space: nowrap;
}

/* Mobile: stack chips nicely */
@media (max-width: 768px){
  .adm-stats{
    gap: 6px;
  }
}
/* ===== Admin cards: neutral actions buttons (do not affect /sa) ===== */

.adm-card .sa-actions{
  gap: 8px;
}

.adm-card .sa-actions button{
  background: #ffffff;
  color: #111827;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
}

.adm-card .sa-actions button:hover{
  background: #f9fafb;
}

@media (max-width: 768px){
  .adm-card .sa-actions{
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .adm-card .sa-actions button{
    width: 100%;
  }
}
/* ===== WebZip Chat: Admin UI helpers (buttons / actions) ===== */

.adm-actions,
.adm-card__actions,
.adm-payform,
.sa-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* Make “Action” buttons consistent across admin templates */
button,
.adm-btn,
.adm-btn-primary,
.sa-btn {
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: #fff;
  color: #111827;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 600;
}

button:hover,
.adm-btn:hover,
.adm-btn-primary:hover,
.sa-btn:hover {
  filter: brightness(0.98);
}

button[disabled],
.adm-btn[disabled],
.adm-btn-primary[disabled],
.sa-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Primary action */
.adm-btn-primary {
  background: #111827;
  color: #fff;
  border-color: rgba(17, 24, 39, 0.35);
}

/* Small helper text block */
.adm-help {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.25;
}

/* Mobile: tap targets + full width where needed */
@media (max-width: 768px) {
  .adm-actions > button,
  .adm-card__actions > button,
  .sa-actions > button,
  #btnCreateInvite,
  #btnCopyInvite,
  #btnCopyEmbed,
  #btnAddDomain,
  #btnCopyClientTelegramLink {
    min-height: 44px;
    width: 100%;
  }

  /* Inputs next to buttons should also stretch */
  #inviteLink,
  #newDomain,
  #clientTelegramLink,
  #embedCode {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}
/* =========================
   FINAL POLISH (Admin UI)
   Добавлять в КОНЕЦ файла
   ========================= */
:root{
  /* HIGH CONTRAST THEME (финальный, чтобы не сливалось на плохих мониторах) */
  --adm-bg: #dfe6ef;              /* фон страницы заметно темнее белого */
  --adm-surface: #ffffff;         /* поверхности/карточки белые */
  --adm-border: #94a3b8;          /* границы темнее и читаемые */
  --adm-divider: #c4cfde;

  --adm-text: #0b1220;            /* почти чёрный */
  --adm-muted: #334155;

  --adm-primary: #1d4ed8;
  --adm-primary-hover: #153fbf;

  --adm-danger: #b91c1c;
  --adm-danger-hover: #991b1b;

  --adm-success: #047857;
  --adm-success-hover: #036a4d;

  --adm-shadow: 0 2px 6px rgba(2,6,23,0.12), 0 10px 24px rgba(2,6,23,0.10);
  --adm-radius: 14px;

  --adm-ring: 0 0 0 4px rgba(29,78,216,0.25);
}

/* Общая типографика/фон */
html, body{
  color: var(--adm-text);
  background: var(--adm-bg);
}

/* Карточки — контрастно отделены от фона */
.card{
  background: var(--adm-surface);
  border: 2px solid var(--adm-border);
  border-radius: var(--adm-radius);
  box-shadow: var(--adm-shadow);
}

/* Заголовок секции как “шапка”, чтобы блоки не сливались в полотно */
.card h2{
  margin: -14px -16px 12px -16px;
  padding: 12px 16px;
  background: #eef2f7;
  border-bottom: 2px solid var(--adm-divider);
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .2px;
}

.card h3{
  margin: 12px 0 8px 0;
  font-size: 14px;
  font-weight: 700;
}

.card hr{
  border: none !important;
  border-top: 2px solid var(--adm-divider) !important;
}

/* Мягкая “шапка тенанта” — но с контрастом */
.adm-tenantbox{
  border: 2px solid var(--adm-border) !important;
  border-radius: var(--adm-radius) !important;
  background: #f8fafc !important;
}

/* Статы/статус — читаемо */
.adm-stats,
.adm-statusbar{
  color: #1f2937 !important;
}
.adm-stats{
  padding-top: 6px;
}
.adm-statusbar{
  padding: 10px 12px;
  border: 2px solid var(--adm-divider);
  border-radius: 12px;
  background: #f1f5f9;
}

/* БАЗОВАЯ кнопка — контрастная secondary (НЕ белая) */
button,
input[type="button"],
input[type="submit"]{
  border: 2px solid #64748b;
  background: #e2e8f0;
  color: #0b1220;
  border-radius: 12px;
  padding: 9px 14px;
  font-weight: 800;
  letter-spacing: .2px;
  box-shadow: 0 1px 0 rgba(2,6,23,0.10);
  transition: transform .02s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
}

button:hover,
input[type="button"]:hover,
input[type="submit"]:hover{
  background: #cbd5e1;
  border-color: #475569;
}

button:active,
input[type="button"]:active,
input[type="submit"]:active{
  transform: translateY(1px);
}

button:disabled,
input[type="button"]:disabled,
input[type="submit"]:disabled{
  opacity: .55;
  cursor: not-allowed;
  box-shadow: none;
}

/* Фокус для клавиатуры */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible{
  outline: none;
  box-shadow: var(--adm-ring);
  border-color: rgba(29,78,216,.65);
}

/* Primary-кнопка (в HTML ставили adm-btn-primary) */
.adm-btn-primary{
  background: var(--adm-primary) !important;
  border-color: #0b3aa8 !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(29,78,216,.20);
}
.adm-btn-primary:hover{
  background: var(--adm-primary-hover) !important;
  border-color: var(--adm-primary-hover) !important;
}

/* SA-кнопки (опасные/архив/восстановить) — должны отличаться по смыслу */
.sa-btn{
  border: 0 !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(2,6,23,.14);
}
.sa-btn--block{
  background: var(--adm-danger) !important;
}
.sa-btn--block:hover{
  background: var(--adm-danger-hover) !important;
}
.sa-btn--archive{
  background: #334155 !important;
}
.sa-btn--archive:hover{
  background: #0f172a !important;
}
.sa-btn--restore{
  background: var(--adm-success) !important;
}
.sa-btn--restore:hover{
  background: var(--adm-success-hover) !important;
}

/* Чипсы — контрастнее */
.adm-chips{ display:flex; gap:6px; flex-wrap:wrap; }
.adm-chip{
  display:inline-flex;
  align-items:center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 2px solid var(--adm-divider);
  background: #f1f5f9;
  color: #1f2937;
}

/* Карточки (mobile lists) */
.adm-cards{ display:flex; flex-direction:column; gap:10px; }
.adm-card{
  border: 2px solid var(--adm-border);
  border-radius: var(--adm-radius);
  background: #fff;
  box-shadow: var(--adm-shadow);
  padding: 10px 12px;
}
.adm-card__header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  margin-bottom: 8px;
}
.adm-card__title{
  font-weight: 800;
  color: #0b1220;
}
.adm-card__row{
  padding: 6px 0;
  border-top: 2px dashed var(--adm-divider);
}
.adm-card__row:first-of-type{
  border-top: none;
}

/* Экшены в карточках */
.adm-card__actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:10px;
}
.adm-card__actions button{
  flex: 1 1 auto;
  min-width: 120px;
}

/* Платёжная форма */
.adm-payform{
  gap: 12px !important;
}
.adm-payform__field{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.adm-label{
  font-size: 12px;
  color: var(--adm-muted);
  font-weight: 700;
}
.adm-select{
  min-height: 40px;
}

/* Грид 2 колонки */
.adm-grid-2{
  display:grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 12px !important;
}

/* Мобайл — коллапс, отступы, кнопки */
@media (max-width: 768px){
  .card{ padding: 12px; }
  .adm-grid-2{ grid-template-columns: 1fr !important; }
  .adm-payform{ flex-direction: column !important; align-items: stretch !important; }
  .adm-payform__field select{ width: 100% !important; }
  .adm-payform .adm-btn-primary{ width: 100%; }
}

/* =========================
   SA desktop: wide tenants table (top+bottom horizontal scroll)
   ========================= */

.sa-table-wrap{
  width: 100%;
  max-width: 100%;
  border: 2px solid var(--adm-divider);
  border-radius: var(--adm-radius);
  background: #fff;
  padding: 10px;
}

.sa-xscroll{
  overflow-y: hidden;
}
/* Важно: inner должен расширяться по ширине контента (таблицы),
   иначе у #saXBottom может не возникнуть scrollWidth и ползунок не появится */
.sa-xscroll__inner{
  display: inline-block;
  min-width: 100%;
}
.sa-xscroll--bottom .sa-xscroll__inner{
  width: max-content;
}

/* TOP scrollbar: видимый “желобок” сверху */
.sa-xscroll--top{
  height: 18px;
  margin: 0 0 10px 0;
  overflow-x: scroll;              /* важно: scroll, не auto */
  scrollbar-gutter: stable both-edges;

  background: #f8fafc;
  border: 1px solid var(--adm-divider);
  border-radius: 10px;
}

/* “пустышка” для ширины верхнего скролла */
.sa-xscroll--top .sa-xscroll__inner{
  height: 1px;
}

/* Bottom: основной горизонтальный скролл таблицы */
.sa-xscroll--bottom{
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable both-edges;
  padding-bottom: 4px;
}

/* Высота полосы в Chrome */
.sa-xscroll--top::-webkit-scrollbar,
.sa-xscroll--bottom::-webkit-scrollbar{
  height: 12px;
}
/* Сделать скроллбары реально заметными (Chrome/Edge/Safari) */
.sa-xscroll--top::-webkit-scrollbar-thumb,
.sa-xscroll--bottom::-webkit-scrollbar-thumb{
  background: rgba(15, 23, 42, 0.35);
  border-radius: 999px;
  border: 3px solid rgba(248, 250, 252, 1);
}

.sa-xscroll--top::-webkit-scrollbar-track,
.sa-xscroll--bottom::-webkit-scrollbar-track{
  background: rgba(15, 23, 42, 0.08);
  border-radius: 999px;
}

/* Firefox */
.sa-xscroll--top,
.sa-xscroll--bottom{
  scrollbar-width: auto;
  scrollbar-color: rgba(15, 23, 42, 0.35) rgba(15, 23, 42, 0.08);
}

/* Таблица должна быть широкой, чтобы был горизонтальный overflow */
#saTenantsTable{
  width: max-content !important;
  min-width: 1600px !important;
  border-collapse: collapse;
}

/* Ячейки */
.sa-table-wrap th,
.sa-table-wrap td{
  border: 1px solid var(--adm-divider) !important;
  padding: 10px 10px !important;
  vertical-align: top;
  background: #fff;
}

/* Липкий заголовок */
.sa-table-wrap thead th{
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  font-weight: 800;
}

/* Зебра + hover */
.sa-table-wrap tbody tr:nth-child(even) td{
  background: #fbfdff;
}
.sa-table-wrap tbody tr:hover td{
  background: #f1f5f9;
}

/* ===== Admin: nice tables (dialogs) ===== */
.adm-table-wrap{
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
}

.adm-table{
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.adm-table th,
.adm-table td{
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
  font-size: 13px;
}

.adm-table thead th{
  background: #f8fafc;
  text-align: left;
  font-weight: 700;
  color: #111827;
}

.adm-table tbody tr:hover{
  background: #f9fafb;
}

.adm-table tbody tr:last-child td{
  border-bottom: none;
}


/* ===== WebZip Chat: Tenant Admin navigation / dashboard UX ===== */

.wz-admin-shell{
  max-width: 1280px;
  margin: 18px auto;
  padding: 0 16px;
}

.header.wz-admin-header{
  padding: 14px 18px;
}

.wz-admin-header__inner{
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.wz-admin-brand{
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wz-admin-brand__title{
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
  color: #fff;
}

.wz-admin-brand__subtitle{
  font-size: 12px;
  color: rgba(255,255,255,.72);
}

.wz-admin-nav{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wz-admin-nav a,
.wz-admin-nav button{
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  color: #fff;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.wz-admin-nav a:hover,
.wz-admin-nav button:hover{
  background: rgba(255,255,255,.16);
}

.wz-admin-user{
  color: rgba(255,255,255,.82);
  font-size: 12px;
  line-height: 1.2;
  text-align: right;
}

.wz-admin-user b{
  color: #fff;
}

.wz-dashboard{
  margin: 14px 0;
}

.wz-dashboard__head{
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.wz-dashboard__title{
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.wz-dashboard__hint{
  margin-top: 4px;
  color: var(--wz-muted);
  font-size: 14px;
}

.wz-quickgrid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.wz-quickcard{
  display: block;
  min-height: 118px;
  padding: 16px;
  border: 2px solid var(--wz-border);
  border-radius: 16px;
  background: #fff;
  color: var(--wz-text);
  text-decoration: none;
  box-shadow: var(--wz-shadow);
}

.wz-quickcard:hover{
  transform: translateY(-1px);
  border-color: #1d4ed8;
}

.wz-quickcard__icon{
  font-size: 26px;
  line-height: 1;
  margin-bottom: 10px;
}

.wz-quickcard__title{
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 6px;
}

.wz-quickcard__text{
  font-size: 13px;
  color: var(--wz-muted);
  line-height: 1.35;
}

.wz-pagebar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 2px solid var(--wz-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--wz-shadow);
}

.wz-breadcrumbs{
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--wz-muted);
}

.wz-breadcrumbs a{
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 700;
}

.wz-breadcrumbs a:hover{
  text-decoration: underline;
}

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

@media (max-width: 900px){
  .wz-quickgrid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wz-admin-user{
    text-align: left;
  }
}

@media (max-width: 640px){
  .wz-quickgrid{
    grid-template-columns: 1fr;
  }

  .wz-admin-nav{
    width: 100%;
  }

  .wz-admin-nav a,
  .wz-admin-nav button{
    flex: 1 1 auto;
    text-align: center;
  }
}


/* ===== WebZip Chat: Admin UX polish pass ===== */

.header.wz-admin-header{
  background: linear-gradient(135deg, #0f172a 0%, #111827 55%, #172554 100%);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 8px 24px rgba(15,23,42,.18);
}

.wz-admin-header__inner{
  max-width: 1280px;
  min-height: 58px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.wz-admin-brand__title{
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  color: #fff;
  letter-spacing: -0.02em;
}

.wz-admin-brand__subtitle{
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255,255,255,.72);
  font-weight: 600;
}

.wz-admin-nav{
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wz-admin-nav a,
.wz-admin-nav button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  color: #fff !important;
  text-decoration: none !important;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.wz-admin-nav a:hover,
.wz-admin-nav button:hover{
  background: rgba(255,255,255,.20);
  border-color: rgba(255,255,255,.35);
}

.wz-admin-user{
  padding: 6px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.82);
  font-size: 12px;
  line-height: 1.2;
  text-align: right;
}

.wz-admin-user b{
  color: #fff;
}

.wz-dashboard{
  margin: 18px 0;
}

.wz-dashboard--empty{
  margin-top: 26px;
}

.wz-dashboard__head{
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.wz-dashboard__title{
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.wz-dashboard__hint{
  margin-top: 6px;
  color: var(--wz-muted);
  font-size: 14px;
}

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

.wz-quickcard{
  display: block;
  min-height: 128px;
  padding: 18px;
  border: 2px solid var(--wz-border);
  border-radius: 18px;
  background: #fff;
  color: var(--wz-text) !important;
  text-decoration: none !important;
  box-shadow: var(--wz-shadow);
}

.wz-quickcard:hover{
  transform: translateY(-1px);
  border-color: #1d4ed8;
}

.wz-quickcard__icon{
  font-size: 28px;
  line-height: 1;
  margin-bottom: 12px;
}

.wz-quickcard__title{
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 7px;
  color: #0b1220;
}

.wz-quickcard__text{
  font-size: 13px;
  color: var(--wz-muted);
  line-height: 1.35;
}

.wz-quickform{
  cursor: default;
}

.wz-quickform:hover{
  transform: none;
}

.wz-quickform__row{
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.wz-quickform input{
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--wz-border);
  border-radius: 10px;
  font-size: 14px;
}

.wz-quickform button{
  white-space: nowrap;
}

.wz-pagebar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 2px solid var(--wz-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--wz-shadow);
}

.wz-breadcrumbs{
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--wz-muted);
}

.wz-breadcrumbs a{
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 800;
}

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

.wz-muted-note{
  color: var(--wz-muted);
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 900px){
  .wz-quickgrid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wz-admin-header__inner{
    align-items: flex-start;
  }

  .wz-admin-nav{
    margin-left: 0;
    width: 100%;
  }

  .wz-admin-user{
    text-align: left;
  }
}

@media (max-width: 640px){
  .wz-quickgrid{
    grid-template-columns: 1fr;
  }

  .wz-admin-nav a,
  .wz-admin-nav button{
    flex: 1 1 auto;
    text-align: center;
  }
}


/* ===== WebZip Chat: Work queue UX ===== */
.wz-tenant-list{
  display: grid;
  gap: 12px;
}

.wz-tenant-card{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 2px solid var(--wz-border);
  border-radius: 18px;
  background: #fff;
  color: var(--wz-text) !important;
  text-decoration: none !important;
  box-shadow: var(--wz-shadow);
}

.wz-tenant-card:hover{
  border-color: #1d4ed8;
  transform: translateY(-1px);
}

.wz-tenant-card--hot{
  border-color: #f97316;
  background: #fff7ed;
}

.wz-tenant-card__title{
  font-size: 18px;
  font-weight: 900;
}

.wz-tenant-card__meta{
  margin-top: 4px;
  color: var(--wz-muted);
  font-size: 13px;
}

.wz-tenant-card__right{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.wz-client-tabs{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.wz-client-tab{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 2px solid var(--wz-border);
  border-radius: 999px;
  background: #fff;
  color: var(--wz-text) !important;
  text-decoration: none !important;
  font-weight: 900;
}

.wz-client-tab--active{
  background: #0f172a;
  border-color: #0f172a;
  color: #fff !important;
}

.wz-client-tab span{
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 12px;
}

.wz-chip-hot{
  background: #fff7ed !important;
  color: #b45309 !important;
  border-color: #fed7aa !important;
}

.wz-need-badge{
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.wz-client-row-needs-reply{
  background: #fff7ed;
  box-shadow: inset 4px 0 0 #f97316;
}

.wz-client-row-needs-reply td{
  border-top-color: #fed7aa;
}

.wz-reply-pulse{
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #fff !important;
  box-shadow: 0 0 0 3px rgba(220,38,38,.12);
}

@media (max-width: 760px){
  .wz-tenant-card{
    align-items: flex-start;
    flex-direction: column;
  }

  .wz-tenant-card__right{
    justify-content: flex-start;
  }
}


/* ===== WebZip Chat: Conversation working chat UX ===== */
.wz-chat-head{
  border-color: #bfdbfe;
  background: #eff6ff;
}

.wz-chat-workspace{
  border-color: #f97316;
  background: #fff7ed;
}

.wz-chat-workspace textarea{
  width: 100% !important;
  max-width: none !important;
  min-height: 128px;
  border: 2px solid #fed7aa;
  border-radius: 14px;
  padding: 12px;
  font-size: 15px;
  line-height: 1.45;
  background: #fff;
}

.wz-chat-messages{
  border-color: #dbeafe;
}

.wz-chat-messages .adm-table-wrap{
  max-height: 560px;
  overflow: auto;
}

/* ===== WebZip Chat: mini client card inside working chat ===== */
.wz-chat-client-mini{
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  background: #ffffff;
}

.wz-chat-client-mini__main{
  margin-bottom: 12px;
}

.wz-chat-client-mini__label{
  font-size: 12px;
  color: #64748b;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.wz-chat-client-mini__name{
  font-size: 18px;
  font-weight: 900;
  color: #0f172a;
}

.wz-chat-client-mini__sub{
  margin-top: 2px;
  font-size: 13px;
  color: #475569;
}

.wz-chat-client-mini__grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
}

.wz-chat-client-mini__grid > div{
  padding: 10px 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.wz-chat-client-mini__grid span{
  display: block;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 3px;
}

.wz-chat-client-mini__grid b{
  display: block;
  font-size: 13px;
  color: #0f172a;
  word-break: break-word;
}

@media (max-width: 860px){
  .wz-chat-client-mini__grid{
    grid-template-columns: 1fr;
  }
}


.wz-chat-section-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:12px;
}

.wz-chat-section-sub{
  margin-top:4px;
  color:#64748b;
  font-size:13px;
  line-height:1.45;
}

.wz-chat-section-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.wz-chat-pager{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
  margin:10px 0 14px;
}

.wz-message-feed{
  display:flex;
  flex-direction:column;
  gap:10px;
  max-height:560px;
  overflow:auto;
  padding:4px 2px 6px;
}

.wz-message-row{
  display:flex;
  width:100%;
}

.wz-message-row--client{
  justify-content:flex-start;
}

.wz-message-row--manager{
  justify-content:flex-end;
}

.wz-message-row--system{
  justify-content:center;
}

.wz-message-bubble{
  max-width:min(760px, 92%);
  border:1px solid #e5e7eb;
  border-radius:16px;
  padding:10px 12px;
  background:#fff;
  box-shadow:0 8px 24px rgba(15,23,42,.05);
}

.wz-message-row--client .wz-message-bubble{
  border-color:#bfdbfe;
  background:#eff6ff;
}

.wz-message-row--manager .wz-message-bubble{
  border-color:#bbf7d0;
  background:#f0fdf4;
}

.wz-message-row--system .wz-message-bubble{
  border-color:#e5e7eb;
  background:#f8fafc;
  max-width:min(680px, 92%);
}

.wz-message-meta{
  display:flex;
  gap:6px;
  align-items:center;
  flex-wrap:wrap;
  color:#64748b;
  font-size:12px;
  line-height:1.35;
  margin-bottom:6px;
}

.wz-message-author{
  color:#111827;
  font-weight:800;
}

.wz-message-text{
  color:#111827;
  font-size:14px;
  line-height:1.5;
  white-space:pre-wrap;
  word-break:break-word;
}

.wz-admin-attachment-card{
  margin-top:8px;
  padding:10px 12px;
  border:1px solid #d7dde7;
  border-radius:12px;
  background:#f8fafc;
}

.wz-admin-attachment-card--draft-ready{
  border-color:#c4b5fd;
  background:#faf5ff;
  box-shadow:inset 3px 0 0 #8b5cf6;
}

.wz-attachment-draft-ready{
  display:inline-flex;
  align-items:center;
  margin-top:7px;
  padding:4px 8px;
  border:1px solid #c4b5fd;
  border-radius:999px;
  background:#ede9fe;
  color:#5b21b6;
  font-size:12px;
  font-weight:900;
  line-height:1.2;
}

.wz-empty-state{
  border:1px dashed #cbd5e1;
  border-radius:14px;
  padding:14px;
  color:#64748b;
  background:#f8fafc;
}

@media (max-width: 720px){
  .wz-message-bubble{
    max-width:100%;
  }

  .wz-message-row--manager{
    justify-content:flex-start;
  }
}


.wz-client-main-link{
  color:#111827;
  font-weight:900;
  text-decoration:none;
}

.wz-client-main-link:hover{
  color:#0d47a1;
  text-decoration:underline;
}


/* ===== WebZip Chat: AI reply draft workflow ===== */

.wz-chat-workspace--ai{
  border-color:#8b5cf6;
  background:linear-gradient(
    135deg,
    #faf5ff 0%,
    #f5f3ff 55%,
    #eef2ff 100%
  );
  box-shadow:0 14px 36px rgba(91,33,182,.10);
}

.wz-ai-draft-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
  margin-bottom:12px;
}

.wz-ai-draft-head h2{
  margin:2px 0 4px;
  color:#2e1065;
}

.wz-ai-draft-kicker{
  color:#6d28d9;
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.06em;
}

.wz-ai-draft-description{
  max-width:760px;
  color:#4c1d95;
  font-size:13px;
  line-height:1.5;
}

.wz-ai-draft-badge,
.wz-ai-draft-mini-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #c4b5fd;
  border-radius:999px;
  background:#ede9fe;
  color:#5b21b6;
  font-size:12px;
  font-weight:900;
  line-height:1.2;
  white-space:nowrap;
}

.wz-ai-draft-badge{
  min-height:34px;
  padding:7px 11px;
}

.wz-ai-draft-mini-badge{
  padding:4px 8px;
}

.wz-ai-draft-meta{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin:0 0 12px;
}

.wz-ai-draft-meta span{
  display:inline-flex;
  align-items:center;
  gap:4px;
  min-height:30px;
  padding:5px 9px;
  border:1px solid #ddd6fe;
  border-radius:10px;
  background:rgba(255,255,255,.82);
  color:#5b21b6;
  font-size:12px;
}

.wz-ai-draft-source-file{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:0 0 12px;
  padding:12px 14px;
  border:1px solid #c4b5fd;
  border-radius:14px;
  background:rgba(255,255,255,.88);
}

.wz-ai-draft-source-file__body{
  min-width:0;
  flex:1;
}

.wz-ai-draft-source-file__label{
  margin-bottom:3px;
  color:#6d28d9;
  font-size:11px;
  font-weight:900;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.wz-ai-draft-source-file__name{
  color:#2e1065;
  font-size:14px;
  font-weight:900;
  overflow-wrap:anywhere;
}

.wz-ai-draft-source-file__meta{
  margin-top:3px;
  color:#6b7280;
  font-size:12px;
  overflow-wrap:anywhere;
}

.wz-reply-form{
  margin:0;
}

.wz-reply-actions{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:10px;
}

.wz-reply-actions > span{
  max-width:760px;
  color:#475569;
  font-size:13px;
  line-height:1.45;
}

.wz-conversation-link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.wz-conversation-link--ai-ready{
  border-color:#8b5cf6 !important;
  background:#faf5ff !important;
  color:#4c1d95 !important;
}

@media (max-width:720px){
  .wz-ai-draft-head{
    display:block;
  }

  .wz-ai-draft-badge{
    margin-top:10px;
  }

  .wz-ai-draft-source-file{
    align-items:stretch;
    flex-direction:column;
  }

  .wz-ai-draft-source-file .adm-btn{
    text-align:center;
  }

  .wz-reply-actions{
    align-items:stretch;
    flex-direction:column;
  }

  .wz-reply-actions .adm-btn-primary{
    width:100%;
  }

  .wz-conversation-link{
    width:100%;
    justify-content:space-between;
  }
}

/* ===== Tenant Admin Chats V1 ===== */

.wz-nav-current {
  font-weight: 800;
}

.wz-chats-page {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 48px;
}

.wz-chats-page > .wz-pagebar {
  margin-bottom: 22px;
  border: 1px solid #b8c4d5;
  border-radius: 18px;
  background: rgba(255,255,255,.94);
  box-shadow:
    0 10px 26px rgba(15,23,42,.08),
    0 1px 0 rgba(255,255,255,.75) inset;
}

.wz-chats-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid #d2dbe6;
  border-radius: 22px;
  background: rgba(255,255,255,.9);
  box-shadow:
    0 12px 28px rgba(15,23,42,.06),
    0 1px 0 rgba(255,255,255,.78) inset;
}

.wz-chats-kicker {
  margin-bottom: 6px;
  color: #6b7280;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.wz-chats-heading h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.05;
}

.wz-chats-heading p {
  max-width: 720px;
  margin: 10px 0 0;
  color: #667085;
  font-size: 14px;
  line-height: 1.55;
}

.wz-chat-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.wz-chat-tab {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid #e1e5eb;
  border-radius: 12px;
  background: #fff;
  color: #384250;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.wz-chat-tab b {
  min-width: 23px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f1f3f5;
  text-align: center;
  font-size: 12px;
}

.wz-chat-tab.is-active {
  border-color: #111827;
  background: #111827;
  color: #fff;
}

.wz-chat-tab.is-active b {
  background: rgba(255,255,255,.16);
}

.wz-chat-filter-panel {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #e7e9ed;
  border-radius: 16px;
  background: #fff;
}

.wz-chat-filter-panel form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 220px auto;
  gap: 10px;
  align-items: end;
}

.wz-chat-filter-panel label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.wz-chat-filter-panel label > span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.wz-chat-filter-panel input,
.wz-chat-filter-panel select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d7dce2;
  border-radius: 11px;
  background: #fff;
  padding: 9px 11px;
  color: #171a1f;
  font: inherit;
}

.wz-chat-filter-submit {
  min-height: 44px;
  border: 0;
  border-radius: 11px;
  background: #111827;
  padding: 10px 18px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.wz-chat-list {
  overflow: hidden;
  border: 1px solid #e4e7eb;
  border-radius: 18px;
  background: #fff;
}

.wz-chat-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 24px;
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
  border-bottom: 1px solid #edf0f2;
  color: inherit;
  text-decoration: none;
  transition:
    background .15s ease,
    border-color .15s ease;
}

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

.wz-chat-row:hover {
  background: #fafbfc;
}

.wz-chat-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 15px;
  background: #f0f2f4;
  color: #20242a;
  font-size: 14px;
  font-weight: 900;
}

.wz-chat-main {
  min-width: 0;
}

.wz-chat-row-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.wz-chat-person {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wz-chat-person strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}

.wz-chat-source {
  padding: 3px 7px;
  border-radius: 999px;
  background: #f2f4f6;
  color: #5b6470;
  font-size: 11px;
  font-weight: 700;
}

.wz-chat-row time {
  flex: 0 0 auto;
  color: #8a929c;
  font-size: 12px;
}

.wz-chat-state-row {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 7px;
}

.wz-chat-state,
.wz-chat-unanswered {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
}

.wz-chat-state--manager_required {
  background: #fff1f0;
  color: #a2362c;
}

.wz-chat-state--manager_review {
  background: #fff7e8;
  color: #8b5a12;
}

.wz-chat-state--ai_processing {
  background: #eef4ff;
  color: #35568a;
}

.wz-chat-state--assigned {
  background: #eef8f1;
  color: #326847;
}

.wz-chat-state--open {
  background: #f1f3f5;
  color: #59616b;
}

.wz-chat-state--closed {
  background: #f1f3f5;
  color: #7b828b;
}

.wz-chat-unanswered {
  background: #fff7e8;
  color: #8b5a12;
}

.wz-chat-preview {
  margin-top: 8px;
  overflow: hidden;
  color: #3e4650;
  font-size: 14px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wz-chat-preview b {
  font-weight: 750;
}

.wz-chat-preview--empty {
  color: #9aa1aa;
}

.wz-chat-meta {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  color: #7a828c;
  font-size: 12px;
  flex-wrap: wrap;
}

.wz-chat-meta b {
  color: #515964;
}

.wz-chat-open {
  align-self: center;
  color: #a1a7af;
  font-size: 28px;
  font-weight: 300;
}

.wz-chat-empty {
  display: flex;
  min-height: 180px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  text-align: center;
}

.wz-chat-empty strong {
  font-size: 16px;
}

.wz-chat-empty span {
  margin-top: 5px;
  color: #747d87;
  font-size: 13px;
}

@media (max-width: 820px) {
  .wz-chats-page {
    width: calc(100% - 22px);
    margin-top: 16px;
  }

  .wz-chat-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    overflow-x: visible;
    padding-bottom: 0;
    align-items: stretch;
  }

  .wz-chat-tab {
    display: flex;
    width: 100%;
    min-width: 0;
    min-height: 56px;
    box-sizing: border-box;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    white-space: normal;
  }

  .wz-chat-tab span {
    min-width: 0;
    line-height: 1.3;
  }

  .wz-chat-tab b {
    flex: 0 0 auto;
  }

  .wz-chat-tab:last-child {
    grid-column: 1 / -1;
  }

  .wz-chat-filter-panel form {
    grid-template-columns: 1fr 1fr;
  }

  .wz-chat-search {
    grid-column: 1 / -1;
  }

  .wz-chat-filter-submit {
    align-self: end;
  }
}

@media (max-width: 560px) {
  .wz-chats-page {
    width: calc(100% - 16px);
    margin-top: 12px;
  }

  .wz-chats-heading {
    margin-bottom: 14px;
  }

  .wz-chats-heading h2 {
    font-size: 29px;
  }

  .wz-chats-heading p {
    font-size: 13px;
  }

  .wz-chat-tabs {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .wz-chat-tab {
    min-height: 52px;
    padding: 12px 13px;
  }

  .wz-chat-tab:last-child {
    grid-column: auto;
  }

  .wz-chat-filter-panel {
    padding: 11px;
    border-radius: 14px;
  }

  .wz-chat-filter-panel form {
    grid-template-columns: 1fr;
  }

  .wz-chat-search {
    grid-column: auto;
  }

  .wz-chat-filter-submit {
    width: 100%;
  }

  .wz-chat-list {
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .wz-chat-row {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 11px;
    margin-bottom: 8px;
    padding: 14px;
    border: 1px solid #e5e8ec;
    border-radius: 15px;
    background: #fff;
  }

  .wz-chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .wz-chat-row-top {
    align-items: flex-start;
  }

  .wz-chat-person {
    display: block;
  }

  .wz-chat-person strong {
    display: block;
    font-size: 15px;
  }

  .wz-chat-source {
    display: inline-flex;
    margin-top: 4px;
  }

  .wz-chat-row time {
    font-size: 11px;
  }

  .wz-chat-state-row {
    margin-top: 8px;
  }

  .wz-chat-preview {
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .wz-chat-meta {
    gap: 6px 10px;
  }

  .wz-chat-open {
    display: none;
  }
}

/* ===== Tenant Conversation UX V1 ===== */

.wz-conversation-page {
  width: min(calc(100% - 32px), 1440px);
  margin: 18px auto 36px;
}

.wz-conversation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(310px, .72fr);
  gap: 18px;
  align-items: start;
}

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

.wz-conversation-main {
  display: grid;
  gap: 16px;
}

.wz-conversation-main > .card,
.wz-conversation-sidebar > .card {
  margin: 0;
}

.wz-conversation-sidebar {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 14px;
}

.wz-conversation-side-card {
  min-width: 0;
}

.wz-conversation-side-card h2 {
  font-size: 17px;
}

.wz-conversation-tech--hidden {
  display: none;
}

.wz-conversation-sidebar form,
.wz-conversation-sidebar form > div {
  min-width: 0;
  max-width: 100%;
}

.wz-conversation-sidebar form div {
  min-width: 0 !important;
  max-width: 100%;
}

.wz-conversation-sidebar input,
.wz-conversation-sidebar select,
.wz-conversation-sidebar textarea {
  box-sizing: border-box;
  min-width: 0 !important;
  max-width: 100%;
}

.wz-conversation-sidebar select,
.wz-conversation-sidebar input[type="text"],
.wz-conversation-sidebar textarea {
  width: 100% !important;
}

.wz-conversation-sidebar .adm-btn,
.wz-conversation-sidebar .adm-btn-primary {
  box-sizing: border-box;
}

.wz-conversation-main .wz-chat-messages {
  min-height: 420px;
}

.wz-conversation-main .wz-message-feed {
  max-height: min(62vh, 720px);
}

@media (max-width: 980px) {
  .wz-conversation-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 14px;
  }
}

@media (max-width: 820px) {
  .wz-conversation-page {
    width: calc(100% - 22px);
    margin-top: 14px;
  }

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

  .wz-conversation-sidebar {
    position: static;
  }

  .wz-conversation-main .wz-message-feed {
    max-height: 560px;
  }
}

@media (max-width: 560px) {
  .wz-conversation-page {
    width: calc(100% - 16px);
    margin-top: 10px;
  }

  .wz-conversation-layout,
  .wz-conversation-main,
  .wz-conversation-sidebar {
    gap: 10px;
  }

  .wz-conversation-main > .card,
  .wz-conversation-sidebar > .card,
  .wz-conversation-page > .card {
    border-radius: 14px;
  }

  .wz-conversation-main .wz-chat-messages {
    min-height: 0;
  }

  .wz-conversation-main .wz-message-feed {
    max-height: 520px;
  }

  .wz-conversation-sidebar .adm-btn,
  .wz-conversation-sidebar .adm-btn-primary {
    width: 100%;
    text-align: center;
  }
}

/* ===== Tenant Conversation Responsive V2 ===== */

.wz-conversation-page,
.wz-conversation-page * {
  box-sizing: border-box;
}

.wz-conversation-page {
  min-width: 0;
}

.wz-conversation-head-row {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.wz-conversation-head-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.wz-conversation-head-copy h2 {
  margin: 0 0 4px;
}

.wz-conversation-head-sub {
  max-width: 760px;
  color: #666;
  font-size: 13px;
  line-height: 1.45;
}

.wz-conversation-head-actions {
  display: flex;
  flex: 0 1 auto;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.wz-conversation-head-actions .adm-btn {
  white-space: nowrap;
}

.wz-conversation-layout {
  min-width: 0;
}

.wz-conversation-main,
.wz-conversation-sidebar,
.wz-conversation-main > *,
.wz-conversation-sidebar > * {
  min-width: 0;
  max-width: 100%;
}

.wz-conversation-sidebar {
  overflow: visible;
}

.wz-conversation-side-card {
  width: 100%;
  overflow: hidden;
}

.wz-conversation-side-card .adm-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: visible;
}

.wz-conversation-side-card .adm-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.wz-conversation-side-card .adm-table th,
.wz-conversation-side-card .adm-table td {
  width: auto !important;
  min-width: 0;
  padding: 8px 9px;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.wz-conversation-side-card .adm-table th {
  width: 42% !important;
}

.wz-conversation-sidebar form {
  width: 100%;
}

.wz-conversation-sidebar form > div {
  width: 100%;
}

.wz-conversation-sidebar form > div[style*="display:flex"] {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 10px !important;
  align-items: stretch !important;
}

.wz-conversation-sidebar form > div[style*="display:flex"] > div {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  flex: none !important;
}

.wz-conversation-sidebar input,
.wz-conversation-sidebar select,
.wz-conversation-sidebar textarea,
.wz-conversation-sidebar button {
  max-width: 100%;
}

.wz-conversation-sidebar select,
.wz-conversation-sidebar input[type="text"],
.wz-conversation-sidebar textarea {
  width: 100% !important;
  min-width: 0 !important;
}

.wz-conversation-sidebar .adm-btn,
.wz-conversation-sidebar .adm-btn-primary {
  min-height: 42px;
}

.wz-conversation-sidebar .adm-card,
.wz-conversation-sidebar pre {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.wz-conversation-sidebar pre {
  white-space: pre-wrap !important;
}

.wz-chat-client-mini__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wz-chat-client-mini__grid > div {
  min-width: 0;
}

.wz-chat-client-mini__grid b {
  overflow-wrap: anywhere;
}

.wz-message-feed {
  overflow-x: hidden;
}

.wz-message-bubble {
  min-width: 0;
  overflow-wrap: anywhere;
}

#documents,
#reply,
.wz-chat-messages {
  min-width: 0;
  overflow: hidden;
}

#documents textarea,
#reply textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 1100px) {
  .wz-conversation-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
  }

  .wz-chat-client-mini__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .wz-conversation-layout {
    grid-template-columns: 1fr;
  }

  .wz-conversation-sidebar {
    position: static;
    grid-template-columns: 1fr;
  }

  .wz-conversation-side-card {
    width: 100%;
    align-self: stretch;
  }

  .wz-conversation-head-row {
    flex-direction: column;
  }

  .wz-conversation-head-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 680px) {
  .wz-conversation-page {
    width: calc(100% - 16px);
    margin-top: 10px;
  }

  .wz-pagebar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .wz-page-actions {
    width: 100%;
  }

  .wz-page-actions .adm-btn {
    width: 100%;
    text-align: center;
  }

  .wz-conversation-head-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .wz-conversation-head-actions .adm-btn {
    width: 100%;
    min-width: 0;
    text-align: center;
    white-space: normal;
  }

  .wz-conversation-head-actions .adm-btn:last-child {
    grid-column: 1 / -1;
  }

  .wz-chat-client-mini__grid {
    grid-template-columns: 1fr;
  }

  .wz-conversation-sidebar {
    grid-template-columns: 1fr;
  }

  .wz-chat-section-head {
    display: block;
  }

  .wz-chat-section-actions {
    margin-top: 10px;
  }

  .wz-chat-section-actions .adm-btn {
    width: 100%;
    text-align: center;
  }

  .wz-chat-pager {
    gap: 6px;
  }

  .wz-message-bubble {
    max-width: 100%;
  }

  .wz-reply-actions {
    align-items: stretch;
  }

  .wz-reply-actions .adm-btn-primary {
    width: 100%;
  }

  #documents .adm-btn,
  #documents .adm-btn-primary {
    max-width: 100%;
  }
}

@media (max-width: 420px) {
  .wz-conversation-head-actions {
    grid-template-columns: 1fr;
  }

  .wz-conversation-head-actions .adm-btn:last-child {
    grid-column: auto;
  }

  .wz-chat-client-mini {
    padding: 11px;
  }

  .wz-chat-client-mini__grid {
    gap: 7px;
  }

  .wz-message-bubble {
    padding: 9px 10px;
    border-radius: 13px;
  }

  .wz-message-meta {
    font-size: 11px;
  }

  .wz-message-text {
    font-size: 14px;
  }
}

/* ===== Tenant Clients UX V3 ===== */

.wz-clients-page-v3 {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 48px;
}

.wz-clients-page-v3 .wz-pagebar {
  margin-bottom: 22px;
}

.wz-clients-v3-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.wz-clients-v3-heading h2 {
  margin: 0;
  color: #171a1f;
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.05;
  letter-spacing: -.03em;
}

.wz-clients-v3-heading p {
  max-width: 680px;
  margin: 8px 0 0;
  color: #737b85;
  font-size: 14px;
  line-height: 1.5;
}

.wz-clients-v3-summary {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.wz-clients-v3-summary span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  background: #f1f3f5;
  padding: 5px 10px;
  color: #616974;
  font-size: 11px;
  font-weight: 750;
}

.wz-clients-v3-summary .wz-clients-v3-summary--attention {
  background: #fff3df;
  color: #8b5a12;
}

.wz-clients-v3-tabs {
  margin-bottom: 14px;
}

/* Filters */

.wz-client-filter-v3 {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #e7e9ed;
  border-radius: 16px;
  background: #fff;
}

.wz-client-filter-v3 form {
  display: grid;
  grid-template-columns:
    minmax(110px, .55fr)
    minmax(260px, 1.8fr)
    minmax(145px, .8fr)
    minmax(145px, .8fr)
    minmax(170px, .9fr)
    110px
    auto;
  gap: 10px;
  align-items: end;
}

.wz-client-filter-v3 label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.wz-client-filter-v3 label > span {
  color: #707985;
  font-size: 11px;
  font-weight: 750;
}

.wz-client-filter-v3 input,
.wz-client-filter-v3 select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  box-sizing: border-box;
  border: 1px solid #d7dce2;
  border-radius: 10px;
  background: #fff;
  padding: 8px 10px;
  color: #171a1f;
  font: inherit;
}

.wz-client-filter-v3__submit {
  min-height: 42px;
  border: 0;
  border-radius: 10px;
  background: #111827;
  padding: 9px 17px;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

/* Client list */

.wz-client-list-v3 {
  overflow: hidden;
  border: 1px solid #e4e7eb;
  border-radius: 18px;
  background: #fff;
}

.wz-client-row-v3 {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 16px 18px;
  border-bottom: 1px solid #edf0f2;
  background: #fff;
  transition: background .15s ease;
}

.wz-client-row-v3:last-child {
  border-bottom: 0;
}

.wz-client-row-v3:hover {
  background: #fafbfc;
}

.wz-client-row-v3--attention {
  background: #fffdfa;
  box-shadow: inset 3px 0 0 #d9902f;
}

.wz-client-row-v3__avatar {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: #f0f2f4;
  color: #252a31;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.wz-client-row-v3__body {
  min-width: 0;
}

.wz-client-row-v3__top {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.wz-client-row-v3__identity {
  display: flex;
  min-width: 0;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
}

.wz-client-row-v3__name {
  min-width: 0;
  color: #20242a;
  font-size: 15px;
  font-weight: 850;
  text-decoration: none;
}

.wz-client-row-v3__name:hover {
  text-decoration: underline;
}

.wz-client-row-v3__source,
.wz-client-row-v3__attention {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 800;
}

.wz-client-row-v3__source {
  background: #f1f3f5;
  color: #626a74;
}

.wz-client-row-v3__attention {
  background: #fff3df;
  color: #8b5a12;
}

.wz-client-row-v3 time {
  flex: 0 0 auto;
  color: #9aa0a8;
  font-size: 11px;
}

.wz-client-row-v3__full-name {
  margin-top: 2px;
  color: #8a929b;
  font-size: 11px;
}

.wz-client-row-v3__contacts {
  display: flex;
  gap: 5px 12px;
  margin-top: 7px;
  color: #717a84;
  font-size: 11px;
  flex-wrap: wrap;
}

.wz-client-row-v3__preview {
  margin-top: 8px;
  overflow: hidden;
  color: #424952;
  font-size: 13px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wz-client-row-v3__preview b {
  font-weight: 750;
}

.wz-client-row-v3__preview--empty {
  color: #9aa1aa;
}

.wz-client-row-v3__meta {
  margin-top: 7px;
  color: #9aa0a8;
  font-size: 10px;
}

.wz-client-row-v3__actions {
  display: grid;
  width: 122px;
  gap: 6px;
}

.wz-client-row-v3__primary,
.wz-client-row-v3__secondary {
  display: flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border: 1px solid #dfe3e8;
  border-radius: 9px;
  padding: 7px 9px;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.wz-client-row-v3__primary {
  border-color: #111827;
  background: #111827;
  color: #fff;
}

.wz-client-row-v3__secondary {
  background: #fff;
  color: #333a43;
}

.wz-client-row-v3__history {
  padding: 3px 6px;
  color: #747d87;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.wz-client-row-v3__history:hover {
  text-decoration: underline;
}

.wz-client-empty-v3 {
  display: flex;
  min-height: 180px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed #d7dbe0;
  border-radius: 16px;
  background: #fff;
  text-align: center;
}

.wz-client-empty-v3 span {
  margin-top: 5px;
  color: #7b838d;
  font-size: 13px;
}

@media (max-width: 1050px) {
  .wz-client-filter-v3 form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .wz-client-filter-v3__search {
    grid-column: span 2;
  }
}

@media (max-width: 820px) {
  .wz-clients-page-v3 {
    width: calc(100% - 22px);
    margin-top: 16px;
  }

  .wz-clients-v3-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .wz-client-filter-v3 form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wz-client-filter-v3__search {
    grid-column: 1 / -1;
  }

  .wz-client-row-v3 {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .wz-client-row-v3__avatar {
    width: 42px;
    height: 42px;
  }

  .wz-client-row-v3__actions {
    grid-column: 2;
    display: flex;
    width: auto;
    flex-wrap: wrap;
  }

  .wz-client-row-v3__primary,
  .wz-client-row-v3__secondary {
    min-width: 112px;
  }

  .wz-client-row-v3__history {
    display: flex;
    min-height: 36px;
    align-items: center;
  }
}

@media (max-width: 560px) {
  .wz-clients-page-v3 {
    width: calc(100% - 16px);
    margin-top: 12px;
  }

  .wz-clients-v3-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .wz-client-filter-v3 {
    padding: 11px;
    border-radius: 14px;
  }

  .wz-client-filter-v3 form {
    grid-template-columns: 1fr;
  }

  .wz-client-filter-v3__search {
    grid-column: auto;
  }

  .wz-client-filter-v3__submit {
    width: 100%;
  }

  .wz-client-list-v3 {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .wz-client-row-v3 {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 11px;
    margin-bottom: 8px;
    padding: 14px;
    border: 1px solid #e5e8ec;
    border-radius: 15px;
  }

  .wz-client-row-v3__avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .wz-client-row-v3__top {
    display: block;
  }

  .wz-client-row-v3 time {
    display: block;
    margin-top: 5px;
  }

  .wz-client-row-v3__preview {
    white-space: normal;
  }

  .wz-client-row-v3__actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .wz-client-row-v3__history {
    grid-column: 1 / -1;
    justify-content: center;
  }
}

/* ===== Tenant Client Card Unified UX ===== */

.wz-client-card-page {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 48px;
}

.wz-client-card-page,
.wz-client-card-page * {
  box-sizing: border-box;
}

.wz-client-card-page > .card,
.wz-client-detail-grid > .card {
  border-color: #e5e8ec;
  border-radius: 16px;
  box-shadow: none;
}

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

.wz-client-detail-grid > * {
  min-width: 0;
}

/* Linked business sections */

.wz-client-section {
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid #e4e7eb;
  border-radius: 18px;
  background: #fff;
}

.wz-client-section__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 18px;
  border-bottom: 1px solid #edf0f2;
}

.wz-client-section__head h2 {
  margin: 0;
  color: #20242a;
  font-size: 19px;
}

.wz-client-section__head p {
  max-width: 680px;
  margin: 5px 0 0;
  color: #7a828c;
  font-size: 12px;
  line-height: 1.45;
}

.wz-client-section__count {
  display: grid;
  min-width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  background: #f1f3f5;
  color: #5e6670;
  font-size: 12px;
  font-weight: 800;
}

/* Conversations */

.wz-client-conversations {
  display: block;
}

.wz-client-conversation-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 18px;
  align-items: center;
  padding: 15px 18px;
  border-bottom: 1px solid #edf0f2;
}

.wz-client-conversation-row:last-child {
  border-bottom: 0;
}

.wz-client-conversation-row:hover {
  background: #fafbfc;
}

.wz-client-conversation-row__body {
  min-width: 0;
}

.wz-client-conversation-row__top {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
}

.wz-client-conversation-row__title {
  color: #20242a;
  font-size: 14px;
  font-weight: 850;
  text-decoration: none;
}

.wz-client-conversation-row__title:hover {
  text-decoration: underline;
}

.wz-client-conversation-row__status,
.wz-client-conversation-row__deal {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  background: #f1f3f5;
  color: #636b75;
  font-size: 10px;
  font-weight: 750;
}

.wz-client-conversation-row__meta {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  color: #969da6;
  font-size: 10px;
  flex-wrap: wrap;
}

.wz-client-conversation-row__preview {
  margin-top: 7px;
  overflow: hidden;
  color: #444b54;
  font-size: 13px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wz-client-conversation-row__preview b {
  font-weight: 750;
}

/* Files */

.wz-client-files-card {
  min-width: 0;
}

.wz-client-files {
  display: grid;
  gap: 8px;
}

.wz-client-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e7e9ed;
  border-radius: 12px;
  background: #fafbfc;
}

.wz-client-file-row__body {
  min-width: 0;
}

.wz-client-file-row__name {
  overflow-wrap: anywhere;
  color: #252a31;
  font-size: 13px;
  font-weight: 800;
}

.wz-client-file-row__meta {
  display: flex;
  gap: 6px 10px;
  margin-top: 4px;
  color: #858d96;
  font-size: 10px;
  flex-wrap: wrap;
}

.wz-client-file-row__actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Shared inline actions */

.wz-client-inline-action {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid #111827;
  border-radius: 9px;
  background: #111827;
  padding: 7px 10px;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.wz-client-inline-action--secondary {
  border-color: #dfe3e8;
  background: #fff;
  color: #3d444d;
}

.wz-client-empty-modern {
  padding: 18px;
  color: #858d96;
  font-size: 13px;
  text-align: center;
}

/* Forms inside the CRM card */

.wz-client-card-page input,
.wz-client-card-page select,
.wz-client-card-page textarea {
  max-width: 100%;
  box-sizing: border-box;
}

.wz-client-card-page .adm-table-wrap {
  max-width: 100%;
}

@media (max-width: 900px) {
  .wz-client-detail-grid {
    grid-template-columns: 1fr;
  }

  .wz-client-conversation-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .wz-client-conversation-row > .wz-client-inline-action {
    justify-self: start;
  }

  .wz-client-file-row {
    grid-template-columns: 1fr;
  }

  .wz-client-file-row__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .wz-client-card-page {
    width: calc(100% - 16px);
    margin-top: 12px;
  }

  .wz-client-section {
    border-radius: 15px;
  }

  .wz-client-section__head {
    padding: 14px;
  }

  .wz-client-conversation-row {
    padding: 14px;
  }

  .wz-client-conversation-row__preview {
    white-space: normal;
  }

  .wz-client-conversation-row > .wz-client-inline-action,
  .wz-client-file-row__actions,
  .wz-client-file-row__actions .wz-client-inline-action {
    width: 100%;
  }

  .wz-client-file-row__actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

/* ===== Tenant Specialists tariff UX ===== */

.wz-ai-tariff-help {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wz-ai-tariff-help small {
  color: #737b85;
}

.wz-ai-tariff-note {
  display: block;
  margin-top: 7px;
  color: #737b85;
  font-size: 11px;
  line-height: 1.45;
}

.wz-ai-tariff-note a {
  font-weight: 800;
  color: #374151;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===== Tenant CRM tariff CTA ===== */

.wz-clients-crm-page .wz-tariff-link {
  display: inline-flex;
  margin-top: 10px;
  color: #374151;
  font-size: 11px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.wz-clients-crm-page .wz-tariff-notice {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #d9dee5;
  border-radius: 14px;
  background: #f7f8fa;
}

.wz-clients-crm-page .wz-tariff-notice strong {
  display: block;
  color: #252a31;
  font-size: 13px;
}

.wz-clients-crm-page .wz-tariff-notice p {
  max-width: 680px;
  margin: 7px 0 12px;
  color: #737b85;
  font-size: 12px;
  line-height: 1.5;
}

/* ===== Tenant Billing plan comparison ===== */

.wz-billing-plans {
  margin: 18px 0;
}

.wz-billing-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.wz-billing-plan-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 18px;
  border: 1px solid #ccd6e2;
  border-radius: 18px;
  background: rgba(255,255,255,.94);
  box-shadow:
    0 10px 24px rgba(15,23,42,.05),
    0 1px 0 rgba(255,255,255,.72) inset;
}

.wz-billing-plan-card--current {
  border-color: #8f9bad;
  box-shadow:
    0 12px 28px rgba(15,23,42,.09),
    0 1px 0 rgba(255,255,255,.78) inset;
}

.wz-billing-plan-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.wz-billing-plan-card h3 {
  margin: 4px 0 0;
  color: #171a1f;
  font-size: 24px;
  line-height: 1.1;
}

.wz-billing-plan-badge {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  background: #111827;
  padding: 4px 9px;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.wz-billing-plan-limits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 16px;
}

.wz-billing-plan-limits > div {
  padding: 10px;
  border-radius: 11px;
  background: #f6f7f9;
}

.wz-billing-plan-limits span {
  display: block;
  color: #777f89;
  font-size: 10px;
}

.wz-billing-plan-limits strong {
  display: block;
  margin-top: 3px;
  color: #22272e;
  font-size: 15px;
}

.wz-billing-plan-features {
  display: grid;
  gap: 9px;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid #eceef1;
}

.wz-billing-plan-features > div {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #646c76;
  font-size: 12px;
  font-weight: 700;
}

.wz-billing-plan-features > div > span {
  display: block;
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #c4c9cf;
}

.wz-billing-plan-features .is-on {
  color: #30363d;
}

.wz-billing-plan-features .is-on > span {
  background: #30363d;
}

.wz-billing-plan-features .is-off {
  color: #9aa1aa;
}

.wz-billing-plan-action {
  margin-top: 18px;
  align-self: flex-start;
}

.wz-billing-plan-current-note {
  margin-top: 18px;
  color: #777f89;
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .wz-billing-plan-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .wz-billing-plan-card {
    padding: 15px;
  }

  .wz-billing-plan-limits {
    grid-template-columns: 1fr;
  }

  .wz-billing-plan-action {
    width: 100%;
    text-align: center;
  }
}

/* ===== Tenant Clients CRM canonical shell ===== */

.wz-clients-crm-page {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 48px;
}

.wz-clients-crm-page > .wz-pagebar {
  margin-bottom: 22px;
  border: 1px solid #b8c4d5;
  border-radius: 18px;
  background: rgba(255,255,255,.94);
  box-shadow:
    0 10px 26px rgba(15,23,42,.08),
    0 1px 0 rgba(255,255,255,.75) inset;
}

.wz-clients-crm-page .wz-clients-crm-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 18px 20px;
  border: 1px solid #d2dbe6;
  border-radius: 22px;
  background: rgba(255,255,255,.9);
  box-shadow:
    0 12px 28px rgba(15,23,42,.06),
    0 1px 0 rgba(255,255,255,.78) inset;
}

.wz-clients-crm-page .wz-clients-crm-heading h1 {
  margin: 0;
  color: #171a1f;
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1.05;
  letter-spacing: -.03em;
}

.wz-clients-crm-page .wz-clients-crm-heading p {
  max-width: 680px;
  margin: 8px 0 0;
  color: #737b85;
  font-size: 14px;
  line-height: 1.5;
}

.wz-clients-crm-page .wz-status {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: #f1f3f5;
  padding: 5px 10px;
  color: #616974;
  font-size: 11px;
  font-weight: 750;
}

.wz-clients-crm-page .wz-metrics,
.wz-clients-crm-page .wz-fields-section,
.wz-clients-crm-page .wz-info-grid {
  margin-bottom: 14px;
}

.wz-clients-crm-page .wz-card {
  border: 1px solid #ccd6e2;
  border-radius: 18px;
  background: rgba(255,255,255,.94);
  box-shadow:
    0 10px 24px rgba(15,23,42,.05),
    0 1px 0 rgba(255,255,255,.72) inset;
}

.wz-clients-crm-page .wz-fields-section {
  padding: 0;
  overflow: hidden;
}

.wz-clients-crm-page .wz-fields-section > .wz-fields-head {
  margin: 0;
  padding: 17px 18px;
  border-bottom: 1px solid #edf0f2;
}

.wz-clients-crm-page .wz-fields-section > form,
.wz-clients-crm-page .wz-fields-section > .wz-field-list,
.wz-clients-crm-page .wz-fields-section > .wz-empty-state {
  margin: 0;
  padding: 18px;
}

.wz-clients-crm-page .wz-field-list {
  gap: 10px;
}

.wz-clients-crm-page .wz-field-item {
  border: 1px solid #e7e9ed;
  border-radius: 14px;
  background: #fafbfc;
}

.wz-clients-crm-page .wz-action-button {
  border-color: #111827;
  background: #111827;
}

.wz-clients-crm-page .wz-action-button--secondary {
  border-color: #dfe3e8;
  background: #fff;
  color: #3d444d;
}

@media (max-width: 640px) {
  .wz-clients-crm-page {
    width: calc(100% - 16px);
    margin-top: 12px;
  }

  .wz-clients-crm-page .wz-clients-crm-heading {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .wz-clients-crm-page .wz-page-actions,
  .wz-clients-crm-page .wz-page-actions .adm-btn {
    width: 100%;
  }

  .wz-clients-crm-page .wz-page-actions .adm-btn {
    text-align: center;
  }
}

/* ===== Tenant CRM Visual Polish ===== */

.wz-clients-page-v3 .wz-pagebar,
.wz-client-card-page .wz-pagebar {
  border: 1px solid #b8c4d5;
  border-radius: 18px;
  background: rgba(255,255,255,.94);
  box-shadow:
    0 10px 26px rgba(15, 23, 42, 0.08),
    0 1px 0 rgba(255,255,255,0.75) inset;
}

.wz-clients-v3-heading,
.wz-client-card-page > .card:first-of-type {
  border: 1px solid #d2dbe6;
  border-radius: 22px;
  background: rgba(255,255,255,.9);
  box-shadow:
    0 12px 28px rgba(15, 23, 42, 0.06),
    0 1px 0 rgba(255,255,255,0.78) inset;
}

.wz-clients-v3-heading {
  padding: 18px 20px;
}

.wz-client-card-page > .card:first-of-type {
  padding: 18px 20px;
}

.wz-client-filter-v3,
.wz-client-list-v3,
.wz-client-section,
.wz-client-card-page > .card,
.wz-client-detail-grid > .card {
  border: 1px solid #ccd6e2;
  box-shadow:
    0 10px 24px rgba(15, 23, 42, 0.05),
    0 1px 0 rgba(255,255,255,0.72) inset;
}

.wz-client-filter-v3,
.wz-client-list-v3,
.wz-client-section {
  background: rgba(255,255,255,.94);
}

.wz-client-row-v3,
.wz-client-conversation-row {
  padding-top: 18px;
  padding-bottom: 18px;
}

.wz-client-row-v3__actions,
.wz-client-file-row__actions {
  align-items: start;
}

.wz-client-row-v3__primary,
.wz-client-row-v3__secondary,
.wz-client-inline-action,
.wz-client-inline-action--secondary {
  box-shadow: none;
}

.wz-client-file-row {
  border: 1px solid #d9e1ea;
  background: #ffffff;
}

.wz-client-empty-v3,
.wz-client-empty-modern {
  border: 1px dashed #ccd5df;
  border-radius: 16px;
  background: rgba(255,255,255,.92);
}

@media (max-width: 560px) {
  .wz-clients-v3-heading,
  .wz-client-card-page > .card:first-of-type {
    padding: 15px 14px;
    border-radius: 18px;
  }

  .wz-client-filter-v3,
  .wz-client-section,
  .wz-client-card-page > .card,
  .wz-client-detail-grid > .card {
    border-radius: 16px;
  }

  .wz-client-row-v3,
  .wz-client-conversation-row {
    padding-top: 14px;
    padding-bottom: 14px;
  }
}

/* ===== Tenant Client Card Responsive Fix ===== */

@media (max-width: 900px) {
  .wz-client-card-page > section[style*="grid-template-columns"],
  .wz-client-detail-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .wz-client-card-page .card {
    min-width: 0;
    width: 100%;
  }

  .wz-client-card-page .adm-table-wrap {
    overflow-x: visible;
  }

  .wz-client-card-page .adm-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
  }

  .wz-client-card-page .adm-table th,
  .wz-client-card-page .adm-table td {
    width: auto !important;
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
  }

  .wz-client-card-page form > div[style*="grid-template-columns"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .wz-client-card-page form > div[style*="grid-template-columns"] > div {
    min-width: 0 !important;
    grid-column: auto !important;
  }

  .wz-client-card-page input,
  .wz-client-card-page select,
  .wz-client-card-page textarea {
    width: 100% !important;
    min-width: 0 !important;
  }
}

@media (max-width: 640px) {
  .wz-client-card-page {
    width: calc(100% - 16px);
  }

  .wz-client-card-page .wz-pagebar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .wz-client-card-page .wz-page-actions {
    width: 100%;
  }

  .wz-client-card-page .wz-page-actions .adm-btn {
    width: 100%;
    text-align: center;
  }

  .wz-client-card-page > .card:first-of-type > div[style*="display:flex"] {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .wz-client-card-page > .card:first-of-type > div[style*="display:flex"] > div:last-child {
    justify-content: flex-start !important;
  }

  .wz-client-card-page form > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  .wz-client-card-page form > div[style*="grid-template-columns"] > div {
    grid-column: auto !important;
  }

  .wz-client-card-page form > div[style*="display:flex"] {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .wz-client-card-page form > div[style*="display:flex"] > * {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .wz-client-card-page .adm-btn,
  .wz-client-card-page .adm-btn-primary {
    max-width: 100%;
  }

  .wz-client-card-page .adm-table th,
  .wz-client-card-page .adm-table td {
    padding: 8px 9px;
    font-size: 12px;
  }

  .wz-client-conversation-row__top {
    align-items: flex-start;
  }

  .wz-client-conversation-row__status,
  .wz-client-conversation-row__deal {
    margin-top: 2px;
  }
}

/* ===== Tenant Client History Unified UX ===== */

.wz-client-history-page {
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 48px;
}

.wz-client-history-page,
.wz-client-history-page * {
  box-sizing: border-box;
}

.wz-client-history-page .wz-pagebar {
  margin-bottom: 18px;
  border: 1px solid #b8c4d5;
  border-radius: 18px;
  background: rgba(255,255,255,.94);
  box-shadow:
    0 10px 26px rgba(15,23,42,.08),
    0 1px 0 rgba(255,255,255,.75) inset;
}

/* Client head */

.wz-client-history-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: 18px 20px;
  border: 1px solid #ccd6e2;
  border-radius: 20px;
  background: rgba(255,255,255,.94);
  box-shadow:
    0 10px 24px rgba(15,23,42,.05),
    0 1px 0 rgba(255,255,255,.72) inset;
}

.wz-client-history-back {
  display: inline-block;
  margin-bottom: 13px;
  color: #4f647e;
  font-size: 12px;
  font-weight: 700;
}

.wz-client-history-head h2 {
  margin: 0;
  color: #20242a;
  font-size: clamp(27px, 3.5vw, 36px);
  line-height: 1.08;
  letter-spacing: -.025em;
}

.wz-client-history-head__full-name {
  margin-top: 5px;
  color: #7e8791;
  font-size: 13px;
}

.wz-client-history-head__badges {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.wz-client-history-head__badges span {
  display: inline-flex;
  min-height: 29px;
  align-items: center;
  border-radius: 999px;
  background: #f1f3f5;
  padding: 5px 10px;
  color: #626a74;
  font-size: 11px;
  font-weight: 750;
}

/* Conversations */

.wz-client-history-conversations,
.wz-client-history-feed {
  overflow: hidden;
  margin-bottom: 14px;
  border: 1px solid #ccd6e2;
  border-radius: 18px;
  background: rgba(255,255,255,.94);
  box-shadow:
    0 10px 24px rgba(15,23,42,.05),
    0 1px 0 rgba(255,255,255,.72) inset;
}

.wz-client-history-conversation-list {
  display: grid;
}

.wz-client-history-conversation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 24px;
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #edf0f2;
  color: inherit;
  text-decoration: none;
}

.wz-client-history-conversation:last-child {
  border-bottom: 0;
}

.wz-client-history-conversation:hover {
  background: #fafbfc;
}

.wz-client-history-conversation > div {
  min-width: 0;
}

.wz-client-history-conversation strong {
  display: block;
  color: #252a31;
  font-size: 14px;
}

.wz-client-history-conversation div > span {
  display: block;
  margin-top: 3px;
  color: #858d96;
  font-size: 11px;
}

.wz-client-history-conversation > b {
  border-radius: 999px;
  background: #fff3df;
  padding: 4px 8px;
  color: #8b5a12;
  font-size: 10px;
}

.wz-client-history-conversation__open {
  color: #9aa1aa;
  font-size: 20px;
}

/* Feed */

.wz-client-history-feed__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 18px;
  border-bottom: 1px solid #edf0f2;
}

.wz-client-history-feed__head h2 {
  margin: 0;
  color: #20242a;
  font-size: 19px;
}

.wz-client-history-feed__head p {
  margin: 5px 0 0;
  color: #7a828c;
  font-size: 12px;
}

.wz-client-history-feed__page {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #f1f3f5;
  padding: 6px 10px;
  color: #737b85;
  font-size: 10px;
  font-weight: 750;
}

.wz-client-history-pager {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-bottom: 1px solid #edf0f2;
}

.wz-client-history-pager a,
.wz-client-history-pager span {
  display: inline-flex;
  min-width: 32px;
  min-height: 32px;
  align-items: center;
  justify-content: center;
  border: 1px solid #e1e5ea;
  border-radius: 9px;
  background: #fff;
  padding: 5px 9px;
  color: #555e68;
  font-size: 11px;
  font-weight: 750;
  text-decoration: none;
}

.wz-client-history-pager .is-active {
  border-color: #111827;
  background: #111827;
  color: #fff;
}

/* Messages */

.wz-client-history-messages {
  display: grid;
}

.wz-client-history-message {
  padding: 16px 18px;
  border-bottom: 1px solid #edf0f2;
}

.wz-client-history-message:last-child {
  border-bottom: 0;
}

.wz-client-history-message--client {
  box-shadow: inset 3px 0 0 #9bbce4;
}

.wz-client-history-message--company {
  box-shadow: inset 3px 0 0 #9fc9aa;
}

.wz-client-history-message__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.wz-client-history-message__who {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.wz-client-history-message__who strong {
  color: #252a31;
  font-size: 12px;
}

.wz-client-history-message__who a {
  color: #5f6d7d;
  font-size: 11px;
  font-weight: 700;
}

.wz-client-history-message time {
  flex: 0 0 auto;
  color: #989fa8;
  font-size: 10px;
}

.wz-client-history-message__text {
  margin-top: 8px;
  color: #343b44;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.wz-client-history-message__foot {
  margin-top: 9px;
}

.wz-client-history-message__foot a {
  color: #66717e;
  font-size: 10px;
  font-weight: 750;
  text-decoration: none;
}

.wz-client-history-message__foot a:hover {
  text-decoration: underline;
}

/* Attachments */

.wz-client-history-attachment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid #d9e1ea;
  border-radius: 12px;
  background: #fafbfc;
}

.wz-client-history-attachment__body {
  min-width: 0;
}

.wz-client-history-attachment__body strong {
  display: block;
  overflow-wrap: anywhere;
  color: #252a31;
  font-size: 12px;
}

.wz-client-history-attachment__body span {
  display: block;
  margin-top: 3px;
  color: #858d96;
  font-size: 10px;
}

.wz-client-history-attachment__actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Responsive */

@media (max-width: 820px) {
  .wz-client-history-page {
    width: calc(100% - 22px);
    margin-top: 16px;
  }

  .wz-client-history-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .wz-client-history-head__badges {
    justify-content: flex-start;
  }

  .wz-client-history-attachment {
    grid-template-columns: 1fr;
  }

  .wz-client-history-attachment__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .wz-client-history-page {
    width: calc(100% - 16px);
    margin-top: 12px;
  }

  .wz-client-history-page .wz-pagebar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .wz-client-history-page .wz-page-actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
  }

  .wz-client-history-page .wz-page-actions .adm-btn {
    width: 100%;
    text-align: center;
  }

  .wz-client-history-head {
    padding: 15px 14px;
    border-radius: 18px;
  }

  .wz-client-history-conversations,
  .wz-client-history-feed {
    border-radius: 15px;
  }

  .wz-client-section__head,
  .wz-client-history-feed__head {
    padding: 14px;
  }

  .wz-client-history-feed__head {
    flex-direction: column;
  }

  .wz-client-history-conversation {
    grid-template-columns: minmax(0, 1fr) 22px;
    padding: 14px;
  }

  .wz-client-history-conversation > b {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .wz-client-history-message {
    padding: 14px;
  }

  .wz-client-history-message__top {
    flex-direction: column;
    gap: 5px;
  }

  .wz-client-history-pager {
    padding: 11px 14px;
  }

  .wz-client-history-attachment__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .wz-client-history-attachment__actions .wz-client-inline-action {
    width: 100%;
  }
}

/* ===== Tenant Client History Message Separation ===== */

.wz-client-history-messages {
  display: grid;
  gap: 12px;
  padding: 16px;
  background: #f4f7fa;
}

.wz-client-history-message {
  width: min(86%, 880px);
  padding: 14px 15px;
  border: 1px solid #d8e0e9;
  border-radius: 15px;
  background: #ffffff;
  box-shadow:
    0 5px 14px rgba(15,23,42,.04),
    0 1px 0 rgba(255,255,255,.75) inset;
}

.wz-client-history-message:last-child {
  border-bottom: 1px solid #d8e0e9;
}

.wz-client-history-message--client {
  justify-self: start;
  box-shadow:
    inset 3px 0 0 #9bbce4,
    0 5px 14px rgba(15,23,42,.04);
}

.wz-client-history-message--company {
  justify-self: end;
  background: #f9fafb;
  box-shadow:
    inset -3px 0 0 #a8cbb0,
    0 5px 14px rgba(15,23,42,.04);
}

.wz-client-history-message__top {
  padding-bottom: 8px;
  border-bottom: 1px solid #edf0f2;
}

.wz-client-history-message__text {
  margin-top: 11px;
  padding: 0 2px;
}

.wz-client-history-message__foot {
  margin-top: 11px;
  padding-top: 8px;
  border-top: 1px solid #edf0f2;
}

.wz-client-history-message__foot a {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  color: #596574;
}

@media (max-width: 820px) {
  .wz-client-history-message {
    width: 92%;
  }
}

@media (max-width: 560px) {
  .wz-client-history-messages {
    gap: 10px;
    padding: 10px;
  }

  .wz-client-history-message {
    width: 100%;
    padding: 13px;
    border-radius: 13px;
  }

  .wz-client-history-message--client,
  .wz-client-history-message--company {
    justify-self: stretch;
  }
}


/* === WebZip tenant home dashboard v1 === */

.wz-home-dashboard{
  margin-top: 24px;
  margin-bottom: 22px;
}

.wz-home-hero{
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 176px;
  padding: 30px 32px;
  border: 1px solid rgba(148,163,184,.55);
  border-radius: 24px;
  background:
    radial-gradient(
      circle at 92% 12%,
      rgba(59,130,246,.12),
      transparent 34%
    ),
    linear-gradient(
      135deg,
      #ffffff 0%,
      #f8fafc 64%,
      #f1f5f9 100%
    );
  box-shadow:
    0 1px 2px rgba(15,23,42,.04),
    0 14px 40px rgba(15,23,42,.08);
}

.wz-home-hero__content{
  min-width: 0;
  max-width: 720px;
}

.wz-home-eyebrow{
  margin-bottom: 8px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.wz-home-hero__title{
  margin: 0;
  color: #0f172a;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
  letter-spacing: -.045em;
}

.wz-home-hero__text{
  max-width: 620px;
  margin: 12px 0 0;
  color: #475569;
  font-size: 15px;
  line-height: 1.6;
}

.wz-home-hero__actions{
  flex: 0 0 auto;
}

.wz-home-primary-action{
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 220px;
  padding: 14px 16px;
  border: 1px solid #1d4ed8;
  border-radius: 16px;
  background: #1d4ed8;
  color: #fff !important;
  text-decoration: none !important;
  box-shadow: 0 8px 24px rgba(29,78,216,.18);
  transition:
    transform .16s ease,
    box-shadow .16s ease,
    background .16s ease;
}

.wz-home-primary-action:hover{
  transform: translateY(-1px);
  background: #1e40af;
  box-shadow: 0 12px 30px rgba(29,78,216,.24);
}

.wz-home-primary-action svg{
  width: 23px;
  height: 23px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wz-home-primary-action span{
  display: grid;
  gap: 2px;
}

.wz-home-primary-action small{
  color: rgba(255,255,255,.72);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.wz-home-primary-action strong{
  font-size: 14px;
  font-weight: 800;
}

.wz-home-section-head{
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 30px 2px 14px;
}

.wz-home-section-head h3{
  margin: 0;
  color: #0f172a;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: -.025em;
}

.wz-home-section-head p{
  margin: 5px 0 0;
  color: #64748b;
  font-size: 13px;
}

.wz-home-grid{
  gap: 14px;
}

.wz-home-card{
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  min-height: 144px;
  padding: 20px 46px 20px 20px;
  border: 1px solid #cbd5e1;
  border-radius: 18px;
  background: #fff;
  box-shadow:
    0 1px 2px rgba(15,23,42,.03),
    0 8px 24px rgba(15,23,42,.05);
  transition:
    transform .16s ease,
    border-color .16s ease,
    box-shadow .16s ease;
}

.wz-home-card:hover{
  transform: translateY(-2px);
  border-color: #94a3b8;
  box-shadow:
    0 2px 4px rgba(15,23,42,.04),
    0 14px 34px rgba(15,23,42,.09);
}

.wz-home-card--primary{
  border-color: rgba(59,130,246,.48);
  background:
    linear-gradient(
      145deg,
      #ffffff 0%,
      #f8fbff 100%
    );
}

.wz-home-card .wz-quickcard__icon{
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  margin: 0;
  border-radius: 13px;
  background: #f1f5f9;
  color: #334155;
}

.wz-home-card--primary .wz-quickcard__icon{
  background: #eff6ff;
  color: #1d4ed8;
}

.wz-home-card .wz-quickcard__icon svg{
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wz-home-card .wz-quickcard__body{
  min-width: 0;
}

.wz-home-card .wz-quickcard__title{
  margin: 1px 0 7px;
  color: #0f172a;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.wz-home-card .wz-quickcard__text{
  color: #64748b;
  font-size: 13px;
  line-height: 1.48;
}

.wz-home-card__arrow{
  position: absolute;
  top: 21px;
  right: 18px;
  color: #94a3b8;
  font-size: 18px;
  transition:
    color .16s ease,
    transform .16s ease;
}

.wz-home-card:hover .wz-home-card__arrow{
  color: #1d4ed8;
  transform: translateX(2px);
}

@media (max-width: 820px){
  .wz-home-hero{
    align-items: stretch;
    flex-direction: column;
    min-height: 0;
    padding: 24px;
  }

  .wz-home-primary-action{
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .wz-home-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wz-home-card{
    min-height: 156px;
  }
}

@media (max-width: 560px){
  .wz-home-dashboard{
    margin-top: 16px;
  }

  .wz-home-hero{
    padding: 20px;
    border-radius: 20px;
  }

  .wz-home-hero__title{
    font-size: 30px;
  }

  .wz-home-grid{
    grid-template-columns: 1fr;
  }

  .wz-home-card{
    min-height: 0;
    padding: 18px 44px 18px 18px;
  }
}


/* === WebZip tenant home header v1 === */

.wz-home-header{
  padding: 0;
  background:
    linear-gradient(
      135deg,
      #0f172a 0%,
      #111827 58%,
      #172554 100%
    );
  border-bottom:
    1px solid rgba(255,255,255,.08);
  box-shadow:
    0 8px 28px rgba(15,23,42,.16);
}

.wz-home-header__inner{
  width: min(1440px, calc(100% - 40px));
  max-width: none;
  min-height: 76px;
  margin: 0 auto;
  display: grid;
  grid-template-columns:
    auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  flex-wrap: nowrap;
}

.wz-home-brand{
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: #fff !important;
  text-decoration: none !important;
}

.wz-home-brand__mark{
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  flex: 0 0 38px;
  border-radius: 12px;
  background:
    linear-gradient(
      145deg,
      #2563eb,
      #1d4ed8
    );
  color: #fff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -.03em;
  box-shadow:
    0 8px 20px rgba(37,99,235,.3),
    inset 0 1px 0 rgba(255,255,255,.18);
}

.wz-home-brand__copy{
  display: grid;
  min-width: 0;
  gap: 2px;
}

.wz-home-brand__copy strong{
  color: #fff;
  font-size: 16px;
  line-height: 1.1;
  letter-spacing: -.025em;
  white-space: nowrap;
}

.wz-home-brand__copy small{
  max-width: 185px;
  overflow: hidden;
  color: rgba(255,255,255,.62);
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wz-home-nav{
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  gap: 4px;
}

.wz-home-nav a{
  position: relative;
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255,255,255,.72) !important;
  font-size: 12px;
  font-weight: 750;
  text-decoration: none !important;
  white-space: nowrap;
  transition:
    background .15s ease,
    color .15s ease;
}

.wz-home-nav a:hover{
  background: rgba(255,255,255,.08);
  color: #fff !important;
}

.wz-home-nav a.is-current{
  background: rgba(255,255,255,.11);
  color: #fff !important;
}

.wz-home-nav a.is-current::after{
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 2px;
  border-radius: 999px;
  background: #60a5fa;
  content: "";
}

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

.wz-home-admin-tools{
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 12px;
  border-right:
    1px solid rgba(255,255,255,.12);
}

.wz-home-admin-tools a{
  color: rgba(255,255,255,.68) !important;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none !important;
}

.wz-home-admin-tools a:hover{
  color: #fff !important;
}

.wz-home-admin-tools__return{
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 11px;
  border:
    1px solid rgba(96,165,250,.38);
  border-radius: 10px;
  background: rgba(37,99,235,.15);
  color: #dbeafe !important;
}

.wz-home-admin-tools__more{
  display: flex;
  gap: 8px;
  align-items: center;
}

.wz-home-account{
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.wz-home-account__meta{
  display: grid;
  min-width: 0;
  gap: 1px;
  text-align: right;
}

.wz-home-account__meta strong{
  max-width: 150px;
  overflow: hidden;
  color: #fff;
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wz-home-account__meta small{
  color: rgba(255,255,255,.48);
  font-size: 9px;
  line-height: 1.2;
}

.wz-home-account form{
  margin: 0;
}

.wz-home-logout{
  display: grid;
  width: 36px;
  height: 36px;
  min-height: 0;
  place-items: center;
  padding: 0;
  border:
    1px solid rgba(255,255,255,.14);
  border-radius: 11px;
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.72);
  cursor: pointer;
}

.wz-home-logout:hover{
  border-color:
    rgba(255,255,255,.24);
  background:
    rgba(255,255,255,.11);
  color: #fff;
}

.wz-home-logout svg{
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 1180px){
  .wz-home-header__inner{
    width: min(100% - 28px, 1180px);
    grid-template-columns: auto 1fr;
    gap: 12px 18px;
    padding: 12px 0;
  }

  .wz-home-nav{
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    overflow-x: visible;
    scrollbar-width: none;
  }

  .wz-home-nav::-webkit-scrollbar{
    display: none;
  }

  .wz-home-header__side{
    grid-column: 2;
    grid-row: 1;
  }
}

@media (max-width: 820px){
  .wz-home-header__inner{
    width: calc(100% - 20px);
    grid-template-columns: 1fr auto;
  }

  .wz-home-admin-tools__more,
  .wz-home-account__meta{
    display: none;
  }

  .wz-home-admin-tools{
    padding-right: 8px;
  }

  .wz-home-admin-tools__return{
    font-size: 10px;
  }

  .wz-home-nav{
    gap: 2px;
  }

  .wz-home-nav a{
    min-height: 36px;
    padding: 0 9px;
    font-size: 11px;
  }
}

@media (max-width: 560px){
  .wz-home-header__inner{
    width: calc(100% - 16px);
    gap: 10px;
  }

  .wz-home-brand__copy small{
    max-width: 130px;
  }

  .wz-home-brand__mark{
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .wz-home-admin-tools__return{
    max-width: 105px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}


/* === WebZip tenant home responsive header v2 === */

.wz-home-header__inner{
  width: min(1440px, calc(100% - 40px));
  max-width: none;
  min-height: 76px;
  margin: 0 auto;
  display: grid;
  grid-template-columns:
    auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
}

.wz-home-brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #fff !important;
  text-decoration: none !important;
}

.wz-home-brand__tenant{
  display: block;
  max-width: 190px;
  overflow: hidden;
  color: rgba(255,255,255,.82);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wz-home-nav-wrap{
  min-width: 0;
}

.wz-home-nav-check,
.wz-home-nav-toggle{
  display: none;
}

.wz-home-nav-panel{
  min-width: 0;
}

.wz-home-mobile-admin{
  display: none;
}

.wz-home-nav{
  justify-content: center;
}

.wz-home-account__meta{
  display: grid;
}

.wz-home-nav-toggle svg{
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

@media (max-width: 1260px){

  .wz-home-header__inner{
    width: calc(100% - 28px);
    grid-template-columns:
      auto minmax(0, 1fr) auto;
    gap: 14px;
  }

  .wz-home-nav{
    gap: 1px;
  }

  .wz-home-nav a{
    padding-right: 7px;
    padding-left: 7px;
    font-size: 11px;
  }

  .wz-home-admin-tools__more{
    display: none;
  }

  .wz-home-brand__tenant{
    max-width: 150px;
  }

  .wz-home-account__meta strong{
    max-width: 125px;
  }
}

@media (max-width: 980px){

  .wz-home-header__inner{
    min-height: 64px;
    grid-template-columns:
      minmax(0, 1fr) auto auto;
    gap: 8px;
    padding: 9px 0;
  }

  .wz-home-brand{
    grid-column: 1;
    grid-row: 1;
  }

  .wz-home-nav-wrap{
    display: contents;
  }

  .wz-home-nav-toggle{
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 11px;
    border:
      1px solid rgba(255,255,255,.18);
    border-radius: 11px;
    background:
      rgba(255,255,255,.08);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
  }

  .wz-home-header__side{
    grid-column: 3;
    grid-row: 1;
  }

  .wz-home-admin-tools{
    display: none;
  }

  .wz-home-nav-panel{
    display: none;
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    border:
      1px solid rgba(255,255,255,.11);
    border-radius: 14px;
    background:
      rgba(15,23,42,.98);
    box-shadow:
      0 16px 34px rgba(15,23,42,.28);
  }

  .wz-home-nav-check:checked
    ~ .wz-home-nav-panel{
    display: block;
  }

  .wz-home-nav{
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .wz-home-nav a{
    width: 100%;
    min-height: 42px;
    justify-content: flex-start;
    padding: 0 13px;
    box-sizing: border-box;
    font-size: 13px;
  }

  .wz-home-nav a.is-current::after{
    top: 8px;
    right: auto;
    bottom: 8px;
    left: 3px;
    width: 3px;
    height: auto;
  }

  .wz-home-mobile-admin{
    display: grid;
    gap: 4px;
    margin-top: 8px;
    padding-top: 8px;
    border-top:
      1px solid rgba(255,255,255,.10);
  }

  .wz-home-mobile-admin a{
    display: flex;
    min-height: 40px;
    align-items: center;
    padding: 0 13px;
    border-radius: 10px;
    color: rgba(219,234,254,.88) !important;
    font-size: 12px;
    font-weight: 750;
    text-decoration: none !important;
  }

  .wz-home-mobile-admin a:hover{
    background:
      rgba(59,130,246,.12);
    color: #fff !important;
  }

  .wz-home-account__meta{
    display: grid;
    text-align: right;
  }
}

@media (max-width: 620px){

  .wz-home-header__inner{
    width: calc(100% - 16px);
    grid-template-columns:
      minmax(0, 1fr) auto;
    gap: 8px;
  }

  .wz-home-brand{
    grid-column: 1;
    grid-row: 1;
  }

  .wz-home-brand__mark{
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 10px;
  }

  .wz-home-brand__tenant{
    max-width: 34vw;
    font-size: 11px;
  }

  .wz-home-nav-toggle{
    grid-column: 2;
    grid-row: 1;
    width: 38px;
    min-height: 38px;
    padding: 0;
  }

  .wz-home-nav-toggle span{
    display: none;
  }

  .wz-home-header__side{
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-content: flex-end;
    padding-top: 7px;
    border-top:
      1px solid rgba(255,255,255,.08);
  }

  .wz-home-account{
    width: 100%;
    justify-content: flex-end;
  }

  .wz-home-account__meta{
    display: grid;
    flex: 1 1 auto;
    text-align: left;
  }

  .wz-home-account__meta strong{
    max-width: none;
    font-size: 11px;
  }

  .wz-home-account__meta small{
    font-size: 9px;
  }

  .wz-home-logout{
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
  }

  .wz-home-nav-panel{
    grid-row: 3;
  }
}


/* === WebZip tenant home responsive stability v3 === */

.wz-home-brand{
  align-self: center;
}

.wz-home-brand__tenant{
  max-width: 150px;
}

@media (max-width: 1180px){

  .wz-home-header__inner{
    width: calc(100% - 24px);
    min-height: 66px;
    grid-template-columns:
      minmax(120px, auto) minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: center;
    gap: 8px 12px;
    padding: 9px 0;
  }

  .wz-home-brand{
    grid-column: 1;
    grid-row: 1;
    display: grid;
    grid-template-columns: 38px;
    grid-template-rows: auto auto;
    justify-items: start;
    gap: 4px;
    min-width: 0;
  }

  .wz-home-brand__mark{
    grid-column: 1;
    grid-row: 1;
  }

  .wz-home-brand__tenant{
    grid-column: 1;
    grid-row: 2;
    max-width: 160px;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .wz-home-nav-wrap{
    display: contents;
  }

  .wz-home-nav-toggle{
    display: inline-flex;
    grid-column: 3;
    grid-row: 1;
    min-width: 76px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 11px;
    border:
      1px solid rgba(255,255,255,.18);
    border-radius: 11px;
    background:
      rgba(255,255,255,.08);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
  }

  .wz-home-nav-toggle svg{
    width: 17px;
    height: 17px;
  }

  .wz-home-header__side{
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    justify-self: end;
  }

  .wz-home-admin-tools{
    display: none;
  }

  .wz-home-account{
    min-width: 0;
  }

  .wz-home-account__meta{
    display: grid;
    min-width: 0;
    text-align: right;
  }

  .wz-home-account__meta strong{
    max-width: 180px;
  }

  .wz-home-nav-panel{
    display: none;
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    margin-top: 2px;
    padding: 8px;
    box-sizing: border-box;
    border:
      1px solid rgba(255,255,255,.11);
    border-radius: 14px;
    background:
      rgba(15,23,42,.98);
    box-shadow:
      0 16px 34px rgba(15,23,42,.28);
  }

  .wz-home-nav-check:checked
    ~ .wz-home-nav-panel{
    display: block;
  }

  .wz-home-nav{
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .wz-home-nav a{
    width: 100%;
    min-height: 42px;
    justify-content: flex-start;
    padding: 0 13px;
    box-sizing: border-box;
    font-size: 13px;
  }

  .wz-home-nav a.is-current::after{
    top: 8px;
    right: auto;
    bottom: 8px;
    left: 3px;
    width: 3px;
    height: auto;
  }

  .wz-home-mobile-admin{
    display: grid;
    gap: 4px;
    margin-top: 8px;
    padding-top: 8px;
    border-top:
      1px solid rgba(255,255,255,.10);
  }

  .wz-home-mobile-admin a{
    display: flex;
    min-height: 40px;
    align-items: center;
    padding: 0 13px;
    border-radius: 10px;
    color: rgba(219,234,254,.88) !important;
    font-size: 12px;
    font-weight: 750;
    text-decoration: none !important;
  }
}

@media (max-width: 620px){

  .wz-home-header__inner{
    width: calc(100% - 16px);
    grid-template-columns:
      72px minmax(0, 1fr) 40px;
    gap: 7px;
  }

  .wz-home-brand{
    grid-template-columns: 34px;
  }

  .wz-home-brand__mark{
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    border-radius: 10px;
  }

  .wz-home-brand__tenant{
    max-width: 72px;
    font-size: 9px;
  }

  .wz-home-header__side{
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    padding: 0;
    border: 0;
    justify-content: flex-end;
  }

  .wz-home-account{
    width: 100%;
    justify-content: flex-end;
    gap: 7px;
  }

  .wz-home-account__meta{
    flex: 1 1 auto;
    min-width: 0;
    text-align: right;
  }

  .wz-home-account__meta strong{
    max-width: 145px;
    margin-left: auto;
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .wz-home-account__meta small{
    font-size: 8px;
  }

  .wz-home-logout{
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
  }

  .wz-home-nav-toggle{
    grid-column: 3;
    grid-row: 1;
    width: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
  }

  .wz-home-nav-toggle span{
    display: none;
  }

  .wz-home-nav-panel{
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (max-width: 390px){

  .wz-home-header__inner{
    grid-template-columns:
      62px minmax(0, 1fr) 38px;
  }

  .wz-home-brand__tenant{
    max-width: 62px;
  }

  .wz-home-account__meta strong{
    max-width: 120px;
  }
}


/* === WebZip tenant home account stack v4 === */

.wz-home-account{
  display: grid;
  grid-template-columns: auto;
  justify-items: end;
  gap: 5px;
}

.wz-home-account form{
  grid-row: 1;
  margin: 0;
}

.wz-home-account__meta{
  grid-row: 2;
  display: grid;
  justify-items: end;
  gap: 1px;
  min-width: 0;
  text-align: right;
}

.wz-home-account__meta strong{
  max-width: 160px;
  overflow: hidden;
  color: #fff;
  font-size: 10px;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wz-home-account__meta small{
  color: rgba(255,255,255,.50);
  font-size: 8px;
  line-height: 1.1;
}

@media (max-width: 1100px){

  .wz-home-account{
    justify-items: end;
  }

  .wz-home-account__meta{
    justify-items: end;
    text-align: right;
  }
}

@media (max-width: 620px){

  .wz-home-header__side{
    width: auto;
    padding: 0;
    border: 0;
  }

  .wz-home-account{
    width: auto;
    justify-content: end;
    justify-items: end;
    gap: 4px;
  }

  .wz-home-account__meta{
    width: auto;
    justify-items: end;
    text-align: right;
  }

  .wz-home-account__meta strong{
    max-width: 125px;
    font-size: 9px;
  }

  .wz-home-account__meta small{
    font-size: 8px;
  }
}


/* === WebZip tenant home operational summary === */

.wz-home-summary{
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 40px;
  padding: 24px;
  box-sizing: border-box;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 20px;
  background: #fff;
  box-shadow:
    0 12px 34px rgba(15,23,42,.06);
}

.wz-home-summary__head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.wz-home-summary__head h2{
  margin: 5px 0 0;
  color: #0f172a;
  font-size: 21px;
  font-weight: 850;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.wz-home-summary__link{
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(15,23,42,.10);
  border-radius: 11px;
  background: #fff;
  color: #0f172a !important;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none !important;
  transition:
    border-color .16s ease,
    background .16s ease,
    transform .16s ease;
}

.wz-home-summary__link:hover{
  border-color: rgba(15,23,42,.18);
  background: #f8fafc;
  transform: translateY(-1px);
}

.wz-home-summary__grid{
  display: grid;
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.wz-home-summary__item{
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid rgba(15,23,42,.07);
  border-radius: 14px;
  background: #f8fafc;
}

.wz-home-summary__item span{
  display: block;
  margin-bottom: 6px;
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.3;
}

.wz-home-summary__item strong{
  display: block;
  overflow: hidden;
  color: #0f172a;
  font-size: 18px;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 820px){
  .wz-home-summary{
    width: calc(100% - 20px);
    margin-top: 18px;
    padding: 18px;
    border-radius: 16px;
  }

  .wz-home-summary__head{
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .wz-home-summary__link{
    align-self: flex-start;
  }

  .wz-home-summary__grid{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px){
  .wz-home-summary{
    width: calc(100% - 16px);
    margin-bottom: 28px;
    padding: 16px;
  }

  .wz-home-summary__head h2{
    font-size: 19px;
  }

  .wz-home-summary__item{
    padding: 14px 15px;
  }
}


/* === WebZip tenant company summary v1 === */

.wz-company-card{
  margin-top: 18px;
  padding: 24px;
  border: 1px solid #cbd5e1;
  border-radius: 20px;
  background: #fff;
  box-shadow:
    0 1px 2px rgba(15,23,42,.03),
    0 10px 28px rgba(15,23,42,.06);
}

.wz-company-card__head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.wz-company-card__eyebrow{
  margin-bottom: 5px;
  color: #64748b;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.wz-company-card h2{
  margin: 0;
  color: #0f172a;
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: -.03em;
}

.wz-company-card__meta{
  display: flex;
  gap: 8px 18px;
  flex-wrap: wrap;
  margin-top: 9px;
  color: #64748b;
  font-size: 12px;
}

.wz-company-card__meta strong{
  color: #334155;
  font-weight: 800;
}

.wz-company-card__settings{
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border: 1px solid #cbd5e1;
  border-radius: 11px;
  background: #f8fafc;
  color: #334155 !important;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none !important;
  white-space: nowrap;
}

.wz-company-card__settings:hover{
  border-color: #94a3b8;
  background: #f1f5f9;
}

.wz-company-card__divider{
  height: 1px;
  margin: 20px 0;
  background: #e2e8f0;
}

.wz-company-card__billing{
  color: #334155;
  font-size: 14px;
}

@media (max-width: 640px){
  .wz-company-card{
    padding: 18px;
    border-radius: 17px;
  }

  .wz-company-card__head{
    flex-direction: column;
    gap: 14px;
  }

  .wz-company-card__settings{
    width: 100%;
    box-sizing: border-box;
  }

  .wz-company-card h2{
    font-size: 22px;
  }
}


/* === WebZip tenant company service cards v1 === */

.wz-company-service-grid{
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.wz-company-service{
  min-width: 0;
  padding: 18px;
  border: 1px solid #dbe3ee;
  border-radius: 16px;
  background: #f8fafc;
}

.wz-company-service__head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.wz-company-service__label{
  color: #64748b;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.wz-company-service h3,
.wz-company-subscription h3{
  margin: 5px 0 0;
  color: #0f172a;
  font-size: 16px;
  line-height: 1.2;
}

.wz-company-service p{
  margin: 10px 0 14px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.wz-company-service__status{
  flex: 0 0 auto;
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
}

.wz-company-service__button{
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid #cbd5e1;
  border-radius: 11px;
  background: #fff;
  color: #1e293b;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.wz-company-service__button:hover{
  border-color: #94a3b8;
  background: #f1f5f9;
}

.wz-company-service__bind{
  margin-top: 12px;
}

.wz-company-service__bind label{
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 10px;
}

.wz-company-service__bind input{
  width: 100%;
  box-sizing: border-box;
  padding: 9px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-size: 12px;
}

.wz-company-limits{
  display: grid;
  grid-template-columns:
    repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.wz-company-limits > div{
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.wz-company-limits span{
  color: #64748b;
  font-size: 10px;
}

.wz-company-limits strong{
  color: #0f172a;
  font-size: 16px;
  font-weight: 850;
}

.wz-company-subscription{
  margin-top: 14px !important;
  padding: 18px;
  border: 1px solid #dbe3ee;
  border-radius: 16px;
  background: #fff;
  color: #334155 !important;
}

.wz-company-subscription__head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.wz-company-subscription__state{
  display: grid;
  justify-items: end;
  gap: 2px;
  text-align: right;
}

.wz-company-subscription__state span{
  color: #64748b;
  font-size: 10px;
}

.wz-company-subscription__state strong{
  color: #0f172a;
  font-size: 14px;
}

.wz-company-subscription__state em{
  margin-top: 3px;
  color: #b91c1c;
  font-size: 10px;
  font-style: normal;
  font-weight: 850;
  text-transform: uppercase;
}

.wz-company-subscription__days{
  margin-top: 8px;
  color: #64748b;
  font-size: 11px;
}

.wz-company-subscription__days strong{
  color: #334155;
}

.wz-company-subscription__title{
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 850;
}

@media (max-width: 720px){
  .wz-company-service-grid{
    grid-template-columns: 1fr;
  }

  .wz-company-subscription__head{
    flex-direction: column;
    gap: 10px;
  }

  .wz-company-subscription__state{
    justify-items: start;
    text-align: left;
  }
}

@media (max-width: 460px){
  .wz-company-limits{
    grid-template-columns: 1fr;
  }

  .wz-company-service,
  .wz-company-subscription{
    padding: 15px;
  }
}


/* === WebZip tenant managers page v1 === */

.wz-managers-page{
  width:min(1180px,calc(100% - 32px));
  margin:24px auto 48px;
  padding:0;
}

.wz-managers-page > .wz-pagebar{
  margin-bottom:22px;
  border:1px solid #b8c4d5;
  border-radius:18px;
  background:rgba(255,255,255,.94);
  box-shadow:
    0 10px 26px rgba(15,23,42,.08),
    0 1px 0 rgba(255,255,255,.75) inset;
}

.wz-managers-hero{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:24px;
  padding:18px 20px;
  border:1px solid #d2dbe6;
  border-radius:22px;
  background:rgba(255,255,255,.9);
  box-shadow:
    0 12px 28px rgba(15,23,42,.06),
    0 1px 0 rgba(255,255,255,.78) inset;
}

.wz-managers-hero h1{
  margin:5px 0 7px;
  color:#0f172a;
  font-size:30px;
  line-height:1.08;
  letter-spacing:-.035em;
}

.wz-managers-hero p{
  max-width:640px;
  margin:0;
  color:#64748b;
  font-size:13px;
  line-height:1.55;
}

.wz-managers-primary{
  display:inline-flex;
  min-height:44px;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:0 16px;
  border:1px solid #2563eb;
  border-radius:12px;
  background:#2563eb;
  color:#fff;
  font-size:12px;
  font-weight:850;
  cursor:pointer;
  white-space:nowrap;
}

.wz-managers-primary svg{
  width:17px;
  height:17px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.wz-managers-primary:disabled{
  opacity:.5;
  cursor:not-allowed;
}

.wz-managers-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
  margin-top:14px;
}

.wz-managers-stat{
  display:grid;
  gap:4px;
  padding:18px;
  border:1px solid #dbe3ee;
  border-radius:16px;
  background:#fff;
}

.wz-managers-stat span{
  color:#64748b;
  font-size:10px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.wz-managers-stat strong{
  color:#0f172a;
  font-size:24px;
  letter-spacing:-.03em;
}

.wz-managers-stat small{
  color:#94a3b8;
  font-size:10px;
}

.wz-managers-notice,
.wz-managers-error{
  margin-top:14px;
  padding:12px 14px;
  border:1px solid #fecaca;
  border-radius:12px;
  background:#fff7f7;
  color:#991b1b;
  font-size:12px;
}

.wz-managers-invite-result{
  grid-template-columns:1fr minmax(320px,520px);
  align-items:center;
  gap:18px;
  margin-top:14px;
  padding:16px 18px;
  border:1px solid #bfdbfe;
  border-radius:14px;
  background:#eff6ff;
}

.wz-managers-invite-result > div:first-child{
  display:grid;
  gap:3px;
}

.wz-managers-invite-result strong{
  color:#0f172a;
  font-size:13px;
}

.wz-managers-invite-result span{
  color:#64748b;
  font-size:11px;
}

.wz-managers-invite-copy,
.wz-invite-card__link{
  display:flex;
  gap:8px;
}

.wz-managers-invite-copy input,
.wz-invite-card__link input{
  min-width:0;
  flex:1;
  padding:9px 10px;
  border:1px solid #cbd5e1;
  border-radius:10px;
  background:#fff;
  color:#334155;
  font-size:11px;
}

.wz-managers-invite-copy button,
.wz-invite-card__link button{
  padding:0 12px;
  border:1px solid #cbd5e1;
  border-radius:10px;
  background:#fff;
  color:#334155;
  font-size:11px;
  font-weight:800;
  cursor:pointer;
}

.wz-managers-hidden-payload{
  display:none;
}

.wz-managers-section{
  margin-top:14px;
  padding:22px;
  border:1px solid #dbe3ee;
  border-radius:20px;
  background:#fff;
  box-shadow:
    0 1px 2px rgba(15,23,42,.02),
    0 8px 24px rgba(15,23,42,.04);
}

.wz-managers-section__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  margin-bottom:17px;
}

.wz-managers-section__head h2{
  margin:0;
  color:#0f172a;
  font-size:18px;
  letter-spacing:-.02em;
}

.wz-managers-section__head p{
  margin:4px 0 0;
  color:#64748b;
  font-size:11px;
}

.wz-managers-archive-toggle{
  display:inline-flex;
  align-items:center;
  gap:7px;
  color:#475569;
  font-size:11px;
  cursor:pointer;
}

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

.wz-manager-card,
.wz-invite-card{
  min-width:0;
  padding:18px;
  border:1px solid #e2e8f0;
  border-radius:16px;
  background:#f8fafc;
}

.wz-manager-card.is-archived,
.wz-invite-card.is-archived{
  opacity:.66;
}

.wz-manager-card__top{
  display:flex;
  align-items:center;
  gap:12px;
}

.wz-manager-avatar{
  display:grid;
  width:42px;
  height:42px;
  flex:0 0 42px;
  place-items:center;
  border:1px solid #dbe3ee;
  border-radius:13px;
  background:#fff;
  color:#334155;
  font-size:15px;
  font-weight:900;
}

.wz-manager-card__identity{
  min-width:0;
}

.wz-manager-card__identity h3{
  margin:0 0 5px;
  overflow:hidden;
  color:#0f172a;
  font-size:15px;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.wz-manager-card__badges{
  display:flex;
  gap:5px;
  flex-wrap:wrap;
}

.wz-manager-badge{
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:0 8px;
  border:1px solid #dbe3ee;
  border-radius:999px;
  background:#fff;
  color:#475569;
  font-size:9px;
  font-weight:800;
}

.wz-manager-badge.is-ok{
  border-color:#bbf7d0;
  background:#f0fdf4;
  color:#166534;
}

.wz-manager-badge.is-off{
  border-color:#fecaca;
  background:#fff7f7;
  color:#991b1b;
}

.wz-manager-badge.is-muted{
  background:#f1f5f9;
  color:#64748b;
}

.wz-manager-card__metrics{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin-top:15px;
}

.wz-manager-card__metrics > div,
.wz-invite-card__stats > div{
  display:grid;
  gap:2px;
  padding:10px;
  border:1px solid #e2e8f0;
  border-radius:11px;
  background:#fff;
}

.wz-manager-card__metrics span,
.wz-invite-card__stats span{
  color:#94a3b8;
  font-size:9px;
}

.wz-manager-card__metrics strong,
.wz-invite-card__stats strong{
  color:#0f172a;
  font-size:13px;
}

.wz-manager-card__details{
  display:grid;
  gap:7px;
  margin-top:14px;
}

.wz-manager-card__details > div{
  display:flex;
  justify-content:space-between;
  gap:14px;
  color:#64748b;
  font-size:10px;
}

.wz-manager-card__details strong{
  overflow:hidden;
  color:#334155;
  font-weight:750;
  text-align:right;
  text-overflow:ellipsis;
}

.wz-manager-edit{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  margin-top:15px;
  padding-top:14px;
  border-top:1px solid #e2e8f0;
}

.wz-manager-edit label{
  display:grid;
  gap:4px;
}

.wz-manager-edit label span{
  color:#64748b;
  font-size:9px;
  font-weight:700;
}

.wz-manager-edit input{
  width:100%;
  box-sizing:border-box;
  min-height:36px;
  padding:0 9px;
  border:1px solid #cbd5e1;
  border-radius:9px;
  background:#fff;
  color:#0f172a;
  font-size:11px;
}

.wz-manager-edit button,
.wz-manager-card__actions button,
.wz-managers-empty button{
  min-height:36px;
  padding:0 11px;
  border:1px solid #cbd5e1;
  border-radius:9px;
  background:#fff;
  color:#334155;
  font-size:10px;
  font-weight:800;
  cursor:pointer;
}

.wz-manager-edit .staffNameSaved,
.wz-manager-edit .staffPhoneSaved{
  grid-column:1 / -1;
  color:#166534;
  font-size:9px;
}

.wz-manager-card__actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:14px;
}

.wz-manager-card__actions button:hover,
.wz-manager-edit button:hover{
  border-color:#94a3b8;
  background:#f1f5f9;
}

.wz-manager-card__actions .wz-manager-danger{
  color:#991b1b;
}

.wz-managers-empty{
  display:grid;
  justify-items:center;
  padding:44px 20px;
  text-align:center;
}

.wz-managers-empty__icon{
  display:grid;
  width:48px;
  height:48px;
  place-items:center;
  border:1px solid #dbe3ee;
  border-radius:15px;
  background:#f8fafc;
}

.wz-managers-empty__icon svg{
  width:22px;
  height:22px;
  fill:none;
  stroke:#64748b;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.wz-managers-empty h3{
  margin:13px 0 5px;
  color:#0f172a;
  font-size:15px;
}

.wz-managers-empty p{
  max-width:430px;
  margin:0 0 15px;
  color:#64748b;
  font-size:11px;
  line-height:1.5;
}

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

.wz-invite-card__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.wz-invite-card__head > div{
  display:grid;
  gap:3px;
}

.wz-invite-card__head strong{
  color:#0f172a;
  font-size:12px;
}

.wz-invite-card__head span{
  color:#94a3b8;
  font-size:9px;
}

.wz-invite-card__stats{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin-top:13px;
}

.wz-invite-card__link{
  margin-top:12px;
}

@media (max-width:900px){
  .wz-managers-summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .wz-manager-grid,
  .wz-invite-grid{
    grid-template-columns:1fr;
  }

  .wz-managers-invite-result{
    grid-template-columns:1fr;
  }
}

@media (max-width:620px){
  .wz-managers-page{
    padding:18px 12px 40px;
  }

  .wz-managers-hero{
    align-items:stretch;
    flex-direction:column;
    padding:20px;
    border-radius:17px;
  }

  .wz-managers-hero h1{
    font-size:25px;
  }

  .wz-managers-primary{
    width:100%;
  }

  .wz-managers-summary{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
  }

  .wz-managers-stat{
    padding:14px;
  }

  .wz-managers-stat strong{
    font-size:20px;
  }

  .wz-managers-section{
    padding:16px;
    border-radius:17px;
  }

  .wz-managers-section__head{
    align-items:flex-start;
    flex-direction:column;
    gap:10px;
  }

  .wz-manager-card,
  .wz-invite-card{
    padding:15px;
  }

  .wz-manager-edit{
    grid-template-columns:1fr;
  }

  .wz-manager-edit button{
    width:100%;
  }

  .wz-manager-card__details > div{
    display:grid;
    gap:2px;
  }

  .wz-manager-card__details strong{
    text-align:left;
  }

  .wz-managers-invite-copy,
  .wz-invite-card__link{
    flex-direction:column;
  }

  .wz-managers-invite-copy button,
  .wz-invite-card__link button{
    min-height:38px;
  }
}


/* === WebZip tenant company settings page v1 === */

.wz-settings-page{
  width:min(1180px,calc(100% - 32px));
  margin:24px auto 48px;
  padding:0;
}

.wz-settings-page > .wz-pagebar{
  margin-bottom:22px;
  border:1px solid #b8c4d5;
  border-radius:18px;
  background:rgba(255,255,255,.94);
  box-shadow:
    0 10px 26px rgba(15,23,42,.08),
    0 1px 0 rgba(255,255,255,.75) inset;
}

.wz-settings-hero{
  padding:18px 20px;
  border:1px solid #d2dbe6;
  border-radius:22px;
  background:rgba(255,255,255,.9);
  box-shadow:
    0 12px 28px rgba(15,23,42,.06),
    0 1px 0 rgba(255,255,255,.78) inset;
}

.wz-settings-hero h1{
  margin:5px 0 7px;
  color:#0f172a;
  font-size:30px;
  line-height:1.08;
  letter-spacing:-.035em;
}

.wz-settings-hero p{
  max-width:680px;
  margin:0;
  color:#64748b;
  font-size:13px;
  line-height:1.55;
}

.wz-settings-success{
  margin-top:14px;
  padding:12px 14px;
  border:1px solid #bbf7d0;
  border-radius:12px;
  background:#f0fdf4;
  color:#166534;
  font-size:12px;
  font-weight:700;
}

.wz-settings-form{
  display:grid;
  gap:14px;
  margin-top:14px;
}

.wz-settings-section{
  padding:22px;
  border:1px solid #dbe3ee;
  border-radius:20px;
  background:#fff;
  box-shadow:
    0 1px 2px rgba(15,23,42,.02),
    0 8px 24px rgba(15,23,42,.04);
}

.wz-settings-section__head{
  margin-bottom:18px;
}

.wz-settings-section__head h2{
  margin:0;
  color:#0f172a;
  font-size:18px;
  letter-spacing:-.02em;
}

.wz-settings-section__head p{
  margin:4px 0 0;
  color:#64748b;
  font-size:11px;
  line-height:1.5;
}

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

.wz-settings-grid label,
.wz-settings-timezone label,
.wz-settings-day label,
.wz-settings-requisites{
  display:grid;
  gap:6px;
}

.wz-settings-grid label > span,
.wz-settings-timezone label > span,
.wz-settings-day label > span,
.wz-settings-requisites > span{
  color:#64748b;
  font-size:10px;
  font-weight:750;
}

.wz-settings-grid input,
.wz-settings-timezone select,
.wz-settings-day input,
.wz-settings-requisites textarea{
  width:100%;
  box-sizing:border-box;
  border:1px solid #cbd5e1;
  border-radius:10px;
  background:#fff;
  color:#0f172a;
  font:inherit;
}

.wz-settings-grid input,
.wz-settings-timezone select,
.wz-settings-day input{
  min-height:40px;
  padding:0 11px;
  font-size:11px;
}

.wz-settings-grid input:focus,
.wz-settings-timezone select:focus,
.wz-settings-day input:focus,
.wz-settings-requisites textarea:focus{
  outline:none;
  border-color:#94a3b8;
  box-shadow:0 0 0 3px rgba(148,163,184,.14);
}

.wz-settings-timezone{
  max-width:420px;
  margin-bottom:16px;
}

.wz-settings-schedule{
  display:grid;
  gap:8px;
}

.wz-settings-day{
  display:grid;
  grid-template-columns:minmax(150px,1fr) minmax(130px,.8fr) 110px 110px;
  align-items:end;
  gap:10px;
  padding:10px 12px;
  border:1px solid #e2e8f0;
  border-radius:12px;
  background:#f8fafc;
}

.wz-settings-day__name{
  align-self:center;
  color:#0f172a;
  font-size:11px;
  font-weight:800;
}

.wz-settings-day__toggle{
  display:flex !important;
  align-items:center;
  gap:7px !important;
  min-height:40px;
  color:#475569;
  font-size:10px;
}

.wz-settings-day__toggle input{
  width:auto;
  min-height:auto;
}

.wz-settings-requisites textarea{
  min-height:150px;
  padding:11px;
  resize:vertical;
  font-size:11px;
  line-height:1.55;
}

/* === WebZip settings administrator Telegram === */

.wz-settings-admin-tg{
  display: grid;
  grid-template-columns:
    minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(15,23,42,.08);
  border-radius: 14px;
  background: #f8fafc;
}

.wz-settings-admin-tg__state{
  min-width: 0;
}

.wz-settings-admin-tg__state span{
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.3;
}

.wz-settings-admin-tg__state strong{
  display: block;
  overflow: hidden;
  color: #0f172a;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.wz-settings-admin-tg__button{
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0 15px;
  border: 1px solid #0f172a;
  border-radius: 11px;
  background: #0f172a;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform .16s ease,
    background .16s ease;
}

.wz-settings-admin-tg__button:hover{
  background: #1e293b;
  transform: translateY(-1px);
}

.wz-settings-admin-tg__button:disabled{
  cursor: wait;
  opacity: .65;
  transform: none;
}

.wz-settings-admin-tg__link{
  grid-column: 1 / -1;
  display: grid;
  gap: 7px;
  margin-top: 2px;
}

.wz-settings-admin-tg__link[hidden]{
  display: none;
}

.wz-settings-admin-tg__link label{
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.wz-settings-admin-tg__link input{
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-size: 12px;
}

@media (max-width: 640px){
  .wz-settings-admin-tg{
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .wz-settings-admin-tg__button{
    width: 100%;
  }

  .wz-settings-admin-tg__link{
    grid-column: 1;
  }
}


.wz-settings-actions{
  display:flex;
  justify-content:flex-end;
}

.wz-settings-actions button{
  min-height:42px;
  padding:0 16px;
  border:1px solid #2563eb;
  border-radius:11px;
  background:#2563eb;
  color:#fff;
  font-size:11px;
  font-weight:850;
  cursor:pointer;
}

.wz-settings-actions button:hover{
  filter:brightness(.98);
}

@media (max-width:820px){
  .wz-settings-grid{
    grid-template-columns:1fr;
  }

  .wz-settings-day{
    grid-template-columns:1fr 1fr 100px 100px;
  }
}

@media (max-width:620px){
  .wz-settings-page{
    padding:18px 12px 40px;
  }

  .wz-settings-hero{
    padding:20px;
    border-radius:17px;
  }

  .wz-settings-hero h1{
    font-size:25px;
  }

  .wz-settings-section{
    padding:16px;
    border-radius:17px;
  }

  .wz-settings-day{
    grid-template-columns:1fr 1fr;
  }

  .wz-settings-day__name{
    grid-column:1 / -1;
  }

  .wz-settings-day__toggle{
    grid-column:1 / -1;
  }

  .wz-settings-actions button{
    width:100%;
  }
}


/* === Tenant integrations using home components === */
.wz-integrations-page{min-width:0}
.wz-integrations-page *{box-sizing:border-box}
.wz-integrations-page .adm-btn{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:44px;padding:9px 14px;text-align:center;text-decoration:none;
  font-size:13px;line-height:1.25;
}
.wz-integrations-hero{min-height:0;padding:22px 28px}
.wz-integrations-hero .wz-home-hero__title{font-size:clamp(26px,3vw,34px)}
.wz-integrations-hero .wz-home-hero__text{margin-top:7px}
.wz-integrations-back{
  display:inline-flex;margin:0 0 14px;color:#1d4ed8;
  font-size:13px;font-weight:750;text-decoration:none;
}
.wz-integrations-panel{
  display:block;min-width:0;min-height:0;margin-top:14px;padding:24px;
}
.wz-integrations-panel:hover{transform:none}
.wz-integrations-panel__head{
  display:flex;align-items:flex-start;gap:14px;min-width:0;
}
.wz-integrations-panel__title{flex:1;min-width:0}
.wz-integrations-panel__title h2,
.wz-integrations-panel__title h3{
  display:flex;align-items:center;flex-wrap:wrap;gap:8px;
  margin:0;color:#0f172a;font-size:21px;line-height:1.25;
}
.wz-integrations-panel__title p{
  max-width:650px;margin:5px 0 0;color:#64748b;font-size:13px;line-height:1.5;
}
.wz-integrations-panel__status{margin:14px 0 0}
.wz-integrations-panel__status .wz-integrations-status--ready,
.wz-integrations-publish .wz-integrations-status--ready{
  border-color:#bfdbfe;background:#eff6ff;color:#1e40af;
}
.wz-integrations-settings-link{
  display:inline-flex;margin-top:14px;color:#1d4ed8;
  font-size:13px;font-weight:800;text-decoration:none;
}
.wz-integrations-codepanel{
  display:grid;gap:10px;min-width:0;padding:14px;margin-top:14px;
  border:1px solid #e2e8f0;border-radius:14px;background:#f8fafc;
}
.wz-integrations-codepanel strong{color:#0f172a;font-size:13px}
.wz-integrations-codepanel p{margin:3px 0 0;color:#64748b;font-size:12px}
.wz-integrations-codepanel code{white-space:nowrap}
.wz-integrations-codepanel__row{display:flex;align-items:flex-end;gap:12px;min-width:0}
.wz-integrations-codepanel textarea{
  display:block;flex:1;min-width:0;width:100%;height:96px;
  padding:11px;border:1px solid #cbd5e1;border-radius:10px;
  background:#fff;color:#334155;font:12px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;
  overflow:auto;white-space:pre;resize:vertical;
}
.wz-integrations-codepanel__row .adm-btn-primary{flex:0 0 auto;min-width:170px}
.wz-integrations-publish{
  display:flex;align-items:center;flex-wrap:wrap;gap:10px;
  padding:16px 0;margin-top:16px;border-top:1px solid #e2e8f0;
}
.wz-integrations-switch{
  position:relative;display:inline-flex;align-items:center;
  width:48px;height:44px;flex:0 0 48px;
}
.wz-integrations-switch input{position:absolute;opacity:0;inset:0;cursor:pointer}
.wz-integrations-switch > span{
  position:relative;display:block;width:46px;height:26px;
  border-radius:999px;background:#cbd5e1;pointer-events:none;
}
.wz-integrations-switch > span::after{
  content:"";position:absolute;top:3px;left:3px;width:20px;height:20px;
  border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(15,23,42,.2);
  transition:transform .16s ease;
}
.wz-integrations-switch input:checked + span{background:#1d4ed8}
.wz-integrations-switch input:checked + span::after{transform:translateX(20px)}
.wz-integrations-switch input:focus-visible + span{outline:3px solid #2563eb;outline-offset:3px}
#sm_status,#ws_status{font-size:12px;color:#475569}
#sm_status.is-error,#ws_status.is-error{color:#991b1b}
.wz-integrations-theme{display:grid;gap:6px;max-width:560px}
.wz-integrations-theme label{color:#475569;font-size:12px;font-weight:750}
.wz-integrations-theme p{margin:0;color:#64748b;font-size:12px;line-height:1.5}
.wz-integrations-theme select,
.wz-integrations-grid :is(input,select),
.wz-domain-add input,.wz-integrations-copy-input{
  width:100%;min-width:0;min-height:44px;padding:9px 11px;
  border:1px solid #cbd5e1;border-radius:10px;
  background:#fff;color:#111827;font:inherit;font-size:13px;
}
.wz-integrations-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.wz-integrations-grid label{display:grid;gap:6px;min-width:0}
.wz-integrations-grid label > span{color:#475569;font-size:12px;font-weight:750}
.wz-integrations-color{display:grid;grid-template-columns:minmax(0,1fr) 40px;gap:8px}
.wz-integrations-color > span{min-height:44px;border:1px solid #cbd5e1;border-radius:10px}
.wz-integrations-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:18px}
.wz-domain-list{display:grid;gap:8px;margin-top:14px}
.wz-domain-card{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:12px;border:1px solid #e2e8f0;border-radius:11px;background:#f8fafc;
}
.wz-domain-card__identity{display:flex;align-items:center;flex-wrap:wrap;gap:8px;min-width:0}
.wz-domain-card__identity strong{overflow-wrap:anywhere;color:#111827;font-size:13px}
.wz-domain-card__actions{display:flex;flex-wrap:wrap;gap:6px}
.wz-domain-danger{color:#991b1b!important}
.wz-domain-add{display:flex;align-items:center;gap:8px;max-width:620px;margin-top:14px}
.wz-domain-add input{flex:1}
.wz-domains-empty{
  margin-top:14px;padding:16px;border:1px dashed #cbd5e1;
  border-radius:11px;color:#64748b;font-size:13px;
}
.wz-domain-limit-warning,.wz-integrations-error{
  margin-top:12px;padding:11px;border:1px solid #cbd5e1;
  border-radius:10px;background:#f8fafc;color:#475569;font-size:12px;
}
.wz-integrations-error{color:#991b1b}
.wz-domains-limit{margin-left:auto}
.wz-integrations-more{margin-top:22px}
.wz-integrations-code{display:flex;align-items:center;gap:10px;min-width:0}
.wz-integrations-copy-input{flex:1;overflow:hidden;text-overflow:ellipsis}
.wz-integrations-telegram{max-width:760px}
@media (max-width:820px){
  .wz-integrations-panel__head{flex-wrap:wrap}
  .wz-integrations-panel__head > .adm-btn{margin-left:58px}
}
@media (max-width:560px){
  .wz-integrations-hero{padding:20px}
  .wz-integrations-hero .wz-home-hero__title{font-size:28px}
  .wz-integrations-panel{padding:18px}
  .wz-integrations-panel__head > .adm-btn{width:100%;margin-left:0}
  .wz-integrations-codepanel__row{flex-direction:column;align-items:stretch}
  .wz-integrations-codepanel__row .adm-btn-primary{width:100%}
  .wz-integrations-grid{grid-template-columns:1fr}
  .wz-domain-card{align-items:stretch;flex-direction:column}
  .wz-domain-card__actions .adm-btn{flex:1 1 120px}
  .wz-domain-add{flex-direction:column;align-items:stretch}
  .wz-integrations-actions .adm-btn{width:100%}
  .wz-integrations-code{flex-direction:column;align-items:stretch}
  .wz-integrations-code .adm-btn{width:100%}
  .wz-integrations-publish .adm-btn{width:100%}
}
@media (max-width:390px){
  .wz-integrations-panel{padding:16px}
  .wz-integrations-panel__head{gap:10px}
  .wz-integrations-panel__title h2{font-size:19px}
}

/* === WebZip tenant billing page v1 === */

.wz-admin-page.wz-billing-page{
  width:min(1180px,calc(100% - 32px));
  margin:24px auto 48px;
}

.wz-billing-page > .wz-pagebar{
  margin-bottom:22px;
  border:1px solid #b8c4d5;
  border-radius:18px;
  background:rgba(255,255,255,.94);
  box-shadow:
    0 10px 26px rgba(15,23,42,.08),
    0 1px 0 rgba(255,255,255,.75) inset;
}

.wz-page-hero{
  margin-bottom:18px;
  padding:18px 20px;
  border:1px solid #d2dbe6;
  border-radius:22px;
  background:rgba(255,255,255,.9);
  box-shadow:
    0 12px 28px rgba(15,23,42,.06),
    0 1px 0 rgba(255,255,255,.78) inset;
}

.wz-page-hero__eyebrow,
.wz-billing-card__label{
  margin-bottom:6px;
  color:#6b7280;
  font-size:12px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.wz-page-hero h1{
  margin:0;
  color:#171a1f;
  font-size:clamp(30px,4vw,40px);
  line-height:1.05;
  letter-spacing:-.03em;
}

.wz-page-hero p{
  max-width:680px;
  margin:8px 0 0;
  color:#737b85;
  font-size:14px;
  line-height:1.5;
}

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

.wz-billing-card{
  min-width:0;
  padding:20px;
  border:1px solid #dbe3ee;
  border-radius:18px;
  background:#fff;
  box-shadow:
    0 1px 2px rgba(15,23,42,.02),
    0 8px 24px rgba(15,23,42,.04);
}

.wz-billing-card h2,
.wz-billing-section h2{
  margin:0;
  color:#0f172a;
  letter-spacing:-.025em;
}

.wz-billing-card h2{
  font-size:24px;
}

.wz-billing-card__status{
  margin-top:8px;
  color:#64748b;
  font-size:13px;
  line-height:1.45;
}

.wz-billing-stats{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-top:18px;
}

.wz-billing-stats > div{
  min-width:0;
  padding:12px;
  border-radius:13px;
  background:#f8fafc;
}

.wz-billing-stats span,
.wz-billing-stats strong{
  display:block;
}

.wz-billing-stats span{
  color:#64748b;
  font-size:11px;
  font-weight:700;
}

.wz-billing-stats strong{
  margin-top:4px;
  color:#0f172a;
  font-size:18px;
}

.wz-billing-section{
  margin-top:14px;
  padding:20px;
  border:1px solid #dbe3ee;
  border-radius:18px;
  background:#fff;
  box-shadow:
    0 1px 2px rgba(15,23,42,.02),
    0 8px 24px rgba(15,23,42,.04);
}

.wz-billing-section__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:16px;
}

.wz-billing-section h2{
  font-size:21px;
}

.wz-billing-form{
  display:grid;
  grid-template-columns:
    minmax(180px,1fr)
    minmax(160px,1fr)
    auto;
  gap:12px;
  align-items:end;
}

.wz-billing-form .adm-payform__field{
  min-width:0;
}

.wz-billing-form .adm-select{
  width:100%;
  min-height:42px;
}

.wz-billing-form .adm-btn-primary{
  min-height:42px;
  white-space:nowrap;
}

.wz-billing-history{
  display:grid;
  gap:8px;
}

.wz-billing-history__row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:13px 14px;
  border:1px solid #e2e8f0;
  border-radius:13px;
  background:#f8fafc;
}

.wz-billing-history__row > div{
  min-width:0;
}

.wz-billing-history__row strong,
.wz-billing-history__row span{
  display:block;
}

.wz-billing-history__row span{
  margin-top:3px;
  color:#64748b;
  font-size:12px;
}

.wz-billing-direct{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-top:14px;
  padding:13px 14px;
  border:1px solid #dbe3ee;
  border-radius:13px;
  background:#f8fafc;
}

@media (max-width:820px){
  .wz-billing-grid{
    grid-template-columns:1fr;
  }

  .wz-billing-form{
    grid-template-columns:1fr;
  }

  .wz-billing-form .adm-btn-primary{
    width:100%;
  }
}

@media (max-width:620px){
  .wz-admin-page.wz-billing-page{
    width:calc(100% - 24px);
    margin:18px auto 40px;
  }

  .wz-page-hero,
  .wz-billing-card,
  .wz-billing-section{
    padding:16px;
    border-radius:17px;
  }

  .wz-page-hero h1{
    font-size:25px;
  }

  .wz-billing-stats{
    grid-template-columns:1fr;
  }

  .wz-billing-history__row{
    align-items:flex-start;
    flex-direction:column;
  }
}


/* === WebZip tenant two-level header v1 === */

.wz-home-header__inner{
  width:min(1440px,calc(100% - 40px));
  min-height:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  grid-template-rows:auto auto;
  gap:0 24px;
  padding:11px 0 0;
}

.wz-home-brand{
  grid-column:1;
  grid-row:1;
  align-self:center;
  min-height:46px;
}

.wz-home-header__side{
  grid-column:2;
  grid-row:1;
  align-self:center;
}

.wz-home-nav-wrap{
  grid-column:1 / -1;
  grid-row:2;
  min-width:0;
  margin-top:9px;
  border-top:
    1px solid rgba(255,255,255,.09);
}

.wz-home-nav-toggle{
  display:none !important;
}

.wz-home-nav-panel{
  display:block !important;
  width:100%;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}

.wz-home-nav{
  display:grid;
  width:100%;
  grid-template-columns:
    repeat(9,minmax(0,1fr));
  gap:2px;
  padding:7px 0 9px;
  box-sizing:border-box;
}

.wz-home-nav a{
  width:auto;
  min-width:0;
  min-height:38px;
  justify-content:center;
  padding:0 7px;
  box-sizing:border-box;
  overflow:hidden;
  font-size:11px;
  text-align:center;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.wz-home-nav a.is-current::after{
  top:auto;
  right:10px;
  bottom:-1px;
  left:10px;
  width:auto;
  height:2px;
}

.wz-home-mobile-admin{
  display:none !important;
}

@media(max-width:1260px){
    .wz-home-header__inner{
    width:calc(100% - 28px);
  }

    .wz-home-nav a{
    padding:0 5px;
    font-size:10px;
  }
}

@media(max-width:980px){
    .wz-home-header__inner{
    width:calc(100% - 20px);
    grid-template-columns:minmax(0,1fr) auto;
    padding-top:9px;
  }

    .wz-home-admin-tools{
    display:flex;
    padding-right:8px;
  }

    .wz-home-admin-tools__more{
    display:none;
  }

    .wz-home-admin-tools__return{
    min-height:34px;
    max-width:150px;
    overflow:hidden;
    font-size:10px;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

    .wz-home-account__meta{
    display:none;
  }

    .wz-home-nav-wrap{
    display:block;
  }

    .wz-home-nav-panel{
    grid-column:auto;
    grid-row:auto;
  }

    .wz-home-nav{
    grid-template-columns:
      repeat(5,minmax(0,1fr));
    gap:4px;
  }

    .wz-home-nav a{
    min-height:36px;
    justify-content:center;
    padding:0 6px;
    border-radius:9px;
    font-size:10px;
  }
}

@media(max-width:620px){
    .wz-home-header__inner{
    width:calc(100% - 16px);
    grid-template-columns:minmax(0,1fr) auto;
    gap:0 8px;
    padding-top:8px;
  }

    .wz-home-brand{
    min-height:42px;
  }

    .wz-home-brand__tenant{
    max-width:42vw;
  }

    .wz-home-header__side{
    grid-column:2;
    grid-row:1;
    width:auto;
    padding:0;
    border:0;
  }

    .wz-home-nav-wrap{
    grid-column:1 / -1;
    grid-row:2;
    display:block;
    width:100%;
    margin-top:7px;
    padding-top:7px;
    border-top:
      1px solid rgba(255,255,255,.09);
  }

    .wz-home-nav-toggle{
    display:flex !important;
    width:100%;
    min-height:40px;
    align-items:center;
    justify-content:space-between;
    box-sizing:border-box;
    padding:0 12px;
    border:
      1px solid rgba(255,255,255,.14);
    border-radius:11px;
    background:rgba(255,255,255,.07);
    color:#fff;
  }

    .wz-home-nav-toggle span{
    display:block;
    font-size:11px;
    font-weight:800;
  }

    .wz-home-nav-panel{
    display:none !important;
    width:100%;
    margin-top:7px;
    padding:7px;
    box-sizing:border-box;
    border:
      1px solid rgba(255,255,255,.11);
    border-radius:12px;
    background:rgba(15,23,42,.98);
    box-shadow:
      0 14px 30px rgba(15,23,42,.26);
  }

    .wz-home-nav-check:checked
  ~ .wz-home-nav-panel{
    display:block !important;
  }

    .wz-home-nav{
    display:flex;
    width:100%;
    flex-direction:column;
    align-items:stretch;
    gap:3px;
    padding:0;
  }

    .wz-home-nav a{
    width:100%;
    min-height:40px;
    justify-content:flex-start;
    box-sizing:border-box;
    padding:0 12px;
    font-size:12px;
    text-align:left;
    white-space:nowrap;
  }

    .wz-home-nav a.is-current::after{
    top:7px;
    right:auto;
    bottom:7px;
    left:2px;
    width:3px;
    height:auto;
  }

    .wz-home-account{
    width:auto;
  }

    .wz-home-admin-tools{
    padding-right:6px;
  }

    .wz-home-admin-tools__return{
    max-width:96px;
    min-height:32px;
    padding:0 8px;
  }

    .wz-home-logout{
    width:34px;
    height:34px;
  }

    .wz-home-nav-wrap{
    margin-top:7px;
  }

    .wz-home-nav{
    grid-template-columns:
      repeat(3,minmax(0,1fr));
    gap:4px;
    padding:7px 0 8px;
  }

    .wz-home-nav a{
    min-height:34px;
    padding:0 4px;
    font-size:9px;
    white-space:normal;
    line-height:1.15;
  }
}

@media(max-width:390px){
    .wz-home-header__inner{
    grid-template-columns:minmax(0,1fr) auto;
  }

    .wz-home-brand__tenant{
    max-width:35vw;
  }

    .wz-home-nav{
    grid-template-columns:
      repeat(3,minmax(0,1fr));
  }
}

/* Paid Chat status: one compact full-width row on tenant admin pages. */
.wz-home-header__inner > .wz-chat-billing-status{
  grid-column:1 / -1;
  grid-row:3;
  display:block;
  min-width:0;
  padding:7px 12px;
  margin:0 0 8px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:9px;
  background:rgba(255,255,255,.09);
  color:#fff;
  font-size:12px;
  line-height:1.35;
  text-decoration:none;
  overflow-wrap:anywhere;
}
.wz-home-header__inner > .wz-chat-billing-status:hover,
.wz-home-header__inner > .wz-chat-billing-status:focus-visible{
  background:rgba(255,255,255,.17);
  color:#fff;
}
/* Tenant billing uses the same cards and spacing as the tenant home. */
.wz-billing-page .wz-billing-status{
  padding:22px 24px;
  border:1px solid rgba(15,23,42,.08);
  border-radius:20px;
  box-shadow:0 12px 34px rgba(15,23,42,.06);
}
.wz-billing-status h2,
.wz-billing-pending h2{
  margin:0;
  color:#0f172a;
  font-size:22px;
  line-height:1.2;
}
.wz-billing-status > p,
.wz-billing-pending p{
  margin:10px 0 0;
  color:#64748b;
  font-size:13px;
  line-height:1.5;
}
.wz-billing-status__heading{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:12px;
}
.wz-billing-status__grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-top:18px;
}
.wz-billing-status__grid .wz-home-summary__item strong{
  overflow:visible;
  white-space:normal;
  text-overflow:clip;
}
.wz-billing-status__grid .wz-home-summary__item small{
  display:block;
  margin-top:6px;
  color:#64748b;
}
.wz-billing-page .wz-billing-status__note{
  margin-top:14px;
}
.wz-billing-pending{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:16px;
}
.wz-billing-pending__actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
}
.wz-billing-tariff-card{
  cursor:pointer;
  box-sizing:border-box;
  min-height:300px;
}
.wz-billing-tariff-card:focus-within,
.wz-billing-tariff-card:has(.wz-billing-tariff-card__radio:checked){
  border-color:#3b82f6;
  box-shadow:0 0 0 2px rgba(59,130,246,.14),0 12px 28px rgba(15,23,42,.07);
}
.wz-billing-tariff-card__title{
  display:block;
  color:#0f172a;
  font-size:24px;
  line-height:1.2;
}
.wz-billing-tariff-card .wz-billing-plan-badge{
  margin-top:8px;
}
.wz-billing-tariff-card__radio{
  width:20px;
  height:20px;
  flex:0 0 20px;
  margin:4px 0 0;
  accent-color:#1d4ed8;
  cursor:pointer;
}
.wz-billing-tariff-card__price{
  display:flex;
  align-items:baseline;
  flex-wrap:wrap;
  gap:6px;
  margin-top:22px;
  color:#0f172a;
}
.wz-billing-tariff-card__price strong{
  font-size:30px;
  line-height:1.1;
}
.wz-billing-tariff-card__price small{
  color:#64748b;
  font-size:13px;
}
.wz-billing-tariff-card__balance{
  margin-top:13px;
  color:#334155;
  font-size:13px;
  font-weight:750;
  line-height:1.4;
}
.wz-billing-tariff-card__limits{
  display:grid;
  gap:9px;
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid #e2e8f0;
  color:#475569;
  font-size:13px;
  line-height:1.3;
}
.wz-billing-tariff-card__select{
  margin-top:auto;
  padding-top:18px;
  color:#1d4ed8;
  font-size:12px;
  font-weight:800;
}
.wz-billing-tariff-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:18px;
}
.wz-billing-topup__form{
  display:grid;
  grid-template-columns:minmax(160px,1fr) minmax(220px,1.3fr) auto;
  align-items:end;
  gap:12px;
}
.wz-billing-topup__form label{
  display:grid;
  gap:6px;
  min-width:0;
  color:#475569;
  font-size:12px;
  font-weight:750;
}
.wz-billing-topup__form select,
.wz-billing-topup__form input{
  width:100%;
  min-width:0;
  min-height:42px;
  box-sizing:border-box;
  padding:8px 11px;
  border:1px solid #cbd5e1;
  border-radius:10px;
  background:#fff;
  color:#0f172a;
}
@media (max-width:820px){
  .wz-billing-status__grid{
    grid-template-columns:1fr;
  }
  .wz-billing-topup__form{
    grid-template-columns:1fr;
  }
}
@media (max-width:560px){
  .wz-billing-page .wz-billing-status{
    padding:18px;
  }
  .wz-billing-tariff-actions .adm-btn-primary,
  .wz-billing-pending__actions,
  .wz-billing-pending__actions .adm-btn-primary,
  .wz-billing-topup__form .adm-btn-primary{
    width:100%;
  }
}
