/* Align with VoxLayer Filament dashboard (navy sidebar, orange primary) */
:root {
  --vl-navy: #1c2b4a;
  --vl-navy-hover: rgba(255, 255, 255, 0.1);
  --vl-orange: #ea580c;
  --vl-orange-dark: #c2410c;
  --vl-card-navy: #1d314b;
  --vl-tab-inactive: #e9ecef;
}

.vl-log-box {
  max-height: min(70vh, 520px);
  overflow: auto;
  background: #0d1117;
  color: #e6edf3;
  white-space: pre-wrap;
  word-break: break-word;
}

.vl-env-table td {
  vertical-align: top;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.vl-agent-body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: #f8f9fa;
  color: #212529;
  margin: 0;
  min-height: 100vh;
}

/* Editor layout: sidebar + main must share one flex row (otherwise the narrow sidebar leaves a huge empty band beside it and main drops below). */
.vl-app-shell {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  min-height: 100vh;
}

.vl-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--vl-navy);
  color: #fff;
}

/* Full wordmark PNG — same as vaaas <x-layouts.partials.logo /> on dark navbar */
.vl-navbar-logo {
  display: block;
  height: 3rem;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  object-position: left center;
}

.vl-sidebar-brand-link:hover .vl-navbar-logo {
  opacity: 0.95;
}

.vl-navbar-version {
  font-size: 0.75rem;
  line-height: 1.35;
}

.vl-login-card-brand {
  background: var(--vl-navy) !important;
}

.vl-login-card-logo {
  height: 3rem;
  width: auto;
  max-width: min(100%, 280px);
  object-fit: contain;
  object-position: center;
}

/* Agent workload (Status page) */
.vl-agent-card.vl-agent-card--ok {
  background: #d1fae5;
  color: #065f46;
}

.vl-agent-card.vl-agent-card--bad {
  background: #fee2e2;
  color: #991b1b;
}

.vl-agent-card-title {
  font-weight: 600;
  opacity: 0.88;
}

.vl-workload-actions .btn {
  min-width: 2.25rem;
}

/* SIP registration highlight (Status page) */
.vl-sip-card.vl-sip-card--ok {
  background: #d1fae5;
  color: #065f46;
}

.vl-sip-card.vl-sip-card--bad {
  background: #fee2e2;
  color: #991b1b;
}

.vl-sip-card.vl-sip-card--warn {
  background: #fef3c7;
  color: #92400e;
}

.vl-sip-card-title {
  font-weight: 600;
  opacity: 0.88;
}

.vl-sip-card-meta {
  opacity: 0.9;
}

.vl-sip-code {
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
  padding: 0.1rem 0.35rem;
  border-radius: 0.25rem;
  font-size: 0.85em;
}

.vl-sidebar .nav-link {
  color: rgba(255, 255, 255, 0.9);
  padding: 0.65rem 1.25rem;
  border-radius: 0.375rem;
  margin: 0.15rem 0.5rem;
}

.vl-sidebar .nav-link:hover {
  background: var(--vl-navy-hover);
  color: #fff;
}

.vl-sidebar .nav-link.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.vl-main {
  flex: 1 1 auto;
  min-width: 0;
  padding: 1.5rem 2rem;
  max-width: 1100px;
}

/* Phone: the sidebar sits above the page instead of beside a squeezed column. */
@media (max-width: 767.98px) {
  .vl-app-shell {
    flex-direction: column;
  }

  .vl-sidebar {
    width: 100%;
    padding-top: 0.5rem !important;
    padding-bottom: 0.35rem !important;
  }

  .vl-sidebar-brand {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.75rem;
    border-bottom: none !important;
    margin-bottom: 0 !important;
    padding-bottom: 0.25rem !important;
  }

  .vl-navbar-logo {
    height: 1.75rem;
  }

  .vl-sidebar-brand .text-uppercase,
  .vl-sidebar-kicker,
  .vl-sidebar .mt-auto,
  .vl-sidebar-foot {
    display: none;
  }

  .vl-sidebar nav.nav {
    flex-direction: row !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  .vl-sidebar .nav-link {
    white-space: nowrap;
    padding: 0.55rem 0.8rem;
  }

  .vl-main {
    padding: 1rem 0.85rem 2.5rem;
    max-width: none;
  }

  .vl-page-title {
    font-size: 1.15rem;
    overflow-wrap: anywhere;
  }

  .vl-agent-card-title,
  .vl-sip-card-title,
  .vl-net-card-title,
  .vl-chart-card-title,
  .vl-sip-card-status {
    overflow-wrap: normal;
    word-break: normal;
  }

  .vl-chart-wrap {
    height: 180px;
    min-height: 180px;
  }

  .vl-sip-code,
  .vl-net-card .font-monospace {
    overflow-wrap: anywhere;
  }

  .vl-main .table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
  }
}

.vl-page-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: #111827;
}

.vl-tabs .nav-link {
  color: #495057;
  background: var(--vl-tab-inactive);
  border: 1px solid #dee2e6;
  margin-right: 0.25rem;
  border-bottom: none;
  border-radius: 0.375rem 0.375rem 0 0;
}

.vl-tabs .nav-link:hover {
  color: #212529;
}

.vl-tabs .nav-link.active {
  background: var(--vl-card-navy);
  color: #fff;
  border-color: var(--vl-card-navy);
}

.vl-card-dark {
  background: var(--vl-card-navy);
  color: rgba(255, 255, 255, 0.95);
  border: none;
  border-radius: 0.5rem;
}

.vl-card-dark .form-label {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.875rem;
}

.vl-card-dark .form-control,
.vl-card-dark .form-select {
  background: #fff;
  border-color: #dee2e6;
  color: #212529;
}

.vl-card-dark .form-control:focus {
  border-color: var(--vl-orange);
  box-shadow: 0 0 0 0.2rem rgba(234, 88, 12, 0.2);
}

.vl-btn-primary {
  background: linear-gradient(102deg, var(--vl-orange) 2%, var(--vl-orange-dark) 100%);
  border: none;
  color: #fff;
  font-weight: 500;
}

.vl-btn-primary:hover {
  filter: brightness(1.05);
  color: #fff;
}

.vl-sub {
  color: #6c757d;
  font-size: 0.875rem;
}

.vl-login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #1c2b4a 0%, #2d3f63 100%);
}

.vl-login-card {
  max-width: 420px;
  width: 100%;
}

/* Status: network latency (PBX RTT) */
.vl-net-card.vl-net-card--ok {
  background: #d1fae5;
  color: #065f46;
}

.vl-net-card.vl-net-card--warn {
  background: #fef3c7;
  color: #92400e;
}

.vl-net-card.vl-net-card--bad {
  background: #fee2e2;
  color: #991b1b;
}

.vl-net-card-title {
  font-weight: 600;
  opacity: 0.88;
}

.vl-net-card-meta {
  opacity: 0.92;
}

/* Status: charts on light blue panel */
.vl-card-chart {
  background: #e0f2fe;
  color: #0c4a6e;
  border: none;
  border-radius: 0.5rem;
}

.vl-chart-card-title {
  font-weight: 600;
  color: #075985;
  opacity: 0.95;
}

.vl-chart-card-sub {
  color: #0369a1;
  opacity: 0.9;
}

/* Chart.js: fill card width (canvas uses parent box; avoid max-width caps). */
.vl-chart-wrap {
  position: relative;
  width: 100%;
  height: 220px;
  min-height: 220px;
}

.vl-call-records-table td,
.vl-call-records-table th {
  white-space: nowrap;
}

.vl-transcript-body {
  white-space: pre-wrap;
  word-break: break-word;
}

