html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ==========================================================================
   EdJedi "SOC console" theme
   Light/dark support via Bootstrap 5.3 data-bs-theme (toggled by wwwroot/js/theme.js).
   Dark is the default, matching cyber-security operations dashboards; light stays
   available for users who prefer it. Custom variables below only apply on top of
   Bootstrap's own theme variables, never replacing them, so every existing
   .btn/.card/.badge/.table keeps working unmodified.
   ========================================================================== */

:root {
  --edjedi-accent: #17d1c4;
  --edjedi-accent-rgb: 23, 209, 196;
  --edjedi-sidebar-width: 260px;
  --edjedi-topbar-height: 60px;
}

[data-bs-theme="dark"] {
  --edjedi-sidebar-bg: #0b1220;
  --edjedi-sidebar-border: #1c2740;
  --edjedi-topbar-bg: rgba(11, 18, 32, 0.85);
  --edjedi-content-bg: #0e1526;
}

[data-bs-theme="light"] {
  --edjedi-sidebar-bg: #101a2e;
  --edjedi-sidebar-border: #1c2740;
  --edjedi-topbar-bg: rgba(255, 255, 255, 0.9);
  --edjedi-content-bg: var(--bs-body-bg);
}

body {
  margin-bottom: 0;
}

[data-bs-theme="dark"] body {
  background-color: var(--edjedi-content-bg);
}

/* Monospace treatment for technical values (IPs, IDs, hostnames, cron expressions,
   timestamps) so they read like console/log output, as in a SOC dashboard. */
.edjedi-mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.92em;
  letter-spacing: 0.01em;
}

/* ---- App shell: fixed sidebar + topbar + scrollable content -------------- */

.edjedi-app {
  display: flex;
  min-height: 100vh;
}

.edjedi-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.edjedi-content {
  flex: 1 1 auto;
  padding: 1.5rem;
  background-color: var(--edjedi-content-bg);
}

.edjedi-topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: var(--edjedi-topbar-height);
  padding: 0 1.25rem;
  background-color: var(--edjedi-topbar-bg);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--bs-border-color);
}

.edjedi-topbar-spacer {
  flex: 1 1 auto;
}

.edjedi-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.edjedi-user-menu {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.edjedi-company-switcher {
  min-width: 180px;
  max-width: 240px;
}

#theme-toggle {
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.375rem 0.5rem;
}

/* ---- Sidebar --------------------------------------------------------------- */

.edjedi-sidebar {
  width: var(--edjedi-sidebar-width);
  flex: 0 0 var(--edjedi-sidebar-width);
  background-color: var(--edjedi-sidebar-bg);
  border-right: 1px solid var(--edjedi-sidebar-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.edjedi-sidebar-brand {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--edjedi-sidebar-border);
}

.edjedi-sidebar-tagline {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.45);
}

.edjedi-sidebar-nav {
  flex: 1 1 auto;
  padding: 0.75rem 0.75rem;
}

.edjedi-nav-section {
  margin: 1rem 0.75rem 0.35rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.35);
}

.edjedi-nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.15rem;
  border-radius: 0.4rem;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-size: 0.92rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.edjedi-nav-link i {
  font-size: 1.05rem;
  width: 1.2rem;
  text-align: center;
  flex: none;
}

.edjedi-nav-link:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.edjedi-nav-link.active {
  background-color: rgba(var(--edjedi-accent-rgb), 0.15);
  color: var(--edjedi-accent);
  box-shadow: inset 3px 0 0 var(--edjedi-accent);
}

.edjedi-sidebar-footer {
  padding: 0.85rem 1.25rem;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.35);
  border-top: 1px solid var(--edjedi-sidebar-border);
}

.edjedi-sidebar-backdrop {
  display: none;
}

/* Collapsed/off-canvas sidebar on small screens. */
@media (max-width: 991.98px) {
  .edjedi-sidebar {
    position: fixed;
    left: 0;
    z-index: 1045;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 0.5rem 0 1.5rem rgba(0, 0, 0, 0.35);
  }

  .edjedi-sidebar.show {
    transform: translateX(0);
  }

  .edjedi-sidebar-backdrop.show {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1040;
    background-color: rgba(0, 0, 0, 0.45);
  }
}

@media (min-width: 992px) {
  .edjedi-sidebar-toggle {
    display: none;
  }
}

/* logo-positivo.png (dark glyphs) is meant for light backgrounds; logo-negativo.png (light
   glyphs) is meant for dark backgrounds. Swap them based on the current theme instead of
   relying on a single logo that would be unreadable in one of the two modes. Used only on
   the unauthenticated topbar (login/forgot password); the sidebar always uses the dark-bg
   logo since the sidebar itself is always dark. */
.edjedi-logo-dark {
  display: none;
}

[data-bs-theme="dark"] .edjedi-logo-light {
  display: none;
}

[data-bs-theme="dark"] .edjedi-logo-dark {
  display: inline-block;
}

/* ---- Status/severity accents, SOC-style ----------------------------------- */

.edjedi-stat-card {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.6rem;
  background-color: var(--bs-tertiary-bg);
  overflow: hidden;
  position: relative;
}

/* .edjedi-stat-card is not a Bootstrap .card, so --bs-card-spacer-* (which .card-body's own
   padding relies on) is never defined here — without this, .card-body's padding falls back to
   nothing and the content sits flush left, under the 4px accent bar below. Also nudge the left
   padding a bit further so text clears the accent bar with room to breathe. */
.edjedi-stat-card .card-body {
  padding: 1.1rem 1.25rem 1.1rem 1.5rem;
}

.edjedi-stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background-color: var(--edjedi-stat-accent, var(--bs-secondary-color));
}

.edjedi-stat-card .edjedi-stat-icon {
  font-size: 1.6rem;
  opacity: 0.85;
}

.edjedi-stat-card .edjedi-stat-value {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 2.1rem;
  font-weight: 600;
  line-height: 1;
}

.edjedi-stat-card.is-pending { --edjedi-stat-accent: var(--bs-secondary-color); }
.edjedi-stat-card.is-locked { --edjedi-stat-accent: var(--bs-primary); }
.edjedi-stat-card.is-completed { --edjedi-stat-accent: var(--bs-success); }
.edjedi-stat-card.is-expired { --edjedi-stat-accent: var(--bs-danger); }

.edjedi-panel {
  border: 1px solid var(--bs-border-color);
  border-radius: 0.6rem;
  background-color: var(--bs-tertiary-bg);
  padding: 1.25rem;
}

.edjedi-panel-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bs-secondary-color);
  margin-bottom: 1rem;
}

.edjedi-panel-title i {
  color: var(--edjedi-accent);
}