/* Manager portal — extends admin-portal.css with green accent */
body.manager-portal {
  --vf-admin-primary: #157347;
  --vf-admin-primary-dark: #0d3321;
  --vf-admin-sidebar: #0f2e22;
  --vf-admin-sidebar-hover: #1a4030;
  --vf-admin-accent: #20c997;
}

body.manager-portal .portal-badge {
  background: var(--vf-admin-primary);
}

/* Active nav styling — base rules in admin-portal.css + portal-theme.css */

body.manager-portal .vf-welcome-banner {
  background: linear-gradient(135deg, var(--vf-admin-primary-dark), var(--vf-admin-primary));
}

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

body.manager-portal .vf-stat-card.stat-info {
  background: linear-gradient(135deg, #0f766e, #20c997);
}

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

.vf-walkie-live-card .card-header,
.vf-walkie-history-card .card-header {
  min-height: 3rem;
}

.vf-walkie-feed {
  overflow-y: auto;
}

.vf-walkie-feed--live {
  max-height: 11rem;
  min-height: 5.5rem;
}

.vf-walkie-history-scroll {
  max-height: min(32rem, calc(100vh - 22rem));
  overflow-y: auto;
}

.vf-walkie-history-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
  box-shadow: 0 1px 0 #dee2e6;
}

html[data-theme='dark'] .vf-walkie-history-scroll thead th {
  background: var(--vf-surface-elevated, #1e293b);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.vf-walkie-autoplay {
  white-space: nowrap;
  user-select: none;
}

.vf-walkie-live-item {
  animation: vf-walkie-in 0.35s ease-out;
  border-left: 3px solid var(--vf-admin-accent);
  padding-top: 0.65rem;
  padding-bottom: 0.65rem;
}

.vf-walkie-feed-empty {
  border: 0;
  background: transparent;
}

@keyframes vf-walkie-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.vf-walkie-play-btn.is-playing,
[data-walkie-play].is-playing {
  background: var(--vf-admin-primary);
  border-color: var(--vf-admin-primary);
  color: #fff;
}

.vf-walkie-table th {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6c757d;
  border-top: 0;
  white-space: nowrap;
}

.vf-walkie-col-play {
  width: 3rem;
}

.vf-walkie-col-id {
  width: 7.5rem;
  white-space: nowrap;
}

.vf-walkie-col-duration {
  width: 5.5rem;
}

.vf-walkie-emp-id {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 0.25rem;
  background: rgba(21, 115, 71, 0.08);
  color: var(--vf-admin-primary-dark, #0d3321);
  font-size: 0.8125rem;
  font-weight: 600;
}

html[data-theme='dark'] .vf-walkie-emp-id {
  background: rgba(32, 201, 151, 0.12);
  color: #b8f2df;
}

.vf-walkie-sender {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.vf-walkie-sender__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.vf-walkie-sender__icon--guard {
  background: rgba(21, 115, 71, 0.12);
  color: var(--vf-admin-primary);
}

.vf-walkie-sender__icon--manager {
  background: rgba(13, 110, 253, 0.12);
  color: #0d6efd;
}

.vf-walkie-sender__meta {
  min-width: 0;
}

.vf-walkie-sender__name {
  display: block;
  font-weight: 600;
  line-height: 1.25;
}

.vf-walkie-sender__role {
  display: block;
  font-size: 0.75rem;
  color: #6c757d;
  line-height: 1.2;
}

.vf-walkie-duration {
  font-weight: 600;
  min-width: 2.75rem;
}

.vf-walkie-live-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.vf-walkie-live-row__body {
  flex: 1;
  min-width: 0;
}

.vf-walkie-live-row__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.vf-walkie-live-row__when {
  font-size: 0.8125rem;
  color: #6c757d;
  white-space: nowrap;
}

.vf-walkie-live-row__meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

/* Site radio — allow more filter fields per row */
@media (min-width: 1200px) {
  #walkiePage .vf-list-filters__fields {
    flex: 1 1 100%;
  }

  #walkiePage .vf-filter-field {
    max-width: 14rem;
  }
}
