/* BabiHub Master SaaS Web Panel - Pure Light Theme Stylesheet */
:root {
  --bg-body: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #ffffff;
  --border-color: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-focus: #0284c7;
  --primary: #0284c7;
  --primary-hover: #0369a1;
  --primary-light: #e0f2fe;
  --accent: #7c3aed;
  --accent-light: #ede9fe;
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 14px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.08);
  --font: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --sidebar-w: 260px;
  --sidebar-collapsed-w: 74px;
  --header-h: 68px;
  color-scheme: light !important;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font) !important;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  direction: rtl;
  min-height: 100vh;
  font-size: 13px;
  line-height: 1.5;
  overflow-x: hidden;
}

/* AUTH / LOGIN SCREEN */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: radial-gradient(circle at 10% 20%, #e0f2fe 0%, #f8fafc 55%),
              radial-gradient(circle at 90% 80%, #ede9fe 0%, #f8fafc 55%);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 36px 32px;
  box-shadow: var(--shadow-lg);
  animation: authFadeIn 0.25s ease-out;
}

@keyframes authFadeIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-brand, .auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-brand img, .auth-logo, .auth-logo-box img {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(2, 132, 199, 0.18);
  margin-bottom: 12px;
  object-fit: cover;
  display: inline-block;
}

.auth-logo-box {
  display: flex;
  justify-content: center;
  align-items: center;
}

.auth-brand h1, .auth-title {
  font-size: 20px;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 4px;
}

.auth-brand p, .auth-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input {
  width: 100%;
  height: 44px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0 40px 0 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-main);
  direction: ltr;
  text-align: left;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.input-icon-left {
  position: absolute;
  right: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.input-icon-right {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
}

.btn-primary {
  width: 100%;
  height: 46px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 11.5px;
  color: var(--text-dim);
}

/* APP MAIN LAYOUT */
.app-container {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  z-index: 100;
  transition: width 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s ease;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-w);
}

.sidebar.collapsed .sidebar-title-wrap,
.sidebar.collapsed .menu-item .title,
.sidebar.collapsed .menu-item .badge-counter,
.sidebar.collapsed .admin-meta,
.sidebar.collapsed .nav-category-header {
  display: none !important;
}

.sidebar.collapsed .sidebar-brand {
  justify-content: center;
  padding: 16px 0;
}

.sidebar.collapsed .menu-item {
  justify-content: center;
  padding: 12px 0;
}

.sidebar.collapsed .sidebar-footer {
  justify-content: center;
  padding: 12px 0;
}

.sidebar-brand {
  height: var(--header-h);
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.brand-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-info img {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.2);
}

.brand-text h2 {
  font-size: 14.5px;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.2;
}

.brand-text span {
  font-size: 10.5px;
  color: var(--primary);
  font-weight: 700;
}

.sidebar-menu {
  flex: 1;
  overflow-y: auto;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-category-header {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 10px 14px 4px 14px;
  letter-spacing: 0.5px;
}

.menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.menu-item-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.menu-item .icon {
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
}

.menu-item:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
}

.menu-item.active {
  background: var(--primary) !important;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

.badge-counter {
  font-size: 10px;
  font-weight: 900;
  padding: 1px 7px;
  border-radius: 10px;
  background: var(--danger-light);
  color: #b91c1c;
}

.menu-item.active .badge-counter {
  background: #ffffff;
  color: var(--primary);
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fafbfc;
}

.admin-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
}

.admin-meta {
  display: flex;
  flex-direction: column;
}

.admin-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-main);
}

.admin-role {
  font-size: 10.5px;
  color: var(--text-muted);
}

.btn-icon-logout {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  transition: background 0.15s ease;
}

.btn-icon-logout:hover {
  background: var(--danger-light);
}

/* MAIN CONTENT */
.main-content {
  flex: 1;
  margin-right: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-right 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.main-content.expanded {
  margin-right: var(--sidebar-collapsed-w);
}

.topbar {
  height: var(--header-h);
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.toggle-sidebar-btn {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 6px 9px;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.toggle-sidebar-btn:hover {
  background: var(--bg-card-hover);
}

.page-title {
  font-size: 15.5px;
  font-weight: 900;
  color: var(--text-main);
}

.telemetry-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chip-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
}

.chip-status.online {
  background: var(--success-light);
  border-color: #a7f3d0;
  color: #065f46;
}

.dot-pulse {
  width: 7px;
  height: 7px;
  background: var(--success);
  border-radius: 50%;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-header-action {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text-main);
  transition: all 0.15s ease;
}

.btn-header-action:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  color: var(--primary);
}

.content-container {
  flex: 1;
  padding: 24px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

/* TAB PANES */
.tab-content {
  display: none;
  animation: tabFadeIn 0.2s ease-out;
}

.tab-content.active {
  display: block;
}

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

/* CARDS & KPI */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.card-header h3 {
  font-size: 14.5px;
  font-weight: 900;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.kpi-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kpi-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  background: var(--primary-light);
  color: var(--primary);
}

.kpi-icon.green { background: var(--success-light); color: var(--success); }
.kpi-icon.purple { background: var(--accent-light); color: var(--accent); }
.kpi-icon.amber { background: var(--warning-light); color: var(--warning); }
.kpi-icon.rose { background: var(--danger-light); color: var(--danger); }

.kpi-info {
  display: flex;
  flex-direction: column;
}

.kpi-num {
  font-size: 20px;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.2;
}

.kpi-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 3px;
}

/* CHARTS GRID */
.charts-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.chart-wrapper {
  position: relative;
  height: 270px;
  width: 100%;
}

/* TABLES */
.table-responsive {
  overflow-x: auto;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.table-custom {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  text-align: right;
  margin-bottom: 0;
}

.table-custom thead tr {
  background: #f1f5f9;
  border-bottom: 1.5px solid var(--border-strong);
}

.table-custom th {
  padding: 12px 14px;
  font-weight: 800;
  color: var(--text-secondary);
  white-space: nowrap;
}

.table-custom td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
}

.table-custom tbody tr:hover {
  background: #f8fafc;
}

/* CONTROLS & BUTTONS */
.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.input-custom {
  height: 38px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  transition: all 0.15s ease;
}

.input-custom:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.select-custom {
  height: 38px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
}

.btn-custom {
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  transition: all 0.15s ease;
}

.btn-custom.btn-blue { background: var(--primary); color: #ffffff; }
.btn-custom.btn-blue:hover { background: var(--primary-hover); }

.btn-custom.btn-gray { background: #e2e8f0; color: var(--text-secondary); }
.btn-custom.btn-gray:hover { background: #cbd5e1; }

.btn-custom.btn-outline { background: var(--bg-card); border: 1px solid var(--border-strong); color: var(--text-main); }
.btn-custom.btn-outline:hover { background: var(--bg-card-hover); border-color: var(--primary); color: var(--primary); }

.btn-custom.btn-red { background: var(--danger); color: #ffffff; }
.btn-custom.btn-green { background: var(--success); color: #ffffff; }

/* BADGES */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 20px;
}

.status-pill.active { background: var(--success-light); color: #065f46; }
.status-pill.pending { background: var(--warning-light); color: #92400e; }
.status-pill.danger { background: var(--danger-light); color: #991b1b; }
.status-pill.info { background: var(--primary-light); color: #0369a1; }
.status-pill.purple { background: var(--accent-light); color: var(--accent); }

/* MODALS */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
}

.modal-backdrop.hidden {
  display: none !important;
}

.modal-window {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalScale 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-head {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.modal-head h3 {
  font-size: 16px;
  font-weight: 900;
  color: var(--text-main);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: #f1f5f9;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
}

.modal-close:hover {
  background: var(--danger-light);
  color: var(--danger);
}

.modal-content {
  padding: 22px;
}

.modal-foot {
  padding: 16px 22px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* Modal Sub-tabs */
.modal-tabs {
  display: flex;
  gap: 6px;
  border-bottom: 1.5px solid var(--border-color);
  margin-bottom: 18px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.modal-tab-btn {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  cursor: pointer;
  white-space: nowrap;
}

.modal-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 900;
}

/* TOAST */
.toast-box {
  position: fixed;
  bottom: 24px;
  left: 24px;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
  transform: translateY(100px);
  opacity: 0;
}

.toast-box.show {
  transform: translateY(0);
  opacity: 1;
}

/* RESPONSIVE */
@media (max-width: 1200px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .charts-row { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(260px);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: -4px 0 25px rgba(0, 0, 0, 0.15);
  }
  .main-content {
    margin-right: 0 !important;
  }
}

@media (max-width: 600px) {
  .kpi-row { grid-template-columns: 1fr; }
  .telemetry-badges { display: none; }
  .content-container { padding: 14px; }
}

/* ================= ADVANCED SAAS PARITY STYLES ================= */
.pill-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}

.pill-filter-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pill-filter-btn:hover {
  background: var(--bg-hover);
  color: var(--text-main);
  border-color: var(--primary);
}

.pill-filter-btn.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25);
}

.perms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.perm-checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  color: var(--text-main);
  transition: border-color 0.15s ease;
}

.perm-checkbox-item:hover {
  border-color: var(--primary);
}

.perm-checkbox-item input[type="checkbox"] {
  accent-color: var(--primary);
  width: 15px;
  height: 15px;
}

.switch-category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.switch-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 14px;
}

.switch-category-title {
  font-size: 14px;
  font-weight: 900;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.switch-category-controls {
  display: flex;
  gap: 10px;
  align-items: center;
}

.switch-subgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 10px;
}

.switch-subitem {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 12px;
  margin-bottom: 10px;
  font-size: 12.5px;
  line-height: 1.6;
  position: relative;
  word-break: break-word;
}

.chat-bubble.admin {
  background: #0284c7;
  color: #ffffff;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}

.chat-bubble.user {
  background: #f1f5f9;
  color: #0f172a;
  align-self: flex-end;
  border: 1px solid var(--border-color);
  border-bottom-right-radius: 2px;
}

.chat-bubble-time {
  font-size: 10px;
  opacity: 0.75;
  margin-top: 4px;
  text-align: left;
}

.timeline-feed {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 480px;
  overflow-y: auto;
  padding: 4px;
}

.timeline-event {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-right: 3px solid var(--primary);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
}

.timeline-event.billing { border-right-color: #f59e0b; }
.timeline-event.direct { border-right-color: #10b981; }
.timeline-event.broadcast { border-right-color: #8b5cf6; }

.timeline-event-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
