
/* ===== AddressBaza Client Cabinet Enhancer v1 ===== */
.ab-client-dashboard {
  margin: 0 0 24px;
}
.ab-client-welcome {
  background:
    radial-gradient(circle at 85% 20%, rgba(76,148,255,.24), transparent 26%),
    linear-gradient(135deg,#071d3a 0%,#0a356f 58%,#1768ed 100%);
  color:#fff;
  border-radius:20px;
  padding:24px;
  margin-bottom:16px;
  box-shadow:0 14px 34px rgba(15,49,99,.13);
}
.ab-client-welcome small {
  display:block;
  color:#cfe2ff;
  font-weight:700;
  margin-bottom:4px;
}
.ab-client-welcome h2 {
  margin:0;
  font-size:28px;
  line-height:1.15;
}
.ab-client-welcome p {
  margin:8px 0 0;
  color:#dceaff;
  line-height:1.5;
}
.ab-client-actions-top {
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:16px;
}
.ab-client-actions-top button,
.ab-client-actions-top a {
  min-height:42px;
  padding:0 15px;
  border-radius:11px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:800;
  text-decoration:none;
  cursor:pointer;
}
.ab-btn-primary {
  border:0;
  background:#fff;
  color:#0f57bf;
}
.ab-btn-secondary {
  border:1px solid rgba(255,255,255,.28);
  background:rgba(255,255,255,.08);
  color:#fff;
}

.ab-client-summary {
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px;
  margin-bottom:18px;
}
.ab-client-summary-card {
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:16px;
  padding:15px;
  box-shadow:0 6px 18px rgba(15,31,61,.035);
  cursor:pointer;
  transition:.18s ease;
}
.ab-client-summary-card:hover {
  transform:translateY(-2px);
  border-color:#cfdcf0;
  box-shadow:0 10px 24px rgba(15,31,61,.07);
}
.ab-client-summary-card .ab-icon {
  width:36px;
  height:36px;
  border-radius:10px;
  display:grid;
  place-items:center;
  background:#edf4ff;
  color:#1768ed;
  font-weight:900;
  margin-bottom:10px;
}
.ab-client-summary-card strong {
  display:block;
  font-size:24px;
  color:#17233a;
  line-height:1;
}
.ab-client-summary-card span {
  display:block;
  margin-top:5px;
  font-size:13px;
  color:#768293;
  line-height:1.3;
}

.ab-client-manager {
  display:grid;
  grid-template-columns:1fr auto;
  gap:18px;
  align-items:center;
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:17px;
  padding:18px 20px;
  margin-bottom:22px;
}
.ab-client-manager h3 {
  margin:0 0 5px;
  color:#17233a;
  font-size:18px;
}
.ab-client-manager p {
  margin:0;
  color:#748091;
  line-height:1.45;
}
.ab-client-messengers {
  display:flex;
  align-items:center;
  gap:10px;
}
.ab-client-messengers a {
  width:42px;
  height:42px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  overflow:hidden;
  transition:.18s ease;
}
.ab-client-messengers a:hover {
  transform:translateY(-2px);
}
.ab-client-messengers img {
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}
.ab-wa { background:#16c75d; }
.ab-tg { background:#2ca5e0; color:#fff; font-weight:900; font-size:19px; }
.ab-max { background:linear-gradient(135deg,#6e55ff,#f24fd0); color:#fff; font-weight:900; font-size:15px; }

/* Safe enhancement of existing sections */
#clientMode .portal-section > h2 {
  font-size:28px;
  color:#17233a;
  margin-bottom:16px;
}
#clientMode .portal-section > h2:after {
  content:"";
  display:block;
  width:42px;
  height:3px;
  border-radius:999px;
  background:#1768ed;
  margin-top:8px;
}

/* Empty states are drawn only when the existing container is really empty */
#clientMode #clientCompanies:empty,
#clientMode #clientContracts:empty,
#clientMode #clientMail:empty,
#clientMode #clientRenewals:empty,
#clientMode #clientDocuments:empty {
  display:block;
  min-height:180px;
  position:relative;
  background:#fff;
  border:1px dashed #d6dee9;
  border-radius:16px;
}
#clientMode #clientCompanies:empty:before,
#clientMode #clientContracts:empty:before,
#clientMode #clientMail:empty:before,
#clientMode #clientRenewals:empty:before,
#clientMode #clientDocuments:empty:before {
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  padding:26px;
  color:#738094;
  line-height:1.55;
  white-space:pre-line;
}
#clientMode #clientCompanies:empty:before {
  content:"Компаний пока нет\A\AПосле оформления менеджер привяжет вашу компанию к кабинету.";
}
#clientMode #clientContracts:empty:before {
  content:"Договоров пока нет\A\AЗдесь появятся ваши договоры после оформления.";
}
#clientMode #clientMail:empty:before {
  content:"Новой корреспонденции нет\A\AПисьма и отправления будут отображаться здесь.";
}
#clientMode #clientRenewals:empty:before {
  content:"Продлений пока нет\A\AИнформация появится, когда приблизится срок договора.";
}
#clientMode #clientDocuments:empty:before {
  content:"Документов пока нет\A\AДоступные документы появятся после загрузки менеджером.";
}

@media (max-width: 980px) {
  .ab-client-summary {
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}
@media (max-width: 720px) {
  .ab-client-summary {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .ab-client-manager {
    grid-template-columns:1fr;
  }
  .ab-client-welcome {
    padding:20px;
    border-radius:17px;
  }
  .ab-client-welcome h2 {
    font-size:24px;
  }
}
@media (max-width: 430px) {
  .ab-client-summary {
    grid-template-columns:1fr 1fr;
    gap:8px;
  }
  .ab-client-summary-card {
    padding:13px;
  }
  .ab-client-summary-card strong {
    font-size:21px;
  }
  .ab-client-actions-top {
    flex-direction:column;
  }
  .ab-client-actions-top button,
  .ab-client-actions-top a {
    width:100%;
  }
}
