:root {
  --ajj-red: #cc1a1a;
  --ajj-red-dark: #a81515;
  --ajj-gold: #c9a227;
  --ajj-bg: #f9fafb;
  --ajj-text: #1f2937;
  --ajj-muted: #9ca3af;
  --ajj-border: #f3f4f6;
  --ajj-shadow: 0 18px 45px rgba(17, 24, 39, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body,
.app-shell {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--ajj-bg);
  color: var(--ajj-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
}

a {
  text-decoration: none;
}

.text-xxs {
  font-size: 0.68rem;
}

.line-clamp-2 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.brand-gradient {
  background: linear-gradient(135deg, var(--ajj-red), var(--ajj-red-dark));
}

.login-layout {
  min-height: 100vh;
  display: flex;
}

.login-visual {
  position: relative;
  display: none;
  width: 50%;
  overflow: hidden;
}

.login-visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.login-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  background: #f9fafb;
}

.login-card {
  width: 100%;
  max-width: 28rem;
}

.logo-pill {
  width: fit-content;
  margin: 0 auto 1.5rem;
  padding: 0.75rem 1.5rem;
  background: #fff;
  border: 1px solid #f3f4f6;
  border-radius: 1rem;
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.1);
}

.logo-pill img,
.mobile-logo img {
  height: 3rem;
  width: auto;
  object-fit: contain;
}

.surface {
  background: #fff;
  border: 1px solid var(--ajj-border);
  border-radius: 1rem;
  box-shadow: 0 18px 45px rgba(17, 24, 39, 0.08);
}

.login-form-card {
  padding: 2rem;
  border-radius: 1rem;
}

.form-control,
.form-select {
  display: block;
  width: 100%;
  border-color: #e5e7eb;
  border-radius: 0.75rem;
  min-height: 2.85rem;
  font-size: 0.875rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--ajj-red);
  box-shadow: 0 0 0 0.2rem rgba(204, 26, 26, 0.1);
}

.btn-brand {
  color: #fff;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, var(--ajj-red), var(--ajj-red-dark));
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.btn-brand:hover,
.btn-brand:focus {
  color: #fff;
  box-shadow: 0 10px 24px rgba(204, 26, 26, 0.22);
}

.btn-brand:active {
  transform: scale(0.98);
}

.btn-soft {
  color: #4b5563;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  font-weight: 700;
}

.btn-soft:hover {
  background: #f9fafb;
  color: #111827;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  color: #9ca3af;
  background: transparent;
  transform: translateY(-50%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  width: 100%;
  height: 3.5rem;
  background: #fff;
  border-bottom: 2px solid var(--ajj-red);
}

.topbar-inner {
  max-width: 80rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0 auto;
  padding: 0 1rem;
}

.topbar-logo {
  display: flex;
  align-items: center;
  padding: 0;
  background: transparent;
}

.topbar-logo img {
  height: 1.75rem;
  width: auto;
}

.search-wrap {
  position: relative;
  width: min(100%, 24rem);
}

.search-wrap .icon {
  position: absolute;
  top: 50%;
  left: 0.75rem;
  color: #9ca3af;
  transform: translateY(-50%);
}

.search-input {
  width: 100%;
  padding: 0.45rem 0.75rem 0.45rem 2.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.6rem;
  background: #f5f5f5;
  color: #111827;
  font-size: 0.875rem;
  outline: 0;
}

.search-input:focus {
  border-color: var(--ajj-red);
  box-shadow: 0 0 0 0.15rem rgba(204, 26, 26, 0.1);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.admin-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.35rem;
  padding: 0.45rem 0.75rem;
  border-radius: 0.6rem;
  color: #6b7280;
  background: transparent;
  font-size: 0.875rem;
  font-weight: 700;
}

.admin-toggle:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.admin-toggle.active {
  color: #fff;
  background: var(--ajj-red);
}

.profile-trigger {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.55rem;
  padding: 0.35rem 0.45rem 0.35rem 0.6rem;
  border-radius: 0.6rem;
  background: transparent;
  color: #6b7280;
  transition: background 0.18s ease, color 0.18s ease;
}

.profile-trigger:hover,
.profile-trigger:focus-within {
  background: #f3f4f6;
  color: #1f2937;
}

.profile-avatar-button,
.profile-name-button,
.profile-meta-button,
.profile-chevron-button {
  border: 0;
  background: transparent;
}

.profile-avatar-button {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 0;
}

.profile-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 0;
  line-height: 1;
}

.profile-name-button {
  max-width: 7rem;
  padding: 0;
  color: #1f2937;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.05;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.profile-meta-button,
.profile-meta-text {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.18rem;
  padding: 0;
  color: var(--ajj-red);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.05;
  white-space: nowrap;
}

.profile-meta-button:hover,
.profile-meta-button:focus {
  color: var(--ajj-red-dark);
  text-decoration: underline;
}

.profile-chevron-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.8rem;
  padding: 0;
  color: #9ca3af;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(204, 26, 26, 0.14);
  color: var(--ajj-red);
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 0 0 0 2px #e5e7eb;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-lg {
  width: 3rem;
  height: 3rem;
  font-size: 0.9rem;
}

.dropdown-panel {
  position: absolute;
  top: 3rem;
  right: 0;
  z-index: 1040;
  width: 18rem;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--ajj-border);
  border-radius: 0.9rem;
  box-shadow: var(--ajj-shadow);
}

.dropdown-backdrop,
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1035;
  background: transparent;
}

.users-popover {
  width: 20rem;
}

.app-users-popover {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  z-index: 1040;
  width: min(18rem, 90vw);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--ajj-border);
  border-radius: 0.9rem;
  box-shadow: var(--ajj-shadow);
}

.scroll-area {
  overflow-y: auto;
  max-height: 20rem;
}

.page-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.category-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.35rem;
  padding: 0.45rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  color: #6b7280;
  background: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.category-tab:hover {
  background: #f3f4f6;
}

.category-tab.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--ajj-red), var(--ajj-red-dark));
  box-shadow: 0 10px 22px rgba(204, 26, 26, 0.18);
}

.section-title {
  margin: 0 0 1rem;
  color: #9ca3af;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.app-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  min-height: 11.5rem;
  padding: 1.25rem;
  text-align: left;
  background: #fff;
  border: 1px solid var(--ajj-border);
  border-radius: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.app-card:hover {
  border-color: #e5e7eb;
  box-shadow: 0 14px 32px rgba(17, 24, 39, 0.08);
  transform: translateY(-0.25rem);
}

.app-card-icon,
.web-icon,
.mini-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 0.75rem;
}

.app-card-icon {
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  transition: transform 0.2s ease;
}

.app-card:hover .app-card-icon {
  transform: scale(1.08);
}

.app-card-title {
  margin-bottom: 0.25rem;
  color: #1f2937;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.25;
}

.app-card-desc {
  color: #9ca3af;
  font-size: 0.75rem;
  line-height: 1.45;
}

.app-card-badge {
  margin-top: auto;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.web-group {
  margin-bottom: 2rem;
}

.web-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.web-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: min(100%, 17rem);
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid var(--ajj-border);
  border-radius: 0.85rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.web-card:hover {
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.08);
  transform: translateY(-0.12rem);
}

.web-icon {
  width: 2rem;
  height: 2rem;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 18rem;
  text-align: center;
}

.admin-hero {
  width: 100%;
  padding: 2rem 1rem;
  background: #fff;
  border-bottom: 1px solid var(--ajj-border);
}

.admin-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  color: #6b7280;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.9rem;
  font-size: 0.875rem;
  font-weight: 800;
}

.admin-tab.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--ajj-red), var(--ajj-red-dark));
  box-shadow: 0 10px 22px rgba(204, 26, 26, 0.18);
}

.admin-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--ajj-border);
  border-radius: 1rem;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.03);
}

.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--ajj-border);
}

.user-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1rem;
  text-align: left;
  background: #fff;
  border-bottom: 1px solid #f9fafb;
}

.user-row:hover,
.user-row.active {
  background: #eff6ff;
}

.access-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  max-height: 32rem;
  overflow-y: auto;
  padding: 1rem;
}

.access-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  text-align: left;
  background: #f9fafb;
  border: 1px solid var(--ajj-border);
  border-radius: 0.9rem;
}

.access-card.active {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.apps-admin-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.admin-app-card {
  position: relative;
  min-height: 12rem;
}

.admin-app-actions {
  display: flex;
  gap: 0.35rem;
  position: absolute;
  top: 1rem;
  right: 1rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: #6b7280;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e5e7eb;
  border-radius: 0.65rem;
}

.icon-btn:hover {
  background: #fff;
  color: #111827;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 900;
}

.status-pill.active {
  color: #15803d;
  background: #dcfce7;
}

.status-pill.inactive {
  color: #6b7280;
  background: #f3f4f6;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  width: min(100%, 28rem);
  height: 100%;
  background: #fff;
  box-shadow: -20px 0 55px rgba(17, 24, 39, 0.18);
}

.drawer-wide {
  width: min(100%, 44rem);
}

.drawer-backdrop {
  z-index: 1045;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(4px);
}

.drawer-header,
.drawer-footer {
  flex: 0 0 auto;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--ajj-border);
}

.drawer-footer {
  border-top: 1px solid var(--ajj-border);
  border-bottom: 0;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
}

.icon-picker {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.4rem;
  max-height: 12rem;
  overflow-y: auto;
  margin-top: 0.5rem;
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.9rem;
}

.color-swatch {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.55rem;
  transition: transform 0.18s ease;
}

.color-swatch:hover {
  transform: scale(1.08);
}

.color-swatch.active {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.data-overlay {
  position: fixed;
  inset: 0;
  z-index: 1060;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #f9fafb;
}

.data-topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 0 0 auto;
  padding: 1rem 1.5rem;
  background: #fff;
  border-bottom: 1px solid var(--ajj-border);
}

.data-body {
  flex: 1;
  overflow-y: auto;
  padding: 2rem 1.5rem;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.kpi-card {
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--ajj-border);
  border-radius: 1rem;
  box-shadow: 0 8px 22px rgba(17, 24, 39, 0.03);
}

.divider-label {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  color: #9ca3af;
  font-size: 0.75rem;
}

.divider-label::before,
.divider-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e5e7eb;
}

.divider-label span {
  padding: 0 1rem;
  background: #fff;
}

.spinner-ring {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid #e5e7eb;
  border-top-color: var(--ajj-red);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

.microsoft-mark {
  display: grid;
  grid-template-columns: repeat(2, 0.55rem);
  grid-template-rows: repeat(2, 0.55rem);
  gap: 0.08rem;
}

.microsoft-mark span {
  display: block;
}

.profile-trigger:hover .profile-name-button,
.profile-trigger:focus-within .profile-name-button {
  color: #111827;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 576px) {
  .apps-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .access-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .apps-admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .apps-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .login-visual {
    display: flex;
  }

  .apps-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .apps-admin-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .apps-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar-inner {
    gap: 0.55rem;
    padding: 0 0.75rem;
  }

  .topbar-logo img {
    height: 1.45rem;
  }

  .admin-toggle span,
  .profile-copy {
    display: none;
  }

  .search-wrap {
    width: auto;
    flex: 1;
  }

  .login-form-card {
    padding: 1.5rem;
  }
}

/* Local Bootstrap-compatible fallback utilities */
.d-none {
  display: none !important;
}

.d-block {
  display: block !important;
}

.d-flex,
.d-inline-flex {
  display: flex !important;
}

.d-inline-flex {
  display: inline-flex !important;
}

.vstack {
  display: flex;
  flex-direction: column;
}

.flex-column {
  flex-direction: column !important;
}

.flex-wrap {
  flex-wrap: wrap !important;
}

.flex-fill {
  flex: 1 1 auto !important;
}

.flex-grow-1 {
  flex-grow: 1 !important;
}

.align-items-center {
  align-items: center !important;
}

.align-items-start {
  align-items: flex-start !important;
}

.justify-content-center {
  justify-content: center !important;
}

.justify-content-between {
  justify-content: space-between !important;
}

.gap-1 {
  gap: 0.25rem !important;
}

.gap-2 {
  gap: 0.5rem !important;
}

.gap-3 {
  gap: 1rem !important;
}

.gap-4 {
  gap: 1.5rem !important;
}

.w-100 {
  width: 100% !important;
}

.h-100 {
  height: 100% !important;
}

.min-vh-100 {
  min-height: 100vh !important;
}

.min-w-0 {
  min-width: 0 !important;
}

.mx-auto {
  margin-right: auto !important;
  margin-left: auto !important;
}

.ms-auto {
  margin-left: auto !important;
}

.ms-2 {
  margin-left: 0.5rem !important;
}

.mt-1 {
  margin-top: 0.25rem !important;
}

.mt-2 {
  margin-top: 0.5rem !important;
}

.mt-3 {
  margin-top: 1rem !important;
}

.mt-4 {
  margin-top: 1.5rem !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.mb-1 {
  margin-bottom: 0.25rem !important;
}

.mb-2 {
  margin-bottom: 0.5rem !important;
}

.mb-3 {
  margin-bottom: 1rem !important;
}

.mb-4 {
  margin-bottom: 1.5rem !important;
}

.mb-5 {
  margin-bottom: 3rem !important;
}

.p-0 {
  padding: 0 !important;
}

.p-3 {
  padding: 1rem !important;
}

.p-4 {
  padding: 1.5rem !important;
}

.px-3 {
  padding-right: 1rem !important;
  padding-left: 1rem !important;
}

.px-4 {
  padding-right: 1.5rem !important;
  padding-left: 1.5rem !important;
}

.py-0 {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.py-2 {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
}

.py-3 {
  padding-top: 1rem !important;
  padding-bottom: 1rem !important;
}

.py-4 {
  padding-top: 1.5rem !important;
  padding-bottom: 1.5rem !important;
}

.py-5 {
  padding-top: 3rem !important;
  padding-bottom: 3rem !important;
}

.pe-5 {
  padding-right: 3rem !important;
}

.text-center {
  text-align: center !important;
}

.text-start {
  text-align: left !important;
}

.text-end {
  text-align: right !important;
}

.text-uppercase {
  text-transform: uppercase !important;
}

.text-truncate {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.text-break {
  overflow-wrap: break-word !important;
  word-break: break-word !important;
}

.text-dark {
  color: #151a22 !important;
}

.text-secondary {
  color: #697282 !important;
}

.text-danger {
  color: #b91c1c !important;
}

.text-primary {
  color: #1d4ed8 !important;
}

.text-white {
  color: #fff !important;
}

.bg-white {
  background-color: #fff !important;
}

.bg-transparent {
  background-color: transparent !important;
}

.bg-light {
  background-color: #f7f8fa !important;
}

.fw-semibold {
  font-weight: 600 !important;
}

.fw-bold {
  font-weight: 800 !important;
}

.small {
  font-size: 0.875rem !important;
}

.h4,
.h5,
.h6 {
  color: inherit;
  font-weight: 800;
  line-height: 1.2;
}

.h4 {
  font-size: 1.5rem;
}

.h5 {
  font-size: 1.25rem;
}

.h6 {
  font-size: 1rem;
}

.lh-1 {
  line-height: 1 !important;
}

.lh-sm {
  line-height: 1.25 !important;
}

.opacity-0 {
  opacity: 0 !important;
}

.opacity-25 {
  opacity: 0.25 !important;
}

.opacity-75 {
  opacity: 0.75 !important;
}

.position-relative {
  position: relative !important;
}

.position-absolute {
  position: absolute !important;
}

.top-0 {
  top: 0 !important;
}

.start-0 {
  left: 0 !important;
}

.rounded-circle {
  border-radius: 999px !important;
}

.rounded-pill {
  border-radius: 999px !important;
}

.border-bottom {
  border-bottom: 1px solid #e6e9ee !important;
}

.border-light {
  border-color: #eef1f5 !important;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.45rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid transparent;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  cursor: pointer;
}

.btn-sm {
  min-height: 2rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.35rem;
  padding: 0.15rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 800;
}

.text-bg-light {
  color: #384150 !important;
  background: #f4f6f8 !important;
}

.form-label {
  display: block;
  margin-bottom: 0.4rem;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-check-input {
  flex: 0 0 auto;
}

.form-check-label {
  margin: 0;
}

.form-switch .form-check-input {
  width: 2.4rem;
  height: 1.2rem;
}

.row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

.row > * {
  grid-column: span 12;
  min-width: 0;
}

.g-3 {
  gap: 1rem !important;
}

.g-4 {
  gap: 1.5rem !important;
}

.vr {
  align-self: stretch;
  width: 1px;
  min-height: 1.5rem;
  background: #e6e9ee;
}

@media (min-width: 576px) {
  .d-sm-flex {
    display: flex !important;
  }
}

@media (min-width: 768px) {
  .col-md-5 {
    grid-column: span 5;
  }

  .col-md-6 {
    grid-column: span 6;
  }

  .col-md-7 {
    grid-column: span 7;
  }
}

@media (min-width: 992px) {
  .d-lg-none {
    display: none !important;
  }

  .d-lg-block {
    display: block !important;
  }

  .col-lg-4 {
    grid-column: span 4;
  }

  .col-lg-5 {
    grid-column: span 5;
  }

  .col-lg-7 {
    grid-column: span 7;
  }

  .col-lg-8 {
    grid-column: span 8;
  }
}

/* Visual consistency refresh */
:root {
  --ajj-red: #c8191f;
  --ajj-red-dark: #9f1418;
  --ajj-gold: #c49a22;
  --ajj-bg: #f4f6f8;
  --ajj-surface: #ffffff;
  --ajj-soft: #f7f8fa;
  --ajj-soft-red: #fff4f4;
  --ajj-text: #151a22;
  --ajj-muted: #697282;
  --ajj-border: #e6e9ee;
  --ajj-radius: 8px;
  --ajj-shadow: 0 18px 45px rgba(21, 26, 34, 0.09);
  --ajj-shadow-soft: 0 8px 22px rgba(21, 26, 34, 0.05);
}

body {
  background: var(--ajj-bg);
  color: var(--ajj-text);
  letter-spacing: 0;
}

.app-shell {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(244, 246, 248, 0.94) 18rem),
    var(--ajj-bg);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
  color: var(--ajj-red);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.loading-screen {
  background: var(--ajj-bg);
}

.loading-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 6.5rem;
  height: 3.25rem;
  padding: 0.45rem 0.65rem;
  background: var(--ajj-surface);
  border: 1px solid var(--ajj-border);
  border-radius: var(--ajj-radius);
  box-shadow: var(--ajj-shadow-soft);
}

.loading-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.surface,
.login-form-card,
.admin-card,
.app-card,
.web-card,
.dropdown-panel,
.app-users-popover,
.drawer,
.kpi-card,
.config-section {
  border-radius: var(--ajj-radius);
}

.login-layout {
  background: var(--ajj-surface);
}

.login-visual {
  background:
    linear-gradient(90deg, rgba(13, 18, 26, 0.28), rgba(13, 18, 26, 0.08)),
    url("/assets/images/login-portrait.jpg") center / cover no-repeat,
    #111827;
}

.login-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(13, 18, 26, 0.62), rgba(13, 18, 26, 0.22) 52%, rgba(13, 18, 26, 0.04)),
    linear-gradient(0deg, rgba(13, 18, 26, 0.42), transparent 45%);
}

.login-visual img {
  filter: saturate(0.95) contrast(1.02);
  opacity: 0.94;
  object-position: 44% center;
}

.login-visual-panel {
  position: absolute;
  left: clamp(2rem, 6vw, 5rem);
  bottom: clamp(2rem, 7vh, 5rem);
  z-index: 1;
  max-width: 27rem;
  color: #fff;
}

.login-visual-panel .eyebrow {
  color: #f2c94c;
}

.login-visual-panel h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 900;
  line-height: 1.02;
}

.login-visual-panel p {
  max-width: 24rem;
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.98rem;
  line-height: 1.6;
}

.login-panel {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.login-card {
  max-width: 29.5rem;
}

.logo-pill {
  min-width: 9.25rem;
  min-height: 4.25rem;
  margin-bottom: 1.25rem;
  text-align: center;
  border-color: var(--ajj-border);
  border-radius: var(--ajj-radius);
  box-shadow: var(--ajj-shadow-soft);
}

.logo-pill img,
.mobile-logo img {
  display: block;
  min-width: 7.9rem;
}

.mobile-logo img {
  margin-right: auto;
  margin-left: auto;
}

.login-form-card {
  padding: 2.25rem;
  border-color: var(--ajj-border);
  box-shadow: var(--ajj-shadow);
}

.form-heading {
  margin-bottom: 1.5rem;
}

.form-heading h2 {
  margin: 0;
  color: var(--ajj-text);
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1.12;
}

.form-heading p {
  margin: 0.35rem 0 0;
  color: var(--ajj-muted);
  font-size: 0.9rem;
}

.login-form-card form,
.login-form-card form > div {
  width: 100%;
  min-width: 0;
}

.form-label {
  color: #596273 !important;
}

.form-control,
.form-select {
  display: block;
  width: 100%;
  min-height: 2.9rem;
  border-color: #dfe4ea;
  border-radius: var(--ajj-radius);
  background-color: #fff;
  color: var(--ajj-text);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--ajj-red);
  box-shadow: 0 0 0 0.18rem rgba(200, 25, 31, 0.12);
}

.form-control-color {
  width: 3.25rem;
  padding: 0.35rem;
}

.btn,
.icon-btn,
.admin-toggle,
.category-tab,
.admin-tab,
.access-card,
.user-row,
.color-swatch,
.choice-button {
  border-radius: var(--ajj-radius);
}

.btn-brand {
  background: linear-gradient(135deg, var(--ajj-red), var(--ajj-red-dark));
  box-shadow: 0 12px 26px rgba(200, 25, 31, 0.18);
}

.btn-brand:hover,
.btn-brand:focus {
  box-shadow: 0 14px 30px rgba(200, 25, 31, 0.24);
}

.btn-soft {
  border-color: #dfe4ea;
  color: #384150;
  background: #fff;
}

.btn-soft:hover,
.btn-soft:focus {
  border-color: #cfd6df;
  background: #f8fafc;
}

.portal-alert {
  border-radius: var(--ajj-radius);
  border-width: 1px;
  box-shadow: var(--ajj-shadow-soft);
}

.topbar {
  height: 4rem;
  border-bottom: 1px solid var(--ajj-border);
  box-shadow: 0 8px 24px rgba(21, 26, 34, 0.04);
}

.topbar-inner,
.page-container {
  max-width: 88rem;
}

.topbar-logo {
  min-width: 7rem;
}

.topbar-logo img {
  height: 2rem;
}

.search-wrap {
  width: min(100%, 29rem);
}

.search-input {
  min-height: 2.45rem;
  border-color: #dde3eb;
  border-radius: var(--ajj-radius);
  background: #f8fafc;
}

.search-input:focus {
  background: #fff;
}

.profile-trigger,
.admin-toggle {
  min-height: 2.55rem;
  border: 1px solid transparent;
}

.profile-trigger:hover,
.profile-trigger:focus-within,
.admin-toggle:hover {
  border-color: var(--ajj-border);
  background: #f8fafc;
}

.admin-toggle.active {
  border-color: transparent;
  background: var(--ajj-text);
}

.avatar {
  background: var(--ajj-soft-red);
  box-shadow: inset 0 0 0 1px rgba(200, 25, 31, 0.14);
}

.dropdown-panel,
.app-users-popover {
  border-color: var(--ajj-border);
  box-shadow: var(--ajj-shadow);
}

.dashboard-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.35rem;
  padding: 0.35rem 0 1.35rem;
  border-bottom: 1px solid var(--ajj-border);
}

.dashboard-heading h1 {
  margin: 0;
  color: var(--ajj-text);
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-weight: 900;
  line-height: 1.08;
}

.dashboard-heading p {
  margin: 0.45rem 0 0;
  color: var(--ajj-muted);
  font-size: 0.92rem;
}

.dashboard-summary {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  min-width: 6rem;
  padding: 0.75rem 0.95rem;
  background: #fff;
  border: 1px solid var(--ajj-border);
  border-radius: var(--ajj-radius);
}

.dashboard-summary span {
  color: var(--ajj-red);
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
}

.dashboard-summary small {
  color: var(--ajj-muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.category-tabs {
  gap: 0.45rem;
  margin-bottom: 1.5rem;
}

.category-tab {
  min-height: 2.25rem;
  padding: 0.45rem 0.8rem;
  border-color: #dfe4ea;
  background: #fff;
  color: #4b5565;
}

.category-tab.active {
  background: var(--ajj-text);
  box-shadow: none;
}

.section-title {
  color: #6f7888;
  letter-spacing: 0.05em;
}

.apps-grid {
  grid-template-columns: repeat(auto-fill, minmax(9.75rem, 1fr));
  gap: 0.9rem;
}

.app-card {
  position: relative;
  min-height: 10.25rem;
  padding: 1rem;
  overflow: hidden;
  border-color: var(--ajj-border);
  background: #fff;
  box-shadow: var(--ajj-shadow-soft);
}

.app-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--app-color, var(--ajj-red));
}

.app-card:hover,
.app-card:focus-visible {
  border-color: color-mix(in srgb, var(--app-color, var(--ajj-red)) 45%, var(--ajj-border));
  box-shadow: var(--ajj-shadow);
}

.app-card-title {
  color: var(--ajj-text);
  font-size: 0.92rem;
}

.app-card-desc {
  color: var(--ajj-muted);
}

.app-card-icon {
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.9rem;
  border-radius: var(--ajj-radius);
}

.app-card-badge {
  border-radius: 999px;
  font-size: 0.68rem;
}

.web-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 0.75rem;
}

.web-card {
  min-width: 0;
  border-color: var(--ajj-border);
  border-left: 3px solid var(--app-color, var(--ajj-red));
  box-shadow: var(--ajj-shadow-soft);
}

.web-card:hover,
.web-card:focus-visible {
  border-color: color-mix(in srgb, var(--app-color, var(--ajj-red)) 40%, var(--ajj-border));
  box-shadow: var(--ajj-shadow);
}

.empty-state {
  min-height: 17rem;
  padding: 2rem;
  border: 1px dashed #d6dde7;
  border-radius: var(--ajj-radius);
  background: rgba(255, 255, 255, 0.68);
}

.admin-hero {
  padding: 1.6rem 1rem;
  background: linear-gradient(180deg, #fff, #fafbfc);
  border-bottom: 1px solid var(--ajj-border);
}

.admin-hero-inner,
.admin-section-toolbar,
.security-heading,
.config-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.admin-hero h2 {
  margin: 0;
  color: var(--ajj-text);
  font-size: 1.45rem;
  font-weight: 900;
}

.admin-hero p,
.admin-section-toolbar p {
  margin: 0.25rem 0 0;
  color: var(--ajj-muted);
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  min-width: min(100%, 20rem);
}

.admin-metrics span {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.55rem 0.7rem;
  background: #fff;
  border: 1px solid var(--ajj-border);
  border-radius: var(--ajj-radius);
}

.admin-metrics strong {
  color: var(--ajj-red);
  font-size: 1.05rem;
  line-height: 1;
}

.admin-metrics small {
  color: var(--ajj-muted);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-tabs {
  align-items: center;
  gap: 0.35rem;
  overflow-x: auto;
  margin-bottom: 1.35rem;
  padding: 0.25rem;
  background: #fff;
  border: 1px solid var(--ajj-border);
  border-radius: var(--ajj-radius);
}

.admin-tab {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
}

.admin-tab.active {
  background: var(--ajj-text);
  box-shadow: none;
}

.admin-card {
  border-color: var(--ajj-border);
  box-shadow: var(--ajj-shadow-soft);
}

.admin-card-header {
  flex-wrap: wrap;
  padding: 1rem 1.1rem;
  background: #fff;
}

.form-card,
.security-card-body {
  padding: 1.25rem;
}

.user-row {
  position: relative;
  border-bottom-color: #eef1f5;
}

.user-row:hover,
.user-row.active {
  background: var(--ajj-soft-red);
}

.user-row.active::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--ajj-red);
}

.access-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.access-grid {
  gap: 0.65rem;
}

.access-card {
  border-color: #e2e7ef;
  background: #fff;
}

.access-card:hover,
.access-card.active {
  background: var(--ajj-soft-red);
  border-color: rgba(200, 25, 31, 0.28);
}

.admin-section-toolbar {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ajj-border);
}

.apps-admin-grid {
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 0.9rem;
}

.admin-app-card {
  min-height: 13rem;
}

.admin-app-actions {
  top: 0.85rem;
  right: 0.85rem;
}

.icon-btn {
  border-color: #dfe4ea;
  background: #fff;
}

.icon-btn:hover,
.icon-btn:focus {
  border-color: #cfd6df;
  color: var(--ajj-red);
}

.status-pill {
  min-height: 1.35rem;
  border: 1px solid transparent;
}

.status-pill.active {
  color: #0f7a3b;
  background: #e9f8ef;
  border-color: #bfe9cf;
}

.status-pill.inactive {
  color: #596273;
  background: #f4f6f8;
  border-color: #e1e6ee;
}

.drawer {
  border-radius: 0;
}

.drawer-header,
.drawer-footer {
  background: #fff;
}

.drawer-body {
  background: #fafbfc;
}

.drawer .form-control,
.drawer .form-select,
.drawer textarea {
  background-color: #fff;
}

.config-section {
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--ajj-border);
  box-shadow: var(--ajj-shadow-soft);
}

.config-section-header {
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid #edf0f4;
}

.choice-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.choice-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.65rem;
  color: #4b5565;
  background: #fff;
  border: 1px solid #dfe4ea;
  font-weight: 800;
}

.choice-button.active {
  color: #fff;
  border-color: var(--ajj-red);
  background: var(--ajj-red);
}

.choice-button.inactive.active {
  border-color: #596273;
  background: #596273;
}

.icon-picker {
  grid-template-columns: repeat(auto-fill, minmax(2rem, 1fr));
  border-color: var(--ajj-border);
  border-radius: var(--ajj-radius);
  background: #fff;
}

.color-swatch {
  border: 1px solid rgba(17, 24, 39, 0.16);
}

.security-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 0.65fr);
  gap: 1rem;
}

.security-card {
  overflow: hidden;
}

.certificate-facts {
  display: grid;
  gap: 0.7rem;
}

.certificate-fact {
  padding: 0.75rem;
  background: #f8fafc;
  border: 1px solid #edf0f4;
  border-radius: var(--ajj-radius);
}

.rotation-card {
  align-self: start;
}

.data-overlay {
  background: var(--ajj-bg);
}

.data-topbar {
  border-bottom-color: var(--ajj-border);
  box-shadow: 0 8px 22px rgba(21, 26, 34, 0.04);
}

.kpi-grid {
  gap: 0.9rem;
}

.kpi-card {
  border-color: var(--ajj-border);
  box-shadow: var(--ajj-shadow-soft);
}

@media (max-width: 991.98px) {
  .admin-hero-inner,
  .dashboard-heading,
  .admin-section-toolbar,
  .security-heading,
  .config-section-header {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-metrics {
    width: 100%;
  }

  .admin-metrics span {
    align-items: flex-start;
  }

  .security-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  html,
  body {
    overflow-x: hidden;
  }

  .page-container {
    padding: 1.25rem 0.85rem;
  }

  .topbar {
    height: auto;
    min-height: 4rem;
  }

  .topbar-inner {
    flex-wrap: wrap;
    padding: 0.7rem 0.85rem;
  }

  .topbar-logo {
    min-width: auto;
  }

  .search-wrap {
    order: 3;
    flex: 1 0 100%;
  }

  .topbar-actions {
    margin-left: auto;
  }

  .dashboard-heading {
    margin-bottom: 1rem;
  }

  .dashboard-summary {
    align-items: flex-start;
    width: 100%;
  }

  .apps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-card {
    min-height: 9.75rem;
    padding: 0.9rem;
  }

  .web-links {
    grid-template-columns: 1fr;
  }

  .admin-tabs {
    width: 100%;
  }

  .admin-tab {
    min-width: max-content;
  }

  .admin-card-header {
    align-items: stretch;
  }

  .access-panel-actions,
  .access-panel-actions .btn {
    width: 100%;
  }

  .drawer-wide,
  .drawer {
    width: 100%;
  }

  .drawer-header,
  .drawer-footer,
  .drawer-body {
    padding: 1rem;
  }

  .choice-group {
    grid-template-columns: 1fr;
  }

  .login-panel {
    width: 100%;
    min-width: 0;
    padding: 2rem 1rem;
  }

  .login-card {
    width: calc(100vw - 2rem);
    max-width: 100%;
    min-width: 0;
  }

  .login-form-card {
    max-width: 100%;
    padding: 1.35rem;
    overflow: hidden;
  }
}

/* Project frontend model alignment */
:root {
  --ajj-red: #cc1a1a;
  --ajj-red-dark: #a81515;
  --ajj-gold: #c9a227;
  --ajj-bg: #f9fafb;
  --ajj-surface: #ffffff;
  --ajj-soft: #f5f5f5;
  --ajj-soft-red: rgba(204, 26, 26, 0.1);
  --ajj-text: #1f2937;
  --ajj-muted: #9ca3af;
  --ajj-border: #f3f4f6;
  --ajj-control-border: #e5e7eb;
  --ajj-radius: 1rem;
  --ajj-control-radius: 0.75rem;
  --ajj-shadow: 0 20px 38px rgba(17, 24, 39, 0.10);
  --ajj-shadow-soft: 0 8px 20px rgba(17, 24, 39, 0.05);
}

body,
.app-shell {
  background: var(--ajj-bg);
}

.app-shell {
  background: var(--ajj-bg);
}

.login-layout {
  min-height: 100vh;
  background: #fff;
}

.login-visual {
  width: 50%;
  background: #111827;
}

.login-visual::after,
.login-visual-panel,
.app-card::before {
  display: none;
}

.login-visual img {
  opacity: 1;
  filter: none;
  object-position: center;
}

.login-panel {
  flex: 1;
  padding: 3rem 1.5rem;
  background: var(--ajj-bg);
}

.login-card {
  width: 100%;
  max-width: 28rem;
}

.logo-pill {
  width: fit-content;
  min-width: 0;
  min-height: 0;
  margin: 0 auto 1.5rem;
  padding: 0.75rem 1.5rem;
  background: #fff;
  border: 1px solid var(--ajj-border);
  border-radius: var(--ajj-radius);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.10);
}

.logo-pill.d-lg-block {
  display: none !important;
}

.logo-pill img,
.mobile-logo img {
  height: 3rem;
  width: auto;
  min-width: 0;
  object-fit: contain;
}

.mobile-logo img {
  height: 3.5rem;
  margin-bottom: 0.75rem;
}

.login-form-card {
  padding: 2rem;
  background: #fff;
  border: 1px solid var(--ajj-border);
  border-radius: var(--ajj-radius);
  box-shadow: var(--ajj-shadow);
}

.login-form-card .h4,
.mobile-logo .h4 {
  color: var(--ajj-text);
  font-size: 1.5rem;
  font-weight: 800;
}

.form-label {
  margin-bottom: 0.5rem;
  color: #374151 !important;
  font-weight: 700 !important;
}

.form-control,
.form-select {
  display: block;
  width: 100%;
  min-height: 2.85rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--ajj-control-border);
  border-radius: var(--ajj-control-radius);
  background: #fff;
  color: #111827;
  font-size: 0.875rem;
  outline: 0;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--ajj-red);
  box-shadow: 0 0 0 0.18rem rgba(204, 26, 26, 0.10);
}

.password-toggle {
  right: 1rem;
  color: var(--ajj-muted);
}

.btn {
  border-radius: var(--ajj-control-radius);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn-brand {
  color: #fff;
  background: linear-gradient(135deg, var(--ajj-red), var(--ajj-red-dark));
  box-shadow: none;
}

.btn-brand:hover,
.btn-brand:focus {
  color: #fff;
  box-shadow: 0 10px 24px rgba(204, 26, 26, 0.22);
}

.btn-brand:active,
.btn-soft:active,
.app-card:active,
.web-card:active {
  transform: scale(0.98);
}

.btn-soft {
  color: #374151;
  background: #fff;
  border: 1px solid var(--ajj-control-border);
}

.btn-soft:hover,
.btn-soft:focus {
  background: #f9fafb;
  color: #111827;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.07);
}

.portal-alert {
  border-radius: var(--ajj-control-radius);
  box-shadow: none;
}

.topbar {
  height: 3.5rem;
  background: #fff;
  border-bottom: 2px solid var(--ajj-red);
  box-shadow: none;
}

.topbar-inner,
.page-container {
  max-width: 80rem;
}

.topbar-logo {
  min-width: 0;
}

.topbar-logo img {
  height: 1.75rem;
}

.search-wrap {
  flex: 1;
  width: min(100%, 24rem);
  max-width: 24rem;
}

.search-input {
  min-height: 2.2rem;
  padding: 0.45rem 0.75rem 0.45rem 2.25rem;
  border: 1px solid var(--ajj-control-border);
  border-radius: 0.5rem;
  background: #f5f5f5;
  color: #111827;
}

.profile-trigger,
.admin-toggle {
  min-height: 2.35rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
}

.profile-trigger:hover,
.profile-trigger:focus-within,
.admin-toggle:hover {
  border-color: transparent;
  background: #f3f4f6;
}

.admin-toggle.active {
  color: #fff;
  background: var(--ajj-red);
}

.avatar {
  background: rgba(204, 26, 26, 0.15);
  color: var(--ajj-red);
  box-shadow: 0 0 0 2px #e5e7eb;
}

.dropdown-panel,
.app-users-popover {
  border: 1px solid var(--ajj-border);
  border-radius: var(--ajj-control-radius);
  box-shadow: 0 18px 36px rgba(17, 24, 39, 0.12);
}

.page-container {
  padding: 2rem 1rem;
}

.dashboard-heading,
.dashboard-summary,
.admin-metrics {
  display: none;
}

.category-tabs {
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.category-tab {
  min-height: 2.25rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--ajj-control-border);
  border-radius: 999px;
  background: #fff;
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 700;
}

.category-tab:hover {
  background: #f3f4f6;
}

.category-tab.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--ajj-red), var(--ajj-red-dark));
  box-shadow: 0 8px 18px rgba(204, 26, 26, 0.18);
}

.section-title {
  color: #9ca3af;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.app-card {
  min-height: 11.5rem;
  padding: 1.25rem;
  border: 1px solid var(--ajj-border);
  border-radius: var(--ajj-radius);
  background: #fff;
  box-shadow: none;
}

.app-card:hover,
.app-card:focus-visible {
  border-color: var(--ajj-border);
  box-shadow: 0 14px 32px rgba(17, 24, 39, 0.08);
  transform: translateY(-0.25rem);
}

.app-card-icon {
  width: 3rem;
  height: 3rem;
  margin-bottom: 1rem;
  border-radius: var(--ajj-control-radius);
}

.app-card-title {
  color: var(--ajj-text);
  font-size: 0.9rem;
  font-weight: 800;
}

.app-card-desc {
  color: var(--ajj-muted);
  font-size: 0.75rem;
}

.app-card-badge {
  margin-top: auto;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
}

.web-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.web-card {
  min-width: min(100%, 17rem);
  padding: 0.75rem 1rem;
  border: 1px solid var(--ajj-border);
  border-left: 1px solid var(--ajj-border);
  border-radius: var(--ajj-control-radius);
  background: #fff;
  box-shadow: none;
}

.web-card:hover,
.web-card:focus-visible {
  border-color: var(--ajj-border);
  box-shadow: 0 10px 22px rgba(17, 24, 39, 0.08);
  transform: translateY(-0.12rem);
}

.admin-hero {
  width: 100%;
  padding: 2rem 1rem;
  background: #fff;
  border-bottom: 1px solid var(--ajj-border);
}

.admin-hero h2 {
  color: #111827;
  font-size: 1.25rem;
}

.admin-tabs {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  margin-bottom: 2rem;
  padding: 0;
  background: transparent;
  border: 0;
}

.admin-tab {
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border: 1px solid var(--ajj-control-border);
  border-radius: var(--ajj-control-radius);
  background: #fff;
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 800;
}

.admin-tab:hover {
  background: #f9fafb;
}

.admin-tab.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--ajj-red), var(--ajj-red-dark));
  box-shadow: 0 8px 18px rgba(204, 26, 26, 0.18);
}

.admin-card,
.kpi-card,
.config-section,
.certificate-fact {
  background: #fff;
  border: 1px solid var(--ajj-border);
  border-radius: var(--ajj-radius);
  box-shadow: var(--ajj-shadow-soft);
}

.admin-card-header {
  padding: 1rem;
  border-bottom: 1px solid var(--ajj-border);
}

.user-row:hover {
  background: #f9fafb;
}

.user-row.active {
  background: #eff6ff;
}

.user-row.active::before {
  display: none;
}

.access-card {
  border: 1px solid var(--ajj-border);
  border-radius: var(--ajj-control-radius);
  background: #f9fafb;
}

.access-card:hover {
  background: #f3f4f6;
}

.access-card.active {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.admin-section-toolbar {
  margin-bottom: 1rem;
  padding-bottom: 0;
  border-bottom: 0;
}

.apps-admin-grid {
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}

.admin-app-card {
  min-height: 12rem;
}

.status-pill.active {
  color: #15803d;
  background: #dcfce7;
  border-color: transparent;
}

.status-pill.inactive {
  color: #6b7280;
  background: #f3f4f6;
  border-color: transparent;
}

.drawer {
  background: #fff;
  box-shadow: -20px 0 55px rgba(17, 24, 39, 0.18);
}

.drawer-body {
  background: #fff;
}

.drawer-header,
.drawer-footer {
  border-color: var(--ajj-border);
}

.config-section {
  box-shadow: none;
}

.choice-button {
  border: 1px solid var(--ajj-control-border);
  border-radius: var(--ajj-control-radius);
  background: #fff;
}

.choice-button.active {
  color: #15803d;
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.choice-button.inactive.active {
  color: #6b7280;
  border-color: #d1d5db;
  background: #f3f4f6;
}

.data-overlay {
  background: var(--ajj-bg);
}

.data-topbar {
  background: #fff;
  border-bottom: 1px solid var(--ajj-border);
  box-shadow: none;
}

@media (min-width: 576px) {
  .apps-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .access-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .apps-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .logo-pill.d-lg-block {
    display: block !important;
  }

  .login-visual {
    display: flex;
  }

  .apps-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .apps-admin-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .apps-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .login-panel {
    align-items: center;
    overflow: hidden;
    padding: 3rem 1.5rem;
  }

  .login-card {
    width: calc(100vw - 4rem) !important;
    max-width: calc(100vw - 4rem);
  }

  .login-form-card {
    width: 100%;
    max-width: 100%;
    padding: 1.5rem;
  }

  .login-form-card .form-control,
  .login-form-card .form-select,
  .login-form-card .btn,
  .login-form-card .btn-soft,
  .login-form-card .divider-label {
    max-width: 100%;
  }

  .topbar-inner {
    padding: 0.7rem 0.75rem;
  }
}
