:root {
  --bg: #050f0a;
  --panel: rgba(8,26,16, 0.94);
  --panel-2: rgba(13,38,24, 0.94);
  --line: rgba(255,255,255,0.08);
  --text: #eef7f0;
  --muted: #a7c2ae;
  --accent: #1e7a46;
  --accent-2: #4caf63;
  --accent-3: #c6e463;
  --success: #18c37e;
  --warning: #f3b544;
  --danger: #ff6276;
  --shadow: 0 18px 50px rgba(0,0,0,0.32);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(30,122,70,0.16), transparent 26%),
    linear-gradient(135deg, #030906 0%, #061c10 45%, #0a2b18 100%);
  color: var(--text);
  height: 100vh;
  overflow: hidden;
}

.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  width: 310px;
  background: linear-gradient(180deg, rgba(3,10,7,0.98), rgba(5,20,13,0.98));
  border-right: 1px solid var(--line);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
}

.sidebar-toggle-btn {
  display: none;
}

.sidebar-overlay {
  display: none;
}

@media (max-width: 900px) {
  .sidebar-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 14px;
    left: 14px;
    width: 40px;
    height: 40px;
    z-index: 210;
    background: var(--panel-2);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
  }

  .sidebar.sidebar-open {
    transform: translateX(0);
  }

  .sidebar-overlay.sidebar-open {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 190;
  }
}

.brand {
  padding: 4px 6px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 20px;
}

.brand-logo-img {
  width: 100%;
  max-width: 250px;
  display: block;
  margin: 0 auto 18px;
}

/* Text-based brand mark standing in for a logo image (see TODO in admin.html) */
.brand-mark-text {
  width: 100%;
  text-align: center;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.3px;
  color: #ffffff;
  margin: 0 auto 18px;
}

.brand-subtitle {
  color: var(--accent-3);
  font-size: 14px;
  font-weight: 700;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nav-btn {
  border: 1px solid transparent;
  background: rgba(255,255,255,0.04);
  color: var(--text);
  padding: 16px 18px;
  border-radius: 18px;
  cursor: pointer;
  text-align: left;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-btn:hover,
.nav-btn.active {
  background: linear-gradient(135deg, rgba(30,122,70,0.18), rgba(76,175,99,0.08));
  border-color: rgba(76,175,99,0.28);
}

.nav-icon {
  width: 28px;
  color: var(--accent-3);
}

.sidebar-footer {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.status-dot {
  width: 10px;
  height: 10px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 7px rgba(24,195,126,0.10);
}

.main-content {
  flex: 1;
  padding: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-shrink: 0;
}

.topbar.agent-mode {
  display: none;
}

.topbar h1 {
  margin: 0 0 8px;
  font-size: 44px;
  line-height: 1;
  font-weight: 900;
}

.topbar p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.refresh-btn,
.range-btn,
.ghost-btn,
.primary-btn,
.danger-btn {
  border: none;
  cursor: pointer;
  transition: 0.2s ease;
}

.refresh-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  padding: 14px 22px;
  border-radius: 18px;
  font-weight: 800;
  font-size: 16px;
}

.topbar-actions .refresh-btn {
  padding: 10px 16px;
  border-radius: 14px;
  font-size: 14px;
  min-width: 118px;
}

.section {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.section.hidden {
  display: none !important;
}

#dashboard {
  overflow-y: auto;
  padding-right: 6px;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.range-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.range-btn,
.ghost-btn {
  background: rgba(255,255,255,0.04);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 18px;
  font-weight: 700;
  font-size: 14px;
}

.range-btn.active,
.ghost-btn.active-filter {
  background: linear-gradient(135deg, rgba(30,122,70,0.22), rgba(76,175,99,0.10));
  border-color: rgba(76,175,99,0.38);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.report-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}

.report-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.report-card-title {
  font-weight: 700;
  font-size: 15px;
}

.report-card-total {
  font-weight: 700;
  color: var(--accent-2);
}

.report-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 14px;
}

.report-row:last-child {
  border-bottom: none;
}

.report-row-duration {
  color: var(--muted);
}

.weekly-overview-grid {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 16px;
}

.chart-box {
  background: var(--panel-2);
  border-radius: 16px;
  padding: 16px;
  height: 260px;
  position: relative;
}

.chart-box-donut {
  display: flex;
  flex-direction: column;
}

.donut-canvas-wrap {
  position: relative;
  height: 160px;
  flex-shrink: 0;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text);
  flex-shrink: 0;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}

@media (max-width: 768px) {
  .weekly-overview-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card,
.panel,
.wa-chat-list,
.wa-chat-window {
  background: linear-gradient(180deg, rgba(8,26,17,0.94), rgba(6,22,15,0.94));
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.stat-card {
  padding: 20px;
}

.stat-card .label {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 10px;
}

.stat-card .value {
  font-size: 34px;
  font-weight: 900;
  margin-bottom: 10px;
}

.stat-card .meta {
  color: var(--muted);
  font-size: 13px;
}

.stat-card.performance {
  border-color: rgba(30,122,70,0.28);
  background: linear-gradient(
    180deg,
    rgba(10,58,34,0.95),
    rgba(6,38,22,0.95)
  );
}

.stat-card.danger {
  border-color: rgba(255,98,118,0.35);
  background: linear-gradient(180deg, rgba(92,28,40,0.92), rgba(58,20,30,0.92));
}

.stat-card.warning {
  border-color: rgba(243,181,68,0.35);
  background: linear-gradient(180deg, rgba(92,62,16,0.92), rgba(62,43,13,0.92));
}

.stat-card.live {
  border-color: rgba(24,195,126,0.28);
  background: linear-gradient(
    180deg,
    rgba(10,74,54,0.95),
    rgba(7,52,38,0.95)
  );
}

#callbackStats .stat-card:nth-child(1),
#callbackStats .stat-card:nth-child(2),
#callbackStats .stat-card:nth-child(3) {
  border-color: rgba(30,122,70,0.28);
  background: linear-gradient(180deg, rgba(10,58,34,0.95), rgba(6,38,22,0.95));
}

#callbackStats .stat-card:nth-child(4) {
  border-color: rgba(255,98,118,0.35);
  background: linear-gradient(180deg, rgba(92,28,40,0.92), rgba(58,20,30,0.92));
}

#callbackStats .stat-card:nth-child(5) {
  border-color: rgba(30,122,70,0.35);
  background: linear-gradient(180deg, rgba(14,72,42,0.95), rgba(7,42,26,0.95));
}

#callbackStats .stat-card:nth-child(6) {
  border-color: rgba(243,181,68,0.35);
  background: linear-gradient(180deg, rgba(92,62,16,0.92), rgba(62,43,13,0.92));
}

#callbackStats .stat-card:nth-child(7) {
  border-color: rgba(243,181,68,0.35);
  background: linear-gradient(180deg, rgba(92,62,16,0.92), rgba(62,43,13,0.92));
}

#callbackStats .stat-card:nth-child(8) {
  border-color: rgba(24,195,126,0.35);
  background: linear-gradient(180deg, rgba(10,74,54,0.95), rgba(7,52,38,0.95));
}

.response-performance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.insights-card {
  margin-top: 22px;
  margin-bottom: 28px;
  padding: 22px;
}

.insights-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
}

.insight-section-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 900;
  color: var(--text);
}

.insight-stat-card {
  padding: 16px;
  min-height: 130px;
}

.insight-stat-card .value {
  font-size: 30px;
  margin-bottom: 8px;
}

.insight-stat-card .meta {
  font-size: 12px;
}

@media (max-width: 768px) {
  .response-performance-grid,
  .insights-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-wrap: wrap;
    gap: 12px;
  }

  .topbar h1 {
    font-size: 28px;
  }

  .topbar p {
    font-size: 14px;
  }
}

@media (max-width: 900px) {
  .main-content {
    padding-top: 66px;
  }
}

.funnel-menu-card {
  min-width: 260px;
  padding: 14px;
  border-radius: 12px;
  background: #0e2417;
  border: 1px solid rgba(255,255,255,.1);
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,.35);
}

.funnel-menu-item {
  width: 100%;
  background: transparent;
  border: none;
  color: #ffffff;
  text-align: left;
  font-size: 15px;
  cursor: pointer;
  padding: 8px 6px;
  border-radius: 8px;
}

.funnel-menu-item:hover {
  background: rgba(255,255,255,0.08);
}

.funnel-menu-item:disabled {
  opacity: 0.6;
  cursor: default;
}

.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
  margin-bottom: 20px;
}

.panel {
  padding: 22px;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.panel-header h3 {
  margin: 0 0 6px;
  font-size: 21px;
  font-weight: 800;
}

.panel-header p {
  margin: 0;
  color: var(--muted);
}

.program-bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.program-row {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
}

.program-row-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.program-name {
  font-weight: 800;
}

.program-count {
  color: var(--accent-3);
  font-weight: 900;
}

.bar-track {
  width: 100%;
  height: 12px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.mini-stats {
  display: grid;
  gap: 14px;
}

.mini-stat {
  border-radius: 18px;
  padding: 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
}

.mini-stat h4 {
  margin: 0 0 8px;
  color: var(--muted);
}

.mini-value {
  font-size: 28px;
  font-weight: 900;
}

.table-wrap {
  overflow-x: auto;
}

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

.styled-table th,
.styled-table td {
  padding: 15px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  text-align: left;
  white-space: nowrap;
}

.styled-table th {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.status-chip {
  display: inline-flex;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
}

.status-agent_waiting {
  background: rgba(243,181,68,0.12);
  color: #ffd27a;
  border: 1px solid rgba(243,181,68,0.25);
}

.status-agent_active {
  background: rgba(30,122,70,0.12);
  color: #c8dd7a;
  border: 1px solid rgba(30,122,70,0.25);
}

.status-active,
.status-bot {
  background: rgba(24,195,126,0.12);
  color: #82efbf;
  border: 1px solid rgba(24,195,126,0.25);
}

/* WHATSAPP STYLE AGENT PANEL */
#agent {
  min-height: 0;
  overflow: hidden;
}

.whatsapp-shell {
  height: calc(100vh - 48px);
  display: grid;
  grid-template-columns: 370px 1fr;
  gap: 14px;
  min-height: 0;
}

.wa-chat-list {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border-radius: 18px;
}

.wa-list-top {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.agent-greeting {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-3);
}

.wa-list-top h3 {
  margin: 0;
  font-size: 22px;
}

.wa-list-top p {
  margin: 4px 0 0;
  color: var(--muted);
}

#agentMiniStats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.015);
}

#agentMiniStats .agent-mini-card {
  padding: 8px 6px;
  border-radius: 12px;
  background: rgba(30,122,70, 0.12);
  border: 1px solid rgba(76,175,99, 0.22);
  text-align: center;
}

#agentMiniStats .agent-mini-card span {
  display: block;
  font-size: 11px;
  color: #9fd9a8;
  margin-bottom: 5px;
  font-weight: 800;
}

#agentMiniStats .agent-mini-card strong {
  display: block;
  font-size: 16px;
  color: #ffffff;
  font-weight: 900;
}

.pill-badge {
  min-width: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(30,122,70,0.18);
  border: 1px solid rgba(76,175,99,0.25);
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.wa-search {
  padding: 12px;
  flex-shrink: 0;
}

.wa-search input {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  color: white;
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
}

.wa-filters {
  display: flex;
  gap: 8px;
  padding: 0 12px 12px;
  flex-shrink: 0;
}

.chat-list {
  padding: 10px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.load-more-chats-btn {
  margin: 4px 12px 12px;
  width: calc(100% - 24px);
  text-align: center;
  flex-shrink: 0;
  cursor: pointer;
}

.load-more-chats-btn.hidden {
  display: none;
}

.chat-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 13px;
  margin-bottom: 10px;
  cursor: pointer;
}

.chat-item:hover,
.chat-item.active-chat {
  background: rgba(255,255,255,0.07);
  border-color: rgba(76,175,99,0.30);
}

.chat-topline {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.chat-name {
  font-weight: 900;
  font-size: 15px;
}

.chat-program {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.chat-preview {
  color: #cfe0d2;
  font-size: 13px;
  line-height: 1.35;
  max-height: 38px;
  overflow: hidden;
}

.unread-badge {
  background: linear-gradient(135deg, #ff6174, #ff8392);
  color: white;
  font-size: 11px;
  font-weight: 900;
  min-width: 25px;
  height: 25px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wa-chat-window {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border-radius: 18px;
}

.wa-chat-header {
  min-height: 74px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.02);
}

.wa-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.wa-chat-header h3 {
  margin: 0 0 4px;
  font-size: 19px;
}

.wa-chat-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.messages {
  flex: 1;
  min-height: 0;
  padding: 18px;
  overflow-y: auto;
  background:
    radial-gradient(circle at center, rgba(255,255,255,0.02), transparent 55%),
    rgba(4,12,8, 0.38);
}

.message-row {
  display: flex;
  margin-bottom: 10px;
}

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

.message-row.agent,
.message-row.bot {
  justify-content: flex-end;
}

.message-bubble {
  max-width: 68%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.message-row.user .message-bubble {
  background: #16281f;
  color: #eef7f0;
  border-top-left-radius: 4px;
}

.message-row.agent .message-bubble,
.message-row.bot .message-bubble {
  background: linear-gradient(135deg, #1e7a46, #4caf63);
  color: white;
  border-top-right-radius: 4px;
}

.message-meta {
  font-size: 10px;
  opacity: 0.75;
  margin-top: 5px;
}

.sent-tick {
  opacity: 0.85;
}

.sent-tick.tick-read {
  color: #34d6ff;
  opacity: 1;
}

.date-divider {
  display: flex;
  justify-content: center;
  margin: 14px 0;
}

.date-divider span {
  background: var(--panel-2);
  color: var(--muted);
  font-size: 11px;
  padding: 4px 14px;
  border-radius: 20px;
}

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

.message-row.message-in {
  animation: messageSlideIn 0.25s ease-out;
}

.composer {
  padding: 12px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 10px;
  background: rgba(255,255,255,0.03);
  flex-shrink: 0;
}

.composer textarea {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  outline: none;
  color: white;
  border-radius: 16px;
  padding: 13px 15px;
  font-size: 15px;
    min-height: 50px;
  max-height: 120px;
  resize: vertical;
  font-family: inherit;
}

.quick-reply-dropdown {
  position: absolute;
  bottom: 100%;
  left: 12px;
  right: 12px;
  margin-bottom: 8px;
  background: linear-gradient(180deg, rgba(8,26,16,0.98), rgba(5,24,15,0.98));
  border: 1px solid rgba(76,175,99,0.22);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.45);
  max-height: 220px;
  overflow-y: auto;
  z-index: 50;
}

.quick-reply-dropdown.hidden {
  display: none;
}

.quick-reply-option {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.quick-reply-option:last-child {
  border-bottom: none;
}

.quick-reply-option:hover,
.quick-reply-option.active-option {
  background: rgba(76,175,99,0.12);
}

.quick-reply-option .qr-shortcut {
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 700;
}

.quick-reply-option .qr-preview {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-replies {
  padding: 10px 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
  flex-shrink: 0;
}

.quick-replies button {
  border: 1px solid rgba(76,175,99,0.28);
  background: rgba(30,122,70,0.14);
  color: #d7f0dc;
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}

.quick-replies button:hover {
  background: rgba(30,122,70,0.26);
  border-color: rgba(76,175,99,0.48);
  transform: translateY(-1px);
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  border-radius: 16px;
  padding: 0 22px;
  font-weight: 900;
  font-size: 15px;
}

.danger-btn {
  background: linear-gradient(135deg, rgba(255,91,110,0.96), rgba(255,123,138,0.96));
  color: white;
  border-radius: 16px;
  padding: 0 18px;
  font-weight: 900;
  font-size: 15px;
}

.empty-chat-state {
  height: 100%;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--muted);
  text-align: center;
}

.empty-chat-icon {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  background: rgba(255,255,255,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 14px;
}

/* =========================
CALLBACK CENTER
========================= */

.callbacks-list{
  display:flex;
  flex-direction:column;
  gap:16px;

  overflow-y:auto;

  max-height:calc(100vh - 260px);

  padding-right:6px;
}

.callback-card{
  background:rgba(255,255,255,0.03);

  border:1px solid var(--line);

  border-radius:22px;

  padding:22px;
}

.callback-card-head{
  display:flex;

  justify-content:space-between;

  align-items:flex-start;

  margin-bottom:18px;
}

.callback-card-head h3{
  margin:0 0 8px;

  font-size:22px;
}

.callback-card-head p{
  margin:0;

  color:var(--muted);
}

.repeat-badge{
  background:
    linear-gradient(
      135deg,
      rgba(243,181,68,.25),
      rgba(255,211,121,.10)
    );

  border:1px solid rgba(243,181,68,.40);

  color:#ffd57d;

  padding:10px 14px;

  border-radius:999px;

  font-size:13px;

  font-weight:900;
}

.callback-meta{
  display:grid;

  grid-template-columns:
    repeat(
      auto-fit,
      minmax(180px,1fr)
    );

  gap:14px;

  margin-bottom:18px;
}

.callback-meta span{
  display:block;

  color:var(--muted);

  font-size:12px;

  margin-bottom:6px;
}

.callback-form{
  display:flex;

  flex-direction:column;

  gap:12px;
}

.callback-form label{
  font-weight:700;
}

.callback-form select,
.callback-form textarea,
.callback-form input{
  width:100%;

  background:
    rgba(255,255,255,.05);

  color:white;

  border:
    1px solid var(--line);

  border-radius:14px;

  padding:14px;

  outline:none;
}

.callback-form textarea{
  min-height:120px;

  resize:vertical;
}

.callback-save-btn{
  width:220px;

  margin-top:8px;
}

.callback-filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.settings-tab-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.settings-tab-panel.hidden {
  display: none;
}

.callback-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.callback-filter-btn span {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(76,175,99,0.18);
  border: 1px solid rgba(76,175,99,0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
}

.premium-scroll::-webkit-scrollbar,
#dashboard::-webkit-scrollbar {
  width: 8px;
}

.premium-scroll::-webkit-scrollbar-thumb,
#dashboard::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.14);
  border-radius: 999px;
}

/* ===== DEMO DASHBOARD FIX - MUST BE ABOVE MEDIA QUERY ===== */

.range-toolbar{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:14px !important;
  flex-wrap:wrap !important;
  margin-bottom:22px !important;
}

.custom-range-wrap{
  display:flex !important;
  align-items:center !important;
  gap:10px !important;
  padding:10px 12px !important;
  border-radius:18px !important;
  background:rgba(13,34,22,0.72) !important;
  border:1px solid rgba(76,175,99,0.15) !important;
}

.date-input{
  height:44px !important;
  min-width:160px !important;
  background:#071a10 !important;
  border:1px solid rgba(76,175,99,0.22) !important;
  color:#ffffff !important;
  padding:0 14px !important;
  border-radius:14px !important;
  outline:none !important;
  font-size:13px !important;
  font-weight:700 !important;
}

.date-input::-webkit-calendar-picker-indicator{
  filter:invert(1) !important;
  opacity:0.8 !important;
}

.export-btn{
  height:44px !important;
  border:none !important;
  padding:0 18px !important;
  border-radius:14px !important;
  font-weight:900 !important;
  cursor:pointer !important;
  color:#fff !important;
  background:linear-gradient(135deg,#00c896,#1e7a46) !important;
}

.agent-status-wrap{
  width:100% !important;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:12px !important;
}

.switch{
  position:relative !important;
  display:inline-block !important;
  width:58px !important;
  height:30px !important;
}

.switch input{
  opacity:0 !important;
  width:0 !important;
  height:0 !important;
}

.slider{
  position:absolute !important;
  inset:0 !important;
  cursor:pointer !important;
  background:#16281c !important;
  border-radius:999px !important;
}

.slider:before{
  content:"" !important;
  position:absolute !important;
  height:22px !important;
  width:22px !important;
  left:4px !important;
  top:3px !important;
  background:#fff !important;
  border-radius:50% !important;
  transition:.3s !important;
}

.switch input:checked + .slider{
  background:linear-gradient(135deg,#00c896,#1e7a46) !important;
}

.switch input:checked + .slider:before{
  transform:translateX(27px) !important;
}

@media (max-width: 1100px) {
  .content-grid,
  .whatsapp-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    width: 250px;
  }

  .chat-item.status-agent_waiting {
  border-left: 4px solid #ff5b5b;
  background: rgba(255, 91, 91, 0.10);
}

.chat-item.status-agent_active {
  border-left: 4px solid #f5c542;
  background: rgba(245, 197, 66, 0.10);
}

.chat-item.status-bot {
  border-left: 4px solid transparent;
}

.chat-item.status-agent_waiting:hover,
.chat-item.status-agent_active:hover {
  filter: brightness(1.08);
}

  .expiring-badge {
  font-size: 11px;
  color: #ffb020;
  margin-top: 4px;
  font-weight: 600;
}

#agentMiniStats {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 10px !important;
  margin: 12px 14px 14px !important;
}

#agentMiniStats .agent-mini-card {
  padding: 12px 10px !important;
  border-radius: 14px !important;
  background: rgba(30,122,70, 0.16) !important;
  border: 1px solid rgba(76,175,99, 0.28) !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22) !important;
  text-align: center !important;
}

#agentMiniStats .agent-mini-card span {
  display: block !important;
  font-size: 11px !important;
  color: #9fd9a8 !important;
  margin-bottom: 6px !important;
  font-weight: 700 !important;
}

#agentMiniStats .agent-mini-card strong {
  display: block !important;
  font-size: 22px !important;
  color: #ffffff !important;
  font-weight: 900 !important;
}

.quick-replies {
  padding: 10px 12px 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,0.02);
}

.quick-replies button {
  border: 1px solid rgba(76,175,99,0.24);
  background: rgba(30,122,70,0.12);
  color: #d7f0dc;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.quick-replies button:hover {
  background: rgba(30,122,70,0.24);
  border-color: rgba(76,175,99,0.45);
}

.chat-item.new-message-highlight {
  border-color: rgba(76,175,99, 0.75) !important;
  box-shadow: 0 0 0 1px rgba(76,175,99, 0.28),
              0 0 18px rgba(76,175,99, 0.45) !important;
  animation: newMessagePulse 1.2s ease-in-out 2;
}

@keyframes newMessagePulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(76,175,99, 0);
  }
  50% {
    transform: scale(1.015);
    box-shadow: 0 0 20px rgba(76,175,99, 0.65);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 rgba(76,175,99, 0);
   }
}

  .agent-selector {
  width: 100%;
  margin-top: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(76,175,99,0.25);
  color: #ffffff;
  border-radius: 12px;
  padding: 9px 10px;
  outline: none;
  font-size: 12px;
  font-weight: 700;
}

.agent-selector option {
  color: #111;
}

.assigned-badge {
  display: inline-flex;
  margin-bottom: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(30,122,70,0.14);
  color: #9fd9a8;
  border: 1px solid rgba(76,175,99,0.25);
}

.assigned-badge.unassigned {
  background: rgba(255,255,255,0.04);
  color: var(--muted);
  border-color: rgba(255,255,255,0.08);
}

.login-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(9,20,13, 0.98); /* dark overlay */
  backdrop-filter: blur(6px);

  z-index: 99999; /* IMPORTANT */
}

.login-box {
  background: rgba(255,255,255,0.06);
  padding: 30px;
  border-radius: 16px;
  width: 320px;
  text-align: center;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.login-box h2 {
  margin-bottom: 20px;
  color: #fff;
}

.login-box input {
  width: 100%;
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 8px;
  border: none;
  outline: none;
}

.login-box button {
  width: 100%;
  padding: 10px;
  background: #1e7a46;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.login-error {
  color: #ff6b6b;
  font-size: 12px;
  margin-top: 10px;
}

  .range-toolbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
  margin-bottom:18px;
}

.custom-range-wrap{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.date-input{
  background:#0d2116;
  border:1px solid rgba(255,255,255,0.08);
  color:white;
  padding:10px 14px;
  border-radius:12px;
  font-size:13px;
}

.export-btn{
  background:linear-gradient(135deg,#00b894,#00cec9);
  color:white;
  border:none;
  padding:10px 16px;
  border-radius:12px;
  cursor:pointer;
  font-weight:700;
}

  .toolbar {
  margin-bottom: 28px;
}

.range-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.range-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.custom-range-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(13,34,22, 0.72);
  border: 1px solid rgba(76,175,99, 0.16);
  border-radius: 18px;
  padding: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.date-input {
  height: 44px;
  min-width: 155px;
  background: rgba(7,25,16, 0.95);
  border: 1px solid rgba(76,175,99, 0.22);
  color: #eef7ef;
  padding: 0 13px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  outline: none;
}

.date-input::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.75;
  cursor: pointer;
}

.export-btn {
  height: 44px;
  background: linear-gradient(135deg, #12c2a5, #1e7a46);
  color: #ffffff;
  border: none;
  padding: 0 18px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 900;
  font-size: 13px;
  box-shadow: 0 12px 26px rgba(30,122,70,0.22);
}

.export-btn:hover {
  transform: translateY(-1px);
}
  
.agent-status-wrap{
  width:100%;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
}

.status-title{
  color:#ffffff;
  font-weight:800;
  font-size:15px;
}

.status-sub{
  color:#8fb59c;
  font-size:12px;
  margin-top:3px;
}

.switch{
  position:relative;
  display:inline-block;
  width:58px;
  height:30px;
}

.switch input{
  opacity:0;
  width:0;
  height:0;
}

.slider{
  position:absolute;
  cursor:pointer;
  top:0;
  left:0;
  right:0;
  bottom:0;
  background:#16281c;
  transition:.3s;
  border-radius:50px;
  border:1px solid rgba(255,255,255,0.08);
}

.slider:before{
  position:absolute;
  content:"";
  height:22px;
  width:22px;
  left:4px;
  bottom:3px;
  background:white;
  transition:.3s;
  border-radius:50%;
}

.switch input:checked + .slider{
  background:linear-gradient(135deg,#00c896,#1e7a46);
}

.switch input:checked + .slider:before{
  transform:translateX(27px);
}

/* ===== Dashboard Toolbar ===== */

.range-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
  margin-bottom:22px;
}

.range-group{
  display:flex;
  align-items:center;
  gap:12px;
}

.custom-range-wrap{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px 12px;
  border-radius:18px;
  background:rgba(13,34,22,0.72);
  border:1px solid rgba(76,175,99,0.15);
  box-shadow:0 10px 25px rgba(0,0,0,0.18);
}

.date-input{
  height:44px;
  min-width:160px;
  background:#071a10;
  border:1px solid rgba(76,175,99,0.18);
  color:#ffffff;
  padding:0 14px;
  border-radius:14px;
  outline:none;
  font-size:13px;
  font-weight:700;
}

.date-input::-webkit-calendar-picker-indicator{
  filter:invert(1);
  opacity:0.8;
  cursor:pointer;
}

.export-btn{
  height:44px;
  border:none;
  padding:0 18px;
  border-radius:14px;
  font-weight:800;
  cursor:pointer;
  color:#fff;
  background:linear-gradient(135deg,#00c896,#1e7a46);
  box-shadow:0 12px 24px rgba(30,122,70,0.22);
}

/* ===== Agent Toggle ===== */

.agent-status-wrap{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.status-title{
  color:#fff;
  font-size:15px;
  font-weight:800;
}

.status-sub{
  color:#8fb59c;
  font-size:12px;
  margin-top:4px;
}

.switch{
  position:relative;
  display:inline-block;
  width:58px;
  height:30px;
}

.switch input{
  opacity:0;
  width:0;
  height:0;
}

.slider{
  position:absolute;
  inset:0;
  cursor:pointer;
  background:#16281c;
  transition:.3s;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.08);
}

.slider:before{
  content:"";
  position:absolute;
  height:22px;
  width:22px;
  left:4px;
  top:3px;
  background:#fff;
  border-radius:50%;
  transition:.3s;
}

.switch input:checked + .slider{
  background:linear-gradient(135deg,#00c896,#1e7a46);
}

.switch input:checked + .slider:before{
  transform:translateX(27px);
}
  }
/* ===== Admission Funnel ===== */

.funnel-card{
  margin-top:28px;
  margin-bottom:28px;
  padding:26px;
  border-radius:28px;
  background:linear-gradient(180deg,rgba(8,28,17,0.95),rgba(5,20,12,0.95));
  border:1px solid rgba(76,175,99,0.12);
  box-shadow:0 18px 45px rgba(0,0,0,0.22);
}

.funnel-header h2{
  color:#fff;
  font-size:28px;
  margin:0 0 6px;
}

.funnel-header p{
  color:#8fb59c;
  font-size:14px;
  margin:0;
}

.funnel-grid{
  margin-top:26px;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:18px;
}

.funnel-step{
  background:rgba(255,255,255,0.03);
  border:1px solid rgba(255,255,255,0.05);
  border-radius:22px;
  padding:20px;
}

.funnel-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:16px;
}

.funnel-top span{
  color:#cde3d1;
  font-size:14px;
  font-weight:600;
}

.funnel-top strong{
  color:#fff;
  font-size:28px;
  font-weight:900;
}

.funnel-bar{
  width:100%;
  height:12px;
  border-radius:999px;
  background:rgba(255,255,255,0.08);
  overflow:hidden;
  margin-bottom:12px;
}

.funnel-fill{
  height:100%;
  border-radius:999px;
}

.funnel-step-1{
  background:linear-gradient(180deg,rgba(7,20,13,0.98),rgba(9,26,17,0.92));
  border-color:rgba(34,197,94,0.22);
}

.funnel-step-2{
  background:linear-gradient(180deg,rgba(9,32,20,0.96),rgba(11,40,24,0.88));
  border-color:rgba(34,197,94,0.30);
}

.funnel-step-3{
  background:linear-gradient(180deg,rgba(14,58,32,0.92),rgba(18,72,40,0.78));
  border-color:rgba(74,222,128,0.36);
}

.funnel-step-4{
  background:linear-gradient(180deg,rgba(22,101,52,0.92),rgba(21,128,61,0.72));
  border-color:rgba(134,239,172,0.42);
}

.fill-1{
  width:100%;
  background:linear-gradient(90deg,#86efac,#4ade80);
}

.fill-2{
  width:0%;
  background:linear-gradient(90deg,#4ade80,#22c55e);
}

.fill-3{
  width:0%;
  background:linear-gradient(90deg,#22c55e,#16a34a);
}

.fill-4{
  width:0%;
  background:linear-gradient(90deg,#16a34a,#14532d);
}

.funnel-step small{
  color:#8fb59c;
  font-size:12px;
}

/* ===== Live Admissions Activity ===== */

.live-feed-card{
  margin-bottom:28px;
  padding:26px;
  border-radius:28px;
  background:linear-gradient(180deg,rgba(8,28,17,0.95),rgba(5,20,12,0.95));
  border:1px solid rgba(76,175,99,0.12);
  box-shadow:0 18px 45px rgba(0,0,0,0.22);
}

.live-feed-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:22px;
}

.live-feed-header h2{
  margin:0 0 6px;
  font-size:26px;
  color:#fff;
}

.live-feed-header p{
  margin:0;
  color:#8fb59c;
  font-size:14px;
}

.live-dot{
  padding:7px 12px;
  border-radius:999px;
  background:rgba(24,195,126,0.14);
  color:#82efbf;
  border:1px solid rgba(24,195,126,0.28);
  font-size:12px;
  font-weight:900;
}

.live-feed-list{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:14px;
}

.feed-item{
  display:flex;
  gap:12px;
  align-items:flex-start;
  padding:16px;
  border-radius:18px;
  background:rgba(255,255,255,0.035);
  border:1px solid rgba(255,255,255,0.06);
}

.feed-item strong{
  color:#eef7f0;
  font-size:14px;
}

.feed-item p{
  margin:5px 0 0;
  color:#8fb59c;
  font-size:12px;
}

.feed-icon{
  font-size:18px;
  line-height:1;
}

.feed-icon.green{ color:#18c37e; }
.feed-icon.blue{ color:#4a9eff; }
.feed-icon.yellow{ color:#f3b544; }
.feed-icon.purple{ color:#b084ff; }

/* Premium look for existing Top Programs block */
.program-row{
  background:linear-gradient(180deg,rgba(255,255,255,0.04),rgba(255,255,255,0.025)) !important;
  border:1px solid rgba(76,175,99,0.13) !important;
  border-radius:22px !important;
  padding:20px 22px !important;
  margin-bottom:18px !important;
  box-shadow:0 14px 32px rgba(0,0,0,0.18) !important;
}

.program-row-head{
  align-items:center !important;
  margin-bottom:16px !important;
}

.program-name{
  color:#ffffff !important;
  font-size:22px !important;
  font-weight:900 !important;
}

.program-count{
  padding:8px 13px !important;
  border-radius:999px !important;
  background:rgba(76,175,99,0.13) !important;
  border:1px solid rgba(76,175,99,0.20) !important;
  color:#a3d977 !important;
  font-size:13px !important;
  font-weight:900 !important;
}

.program-count::after{
  content:" Inquiries";
}

.bar-track{
  height:14px !important;
  border-radius:999px !important;
  background:rgba(255,255,255,0.07) !important;
}

.bar-fill{
  border-radius:999px !important;
  background:linear-gradient(90deg,#1e7a46,#4caf63,#8bc34a) !important;
  box-shadow:0 0 18px rgba(76,175,99,0.35) !important;
}

/* =========================
   LOGIN OVERLAY
========================= */

.login-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #04140c, #0c2417);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
}

.login-card {
  width: 100%;
  max-width: 420px;

  background: rgba(13,32,22, 0.96);

  border: 1px solid rgba(76,175,99,.22);

  border-radius: 24px;

  padding: 40px;

  text-align: center;

  position: relative;
overflow: hidden;
  
  box-shadow:
    0 30px 60px rgba(0,0,0,.45),
    0 0 18px rgba(30,122,70,.20);

  animation:
    cardGlow 3.5s ease-in-out infinite;
}

@keyframes cardGlow {

0%{
box-shadow:
0 30px 60px rgba(0,0,0,.45),
0 0 12px rgba(30,122,70,.18);

border-color:
rgba(76,175,99,.18);
}

  
  
50%{
box-shadow:
0 30px 60px rgba(0,0,0,.45),
0 0 60px rgba(30,122,70,.45);

border-color:
rgba(76,175,99,.45);
}

100%{
box-shadow:
0 30px 60px rgba(0,0,0,.45),
0 0 12px rgba(30,122,70,.18);

border-color:
rgba(76,175,99,.18);
}

}

.login-logo {
  width: 240px;
  max-width: 100%;
  margin: 0 auto 20px;
  display: block;
}

/* Text-based brand mark standing in for a logo image (see TODO in admin.html) */
.login-logo-text {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0.3px;
  color: #ffffff;
  margin-bottom: 16px;
}

.login-card h2 {
  color: #fff;
  font-size: 32px;
  margin-bottom: 8px;
}

.login-subtitle {
  color: #94a3b8;
  margin-bottom: 32px;
  line-height: 1.5;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-input {
  background: #0f2419;
  border: 1px solid rgba(255,255,255,0.06);
  color: #fff;
  padding: 14px 16px;
  border-radius: 14px;
  font-size: 15px;
  outline: none;
}

.login-input:focus {
  border-color: #16a34a;
}

.login-btn {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: white;
  border: none;
  padding: 14px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s ease;
}

.login-btn:hover {
  transform: translateY(-1px);
  opacity: 0.95;
}

.login-error {
  color: #ef4444;
  font-size: 14px;
  min-height: 18px;
}

/* =========================
   AGENT MANAGEMENT
========================= */

.agent-create-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.agent-create-form input,
.agent-create-form select {
  background: #0f2419;
  border: 1px solid rgba(255,255,255,0.06);
  color: #fff;
  padding: 12px 14px;
  border-radius: 12px;
  outline: none;
}

.agent-create-form input:focus,
.agent-create-form select:focus {
  border-color: #16a34a;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #cbd5e1;
  font-size: 14px;
}

.role-badge {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.role-admin {
  background: rgba(239,68,68,0.15);
  color: #ef4444;
}

.role-chat_agent {
  background: rgba(74,158,255,0.15);
  color: #4a9eff;
}

.role-call_agent {
  background: rgba(16,185,129,0.15);
  color: #34d399;
}

.role-analyst {
  background: rgba(198,228,99,0.15);
  color: #c6e463;
}

.status-active {
  color: #22c55e;
  font-weight: 600;
}

.status-inactive {
  color: #ef4444;
  font-weight: 600;
}

.danger-btn {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border: none;
  padding: 12px 18px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
}

.danger-btn:hover {
  opacity: 0.9;
}

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.agent-status-wrap {
  width: 100%;
}

.sidebar-logout-btn {
  width: 100%;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: white;
  border: none;
  padding: 13px 18px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
}
/* =========================
   CALLBACK REQUESTS
========================= */

.callback-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.callback-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.callback-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.callback-card-name {
  font-weight: 700;
  font-size: 15px;
}

.callback-card-date {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.callback-card-meta {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.callback-card .field-label {
  margin-top: 8px;
}

.callback-followup {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #0f1f16;
  color: white;
  outline: none;
  font-family: inherit;
  color-scheme: dark;
}

.callback-save-btn {
  margin-top: 12px;
  width: 100%;
}

.callback-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #0f1f16;
  color: white;
  outline: none;
}

.callback-notes {
  width: 100%;
  min-width: 220px;
  min-height: 80px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #0f1f16;
  color: white;
  resize: vertical;
  outline: none;
  font-family: inherit;
}

.callback-notes::placeholder {
  color: rgba(255,255,255,0.4);
}

.repeat-badge{
margin-top:8px;

display:inline-block;

padding:6px 10px;

border-radius:999px;

font-size:12px;

font-weight:700;

background:rgba(255,145,0,.18);

color:#ffb84d;

border:1px solid rgba(255,145,0,.35);
}

html,
body {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

.app-shell {
  min-height: 100vh;
}

.main-content {
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.section {
  padding-bottom: 60px;
}

.table-wrap {
  overflow-x: auto;
  overflow-y: visible;
}

/* =========================
   PAGE SCROLL FIX
========================= */

#agents,
#callbacks,
#settings {
  flex: 1;
  min-height: 0;
  overflow-y: auto !important;
  overflow-x: hidden;
  padding-right: 8px;
  padding-bottom: 80px;
}

#agents .panel,
#callbacks .card,
#callbacks .panel,
#settings .panel {
  margin-bottom: 40px;
}

#agents::-webkit-scrollbar,
#callbacks::-webkit-scrollbar,
#settings::-webkit-scrollbar {
  width: 8px;
}

#agents::-webkit-scrollbar-thumb,
#callbacks::-webkit-scrollbar-thumb,
#settings::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.14);
  border-radius: 999px;
}

/* =========================
   MY PROFILE MODAL
========================= */

.profile-modal {
  position: fixed;
  inset: 0;
  background: rgba(3,9,6, 0.78);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.profile-modal.hidden {
  display: none;
}

.profile-modal-card {
  width: 100%;
  max-width: 760px;
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(8,26,16, 0.98), rgba(5,24,15, 0.98));
  border: 1px solid rgba(76,175,99,0.22);
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.55);
  padding: 26px;
}

.profile-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.profile-modal-header h2 {
  margin: 0 0 6px;
  font-size: 24px;
}

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

.profile-close-btn {
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.profile-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.profile-form-grid label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}

.profile-form-grid input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  color: var(--text);
  border-radius: 14px;
  padding: 13px 14px;
  outline: none;
  font-size: 14px;
}

.profile-form-grid input:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.profile-message {
  min-height: 18px;
  margin: 8px 0 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-3);
}

.profile-message.error {
  color: var(--danger);
}

.profile-message.success {
  color: var(--success);
}

.profile-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.10);
  margin: 24px 0;
}

.profile-modal-card h3 {
  margin: 0 0 16px;
  font-size: 18px;
}

@media (max-width: 700px) {
  .profile-form-grid {
    grid-template-columns: 1fr;
  }

  .profile-modal-card {
    padding: 20px;
  }
}

.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 28px 0;
}

.loading-spinner span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-3);
  animation: loadingDotBounce 1.2s infinite ease-in-out;
}

.loading-spinner span:nth-child(2) { animation-delay: 0.2s; }
.loading-spinner span:nth-child(3) { animation-delay: 0.4s; }

@keyframes loadingDotBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-6px); opacity: 1; }
}

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 340px;
}

.toast {
  background: linear-gradient(180deg, rgba(8,26,16, 0.98), rgba(5,24,15, 0.98));
  border: 1px solid rgba(76,175,99,0.22);
  border-left: 3px solid var(--accent-2);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text);
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
  animation: toastIn 0.25s ease-out;
}

.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }

.toast-out {
  animation: toastOut 0.25s ease-in forwards;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(20px); }
}

.confirm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3,9,6, 0.78);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.confirm-modal-card {
  width: 100%;
  max-width: 400px;
  background: linear-gradient(180deg, rgba(8,26,16, 0.98), rgba(5,24,15, 0.98));
  border: 1px solid rgba(76,175,99,0.22);
  border-radius: 20px;
  box-shadow: 0 30px 90px rgba(0,0,0,0.55);
  padding: 24px;
}

.confirm-modal-card p {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.5;
}

.prompt-input {
  width: 100%;
  background: #0f2419;
  border: 1px solid rgba(255,255,255,0.06);
  color: #fff;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 15px;
  outline: none;
  margin-bottom: 20px;
}

.prompt-input:focus {
  border-color: var(--accent-2);
}

.field-label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 4px;
}

.field-readonly {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.05);
  color: var(--muted);
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  margin-bottom: 20px;
}

.field-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text);
}

.icon-action {
  cursor: pointer;
  font-size: 16px;
  margin-right: 16px;
  opacity: 0.85;
}

.icon-action:hover {
  opacity: 1;
}

.agent-action-icons {
  white-space: nowrap;
}

.confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
