/* ECTVS — shared theme */

:root {
  --ectvs-navy: #0b1220;
  --ectvs-slate: #1e293b;
  --ectvs-accent: #38bdf8;
  --ectvs-accent-dim: #0ea5e9;
  --ectvs-muted: #94a3b8;
}

.ectvs-navbar {
  background: linear-gradient(90deg, var(--ectvs-navy), #111827) !important;
  box-shadow: 0 1px 0 rgba(148, 163, 184, 0.15);
}

.ectvs-navbar .navbar-brand {
  font-weight: 700;
  letter-spacing: 0.04em;
}

.ectvs-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(1200px 600px at 10% -10%, rgba(56, 189, 248, 0.25), transparent 55%),
    radial-gradient(900px 500px at 90% 20%, rgba(14, 165, 233, 0.2), transparent 50%),
    linear-gradient(160deg, #020617 0%, #0f172a 45%, #020617 100%);
  color: #e2e8f0;
  padding: 5rem 0 4.5rem;
}

.ectvs-hero h1 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.ectvs-hero .lead {
  color: var(--ectvs-muted);
  max-width: 38rem;
}

.ectvs-badge {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ectvs-accent);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  margin-bottom: 1rem;
}

.ectvs-card {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
}

.ectvs-feature-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(56, 189, 248, 0.12);
  color: var(--ectvs-accent);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.ectvs-section {
  padding: 3.5rem 0;
  background: #f8fafc;
}

.ectvs-section h2 {
  font-weight: 700;
  color: #0f172a;
}

.ectvs-footer-public {
  background: #0f172a;
  color: #94a3b8;
  padding: 2rem 0;
  font-size: 0.9rem;
}

.auth-panel {
  max-width: 420px;
  margin: 0 auto;
}

.auth-panel .card {
  border: none;
  border-radius: 1rem;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

.dashboard-stat {
  border-radius: 0.75rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  padding: 1rem 1.25rem;
  background: #fff;
}

.dashboard-stat .label {
  font-size: 0.8rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dashboard-stat .value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0f172a;
}

main#main.ectvs-main-fluid > .container {
  max-width: 1140px;
}

body.ectvs-public {
  background: #020617;
}

/* ——— Authenticated app: sidebar + content ——— */

body.ectvs-app {
  padding-top: 56px;
  background: #f1f5f9;
}

.ectvs-app-header {
  background: linear-gradient(90deg, var(--ectvs-navy), #111827);
  min-height: 56px;
  z-index: 1030;
  box-shadow: 0 1px 0 rgba(148, 163, 184, 0.12);
}

.ectvs-app-header .navbar-brand {
  font-weight: 700;
  letter-spacing: 0.03em;
}

.ectvs-app-shell {
  display: flex;
  align-items: stretch;
  min-height: calc(100vh - 56px);
  width: 100%;
}

.ectvs-sidebar {
  position: fixed;
  left: 0;
  top: 56px;
  bottom: 0;
  width: 268px;
  z-index: 1020;
  background: #0f172a;
  border-right: 1px solid rgba(148, 163, 184, 0.12);
  overflow: hidden;
}

.ectvs-sidebar,
.ectvs-offcanvas .offcanvas-body {
  display: flex;
  flex-direction: column;
}

.ectvs-offcanvas {
  max-width: min(100%, 300px);
}

.ectvs-offcanvas-body {
  min-height: calc(100vh - 56px - 4rem);
}

.ectvs-side-nav {
  overflow-y: auto;
  min-height: 0;
}

.ectvs-side-link {
  color: rgba(255, 255, 255, 0.82) !important;
  border-radius: 0.5rem;
  padding: 0.55rem 0.85rem !important;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.ectvs-side-link:hover {
  background: rgba(56, 189, 248, 0.1);
  color: #fff !important;
}

.ectvs-side-link.active {
  background: linear-gradient(90deg, rgba(56, 189, 248, 0.18), transparent);
  color: var(--ectvs-accent) !important;
  box-shadow: inset 3px 0 0 var(--ectvs-accent);
  padding-left: calc(0.85rem - 3px) !important;
}

.ectvs-main-area {
  flex: 1;
  min-width: 0;
  margin-left: 268px;
  width: calc(100% - 268px);
  min-height: calc(100vh - 56px);
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 55%);
  display: flex;
  flex-direction: column;
}

.ectvs-main-inner {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.ectvs-main-inner > .container-fluid {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
}

/* Allow flex children to shrink so tables scroll inside the viewport */
.ectvs-min-h-0 {
  min-height: 0;
}

.ectvs-app-footer {
  background: #fff;
  border-top: 1px solid #e2e8f0;
}

@media (max-width: 991.98px) {
  .ectvs-main-area {
    margin-left: 0;
    width: 100%;
  }
}

/* Dashboard & cards */

.ectvs-page-title {
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.ectvs-stat-card {
  border: none;
  border-radius: 0.85rem;
  background: #fff;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  height: 100%;
}

.ectvs-stat-card:hover {
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.1);
}

.ectvs-stat-card .ectvs-stat-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.ectvs-stat-card .ectvs-stat-value {
  font-size: 1.85rem;
  font-weight: 700;
  line-height: 1.2;
  color: #0f172a;
}

.ectvs-panel {
  border: none;
  border-radius: 0.85rem;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  background: #fff;
}

.ectvs-panel .card-header {
  background: transparent;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 600;
  color: #0f172a;
}

.ectvs-incident-hero {
  overflow: hidden;
}

.ectvs-status-pill {
  letter-spacing: 0.08em;
  font-size: 0.72rem;
}

.ectvs-prose {
  white-space: pre-wrap;
  line-height: 1.65;
  color: #0f172a;
}

.ectvs-prose-sm {
  white-space: pre-wrap;
  line-height: 1.55;
}

.ectvs-list-tight .list-group-item {
  padding: 0.8rem 0;
  border: 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.ectvs-list-tight .list-group-item:last-child {
  border-bottom: 0;
}

.ectvs-list-tight .list-group-item-action:hover {
  background: #f8fafc;
}

.ectvs-timeline {
  position: relative;
  padding-left: 1.15rem;
}

.ectvs-timeline:before {
  content: "";
  position: absolute;
  top: 0.35rem;
  bottom: 0.35rem;
  left: 0.35rem;
  width: 2px;
  background: rgba(148, 163, 184, 0.35);
}

.ectvs-timeline-item {
  position: relative;
  padding: 0 0 0.95rem 0;
}

.ectvs-timeline-item:last-child {
  padding-bottom: 0;
}

.ectvs-timeline-item:before {
  content: "";
  position: absolute;
  left: -0.05rem;
  top: 0.25rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  background: #fff;
  border: 2px solid rgba(14, 165, 233, 0.9);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.ectvs-table-wrap {
  border-radius: 0.65rem;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.ectvs-table-wrap table {
  margin-bottom: 0;
}

.ectvs-table-wrap thead {
  background: #f8fafc;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
