:root {
  --tb-blue-900: #1e3a8a;
  --tb-blue-800: #2348a4;
  --tb-blue-700: #2d55bb;
  --tb-blue-100: #dbeafe;
  --tb-bg: #f1f5f9;
  --tb-border: #e2e8f0;
  --tb-text: #1e293b;
  --tb-muted: #64748b;
  --tb-green: #10b981;
  --tb-amber: #f59e0b;
  --tb-red: #ef4444;
  --tb-white: #fff;
  --tb-sidebar-width: 240px;
  --tb-sidebar-collapsed: 0px;
  --tb-radius: 10px;
  --tb-shadow-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.05);
  --tb-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body.tb-user-shell,
body.tb-auth-shell {
  font-family: "Noto Sans Bengali", "Noto Sans", system-ui, sans-serif;
  background: var(--tb-bg);
  color: var(--tb-text);
  font-size: 15px;
  line-height: 1.6;
}

/* Force a strict viewport-sized shell so inner flex scrolling works.
   style.css sets body { min-height: 100vh; display: flex }, which would
   otherwise let the body grow past the viewport and break all inner scroll. */
body.tb-user-shell {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
  display: block;
}

/* ---------- LAYOUT ---------- */
.tb-layout {
  height: 100vh;
  height: 100dvh;
  display: flex;
  overflow: hidden;
}

/* ---------- SIDEBAR ---------- */
.tb-sidebar {
  width: var(--tb-sidebar-width);
  min-width: var(--tb-sidebar-width);
  background: linear-gradient(180deg, var(--tb-blue-900) 0%, var(--tb-blue-800) 100%);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  padding: 0 0 8px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  transition: width 0.25s ease, min-width 0.25s ease;
  box-shadow: 2px 0 8px rgba(0,0,0,0.12);
  z-index: 50;
}

.tb-sidebar.collapsed {
  width: 48px;
  min-width: 48px;
}

/* When collapsed, hide logo wrap, keep toggle */
.tb-sidebar.collapsed .tb-brand-logo-wrap {
  display: none;
}

.tb-sidebar.collapsed .tb-sidebar-brand {
  justify-content: center;
  padding: 14px 0 12px;
}

.tb-sidebar.collapsed .tb-sidebar-toggle {
  margin-left: 0;
}

/* Hide all nav items when collapsed */
.tb-sidebar.collapsed .tb-side-section,
.tb-sidebar.collapsed .tb-side-bottom {
  display: none;
}

/* Brand — centered logo only */
.tb-sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 20px 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
  position: relative;
}

.tb-brand-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.tb-brand-logo-large {
  width: 110px;
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.35));
}

.tb-mobile-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tb-mobile-brand-img {
  width: 24px;
  height: 24px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.tb-brand-title {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

.tb-brand-subtitle {
  color: rgba(255,255,255,0.5);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Nav sections */
.tb-side-section {
  padding: 10px 10px 0;
}

.tb-side-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
  font-weight: 700;
  margin: 6px 4px 4px;
  white-space: nowrap;
}

.tb-side-link {
  display: flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: rgba(203,213,225,0.85);
  padding: 8px 10px;
  margin: 2px 0;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 500;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}

.tb-side-link:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.tb-side-link.active {
  background: rgba(99,132,255,0.28);
  border-color: rgba(165,193,255,0.3);
  color: #fff;
}

.tb-side-dot {
  margin-left: auto;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  flex-shrink: 0;
}

.tb-side-link.active .tb-side-dot {
  background: #93c5fd;
}

/* Bottom section */
.tb-side-bottom {
  margin-top: auto;
  padding: 0 10px;
}

.tb-service-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 9px 11px;
  margin-bottom: 8px;
}

.tb-service-title {
  color: #86efac;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.tb-service-subtitle {
  color: rgba(203,213,225,0.75);
  font-size: 11px;
  margin-top: 2px;
}

.tb-user-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 4px;
  border-top: 1px solid rgba(255,255,255,0.07);
}

.tb-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.18);
  font-size: 13px;
  flex-shrink: 0;
}

.tb-user-meta {
  flex: 1;
  min-width: 0;
}

.tb-user-name {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tb-user-role {
  font-size: 10px;
  color: rgba(203,213,225,0.65);
}

.tb-user-settings {
  font-size: 14px;
  opacity: 0.7;
  color: #cbd5e1;
  text-decoration: none;
  flex-shrink: 0;
  padding: 4px;
  border-radius: 6px;
  transition: opacity 0.15s;
}

.tb-user-settings:hover {
  opacity: 1;
}

/* ---------- MAIN AREA ---------- */
.tb-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Sidebar drawer toggle — absolute top-right of brand area */
.tb-sidebar-toggle {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.tb-sidebar-toggle:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* ---------- CONTENT ---------- */
.tb-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 22px;
  background-color: #eef3fb;
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(56,103,214,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 30%, rgba(99,179,237,0.07) 0%, transparent 55%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='80'%3E%3Cpolygon points='34,4 20,38 30,38 26,76 44,32 33,32' fill='none' stroke='rgba(30,58,138,0.07)' stroke-width='1.2'/%3E%3C/svg%3E");
  background-size: auto, auto, 60px 80px;
}

/* Chat page fills the content area exactly — no padding, no scroll at this level */
.tb-content:has(.tb-chat-page) {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---------- DASHBOARD ---------- */
.tb-dashboard {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tb-dash-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.tb-dash-hero {
  min-height: 180px;
  border-radius: var(--tb-radius);
  padding: 22px 26px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(130deg, var(--tb-blue-900) 0%, #2d55c0 100%);
  box-shadow: var(--tb-shadow);
}

.tb-hero-kicker {
  margin: 0;
  font-size: 15px; /* Increased from 13px */
  opacity: 0.8;
}

.tb-hero-title {
  margin: 6px 0 0;
  font-size: 28px; /* Increased from 24px */
  line-height: 1.1;
  font-weight: 700;
}

.tb-hero-subtitle {
  margin: 10px 0 0;
  font-size: 15px; /* Increased from 13px */
  line-height: 1.5;
  opacity: 0.82;
}

/* ── Voice button wrapper (positions pulse rings) ── */
.tb-hero-voice {
  position: relative;
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: #fff;
  color: var(--tb-blue-900);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.22);
  flex-shrink: 0;
  transition: transform 0.18s cubic-bezier(.34,1.56,.64,1), box-shadow 0.18s;
  z-index: 1;
}

.tb-hero-voice:hover {
  transform: scale(1.07);
  box-shadow: 0 14px 34px rgba(0,0,0,0.28);
}

.tb-hero-voice:active {
  transform: scale(0.96);
}

/* Pulse rings */
.tb-hero-voice::before,
.tb-hero-voice::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  animation: tbVoicePulse 2.4s ease-out infinite;
  z-index: -1;
}
.tb-hero-voice::after {
  animation-delay: 1.2s;
}

@keyframes tbVoicePulse {
  0%   { transform: scale(1);    opacity: 0.7; }
  60%  { transform: scale(1.55); opacity: 0.15; }
  100% { transform: scale(1.8);  opacity: 0; }
}

/* Mic SVG icon */
.tb-hero-voice svg {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.tb-hero-voice span {
  font-size: 9.5px;
  font-weight: 600;
  text-align: center;
  color: #475569;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.tb-dash-stats {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tb-dash-stat-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--tb-shadow-sm);
  flex: 1;
  border-left: 4px solid var(--tb-blue-700);
  transition: box-shadow 0.2s ease;
}

.tb-dash-stat-card:hover {
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.tb-dash-stat-card.success {
  border-left-color: var(--tb-green);
}

.tb-dash-stat-card.warning {
  border-left-color: var(--tb-amber);
}

.tb-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--tb-blue-100);
  color: var(--tb-blue-800);
  font-size: 20px;
  flex-shrink: 0;
}
.tb-stat-icon svg { width: 22px; height: 22px; flex-shrink: 0; }

.tb-dash-stat-card.success .tb-stat-icon {
  background: #dcfce7;
  color: #15803d;
}

.tb-dash-stat-card.warning .tb-stat-icon {
  background: #fef3c7;
  color: #b45309;
}

.tb-stat-label {
  color: var(--tb-muted);
  font-size: 13px;
  line-height: 1.2;
}

.tb-stat-value {
  font-size: 32px;
  line-height: 1;
  font-weight: 700;
}

.tb-dash-stat-card small {
  margin-left: auto;
  color: #94a3b8;
  font-size: 11px;
  white-space: nowrap;
}

.tb-section-title {
  margin: 0;
  font-size: 16px; /* Increased from 14px */
  font-weight: 700;
  color: var(--tb-text);
}

.tb-services-row {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.tb-service-item {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  padding: 28px 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--tb-shadow-sm);
  transition: box-shadow 0.15s, transform 0.15s;
  border-top: 4px solid transparent;
}

.tb-service-item:hover {
  box-shadow: var(--tb-shadow);
  transform: translateY(-3px);
}

/* Complaint card — reddish */
.tb-service-item:nth-child(1) {
  border-top-color: #ef4444;
}
.tb-service-item:nth-child(1) .tb-service-icon {
  background: #fee2e2;
  color: #b91c1c;
}

/* General Chat card — blueish */
.tb-service-item:nth-child(2) {
  border-top-color: #3b82f6;
}
.tb-service-item:nth-child(2) .tb-service-icon {
  background: #dbeafe;
  color: #1d4ed8;
}

/* Agent Support card — greenish */
.tb-service-item:nth-child(3) {
  border-top-color: #10b981;
}
.tb-service-item:nth-child(3) .tb-service-icon {
  background: #d1fae5;
  color: #065f46;
}

.tb-service-icon {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--tb-blue-100);
  font-size: 28px;
  flex-shrink: 0;
}
.tb-service-icon svg { width: 28px; height: 28px; flex-shrink: 0; }

.tb-service-item h4 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.tb-service-item p {
  margin: 5px 0 0;
  color: var(--tb-muted);
  font-size: 13.5px;
  line-height: 1.45;
}

.tb-table-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.tb-table-heading a {
  color: var(--tb-blue-700);
  text-decoration: none;
  font-weight: 600;
  font-size: 11px;
}

.tb-table-wrap {
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  overflow: hidden;
  box-shadow: var(--tb-shadow-sm);
}

.tb-dashboard-table {
  width: 100%;
  border-collapse: collapse;
}

.tb-dashboard-table th,
.tb-dashboard-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  font-size: 12px;
}

.tb-dashboard-table th {
  background: #f8fafc;
  color: var(--tb-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.tb-dashboard-table td {
  font-size: 12px;
  color: var(--tb-text);
}

.tb-dashboard-table tbody tr:last-child td {
  border-bottom: 0;
}

.tb-dashboard-table tbody tr:hover td {
  background: #f8fafc;
}

.tb-ticket {
  color: var(--tb-blue-700);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px !important;
  font-weight: 600;
}

.tb-pill {
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  display: inline-block;
}

.tb-pill.success {
  color: #059669;
  background: #dcfce7;
}

.tb-pill.warning {
  color: #b45309;
  background: #fef3c7;
}

.tb-row-btn {
  border: 0;
  border-radius: 7px;
  background: #eff6ff;
  color: var(--tb-blue-700);
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  cursor: pointer;
  transition: background 0.15s;
}

.tb-row-btn:hover {
  background: var(--tb-blue-100);
}

.tb-customer-summary-grid {
  margin-top: 8px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.tb-customer-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  padding: 11px 13px;
  box-shadow: var(--tb-shadow-sm);
  transition: box-shadow 0.2s ease;
}

.tb-customer-card:hover {
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.tb-customer-label {
  display: block;
  font-size: 10px;
  color: var(--tb-muted);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tb-customer-value {
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--tb-text);
}

.tb-customer-meta {
  margin: 6px 0 0;
  color: var(--tb-muted);
  font-size: 11px;
  line-height: 1.4;
}

.tb-balance-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tb-balance-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tb-balance-dot--ok {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.tb-balance-dot--low {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
  animation: tb-pulse-red 1.6s ease-in-out infinite;
}

@keyframes tb-pulse-red {
  0%, 100% { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2); }
  50%       { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.08); }
}

.tb-balance-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: var(--tb-radius);
  padding: 10px 14px;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 500;
  margin-top: 0;
}

.tb-balance-alert svg {
  flex-shrink: 0;
  color: #ef4444;
}

/* ---------- CHAT ---------- */
.tb-chat-page {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  width: 100%;
  max-width: 1020px;
  height: calc(100vh - 32px);
  border: 1px solid rgba(30,58,138,0.12);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 32px rgba(30,58,138,0.13);
  margin: 16px 0;
  align-self: center;
}

/* Full-width chat layout (no sidebar) */
.tb-chat-page.tb-chat-no-sidebar {
  grid-template-columns: 1fr;
  max-width: 880px;
}

.tb-chat-left {
  border-right: 1px solid var(--tb-border);
  background: #fafbff;
  padding: 12px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Top bar with tabs + quick topics */
.tb-chat-top-bar {
  border-bottom: 1px solid var(--tb-border);
  background: #fafbff;
  padding: 10px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.tb-chat-top-tabs {
  display: flex;
  gap: 8px;
  width: 100%;
  max-width: 600px;
}

.tb-top-tab {
  border: 1px solid var(--tb-border);
  border-radius: 8px;
  background: #fff;
  color: var(--tb-muted);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 0;
  flex: 1;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.tb-top-tab:hover {
  background: #f0f6ff;
  color: var(--tb-blue-700);
}

.tb-top-tab.active {
  background: var(--tb-blue-900);
  color: #fff;
  border-color: var(--tb-blue-900);
}

.tb-chat-quick-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  width: 100%;
  max-width: 600px;
}

.tb-quick-chip {
  border: 1px solid var(--tb-border);
  border-radius: 999px;
  background: #fff;
  color: var(--tb-text);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
  white-space: nowrap;
}

.tb-quick-chip:hover {
  background: #f0f6ff;
  border-color: #bfdbfe;
}

.tb-quick-chip--red   { border-color: #fca5a5; color: #b91c1c; background: #fff1f2; }
.tb-quick-chip--blue  { border-color: #93c5fd; color: #1d4ed8; background: #eff6ff; }
.tb-quick-chip--green { border-color: #6ee7b7; color: #065f46; background: #ecfdf5; }
.tb-quick-chip--orange{ border-color: #fcd34d; color: #92400e; background: #fffbeb; }

.tb-quick-chip--red:hover   { background: #fee2e2; }
.tb-quick-chip--blue:hover  { background: #dbeafe; }
.tb-quick-chip--green:hover { background: #d1fae5; }
.tb-quick-chip--orange:hover{ background: #fef3c7; }

.tb-ai-info-card {
  display: flex;
  gap: 9px;
  align-items: center;
  border: 1px solid var(--tb-border);
  background: #fff;
  border-radius: 9px;
  padding: 10px;
}

.tb-ai-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--tb-blue-100);
  color: var(--tb-blue-800);
  font-size: 16px;
  flex-shrink: 0;
}
.tb-ai-avatar svg { width: 18px; height: 18px; flex-shrink: 0; }

.tb-ai-info-card h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.tb-ai-info-card p {
  margin: 1px 0 0;
  color: #10b981;
  font-size: 11px;
  font-weight: 500;
}

.tb-mode-selector {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tb-mode-selector h4 {
  margin: 0 0 6px;
  color: var(--tb-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.tb-mode-item {
  width: 100%;
  text-align: left;
  border: 1px solid var(--tb-border);
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
  margin-bottom: 5px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.tb-mode-item:hover {
  background: #f5f7ff;
}

.tb-mode-item.active {
  border-color: #93c5fd;
  background: #eff6ff;
}

.tb-mode-item strong {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--tb-text);
}

.tb-mode-item span {
  color: var(--tb-muted);
  font-size: 10px;
}

.tb-side-title {
  margin: 0 0 6px;
  color: var(--tb-muted);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.tb-side-list {
  display: grid;
  gap: 4px;
}

.tb-side-list button {
  border: 1px solid var(--tb-border);
  background: #fff;
  color: var(--tb-text);
  border-radius: 7px;
  padding: 7px 9px;
  text-align: left;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.12s;
  line-height: 1.35;
}

.tb-side-list button:hover {
  background: #f0f6ff;
  border-color: #bfdbfe;
}

.tb-complaint-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.tb-complaint-grid button {
  border: 0;
  border-radius: 8px;
  padding: 10px 6px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.12s;
}

.tb-complaint-grid button:hover {
  opacity: 0.85;
}

.tb-complaint-grid button:nth-child(1) { background: #fef9e7; color: #92400e; }
.tb-complaint-grid button:nth-child(2) { background: #eff6ff; color: #1d4ed8; }
.tb-complaint-grid button:nth-child(3) { background: #ecfdf5; color: #065f46; }
.tb-complaint-grid button:nth-child(4) { background: #fff1f2; color: #be123c; }

.tb-chat-right {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tb-chat-toolbar {
  padding: 8px 14px;
  border-bottom: 1px solid var(--tb-border);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  background: #fff;
  flex-shrink: 0;
}

.tb-chat-toolbar-info {
  display: flex;
  align-items: center;
  gap: 9px;
}

.tb-chat-toolbar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--tb-blue-100);
  color: var(--tb-blue-800);
  font-size: 15px;
  flex-shrink: 0;
}
.tb-chat-toolbar-avatar svg { width: 18px; height: 18px; flex-shrink: 0; }

.tb-chat-toolbar-avatar--logo {
  background: transparent;
  border-radius: 0;
  width: auto;
  height: auto;
  overflow: visible;
}

.tb-chat-toolbar-logo {
  width: 36px;
  height: auto;
  object-fit: contain;
  display: block;
}

.tb-chat-toolbar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--tb-text);
}

.tb-chat-toolbar-subtitle {
  font-size: 13px;
  color: var(--tb-muted);
  margin-top: 2px;
}

.tb-chat-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tb-toolbar-btn,
.chat-reset-btn {
  border: 1px solid var(--tb-border);
  background: #f8fafc;
  border-radius: 7px;
  color: var(--tb-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}

.tb-toolbar-btn:hover,
.chat-reset-btn:hover {
  background: var(--tb-blue-100);
  color: var(--tb-blue-700);
  border-color: #bfdbfe;
}

/* Chat messages */
.chat-panel {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;        /* contain children, no bleed */
}

/* ── Empty state: greeting + input centred vertically ── */
#panelGeneral.chat-panel:not(.has-messages) {
  justify-content: center;
  gap: 0;
}

#panelGeneral.chat-panel:not(.has-messages) .chat-messages {
  flex: 0 0 auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;    /* panel bg shows through */
  padding: 0 24px 16px;
  gap: 12px;
  max-width: 600px;
  width: 100%;
  align-self: center;
}

#panelGeneral.chat-panel:not(.has-messages) .chat-messages .message {
  max-width: 100%;
  width: 100%;
  align-self: center;
}

/* Style the empty-state input as a prominent centred card */
#panelGeneral.chat-panel:not(.has-messages) .chat-input-container {
  border-top: none;
  background: transparent;
  padding: 0 24px;
  max-width: 600px;
  width: 100%;
  align-self: center;
}

#panelGeneral.chat-panel:not(.has-messages) .chat-input {
  box-shadow: 0 4px 28px rgba(30,58,138,0.14);
  border-radius: 14px;
  border: 1.5px solid #bfdbfe;
  background: #fff;
  padding: 4px 6px;
  transition: box-shadow 0.2s, border-color 0.2s;
}

#panelGeneral.chat-panel:not(.has-messages) .chat-input:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 4px 28px rgba(59,130,246,0.22);
}

#panelGeneral.chat-panel:not(.has-messages) .chat-input input,
#panelGeneral.chat-panel:not(.has-messages) .chat-input textarea {
  background: transparent;
  border: none;
  font-size: 16px;
  padding: 10px 10px;
}

#panelGeneral.chat-panel:not(.has-messages) .chat-input input:focus,
#panelGeneral.chat-panel:not(.has-messages) .chat-input textarea:focus {
  outline: none;
  border: none;
  box-shadow: none;
}

/* ── Active state: standard scrollable layout ── */
.chat-panel.has-messages {
  justify-content: stretch;
}

.chat-messages {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  background: #f1f5f9;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message {
  max-width: 72%;
  display: flex;
  flex-direction: column;
  animation: tbSlideIn 0.22s ease;
}

@keyframes tbSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.bot-message { align-self: flex-start; }
.user-message { align-self: flex-end; }

.message-content {
  padding: 11px 15px;
  border-radius: 14px;
  line-height: 1.6;
  word-break: break-word;
  font-size: 16px;
}

.bot-message .message-content {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px 14px 14px 3px;
  color: var(--tb-text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.user-message .message-content {
  background: linear-gradient(135deg, #2348a4, #1e3a8a);
  color: #fff;
  border-radius: 14px 14px 3px 14px;
  box-shadow: 0 2px 8px rgba(30,58,138,0.2);
}

.message-time {
  display: block;
  margin-top: 3px;
  font-size: 10px;
  color: #94a3b8;
  padding: 0 2px;
}

.user-message .message-time {
  color: rgba(255,255,255,0.65);
  text-align: right;
}

.message .markdown p {
  margin: 0 0 6px;
}

.message .markdown p:last-child { margin-bottom: 0; }

.message .markdown ul,
.message .markdown ol {
  margin: 4px 0 8px 18px;
  font-size: 15px;
}

.message .markdown li {
  margin-bottom: 2px;
}

/* Headings in bot messages */
.message .markdown h1,
.message .markdown h2,
.message .markdown h3,
.message .markdown h4 {
  font-weight: 600;
  color: #1e293b;
  margin: 10px 0 6px;
  line-height: 1.3;
}

.message .markdown h1 { font-size: 17px; }
.message .markdown h2 { font-size: 16px; }
.message .markdown h3 { font-size: 15px; }
.message .markdown h4 { font-size: 14px; font-weight: 500; color: #475569; }

.message .markdown h1:first-child,
.message .markdown h2:first-child,
.message .markdown h3:first-child {
  margin-top: 0;
}

/* Bold/strong = key values */
.message .markdown strong {
  font-weight: 700;
  color: #0f172a;
}

/* Tables — billing & data display */
.message .markdown table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 8px 0 10px;
  font-size: 14px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.message .markdown thead th {
  background: #f1f5f9;
  font-weight: 600;
  color: #334155;
  padding: 8px 12px;
  text-align: left;
  font-size: 13px;
  text-transform: capitalize;
  border-bottom: 2px solid #e2e8f0;
}

.message .markdown tbody td {
  padding: 7px 12px;
  border-bottom: 1px solid #f1f5f9;
  color: #475569;
}

.message .markdown tbody tr:nth-child(even) {
  background: #f8fafc;
}

.message .markdown tbody tr:last-child td {
  border-bottom: none;
}

.message .markdown tbody tr:hover {
  background: #eff6ff;
}

/* Section dividers */
.message .markdown hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 10px 0;
}

/* Code inline */
.message .markdown code {
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 13px;
  color: #334155;
}

/* Status badges */
.tb-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

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

.tb-badge--unpaid {
  background: #fee2e2;
  color: #dc2626;
}

.tb-badge--pending {
  background: #fef3c7;
  color: #92400e;
}

/* Section icon prefix */
.tb-section-icon {
  margin-right: 4px;
}

/* Billing amount highlight */
.tb-amount {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
}

/* Due date warning */
.tb-due-soon {
  color: #dc2626;
  font-weight: 600;
}

/* Card-style response sections */
.tb-response-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 6px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.tb-response-card + .tb-response-card {
  margin-top: 8px;
}

/* Chat input — base rule (empty-state overrides above; this applies in has-messages) */
.chat-input-container {
  border-top: 1px solid var(--tb-border);
  background: #fff;
  padding: 10px 12px;
  flex-shrink: 0;
}

.tts-speed-btn {
  border: 1px solid var(--tb-border);
  border-radius: 999px;
  background: #f8fafc;
  font-size: 12px;
  padding: 4px 9px;
  font-family: inherit;
  cursor: pointer;
  color: var(--tb-muted);
  transition: background 0.12s, color 0.12s;
}

.tts-speed-btn.active {
  background: var(--tb-blue-900);
  color: #fff;
  border-color: var(--tb-blue-900);
}

.chat-input {
  display: flex;
  gap: 6px;
  align-items: flex-end;
}

.chat-input input,
.chat-input textarea {
  flex: 1;
  border: 1px solid var(--tb-border);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 17px;
  font-family: inherit;
  color: var(--tb-text);
  background: #f8fafc;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.chat-input textarea {
  resize: none;
  overflow: hidden;
  line-height: 1.45;
  min-height: 40px;
  max-height: 160px;
  overflow-y: auto;
}

.chat-input input:focus,
.chat-input textarea:focus {
  outline: none;
  border-color: #93c5fd;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(147,197,253,0.25);
}

.chat-input input::placeholder,
.chat-input textarea::placeholder {
  color: #94a3b8;
}

.chat-icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  border: none;
  background: #f1f5f9;
  color: var(--tb-blue-700);
  font-size: 15px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.chat-icon-btn:hover {
  background: #e2e8f0;
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.chat-icon-btn:active {
  transform: scale(0.95);
}

.chat-icon-btn.recording {
  animation: tbPulse 1.1s ease infinite;
  background: #fee2e2;
  color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

@keyframes tbPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.chat-icon-btn[title] {
  position: relative;
}

.chat-icon-btn[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 10px;
  background: #1e293b;
  color: #fff;
  font-size: 12px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 1;
  z-index: 10;
}

#sendBtn,
#complaintSendBtn {
  border: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, #2348a4, #1e3a8a);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 16px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.12s;
}

#sendBtn:hover:not(:disabled),
#complaintSendBtn:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}

#sendBtn:disabled,
#complaintSendBtn:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
  transform: none;
}

/* ---------- AGENT PAGE ---------- */
.tb-agent-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  width: 100%;
  max-width: 1020px;
  height: calc(100vh - 32px);
  border: 1px solid rgba(30,58,138,0.12);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 32px rgba(30,58,138,0.13);
  margin: 16px 0;
  align-self: center;
}

/* Agent layout fills content area like chat page */
.tb-content:has(.tb-agent-layout) {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tb-agent-left {
  border-right: 1px solid var(--tb-border);
  padding: 12px;
  background: #fafbff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tb-agent-wait-card {
  border-radius: 9px;
  padding: 11px 13px;
  color: #fff;
  background: linear-gradient(135deg, #059669, #047857);
  box-shadow: 0 3px 10px rgba(5,150,105,0.25);
}

.tb-agent-wait-card strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
}

.tb-agent-wait-card span {
  font-size: 11px;
  opacity: 0.88;
  margin-top: 2px;
  display: block;
}

.tb-agent-switch-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.tb-agent-tab-btn {
  border-radius: 8px;
  padding: 7px 8px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s;
  border: 1px solid var(--tb-border);
  background: #fff;
  color: var(--tb-muted);
}

.tb-agent-tab-btn:hover {
  background: #f1f5f9;
}

.tb-agent-tab-btn.active {
  border: 2px solid var(--tb-text);
  background: #fff;
  color: var(--tb-text);
}

.tb-agent-tab-btn.active:hover {
  background: #f8fafc;
}

.tb-agent-quick-actions {
  margin-top: 12px;
}

.tb-agent-quick-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--tb-border);
  border-radius: 10px;
  color: var(--tb-text);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.tb-agent-quick-link:hover {
  background: #f1f5f9;
  border-color: var(--tb-blue-600, #2563eb);
  color: var(--tb-blue-700, #1d4ed8);
}

.tb-agent-contact-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  max-height: calc(100vh - 280px);
  overflow-y: auto;
}

.tb-agent-contact-card {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--tb-border);
  border-radius: 10px;
  padding: 10px 12px;
}

.tb-agent-contact-card:hover {
  border-color: var(--tb-blue-600, #2563eb);
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.08);
}

.tb-agent-contact-emergency {
  border-color: #fca5a5;
  background: #fef2f2;
}

.tb-agent-contact-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 16px;
  flex-shrink: 0;
}

.tb-agent-contact-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.tb-agent-contact-info strong {
  font-size: 12px;
  font-weight: 700;
  color: var(--tb-text);
  margin-bottom: 2px;
}

.tb-agent-contact-info span {
  font-size: 12px;
  color: var(--tb-fg-2, #475569);
  word-break: break-all;
}

.tb-agent-contact-info small {
  font-size: 10px;
  color: var(--tb-muted);
  margin-top: 1px;
}

.tb-agent-contact-right-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: var(--tb-fg-3, #94a3b8);
  font-size: 14px;
  height: 100%;
}

#agentChatSection {
  display: flex;
  flex-direction: column;
  height: 100%;
}

#agentContactRightPanel {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.tb-agent-contact-right-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px 24px;
}

.tb-agent-mobile-tabs {
  display: none;
  margin-bottom: 16px;
}

/* ---------- CONTACT PAGE ---------- */
/* ==========================================================================
   Contact Page — 3-column layout
   ========================================================================== */
.tb-contact-page {
  padding: 28px 32px;
  max-width: 1320px;
  margin: 0 auto;
  font-family: "Noto Sans Bengali", sans-serif;
}

.tb-contact-header {
  margin-bottom: 28px;
}

.tb-contact-header h1 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
  color: var(--tb-text);
}

.tb-contact-header p {
  margin: 0;
  font-size: 14px;
  color: var(--tb-muted);
}

/* 3-column grid */
.tb-contact-cols {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.tb-contact-col {
  min-width: 0;
  border: 1px solid var(--tb-border, #e2e8f0);
  border-radius: 16px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.tb-contact-col:hover {
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  border-color: #cbd5e1;
}

/* Section titles */
.tb-contact-section {
  margin-bottom: 28px;
}

.tb-contact-section:last-child {
  margin-bottom: 0;
}

.tb-contact-section h2 {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--tb-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

/* Vertical list */
.tb-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tb-contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 10px;
  border-bottom: 1px solid #f1f5f9;
  border-radius: 10px;
  transition: background 0.15s ease;
}

.tb-contact-item:hover {
  background: #f8fafc;
}

.tb-contact-item:last-child {
  border-bottom: none;
}

/* Icon */
.tb-contact-ic {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #eff4ff, #dbeafe);
  color: var(--tb-blue-700, #1d4ed8);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tb-contact-item:hover .tb-contact-ic {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(45, 85, 187, 0.15);
}

.tb-contact-ic--emergency {
  background: linear-gradient(135deg, #fef2f2, #fecaca);
  color: #dc2626;
}

.tb-contact-item:hover .tb-contact-ic--emergency {
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.15);
}

/* Text block */
.tb-contact-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.tb-contact-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--tb-muted);
  letter-spacing: 0.2px;
}

.tb-contact-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--tb-text);
  line-height: 1.45;
}

.tb-contact-phone {
  font-size: 20px;
  font-weight: 700;
  color: var(--tb-blue-700, #1d4ed8);
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: color 0.15s ease;
}

.tb-contact-phone:hover {
  color: var(--tb-blue-900, #1e3a8a);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tb-contact-phone--emergency {
  color: #dc2626;
}

.tb-contact-phone--emergency:hover {
  color: #991b1b;
}

.tb-contact-email {
  font-size: 14px;
  font-weight: 600;
  color: var(--tb-blue-700, #1d4ed8);
  text-decoration: none;
  transition: color 0.15s ease;
}

.tb-contact-email:hover {
  color: var(--tb-blue-900, #1e3a8a);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tb-contact-meta {
  font-size: 11px;
  color: var(--tb-muted);
  margin-top: 2px;
}

/* Emergency section */
.tb-contact-emergency {
  background: linear-gradient(135deg, #fff5f5, #fef2f2);
  border: 1px solid #fecaca;
  border-radius: 14px;
  padding: 18px 20px;
}

.tb-contact-emergency h2 {
  color: #b91c1c;
  border-bottom-color: #fecaca;
}

.tb-contact-item--emergency {
  border-color: #fee2e2;
}

.tb-contact-item--emergency:hover {
  background: rgba(254, 202, 202, 0.15);
}

/* Support box */
.tb-contact-support-box {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border: 1px solid var(--tb-border);
  border-radius: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tb-contact-support-box:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.tb-contact-chat-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--tb-blue-700, #1d4ed8), var(--tb-blue-800, #1e40af));
  border: none;
  border-radius: 8px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  width: fit-content;
  cursor: pointer;
}

.tb-contact-chat-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.25);
  background: linear-gradient(135deg, var(--tb-blue-800, #1e40af), var(--tb-blue-900, #1e3a8a));
}

.tb-contact-chat-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(30, 58, 138, 0.2);
}

/* Warning note */
.tb-contact-note {
  margin-top: 20px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1px solid #fcd34d;
  border-radius: 12px;
  font-size: 12.5px;
  color: #92400e;
  line-height: 1.55;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.tb-contact-note strong {
  font-weight: 700;
}

/* ── Contact page: tabs + tables ─────────────────────────── */
.tb-contact-emergency-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--tb-blue-700, #1d4ed8);
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 20px;
  font-size: 14px;
}
.tb-emergency-badge {
  background: var(--tb-blue-700, #1d4ed8);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: .5px;
}
.tb-contact-emergency-strip .tb-sep { color: #aaa; }

.tb-contact-utility-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--tb-green, #10b981);
  border-radius: 8px;
  padding: 10px 16px;
  margin-bottom: 20px;
  font-size: 14px;
}
.tb-utility-badge {
  background: var(--tb-green, #10b981);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: .5px;
}
.tb-contact-utility-strip .tb-sep { color: #aaa; }
.tb-contact-chat-btn-sm {
  background: var(--tb-blue-700, #1d4ed8);
  color: #fff;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.tb-contact-chat-btn-sm:hover { opacity: .88; }

.tb-contact-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
}
.tb-tab-btn {
  padding: 8px 22px;
  border: 2px solid var(--tb-blue-700, #1d4ed8);
  border-radius: 8px;
  background: transparent;
  color: var(--tb-blue-700, #1d4ed8);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.tb-tab-btn.tb-tab-active,
.tb-tab-btn:hover {
  background: var(--tb-blue-700, #1d4ed8);
  color: #fff;
}
.tb-tab-content { display: none; }
.tb-tab-content.tb-tab-active { display: block; }

.tb-contact-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.tb-contact-search {
  flex: 1 1 520px;
  min-width: 220px;
  border: 1px solid var(--border-color, #d9e2ec);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--tb-text);
  background: var(--card-bg, #fff);
}

.tb-contact-search:focus {
  outline: none;
  border-color: var(--tb-blue-700, #1d4ed8);
  box-shadow: 0 0 0 2px rgba(29, 78, 216, 0.12);
}

.tb-contact-result-meta {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary, #5c6b7a);
  white-space: nowrap;
}

.tb-info-card {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border-color, #e0e0e0);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 8px;
  max-width: 640px;
}
.tb-info-row {
  display: flex;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-color, #f0f0f0);
  font-size: 14px;
}
.tb-info-row:last-child { border-bottom: none; }
.tb-info-label {
  flex: 0 0 120px;
  font-weight: 600;
  color: var(--text-secondary, #555);
}
.tb-phone {
  font-weight: 700;
  font-size: 16px;
  color: var(--tb-blue-700, #1d4ed8);
}

.tb-table-wrap {
  overflow-x: auto;
  border-radius: 10px;
  border: 1px solid var(--border-color, #e0e0e0);
  margin-bottom: 8px;
}
.tb-contact-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.tb-contact-table th {
  background: var(--tb-blue-700, #1d4ed8);
  color: #fff;
  padding: 10px 12px;
  text-align: left;
  white-space: nowrap;
}
.tb-contact-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-color, #f0f0f0);
  vertical-align: top;
}
.tb-contact-table tr:last-child td { border-bottom: none; }
.tb-contact-table tr:hover td { background: var(--hover-bg, #f5f5f5); }
.tb-contact-table a { color: var(--tb-blue-700, #1d4ed8); font-weight: 600; }

.tb-contact-table--compact td {
  line-height: 1.5;
  font-size: 13px;
}

.tb-cell-icon {
  margin-right: 4px;
}

.tb-hotline-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.tb-hotline-text {
  font-weight: 700;
  color: var(--tb-blue-700, #1d4ed8);
  word-break: break-word;
}

.tb-copy-btn {
  border: 1px solid var(--tb-blue-700, #1d4ed8);
  color: var(--tb-blue-700, #1d4ed8);
  background: transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}

.tb-copy-btn:hover {
  background: var(--tb-blue-700, #1d4ed8);
  color: #fff;
}

.tb-contact-pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.tb-page-btn {
  border: 1px solid var(--border-color, #d9e2ec);
  background: var(--card-bg, #fff);
  color: var(--tb-text, #1f2937);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.tb-page-btn:hover:not(:disabled),
.tb-page-btn.active {
  border-color: var(--tb-blue-700, #1d4ed8);
  background: var(--tb-blue-700, #1d4ed8);
  color: #fff;
}

.tb-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.tb-no-data { color: var(--text-secondary, #888); font-size: 14px; padding: 12px 0; }

@media (max-width: 600px) {
  .tb-contact-tabs { flex-wrap: wrap; }
  .tb-tab-btn { padding: 7px 14px; font-size: 13px; }
  .tb-info-label { flex: 0 0 90px; }
  .tb-contact-controls { flex-direction: column; align-items: stretch; }
  .tb-contact-result-meta { white-space: normal; }
  .tb-hotline-wrap { align-items: flex-start; flex-direction: column; }
}

/* ═══════════════════════════════════════════════════════════
   CONTACT PAGE v2 — Modern table + modal design
   ═══════════════════════════════════════════════════════════ */

/* Header */
.tb-contact-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}
.tb-contact-header-text h1 {
  margin: 0 0 4px;
  font-size: 22px;
  font-weight: 700;
  color: var(--tb-text);
}
.tb-contact-header-text p {
  margin: 0;
  font-size: 13px;
  color: var(--tb-muted);
}

/* Hotline chips */
.tb-contact-hotline-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.tb-hotline-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.15s;
  white-space: nowrap;
}
.tb-hotline-chip:hover { opacity: 0.85; transform: translateY(-1px); }
.tb-hotline-chip strong { font-weight: 700; }
.tb-chip-desco    { background: #dbeafe; color: var(--tb-blue-800); }
.tb-chip-dpdc     { background: #d1fae5; color: #065f46; }
.tb-chip-reb      { background: #fef3c7; color: #92400e; }
.tb-chip-emergency{ background: #fee2e2; color: #991b1b; }

/* Toolbar */
.tb-contact-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.tb-search-wrap {
  position: relative;
  flex: 1 1 300px;
  min-width: 200px;
}
.tb-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--tb-muted);
  pointer-events: none;
}
.tb-contact-search {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border: 1px solid var(--tb-border);
  border-radius: 8px;
  font-size: 14px;
  font-family: "Noto Sans Bengali", sans-serif;
  color: var(--tb-text);
  background: var(--tb-white);
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.tb-contact-search:focus {
  outline: none;
  border-color: var(--tb-blue-700);
  box-shadow: 0 0 0 3px rgba(45, 85, 187, 0.1);
}
.tb-provider-select {
  padding: 9px 12px;
  border: 1px solid var(--tb-border);
  border-radius: 8px;
  font-size: 13px;
  font-family: "Noto Sans Bengali", sans-serif;
  color: var(--tb-text);
  background: var(--tb-white);
  cursor: pointer;
  transition: border-color 0.15s;
  white-space: nowrap;
}
.tb-provider-select:focus { outline: none; border-color: var(--tb-blue-700); }
.tb-contact-result-meta {
  font-size: 12px;
  color: var(--tb-muted);
  white-space: nowrap;
  margin-left: auto;
}

/* Table container */
.tb-contact-table-container {
  background: var(--tb-white);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  box-shadow: var(--tb-shadow-sm);
  overflow: hidden;
  animation: tbFadeIn 0.3s ease both;
}
@keyframes tbFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Table */
.tb-contact-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  font-family: "Noto Sans Bengali", sans-serif;
}
.tb-contact-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}
.tb-contact-table th {
  background: var(--tb-blue-900);
  color: #fff;
  padding: 11px 14px;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.tb-th-provider { width: 80px; }
.tb-th-phone    { width: 160px; }
.tb-th-action   { width: 90px; text-align: right; }
.tb-contact-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--tb-border);
  vertical-align: middle;
  color: var(--tb-text);
}
.tb-contact-table tr:last-child td { border-bottom: none; }
.tb-contact-row {
  transition: background 0.12s ease;
  animation: tbRowIn 0.25s ease both;
}
@keyframes tbRowIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.tb-contact-row:hover td { background: #f0f5ff; }
.tb-contact-table tbody tr:nth-child(even) td { background: #f8fafc; }
.tb-contact-table tbody tr:nth-child(even):hover td { background: #f0f5ff; }

/* Cell styles */
.tb-td-phone .tb-hotline-text {
  font-weight: 700;
  color: var(--tb-blue-700);
  letter-spacing: 0.2px;
}
.tb-td-addr { max-width: 240px; }
.tb-muted-text { color: var(--tb-muted); font-size: 12.5px; }

/* Provider badges */
.tb-provider-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.tb-badge-desco { background: #dbeafe; color: var(--tb-blue-800); }
.tb-badge-dpdc  { background: #d1fae5; color: #065f46; }
.tb-badge-reb   { background: #fef3c7; color: #92400e; }

/* View button */
.tb-view-btn {
  padding: 5px 12px;
  border: 1px solid var(--tb-blue-700);
  border-radius: 6px;
  background: transparent;
  color: var(--tb-blue-700);
  font-size: 12px;
  font-weight: 600;
  font-family: "Noto Sans Bengali", sans-serif;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s;
  white-space: nowrap;
  float: right;
}
.tb-view-btn:hover  { background: var(--tb-blue-700); color: #fff; transform: translateY(-1px); }
.tb-view-btn:active { transform: translateY(0); }

/* Pagination */
.tb-contact-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 14px 16px;
  border-top: 1px solid var(--tb-border);
  flex-wrap: wrap;
}

/* ── Detail Modal ── */
.tb-detail-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  align-items: center;
  justify-content: center;
}
.tb-detail-modal.tb-modal-open {
  display: flex;
}
.tb-detail-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(2px);
  animation: tbBackdropIn 0.2s ease both;
}
@keyframes tbBackdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.tb-detail-modal-dialog {
  position: relative;
  z-index: 1;
  background: var(--tb-white);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  width: 100%;
  max-width: 480px;
  margin: 16px;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
  animation: tbModalIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes tbModalIn {
  from { opacity: 0; transform: scale(0.9) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
.tb-detail-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--tb-border);
}
.tb-modal-provider-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.tb-detail-modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--tb-text);
  line-height: 1.4;
}
.tb-modal-close-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 1px solid var(--tb-border);
  border-radius: 8px;
  background: transparent;
  color: var(--tb-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.15s, color 0.15s;
}
.tb-modal-close-btn:hover { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }
.tb-detail-modal-body { padding: 16px 20px 20px; }
.tb-modal-dl { margin: 0; }
.tb-modal-row {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
  align-items: flex-start;
}
.tb-modal-row:last-child { border-bottom: none; }
.tb-modal-row dt {
  flex: 0 0 120px;
  font-size: 12px;
  color: var(--tb-muted);
  font-weight: 600;
  padding-top: 1px;
}
.tb-modal-row dd {
  margin: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--tb-text);
  font-weight: 500;
  word-break: break-word;
}
.tb-modal-phone {
  color: var(--tb-blue-700);
  font-weight: 700;
  text-decoration: none;
  font-size: 15px;
}
.tb-modal-phone:hover { text-decoration: underline; }
.tb-copy-sm {
  padding: 2px 7px;
  font-size: 11px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .tb-contact-header { flex-direction: column; }
  .tb-th-address, .tb-td-addr { display: none; }
  .tb-th-provider { width: 65px; }
  .tb-contact-toolbar { gap: 8px; }
  .tb-provider-select { width: 100%; }
  .tb-search-wrap { flex: 1 1 100%; }
}
@media (max-width: 480px) {
  .tb-contact-table-container { border-radius: 8px; }
  .tb-detail-modal-dialog { margin: 8px; border-radius: 12px; }
  .tb-contact-hotline-chips { gap: 6px; }
  .tb-hotline-chip { padding: 4px 10px; font-size: 12px; }
}

/* Tablet: 2 columns */
@media (max-width: 900px) {
  .tb-contact-cols {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile: single column */
@media (max-width: 600px) {
  .tb-contact-page {
    padding: 16px 14px;
  }

  .tb-contact-cols {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .tb-contact-header h1 {
    font-size: 20px;
  }
}

.tb-agent-profile {
  border: 1px solid var(--tb-border);
  border-radius: 9px;
  padding: 11px;
  display: flex;
  gap: 9px;
  align-items: flex-start;
  background: #fff;
}

.tb-agent-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ede9fe;
  color: #6d28d9;
  font-size: 16px;
  flex-shrink: 0;
}
.tb-agent-avatar svg { width: 20px; height: 20px; flex-shrink: 0; }

.tb-agent-profile h4 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.tb-agent-profile p {
  margin: 1px 0 0;
  color: var(--tb-muted);
  font-size: 11px;
}

.tb-agent-profile small {
  color: var(--tb-green);
  font-size: 10px;
  font-weight: 600;
  display: block;
  margin-top: 2px;
}

.tb-agent-rating {
  margin-left: auto;
  color: #f59e0b;
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.tb-agent-rating span {
  color: var(--tb-muted);
  font-weight: 400;
  display: block;
  font-size: 10px;
}

.tb-agent-right {
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ---------- SAMPLE QUERIES (inside general chat) ---------- */
.tb-sample-queries {
  margin: 12px 0 4px;
  padding: 16px;
  background: #f8faff;
  border: 1px solid #e0eaff;
  border-radius: 14px;
  align-self: stretch;
  max-width: 100%;
}

.tb-sample-label {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--tb-muted);
}

.tb-sample-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.tb-sample-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #d1e0ff;
  border-radius: 10px;
  background: #fff;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--tb-text);
  cursor: pointer;
  text-align: left;
  transition: background 0.13s, border-color 0.13s, transform 0.12s;
}

.tb-sample-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  transform: translateY(-1px);
}

.tb-sample-icon {
  font-size: 20px;
  flex-shrink: 0;
  color: var(--tb-blue-700);
  display: flex;
  align-items: center;
}
.tb-sample-icon svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ── Empty-state: greeting + sample queries styling ── */
#panelGeneral.chat-panel:not(.has-messages) .tb-sample-queries {
  max-width: 560px;
  width: 100%;
  align-self: center;
}

#panelGeneral.chat-panel:not(.has-messages) .chat-messages .bot-message:first-child .message-content {
  background: transparent;
  border: none;
  box-shadow: none;
  text-align: center;
  font-size: 17px;
  padding: 0 0 4px;
}

/* ---------- TOP TAB ANIMATIONS ---------- */
@keyframes tbTabPulse {
  0%   { box-shadow: 0 0 0 0 rgba(59,130,246,0.55); }
  60%  { box-shadow: 0 0 0 6px rgba(59,130,246,0); }
  100% { box-shadow: 0 0 0 0 rgba(59,130,246,0); }
}

.tb-top-tab.active {
  animation: tbTabPulse 2s ease-out infinite;
}

/* ---------- COMPLAINT / CATEGORY CARDS ---------- */
.complaint-submit-container { margin-top: 6px; }

.complaint-submit-btn {
  border: 0;
  border-radius: 8px;
  background: #10b981;
  color: #fff;
  padding: 7px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: opacity 0.15s;
}

.complaint-submit-btn:hover { opacity: 0.9; }

/* Legacy pill buttons (kept for backwards compat) */
.category-buttons-container {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.category-btn {
  border: 1px solid var(--tb-border);
  border-radius: 999px;
  background: #fff;
  padding: 5px 11px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.category-btn:hover {
  background: var(--tb-blue-100);
  border-color: #93c5fd;
}

/* New big category cards */
.category-cards-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.category-card-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  border: 2px solid var(--cat-border, #e2e8f0);
  border-radius: 14px;
  background: var(--cat-bg, #fff);
  padding: 16px 18px;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
  transition: transform 0.13s, box-shadow 0.13s;
}

.category-card-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.cat-card-icon {
  font-size: 28px;
  line-height: 1;
  display: flex;
  align-items: center;
}
.cat-card-icon svg { width: 28px; height: 28px; flex-shrink: 0; }

.cat-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--cat-text, var(--tb-text));
  line-height: 1.25;
}

.cat-card-desc {
  font-size: 12px;
  color: var(--tb-muted);
  line-height: 1.4;
}

.message-footer {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}

.tts-speed-inline {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.tts-speed-inline-btn {
  border: 1px solid var(--tb-border);
  border-radius: 999px;
  background: #f1f5f9;
  font-size: 11px;
  padding: 2px 7px;
  font-family: inherit;
  cursor: pointer;
  color: var(--tb-muted);
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  line-height: 1.4;
}

.tts-speed-inline-btn.active {
  background: var(--tb-blue-900);
  color: #fff;
  border-color: var(--tb-blue-900);
}

.tts-speed-inline-btn:hover:not(.active) {
  background: var(--tb-blue-100);
  border-color: var(--tb-blue-700);
  color: var(--tb-blue-700);
}

.tts-play-btn {
  border: 1px solid var(--tb-border);
  border-radius: 999px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--tb-blue-700);
  cursor: pointer;
  transition: background 0.12s;
  flex-shrink: 0;
}

.tts-play-btn:hover { background: var(--tb-blue-100); }

.tts-play-btn svg {
  width: 13px;
  height: 13px;
  fill: currentColor;
}

.tts-spinner {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #dbeafe;
  border-top-color: var(--tb-blue-700);
  animation: tbSpin 0.9s linear infinite;
}

@keyframes tbSpin { to { transform: rotate(360deg); } }

.typing-indicator {
  display: inline-flex;
  gap: 3px;
  padding: 8px 10px;
}

.typing-indicator span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #94a3b8;
  animation: tbTyping 1.1s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.15s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.3s; }

@keyframes tbTyping {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-2px); }
}

/* ---------- TOKEN MODAL ---------- */
.token-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 150;
}

.token-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,0.5);
}

.token-modal-dialog {
  position: relative;
  z-index: 2;
  width: min(92vw, 500px);
  border-radius: 12px;
  background: #fff;
  border: 1px solid var(--tb-border);
  padding: 16px;
  box-shadow: 0 20px 48px rgba(15,23,42,0.22);
}

.token-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.token-modal-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.token-modal-close {
  border: 0;
  background: transparent;
  color: var(--tb-muted);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
}

.token-modal-body input {
  width: 100%;
  border: 1px solid var(--tb-border);
  border-radius: 8px;
  padding: 9px 11px;
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
}

.token-modal-body input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(147,197,253,0.2);
}

.token-lookup-result {
  margin-top: 8px;
  border: 1px solid var(--tb-border);
  border-radius: 8px;
  padding: 9px;
  max-height: 200px;
  overflow: auto;
  background: #f8fafc;
  font-size: 12px;
}

.token-modal-footer {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.btn {
  border: 1px solid var(--tb-border);
  background: #fff;
  border-radius: 8px;
  padding: 7px 12px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.12s;
}

.btn:hover { background: #f1f5f9; }

.btn.btn-primary {
  border-color: var(--tb-blue-700);
  background: var(--tb-blue-700);
  color: #fff;
}

.btn.btn-primary:hover {
  background: var(--tb-blue-900);
}

/* ---------- VOICE MODAL ---------- */
.recording-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(15,23,42,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
}

.recording-modal-content {
  width: min(90vw, 380px);
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 20px 48px rgba(15,23,42,0.25);
}

.mic-animation-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 12px;
  background: var(--tb-red);
  display: grid;
  place-items: center;
  box-shadow: 0 0 0 8px rgba(239,68,68,0.12), 0 0 0 16px rgba(239,68,68,0.06);
  animation: tbPulse 1.4s ease infinite;
}

.recording-modal-content p {
  margin: 0;
  font-size: 13px;
  color: var(--tb-muted);
}

.modal-stop-btn {
  margin-top: 14px;
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: var(--tb-red);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 12px;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
}

.modal-stop-btn:hover { opacity: 0.9; }

/* ---------- AUTH PAGES ---------- */
.tb-auth-main {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* ---------- CUSTOMER INFO SECTIONS ---------- */
.tb-content > .desco-wrapper,
.tb-content > .dpdc-wrapper,
.tb-content > .dashboard-container {
  width: 100%;
}

/* ---------- RESPONSIVE ---------- */

/* ── Wide tablet / small desktop ── */
@media (max-width: 1200px) {
  .tb-customer-summary-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Tablet ── */
@media (max-width: 980px) {
  .tb-services-row { grid-template-columns: 1fr 1fr; }
  .tb-customer-summary-grid { grid-template-columns: 1fr 1fr; }

  .tb-dash-top {
    grid-template-columns: 1fr;
  }

  .tb-dash-hero {
    min-height: 150px;
    padding: 20px 22px;
  }

  .tb-hero-title { font-size: 24px; }

  .tb-stat-value { font-size: 26px; }

  .tb-service-item {
    padding: 20px 18px;
  }
  .tb-service-icon { width: 52px; height: 52px; }
  .tb-service-icon svg { width: 24px; height: 24px; }

  /* Chat / agent cards go full-bleed */
  .tb-chat-page,
  .tb-agent-layout {
    grid-template-columns: 1fr;
    max-width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  .tb-chat-page.tb-chat-no-sidebar {
    max-width: 100%;
  }

  .tb-content {
    background-image: none;
  }

  .tb-content:has(.tb-chat-page),
  .tb-content:has(.tb-agent-layout) {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .tb-chat-left,
  .tb-agent-left { display: none; }

  .tb-agent-mobile-tabs { display: grid; }

  .tb-agent-contact-right-content { padding: 12px 14px 20px; }

  .tb-chat-top-bar { padding: 8px 10px; }
}

/* ── Mobile: sidebar becomes a hidden overlay drawer ── */
@media (max-width: 768px) {
  /* Sidebar slides off-screen by default */
  .tb-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    height: 100dvh;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    width: 260px !important;
    min-width: 260px !important;
    box-shadow: none;
  }

  /* Open state toggled via JS */
  .tb-sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.2);
  }

  /* Collapsed class has no effect on mobile — full width always */
  .tb-sidebar.collapsed {
    width: 260px !important;
    min-width: 260px !important;
  }
  .tb-sidebar.collapsed .tb-brand-logo-wrap {
    display: flex !important;
  }
  .tb-sidebar.collapsed .tb-brand-icon,
  .tb-sidebar.collapsed .tb-brand-text,
  .tb-sidebar.collapsed .tb-side-section,
  .tb-sidebar.collapsed .tb-side-bottom {
    display: flex !important;
  }
  .tb-sidebar.collapsed .tb-side-section,
  .tb-sidebar.collapsed .tb-side-bottom {
    display: block !important;
  }
  .tb-sidebar.collapsed .tb-sidebar-brand {
    justify-content: center;
    padding: 20px 14px 16px;
  }
  .tb-sidebar.collapsed .tb-sidebar-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    margin-left: 0;
  }

  /* Hide desktop sidebar toggle on mobile */
  .tb-sidebar-toggle { display: none; }

  /* Sidebar nav links — larger touch targets */
  .tb-side-link {
    padding: 10px 12px;
    font-size: 15px;
    border-radius: 10px;
  }

  /* Scrim behind open drawer */
  .tb-sidebar-scrim {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 199;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
  }
  .tb-sidebar-scrim.active { display: block; }

  /* Mobile top bar — always visible above content */
  .tb-mobile-topbar {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: linear-gradient(135deg, var(--tb-blue-900), var(--tb-blue-800));
    flex-shrink: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }

  .tb-mobile-topbar .tb-mobile-menu-btn {
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    color: #fff;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
  }

  .tb-mobile-topbar .tb-mobile-menu-btn:active {
    background: rgba(255,255,255,0.25);
  }

  .tb-mobile-topbar .tb-mobile-brand {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    flex: 1;
  }

  .tb-mobile-brand-img {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }

  /* Main area stacks vertically: topbar + content */
  .tb-main {
    flex-direction: column;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  /* Layout takes full viewport */
  .tb-layout {
    flex-direction: column;
  }

  /* Content scrolls independently */
  .tb-content {
    padding: 14px 12px;
    background-image: none;
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  /* ── Dashboard ── */
  .tb-dashboard { gap: 16px; }

  .tb-dash-top {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Hero: stack text + button vertically, voice centered */
  .tb-dash-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 18px;
    padding: 20px 16px;
    min-height: unset;
    border-radius: 12px;
  }

  .tb-hero-title { font-size: 22px; }
  .tb-hero-kicker { font-size: 13px; }
  .tb-hero-subtitle { font-size: 13px; }

  .tb-hero-voice {
    align-self: center;
    width: 86px;
    height: 86px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
  }

  .tb-hero-voice svg { width: 38px; height: 38px; }
  .tb-hero-voice span { font-size: 8.5px; }

  /* Stats vertical column on mobile */
  .tb-dash-stats {
    flex-direction: column;
    gap: 10px;
  }

  .tb-dash-stat-card {
    min-width: 0;
    width: 100%;
    padding: 14px 16px;
  }

  .tb-stat-icon { width: 38px; height: 38px; border-radius: 8px; }
  .tb-stat-icon svg { width: 18px; height: 18px; }
  .tb-stat-value { font-size: 24px; }
  .tb-stat-label { font-size: 12px; }

  /* Services: 1 col, compact cards */
  .tb-services-row { grid-template-columns: 1fr; gap: 10px; }

  .tb-service-item {
    padding: 16px 14px;
    gap: 12px;
    border-radius: 10px;
  }
  .tb-service-icon { width: 48px; height: 48px; border-radius: 10px; }
  .tb-service-icon svg { width: 22px; height: 22px; }
  .tb-service-item h4 { font-size: 15px; }
  .tb-service-item p { font-size: 12px; }

  /* Section title */
  .tb-section-title { font-size: 14px; }

  /* Customer grid two columns */
  .tb-customer-summary-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .tb-customer-card { padding: 10px 11px; }
  .tb-customer-label { font-size: 9px; }
  .tb-customer-value { font-size: 14px; }

  /* Table: horizontal scroll */
  .tb-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tb-dashboard-table { min-width: 520px; }
  .tb-table-heading { flex-wrap: wrap; }

  /* ── Chat & Agent: full-bleed on mobile ── */
  .tb-chat-page,
  .tb-agent-layout {
    height: 100%;
    max-width: 100%;
    border-radius: 0;
    border: none;
    box-shadow: none;
    margin: 0;
    grid-template-columns: 1fr;
  }

  .tb-chat-page.tb-chat-no-sidebar {
    max-width: 100%;
  }

  .tb-content:has(.tb-chat-page),
  .tb-content:has(.tb-agent-layout) {
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }

  /* Hide agent left panel on mobile */
  .tb-agent-left { display: none; }

  /* Toolbar: stack vertically on mobile */
  .tb-chat-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 8px 10px;
  }

  .tb-chat-toolbar-info {
    gap: 8px;
  }

  .tb-chat-toolbar-logo {
    width: 28px;
  }

  .tb-chat-toolbar-title {
    font-size: 13px;
    line-height: 1.3;
  }

  .tb-chat-toolbar-subtitle { display: none; }

  .tb-chat-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }

  .tb-toolbar-btn,
  .chat-reset-btn {
    font-size: 11px;
    padding: 6px 10px;
    flex: 1;
    min-width: 0;
    text-align: center;
  }

  /* Top bar: tabs full width, chips scroll */
  .tb-chat-top-bar {
    padding: 6px 8px;
    gap: 6px;
  }

  .tb-chat-top-tabs {
    max-width: 100%;
  }

  .tb-top-tab {
    font-size: 13px;
    padding: 8px 0;
  }

  .tb-chat-quick-topics {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: flex-start;
    max-width: 100%;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tb-chat-quick-topics::-webkit-scrollbar { display: none; }

  .tb-quick-chip {
    font-size: 11px;
    padding: 5px 10px;
  }

  /* Messages: wider bubbles on mobile */
  .message {
    max-width: 88%;
  }

  .message-content {
    font-size: 15px;
    padding: 10px 13px;
    border-radius: 12px;
  }

  .bot-message .message-content {
    border-radius: 12px 12px 12px 3px;
  }

  .user-message .message-content {
    border-radius: 12px 12px 3px 12px;
  }

  /* Markdown in messages */
  .message .markdown table {
    font-size: 12px;
  }

  .message .markdown thead th {
    padding: 6px 8px;
    font-size: 11px;
  }

  .message .markdown tbody td {
    padding: 5px 8px;
  }

  /* Input area — safe-area for bottom notch/gesture bar */
  .chat-input-container {
    padding: 8px 10px;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }

  .chat-input input,
  .chat-input textarea {
    font-size: 16px;
    padding: 9px 10px;
  }

  .chat-input textarea {
    max-height: 120px;
  }

  .chat-icon-btn {
    width: 36px;
    height: 36px;
  }

  #sendBtn,
  #complaintSendBtn {
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 8px;
  }

  /* Sample query grid: 2 cols on mobile */
  .tb-sample-grid { grid-template-columns: 1fr 1fr !important; }

  .tb-sample-btn {
    padding: 10px 12px;
    font-size: 13px;
    gap: 8px;
  }

  .tb-sample-icon svg { width: 18px; height: 18px; }

  /* Empty state adjustments */
  #panelGeneral.chat-panel:not(.has-messages) .chat-messages {
    padding: 0 14px 12px;
  }

  #panelGeneral.chat-panel:not(.has-messages) .chat-input-container {
    padding: 0 14px;
  }

  #panelGeneral.chat-panel:not(.has-messages) .chat-input input,
  #panelGeneral.chat-panel:not(.has-messages) .chat-input textarea {
    font-size: 16px;
  }

  /* Token modal on mobile */
  .token-modal-dialog {
    width: min(95vw, 500px);
    padding: 14px;
  }

  .token-modal-header h3 {
    font-size: 13px;
  }

  /* Recording modal on mobile */
  .recording-modal-content {
    width: min(92vw, 340px);
    padding: 20px;
  }

  .mic-animation-circle {
    width: 68px;
    height: 68px;
  }

  /* Contact page */
  .tb-contact-page { padding: 16px 12px; }
  .tb-contact-header h1 { font-size: 18px; }
  .tb-contact-cols { gap: 12px; }
  .tb-contact-col { padding: 16px 14px; }

  /* ── Customer Info: DESCO / DPDC / REB ── */

  /* Content wrapper — remove excess padding */
  .tb-content:has(.desco-wrapper),
  .tb-content:has(.dpdc-wrapper),
  .tb-content:has(.dashboard-container) {
    padding: 10px 8px;
  }

  /* Lookup cards — narrower padding, stack input */
  .desco-lookup-card,
  .dpdc-lookup-card {
    padding: 28px 16px 24px;
    margin-top: 20px;
    max-width: 100%;
    border-radius: 12px;
  }

  .desco-input-row,
  .dpdc-input-row {
    flex-direction: column;
    gap: 10px;
  }

  .desco-fetch-btn,
  .dpdc-fetch-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
  }

  .desco-lookup-title,
  .dpdc-lookup-title {
    font-size: 1.05rem;
  }

  /* Dashboard headers — stack title + buttons vertically */
  .desco-dash-title-row,
  .dpdc-dash-title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .desco-dash-header,
  .dpdc-dash-header {
    padding: 14px 14px;
    border-radius: 10px;
  }

  .desco-dash-name,
  .dpdc-dash-name {
    font-size: 1.05rem;
  }

  .desco-back-btn,
  .dpdc-load-all-btn {
    font-size: 0.8rem;
    padding: 7px 12px;
  }

  /* Stat cards — 2 columns */
  .desco-summary-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .dpdc-stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .desco-stat-value,
  .dpdc-stat-value {
    font-size: 1.1rem;
  }

  .desco-stat-label,
  .dpdc-stat-label {
    font-size: 0.7rem;
  }

  .desco-stat-card,
  .dpdc-stat-card {
    padding: 12px 14px;
  }

  /* Charts — single column, shorter */
  .desco-charts-row {
    grid-template-columns: 1fr;
  }

  .desco-chart-card {
    padding: 14px;
  }

  .desco-chart-container {
    height: 200px;
  }

  .desco-chart-tall {
    height: 180px;
  }

  .desco-chart-title {
    font-size: 0.88rem;
  }

  .desco-chart-subtitle {
    font-size: 0.75rem;
  }

  /* Tables — single column, scroll */
  .desco-tables-row {
    grid-template-columns: 1fr;
  }

  /* Bill breakdown — stack to single column on mobile */
  .desco-bill-split {
    grid-template-columns: 1fr !important;
  }

  .desco-table-card {
    padding: 14px;
  }

  .desco-table th {
    font-size: 0.72rem;
    padding: 8px 10px;
  }

  .desco-table td {
    font-size: 0.82rem;
    padding: 8px 10px;
  }

  .desco-section-label {
    font-size: 0.68rem;
    margin: 16px 0 8px 2px;
  }

  /* DPDC charts reuse desco classes — already handled above */

  /* REB dashboard */
  .dashboard-container {
    padding: 0;
  }

  .dashboard-card {
    padding: 16px 12px;
    border-radius: 10px;
    box-shadow: none;
    border: 1px solid #e2e8f0;
  }

  .summary-cards {
    flex-direction: column;
    gap: 8px;
  }

  .summary-card {
    width: 100%;
    padding: 12px 14px;
  }

  .chart-box {
    padding: 12px;
    border-radius: 8px;
  }

  .chart-box canvas {
    height: 180px !important;
  }

  .meter-section h2 {
    font-size: 0.85rem;
  }

  .meter-dropdown {
    font-size: 0.85rem;
    padding: 10px 12px;
  }

  /* Loading overlays */
  .desco-loading-box,
  .dpdc-loading-box {
    padding: 22px 28px;
  }
}

/* ── Very small phones ── */
@media (max-width: 420px) {
  .tb-content { padding: 10px 8px; }

  .tb-customer-summary-grid { grid-template-columns: 1fr; }

  .tb-hero-title { font-size: 19px; }
  .tb-hero-subtitle { font-size: 12px; }

  .tb-hero-voice { width: 72px; height: 72px; }
  .tb-hero-voice svg { width: 30px; height: 30px; }
  .tb-hero-voice span { font-size: 7.5px; }

  .tb-dash-stat-card { padding: 12px 14px; }
  .tb-stat-value { font-size: 22px; }

  .tb-service-item { padding: 14px 12px; }
  .tb-service-icon { width: 42px; height: 42px; }
  .tb-service-icon svg { width: 20px; height: 20px; }
  .tb-service-item h4 { font-size: 14px; }

  /* Chat on very small phones */
  .tb-chat-toolbar-title { font-size: 12px; }
  .tb-toolbar-btn { display: none; }

  .chat-reset-btn {
    font-size: 10px;
    padding: 5px 8px;
  }

  .message {
    max-width: 92%;
  }

  .message-content {
    font-size: 14px;
    padding: 9px 11px;
  }

  .chat-input input,
  .chat-input textarea {
    font-size: 16px;
    padding: 8px 9px;
  }

  .chat-input-container {
    padding: 6px 8px;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
  }

  #sendBtn,
  #complaintSendBtn {
    font-size: 12px;
    padding: 7px 10px;
  }

  .tb-top-tab {
    font-size: 12px;
    padding: 7px 0;
  }

  .tb-mobile-topbar {
    padding: 8px 10px;
  }

  .tb-sample-grid { grid-template-columns: 1fr !important; }

  .tb-sample-btn {
    padding: 8px 10px;
    font-size: 12px;
  }

  .tb-contact-page { padding: 12px 8px; }
  .tb-contact-col { padding: 14px 10px; }
  .tb-contact-phone { font-size: 17px; }

  /* ── Customer Info: small phone ── */
  .tb-content:has(.desco-wrapper),
  .tb-content:has(.dpdc-wrapper),
  .tb-content:has(.dashboard-container) {
    padding: 8px 6px;
  }

  .desco-lookup-card,
  .dpdc-lookup-card {
    padding: 22px 12px 20px;
    margin-top: 12px;
  }

  .desco-lookup-title,
  .dpdc-lookup-title {
    font-size: 0.95rem;
  }

  .desco-lookup-subtitle,
  .dpdc-lookup-subtitle {
    font-size: 0.8rem;
  }

  .desco-dash-header,
  .dpdc-dash-header {
    padding: 12px 10px;
  }

  .desco-dash-name,
  .dpdc-dash-name {
    font-size: 0.95rem;
  }

  .desco-back-btn {
    font-size: 0.75rem;
    padding: 6px 10px;
  }

  .desco-summary-cards,
  .dpdc-stat-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .desco-stat-value,
  .dpdc-stat-value {
    font-size: 1rem;
  }

  .desco-chart-container {
    height: 170px;
  }

  .desco-chart-tall {
    height: 160px;
  }

  .desco-table th {
    font-size: 0.68rem;
    padding: 6px 8px;
  }

  .desco-table td {
    font-size: 0.78rem;
    padding: 6px 8px;
  }

  /* REB small phone */
  .dashboard-card {
    padding: 12px 8px;
  }

  .summary-card {
    padding: 10px 12px;
  }

  .summary-card h4 {
    font-size: 0.68rem;
  }

  .summary-card p {
    font-size: 0.95rem;
  }

  .chart-box canvas {
    height: 160px !important;
  }
}
