:root {
  --vf-admin-primary: #0056b3;
  --vf-admin-primary-dark: #0a1628;
  --vf-admin-sidebar: #0d2137;
  --vf-admin-sidebar-hover: #143352;
  --vf-admin-accent: #1e88e5;
  --vf-admin-success: #198754;
  --vf-admin-danger: #dc3545;
  --vf-admin-warning: #fd7e14;
}

body.admin-portal {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* Sidebar — width/margins: portal-layout.css; colors: portal-theme.css */
.admin-portal .main-sidebar,
.manager-portal .main-sidebar {
  background: linear-gradient(
    180deg,
    var(--vf-sidebar-bg-start, var(--vf-admin-sidebar)) 0%,
    var(--vf-sidebar-bg-end, var(--vf-admin-primary-dark)) 100%
  ) !important;
}

.admin-portal.sidebar-mini.sidebar-collapse .main-sidebar:hover,
.admin-portal.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused,
.manager-portal.sidebar-mini.sidebar-collapse .main-sidebar:hover,
.manager-portal.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused {
  z-index: 1040 !important;
  overflow-x: visible !important;
}

.admin-portal.sidebar-mini.sidebar-collapse .main-sidebar:hover .brand-link.vf-sidebar-brand,
.manager-portal.sidebar-mini.sidebar-collapse .main-sidebar:hover .brand-link.vf-sidebar-brand {
  width: var(--vf-sidebar-width, 270px) !important;
}

.admin-portal .vf-sidebar-shell {
  padding-top: 0.25rem;
}

/* Brand block — stacked logo + title (avoids AdminLTE float clipping) */
.admin-portal a.brand-link.vf-sidebar-brand,
.manager-portal a.brand-link.vf-sidebar-brand {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  float: none !important;
  width: 100% !important;
  height: auto !important;
  min-height: auto !important;
  line-height: 1.3 !important;
  padding: 1rem 0.75rem 0.85rem !important;
  margin: 0 !important;
  border-bottom: 1px solid var(--vf-sidebar-divider, rgba(255, 255, 255, 0.1)) !important;
  text-decoration: none !important;
  color: var(--vf-sidebar-fg, #fff) !important;
  white-space: normal !important;
  overflow: visible !important;
}

.admin-portal a.brand-link.vf-sidebar-brand:hover,
.manager-portal a.brand-link.vf-sidebar-brand:hover {
  text-decoration: none !important;
  color: var(--vf-sidebar-fg, #fff) !important;
  background: var(--vf-sidebar-brand-hover, rgba(255, 255, 255, 0.04)) !important;
}

.admin-portal .vf-sidebar-brand__logo,
.manager-portal .vf-sidebar-brand__logo {
  float: none !important;
  display: block !important;
  max-height: 42px !important;
  max-width: 100% !important;
  width: auto !important;
  margin: 0 0 0.5rem !important;
  border-radius: 8px !important;
  object-fit: contain !important;
  opacity: 0.95;
  background: transparent !important;
  box-shadow: none !important;
}

.admin-portal .vf-sidebar-brand__title,
.manager-portal .vf-sidebar-brand__title {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 0.25rem !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: var(--vf-sidebar-fg, #fff) !important;
  text-align: center !important;
  line-height: 1.25 !important;
  white-space: normal !important;
  word-wrap: break-word !important;
}

.admin-portal .vf-sidebar-brand__badge,
.manager-portal .vf-sidebar-brand__badge {
  display: inline-block !important;
  margin-top: 0.35rem !important;
  padding: 0.15rem 0.55rem !important;
  font-size: 0.65rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: var(--vf-sidebar-badge-fg, rgba(255, 255, 255, 0.75)) !important;
  background: var(--vf-sidebar-badge-bg, rgba(255, 255, 255, 0.12)) !important;
  border-radius: 4px !important;
}

/* User block */
.admin-portal .vf-sidebar-user,
.manager-portal .vf-sidebar-user {
  display: flex !important;
  align-items: flex-start !important;
  gap: 0.65rem !important;
  padding: 0.85rem 0.85rem 1rem !important;
  margin: 0 !important;
  border-bottom: 1px solid var(--vf-sidebar-divider, rgba(255, 255, 255, 0.1)) !important;
  overflow: visible !important;
}

.admin-portal .vf-sidebar-user__avatar,
.manager-portal .vf-sidebar-user__avatar {
  flex-shrink: 0 !important;
  width: 38px !important;
  height: 38px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 0.95rem !important;
}

.admin-portal .vf-sidebar-user__info,
.manager-portal .vf-sidebar-user__info {
  flex: 1 !important;
  min-width: 0 !important;
  overflow: visible !important;
  white-space: normal !important;
}

.admin-portal .vf-sidebar-user__name,
.manager-portal .vf-sidebar-user__name {
  display: block !important;
  color: var(--vf-sidebar-fg, #fff) !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  text-decoration: none !important;
  overflow: visible !important;
  text-overflow: unset !important;
  white-space: normal !important;
  word-wrap: break-word !important;
}

.admin-portal a.vf-sidebar-user__name:hover,
.manager-portal a.vf-sidebar-user__name:hover {
  color: var(--vf-sidebar-fg, #fff) !important;
  text-decoration: underline !important;
}

.admin-portal .vf-sidebar-user__company,
.manager-portal .vf-sidebar-user__company {
  display: block !important;
  margin-top: 0.15rem !important;
  font-size: 0.75rem !important;
  font-weight: 500 !important;
  color: var(--vf-sidebar-fg-muted, rgba(255, 255, 255, 0.7)) !important;
  line-height: 1.25 !important;
  overflow: visible !important;
  text-overflow: unset !important;
  white-space: normal !important;
  word-wrap: break-word !important;
}

.admin-portal .vf-sidebar-user__role,
.manager-portal .vf-sidebar-user__role {
  display: block !important;
  margin-top: 0.2rem !important;
  font-size: 0.75rem !important;
  color: var(--vf-sidebar-fg-dim, rgba(255, 255, 255, 0.55)) !important;
  line-height: 1.2 !important;
}

/* Hide legacy AdminLTE user-panel clipping if present */
.admin-portal .user-panel .info {
  overflow: visible !important;
  white-space: normal !important;
}

/* Collapsed sidebar (icon-only) — restore labels when flyout expands on hover */
.admin-portal.sidebar-mini.sidebar-collapse .vf-sidebar-brand__title,
.admin-portal.sidebar-mini.sidebar-collapse .vf-sidebar-brand__badge,
.admin-portal.sidebar-mini.sidebar-collapse .vf-sidebar-user__info,
.manager-portal.sidebar-mini.sidebar-collapse .vf-sidebar-brand__title,
.manager-portal.sidebar-mini.sidebar-collapse .vf-sidebar-brand__badge,
.manager-portal.sidebar-mini.sidebar-collapse .vf-sidebar-user__info {
  display: none !important;
}

.admin-portal.sidebar-mini.sidebar-collapse .main-sidebar:hover .vf-sidebar-brand__title,
.admin-portal.sidebar-mini.sidebar-collapse .main-sidebar:hover .vf-sidebar-brand__badge,
.admin-portal.sidebar-mini.sidebar-collapse .main-sidebar:hover .vf-sidebar-user__info,
.admin-portal.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .vf-sidebar-brand__title,
.admin-portal.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .vf-sidebar-brand__badge,
.admin-portal.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .vf-sidebar-user__info,
.manager-portal.sidebar-mini.sidebar-collapse .main-sidebar:hover .vf-sidebar-brand__title,
.manager-portal.sidebar-mini.sidebar-collapse .main-sidebar:hover .vf-sidebar-brand__badge,
.manager-portal.sidebar-mini.sidebar-collapse .main-sidebar:hover .vf-sidebar-user__info,
.manager-portal.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .vf-sidebar-brand__title,
.manager-portal.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .vf-sidebar-brand__badge,
.manager-portal.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .vf-sidebar-user__info {
  display: block !important;
}

.admin-portal.sidebar-mini.sidebar-collapse .vf-sidebar-brand,
.manager-portal.sidebar-mini.sidebar-collapse .vf-sidebar-brand {
  padding: 0.75rem 0.25rem !important;
}

.admin-portal.sidebar-mini.sidebar-collapse .main-sidebar:hover .vf-sidebar-brand,
.admin-portal.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .vf-sidebar-brand,
.manager-portal.sidebar-mini.sidebar-collapse .main-sidebar:hover .vf-sidebar-brand,
.manager-portal.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .vf-sidebar-brand {
  padding: 1rem 0.75rem 0.85rem !important;
}

.admin-portal.sidebar-mini.sidebar-collapse .vf-sidebar-user,
.manager-portal.sidebar-mini.sidebar-collapse .vf-sidebar-user {
  justify-content: center !important;
  padding-left: 0.25rem !important;
  padding-right: 0.25rem !important;
}

.admin-portal.sidebar-mini.sidebar-collapse .main-sidebar:hover .vf-sidebar-user,
.admin-portal.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .vf-sidebar-user,
.manager-portal.sidebar-mini.sidebar-collapse .main-sidebar:hover .vf-sidebar-user,
.manager-portal.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused .vf-sidebar-user {
  justify-content: flex-start !important;
  padding-left: 0.85rem !important;
  padding-right: 0.85rem !important;
}

.admin-portal.sidebar-mini.sidebar-collapse .nav-sidebar .nav-link p,
.manager-portal.sidebar-mini.sidebar-collapse .nav-sidebar .nav-link p {
  overflow: hidden;
}

.admin-portal .nav-sidebar .nav-header,
.manager-portal .nav-sidebar .nav-header {
  color: var(--vf-sidebar-fg-dim, rgba(255, 255, 255, 0.45)) !important;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 1rem 0.75rem 0.35rem;
}

.admin-portal .nav-sidebar .nav-link,
.manager-portal .nav-sidebar .nav-link {
  color: var(--vf-sidebar-fg-muted, rgba(255, 255, 255, 0.85)) !important;
  border-radius: 8px;
  margin: 2px 0.5rem;
  width: calc(100% - 1rem);
}

.admin-portal .nav-sidebar .nav-link:hover,
.manager-portal .nav-sidebar .nav-link:hover {
  background: var(--vf-sidebar-hover-bg, var(--vf-admin-sidebar-hover)) !important;
  color: var(--vf-sidebar-fg, #fff) !important;
}

.admin-portal .nav-sidebar .nav-link.active,
.manager-portal .nav-sidebar .nav-link.active {
  background: var(--vf-admin-primary) !important;
  color: #fff !important;
  box-shadow: 0 4px 12px var(--vf-sidebar-active-shadow, rgba(0, 86, 179, 0.4));
}

.admin-portal .nav-sidebar > .nav-item > .nav-link,
.manager-portal .nav-sidebar > .nav-item > .nav-link {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
}

.admin-portal .nav-sidebar .nav-icon,
.manager-portal .nav-sidebar .nav-icon {
  width: 1.6rem;
  flex-shrink: 0;
  text-align: center;
  margin-right: 0.25rem;
}

.admin-portal .nav-sidebar .nav-link p,
.manager-portal .nav-sidebar .nav-link p {
  margin: 0;
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}

/* Header */
.admin-portal .main-header {
  border-bottom: 1px solid var(--vf-theme-border, #e2e8f0) !important;
}

.admin-portal .portal-badge,
.manager-portal .portal-badge {
  background: var(--vf-admin-primary);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.75rem;
}

/* User session menu (navbar) */
.admin-portal .vf-user-menu,
.manager-portal .vf-user-menu {
  margin-left: 0.35rem;
}

.admin-portal .vf-user-menu__toggle,
.manager-portal .vf-user-menu__toggle {
  display: inline-flex !important;
  align-items: center;
  gap: 0.55rem;
  padding: 0.3rem 0.55rem 0.3rem 0.35rem !important;
  border: 1px solid var(--vf-theme-border, #e2e8f0);
  border-radius: 999px;
  background: var(--vf-theme-surface-elevated, #fff);
  color: var(--vf-theme-text, #0f172a) !important;
  max-width: min(16rem, 42vw);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-portal .vf-user-menu__toggle:hover,
.manager-portal .vf-user-menu__toggle:hover,
.admin-portal .vf-user-menu.show .vf-user-menu__toggle,
.manager-portal .vf-user-menu.show .vf-user-menu__toggle {
  border-color: color-mix(in srgb, var(--vf-admin-primary) 35%, var(--vf-theme-border, #e2e8f0));
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  color: var(--vf-theme-text, #0f172a) !important;
}

.admin-portal .vf-user-menu__toggle::after,
.manager-portal .vf-user-menu__toggle::after {
  display: none;
}

.admin-portal .vf-user-menu__avatar,
.manager-portal .vf-user-menu__avatar {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
}

.admin-portal .vf-user-menu__avatar--lg,
.manager-portal .vf-user-menu__avatar--lg {
  width: 2.75rem;
  height: 2.75rem;
  font-size: 0.95rem;
}

.admin-portal .vf-user-menu__label,
.manager-portal .vf-user-menu__label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  line-height: 1.2;
}

.admin-portal .vf-user-menu__name,
.manager-portal .vf-user-menu__name {
  font-size: 0.8125rem;
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-portal .vf-user-menu__role,
.manager-portal .vf-user-menu__role {
  font-size: 0.6875rem;
  color: var(--vf-theme-text-muted, #64748b);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-portal .vf-user-menu__caret,
.manager-portal .vf-user-menu__caret {
  flex-shrink: 0;
  font-size: 0.6rem;
  color: var(--vf-theme-text-muted, #64748b);
  margin-left: 0.1rem;
}

.admin-portal .vf-user-menu__panel,
.manager-portal .vf-user-menu__panel {
  width: min(18rem, calc(100vw - 1.5rem));
  margin-top: 0.45rem;
  padding: 0;
  border: 1px solid var(--vf-theme-border, #e2e8f0);
  border-radius: 0.85rem;
  overflow: hidden;
}

.admin-portal .vf-user-menu__header,
.manager-portal .vf-user-menu__header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  background: color-mix(in srgb, var(--vf-admin-primary) 6%, var(--vf-theme-surface-elevated, #fff));
  border-bottom: 1px solid var(--vf-theme-border, #e2e8f0);
}

.admin-portal .vf-user-menu__meta,
.manager-portal .vf-user-menu__meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.1rem;
}

.admin-portal .vf-user-menu__meta-name,
.manager-portal .vf-user-menu__meta-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--vf-theme-text, #0f172a);
  line-height: 1.25;
  word-break: break-word;
}

.admin-portal .vf-user-menu__meta-email,
.manager-portal .vf-user-menu__meta-email {
  font-size: 0.78rem;
  color: var(--vf-theme-text-muted, #64748b);
  line-height: 1.3;
  word-break: break-all;
}

.admin-portal .vf-user-menu__meta-role,
.manager-portal .vf-user-menu__meta-role {
  margin-top: 0.15rem;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--vf-admin-primary);
}

.admin-portal .vf-user-menu__actions,
.manager-portal .vf-user-menu__actions {
  padding: 0.35rem;
}

.admin-portal .vf-user-menu__action,
.manager-portal .vf-user-menu__action {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.7rem;
  border-radius: 0.55rem;
  text-decoration: none !important;
  color: var(--vf-theme-text, #0f172a);
  transition: background-color 0.15s ease;
}

.admin-portal .vf-user-menu__action:hover,
.manager-portal .vf-user-menu__action:hover {
  background: var(--vf-theme-table-hover, #f1f5f9);
  color: var(--vf-theme-text, #0f172a);
}

.admin-portal .vf-user-menu__action-icon,
.manager-portal .vf-user-menu__action-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.45rem;
  background: var(--vf-theme-surface, #f8fafc);
  color: var(--vf-theme-text-muted, #64748b);
  font-size: 0.85rem;
}

.admin-portal .vf-user-menu__action-body,
.manager-portal .vf-user-menu__action-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.admin-portal .vf-user-menu__action-title,
.manager-portal .vf-user-menu__action-title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
}

.admin-portal .vf-user-menu__action-hint,
.manager-portal .vf-user-menu__action-hint {
  font-size: 0.72rem;
  color: var(--vf-theme-text-muted, #64748b);
  line-height: 1.2;
}

.admin-portal .vf-user-menu__action-arrow,
.manager-portal .vf-user-menu__action-arrow {
  flex-shrink: 0;
  font-size: 0.65rem;
  color: var(--vf-theme-text-muted, #94a3b8);
}

.admin-portal .vf-user-menu__action--danger,
.manager-portal .vf-user-menu__action--danger {
  margin-top: 0.15rem;
  border-top: 1px solid var(--vf-theme-border, #e2e8f0);
  border-radius: 0;
  padding-top: 0.8rem;
}

.admin-portal .vf-user-menu__action--danger .vf-user-menu__action-icon,
.manager-portal .vf-user-menu__action--danger .vf-user-menu__action-icon {
  background: rgba(220, 53, 69, 0.1);
  color: var(--vf-admin-danger, #dc3545);
}

.admin-portal .vf-user-menu__action--danger .vf-user-menu__action-title,
.manager-portal .vf-user-menu__action--danger .vf-user-menu__action-title {
  color: var(--vf-admin-danger, #dc3545);
}

.admin-portal .vf-user-menu__action--danger:hover,
.manager-portal .vf-user-menu__action--danger:hover {
  background: rgba(220, 53, 69, 0.08);
}

@media (max-width: 575.98px) {
  .admin-portal .vf-user-menu__label,
  .manager-portal .vf-user-menu__label,
  .admin-portal .vf-user-menu__caret,
  .manager-portal .vf-user-menu__caret {
    display: none;
  }

  .admin-portal .vf-user-menu__toggle,
  .manager-portal .vf-user-menu__toggle {
    padding: 0.2rem !important;
    border-radius: 50%;
  }
}

/* Content */
.admin-portal .content-wrapper {
  background: var(--vf-theme-surface, #f0f4f8);
}

.manager-portal .content-wrapper {
  background: var(--vf-theme-surface, #f0f4f8);
}

.vf-dashboard-crystal {
  position: relative;
}

.admin-portal .content-header {
  padding: 1rem 0 0.5rem;
}

.admin-portal .content-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--vf-theme-text, var(--vf-admin-primary-dark));
}

.admin-portal .content {
  padding-bottom: 2rem;
}

/* Stat cards — crystal glass */
.vf-stat-card {
  border: none;
  border-radius: 16px;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  overflow: hidden;
  position: relative;
  backdrop-filter: blur(8px);
}

.vf-stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28) 0%, transparent 45%, rgba(255, 255, 255, 0.08) 100%);
  pointer-events: none;
}

.vf-stat-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.vf-stat-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.vf-stat-card .stat-icon {
  font-size: 2.75rem;
  opacity: 0.22;
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.vf-stat-card .stat-value {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  position: relative;
  z-index: 1;
}

.vf-stat-card .stat-label {
  font-size: 0.875rem;
  opacity: 0.92;
  margin: 0;
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.vf-stat-card.stat-primary { background: linear-gradient(145deg, #004494 0%, #1e88e5 50%, #42a5f5 100%); color: #fff; }
.vf-stat-card.stat-success { background: linear-gradient(145deg, #0d6832 0%, #20c997 50%, #3dd9a8 100%); color: #fff; }
.vf-stat-card.stat-warning { background: linear-gradient(145deg, #c86a0a 0%, #f39c12 50%, #f5b942 100%); color: #fff; }
.vf-stat-card.stat-danger { background: linear-gradient(145deg, #a71d2a 0%, #e74c3c 50%, #ff6b6b 100%); color: #fff; }
.vf-stat-card.stat-info { background: linear-gradient(145deg, #0a3d7a 0%, #1976d2 50%, #64b5f6 100%); color: #fff; }

/* Dashboard overview list — flat rows, no nested list-group indent */
.vf-overview-list {
  border-top: 1px solid var(--vf-theme-border, #e2e8f0);
}

.vf-overview-list__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.35rem;
  border-bottom: 1px solid var(--vf-theme-border, #e2e8f0);
  color: var(--vf-theme-text, inherit);
  transition: background 0.15s;
}

.vf-overview-list__row:hover {
  background: rgba(0, 86, 179, 0.03);
}

.vf-overview-list__row:last-child {
  border-bottom: none;
}

.vf-overview-list__row span {
  color: var(--vf-theme-text-muted, #64748b);
}

.vf-overview-list__row strong {
  color: var(--vf-theme-text, inherit);
  font-size: 1.1rem;
}

.vf-stat-card a.stat-footer {
  display: block;
  padding: 0.55rem 1rem;
  background: rgba(0, 0, 0, 0.15);
  color: inherit;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.85rem;
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.2s;
}

.vf-stat-card a.stat-footer:hover {
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
}

/* Dashboard mini stat tiles */
.vf-mini-stat {
  border: none;
  border-radius: 14px;
  background: var(--vf-theme-surface-elevated, #fff);
  box-shadow:
    0 2px 16px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.vf-mini-stat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--vf-mini-stat-accent, var(--vf-admin-primary)), transparent);
}

.vf-mini-stat:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.vf-mini-stat__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  background: rgba(0, 86, 179, 0.1);
  color: var(--vf-admin-primary);
}

.vf-mini-stat--primary { --vf-mini-stat-accent: #0056b3; }
.vf-mini-stat--primary .vf-mini-stat__icon { background: rgba(0, 86, 179, 0.12); color: #0056b3; }
.vf-mini-stat--warning { --vf-mini-stat-accent: #f39c12; }
.vf-mini-stat--warning .vf-mini-stat__icon { background: rgba(243, 156, 18, 0.12); color: #e67e22; }
.vf-mini-stat--info { --vf-mini-stat-accent: #42a5f5; }
.vf-mini-stat--info .vf-mini-stat__icon { background: rgba(66, 165, 245, 0.12); color: #1976d2; }
.vf-mini-stat--secondary { --vf-mini-stat-accent: #64748b; }
.vf-mini-stat--secondary .vf-mini-stat__icon { background: rgba(100, 116, 139, 0.12); color: #64748b; }

.vf-mini-stat__value {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--vf-theme-text, #1e293b);
}

.vf-mini-stat__label {
  font-size: 0.8rem;
  color: var(--vf-theme-text-muted, #64748b);
  font-weight: 500;
}

/* Shift summary cards (manager dashboard + shifts) */
.vf-shift-card {
  display: flex;
  flex-direction: column;
}

.vf-shift-card--active {
  border-color: rgba(25, 135, 84, 0.45) !important;
  box-shadow:
    0 2px 16px rgba(25, 135, 84, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.vf-shift-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.vf-shift-card__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  line-height: 1.3;
}

.vf-shift-card__time {
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.vf-shift-card__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: auto;
}

.vf-shift-card__stat {
  text-align: center;
  padding: 0.65rem 0.5rem;
  border-radius: 10px;
  background: rgba(0, 86, 179, 0.04);
}

.vf-shift-card--active .vf-shift-card__stat:last-child {
  background: rgba(25, 135, 84, 0.06);
}

.vf-shift-card__stat .vf-mini-stat__value,
.vf-shift-card__stat .vf-shift-card__value {
  margin-bottom: 0.35rem;
}

.vf-shift-card__stat .vf-mini-stat__label,
.vf-shift-card__stat .vf-shift-card__label {
  display: block;
  margin-top: 0.15rem;
}

/* Cards — crystal glass */
.admin-portal .vf-admin-card,
.manager-portal .vf-admin-card {
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 16px;
  box-shadow:
    0 4px 24px var(--vf-theme-shadow, rgba(0, 0, 0, 0.06)),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  margin-bottom: 1.5rem;
  background: var(--vf-theme-surface-elevated, #fff);
  overflow: hidden;
}

.admin-portal .vf-crystal-card,
.manager-portal .vf-crystal-card {
  backdrop-filter: blur(12px);
}

/* Map cards — no glass blur / overflow clip (breaks Leaflet tiles) */
.admin-portal .vf-map-card,
.manager-portal .vf-map-card,
.admin-portal .vf-crystal-card:has(.leaflet-container),
.manager-portal .vf-crystal-card:has(.leaflet-container),
.admin-portal .vf-crystal-card:has(.vf-live-map),
.manager-portal .vf-crystal-card:has(.vf-live-map) {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: visible;
}

.admin-portal .vf-map-card .card-body,
.manager-portal .vf-map-card .card-body,
.admin-portal .vf-crystal-card:has(.leaflet-container) .card-body,
.manager-portal .vf-crystal-card:has(.leaflet-container) .card-body {
  overflow: visible;
}

.admin-portal .vf-admin-card .card-header,
.manager-portal .vf-admin-card .card-header,
.admin-portal .card-header.d-flex,
.manager-portal .card-header.d-flex {
  background: var(--vf-theme-surface-elevated, #fff);
  border-bottom: 1px solid var(--vf-theme-border-subtle, #e8eef4);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
  width: 100%;
}

/* AdminLTE clearfix ::after becomes a 3rd flex item and centers toolbar buttons */
.admin-portal .vf-admin-card .card-header::after,
.manager-portal .vf-admin-card .card-header::after,
.admin-portal .card-header.d-flex::after,
.manager-portal .card-header.d-flex::after,
.admin-portal .vf-list-filters-card__header::after,
.manager-portal .vf-list-filters-card__header::after {
  display: none;
  content: none;
}

/* AdminLTE floats .card-title — breaks flex; keep header actions on the right */
.admin-portal .vf-admin-card .card-header .card-title,
.manager-portal .vf-admin-card .card-header .card-title,
.admin-portal .card-header.d-flex .card-title,
.manager-portal .card-header.d-flex .card-title {
  float: none;
  flex: 0 1 auto;
  min-width: 0;
  margin-right: auto;
}

.admin-portal .vf-admin-card .card-header > .vf-card-toolbar,
.manager-portal .vf-admin-card .card-header > .vf-card-toolbar,
.admin-portal .card-header.d-flex > .vf-card-toolbar,
.manager-portal .card-header.d-flex > .vf-card-toolbar,
.admin-portal .vf-admin-card .card-header > .card-tools,
.manager-portal .vf-admin-card .card-header > .card-tools,
.admin-portal .card-header.d-flex > .card-tools,
.manager-portal .card-header.d-flex > .card-tools,
.admin-portal .vf-admin-card .card-header > a.btn,
.manager-portal .vf-admin-card .card-header > a.btn,
.admin-portal .card-header.d-flex > a.btn,
.manager-portal .card-header.d-flex > a.btn {
  margin-left: auto;
  flex-shrink: 0;
  float: none;
}

/* Title block + toolbar (e.g. attendance evaluation summary) */
.admin-portal .vf-admin-card .card-header > div:first-child:not(.vf-card-toolbar),
.manager-portal .vf-admin-card .card-header > div:first-child:not(.vf-card-toolbar),
.admin-portal .card-header.d-flex > div:first-child:not(.vf-card-toolbar),
.manager-portal .card-header.d-flex > div:first-child:not(.vf-card-toolbar) {
  flex: 0 1 auto;
  min-width: 0;
  margin-right: auto;
}

/* List card toolbar: record count + search (BS4 — no gap-2 utility) */
.vf-card-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  margin-left: auto;
  gap: 0.625rem;
}

/* —— List page filters —— */
.vf-list-filters-card {
  border: 1px solid var(--vf-theme-border, #e2e8f0);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.vf-list-filters-card__header {
  padding: 0.7rem 1rem;
  background: var(--vf-theme-surface-elevated, #f8fafc);
  border-bottom: 1px solid var(--vf-theme-border, #e2e8f0);
  min-height: auto;
}

.vf-list-filters-card__header .card-title {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--vf-theme-text, #1e293b);
}

.vf-list-filters-card__badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.35em 0.65em;
}

.vf-list-filters-card__body {
  padding: 1rem 1rem 0.85rem;
}

.vf-list-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.85rem 1rem;
  width: 100%;
  margin: 0;
}

.vf-list-filters__fields {
  display: flex;
  flex: 1 1 12rem;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.85rem 1rem;
  min-width: 0;
}

.vf-filter-field {
  flex: 1 1 10.5rem;
  min-width: 10.5rem;
  max-width: 16rem;
}

.vf-filter-field__label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 0.35rem;
  color: var(--vf-theme-text-muted, #475569);
}

.vf-filter-field__label-icon {
  font-size: 0.7rem;
  opacity: 0.75;
  width: 0.875rem;
  text-align: center;
}

.vf-filter-control-wrap {
  position: relative;
}

.vf-filter-control-wrap--select .vf-filter-field__control {
  cursor: pointer;
}

.vf-filter-control-wrap__icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  font-size: 0.875rem;
  color: var(--vf-theme-text-muted, #64748b);
  opacity: 0.9;
  pointer-events: none;
}

.vf-filter-control-wrap__chevron {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.65rem;
  color: var(--vf-theme-text-muted, #94a3b8);
  pointer-events: none;
}

.admin-portal .vf-filter-field__control,
.manager-portal .vf-filter-field__control,
.vf-attendance-filters .vf-filter-field__control {
  width: 100%;
  max-width: none;
  min-height: 2.5rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--vf-theme-text, #1e293b);
  background-color: var(--vf-theme-input-bg, #fff);
  border: 1px solid var(--vf-theme-border, #cbd5e1);
  border-radius: 8px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-portal .vf-filter-field__control--select,
.manager-portal .vf-filter-field__control--select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: none;
}

.admin-portal .vf-filter-field__control::placeholder,
.manager-portal .vf-filter-field__control::placeholder {
  color: var(--vf-theme-text-muted, #94a3b8);
  opacity: 1;
}

.admin-portal .vf-filter-field__control:hover,
.manager-portal .vf-filter-field__control:hover {
  border-color: var(--vf-theme-border-strong, #94a3b8);
}

.admin-portal .vf-filter-field__control:focus,
.manager-portal .vf-filter-field__control:focus {
  border-color: var(--vf-admin-primary, #0056b3);
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.15);
  outline: none;
}

body.manager-portal .vf-filter-field__control:focus {
  border-color: var(--vf-admin-primary, #157347);
  box-shadow: 0 0 0 3px rgba(21, 115, 71, 0.18);
}

.admin-portal .vf-filter-control-wrap--search .vf-filter-field__control,
.manager-portal .vf-filter-control-wrap--search .vf-filter-field__control {
  padding-left: 2.75rem;
  text-indent: 0;
}

.admin-portal .vf-filter-control-wrap--select .vf-filter-field__control,
.manager-portal .vf-filter-control-wrap--select .vf-filter-field__control {
  padding-right: 2.5rem;
}

.admin-portal .vf-filter-field__control--search::-webkit-search-cancel-button,
.manager-portal .vf-filter-field__control--search::-webkit-search-cancel-button {
  margin-right: 0.15rem;
}

.vf-filter-field--search {
  flex: 2 1 14rem;
  min-width: 14rem;
  max-width: 22rem;
}

.vf-filter-field--date {
  flex: 0 1 10.5rem;
  min-width: 10.5rem;
  max-width: 11.5rem;
}

.vf-filter-field--company {
  flex: 1 1 12rem;
  min-width: 12rem;
  max-width: 18rem;
}

.vf-filter-field--site,
.vf-filter-field--guard {
  flex: 1 1 11rem;
  min-width: 11rem;
  max-width: 16rem;
}

.vf-filter-actions {
  display: inline-flex;
  flex: 0 0 auto;
  flex-flow: row nowrap;
  align-items: center;
  justify-content: flex-end;
  align-self: flex-end;
  gap: 0.5rem;
  margin-left: auto;
}

/* Many filters: fields wrap, actions on their own row aligned right */
.vf-list-filters__fields:has(.vf-filter-field:nth-child(4)) ~ .vf-filter-actions {
  width: 100%;
  margin-left: 0;
  padding-top: 0.15rem;
}

.vf-filter-btn {
  min-height: 2.5rem;
  padding: 0.45rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 8px;
  white-space: nowrap;
}

.vf-filter-btn--apply {
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.vf-active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed var(--vf-theme-border, #e2e8f0);
}

.vf-active-filters__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--vf-theme-text-muted, #64748b);
  margin-right: 0.15rem;
}

.vf-active-filters__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  line-height: 1.3;
  color: var(--vf-theme-text, #334155);
  background: var(--vf-theme-surface-elevated, #f1f5f9);
  border: 1px solid var(--vf-theme-border, #e2e8f0);
  border-radius: 999px;
}

.vf-active-filters__chip-label {
  font-weight: 600;
  color: var(--vf-theme-text-muted, #64748b);
}

.vf-active-filters__chip-value {
  font-weight: 600;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  .vf-list-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .vf-list-filters__fields {
    flex-direction: column;
    width: 100%;
  }

  .vf-filter-field,
  .vf-filter-field--search,
  .vf-filter-field--date,
  .vf-filter-field--company,
  .vf-filter-field--site,
  .vf-filter-field--guard {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .vf-filter-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }
}

.vf-card-toolbar__count {
  flex-shrink: 0;
  white-space: nowrap;
}

.admin-portal .vf-table-search,
.manager-portal .vf-table-search {
  width: 220px;
  max-width: 100%;
  min-width: 140px;
  min-height: 2.25rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 8px;
  background-color: var(--vf-theme-input-bg, #fff);
  border: 1px solid var(--vf-theme-border, #cbd5e1);
  color: var(--vf-theme-text, #1e293b);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.admin-portal .vf-table-search::placeholder,
.manager-portal .vf-table-search::placeholder {
  color: var(--vf-theme-text-muted, #94a3b8);
  opacity: 1;
}

.admin-portal .vf-table-search:focus,
.manager-portal .vf-table-search:focus {
  border-color: var(--vf-admin-primary, #0056b3);
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.15);
  outline: none;
}

body.manager-portal .vf-table-search:focus {
  border-color: var(--vf-admin-primary, #157347);
  box-shadow: 0 0 0 0.2rem rgba(21, 115, 71, 0.25);
}

.admin-portal .vf-admin-card .card-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--vf-theme-text, var(--vf-admin-primary-dark));
}

.admin-portal .vf-admin-card .card-title i,
.manager-portal .vf-admin-card .card-title i {
  color: var(--vf-theme-link, var(--vf-admin-primary));
  margin-right: 0.35rem;
}

/* Tables — crystal polish */
.admin-portal .vf-admin-card .table,
.manager-portal .vf-admin-card .table,
.admin-portal .card.vf-admin-card .table,
.manager-portal .card.vf-admin-card .table {
  margin-bottom: 0;
}

.admin-portal .table thead th,
.manager-portal .table thead th {
  background: linear-gradient(180deg, var(--vf-theme-table-head, #f8fafc) 0%, rgba(248, 250, 252, 0.85) 100%);
  border-bottom: 2px solid var(--vf-theme-border, #e2e8f0);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--vf-theme-table-head-text, var(--vf-theme-text-muted, #64748b));
  font-weight: 700;
  white-space: nowrap;
  padding: 0.85rem 1rem;
  position: sticky;
  top: 0;
  z-index: 2;
}

.admin-portal .table tbody td,
.manager-portal .table tbody td {
  padding: 0.85rem 1rem;
  vertical-align: middle;
  border-top-color: var(--vf-theme-border-subtle, rgba(0, 0, 0, 0.04));
}

.admin-portal .table tbody tr,
.manager-portal .table tbody tr {
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.admin-portal .table tbody tr:hover,
.manager-portal .table tbody tr:hover {
  background: var(--vf-theme-table-hover, rgba(0, 86, 179, 0.04));
  box-shadow: inset 3px 0 0 var(--vf-admin-primary, #0056b3);
}

body.manager-portal .table tbody tr:hover {
  box-shadow: inset 3px 0 0 var(--vf-admin-success, #157347);
}

.admin-portal .table tbody tr:nth-child(even):not(:hover):not(.table-danger),
.manager-portal .table tbody tr:nth-child(even):not(:hover):not(.table-danger) {
  background: rgba(0, 0, 0, 0.015);
}


/* Table row action buttons — crystal icons */
.vf-table-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.35rem;
  white-space: nowrap;
}

.vf-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  border: none;
  border-radius: 10px;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.vf-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.vf-action-btn:active {
  transform: translateY(0);
}

.vf-action-btn--view {
  background: linear-gradient(145deg, #e8eef4, #f8fafc);
  color: #475569 !important;
}

.vf-action-btn--view:hover {
  background: linear-gradient(145deg, #dbeafe, #eff6ff);
  color: #1d4ed8 !important;
}

.vf-action-btn--edit {
  background: linear-gradient(145deg, #dbeafe, #bfdbfe);
  color: #1d4ed8 !important;
}

.vf-action-btn--edit:hover {
  background: linear-gradient(145deg, #bfdbfe, #93c5fd);
  color: #1e40af !important;
}

.vf-action-btn--map {
  background: linear-gradient(145deg, #d1fae5, #a7f3d0);
  color: #047857 !important;
}

.vf-action-btn--map:hover {
  background: linear-gradient(145deg, #a7f3d0, #6ee7b7);
  color: #065f46 !important;
}

.vf-action-btn--open {
  background: linear-gradient(145deg, #fee2e2, #fecaca);
  color: #b91c1c !important;
}

.vf-action-btn--open:hover {
  background: linear-gradient(145deg, #fecaca, #fca5a5);
  color: #991b1b !important;
}

.vf-action-btn--play {
  background: linear-gradient(145deg, #dbeafe, #bfdbfe);
  color: #1d4ed8 !important;
}

.vf-action-btn--play:hover {
  background: linear-gradient(145deg, #bfdbfe, #93c5fd);
  color: #1e40af !important;
}

/* SOS workflow pills inside action cells */
.vf-table-actions--wide {
  flex-wrap: wrap;
  gap: 0.3rem;
}

.vf-table-actions .vf-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.65rem;
  border: none;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.vf-table-actions .vf-action-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.vf-action-pill--warning { background: linear-gradient(145deg, #fef3c7, #fde68a); color: #92400e; }
.vf-action-pill--info { background: linear-gradient(145deg, #dbeafe, #bfdbfe); color: #1e40af; }
.vf-action-pill--success { background: linear-gradient(145deg, #d1fae5, #a7f3d0); color: #065f46; }
.vf-action-pill--danger { background: linear-gradient(145deg, #fee2e2, #fecaca); color: #991b1b; }
.vf-action-pill--muted { background: linear-gradient(145deg, #f1f5f9, #e2e8f0); color: #475569; }

/* Review list pages (leaves, advances) */
.vf-review-list-card__subtitle {
  font-size: 0.8125rem;
  color: var(--vf-theme-text-muted, #64748b);
}

/* Segmented status filter — single track, white active tab */
.vf-segmented-control {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.25rem;
  width: 100%;
  padding: 0.3rem;
  border-radius: 12px;
  background: #edf1f5;
  border: 1px solid #e2e8f0;
}

.vf-segmented-control__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  min-height: 3.1rem;
  padding: 0.45rem 0.35rem;
  border-radius: 9px;
  text-decoration: none !important;
  color: #64748b;
  transition: background 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.vf-segmented-control__item:hover:not(.is-active) {
  background: rgba(255, 255, 255, 0.55);
  color: #334155;
}

.vf-segmented-control__item.is-active {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.vf-segmented-control__label {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.vf-segmented-control__item.is-active .vf-segmented-control__label {
  font-weight: 800;
}

.vf-segmented-control__count {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
  color: #94a3b8;
}

.vf-segmented-control__item.is-active .vf-segmented-control__count {
  color: #475569;
}

.vf-segmented-control__item--pending.is-active .vf-segmented-control__count { color: #d97706; }
.vf-segmented-control__item--approved.is-active .vf-segmented-control__count { color: #16a34a; }
.vf-segmented-control__item--rejected.is-active .vf-segmented-control__count { color: #dc2626; }
.vf-segmented-control__item--all.is-active .vf-segmented-control__count { color: #157347; }

body.manager-portal .vf-segmented-control__item--all.is-active .vf-segmented-control__count {
  color: #157347;
}

.vf-segmented-control__item::after {
  content: '';
  display: block;
  width: 1.5rem;
  height: 3px;
  margin-top: 0.2rem;
  border-radius: 999px;
  background: transparent;
}

.vf-segmented-control__item--pending.is-active::after { background: #f59e0b; }
.vf-segmented-control__item--approved.is-active::after { background: #22c55e; }
.vf-segmented-control__item--rejected.is-active::after { background: #ef4444; }
.vf-segmented-control__item--all.is-active::after { background: #157347; }

@media (max-width: 575.98px) {
  .vf-segmented-control {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .vf-segmented-control__label {
    font-size: 0.74rem;
  }

  .vf-segmented-control__count {
    font-size: 0.95rem;
  }
}

.vf-leave-ref {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--vf-theme-text-muted, #64748b);
  background: rgba(15, 23, 42, 0.05);
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
}

.vf-leave-type-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.vf-leave-type-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: rgba(0, 86, 179, 0.08);
  color: #1d4ed8;
}

.vf-leave-days {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--vf-theme-text-muted, #64748b);
}

.vf-date-stack {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.84rem;
}

.vf-review-table.table-sm td,
.vf-review-table.table-sm th {
  padding: 0.72rem 0.85rem;
  vertical-align: middle;
}

.vf-leave-date-filters {
  width: 100%;
  padding-top: 0.15rem;
  border-top: 1px solid var(--vf-theme-border, #e2e8f0);
}

.vf-leave-date-filters__grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.85rem 1rem;
  align-items: end;
}

.vf-leave-date-filters__group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.vf-leave-date-filters__group-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--vf-theme-text-muted, #64748b);
}

.vf-leave-date-filters__group-label i {
  margin-right: 0.3rem;
  opacity: 0.85;
}

.vf-leave-date-filters__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.vf-leave-date-filters__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 0.1rem;
}

.vf-leave-date-filters__hint {
  margin-top: 0.65rem;
  font-size: 0.78rem;
  color: var(--vf-theme-text-muted, #64748b);
}

@media (max-width: 991.98px) {
  .vf-leave-date-filters__grid {
    grid-template-columns: 1fr;
  }

  .vf-leave-date-filters__actions {
    justify-content: flex-start;
  }
}

.vf-review-list-card .card-header {
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
  padding-bottom: 0.85rem;
}

.vf-review-list-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
}

.vf-review-table thead th {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--vf-theme-text-muted, #64748b);
  border-bottom-width: 1px;
  white-space: nowrap;
}

.vf-review-table tbody tr.vf-review-row--pending {
  background: rgba(251, 191, 36, 0.07);
}

.vf-review-table tbody tr.vf-review-row--pending:hover {
  background: rgba(251, 191, 36, 0.12);
}

.vf-person-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 10rem;
}

.vf-person-cell__avatar {
  flex-shrink: 0;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: linear-gradient(145deg, #dbeafe, #bfdbfe);
  color: #1e40af;
}

body.manager-portal .vf-person-cell__avatar {
  background: linear-gradient(145deg, #d1fae5, #a7f3d0);
  color: #065f46;
}

.vf-person-cell__name {
  font-weight: 600;
  color: var(--vf-theme-text, #1e293b);
  line-height: 1.25;
}

.vf-person-cell__meta {
  font-size: 0.75rem;
  color: var(--vf-theme-text-muted, #64748b);
  line-height: 1.3;
}

.vf-cell-subject {
  font-weight: 600;
  color: var(--vf-theme-text, #1e293b);
  line-height: 1.3;
}

.vf-cell-desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.8rem;
  color: var(--vf-theme-text-muted, #64748b);
  margin-top: 0.2rem;
  line-height: 1.35;
  max-width: 16rem;
}

.vf-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: capitalize;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.vf-status-pill--pending {
  background: #fef3c7;
  color: #92400e;
}

.vf-status-pill--approved {
  background: #dcfce7;
  color: #166534;
}

.vf-status-pill--rejected {
  background: #fee2e2;
  color: #991b1b;
}

.vf-review-meta {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--vf-theme-text-muted, #64748b);
  line-height: 1.35;
  max-width: 11rem;
}

.vf-date-range {
  font-size: 0.875rem;
  white-space: nowrap;
}

.vf-date-range__sep {
  color: var(--vf-theme-text-muted, #94a3b8);
  margin: 0 0.15rem;
}

.vf-review-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.vf-review-actions form {
  margin: 0;
}

.vf-review-actions .vf-action-pill {
  border: none;
  cursor: pointer;
}

.admin-portal .table-empty,
.manager-portal .table-empty {
  padding: 3rem 1rem !important;
  color: var(--vf-theme-text-muted, #94a3b8);
  text-align: center;
}

.admin-portal .table-empty i,
.manager-portal .table-empty i {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}

/* Quick actions */
.vf-quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.vf-quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.1rem 0.75rem;
  background: linear-gradient(145deg, var(--vf-theme-surface-elevated, #fff) 0%, rgba(248, 250, 252, 0.9) 100%);
  border: 1px solid var(--vf-theme-border, #e2e8f0);
  border-radius: 14px;
  color: var(--vf-theme-text, var(--vf-admin-primary-dark));
  text-decoration: none;
  transition: all 0.22s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.vf-quick-action::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.5) 0%, transparent 60%);
  pointer-events: none;
}

.vf-quick-action:hover {
  border-color: var(--vf-admin-primary);
  color: var(--vf-admin-primary);
  box-shadow: 0 8px 24px rgba(0, 86, 179, 0.18);
  transform: translateY(-3px);
}

.vf-quick-action i {
  font-size: 1.6rem;
  margin-bottom: 0.55rem;
  color: var(--vf-admin-primary);
  filter: drop-shadow(0 2px 4px rgba(0, 86, 179, 0.15));
  position: relative;
  z-index: 1;
}

.vf-quick-action span {
  font-size: 0.8rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}

/* Settings page polish */
.admin-portal .vf-settings-page .vf-admin-card {
  margin-bottom: 1rem !important;
}

.admin-portal .vf-settings-page .card-body {
  padding: 1.1rem 1.25rem;
}

.admin-portal .vf-settings-page .form-label {
  display: block !important;
  width: 100%;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--vf-theme-text, #1f2937);
}

.admin-portal .vf-settings-page .form-text,
.admin-portal .vf-settings-page .text-muted.small {
  font-size: 0.85rem;
  line-height: 1.35;
  color: var(--vf-theme-text-muted, #6b7280) !important;
}

.admin-portal .vf-settings-page .form-control,
.admin-portal .vf-settings-page .form-select {
  display: block !important;
  width: 100% !important;
  max-width: 100%;
  min-height: 2.65rem;
  border-radius: 0.6rem;
}

.admin-portal .vf-settings-page textarea.form-control {
  width: 100% !important;
  min-height: auto;
}

.admin-portal .vf-settings-page .form-check {
  margin-bottom: 0.65rem;
}

.admin-portal .vf-settings-page .form-check-label {
  font-weight: 500;
}

.admin-portal .vf-settings-page .form-check:not(.form-switch) {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-left: 0;
}

.admin-portal .vf-settings-page .form-check:not(.form-switch) .form-check-input {
  float: none !important;
  margin: 0;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 0.3rem;
  border: 1px solid var(--vf-theme-border, #94a3b8);
  background-color: var(--vf-theme-surface-elevated, #fff);
  cursor: pointer;
}

.admin-portal .vf-settings-page .form-check:not(.form-switch) .form-check-input:focus {
  border-color: var(--vf-theme-link, var(--vf-admin-primary));
  box-shadow: 0 0 0 0.18rem rgba(37, 99, 235, 0.18);
}

.admin-portal .vf-settings-page .form-check:not(.form-switch) .form-check-label {
  margin-bottom: 0;
}

.admin-portal .vf-settings-page .form-switch {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding-left: 0;
}

.admin-portal .vf-settings-page .form-switch .form-check-input {
  float: none !important;
  position: static !important;
  flex: 0 0 auto;
  appearance: none;
  -webkit-appearance: none;
  margin-left: 0;
  margin-top: 0;
  margin-right: 0;
  width: 2.35rem;
  height: 1.3rem;
  border-radius: 999px;
  border: 1px solid var(--vf-theme-border, #cbd5e1);
  background-color: #dbe5f1;
  background-image:
    radial-gradient(circle at center, #ffffff 62%, rgba(255, 255, 255, 0) 64%),
    linear-gradient(#dbe5f1, #dbe5f1);
  background-repeat: no-repeat;
  background-size: 1rem 1rem, 100% 100%;
  background-position: 0.14rem center, center;
  cursor: pointer;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
  transition: background-color 0.2s ease, border-color 0.2s ease, background-position 0.2s ease, box-shadow 0.2s ease;
}

.admin-portal .vf-settings-page .form-switch .form-check-input:focus {
  border-color: var(--vf-theme-link, var(--vf-admin-primary));
  box-shadow: 0 0 0 0.18rem rgba(37, 99, 235, 0.18);
}

.admin-portal .vf-settings-page .form-switch .form-check-input:checked {
  border-color: var(--vf-theme-link, var(--vf-admin-primary));
  background-color: var(--vf-theme-link, var(--vf-admin-primary));
  background-image:
    radial-gradient(circle at center, #ffffff 62%, rgba(255, 255, 255, 0) 64%),
    linear-gradient(var(--vf-theme-link, var(--vf-admin-primary)), var(--vf-theme-link, var(--vf-admin-primary)));
  background-position: calc(100% - 0.14rem) center, center;
}

.admin-portal .vf-settings-page .form-switch .form-check-label {
  display: inline-block;
  padding-left: 0 !important;
  margin-bottom: 0;
  line-height: 1.3;
}

.admin-portal .vf-settings-page hr {
  margin-top: 1rem !important;
  margin-bottom: 1rem !important;
}

@media (max-width: 991.98px) {
  .admin-portal .vf-settings-page .card-body {
    padding: 1rem;
  }
}

/* Welcome banner — crystal hero */
.vf-welcome-banner {
  background: linear-gradient(135deg, var(--vf-admin-primary-dark, #0a1628) 0%, var(--vf-admin-primary, #0056b3) 55%, #42a5f5 100%);
  color: #fff;
  border-radius: 18px;
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 8px 32px rgba(0, 86, 179, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.vf-welcome-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.18) 0%, transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(255, 255, 255, 0.08) 0%, transparent 40%);
  pointer-events: none;
}

.vf-welcome-banner::after {
  content: '';
  position: absolute;
  top: -60%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.06) 50%, transparent 60%);
  transform: rotate(-8deg);
  pointer-events: none;
}

.vf-welcome-banner > .row {
  position: relative;
  z-index: 1;
}

.vf-welcome-banner h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.4rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.vf-welcome-banner p {
  margin: 0;
  opacity: 0.92;
  font-size: 0.95rem;
  max-width: 42rem;
}

.vf-welcome-banner img {
  border-radius: 12px !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.95);
  padding: 6px;
}

/* Login layout (colors: portal-theme.css) */
.admin-login-box {
  width: 100%;
  max-width: 500px;
  padding: 1rem;
}

.admin-login-box .card {
  border: none;
  border-radius: 16px;
}

.admin-login-box .btn-primary {
  background: var(--vf-admin-primary);
  border-color: var(--vf-admin-primary);
}

.admin-login-logo img {
  max-width: 160px;
  height: auto;
  padding: 0.5rem;
  border-radius: 22px;
  background: color-mix(in srgb, var(--vf-theme-surface-elevated, #fff) 82%, transparent);
  border: 1px solid var(--vf-theme-border-subtle, rgba(255, 255, 255, 0.25));
  box-shadow:
    0 10px 24px color-mix(in srgb, var(--vf-theme-shadow, rgba(0, 0, 0, 0.18)) 60%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(2px);
}

/* Reports */
.vf-report-card {
  border: none;
  border-radius: 12px;
  height: 100%;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.vf-report-card .card-header {
  border-radius: 12px 12px 0 0;
  font-weight: 600;
}

/* SOS pulse */
.table-danger.sos-active {
  animation: vf-sos-pulse 2s infinite;
}

@keyframes vf-sos-pulse {
  0%, 100% { background-color: #f8d7da; }
  50% { background-color: #f5c2c7; }
}

body.manager-portal #liveMap.vf-live-map,
#liveMap.vf-live-map {
  border-radius: 0 0 12px 12px;
  height: 480px;
  min-height: 480px;
  width: 100%;
  background: var(--vf-theme-map-bg, #e8eef4);
  z-index: 0;
}

body.manager-portal #sitesMapManager.vf-live-map,
#sitesMapAdmin.vf-live-map,
.vf-map-container.vf-live-map {
  border-radius: 0 0 12px 12px;
  height: 360px;
  min-height: 360px;
  width: 100%;
  background: var(--vf-theme-map-bg, #e8eef4);
  z-index: 0;
  position: relative;
}

.vf-map-container .vf-map-loading {
  position: absolute;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--vf-theme-map-bg, #e8eef4);
  color: #5c6b7a;
  font-size: 0.95rem;
  pointer-events: none;
}

.vf-map-container.vf-map-is-loading .vf-map-loading {
  display: flex;
}

.vf-map-container:not(.vf-map-is-loading) .vf-map-loading {
  display: none;
}

#attendanceDetailMap.vf-attendance-map,
.vf-attendance-map.vf-live-map {
  height: 420px;
  min-height: 420px;
}

.vf-map-static.leaflet-container,
.vf-map-static .leaflet-container {
  cursor: default;
}

.vf-map-static .leaflet-grab,
.vf-map-static .leaflet-dragging {
  cursor: default;
}

body.manager-portal .leaflet-container,
.admin-portal .leaflet-container {
  font-family: inherit;
  z-index: 0;
  background: var(--vf-theme-map-bg, #e8eef4);
}

.leaflet-tile-pane {
  opacity: 1;
}

#liveMap.vf-live-map,
.vf-live-map.vf-map-container {
  position: relative;
  isolation: isolate;
}

.admin-portal .main-footer {
  background: var(--vf-theme-surface-elevated, #fff);
  border-top: 1px solid var(--vf-theme-border, #e2e8f0);
  color: var(--vf-theme-text-muted, #64748b);
}

/* BS5 utility shims (content pages only — sidebar uses AdminLTE/BS4) */
.admin-portal .me-1 { margin-right: 0.25rem !important; }
.admin-portal .me-2 { margin-right: 0.5rem !important; }
.admin-portal .ms-1 { margin-left: 0.25rem !important; }
.admin-portal .ms-2 { margin-left: 0.5rem !important; }
.admin-portal .row.g-3 { margin-left: -0.75rem; margin-right: -0.75rem; }
.admin-portal .row.g-3 > [class*='col'] { padding-left: 0.75rem; padding-right: 0.75rem; margin-bottom: 1rem; }
.admin-portal .badge.bg-success { background-color: var(--vf-admin-success) !important; color: #fff; }
.admin-portal .badge.bg-danger { background-color: var(--vf-admin-danger) !important; color: #fff; }
.admin-portal .badge.bg-secondary { background-color: #6c757d !important; color: #fff; }
.admin-portal .badge.bg-info { background-color: #0dcaf0 !important; color: #000; }
.admin-portal .badge.bg-warning { background-color: #ffc107 !important; color: #000; }
.admin-portal .badge.bg-primary { background-color: var(--vf-admin-primary) !important; color: #fff; }

.admin-portal .vf-settings-dl dt {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--vf-theme-text-muted, #64748b);
  font-weight: 600;
}

/* Login — theme switcher on auth pages */
.portal-auth-theme-bar {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1050;
}


.admin-portal .vf-settings-dl dd {
  margin-bottom: 0.75rem;
}

/* Company detail (view) page */
.vf-company-show__toolbar .btn {
  border-radius: 8px;
}

.vf-company-hero {
  background: linear-gradient(135deg, var(--vf-admin-primary-dark, #004494), var(--vf-admin-primary, #1e88e5));
  color: #fff;
  border-radius: 14px;
  padding: 1.75rem 2rem;
  box-shadow: 0 8px 24px rgba(0, 86, 179, 0.18);
}

.vf-company-hero__logo {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
}

.vf-company-hero__logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.vf-company-hero__eyebrow {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
  margin: 0;
}

.vf-company-hero__title {
  font-size: 1.65rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

.vf-company-hero__reg {
  font-size: 0.85rem;
  opacity: 0.9;
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

.vf-company-hero__meta {
  font-size: 0.9rem;
  opacity: 0.88;
}

.vf-company-hero__badges {
  gap: 0.5rem;
}

.vf-company-hero__badges .badge {
  font-weight: 600;
  font-size: 0.78rem;
}

.vf-company-panel .card-header {
  padding-bottom: 0.5rem;
}

.vf-detail-list {
  margin: 0;
}

.vf-detail-list__item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.vf-detail-list__item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.vf-detail-list__item dt {
  flex: 0 0 42%;
  max-width: 42%;
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--vf-theme-text-muted, #64748b);
}

.vf-detail-list__item dt i {
  width: 1.1rem;
  margin-right: 0.35rem;
  opacity: 0.75;
}

.vf-detail-list__item dd {
  flex: 1 1 50%;
  margin: 0;
  font-weight: 500;
  color: var(--vf-theme-text, #1e293b);
  word-break: break-word;
}

.vf-code-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  background: rgba(0, 86, 179, 0.08);
  border-radius: 6px;
  font-size: 0.9em;
  color: var(--vf-admin-primary, #0056b3);
}

@media (max-width: 575.98px) {
  .vf-company-hero {
    padding: 1.25rem 1.25rem;
  }

  .vf-company-hero__logo {
    width: 72px;
    height: 72px;
  }

  .vf-company-hero__title {
    font-size: 1.35rem;
  }

  .vf-detail-list__item dt,
  .vf-detail-list__item dd {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* ============================================================
   Settings page — hero, cards, switches, feature grid
   (shared by admin + manager portals)
   ============================================================ */

.vf-settings-hero {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.25rem;
  background:
    radial-gradient(1200px 200px at 110% -40%, rgba(21, 101, 192, 0.14), transparent 60%),
    var(--vf-theme-surface-elevated, #fff);
}

.vf-settings-hero__icon {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: #fff;
  background: linear-gradient(135deg, #0d47a1, #1976d2);
  box-shadow: 0 8px 20px rgba(13, 71, 161, 0.28);
}

.vf-settings-hero__text {
  flex: 1;
  min-width: 0;
}

.vf-settings-hero__title {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 0.2rem;
  color: var(--vf-theme-text, #0a2540);
}

.vf-settings-hero__subtitle {
  font-size: 0.85rem;
  color: var(--vf-theme-text-muted, #64748b);
}

.vf-settings-hero__badge {
  flex-shrink: 0;
  text-align: center;
  padding: 0.55rem 1rem;
  border-radius: 14px;
  background: rgba(21, 101, 192, 0.08);
  border: 1px solid rgba(21, 101, 192, 0.18);
}

.vf-settings-hero__badge-count {
  display: block;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--vf-theme-link, #1565c0);
  line-height: 1.1;
}

.vf-settings-hero__badge-label {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--vf-theme-text-muted, #64748b);
}

.vf-settings-card .card-body {
  padding: 1.25rem 1.4rem;
}

.vf-settings-card__hint {
  font-size: 0.84rem;
  color: var(--vf-theme-text-muted, #64748b);
  margin-bottom: 1rem;
}

/* Inputs with a leading icon */
.vf-input-icon {
  position: relative;
}

.vf-input-icon > i {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--vf-theme-text-muted, #94a3b8);
  font-size: 0.85rem;
  pointer-events: none;
}

.vf-input-icon > .form-control {
  padding-left: 2.3rem;
}

/* iOS-style switch (pure CSS, BS4-safe) */
.vf-switch {
  flex-shrink: 0;
  width: 42px;
  height: 24px;
  border-radius: 24px;
  background: var(--vf-theme-border, #cbd5e1);
  position: relative;
  transition: background 0.2s ease;
  align-self: center;
}

.vf-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: left 0.2s ease;
}

input:checked ~ .vf-switch {
  background: #1565c0;
}

input:checked ~ .vf-switch::after {
  left: 21px;
}

input:focus-visible ~ .vf-switch {
  outline: 2px solid rgba(21, 101, 192, 0.45);
  outline-offset: 2px;
}

/* Single switch row (e.g. face match toggle) */
.vf-switch-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--vf-theme-border-subtle, #e8eef4);
  border-radius: 14px;
  background: var(--vf-theme-surface, #fff);
  cursor: pointer;
  margin-bottom: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.vf-switch-row:hover {
  border-color: rgba(21, 101, 192, 0.35);
  box-shadow: 0 4px 14px rgba(13, 71, 161, 0.08);
}

.vf-switch-row input[type='checkbox'] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.vf-switch-row__icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  background: rgba(21, 101, 192, 0.08);
  color: var(--vf-theme-link, #1565c0);
}

.vf-switch-row__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.vf-switch-row__name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--vf-theme-text, #0a2540);
}

.vf-switch-row__desc {
  font-size: 0.78rem;
  color: var(--vf-theme-text-muted, #64748b);
  margin-top: 0.1rem;
}

/* Feature modules section */
.vf-features-section__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  color: var(--vf-theme-text, #0a2540);
}

.vf-features-section__title i {
  color: var(--vf-theme-link, #1565c0);
  margin-right: 0.35rem;
}

.vf-features-section__hint {
  font-size: 0.82rem;
  color: var(--vf-theme-text-muted, #64748b);
  margin-bottom: 1rem;
}

.vf-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 0.8rem;
}

.vf-feature-tile {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--vf-theme-border-subtle, #e8eef4);
  border-radius: 14px;
  background: var(--vf-theme-surface, #fff);
  cursor: pointer;
  margin-bottom: 0;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.vf-feature-tile:hover {
  border-color: rgba(21, 101, 192, 0.4);
  box-shadow: 0 6px 18px rgba(13, 71, 161, 0.1);
  transform: translateY(-1px);
}

.vf-feature-tile input[type='checkbox'] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.vf-feature-tile__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  background: var(--vf-theme-table-head, #f1f5f9);
  color: var(--vf-theme-text-muted, #94a3b8);
  transition: background 0.2s ease, color 0.2s ease;
}

.vf-feature-tile__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding-right: 0.25rem;
}

.vf-feature-tile__name {
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.25;
  color: var(--vf-theme-text, #0a2540);
}

.vf-feature-tile__desc {
  font-size: 0.74rem;
  line-height: 1.35;
  color: var(--vf-theme-text-muted, #64748b);
  margin-top: 0.15rem;
}

.vf-feature-tile:has(input:checked) {
  border-color: rgba(21, 101, 192, 0.45);
  background: linear-gradient(180deg, rgba(227, 242, 253, 0.5), var(--vf-theme-surface, #fff));
}

.vf-feature-tile:has(input:checked) .vf-feature-tile__icon {
  background: linear-gradient(135deg, #0d47a1, #1976d2);
  color: #fff;
}

/* Save bar */
.vf-settings-save {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin: 0.25rem 0 1.5rem;
}

@media (max-width: 575.98px) {
  .vf-settings-save {
    flex-direction: column;
    align-items: stretch;
  }

  .vf-settings-save__btn {
    width: 100%;
  }
}

.vf-settings-save__btn {
  padding: 0.55rem 1.5rem;
  font-weight: 700;
  border-radius: 10px;
  box-shadow: 0 6px 16px rgba(13, 71, 161, 0.25);
}

.vf-settings-save__hint {
  font-size: 0.78rem;
  color: var(--vf-theme-text-muted, #64748b);
}

/* Current configuration list */
.vf-config-list {
  list-style: none;
  margin: 0;
  padding: 0.35rem 0;
}

.vf-config-list li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 1.25rem;
}

.vf-config-list li + li {
  border-top: 1px solid var(--vf-theme-border-subtle, #eef2f7);
}

.vf-config-list__icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  background: rgba(21, 101, 192, 0.08);
  color: var(--vf-theme-link, #1565c0);
}

.vf-config-list__label {
  flex: 1;
  min-width: 0;
  font-size: 0.84rem;
  color: var(--vf-theme-text-muted, #64748b);
}

.vf-config-list__value {
  font-weight: 700;
  font-size: 0.86rem;
  color: var(--vf-theme-text, #0a2540);
}

/* Quick links */
.vf-quick-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--vf-theme-border-subtle, #e8eef4);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.vf-quick-link + .vf-quick-link {
  margin-top: 0.6rem;
}

.vf-quick-link:hover {
  text-decoration: none;
  border-color: rgba(21, 101, 192, 0.4);
  box-shadow: 0 4px 14px rgba(13, 71, 161, 0.1);
}

.vf-quick-link__icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  background: rgba(21, 101, 192, 0.08);
  color: var(--vf-theme-link, #1565c0);
}

.vf-quick-link__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.vf-quick-link__name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--vf-theme-text, #0a2540);
}

.vf-quick-link__desc {
  font-size: 0.75rem;
  color: var(--vf-theme-text-muted, #64748b);
}

.vf-quick-link__arrow {
  font-size: 0.7rem;
  color: var(--vf-theme-text-muted, #94a3b8);
}

@media (max-width: 575.98px) {
  .vf-settings-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }

  .vf-feature-grid {
    grid-template-columns: 1fr;
  }
}
