/* GCC Admin — Guinea national palette (aligned with GoodConductCertificate.Web) */
:root {
  --gcc-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gcc-flag-red: #ce1126;
  --gcc-flag-yellow: #fcd116;
  --gcc-flag-green: #009460;

  --gcc-primary: #007a4d;
  --gcc-primary-dark: #005c3a;
  --gcc-primary-light: #009460;
  --gcc-accent: #ce1126;
  --gcc-accent-soft: rgba(0, 122, 77, 0.12);

  --gcc-sidebar-bg: #0c1814;
  --gcc-sidebar-text: #e2e8f0;
  --gcc-sidebar-hover: #152922;
  --gcc-sidebar-active: #061510;
  --gcc-card-shadow: 0 1px 3px rgba(12, 40, 28, 0.06), 0 1px 2px rgba(12, 40, 28, 0.04);
  --gcc-card-shadow-hover: 0 10px 40px -10px rgba(0, 60, 40, 0.14), 0 4px 16px rgba(12, 40, 28, 0.06);
  --gcc-border: #dce8e2;
  --gcc-page-bg: #f4faf7;
  --gcc-topbar-bg: rgba(255, 255, 255, 0.92);
  --gcc-radius: 0.5rem;
  --gcc-radius-lg: 0.75rem;
  --gcc-transition: 0.2s ease;

  --bs-primary: #007a4d;
  --bs-primary-rgb: 0, 122, 77;
  --bs-link-color: #007a4d;
  --bs-link-hover-color: #005c3a;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --gcc-transition: 0.01ms;
  }
}

body.admin-shell,
body.login-page {
  background-color: var(--gcc-page-bg);
  min-height: 100vh;
  font-size: 0.9375rem;
  font-family: var(--gcc-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #1a2e26;
}

body.admin-shell :focus-visible {
  outline: 2px solid var(--gcc-primary);
  outline-offset: 2px;
}

body.admin-shell .btn:focus-visible {
  outline-offset: 2px;
}

/* Sidebar */
.admin-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1030;
  width: 260px;
  height: 100vh;
  background: linear-gradient(180deg, var(--gcc-sidebar-bg) 0%, #070f0c 100%);
  color: var(--gcc-sidebar-text);
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 4px 0 32px rgba(0, 0, 0, 0.22);
  transition: transform var(--gcc-transition), width var(--gcc-transition);
}

.admin-sidebar .sidebar-brand {
  padding: 1.35rem 1.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: block;
  text-decoration: none;
  letter-spacing: -0.02em;
  position: relative;
}

.admin-sidebar .sidebar-brand::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--gcc-flag-red) 0%, var(--gcc-flag-yellow) 50%, var(--gcc-flag-green) 100%);
  border-radius: 0 0.2rem 0.2rem 0;
  opacity: 0.95;
}

.admin-sidebar .sidebar-brand:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.admin-sidebar .sidebar-brand-text {
  display: block;
  padding-left: 0.35rem;
}

.admin-sidebar .sidebar-brand.d-flex .sidebar-brand-text {
  padding-left: 0;
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}

/* Coat of arms: light medallion on dark sidebar (same approach as Web header) */
.admin-sidebar .sidebar-brand .app-emblem-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 3.125rem;
  height: 3.125rem;
  padding: 0.4rem;
  border-radius: 0.55rem;
  background: radial-gradient(circle at 35% 20%, rgba(255, 255, 255, 0.98) 0%, rgba(248, 244, 234, 0.96) 55%, rgba(235, 230, 218, 0.94) 100%);
  border: 1px solid rgba(252, 209, 22, 0.4);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.22),
    0 6px 18px rgba(0, 0, 0, 0.35),
    inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

.admin-sidebar .sidebar-brand .app-emblem-badge-img {
  width: 100%;
  height: 100%;
  max-width: 2.125rem;
  max-height: 2.125rem;
  object-fit: contain;
  object-position: center;
}

.admin-sidebar .nav-section {
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.admin-sidebar .nav-section-title {
  padding: 0.5rem 1.5rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: rgba(226,232,240,.6);
}

.admin-sidebar .nav-link {
  color: rgba(226, 232, 240, 0.92);
  padding: 0.55rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-left: 3px solid transparent;
  margin-right: 0.5rem;
  border-radius: 0 0.35rem 0.35rem 0;
  transition: background var(--gcc-transition), color var(--gcc-transition), border-color var(--gcc-transition), transform 0.15s ease;
}

.admin-sidebar .nav-link:hover {
  background: var(--gcc-sidebar-hover);
  color: #fff;
  transform: translateX(2px);
}

@media (prefers-reduced-motion: reduce) {
  .admin-sidebar .nav-link:hover {
    transform: none;
  }
}

.admin-sidebar .nav-link.active {
  background: rgba(6, 21, 16, 0.92);
  color: #fff;
  border-left-color: var(--gcc-flag-yellow);
  box-shadow: inset 0 0 0 1px rgba(252, 209, 22, 0.2);
}

.admin-sidebar .dropdown-menu {
  background: var(--gcc-sidebar-hover);
  border: none;
  border-radius: 0;
  padding: 0.25rem 0;
  box-shadow: 0 10px 40px rgba(0,0,0,.2);
}

.admin-sidebar .dropdown-item {
  color: var(--gcc-sidebar-text);
  padding: 0.5rem 1.5rem 0.5rem 2.5rem;
}

.admin-sidebar .dropdown-item:hover {
  background: var(--gcc-sidebar-active);
  color: #fff;
}

/* Main content area */
.admin-main {
  margin-left: 260px;
  min-height: 100vh;
  min-width: 0; /* allow main column to shrink so wide tables scroll inside, not off-screen */
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  background: var(--gcc-topbar-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gcc-border);
  padding: 0.85rem 1.5rem;
  box-shadow: 0 1px 0 rgba(12, 40, 28, 0.06), 0 8px 32px -8px rgba(0, 60, 40, 0.08);
  position: sticky;
  top: 0;
  z-index: 1020;
}

.admin-topbar-eyebrow {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #94a3b8;
  margin-bottom: 0.15rem;
}

.admin-topbar-page {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0d1f18;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.btn-icon {
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--gcc-radius);
}

.admin-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 14rem;
  padding: 0.35rem 0.65rem 0.35rem 0.35rem;
  border-radius: 999px;
  background: #eef6f1;
  border: 1px solid var(--gcc-border);
  color: #3d524a;
  font-size: 0.8125rem;
  transition: background var(--gcc-transition), border-color var(--gcc-transition), box-shadow var(--gcc-transition);
}

.admin-user-chip:hover {
  background: #e2efe8;
  border-color: #c5d9ce;
  color: #0d1f18;
  box-shadow: 0 2px 8px rgba(0, 60, 40, 0.08);
}

.admin-user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--gcc-primary), var(--gcc-primary-dark));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-user-name {
  font-weight: 500;
}

.admin-dropdown-menu {
  border-radius: var(--gcc-radius-lg);
  padding: 0.35rem;
  min-width: 10rem;
}

.admin-dropdown-menu .dropdown-item {
  padding: 0.45rem 0.75rem;
  border-radius: 0.35rem;
  font-size: 0.9rem;
}

.admin-dropdown-menu .dropdown-item:hover {
  background: var(--gcc-accent-soft);
  color: var(--gcc-primary-dark);
}

.admin-content {
  flex: 1;
  min-width: 0;
  padding: 1.5rem 1.25rem 2rem;
}

.admin-content-inner {
  max-width: 1600px;
  margin: 0 auto;
  min-width: 0;
  width: 100%;
  animation: adminContentIn 0.35s ease-out;
}

@keyframes adminContentIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-content-inner {
    animation: none;
  }
}

/* Full-screen processing overlay */
.processing-overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 24, 18, 0.55);
  backdrop-filter: blur(4px);
  z-index: 10500;
  display: none;
  align-items: center;
  justify-content: center;
}

.processing-box {
  padding: 1.75rem 2rem;
  background: rgba(10, 22, 16, 0.95);
  border-radius: var(--gcc-radius-lg);
  text-align: center;
  min-width: 260px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Page titles */
.page-header {
  margin-bottom: 1.75rem;
  padding-bottom: 0.25rem;
}

.page-header h1 {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.35rem;
  color: #0d1f18;
}

.page-header .lead, .page-header .text-muted {
  font-size: 0.9rem;
  margin-bottom: 0;
  color: #64748b !important;
}

.admin-content-inner > h1:first-child:not(.h4):not(.h5):not(.h6),
.admin-content-inner > h1.h4:first-child {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0d1f18;
  margin-bottom: 0.5rem;
}

.admin-content-inner > h1:first-child + .text-muted,
.admin-content-inner > h1:first-child + p.text-muted {
  color: #64748b !important;
}

/* Cards */
.admin-card {
  background: #fff;
  border: 1px solid var(--gcc-border);
  border-radius: var(--gcc-radius-lg);
  box-shadow: var(--gcc-card-shadow);
  transition: box-shadow var(--gcc-transition), border-color var(--gcc-transition), transform 0.2s ease;
}

.admin-card:hover {
  box-shadow: var(--gcc-card-shadow-hover);
  border-color: #b8d4c8;
}

.admin-card .card-header {
  background: #fff;
  border-bottom: 1px solid var(--gcc-border);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.875rem 1.25rem;
  color: #2a3d35;
}

.admin-card .card-body {
  padding: 1.25rem;
}

/* Assisted enrolment – find / create citizen */
.enrolment-assist-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: #1a5c45;
  color: #fff;
  flex-shrink: 0;
}

.enrolment-assist-step-badge--alt {
  background: #3d5a80;
}

.enrolment-assist-create-card {
  background: linear-gradient(180deg, #f8faf9 0%, #fff 40%);
}

.enrolment-assist-empty {
  padding: 1rem 1.25rem;
  border: 1px dashed var(--gcc-border);
  border-radius: var(--gcc-radius-lg);
  background: #fafbfa;
}

.enrolment-assist-empty-icon {
  font-size: 1.75rem;
  line-height: 1;
  color: #94a3b8;
}

.enrolment-assist-result-card .gap-x-3 {
  column-gap: 1rem;
}

/* Assisted enrolment – create citizen */
.enrolment-assist-create {
  max-width: 52rem;
}

.enrolment-assist-create .breadcrumb {
  --bs-breadcrumb-divider: "›";
}

.enrolment-assist-create .breadcrumb a {
  text-decoration: none;
}

.enrolment-assist-create .breadcrumb a:hover {
  text-decoration: underline;
}

.enrolment-assist-type-badge {
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.45rem 0.85rem;
  border: 1px solid transparent;
}

.enrolment-assist-type-badge--citizen {
  background: #e8f5ef;
  color: #1a5c45;
  border-color: #b8d4c8;
}

.enrolment-assist-type-badge--noncitizen {
  background: #eef2f7;
  color: #3d5a80;
  border-color: #c5d0dc;
}

.enrolment-assist-prefill-alert {
  border-color: #b8d4c8;
  background: #f0f7f4;
  color: #2a3d35;
}

.enrolment-assist-type-toggle {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.enrolment-assist-type-toggle .btn {
  min-width: 7.5rem;
}

.enrolment-assist-locked-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: calc(1.5em + 0.75rem + 2px);
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--gcc-border);
  border-radius: var(--bs-border-radius, 0.375rem);
  background: #f6f8f7;
  color: #2a3d35;
}

.enrolment-assist-locked-value {
  font-weight: 500;
}

.enrolment-assist-locked-tag {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #64748b;
  background: #e8ecea;
  border-radius: 999px;
  padding: 0.15rem 0.5rem;
}

.enrolment-assist-create-actions {
  padding: 1rem 0 0.25rem;
  border-top: 1px solid var(--gcc-border);
}

/* Dashboard: applications-by-branch chart (half column, matches Branches by Region scale) */
.dashboard-branch-chart-wrap {
  height: 220px;
  position: relative;
}

/* Stat cards on dashboard */
.stat-card {
  border-radius: 0.5rem;
  border: none;
  box-shadow: var(--gcc-card-shadow);
  transition: transform .15s, box-shadow .2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--gcc-card-shadow-hover);
}

.stat-card .card-body {
  padding: 1.25rem;
}

.stat-card .stat-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .02em;
  margin-bottom: 0.25rem;
}

.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0d1f18;
  line-height: 1.2;
}

.stat-card .stat-link {
  font-size: 0.8rem;
  margin-top: 0.5rem;
  display: inline-block;
}

.stat-card.stat-card-link {
  cursor: pointer;
}

.stat-card.stat-card-link:focus-visible {
  outline: 2px solid var(--gcc-primary, #007a4d);
  outline-offset: 2px;
}

.stat-card.stat-card-link .card-body::after {
  content: "→";
  position: absolute;
  top: 1rem;
  right: 1rem;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.15s, transform 0.15s;
  color: var(--gcc-primary, #007a4d);
  font-weight: 700;
}

.stat-card.stat-card-link {
  position: relative;
}

.stat-card.stat-card-link:hover .card-body::after {
  opacity: 0.85;
  transform: translateX(0);
}

/* Role workload tiles — whole-card navigation */
.workload-card {
  display: block;
  border: 1px solid var(--gcc-border, #dce8e2);
  border-radius: var(--gcc-radius-lg, 0.5rem);
  padding: 1rem;
  height: 100%;
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s;
}

.workload-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--gcc-card-shadow-hover, 0 8px 24px rgba(12, 40, 28, 0.1));
  border-color: rgba(0, 122, 77, 0.25);
  color: inherit;
}

.workload-card:focus-visible {
  outline: 2px solid var(--gcc-primary, #007a4d);
  outline-offset: 2px;
}

.workload-card .workload-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.35rem;
}

.workload-card .workload-cta {
  font-size: 0.8rem;
  color: var(--gcc-primary, #007a4d);
  font-weight: 600;
}

/* Investigation hub KPI tiles */
.inv-hub-kpi {
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  border-left: 3px solid transparent;
}

.inv-hub-kpi:hover {
  transform: translateY(-2px);
  box-shadow: var(--gcc-card-shadow-hover, 0 8px 24px rgba(12, 40, 28, 0.1));
}

.inv-hub-kpi[data-inv-filter="payment"] { border-left-color: #b45309; }
.inv-hub-kpi[data-inv-filter="pipeline"] { border-left-color: var(--gcc-primary, #007a4d); }

.inv-hub-kpi:focus-visible {
  outline: 2px solid var(--gcc-primary, #007a4d);
  outline-offset: 2px;
}

/* Tables — card shell on wrapper when present; standalone .table-admin keeps its own shell */
.admin-content-inner .table-responsive {
  border-radius: var(--gcc-radius-lg);
  border: 1px solid var(--gcc-border);
  box-shadow: var(--gcc-card-shadow);
  background: #fff;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
}

.admin-content-inner .table-responsive > .table-admin {
  box-shadow: none;
  border-radius: 0;
}

.table-admin {
  background: #fff;
  border-radius: var(--gcc-radius-lg);
  overflow: hidden;
  box-shadow: var(--gcc-card-shadow);
  margin-bottom: 0;
}

.table-admin thead th {
  background: linear-gradient(180deg, #f0f7f3 0%, #e8f0ec 100%);
  border-bottom: 1px solid var(--gcc-border);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b;
  padding: 0.9rem 1rem;
  white-space: nowrap;
}

.table-admin tbody td {
  padding: 0.875rem 1rem;
  vertical-align: middle;
  border-bottom-color: #e8f0ec;
}

.table-admin tbody tr {
  transition: background 0.15s ease;
}

.table-admin tbody tr:hover {
  background: #f0f7f3;
}

.table-admin tbody tr:last-child td {
  border-bottom: none;
}

/* Buttons */
.btn {
  transition: background-color var(--gcc-transition), border-color var(--gcc-transition), color var(--gcc-transition), box-shadow var(--gcc-transition), transform 0.12s ease;
}

.btn:active:not(:disabled) {
  transform: translateY(1px);
}

@media (prefers-reduced-motion: reduce) {
  .btn:active:not(:disabled) {
    transform: none;
  }
}

.btn-primary {
  --bs-btn-bg: var(--gcc-primary);
  --bs-btn-border-color: var(--gcc-primary);
  --bs-btn-hover-bg: var(--gcc-primary-dark);
  --bs-btn-hover-border-color: var(--gcc-primary-dark);
  --bs-btn-active-bg: var(--gcc-primary-dark);
  --bs-btn-active-border-color: var(--gcc-primary-dark);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 122, 77, 0.25);
}

.btn-primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 4px 14px rgba(0, 122, 77, 0.32);
}

.btn-admin-primary {
  background: var(--gcc-primary);
  border-color: var(--gcc-primary);
  font-weight: 600;
  padding: 0.5rem 1rem;
}

.btn-admin-primary:hover {
  filter: brightness(1.05);
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.8125rem;
}

/* Forms */
.form-control, .form-select {
  border-radius: 0.375rem;
  border-color: var(--gcc-border);
}

.form-control:focus, .form-select:focus {
  border-color: var(--gcc-primary);
  box-shadow: 0 0 0 3px var(--gcc-accent-soft);
}

.form-label {
  font-weight: 500;
  color: #3d524a;
  margin-bottom: 0.35rem;
}

/* Badges */
.badge-status {
  font-weight: 500;
  padding: 0.35em 0.65em;
  font-size: 0.75rem;
}

/* Alerts */
.alert {
  border-radius: 0.5rem;
  border: none;
}

/* List groups in cards */
.list-group-flush .list-group-item {
  border-color: var(--gcc-border);
  padding: 0.75rem 1.25rem;
}

/* Mobile: collapse sidebar */
@media (max-width: 991.98px) {
  .admin-sidebar {
    transform: translateX(-100%);
    width: 280px;
  }

  .admin-sidebar.show {
    transform: translateX(0);
  }

  .admin-main {
    margin-left: 0;
  }

  .admin-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 1025;
  }

  .admin-sidebar-backdrop.show {
    display: block;
  }
}

/* Login page */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0;
  background:
    radial-gradient(ellipse 80% 60% at 100% 0%, rgba(252, 209, 22, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 0% 100%, rgba(206, 17, 38, 0.1) 0%, transparent 50%),
    linear-gradient(145deg, #003d28 0%, #0c1814 45%, #061510 100%);
}

.login-page-container {
  max-width: 1200px;
}

.login-lang .dropdown-menu {
  min-width: 8rem;
}

.login-lang .dropdown-item.active {
  background-color: var(--gcc-primary);
  color: #fff;
}

.login-page-emblem {
  width: 80px;
  height: 80px;
  object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.2));
}

.login-split {
  width: 100%;
}

.login-card {
  border-radius: 0.75rem;
  border: none;
}

.login-card--form {
  max-width: none;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
}

.login-aside-panel {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  padding: 1.75rem 1.75rem 2rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.4);
}

.login-aside-accent {
  width: 3rem;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gcc-flag-red), var(--gcc-flag-yellow), var(--gcc-flag-green));
}

.login-aside-lead {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.55;
}

.login-aside-muted {
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.5;
}

.login-aside-label {
  color: rgba(255, 255, 255, 0.55);
}

.login-aside-input {
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f1f5f9;
}

.login-aside-input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.login-aside-input:focus {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(0, 154, 96, 0.55);
  color: #fff;
  box-shadow: 0 0 0 0.2rem rgba(0, 122, 77, 0.2);
}

.login-aside-code {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: rgba(0, 0, 0, 0.28) !important;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #e2e8f0 !important;
}

@media (max-width: 991.98px) {
  .login-aside-panel {
    padding: 1.5rem;
  }
}

/* Application detail — status workflow */
.application-workflow-card {
  border: 1px solid var(--gcc-border);
  border-radius: 0.75rem;
  box-shadow: var(--gcc-card-shadow);
  overflow: hidden;
}

.application-workflow-card .workflow-card-header {
  background: linear-gradient(135deg, #eef6f1 0%, #e2efe8 100%);
  border-bottom: 1px solid var(--gcc-border);
  padding: 1rem 1.25rem;
}

.application-workflow-card .workflow-card-header h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: #0d1f18;
}

.application-workflow-card .workflow-card-lead {
  font-size: 0.8125rem;
  color: #64748b;
  margin: 0.25rem 0 0;
}

.application-status-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.application-status-summary .status-badge-lg {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.45em 0.85em;
  border-radius: 2rem;
  letter-spacing: 0.02em;
}

.workflow-pipeline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: #64748b;
}

.workflow-pipeline .pipe-step {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #e8f0ec;
  color: #64748b;
  transition: background 0.15s, color 0.15s;
}

.workflow-pipeline .pipe-step.active {
  background: #d1fae5;
  color: #047857;
  font-weight: 600;
}

.workflow-pipeline .pipe-step.done {
  background: #dcfce7;
  color: #15803d;
}

.workflow-pipeline .pipe-arrow {
  color: #cbd5e1;
  user-select: none;
}

.workflow-form-section {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid #e8f0ec;
}

.workflow-form-section:last-of-type {
  border-bottom: none;
}

.workflow-form-section h3 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin: 0 0 0.35rem;
}

.workflow-action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.workflow-action-lead {
  flex: 1 1 14rem;
  min-width: 0;
}

.workflow-action-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-left: auto;
}

.workflow-fallback-controls .form-select {
  min-width: 10rem;
  max-width: 14rem;
}

.workflow-section-clearance {
  background: #fafafa;
}

.application-workflow-card .workflow-outcome-btn,
.application-workflow-card .workflow-action-btn,
.application-workflow-card .workflow-toggle-panel-btn,
.application-workflow-card .workflow-fallback-btn {
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 0.375rem;
  white-space: nowrap;
}

.application-workflow-card .workflow-outcome-btn {
  padding: 0.3rem 0.75rem;
}

.workflow-collapsible-panel .workflow-action-buttons {
  width: 100%;
}

@media (max-width: 575.98px) {
  .workflow-action-row {
    align-items: flex-start;
  }

  .workflow-action-buttons {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }
}

.workflow-section-approval {
  background: #f8fafc;
}

.workflow-collapsible-panel {
  border-left: 2px solid var(--gcc-border);
  padding-left: 0.875rem;
  margin-top: 0.75rem !important;
}

.workflow-section-amend {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
}

.workflow-actions {
  padding: 1rem 1.25rem;
  background: #f0f7f3;
  border-top: 1px solid var(--gcc-border);
}

@media (max-width: 575.98px) {
  .workflow-pipeline {
    flex-direction: column;
    align-items: flex-start;
  }
  .workflow-pipeline .pipe-arrow {
    display: none;
  }
}

/* Document verification (investigation queue) */
.doc-verification-filters-title {
  letter-spacing: 0.04em;
}
.doc-investigation-table-card {
  border: 1px solid var(--gcc-border);
}
.doc-investigation-table thead th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #64748b;
  border-bottom-width: 1px;
}
.doc-template-verify-body .doc-verify-dl dt {
  font-weight: 500;
}
.doc-template-verify-body .doc-verify-dl dd {
  margin-bottom: 0.35rem;
}

.doc-template-verify-body .doc-verify-summary {
  font-size: 0.95rem;
  line-height: 1.45;
}
.doc-template-verify-body .doc-verify-metrics .small {
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}
.doc-template-verify-body .doc-verify-kv-table td {
  padding: 0.35rem 0.5rem;
  vertical-align: middle;
}
.doc-template-verify-body .doc-verify-kv-table td:first-child {
  width: 55%;
}

/* Access denied modal */
.admin-access-denied-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: rgba(206, 17, 38, 0.1);
  color: var(--gcc-accent, #ce1126);
  flex-shrink: 0;
}

#adminAccessDeniedModal .modal-content {
  border-radius: var(--gcc-radius-lg, 0.75rem);
}

#adminAccessDeniedModal .modal-body {
  color: #334155;
  line-height: 1.55;
}

/* Reports */
.report-page-header h1 {
  margin-bottom: 0.35rem;
}

.report-page-eyebrow {
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gcc-primary);
  margin-bottom: 0.35rem;
}

.report-page-header-actions {
  padding-top: 0.15rem;
}

.report-hub-card .card-title {
  font-size: 1.05rem;
  font-weight: 650;
  margin-bottom: 0.5rem;
  color: #0d1f18;
}

.report-hub-card .card-text {
  font-size: 0.875rem;
  line-height: 1.45;
}

.report-hub-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 0.75rem;
  border-radius: 0.5rem;
  background: var(--gcc-accent-soft);
  color: var(--gcc-primary-dark);
  font-size: 1rem;
  font-weight: 700;
}

.report-hub-icon--success {
  background: rgba(0, 148, 96, 0.12);
  color: var(--gcc-flag-green);
}

.report-hub-icon--danger {
  background: rgba(206, 17, 38, 0.1);
  color: var(--gcc-accent);
}

.report-filter-card:hover {
  transform: none;
}

.report-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.75rem;
}

.report-kpi-grid--compact {
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
}

.report-kpi {
  min-height: 100%;
}

.report-kpi:hover {
  transform: none;
}

.report-kpi .card-body {
  padding: 0.85rem 1rem;
}

.report-kpi-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.report-kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0d1f18;
  line-height: 1.2;
}

.report-kpi-value--sm {
  font-size: 1.1rem;
  font-weight: 650;
}

.report-stats-table-wrap {
  max-height: min(70vh, 40rem);
  overflow: auto;
}

.report-stats-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8faf9;
  box-shadow: inset 0 -1px 0 var(--gcc-border);
}

.report-stats-period-col {
  position: sticky;
  left: 0;
  z-index: 1;
  background: #fff;
  min-width: 7.5rem;
}

.report-stats-matrix thead .report-stats-period-col {
  z-index: 3;
  background: #f8faf9;
}

.report-stats-total-col,
.report-stats-matrix tbody td:last-child,
.report-stats-matrix tfoot th:last-child {
  background: rgba(0, 122, 77, 0.04);
}

.report-stats-footer th {
  border-top: 2px solid var(--gcc-border);
  background: #f1f6f3;
  font-weight: 700;
}

.report-stats-matrix tbody td.report-stats-period-col,
.report-stats-matrix tbody td:first-child {
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
}

.report-stats-matrix tbody tr:hover td:first-child {
  background: #f8faf9;
}

.report-status-multiselect {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--gcc-border);
  border-radius: var(--gcc-radius);
  background: #f8faf9;
  max-height: 9.5rem;
  overflow-y: auto;
}

.report-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--gcc-border);
  border-radius: 999px;
  background: #fff;
  font-size: 0.8rem;
  cursor: pointer;
  user-select: none;
  transition: border-color var(--gcc-transition), background var(--gcc-transition);
}

.report-status-chip:hover {
  border-color: var(--gcc-primary);
}

.report-status-chip:has(input:checked) {
  border-color: var(--gcc-primary);
  background: var(--gcc-accent-soft);
  color: var(--gcc-primary-dark);
}

.report-status-chip input {
  margin: 0;
  accent-color: var(--gcc-primary);
}

.gcc-id-validity-form {
  border: 1px solid var(--gcc-border);
  border-radius: var(--gcc-radius);
  background: linear-gradient(180deg, #fbfefc 0%, #f4faf7 100%);
  padding: 1rem 1.15rem 1.1rem;
}

.gcc-id-validity-form__title {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #1a2e26;
  margin-bottom: 0.25rem;
}

.gcc-id-validity-form .form-label {
  font-size: 0.8125rem;
  font-weight: 600;
}

.gcc-id-validity {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.75rem;
  margin: 0.65rem 0 0;
  padding: 0.65rem 0.8rem;
  background: #f7fbf9;
  border: 1px solid var(--gcc-border);
  border-radius: var(--gcc-radius);
  max-width: 28rem;
}

.gcc-id-validity > div {
  min-width: 8.25rem;
}

.gcc-id-validity dt {
  margin: 0 0 0.15rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5c6f66;
}

.gcc-id-validity dd {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #1a2e26;
  letter-spacing: 0.01em;
}

.gcc-id-validity-cell {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.conviction-entry-nav {
  position: sticky;
  top: 0;
  z-index: 15;
  background: #fff;
  margin: -0.25rem 0 1rem;
  padding: 0.35rem 0 0.65rem;
}

.conviction-entry .conviction-choice {
  gap: 0.4rem;
}

.conviction-entry .conviction-choice .form-check-inline {
  position: relative;
  margin: 0;
}

.conviction-entry .conviction-choice .form-check-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.conviction-entry .conviction-choice .form-check-label {
  display: inline-block;
  border: 1px solid var(--gcc-border);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  background: #fff;
  font-weight: 500;
}

.conviction-entry .conviction-choice .form-check-input:checked + .form-check-label {
  background: var(--gcc-primary);
  border-color: var(--gcc-primary);
  color: #fff;
}

.conviction-entry .conviction-choice .form-check-input:focus-visible + .form-check-label {
  outline: 2px solid var(--gcc-primary);
  outline-offset: 2px;
}

.conviction-file-name {
  display: block;
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.conviction-fiche-dock {
  position: sticky;
  top: 0.75rem;
  min-width: 0;
  max-width: 100%;
}

.conviction-fiche-view {
  min-height: 68vh;
  overflow: auto;
  background: #f4f6f8;
  display: flex;
  flex-direction: column;
}

.conviction-fiche-view iframe {
  width: 100%;
  height: 68vh;
  flex: 0 0 auto;
  background: #fff;
  border: 0;
}

.conviction-fiche-view img {
  width: 100%;
  height: auto;
  background: #fff;
  border: 0;
}

.conviction-compare-doc {
  display: flex;
  flex-direction: column;
}

.conviction-doc-scroll {
  flex: 1 1 auto;
  min-height: 24rem;
  overflow: auto;
  background: #f4f6f8;
}

.conviction-doc-scroll iframe {
  display: block;
  width: 100%;
  height: 70vh;
  border: 0;
  background: #fff;
}

.conviction-doc-scroll img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
}

@media (min-width: 1200px) {
  .conviction-split > .col-xl-7 > .card,
  .conviction-compare > .col-xl-5 > .card {
    align-self: flex-start;
    height: auto;
    margin-bottom: 0;
  }

  .conviction-compare-doc,
  .conviction-split .conviction-fiche-dock {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
  }

  .conviction-split .conviction-fiche-dock {
    position: static;
    display: flex;
    flex-direction: column;
  }

  .conviction-compare .conviction-doc-scroll,
  .conviction-split .conviction-fiche-view {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
  }

  .conviction-compare .conviction-doc-scroll iframe,
  .conviction-split .conviction-fiche-view iframe {
    height: 100%;
    min-height: 100%;
  }
}

.conviction-fiche-empty {
  max-width: 22rem;
  margin: auto;
  padding: 1.5rem;
  text-align: center;
  color: #5c6f66;
}

.conviction-fiche-dock.is-dragover {
  outline: 2px dashed var(--gcc-primary);
  outline-offset: -6px;
}

.conviction-savebar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  background: #fff;
  border-top: 1px solid var(--gcc-border);
  margin: 1rem -1rem -1rem;
  padding: 0.75rem 1rem;
}
