/* ==========================================================================
   STARADMIN • BACKEND LEADS & ANALYTICS DASHBOARD
   Exact styling matching the Staradmin reference design
   ========================================================================== */

:root {
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Grotesk', monospace;

  /* Staradmin Colors */
  --sidebar-bg: #2B50F6;
  --sidebar-hover: #2243D8;
  --sidebar-active: #1D3ABF;
  --sidebar-text: #FFFFFF;
  --sidebar-text-muted: #A5B4FC;

  --bg-admin: #F4F6F9;
  --bg-card: #FFFFFF;
  --border-color: #E5E7EB;
  --border-subtle: #F3F4F6;

  --text-dark: #111827;
  --text-heading: #1F2937;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;

  --color-blue: #2B50F6;
  --color-purple: #7C3AED;
  --color-teal: #10B981;
  --color-cyan: #06B6D4;
  --color-amber: #F59E0B;
  --color-red: #EF4444;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-admin);
  color: var(--text-dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------------- Layout ---------------- */
.admin-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* ==========================================================================
   SIDEBAR (Staradmin Royal Blue #2B50F6)
   ========================================================================== */
.admin-sidebar {
  width: 255px;
  background-color: var(--sidebar-bg);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  min-height: 100vh;
  padding: 1.5rem 1.25rem;
  transition: all 0.3s ease;
  z-index: 100;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
  padding-left: 0.5rem;
}

.brand-badge-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #6C5CE7;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.brand-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* User Card */
.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(255, 255, 255, 0.12);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
}

.user-avatar-wrapper {
  position: relative;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.user-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.user-status-online {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #10B981;
  border: 2px solid var(--sidebar-bg);
}

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

.user-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #FFFFFF;
}

.user-role {
  font-size: 0.75rem;
  color: var(--sidebar-text-muted);
}

/* Menu */
.sidebar-menu-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sidebar-text-muted);
  margin-bottom: 0.75rem;
  padding-left: 0.5rem;
  font-weight: 600;
}

.menu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.menu-link {
  display: flex;
  align-items: center;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.menu-bullet {
  font-size: 0.85rem;
  margin-right: 0.75rem;
  opacity: 0.7;
}

.menu-text {
  flex-grow: 1;
}

.badge-counter {
  background-color: #EF4444;
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  margin-right: 0.5rem;
}

.menu-arrow {
  font-size: 0.85rem;
  opacity: 0.6;
  transition: transform 0.2s ease;
}

.menu-item:hover .menu-link,
.menu-item.active .menu-link {
  background-color: var(--sidebar-hover);
  color: #FFFFFF;
}

.menu-item.active .menu-link {
  background-color: var(--sidebar-active);
  font-weight: 600;
}

.menu-item:hover .menu-arrow {
  transform: translateX(3px);
  opacity: 1;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1.5rem;
}

.btn-return-site {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
  width: 100%;
}

.btn-return-site:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   MAIN CONTENT & TOP NAVBAR
   ========================================================================= */
.admin-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: var(--bg-admin);
}

.admin-topbar {
  height: 65px;
  background-color: #FFFFFF;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 90;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.topbar-toggle-btn {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-dark);
  cursor: pointer;
}

.topbar-help {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.topbar-help strong {
  color: var(--text-dark);
}

.topbar-lang {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.topbar-center {
  flex-grow: 1;
  max-width: 420px;
  margin: 0 2rem;
}

.search-box input {
  width: 100%;
  padding: 0.55rem 1.15rem;
  background-color: #F9FAFB;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-dark);
  outline: none;
  transition: all 0.2s ease;
}

.search-box input:focus {
  background-color: #FFFFFF;
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(43, 80, 246, 0.1);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.topbar-icon-item {
  position: relative;
  cursor: pointer;
  font-size: 1.15rem;
}

.notify-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  font-size: 0.65rem;
  font-weight: 700;
  color: #FFFFFF;
  border-radius: 50%;
  width: 17px;
  height: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notify-badge.red { background-color: var(--color-red); }
.notify-badge.green { background-color: var(--color-teal); }

.topbar-profile-thumb img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

/* ---------------- Sub-Header & Breadcrumb Bar ---------------- */
.admin-body {
  padding: 1.75rem 2rem 3rem 2rem;
}

.sub-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.25rem;
}

.sub-header-left {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
}

.page-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-dark);
}

.breadcrumb-links {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb-links a {
  text-decoration: none;
  color: var(--text-muted);
}

.breadcrumb-links a:hover,
.breadcrumb-links a.active {
  color: var(--text-dark);
  font-weight: 500;
}

.sep {
  color: #D1D5DB;
  font-size: 0.75rem;
}

.sub-header-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.sub-header-right a {
  text-decoration: none;
  color: var(--text-muted);
}

.sub-header-right a:hover {
  color: var(--text-dark);
}

/* ---------------- Action Ribbon ---------------- */
.action-ribbon {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.ribbon-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.date-range-picker {
  display: flex;
  align-items: center;
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-heading);
}

.arrow-btn {
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--color-blue);
  cursor: pointer;
  padding: 0 0.35rem;
}

.date-text {
  padding: 0 0.5rem;
}

.dropdown-pill {
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-heading);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.link-btn {
  background: none;
  border: none;
  color: var(--color-blue);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0 0.5rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 0.45rem 1rem;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-blue {
  background-color: var(--color-blue);
  color: #FFFFFF;
}

.btn-blue:hover {
  background-color: var(--sidebar-hover);
}

.btn-light {
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  color: var(--text-dark);
}

.btn-light:hover {
  background-color: #F9FAFB;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
}

.btn-block {
  width: 100%;
}

.caret {
  font-size: 0.75rem;
}

/* ==========================================================================
   4-CARD METRIC STRIP (Exact Staradmin Sparklines)
   ========================================================================== */
.metrics-strip-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 1.75rem;
}

.metric-col {
  padding: 1.5rem 1.75rem;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-col:last-child {
  border-right: none;
}

.metric-number {
  font-size: 1.95rem;
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.metric-info-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.metric-labels {
  display: flex;
  flex-direction: column;
}

.metric-title {
  font-size: 0.92rem;
  font-weight: 700;
}

.metric-title.color-blue { color: var(--color-blue); }
.metric-title.color-purple { color: var(--color-purple); }

.metric-delta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.sparkline-wrapper {
  width: 100px;
  height: 38px;
}

/* ==========================================================================
   CHARTS ROW: SALES STATISTICS & NET PROFIT MARGIN RADAR
   ========================================================================== */
.charts-row {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 1.75rem;
  margin-bottom: 1.75rem;
}

.chart-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.25rem;
}

.card-subtitle {
  font-size: 0.78rem;
  color: var(--text-light);
}

.time-filter-pills {
  display: flex;
  gap: 0.35rem;
}

.time-pill {
  background: none;
  border: 1px solid transparent;
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-blue);
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.time-pill.active {
  background-color: var(--color-blue);
  color: #FFFFFF;
}

.chart-metrics-summary {
  display: flex;
  align-items: flex-end;
  gap: 2.5rem;
  margin-bottom: 1.5rem;
}

.chart-metric-item .label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.chart-metric-item .val {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-right: 0.5rem;
}

.chart-metric-item .sub {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chart-legend-group {
  display: flex;
  gap: 1.25rem;
  margin-left: auto;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-line {
  width: 14px;
  height: 3px;
  border-radius: 2px;
}

.legend-line.purple { background-color: var(--color-purple); }
.legend-line.teal { background-color: var(--color-teal); }

.canvas-chart-container {
  width: 100%;
  height: 260px;
  position: relative;
}

#salesWaveChart {
  width: 100%;
  height: 100%;
}

/* Radar Card */
.net-profit-card .card-header-block {
  margin-bottom: 1rem;
}

.radar-legend-row {
  display: flex;
  gap: 1.25rem;
  margin-bottom: 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.legend-dot-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot.cyan { background-color: var(--color-cyan); }
.dot.purple { background-color: var(--color-purple); }

.radar-chart-container {
  width: 100%;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#radarChart {
  max-width: 100%;
  max-height: 100%;
}

/* ==========================================================================
   LEADS DATA TABLE (Staradmin Clean Style)
   ========================================================================== */
.table-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 1.75rem;
}

.table-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.table-filter-tabs {
  display: flex;
  background-color: var(--bg-admin);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  gap: 0.25rem;
}

.table-tab {
  background: none;
  border: none;
  padding: 0.45rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.table-tab.active {
  background-color: #FFFFFF;
  color: var(--color-blue);
  box-shadow: var(--shadow-sm);
}

.table-search-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.table-search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.85rem;
  width: 360px;
}

.table-search-box input {
  border: none;
  outline: none;
  font-size: 0.85rem;
  width: 100%;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

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

.leads-table th {
  padding: 0.85rem 1rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  border-bottom: 1px solid var(--border-color);
  background-color: #F9FAFB;
}

.leads-table td {
  padding: 1rem;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

.leads-table tr:hover {
  background-color: #F9FAFB;
}

.prospect-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.prospect-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #EEF2FF;
  color: var(--color-blue);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

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

.prospect-name {
  font-weight: 700;
  color: var(--text-dark);
}

.prospect-email {
  font-size: 0.78rem;
  color: var(--text-light);
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
}

.status-new { background-color: #FEF3C7; color: #D97706; }
.status-call { background-color: #DBEAFE; color: #2563EB; }
.status-contacted { background-color: #EDE9FE; color: #7C3AED; }
.status-progress { background-color: #D1FAE5; color: #059669; }
.status-closed { background-color: #E0E7FF; color: #4338CA; }

.type-chip {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-admin);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
}

.action-btn-view {
  background: none;
  border: 1px solid var(--border-color);
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-blue);
  cursor: pointer;
}

.action-btn-view:hover {
  background-color: #EEF2FF;
  border-color: var(--color-blue);
}

.table-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.25rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.table-pagination {
  display: flex;
  gap: 0.35rem;
}

.page-btn {
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.page-btn.active {
  background-color: var(--color-blue);
  color: #FFFFFF;
  border-color: var(--color-blue);
}

.page-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ==========================================================================
   FLOATING RIGHT-SIDE TOOLS DOCK (Exact Staradmin Match)
   ========================================================================== */
.floating-quick-dock {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background-color: #FFFFFF;
  border: 1px solid var(--border-color);
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  box-shadow: -4px 6px 16px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  padding: 0.4rem;
  gap: 0.4rem;
  z-index: 1000;
}

.dock-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: none;
  background: none;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-dark);
}

.dock-btn:hover {
  background-color: var(--bg-admin);
}

.dock-btn.btn-green-gear {
  background-color: #D1FAE5;
  color: #059669;
}

.dock-btn.btn-green-gear:hover {
  background-color: #A7F3D0;
}

/* ==========================================================================
   MODALS (View Lead Details & Add New Lead)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background-color: #FFFFFF;
  border-radius: var(--radius-md);
  max-width: 580px;
  width: 100%;
  padding: 2.25rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  position: relative;
  transform: scale(0.95);
  transition: transform 0.2s ease;
}

.modal-backdrop.open .modal-card {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  border: none;
  background: #F3F4F6;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 0.95rem;
  cursor: pointer;
}

.modal-header {
  margin-bottom: 1.5rem;
}

.tag-badge {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--color-blue);
  background-color: #EEF2FF;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 0.5rem;
}

.modal-header h3 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text-dark);
}

.modal-sub {
  font-size: 0.85rem;
  color: var(--text-light);
}

.modal-body-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.detail-row.full-width {
  grid-column: span 2;
}

.detail-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.25rem;
}

.detail-value {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-dark);
}

.detail-value.highlight {
  color: var(--color-blue);
}

.message-quote-box {
  background-color: #F9FAFB;
  border: 1px solid var(--border-color);
  padding: 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-dark);
}

.status-control-flex {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

.form-select, .modal-form input, .modal-form select, .modal-form textarea {
  width: 100%;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-dark);
  outline: none;
}

.form-select:focus, .modal-form input:focus, .modal-form textarea:focus {
  border-color: var(--color-blue);
  box-shadow: 0 0 0 3px rgba(43, 80, 246, 0.1);
}

.modal-footer-actions {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
  padding-top: 1.25rem;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.modal-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-heading);
/* ==========================================================================
   DROPDOWN POPOVERS & MENUS
   ========================================================================== */
.topbar-dropdown-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.dropdown-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 25px -4px rgba(0, 0, 0, 0.12), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  min-width: 170px;
  padding: 0.4rem 0;
  display: flex;
  flex-direction: column;
}

.dropdown-popover.notif-popover {
  width: 320px;
  right: -20px;
  left: auto;
}

.dropdown-popover.profile-popover {
  width: 240px;
  right: 0;
  left: auto;
}

.popover-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.85rem;
  font-weight: 700;
}

.popover-clear {
  background: none;
  border: none;
  font-size: 0.72rem;
  color: var(--color-blue);
  cursor: pointer;
  font-weight: 600;
}

.popover-clear:hover {
  text-decoration: underline;
}

.popover-body {
  max-height: 260px;
  overflow-y: auto;
  padding: 0.4rem 0;
}

.popover-notif-item {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  cursor: pointer;
}

.popover-notif-item:hover {
  background-color: #F9FAFB;
}

.popover-notif-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-dark);
}

.popover-notif-time {
  font-size: 0.7rem;
  color: var(--text-light);
}

.empty-popover {
  padding: 1.5rem 1rem;
  font-size: 0.82rem;
  color: var(--text-light);
  text-align: center;
}

.popover-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 1rem;
  border: none;
  background: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-heading);
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: background 0.15s ease;
}

.popover-item:hover {
  background-color: #F3F4F6;
  color: var(--color-blue);
}

.popover-item.active {
  background-color: #EEF2FF;
  color: var(--color-blue);
  font-weight: 700;
}

.popover-profile-header {
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.popover-profile-header strong {
  font-size: 0.95rem;
  color: var(--text-dark);
}

.popover-profile-header span {
  font-size: 0.78rem;
  color: var(--text-light);
}

.badge-role {
  display: inline-block;
  background: #EEF2FF;
  color: var(--color-blue);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  margin-top: 0.35rem;
}

.popover-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 0.25rem 0;
}

.popover-link-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 0.55rem 1rem;
  font-size: 0.85rem;
  color: var(--text-heading);
  cursor: pointer;
  text-decoration: none;
}

.popover-link-btn:hover {
  background-color: #F3F4F6;
}

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

@media (max-width: 992px) {
  .metrics-strip-card {
    grid-template-columns: repeat(2, 1fr);
  }
  .metric-col:nth-child(2) {
    border-right: none;
  }
  .metric-col {
    border-bottom: 1px solid var(--border-color);
  }
}

@media (max-width: 768px) {
  .admin-sidebar {
    position: fixed;
    transform: translateX(-100%);
  }
  .admin-sidebar.open {
    transform: translateX(0);
  }
  .metrics-strip-card {
    grid-template-columns: 1fr;
  }
  .metric-col {
    border-right: none !important;
  }
  .action-ribbon {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .table-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .table-search-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  .table-search-box {
    width: 100%;
  }
}
