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;
}

:root {
  --dashboard-chart-safe: #198754;
  --dashboard-chart-expiring: #fd7e14;
  --dashboard-chart-inactive: #dfe3e8;
  --dashboard-chart-empty: #edf1f5;
}

table.dataTable tbody td {
  vertical-align: middle;
}

.dashboard-row-danger {
  background-color: rgba(220, 53, 69, 0.12) !important;
  border-left: 3px solid #dc3545;
}

.dashboard-row-warning {
  background-color: rgba(255, 193, 7, 0.12) !important;
  border-left: 3px solid #ffc107;
}

.dashboard-row-success {
  background-color: rgba(25, 135, 84, 0.08) !important;
  border-left: 3px solid #198754;
}

.card-header h5 {
  font-weight: 600;
}

.badge-sm {
  font-size: 0.7em;
  padding: 0.25em 0.5em;
}

.dashboard-mobile-card {
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
}

.dashboard-mobile-card:last-child {
  margin-bottom: 0;
}

.dashboard-overview {
  background: linear-gradient(135deg, rgba(13, 110, 253, 0.06), rgba(255, 193, 7, 0.08));
}

.dashboard-overview-kicker {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bs-primary);
}

.dashboard-overview-total {
  min-width: 220px;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(13, 110, 253, 0.08);
  box-shadow: 0 1rem 2.5rem rgba(15, 23, 42, 0.06);
}

.dashboard-overview-total span,
.dashboard-overview-total small {
  display: block;
}

.dashboard-overview-total span {
  font-size: 0.85rem;
  color: var(--bs-secondary-color);
}

.dashboard-overview-total strong {
  display: block;
  font-size: 1.75rem;
  line-height: 1.1;
}

.dashboard-overview-total small {
  margin-top: 0.35rem;
  color: var(--bs-secondary-color);
}

.dashboard-overview-card {
  height: 100%;
  padding: 1.15rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(13, 110, 253, 0.08);
  box-shadow: 0 1rem 2.5rem rgba(15, 23, 42, 0.05);
}

.dashboard-overview-card-summary {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 249, 250, 0.9));
}

.dashboard-overview-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(253, 126, 20, 0.12);
  color: #c56a00;
  font-size: 0.75rem;
  font-weight: 700;
}

.dashboard-overview-bars {
  display: grid;
  gap: 1rem;
}

.dashboard-overview-bar-track {
  display: flex;
  height: 0.7rem;
  overflow: hidden;
  border-radius: 999px;
  background: var(--dashboard-chart-inactive);
}

.dashboard-overview-bar-safe {
  background: linear-gradient(90deg, #198754, #20c997);
}

.dashboard-overview-bar-expiring {
  background: linear-gradient(90deg, #ffc107, #fd7e14);
}

.dashboard-overview-icon {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 0.75rem;
  border-radius: 0.85rem;
  font-size: 1.15rem;
}

.dashboard-overview-card-primary .dashboard-overview-icon {
  color: #0d6efd;
  background: rgba(13, 110, 253, 0.12);
}

.dashboard-overview-card-success .dashboard-overview-icon {
  color: #198754;
  background: rgba(25, 135, 84, 0.12);
}

.dashboard-overview-card-warning .dashboard-overview-icon {
  color: #fd7e14;
  background: rgba(253, 126, 20, 0.12);
}

.dashboard-overview-number {
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1;
  color: #1f2937;
}

.dashboard-overview-chart-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}

.dashboard-overview-chart {
  position: relative;
  display: grid;
  place-items: center;
  width: 140px;
  aspect-ratio: 1;
  border-radius: 50%;
}

.dashboard-overview-chart::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.dashboard-overview-chart-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.dashboard-overview-chart-inner strong {
  font-size: 1.5rem;
  line-height: 1;
}

.dashboard-overview-chart-inner span {
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
}

.dashboard-overview-legend {
  display: grid;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.dashboard-overview-legend div {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.dashboard-legend-swatch {
  width: 0.8rem;
  height: 0.8rem;
  border-radius: 50%;
  flex: 0 0 auto;
}

.dashboard-legend-swatch-safe {
  background: var(--dashboard-chart-safe);
}

.dashboard-legend-swatch-expiring {
  background: var(--dashboard-chart-expiring);
}

.dashboard-legend-swatch-inactive {
  background: var(--dashboard-chart-inactive);
}

@media (max-width: 767.98px) {
  .dashboard-overview-total {
    min-width: 0;
  }

  .dashboard-overview-card,
  .dashboard-overview-total {
    padding: 1rem;
  }

  .dashboard-overview-chart {
    width: 124px;
  }
}

@media (min-width: 576px) {
  .app-nav-body {
    display: flex;
    flex-grow: 1;
    align-items: center;
    justify-content: space-between;
    padding: 0;
  }
}

@media (max-width: 575.98px) {
  .app-navbar .navbar-toggler {
    padding: 0.65rem 0.85rem;
    border-radius: 0.85rem;
  }

  .app-nav-drawer {
    width: min(82vw, 320px);
  }

  .app-nav-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1rem;
  }

  .app-nav-links,
  .app-nav-account {
    gap: 0.35rem;
  }

  .app-nav-links .nav-link,
  .app-nav-account .nav-link,
  .app-nav-drawer .dropdown-item {
    display: flex;
    align-items: center;
    min-height: 3rem;
    padding: 0.85rem 1rem;
    border-radius: 0.85rem;
    font-size: 1rem;
    font-weight: 500;
  }

  .app-nav-links .nav-link:hover,
  .app-nav-links .nav-link:focus,
  .app-nav-account .nav-link:hover,
  .app-nav-account .nav-link:focus,
  .app-nav-drawer .dropdown-item:hover,
  .app-nav-drawer .dropdown-item:focus {
    background-color: rgba(13, 110, 253, 0.08);
  }

  .app-nav-drawer .dropdown-menu {
    margin-top: 0.35rem;
    border: 0;
    box-shadow: none;
  }

  .app-nav-drawer .dropdown-menu.show {
    position: static;
    inset: auto;
    transform: none !important;
  }

  .app-nav-account {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--bs-border-color);
  }
}

.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;
}