:root {
  --capdev-navy: #0b1f3a;
  --capdev-blue: #175cd3;
  --capdev-cyan: #0ea5e9;
  --capdev-emerald: #10b981;
  --capdev-page-max-width: 1760px;
  --capdev-surface: rgba(255, 255, 255, 0.94);
  --capdev-surface-strong: rgba(255, 255, 255, 0.98);
  --capdev-border: rgba(15, 23, 42, 0.08);
  --capdev-shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

.capdev-page-shell {
  width: min(100% - 1.5rem, var(--capdev-page-max-width));
  margin-inline: auto;
}

body {
  min-height: 100vh;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: #10233d;
  background:
    radial-gradient(circle at top left, rgba(23, 92, 211, 0.16), transparent 28%),
    radial-gradient(circle at top right, rgba(14, 165, 233, 0.12), transparent 32%),
    linear-gradient(180deg, #f4f8fc 0%, #edf3f9 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.25) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.2) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.22;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 92%);
}

.login-page {
  background:
    radial-gradient(circle at top left, rgba(14, 165, 233, 0.24), transparent 30%),
    radial-gradient(circle at bottom right, rgba(23, 92, 211, 0.28), transparent 35%),
    linear-gradient(160deg, #07131f 0%, #10233d 45%, #153d66 100%);
  color: #fff;
}

.login-page::before {
  background-image: linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  opacity: 0.35;
}

.login-hero {
  max-width: 760px;
}

@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes heroFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

.login-brand-lockup {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  animation: heroFadeUp 0.7s ease-out both;
}

.login-brand-lockup__logo {
  width: clamp(14rem, 28vw, 22rem);
  max-width: 100%;
  height: auto;
  object-fit: contain;
  flex: 0 0 auto;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.25));
  animation: heroFloat 6s ease-in-out infinite;
}

.login-hero h1 {
  animation: heroFadeUp 0.7s ease-out 0.12s both;
}

.login-hero > p.lead {
  animation: heroFadeUp 0.7s ease-out 0.2s both;
}

.login-hero .row.g-3.mb-4 > .col-md-4 {
  animation: heroFadeUp 0.7s ease-out both;
}

.login-hero .row.g-3.mb-4 > .col-md-4:nth-child(1) {
  animation-delay: 0.28s;
}

.login-hero .row.g-3.mb-4 > .col-md-4:nth-child(2) {
  animation-delay: 0.36s;
}

.login-hero .row.g-3.mb-4 > .col-md-4:nth-child(3) {
  animation-delay: 0.44s;
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feature-card {
  height: 100%;
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
}

.feature-card p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
}

.login-card {
  width: 100%;
  max-width: 620px;
  border-radius: 1.5rem;
  background: var(--capdev-surface-strong);
}

.login-card .form-control,
.login-card .form-select {
  border-radius: 0.9rem;
  min-height: 3.35rem;
}

@media (prefers-reduced-motion: reduce) {
  .login-brand-lockup,
  .login-brand-lockup__logo,
  .login-hero h1,
  .login-hero > p.lead,
  .login-hero .row.g-3.mb-4 > .col-md-4 {
    animation: none !important;
  }
}

.capdev-navbar {
  background: linear-gradient(135deg, #07131f 0%, #10233d 60%, #153d66 100%);
  box-shadow: 0 10px 30px rgba(7, 19, 31, 0.24);
}

.capdev-footer {
  padding: 1rem 1.25rem 1.35rem;
  color: rgba(16, 35, 61, 0.72);
  font-size: 0.82rem;
  line-height: 1.4;
}

.capdev-footer__inner {
  width: min(100% - 1.5rem, var(--capdev-page-max-width));
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.capdev-footer__text {
  margin: 0;
}

.capdev-footer__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
}

.capdev-footer__meta span {
  white-space: nowrap;
}

.login-page .capdev-footer {
  color: rgba(255, 255, 255, 0.72);
}

.login-page .capdev-footer__inner {
  border-top-color: rgba(255, 255, 255, 0.12);
}

.field-help {
  display: inline-grid !important;
  place-items: center;
  width: 0.95rem;
  height: 0.95rem;
  min-width: 0.95rem;
  min-height: 0.95rem;
  padding: 0 !important;
  margin-left: 0.1rem;
  appearance: none;
  border: 0 !important;
  border-radius: 50% !important;
  background: #f59e0b !important;
  color: #fff !important;
  font-weight: 800;
  font-size: 0.65rem;
  line-height: 1;
  text-align: center;
  text-decoration: none !important;
  vertical-align: middle;
  flex: 0 0 auto;
  transform: translateY(-0.05rem);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.14);
  transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.field-help:hover,
.field-help:focus {
  color: #fff !important;
  text-decoration: none !important;
  background: #ea8f00 !important;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.16);
}

.field-help:focus-visible {
  outline: none;
}

.login-page .field-help {
  background: #f59e0b !important;
  color: #fff !important;
}

.login-page .field-help:hover,
.login-page .field-help:focus {
  color: #fff !important;
  background: #ea8f00 !important;
}

.capdev-brand-logo {
  width: clamp(8.5rem, 12vw, 11rem);
  max-width: 100%;
  height: auto;
  object-fit: contain;
  flex: 0 0 auto;
}

.capdev-navbar .nav-link {
  border-radius: 0.75rem;
  padding-inline: 0.9rem;
}

.capdev-navbar .nav-link.active,
.capdev-navbar .nav-link:hover,
.capdev-navbar .nav-link:focus {
  background: rgba(255, 255, 255, 0.12);
}

.hero-panel,
.card-soft {
  background: var(--capdev-surface);
  border: 1px solid var(--capdev-border);
  border-radius: 1.5rem;
  box-shadow: var(--capdev-shadow);
  backdrop-filter: blur(12px);
}

.hero-panel {
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -2rem -5rem auto;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(23, 92, 211, 0.18), transparent 66%);
  pointer-events: none;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(23, 92, 211, 0.08);
  color: var(--capdev-blue);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.table-capdev {
  min-width: 1640px;
}

.table-capdev--report {
  min-width: 1520px;
  border-collapse: separate;
  border-spacing: 3px 0;
}

.table-capdev thead th {
  background: #0f2746;
  color: #fff;
  vertical-align: middle;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  padding-inline: 0.85rem;
  white-space: nowrap;
}

.table-capdev__subhead th {
  background: #153C65 !important;
  color: #fff !important;
  font-size: 0.76rem;
  padding-inline: 0.75rem;
}

.table-group-row td {
  background: #f3f4f6;
  font-weight: 700;
  color: #1f2937;
}

.table-capdev tbody td {
  vertical-align: top;
  font-size: 0.9rem;
  padding-inline: 0.85rem;
}

.table-capdev tbody tr:hover {
  background: rgba(23, 92, 211, 0.04);
}

.table-capdev .cell-muted {
  color: #5e6b7f;
}

.table-capdev .cell-clamp {
  max-width: 320px;
}

.table-capdev .cell-clamp p,
.table-capdev .cell-clamp span {
  margin-bottom: 0;
}

.summary-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  padding: 1rem;
  height: 100%;
}

.summary-card .label {
  color: #6b7280;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.summary-card .value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #10233d;
}

.badge-role {
  min-width: 78px;
  justify-content: center;
}

.role-picker {
  display: grid;
  gap: 0.75rem;
}

.role-option {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.92);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.role-option:hover {
  border-color: rgba(23, 92, 211, 0.28);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.role-option__meta {
  flex: 1;
}

.role-option__title {
  font-weight: 700;
  color: #10233d;
}

.role-option__description {
  color: #5e6b7f;
  font-size: 0.9rem;
}

.role-option .form-check-input {
  margin-top: 0.2rem;
}

.permission-badge {
  background: rgba(23, 92, 211, 0.08);
  border: 1px solid rgba(23, 92, 211, 0.16);
  color: #175cd3;
  font-weight: 600;
}

.role-badge {
  background: rgba(249, 115, 22, 0.08);
  border: 1px solid rgba(249, 115, 22, 0.18);
  color: #c2410c;
}

.analytics-chart-card {
  height: 100%;
}

.analytics-chart-shell {
  position: relative;
  min-height: 320px;
}

.analytics-chart-shell canvas {
  width: 100% !important;
  height: 100% !important;
}

.analytics-empty-state {
  border-style: dashed !important;
}

.report-banner {
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.report-banner__block {
  height: 100%;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.report-banner__label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6b7280;
}

.report-banner__value {
  margin-top: 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: #10233d;
}

.table-capdev .badge.rounded-pill.bg-info.bg-opacity-10.text-info.border.border-info.text-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 237, 213, 0.95) !important;
  color: #9a3412 !important;
  border: 1px solid rgba(249, 115, 22, 0.32) !important;
  font-weight: 600;
  line-height: 1.2;
}

.action-group .btn {
  white-space: nowrap;
}

.modal-content {
  border-radius: 1.25rem;
}

.user-modal-dialog,
.add-user-modal-dialog {
  max-width: 1120px;
}

.user-modal-dialog .modal-content,
.add-user-modal-dialog .modal-content {
  overflow: hidden;
}

.user-modal-dialog .modal-body,
.add-user-modal-dialog .modal-body {
  padding: 1.5rem 1.75rem 1.75rem;
}

.location-panel {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1rem;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.location-panel__title {
  color: #10233d;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.location-panel__subtitle {
  color: #5e6b7f;
  font-size: 0.9rem;
}

.modal-header {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

.modal-footer {
  border-top-color: rgba(15, 23, 42, 0.08);
}

.toast-container {
  z-index: 1100;
}

.toast {
  border-radius: 1rem;
}

.alert {
  border-radius: 1rem;
}

@media (max-width: 991.98px) {
  .login-hero {
    margin-bottom: 1rem;
  }

  .login-brand-lockup {
    align-items: flex-start;
  }

  .capdev-page-shell {
    width: min(100% - 1rem, var(--capdev-page-max-width));
  }

  .capdev-footer__inner {
    width: min(100% - 1rem, var(--capdev-page-max-width));
  }

  .table-capdev {
    min-width: 1520px;
  }
}

@media (max-width: 575.98px) {
  .login-brand-lockup {
    gap: 0.75rem;
  }

  .login-brand-lockup__logo {
    width: min(100%, 16rem);
  }

  .capdev-brand-logo {
    width: min(100%, 8.5rem);
  }

  .hero-panel,
  .card-soft,
  .login-card {
    border-radius: 1rem;
  }

  .user-modal-dialog .modal-body,
  .add-user-modal-dialog .modal-body {
    padding: 1rem;
  }

  .summary-card .value {
    font-size: 1.25rem;
  }
}
