/* SaaS Admin Portal CSS - Premium Light Mode Theme with Inverted Curved Sidebar */
html {
  font-size: 92%;
}

:root {
  --admin-bg: #f4f7fc; /* Clean light blue-grey background */
  --admin-surface: #ffffff; /* White surface cards */
  --admin-surface-light: #f8fafc; /* Slightly lighter white/grey */
  --admin-border: #e2e8f0; /* Light border */
  --admin-text: #0f172a; /* Dark text */
  --admin-text-muted: #64748b; /* Muted text */
  --admin-primary: #4f46e5; /* Indigo 600 */
  --admin-primary-light: rgba(79, 70, 229, 0.06);
  --admin-success: #10b981; /* Emerald 500 */
  --admin-warning: #f59e0b; /* Amber 500 */
  --admin-danger: #ef4444; /* Red 500 */
  --shadow-premium: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.02), 0 0 0 1px rgba(0, 0, 0, 0.03);
  --shadow-card: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.01);
  --sidebar-width: 220px;
  --sidebar-width-collapsed: 76px;
  --sidebar-bg: #e2eeff; /* Premium light blue sidebar background */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--admin-bg);
  color: var(--admin-text);
  min-height: 100vh;
  display: flex;
}

/* Sidebar Styling */
.admin-sidebar {
  width: var(--sidebar-width);
  background-color: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 100;
  border-right: none;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-main {
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
  padding: 1.5rem 1rem 1.25rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--sidebar-bg);
  transition: padding 0.3s, justify-content 0.3s;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  transition: margin 0.3s;
}

.brand-logo svg {
  width: 20px;
  height: 20px;
}

.sidebar-brand h2 {
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: opacity 0.2s, width 0.2s;
}

.sidebar-links {
  padding: 0.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  transition: padding 0.3s;
}

.nav-item {
  width: calc(100% - 12px);
  margin: 4px 0 4px 12px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 1rem;
  background: transparent;
  border: none;
  color: #475569; /* Muted slate for inactive labels */
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
  border-radius: 30px 0 0 30px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  outline: none;
}

.nav-item svg {
  width: 32px;
  height: 32px;
  padding: 7px;
  border-radius: 50%;
  color: #64748b;
  background: transparent;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.nav-item span {
  transition: opacity 0.2s, width 0.2s;
}

.nav-item:hover {
  color: #0f172a;
}

.nav-item:hover svg {
  color: #0f172a;
  background: rgba(0, 0, 0, 0.05);
}

/* Sidebar Toggle Arrow Button */
.sidebar-toggle-btn {
  position: absolute;
  right: -12px;
  top: 36px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--admin-primary);
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
  z-index: 110;
  transition: transform 0.3s, background-color 0.2s;
  outline: none;
}

.sidebar-toggle-btn:hover {
  background-color: #4338ca;
  transform: scale(1.1);
}

.sidebar-toggle-btn svg {
  width: 14px;
  height: 14px;
  transition: transform 0.3s;
}

/* Collapsed Sidebar overrides */
body.sidebar-collapsed .admin-sidebar {
  width: var(--sidebar-width-collapsed);
}

body.sidebar-collapsed .admin-main {
  margin-left: var(--sidebar-width-collapsed);
}

body.sidebar-collapsed .sidebar-toggle-btn svg {
  transform: rotate(180deg);
}

body.sidebar-collapsed .sidebar-brand h2,
body.sidebar-collapsed .nav-item span,
body.sidebar-collapsed .supervisor-profile h4,
body.sidebar-collapsed .logout-btn span {
  opacity: 0;
  width: 0;
  overflow: hidden;
  margin: 0;
  pointer-events: none;
  display: none;
}

body.sidebar-collapsed .sidebar-brand {
  padding: 1.5rem 0.5rem;
  justify-content: center;
}

body.sidebar-collapsed .brand-logo {
  margin: 0;
}

body.sidebar-collapsed .sidebar-links {
  padding: 0.5rem 0;
}

body.sidebar-collapsed .nav-item {
  width: calc(100% - 10px);
  margin: 4px auto;
  padding: 0.6rem;
  justify-content: center;
  gap: 0;
  border-radius: 30px;
}

body.sidebar-collapsed .nav-item.active {
  border-radius: 30px;
}

body.sidebar-collapsed .nav-item.active::before,
body.sidebar-collapsed .nav-item.active::after {
  /* In collapsed mode, disable the concave cutout corners to allow clean circles */
  display: none;
}

body.sidebar-collapsed .sidebar-footer {
  padding: 1.25rem 0.5rem;
  align-items: center;
}

body.sidebar-collapsed .supervisor-profile {
  justify-content: center;
  margin: 0 auto;
}

body.sidebar-collapsed .supervisor-profile div {
  display: none;
}

body.sidebar-collapsed .logout-btn {
  padding: 0.6rem;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  margin: 0 auto;
}

/* Set active colors and shadow glow variables per tab */
.nav-item[onclick*="overview"].active {
  --active-color: #ef4444;
  --active-color-shadow: rgba(239, 68, 68, 0.4);
}

.nav-item[onclick*="agents"].active {
  --active-color: #f97316;
  --active-color-shadow: rgba(249, 115, 22, 0.4);
}

.nav-item[onclick*="tickets"].active {
  --active-color: #10b981;
  --active-color-shadow: rgba(16, 185, 129, 0.4);
}

.nav-item[onclick*="csat"].active {
  --active-color: #3b82f6;
  --active-color-shadow: rgba(59, 130, 246, 0.4);
}

.nav-item[onclick*="settings"].active {
  --active-color: #db2777;
  --active-color-shadow: rgba(219, 39, 119, 0.4);
}

/* Active State styles */
.nav-item.active {
  background-color: var(--admin-bg) !important;
  color: var(--active-color) !important;
  font-weight: 700;
  cursor: default;
}

.nav-item.active svg {
  color: #ffffff !important;
  background-color: var(--active-color) !important;
  box-shadow: 0 6px 14px var(--active-color-shadow);
}

/* Inverted curves at the top and bottom of the active tab */
.nav-item.active::before {
  content: '';
  position: absolute;
  top: -20px;
  right: 0;
  width: 20px;
  height: 20px;
  background-color: var(--sidebar-bg);
  border-bottom-right-radius: 20px;
  pointer-events: none;
  z-index: 10;
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -20px;
  right: 0;
  width: 20px;
  height: 20px;
  background-color: var(--sidebar-bg);
  border-top-right-radius: 20px;
  pointer-events: none;
  z-index: 10;
}

.sidebar-footer {
  padding: 1.5rem 1.25rem;
  border-top: 1px solid #e2e8f0;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.supervisor-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.supervisor-profile img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e2e8f0;
}

.supervisor-profile h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f172a;
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.6rem 1rem;
  background: transparent;
  border: none;
  color: #64748b;
  font-family: 'Outfit', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  text-align: left;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.logout-btn svg {
  width: 16px;
  height: 16px;
  color: #64748b;
  transition: all 0.2s ease;
}

.logout-btn:hover {
  background: #d1e4ff;
  color: #ef4444;
}

.logout-btn:hover svg {
  color: #ef4444;
}

.badge-role {
  font-size: 0.7rem;
  color: var(--admin-primary);
  font-weight: 700;
  background-color: var(--admin-primary-light);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

/* Main Dashboard Panel */
.admin-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.admin-header {
  flex-shrink: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 2.5rem;
  border-bottom: 1px solid var(--admin-border);
  background: var(--admin-surface);
  z-index: 10;
}

.admin-header h1 {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--admin-text);
}

.admin-header p {
  font-size: 0.78rem;
  color: var(--admin-text-muted);
}

.tab-content, .tab-contentactive {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem 2.5rem;
}

.admin-footer {
  flex-shrink: 0;
  padding: 0.75rem 2.5rem;
  border-top: 1px solid var(--admin-border);
  background: var(--admin-surface);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--admin-text-muted);
  z-index: 10;
}

/* Settings Sub-navigation */
.settings-sub-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--admin-text-muted);
  font-weight: 600;
  border-radius: 0.5rem;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  font-size: 0.85rem;
}

.settings-sub-nav-item:hover:not(.active) {
  background: var(--admin-surface-light);
  color: var(--admin-primary);
  transform: translateX(3px);
}

.settings-sub-nav-item.active {
  background: var(--admin-primary-light);
  color: var(--admin-primary);
  box-shadow: inset 3px 0 0 0 var(--admin-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.live-pulse-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--admin-text-muted);
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  padding: 0.45rem 1rem;
  border-radius: 9999px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--admin-success);
  animation: pulse-ring 1.5s infinite alternate;
}

@keyframes pulse-ring {
  0% { transform: scale(0.85); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
  100% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
}

.btn-refresh {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  cursor: pointer;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--admin-text-muted);
  transition: all 0.2s ease;
}

.btn-refresh:hover {
  background: var(--admin-surface-light);
  color: var(--admin-text);
}

/* KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.kpi-card {
  background: var(--admin-surface);
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--admin-border);
  box-shadow: var(--shadow-card);
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--admin-text-muted);
  margin-bottom: 0.75rem;
}

.kpi-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}
.kpi-icon.blue { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }
.kpi-icon.purple { background: rgba(168, 85, 247, 0.12); color: #a855f7; }
.kpi-icon.orange { background: rgba(249, 115, 22, 0.12); color: #f97316; }
.kpi-icon.yellow { background: rgba(234, 179, 8, 0.12); color: #eab308; }

.kpi-card h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  color: var(--admin-text);
}

.kpi-trend {
  font-size: 0.78rem;
  color: var(--admin-text-muted);
  font-weight: 500;
}

/* Split Layout */
.overview-split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 1024px) {
  .overview-split-layout {
    grid-template-columns: 1fr;
  }
}

.overview-panel {
  background: var(--admin-surface);
  border-radius: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--admin-border);
  box-shadow: var(--shadow-card);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--admin-border-light);
  padding-bottom: 0.75rem;
}

.panel-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.panel-link-btn {
  background: transparent;
  border: none;
  color: var(--admin-primary);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.panel-link-btn:hover {
  text-decoration: underline;
}

/* Agent quick list in overview */
.agent-quick-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.agent-quick-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--admin-border);
  background: var(--admin-bg);
}

.agent-profile-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.agent-profile-info img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.agent-details-text h4 {
  font-size: 0.88rem;
  font-weight: 700;
}

.agent-details-text p {
  font-size: 0.75rem;
  color: var(--admin-text-muted);
}

.agent-status-tag {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  background: #f1f5f9;
  color: var(--admin-text-muted);
}

.agent-status-tag.online { background-color: #ecfdf5; color: var(--admin-success); }
.agent-status-tag.away { background-color: #fffbeb; color: var(--admin-warning); }
.agent-status-tag.busy { background-color: #fef2f2; color: var(--admin-danger); }

/* CSAT Reviews Quick List */
.csat-quick-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.csat-quick-card {
  border: 1px solid var(--admin-border);
  padding: 0.85rem;
  border-radius: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.csat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.csat-visitor-name {
  font-weight: 700;
  font-size: 0.82rem;
}

.csat-stars-container {
  color: #fbbf24;
  font-size: 0.95rem;
}

.csat-comment {
  font-size: 0.8rem;
  color: var(--admin-text-muted);
  font-style: italic;
}

.csat-assigned {
  font-size: 0.7rem;
  color: var(--admin-text-muted);
  text-align: right;
  display: block;
}

/* Tables Styling */
.table-container {
  background: var(--admin-surface);
  border-radius: 1rem;
  border: 1px solid var(--admin-border);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th {
  background: var(--admin-surface-light);
  color: var(--admin-text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--admin-border);
}

.admin-table td {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--admin-border);
  font-size: 0.88rem;
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table tbody tr:hover td {
  background-color: var(--admin-bg);
}

.table-agent-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.table-agent-meta img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

/* Status selection box inside tables */
.select-status-table {
  background: var(--admin-surface-light);
  border: 1px solid var(--admin-border);
  color: var(--admin-text);
  padding: 0.35rem;
  border-radius: 0.375rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

/* Badges */
.badge-status {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  text-transform: uppercase;
  display: inline-block;
}
.badge-status.queued { background: #fff7ed; color: #f97316; border: 1px solid #ffedd5; }
.badge-status.active { background: #eff6ff; color: #3b82f6; border: 1px solid #dbeafe; }
.badge-status.closed { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }

.badge-dept {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  text-transform: uppercase;
}
.badge-dept.support { color: #0284c7; background: #f0f9ff; border: 1px solid #bae6fd; }
.badge-dept.sales { color: #db2777; background: #fdf2f8; border: 1px solid #fbcfe8; }
.badge-dept.billing { color: #e11d48; background: #fff1f2; border: 1px solid #fecdd3; }

/* Grid for CSAT Reviews Tab */
.csat-feedback-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.csat-full-card {
  background: var(--admin-surface);
  border: 1px solid var(--admin-border);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.csat-full-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.csat-full-visitor {
  display: flex;
  flex-direction: column;
}

.csat-full-visitor h4 {
  font-size: 0.95rem;
  font-weight: 700;
}

.csat-full-visitor span {
  font-size: 0.75rem;
  color: var(--admin-text-muted);
}

.csat-full-rating {
  font-size: 1.25rem;
  color: #fbbf24;
}

.csat-full-body {
  font-size: 0.85rem;
  color: var(--admin-text-muted);
  line-height: 1.5;
  background: var(--admin-bg);
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-style: italic;
  flex: 1;
}

.csat-full-footer {
  border-top: 1px solid var(--admin-border-light);
  padding-top: 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}

/* Buttons in lists */
.btn-action-table {
  background: var(--admin-primary-light);
  border: 1px solid rgba(79, 70, 229, 0.15);
  color: var(--admin-primary);
  padding: 0.35rem 0.75rem;
  border-radius: 0.375rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action-table:hover {
  background: var(--admin-primary);
  color: white;
}

/* Modals */
.modal {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal.active {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: var(--admin-surface);
  border-radius: 1.25rem;
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  animation: modal-slide 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modal-slide {
  from { transform: translateY(20px) scale(0.95); }
  to { transform: translateY(0) scale(1); }
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--admin-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 755;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--admin-text-muted);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Modal Chat Logs */
.modal-body .message-bubble {
  max-width: 75%;
  display: flex;
  flex-direction: column;
}

.modal-body .message-bubble.visitor { align-self: flex-start; }
.modal-body .message-bubble.agent { align-self: flex-end; }
.modal-body .message-bubble.system { align-self: center; max-width: 90%; }

.modal-body .msg-sender {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--admin-text-muted);
  margin-bottom: 0.15rem;
}

.modal-body .agent .msg-sender { text-align: right; }

.modal-body .msg-text-wrapper {
  padding: 0.6rem 0.85rem;
  font-size: 0.82rem;
  border-radius: 0.75rem;
  line-height: 1.4;
}

.modal-body .visitor .msg-text-wrapper {
  background: #f1f5f9;
  color: var(--admin-text);
  border-bottom-left-radius: 0.25rem;
}

.modal-body .agent .msg-text-wrapper {
  background: var(--admin-primary);
  color: white;
  border-bottom-right-radius: 0.25rem;
}

.modal-body .system .msg-text-wrapper {
  background: var(--admin-surface-light);
  border: 1px solid var(--admin-border);
  color: var(--admin-text-muted);
  font-size: 0.7rem;
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
}

.modal-body .msg-meta {
  font-size: 0.65rem;
  color: var(--admin-text-muted);
  margin-top: 0.2rem;
}
.modal-body .agent .msg-meta { text-align: right; }

/* Add Agent Button Style */
.btn-add-agent {
  background: var(--admin-primary);
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 0.5rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

.btn-add-agent:hover {
  background: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(79, 70, 229, 0.25);
}

.btn-add-agent:active {
  transform: translateY(0);
}

/* Weather & Time Widget styles */
.header-widget {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background-color: var(--admin-surface);
  border: 1px solid var(--admin-border);
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--admin-text-muted);
  box-shadow: var(--shadow-premium);
  margin-right: 0.5rem;
}

.widget-time,
.widget-weather {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.widget-time svg,
.widget-weather svg {
  width: 14px;
  height: 14px;
  color: var(--admin-primary);
}

.widget-weather svg.chevron {
  width: 10px;
  height: 10px;
  color: var(--admin-text-muted);
}

.widget-divider {
  color: var(--admin-border);
  font-weight: 300;
}

/* Notification Bell Styles */
.notification-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--admin-border);
  background: var(--admin-surface);
  color: var(--admin-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  margin-right: 0.5rem;
  outline: none;
}

.notification-btn:hover {
  background: var(--admin-bg);
  color: var(--admin-text);
  border-color: var(--admin-primary);
}

.notification-btn svg {
  width: 18px;
  height: 18px;
}

.notification-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: #ef4444;
  border-radius: 50%;
  border: 1.5px solid var(--admin-surface);
}

/* Mobile Responsiveness Styles */
@media (max-width: 768px) {
  .admin-main {
    margin-left: 0 !important;
    padding: 1.25rem !important;
    width: 100%;
  }

  .admin-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    width: var(--sidebar-width) !important;
    position: fixed;
    height: 100vh;
    z-index: 1000;
  }

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

  .mobile-menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  body.sidebar-collapsed .admin-main {
    margin-left: 0 !important;
  }

  .kpi-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .overview-split-layout {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 1rem;
  }

  .admin-header .header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .csat-feedback-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  /* Inline grid selectors override to single column layout */
  div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }

  .table-container {
    overflow-x: auto !important;
  }
}
