/* ============================================
   22. HOME DASHBOARD
   ============================================ */
.chat-home-layout {
  min-height: 100dvh;
  padding: 20px;
  gap: 18px;
  background:
    radial-gradient(circle at top left, rgba(129, 140, 248, 0.12), transparent 24%),
    radial-gradient(circle at right center, rgba(244, 114, 182, 0.12), transparent 26%),
    linear-gradient(135deg, #f6f7ff 0%, #eef3ff 46%, #f9fbff 100%);
}

.chat-home-layout .chat-main,
.chat-home-layout .home-sidebar,
.chat-home-layout .home-nav {
  min-height: 0;
}

.app-shell-layout {
  align-items: stretch;
}

.app-shell-main {
  min-width: 0;
}

.app-shell-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.app-shell-content {
  min-height: 100%;
  padding-bottom: 28px;
}

.app-shell-topbar {
  margin-bottom: 28px;
}

.home-nav {
  position: relative;
  z-index: 60;
  width: 92px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  box-shadow: 0 24px 60px rgba(88, 102, 148, 0.12);
  backdrop-filter: blur(18px);
  padding: 22px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.home-nav-brand {
  display: flex;
  justify-content: center;
  width: 100%;
}

.home-nav-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #4f46e5, #8b5cf6);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 26px rgba(99, 102, 241, 0.3);
}

.home-nav-logo svg {
  width: 24px;
  height: 24px;
}

.home-nav-menu,
.home-nav-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.home-nav-footer {
  margin-top: auto;
}

.home-nav-account {
  position: relative;
  width: 100%;
  padding-top: 10px;
  border-top: 1px solid rgba(213, 219, 240, 0.7);
}

.home-nav-user-menu {
  position: relative;
  width: 100%;
}

.home-nav-user-trigger {
  display: grid;
  width: 100%;
  justify-items: center;
  padding: 8px 0;
  border-radius: 18px;
  cursor: pointer;
  list-style: none;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.home-nav-user-trigger:hover,
.home-nav-user-menu[open] .home-nav-user-trigger {
  background: rgba(255, 255, 255, 0.86);
  transform: translateY(-1px);
}

.home-nav-user-trigger::-webkit-details-marker {
  display: none;
}

.home-nav-user-trigger::marker {
  content: "";
}

.home-nav-user-trigger .chat-home-user-avatar {
  width: 38px;
  height: 38px;
}

.home-nav-user-card {
  position: absolute;
  left: calc(100% + 12px);
  bottom: 0;
  z-index: 70;
  width: 260px;
  max-width: none;
  padding: 10px;
  border-radius: 22px;
}

.home-nav-user-card .chat-home-user-meta {
  justify-items: start;
}

.home-nav-user-card .chat-home-user-email {
  max-width: 150px;
  font-size: 0.82rem;
  text-align: left;
}

.home-nav-user-card .chat-home-user-role {
  display: block;
}

.home-nav-user-card .chat-home-signout-btn {
  width: 34px;
  height: 34px;
}

.home-nav-user-card .chat-home-profile-btn {
  width: 34px;
  height: 34px;
}

.chat-home-profile-btn {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #eef6ff;
  color: #2563eb;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.chat-home-profile-btn:hover {
  background: #dbeafe;
  color: #1d4ed8;
  transform: translateY(-1px);
}

.chat-home-profile-btn svg {
  width: 18px;
  height: 18px;
}

.home-nav-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 8px;
  border-radius: 18px;
  text-decoration: none;
  color: #6c7693;
  transition: transform var(--transition-fast), background var(--transition-fast), color var(--transition-fast), box-shadow var(--transition-fast);
}

.home-nav-item:hover {
  background: rgba(255, 255, 255, 0.86);
  color: #4f46e5;
  transform: translateY(-1px);
}

.home-nav-item.active {
  background: #fff;
  color: #4f46e5;
  box-shadow: 0 14px 34px rgba(113, 110, 255, 0.16);
}

.home-nav-item-static {
  cursor: default;
}

.home-nav-item-static:hover {
  transform: none;
  color: #6c7693;
  background: transparent;
}

.home-nav-item-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-nav-item-icon svg {
  width: 22px;
  height: 22px;
}

.home-nav-item-label {
  font-size: 0.82rem;
  font-weight: 500;
}

.home-sidebar {
  width: 366px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex-shrink: 0;
}

.home-panel {
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 30px;
  box-shadow: 0 24px 60px rgba(88, 102, 148, 0.1);
  backdrop-filter: blur(18px);
}

.agents-panel,
.conversations-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.agents-panel {
  flex: 1.08;
}

.conversations-panel {
  flex: 1;
}

.home-panel-header,
.home-panel-footer {
  padding: 22px 22px 0;
}

.home-panel-footer {
  padding: 0 22px 22px;
}

.home-panel-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #1b2440;
}

.home-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-panel-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(103, 92, 255, 0.08);
  color: #635bff;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.home-panel-action svg {
  width: 16px;
  height: 16px;
}

.home-panel-icons {
  display: flex;
  gap: 8px;
}

.home-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(213, 219, 240, 0.7);
  background: #fff;
  color: #7581a3;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.home-icon-btn svg {
  width: 16px;
  height: 16px;
}

.home-agent-search {
  margin: 0 18px 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(227, 231, 245, 0.95);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  color: #9aa3bd;
  box-shadow: 0 10px 22px rgba(108, 118, 147, 0.05);
}

.home-agent-search:focus-within {
  border-color: rgba(99, 91, 255, 0.46);
  box-shadow: 0 0 0 3px rgba(99, 91, 255, 0.09), 0 10px 22px rgba(108, 118, 147, 0.05);
}

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

.home-agent-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0;
  background: transparent;
  color: #1f2944;
  font: inherit;
  font-size: var(--text-sm);
}

.home-agent-search input::placeholder {
  color: #9aa3bd;
}

.home-agents-list {
  padding: 18px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.home-agent-card {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(227, 231, 245, 0.9);
  border-radius: 22px;
  padding: 16px 18px;
  min-height: 92px;
  align-items: flex-start;
  gap: 14px;
  box-shadow: 0 12px 28px rgba(108, 118, 147, 0.07);
}

.home-agent-card.active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(241, 244, 255, 0.94));
  border-color: rgba(131, 119, 255, 0.38);
  box-shadow: 0 18px 40px rgba(103, 92, 255, 0.16);
}

.home-agent-card[hidden] {
  display: none;
}

.home-agents-empty {
  margin: 6px 4px 2px;
  padding: 14px;
  border: 1px dashed rgba(213, 219, 240, 0.9);
  border-radius: 18px;
  color: #7a84a2;
  text-align: center;
  font-size: var(--text-sm);
}

.home-agent-avatar {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  font-size: 1rem;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.6);
}

.home-agent-avatar.default-avatar {
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
  color: #635bff;
}

.home-agent-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  flex-wrap: wrap;
}

.home-agent-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  color: #635bff;
  background: rgba(99, 91, 255, 0.12);
}

.home-agent-status {
  position: absolute;
  left: 80px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #7d87a8;
}

.home-agent-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9ca3af;
}

.home-agent-status-dot.online {
  background: #4ade80;
}

.home-agent-status-dot.idle {
  background: #f59e0b;
}

.home-agent-status-dot.busy {
  background: #f87171;
}

.home-footer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(251, 252, 255, 0.9);
  color: #635bff;
  text-decoration: none;
  font-weight: 600;
}

.home-footer-link svg {
  width: 18px;
  height: 18px;
}

.home-conversation-list {
  padding: 18px 18px 14px;
  gap: 10px;
}

.conversation-list-card {
  display: block;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(227, 231, 245, 0.9);
  box-shadow: 0 10px 24px rgba(108, 118, 147, 0.06);
}

.conversation-list-card.active,
.conversation-list-card:hover {
  background: linear-gradient(180deg, rgba(248, 249, 255, 0.98), rgba(241, 244, 255, 0.95));
  border-color: rgba(131, 119, 255, 0.28);
}

.conversation-list-card.active::before {
  left: 8px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
}

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

.conversation-list-card-title-row {
  margin-bottom: 6px;
}

.conversation-list-card-title {
  color: #1f2944;
  font-size: 0.95rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}

.conversation-list-card-time,
.conversation-list-card-meta {
  font-size: 0.78rem;
  color: #8a93af;
}

.conversation-list-card-meta span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-list-empty {
  padding: 28px 14px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.chat-home-main {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 34px;
  box-shadow: 0 28px 72px rgba(88, 102, 148, 0.13);
  backdrop-filter: blur(20px);
  overflow: hidden;
}

.chat-home-agent-bar {
  background: transparent;
  border-bottom: none;
  padding: 14px 32px 0;
}

.chat-home-messages {
  padding: 0 24px 24px;
}

.chat-home-messages:has(.message) {
  padding-top: 24px;
}

.chat-home-main .chat-kb-bar {
  margin: 10px 32px 0;
  border: 1px solid rgba(227, 231, 245, 0.95);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.chat-home-welcome {
  max-width: 100%;
  width: 100%;
  padding: 18px 14px 0;
  margin: 0;
  text-align: left;
  justify-content: flex-start;
}

.chat-home-topbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 44px;
}

.chat-home-search {
  min-width: 280px;
  max-width: 420px;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(227, 231, 245, 0.95);
  box-shadow: 0 12px 28px rgba(108, 118, 147, 0.06);
  color: #9aa3bd;
}

.chat-home-search svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.chat-home-search kbd {
  margin-left: auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f4f6ff;
  color: #8d96b3;
  font-size: 0.76rem;
}

.chat-home-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-home-user-card {
  min-width: 0;
  max-width: 320px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(227, 231, 245, 0.95);
  box-shadow: 0 12px 28px rgba(108, 118, 147, 0.07);
}

.chat-home-user-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f172a, #334155);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  object-fit: cover;
}

.chat-home-user-meta {
  min-width: 0;
  display: grid;
  gap: 1px;
  line-height: 1.15;
}

.chat-home-user-email {
  max-width: 178px;
  overflow: hidden;
  color: #172033;
  font-size: 0.84rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-home-user-role {
  color: #8d96b3;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chat-home-signout-btn {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(227, 231, 245, 0.95);
  border-radius: 50%;
  background: #f8faff;
  color: #7b84a2;
  cursor: pointer;
  transition: color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.chat-home-signout-btn:hover {
  background: #fff1f2;
  color: #e11d48;
  transform: translateY(-1px);
}

.chat-home-signout-btn svg {
  width: 17px;
  height: 17px;
}

.chat-mobile-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-mobile-user-avatar {
  width: 34px;
  height: 34px;
  display: none;
  place-items: center;
  border-radius: 50%;
  background: #0f172a;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
}

.chat-home-circle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(227, 231, 245, 0.95);
  background: rgba(255, 255, 255, 0.92);
  color: #7b84a2;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(108, 118, 147, 0.06);
}

.chat-home-circle-btn svg,
.chat-home-primary-btn svg {
  width: 18px;
  height: 18px;
}

.chat-home-primary-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: none;
  padding: 14px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, #635bff, #7c5cff);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 18px 40px rgba(103, 92, 255, 0.28);
}

.chat-home-hero {
  width: 100%;
  min-height: 320px;
  border-radius: 34px;
  padding: 58px 38px 42px;
  margin-bottom: 24px;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.92), transparent 24%),
    radial-gradient(circle at 88% 30%, rgba(153, 170, 255, 0.2), transparent 18%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(245, 247, 255, 0.96) 44%, rgba(239, 240, 255, 0.98) 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.chat-home-hero::before,
.chat-home-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(0.4px);
}

.chat-home-hero::before {
  width: 560px;
  height: 220px;
  left: -72px;
  bottom: 20px;
  background: linear-gradient(135deg, rgba(160, 174, 255, 0.18), rgba(255, 255, 255, 0));
  transform: rotate(14deg);
}

.chat-home-hero::after {
  width: 420px;
  height: 260px;
  right: -40px;
  bottom: -38px;
  background: linear-gradient(135deg, rgba(245, 154, 213, 0.16), rgba(133, 124, 255, 0.14));
  transform: rotate(-22deg);
}

.chat-home-chip,
.chat-home-hero h1,
.chat-home-hero p {
  position: relative;
  z-index: 1;
}

.chat-home-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #525f7f;
  font-size: 0.95rem;
  box-shadow: 0 10px 22px rgba(108, 118, 147, 0.08);
  margin-bottom: 22px;
}

.chat-home-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.2rem, 4vw, 3.9rem);
  line-height: 1.02;
  color: #18233d;
  letter-spacing: -0.04em;
}

.chat-home-hero h1 span {
  display: block;
  margin-top: 8px;
  background: linear-gradient(135deg, #635bff, #7a67ff, #5b8cff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.chat-home-hero p {
  max-width: 620px;
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.6;
  color: #66718f;
}

.chat-home-router-entry {
  width: min(820px, 100%);
  margin: -20px auto 18px;
}

.chat-home-feature-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.chat-home-main .chat-home-feature-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.chat-home-feature-card {
  min-height: 214px;
  border: 1px solid rgba(227, 231, 245, 0.92);
  border-radius: 28px;
  padding: 28px 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 40px rgba(108, 118, 147, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  color: #1f2944;
  cursor: pointer;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
  font-family: var(--font-sans);
}

.chat-home-feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(103, 92, 255, 0.12);
  border-color: rgba(131, 119, 255, 0.34);
}

.chat-home-feature-link {
  text-decoration: none;
}

.chat-home-feature-card strong {
  font-size: 1.1rem;
}

.chat-home-feature-card p {
  margin: 0;
  color: #7a84a2;
  line-height: 1.6;
  font-size: 0.95rem;
}

.chat-home-feature-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #635bff;
}

.chat-home-feature-icon svg {
  width: 28px;
  height: 28px;
}

.chat-home-feature-icon.lilac { background: #f0e9ff; color: #8b5cf6; }
.chat-home-feature-icon.blue { background: #e9efff; color: #4f6bff; }
.chat-home-feature-icon.mint { background: #e8fbf0; color: #22c55e; }
.chat-home-feature-icon.amber { background: #fff1dd; color: #f59e0b; }
.chat-home-feature-icon.pink { background: #ffe8f5; color: #d946ef; }

.chat-home-input-form {
  padding: 0 24px 18px;
  background: transparent;
}

.chat-home-input-wrapper {
  padding: 0;
  border: none;
  border-radius: 34px;
  background: transparent;
  box-shadow: none;
}

.chat-home-input-shell {
  width: 100%;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(209, 215, 237, 0.96);
  border-radius: 30px;
  padding: 18px 18px 14px;
  box-shadow: 0 22px 50px rgba(108, 118, 147, 0.1);
}

.chat-home-input {
  display: block;
  width: 100%;
  min-height: 34px;
  padding: 0;
  font-size: 1.05rem;
}

.chat-home-input-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.chat-home-input-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-home-toolbar-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(227, 231, 245, 0.95);
  background: #fff;
  color: #66718f;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.chat-home-toolbar-btn svg {
  width: 18px;
  height: 18px;
}

.chat-home-send-btn {
  width: 44px;
  height: 44px;
}

.chat-home-security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  color: #8b94af;
  font-size: 0.88rem;
}

.chat-home-security-note svg {
  width: 16px;
  height: 16px;
}

.hidden {
    display: none !important;
}

@media (max-width: 1439px) {
  .chat-home-layout {
    padding: 14px;
    gap: 14px;
  }

  .home-sidebar {
    width: 320px;
  }

  .chat-home-feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .chat-home-main .chat-home-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1199px) {
  .chat-home-layout {
    display: grid;
    grid-template-columns: 84px 300px minmax(0, 1fr);
  }

  .home-sidebar {
    width: 100%;
  }

  .chat-home-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chat-home-main .chat-home-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chat-home-hero {
    padding: 44px 26px 34px;
  }
}

@media (max-width: 1023px) {
  .chat-home-layout {
    display: flex;
    padding: 0;
    gap: 0;
    background: linear-gradient(180deg, #f5f7ff 0%, #eef2ff 100%);
  }

  .home-nav {
    display: none;
  }

  .home-sidebar {
    width: auto;
    display: contents;
  }

  .agents-panel,
  .conversations-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    left: -360px;
    width: min(360px, calc(100vw - 28px));
    z-index: 40;
    border-radius: 0 28px 28px 0;
    transition: left var(--transition-slow);
  }

  .agents-panel.open,
  .conversations-panel.open {
    left: 0;
  }

  .chat-home-main {
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: transparent;
  }

  .chat-home-messages {
    padding: 0 12px 16px;
  }

  .chat-home-topbar {
    display: none;
  }

  .chat-mobile-user-avatar {
    display: grid;
  }

  .chat-home-welcome {
    padding-top: 8px;
  }

  .chat-home-router-entry {
    width: 100%;
    margin: -12px 0 16px;
  }

  .chat-home-feature-grid {
    grid-template-columns: 1fr;
  }

  .chat-home-main .chat-kb-bar {
    margin: 8px 16px 0;
  }

  .chat-home-input-form {
    padding: 0 12px 14px;
  }

  .chat-home-agent-bar {
    padding: 10px 16px 0;
  }
}

@media (max-width: 767px) {
  .conversation-history-stats {
    grid-template-columns: 1fr;
  }

  .conversation-history-search {
    align-items: stretch;
    flex-direction: column;
  }

  .chat-home-hero {
    min-height: 0;
    padding: 34px 18px 28px;
    border-radius: 26px;
  }

  .chat-home-hero h1 {
    font-size: 2.2rem;
  }

  .chat-home-hero p {
    font-size: 1rem;
  }

  .chat-home-feature-card {
    min-height: 0;
    padding: 22px 18px;
    border-radius: 24px;
  }

  .chat-home-input-shell {
    border-radius: 24px;
    padding: 16px 14px 12px;
  }
}

