body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  /* Changed from min-height */
  margin: 0;
  overflow: hidden;
}

header.top-bar {
  flex-shrink: 0;
}

main.app-main {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.app-loader {
  position: absolute;
  inset: 0;
  /* top/right/bottom/left: 0 */
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.8);
  z-index: 20;
}

.app-loader-inner {
  padding: 16px 24px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* optional fade if you want */
.app-loader {
  opacity: 1;
  transition: opacity 0.15s ease-in-out;
}

.app-loader.d-none {
  display: none !important;
}

#app-loader .spinner-border {
  color: #99A6FF !important;
  /* your color */
}

footer.bottom-bar {
  flex-shrink: 0;
}

.auth-page {
  background: #f7f8ff;
}

.auth-page .top-bar {
  background: #fff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 10px 28px -24px rgba(15, 23, 42, 0.3);
}

.auth-page .middle-bar {
  background:
    radial-gradient(circle at 18% 12%, rgba(93, 106, 244, 0.10), transparent 18%),
    radial-gradient(circle at 82% 10%, rgba(93, 106, 244, 0.07), transparent 16%),
    linear-gradient(180deg, #fbfcff 0%, #f4f7ff 100%);
  position: relative;
}

.auth-page .middle-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(93, 106, 244, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(93, 106, 244, 0.02) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.22;
  pointer-events: none;
}

.auth-shell {
  position: relative;
  z-index: 1;
}

.auth-card {
  border-radius: 24px;
  box-shadow: 0 28px 64px rgba(20, 30, 70, 0.11);
  border: 1px solid rgba(99, 115, 255, 0.08);
  padding-top: 2.35rem !important;
  padding-bottom: 2.35rem !important;
}

.auth-title {
  letter-spacing: -0.02em;
}

.auth-subtitle {
  font-size: 1.02rem;
  line-height: 1.75;
  max-width: 32ch;
  color: #5b6785 !important;
}

.auth-form .form-label {
  font-weight: 600;
  margin-bottom: 0.55rem;
  color: #14213d;
}

.auth-input,
.auth-input-addon {
  min-height: 50px;
}

.auth-input {
  border-radius: 14px !important;
  border-color: #d7def0;
  background: rgba(255,255,255,0.96);
  padding: 0.82rem 0.95rem;
  box-shadow: none;
}

.auth-input:focus {
  border-color: #6b7cff;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(107, 124, 255, 0.10);
}

.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
  -webkit-text-fill-color: #14213d;
  box-shadow: 0 0 0 1000px #f7faff inset;
  transition: background-color 9999s ease-out 0s;
}

.auth-input-addon {
  border-radius: 0 14px 14px 0 !important;
  padding-inline: 16px;
  background: rgba(255,255,255,0.96) !important;
}

.auth-form .input-group > .auth-input {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.auth-form .input-group:focus-within .auth-input-addon {
  border-color: #6b7cff;
  box-shadow: 0 0 0 4px rgba(107, 124, 255, 0.10);
}

.auth-submit-btn {
  min-height: 52px;
  border-radius: 16px;
  box-shadow: 0 14px 28px rgba(76, 92, 240, 0.18);
}

.auth-submit-btn:hover,
.auth-submit-btn:focus {
  transform: translateY(-1px);
}

.auth-meta-row,
.auth-switch-row {
  font-size: 0.98rem;
}

.auth-switch-text {
  margin-right: 0.25rem;
}

.auth-inline-link {
  color: #244bff;
}

.auth-inline-link:hover,
.auth-inline-link:focus {
  color: #1838d0;
}

@media (max-width: 575.98px) {
  .auth-card {
    border-radius: 18px;
    padding-top: 1.75rem !important;
    padding-bottom: 1.75rem !important;
  }

  .auth-subtitle {
    max-width: none;
    font-size: 0.98rem;
  }
}

.app-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 0 !important;
}

.app-row {
  display: flex;
  flex: 1;
  min-height: 0;
  margin: 0 !important;
  overflow: hidden;
}

.app-sidebar {
  flex: 0 0 240px;
  background-color: #fff;
  border-right: 1px solid #e9ecef;
  padding: 0.75rem 1rem !important;
  overflow-y: auto;
  max-height: 100% !important;
  /* full viewport height */
}

.local-nav {
  gap: 0.35rem !important;
}

.local-nav-item {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #3f4b65;
  display: flex;
  gap: 0.75rem;
  min-height: 40px;
  padding: 0.55rem 0.75rem;
  position: relative;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.local-nav-item:hover {
  background: #f6f8ff;
  border-color: #e3e8ff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: #32405d;
  text-decoration: none;
  transform: translateX(1px);
}

.local-nav-item:focus-visible {
  border-color: #99a6ff;
  box-shadow: 0 0 0 0.2rem rgba(76, 92, 240, 0.14);
  color: #24314e;
  outline: 0;
}

.local-nav-item.is-active {
  background: linear-gradient(180deg, #eef1ff 0%, #e8edff 100%);
  border-color: #dbe2ff;
  box-shadow: 0 8px 18px rgba(76, 92, 240, 0.12);
  color: #3040d8;
  font-weight: 600;
}

.local-nav-item.is-active::before {
  background: #4c5cf0;
  border-radius: 999px;
  content: "";
  height: 18px;
  left: -1px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
}

.local-nav-item.is-danger {
  color: #c44343;
}

.local-nav-item.is-danger:hover {
  background: #fff4f4;
  border-color: #ffd9d9;
  color: #ab2d2d;
}

.local-nav-icon {
  align-items: center;
  color: #6d7792;
  display: inline-flex;
  font-size: 0.95rem;
  justify-content: center;
  width: 1.25rem;
}

.local-nav-item.is-active .local-nav-icon {
  color: #4c5cf0;
}

.local-nav-item.is-danger .local-nav-icon {
  color: inherit;
}

.local-nav-label {
  flex: 1 1 auto;
  line-height: 1.2;
}

.local-nav-divider {
  border-top: 1px solid #e8ecf7;
  margin: 0.35rem 0.5rem;
}

.non-scrollable {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.page-header{
  font-weight: 700;
}

.app-scrollable {
  position: relative;
  /* new, does not affect flex behaviour */
  flex: 1 !important;
  min-height: 0 !important;
  max-height: 100% !important;
  /* parent no longer scrolls */
  overflow: hidden !important;
  padding: 1.5rem 1.5rem 0rem 1.5rem !important;
}

.editor-overlay {
  position: absolute;
  inset: 0;
  /* top/right/bottom/left: 0 */
  z-index: 10;
  background: rgba(0, 0, 0, 0.6);
  /* or a semi-transparent color if you want extra dimming */
}

.editor-overlay.d-none {
  display: none;
}

#page-content {
  flex: 1 1 auto;
  /* take remaining height in the column */
  min-height: 0;
  /* critical so overflow works inside flex */
  overflow-y: auto;
  /* actual scroll container */
  overflow-x: hidden;
}

.app-col {
  /* Remove display: flex and flex-direction */
  min-width: 0;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

/* Bars */
.top-bar {
  background: #fff;
  border-bottom: 1px solid #eef1f6;
}

/* === Top bar navigation === */
.top-bar .navbar-nav .nav-item {
  margin-right: 1.5rem;
  /* more horizontal space between items */
}

.top-bar .navbar-nav .nav-link {
  padding: 0.6rem 0.5rem;
  /* more vertical rhythm */
  font-weight: 500;
  font-size: 1rem;
  /* bump from 0.95rem → 1rem */
  letter-spacing: 0.2px;
  /* subtle polish */
  color: #475467;
  transition: color 0.2s ease, border-color 0.2s ease;
  border-bottom: 2px solid transparent;
}

/* Hover: blue text + light underline */
.top-bar .navbar-nav .nav-link:hover {
  color: #4C5CF0;
  border-bottom-color: #c7d2fe;
}

/* Active: stronger color + underline */
.top-bar .navbar-nav .nav-link.active {
  color: #4C5CF0;
  border-bottom-color: #4C5CF0;
  font-weight: 600;
}

/* Optional: tighten brand alignment */
.navbar-brand img {
  vertical-align: middle;
}

/* --- vertical divider & username --- */
.top-bar .container-fluid {
  position: relative;
}

/* Short, centered vertical divider at 240px from the left edge of the container */
.top-bar .container-fluid::after {
  content: "";
  position: absolute;
  left: 240px;
  /* matches your sidebar width */
  top: 50%;
  transform: translateY(-50%);
  height: 32px;
  /* shorter than the bar */
  width: 1px;
  background-color: #e5e7eb;
  /* light neutral */
  border-radius: 1px;
  z-index: 2;
  /* sit above the navbar background */
  pointer-events: none;
}

/* 2) Username styling */
.top-bar .user-name {
  position: absolute;
  left: 260px;
  /* divider (240) + gap */
  top: 50%;
  transform: translateY(-50%);
  font-weight: 400;
  font-size: 0.95rem;
  color: #374151;
  /* darker gray (non-link tone) */
  font-style: normal;
  letter-spacing: 0.2px;
  cursor: default;
  user-select: none;
}

/* optional subtle tweak so it doesn't look interactive */
.top-bar .user-name:hover {
  color: #374151;
  /* no color change */
  text-decoration: none;
}


.middle-bar {
  background: #f7f8ff;
}

.bottom-bar {
  position: relative;
  /* create stacking context */
  z-index: 10;
  /* above main content */
  background: #fff;
  border-top: 1px solid #eef1f6;
  box-shadow: 0 -8px 10px -6px rgba(15, 23, 42, 0.18);
  /* your shadow */
}


/* Centered, non-shifting alerts in the top bar */
.alerts-container {
  left: 50%;
  transform: translateX(-50%);
  z-index: 1080;
  /* above navbar, below modals */
  pointer-events: none;
  /* avoid blocking navbar clicks */
}

/* Toast look (shared base) */
.alerts-container .alert {
  border-radius: 12px;
  border: 1px solid;
  padding: 0.5rem 0.9rem;
  font-weight: 500 !important;
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.08);
  opacity: 0.8;
  /* 0.8–0.95 looks good */
}

/* Info */
.alert-info {
  background-color: #F1F2F4;
  /* soft gray-blue */
  color: #737B8C;
  /* neutral text */
  border-color: #737B8C;
  /* light gray border */
}

/* Success */
.alert-success {
  background-color: #E9F8EE;
  /* light mint */
  color: #39AC60;
  /* strong green text */
  border-color: #39AC60;
  /* mint border */
}

/* Warning */
.alert-warning {
  background-color: #FFFAEE;
  /* pale yellow */
  color: #CC7712;
  /* amber text */
  border-color: #CC7712;
  /* warm yellow border */
}

/* Danger / Error */
.alert-danger,
.alert-error {
  background-color: #FEF2F2;
  /* pale pink */
  color: #ED5F5F;
  /* red text */
  border-color: #ED5F5F;
  /* pink border */
}

/* reset password */
.feedback {
  width: 100%;
  margin-top: 0.25rem;
  font-size: 80%;
}

.ok-feedback {
  color: #39AC60 !important;
}

.error-feedback {
  color: #ED5F5F !important;
}

/* Cards */
.card-unauthorized {
  background: #fff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(16, 24, 40, .06);
}

/* Background colors */
.bg-dd-default {
  background: #f7f8ff;
}

/* Buttons */
.btn-dd-primary {
  background: #4c5cf0;
  color: #fff;
  font-weight: 600;
}

.btn-dd-primary:hover,
.btn-dd-primary:focus {
  background: #3d4bd3;
  color: #fff;
}

.btn-dd-primary:active {
  background: #343fc0 !important;
  color: #fff !important;
  transform: scale(0.98) !important;
}

.btn-dd-primary:disabled {
  background: #4c5cf0 !important;
  color: #fff !important;
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-dd-sidebar-primary {
  align-items: center;
  background: linear-gradient(180deg, #5d6af4 0%, #4c5cf0 100%);
  border: 1px solid #5363f1;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(76, 92, 240, 0.16);
  color: #fff;
  display: inline-flex;
  font-weight: 600;
  gap: 0.55rem;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1rem;
  transition: transform 0.15s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.btn-dd-sidebar-primary:hover,
.btn-dd-sidebar-primary:focus {
  background: linear-gradient(180deg, #5363f1 0%, #4353e6 100%);
  border-color: #4a59ea;
  box-shadow: 0 10px 22px rgba(76, 92, 240, 0.2);
  color: #fff;
}

.btn-dd-sidebar-primary:active {
  background: linear-gradient(180deg, #4353e6 0%, #3949d4 100%) !important;
  border-color: #3f4ed8 !important;
  color: #fff !important;
  transform: scale(0.985) !important;
}

.btn-dd-sidebar-primary:focus-visible {
  box-shadow: 0 0 0 0.2rem rgba(76, 92, 240, 0.16), 0 10px 22px rgba(76, 92, 240, 0.18);
  outline: 0;
}

/* Light / secondary variant of the primary button */
.btn-dd-light {
  background: #EEF2FF;
  /* light indigo-blue */
  color: #4C5CF0;
  /* same hue as primary */
  font-weight: 600;
  border: 1px solid #E0E7FF;
  /* subtle border for structure */
  transition: background-color 0.15s ease, transform 0.05s ease;
}

.btn-dd-light:hover,
.btn-dd-light:focus {
  background: #E0E7FF;
  /* slightly darker hover */
  color: #3D4BD3;
  border-color: #C7D2FE;
}

.btn-dd-light:active {
  background: #C7D2FE !important;
  /* deeper pressed tone */
  color: #3D4BD3 !important;
  transform: scale(0.98) !important;
}

.btn-dd-light:disabled {
  background: #E5E7EB !important;
  /* light gray, not blue */
  color: #9CA3AF !important;
  /* muted gray text */
  border-color: #D1D5DB !important;
  opacity: 0.8;
  cursor: not-allowed;
  box-shadow: none !important;
}

.w-65 {
  width: 65% !important;
}

.table-striped>tbody>tr:nth-of-type(odd)>* {
  --bs-table-bg-type: #649bed0d !important;
}

.auth-card .mb-3 {
  margin-bottom: 1.15rem !important;
}

.auth-card .container,
.auth-shell .row {
  position: relative;
}

.auth-shell .col-lg-5,
.auth-shell .col-xl-4 {
  max-width: 430px;
}

@media (min-width: 992px) {
  .auth-shell {
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
  }
}

.auth-main {
  overflow-y: auto;
  padding-block: 20px;
}

.auth-main .auth-shell {
  width: 100%;
}

.auth-shell {
  width: 100%;
}

@media (max-width: 767.98px) {
  .auth-main {
    align-items: flex-start !important;
  }

  .auth-shell {
    padding-top: 0.75rem !important;
    padding-bottom: 1rem !important;
  }
}

.auth-card-head {
  margin: -0.95rem -0.95rem 1.4rem;
  padding: 1rem 0.95rem 1.2rem;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(93, 106, 244, 0.08) 0%, rgba(93, 106, 244, 0.03) 55%, rgba(255,255,255,0) 100%);
}

.auth-card-head .auth-title {
  margin-bottom: 0.65rem !important;
}

.auth-card-head .auth-subtitle {
  margin-bottom: 0 !important;
}

@media (min-width: 992px) {
  .auth-card-head {
    margin: -1.05rem -1.05rem 1.55rem;
    padding: 1.15rem 1.05rem 1.35rem;
  }
}

.auth-page .middle-bar {
  background:
    radial-gradient(circle at 18% 12%, rgba(93, 106, 244, 0.10), transparent 18%),
    radial-gradient(circle at 82% 10%, rgba(93, 106, 244, 0.07), transparent 16%),
    linear-gradient(180deg, #fbfcff 0%, #f4f7ff 100%);
  position: relative;
}

.auth-page .middle-bar::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(93, 106, 244, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(93, 106, 244, 0.02) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.22;
  pointer-events: none;
}

.auth-main {
  overflow-y: auto;
  padding-block: 20px;
}

.auth-main .auth-shell {
  width: 100%;
}

