:root {
  --bg: #05101f;
  --panel: rgba(9, 25, 52, 0.94);
  --panel-2: rgba(14, 34, 68, 0.94);
  --line: rgba(255,255,255,0.08);
  --text: #edf4ff;
  --muted: #a8bbdc;
  --accent: #2f7df6;
  --accent-2: #56a5ff;
  --accent-3: #7bc0ff;
  --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(47,125,246,0.16), transparent 26%),
    linear-gradient(135deg, #040c18 0%, #08172c 45%, #0a1f44 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,11,24,0.98), rgba(5,17,36,0.98));
  border-right: 1px solid var(--line);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
}

.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;
}

.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(47,125,246,0.18), rgba(86,165,255,0.08));
  border-color: rgba(86,165,255,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;
}

.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(47,125,246,0.22), rgba(86,165,255,0.10));
  border-color: rgba(86,165,255,0.38);
}

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

.stat-card,
.panel,
.wa-chat-list,
.wa-chat-window {
  background: linear-gradient(180deg, rgba(9,26,53,0.94), rgba(8,21,43,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;
}

.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;
}

.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(47,125,246,0.12);
  color: #8fc0ff;
  border: 1px solid rgba(47,125,246,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: 100%;
  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;
}

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

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

.pill-badge {
  min-width: 28px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(47,125,246,0.18);
  border: 1px solid rgba(86,165,255,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;
}

.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(86,165,255,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: #cbd8ef;
  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, 13, 27, 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: #1f2c44;
  color: #edf4ff;
  border-top-left-radius: 4px;
}

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

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

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

.composer input {
  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;
}

.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;
}

.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(15,28,52,0.72) !important;
  border:1px solid rgba(86,165,255,0.15) !important;
}

.date-input{
  height:44px !important;
  min-width:160px !important;
  background:#081223 !important;
  border:1px solid rgba(86,165,255,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,#2f7df6) !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:#1b2c4d !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,#2f7df6) !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(47, 125, 246, 0.16) !important;
  border: 1px solid rgba(86, 165, 255, 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: #9fc5ff !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(86,165,255,0.24);
  background: rgba(47,125,246,0.12);
  color: #d9eaff;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.quick-replies button:hover {
  background: rgba(47,125,246,0.24);
  border-color: rgba(86,165,255,0.45);
}

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

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

  .agent-selector {
  width: 100%;
  margin-top: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(86,165,255,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(47,125,246,0.14);
  color: #9fc5ff;
  border: 1px solid rgba(86,165,255,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(11, 18, 32, 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: #2f7df6;
  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:#101a2e;
  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(15, 28, 52, 0.72);
  border: 1px solid rgba(86, 165, 255, 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(8, 18, 35, 0.95);
  border: 1px solid rgba(86, 165, 255, 0.22);
  color: #eaf2ff;
  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, #2f7df6);
  color: #ffffff;
  border: none;
  padding: 0 18px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 900;
  font-size: 13px;
  box-shadow: 0 12px 26px rgba(47,125,246,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:#8ea7d1;
  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:#1b2c4d;
  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,#2f7df6);
}

.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(15,28,52,0.72);
  border:1px solid rgba(86,165,255,0.15);
  box-shadow:0 10px 25px rgba(0,0,0,0.18);
}

.date-input{
  height:44px;
  min-width:160px;
  background:#081223;
  border:1px solid rgba(86,165,255,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,#2f7df6);
  box-shadow:0 12px 24px rgba(47,125,246,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:#8ea7d1;
  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:#1b2c4d;
  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,#2f7df6);
}

.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(10,24,50,0.95),rgba(7,18,37,0.95));
  border:1px solid rgba(86,165,255,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:#8ea7d1;
  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:#c8d7f5;
  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;
}

.fill-1{
  width:100%;
  background:linear-gradient(90deg,#2f7df6,#56a5ff);
}

.fill-2{
  width:58%;
  background:linear-gradient(90deg,#00c896,#12d8b3);
}

.fill-3{
  width:39%;
  background:linear-gradient(90deg,#ffb347,#ffcc33);
}

.fill-4{
  width:23%;
  background:linear-gradient(90deg,#ff5f6d,#ffc371);
}

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

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

.live-feed-card{
  margin-bottom:28px;
  padding:26px;
  border-radius:28px;
  background:linear-gradient(180deg,rgba(10,24,50,0.95),rgba(7,18,37,0.95));
  border:1px solid rgba(86,165,255,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:#8ea7d1;
  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:#eef5ff;
  font-size:14px;
}

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

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

.feed-icon.green{ color:#18c37e; }
.feed-icon.blue{ color:#56a5ff; }
.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(86,165,255,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(86,165,255,0.13) !important;
  border:1px solid rgba(86,165,255,0.20) !important;
  color:#8ec5ff !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,#2f7df6,#56a5ff,#6bb8ff) !important;
  box-shadow:0 0 18px rgba(86,165,255,0.35) !important;
}

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

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

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

  background: rgba(15, 23, 41, 0.96);

  border: 1px solid rgba(86,165,255,.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(47,125,246,.20);

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

@keyframes cardBlueGlow {

0%{
box-shadow:
0 30px 60px rgba(0,0,0,.45),
0 0 12px rgba(47,125,246,.18);

border-color:
rgba(86,165,255,.18);
}

  
  
50%{
box-shadow:
0 30px 60px rgba(0,0,0,.45),
0 0 60px rgba(47,125,246,.45);

border-color:
rgba(86,165,255,.45);
}

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

border-color:
rgba(86,165,255,.18);
}

}

.login-logo {
  width: 130px;
  margin-bottom: 20px;
}

.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: #111c31;
  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: #2563eb;
}

.login-btn {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  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: #111c31;
  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: #2563eb;
}

.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(37,99,235,0.15);
  color: #60a5fa;
}

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

.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-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #111827;
  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: #111827;
  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 {
  flex: 1;
  min-height: 0;
  overflow-y: auto !important;
  overflow-x: hidden;
  padding-right: 8px;
  padding-bottom: 80px;
}

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

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

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