/* CSS variables and colors matching ChatsGate/ChatsAdminPortal theme */
:root {
  --brand-blue: #1a73e8;
  --brand-blue-hover: #1557b0;
  --bg-sidebar: #ffffff;
  --bg-main: #f7f8fc;
  --border-color: #e4e7ef;
  --text-dark: #293044;
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  font-family: 'Outfit', sans-serif;
  margin: 0;
  background-color: var(--bg-main);
}

.font-outfit {
  font-family: 'Outfit', sans-serif;
}

/* Portal Main Shell Grid */
.portal-shell-auth {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* Sidebar navigation styles */
.portal-sidebar {
  border-right: 1px solid var(--border-color);
  background: var(--bg-sidebar);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 0;
  height: 100vh;
  box-shadow: 2px 0 8px rgba(0,0,0,0.02);
}

/* Sidebar Header & Brand */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.sidebar-brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Sidebar User Identity Card */
.sidebar-user-card {
  padding: 12px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  margin-bottom: 16px;
}

.user-avatar {
  background: #e2e8f0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-info {
  min-width: 0;
}

/* Sidebar Navigation */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--text-dark);
  border-radius: 10px;
  font-size: .94rem;
  border: none;
  background: transparent;
  width: 100%;
  transition: all 0.15s ease;
  font-weight: 500;
  text-decoration: none;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link:focus {
  background: rgba(26, 115, 232, 0.08);
  color: var(--brand-blue);
}

.sidebar-nav .nav-link.active {
  background: var(--brand-blue) !important;
  color: #ffffff !important;
}

.sidebar-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 12px 0;
}

/* Glowing Top Accent Line */
.portal-top-accent {
  height: 4px;
  background: linear-gradient(90deg, #1a73e8 0%, #0dcaf0 50%, #198754 100%);
  width: 100%;
}

/* Main Content Area */
.portal-main {
  padding: 0;
  background: var(--bg-main);
  min-height: 100vh;
  overflow-y: auto;
}

/* KPI Statistics Cards */
.kpi-card {
  border: 1px solid #e8ebf4;
  border-radius: 12px;
  padding: 16px 20px;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.pulse-green-dot {
  width: 8px;
  height: 8px;
  background-color: #198754;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.7);
  animation: pulse-green 1.6s infinite;
}

.red-dot {
  width: 8px;
  height: 8px;
  background-color: #dc3545;
  border-radius: 50%;
  display: inline-block;
}

@keyframes pulse-green {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(25, 135, 84, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 5px rgba(25, 135, 84, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(25, 135, 84, 0);
  }
}

/* Cards & Tables */
.ux-section {
  background: #ffffff;
  border: 1px solid #e7eaf1;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.ux-section h5 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-dark);
}

@media (max-width: 991.98px) {
  .portal-shell-auth {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border-color);
  }
}

/* Force system font on password inputs so browsers render standard circular password bullets instead of small dots/dashes from custom fonts */
input[type="password"] {
  font-family: Arial, Helvetica, sans-serif !important;
  letter-spacing: 2px;
}