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;
}

.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 */
}

.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;
}

/* 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;
}