/* Elevator Pro — app.css */
:root{
  --sidebar-bg:#1f2532;
  --sidebar-hover:#2e3447;
  --sidebar-text:#cfd3dc;
  --body-bg:#f5f6f8;

  /* NEW: sidebar width */
  --sidebar-w: 280px; /* was 240px */
}

html,body{height:100%}
body{background-color:var(--body-bg)}

.layout-wrapper{display:flex;min-height:100vh}
.main-area{flex:1;display:flex;flex-direction:column}
.main-content{flex:1;padding:1rem 1.5rem}

/* Sidebar */
.sidebar{width:var(--sidebar-w);background-color:var(--sidebar-bg);color:#fff;min-height:100vh}
.sidebar .brand{padding:.95rem 1rem;border-bottom:1px solid rgba(255,255,255,.08);font-weight:600}
.sidebar a{color:var(--sidebar-text);text-decoration:none;display:block;padding:.65rem 1rem}
.sidebar a.active,.sidebar a:hover{background-color:var(--sidebar-hover);color:#fff}

/* Topbar */
.topbar{background:#fff;border-bottom:1px solid #dee2e6;padding:.75rem 1rem}

/* Footer */
.app-footer{background:#fff}

/* Cards */
.card.shadow-soft{box-shadow:0 .25rem .75rem rgba(0,0,0,.06);border:0}

/* Login */
.login-page{background-color:#1f2532;min-height:100vh;color:#fff;display:flex;align-items:center;justify-content:center}
.login-card{background-color:#2a3144;border-radius:1rem;box-shadow:0 1rem 2rem rgba(0,0,0,.6);width:100%;max-width:360px;padding:2rem}
.login-card .brand{font-size:1.1rem;font-weight:600;color:#fff}
.login-card .form-control{background-color:#1f2532;border-color:#444b5f;color:#fff}
.login-card .form-control:focus{background-color:#1f2532;color:#fff;border-color:#6ea8fe;box-shadow:0 0 0 .25rem rgba(110,168,254,.25)}
.alert-slim{padding:.5rem .75rem;margin-bottom:1rem}

.brand-logo { height: 28px; display: block; }
@media (min-width: 1200px){ .brand-logo { height: 32px; } }


/* --- Sidebar clarity & active state (high specificity) --- */
aside.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem .9rem;
  color: #cfd6e4;
  text-decoration: none;
  border-left: 3px solid transparent;
}

aside.sidebar .nav-link:hover {
  color: #fff !important;
  background: rgba(255,255,255,.06);
}

aside.sidebar .nav-link.active {
  color: #fff !important;
  background: rgba(77,171,247,.18);      /* clearer highlight */
  border-left-color: #4dabf7 !important; /* bright left bar */
  font-weight: 600;
}

aside.sidebar .collapse .nav-link {       /* sub items */
  padding-left: 1.4rem;
}

aside.sidebar .collapse .nav-link.active {
  background: rgba(145,213,255,.18);
  border-left-color: #91d5ff !important;
}

/* Chevron rotation based on aria-expanded */
aside.sidebar a[aria-expanded="true"] .caret-rot {
  transform: rotate(90deg);
}
aside.sidebar .caret-rot {
  transition: transform .15s ease-in-out;
}

/* Section headers */
aside.sidebar .text-uppercase.small {
  letter-spacing: .06em;
  opacity: .8;
}

/* Slightly softer highlight for matches */
mark { padding: 0 .1em; background: #fff3cd; }

/* SweetAlert2 – compact, elegant */
.swal2-popup.swal2-elegant {
  border-radius: 16px;
  padding: 1rem;
  width: 32rem !important; /* was large; keep it modest */
  font-size: .95rem;
}
.swal2-title {
  font-size: 1.05rem !important;
  font-weight: 600;
  line-height: 1.35;
}
.swal2-html-container {
  margin: .25rem 0 .75rem !important;
}
.swal2-icon {
  transform: scale(.85);
  margin: .25rem auto .5rem !important;
}
.swal2-actions .btn { min-width: 6rem; }
/* space between SweetAlert buttons */
.swal2-actions { gap: .5rem; }                 /* modern browsers */
.swal2-actions .btn + .btn { margin-left:.5rem; } /* fallback */

/* Live search dropdown styling (Types page) */
#types-live-results .list-group-item {
  background-color: #fff;
  color: inherit;
  border-color: #eef1f5;
  cursor: pointer;
}

/* Hover state: soft gray */
#types-live-results .list-group-item:hover {
  background-color: #f6f7fb;
  color: inherit;
}

/* Kill Bootstrap's blue "active" look for this dropdown only */
#types-live-results .list-group-item.active,
#types-live-results .list-group-item:active,
#types-live-results .list-group-item:focus {
  background-color: #f6f7fb !important;
  color: inherit !important;
  border-color: #e9ecef !important;
  box-shadow: none !important;
}

/* Keep the small meta/badge styles readable on hover/active */
#types-live-results small.text-muted { color: #6c757d !important; }
#types-live-results .badge {
  font-weight: 500;
  border-radius: 999px;
}

/* Live suggest aesthetics (shared) */
.ep-suggest { border-radius: .5rem; }
.ep-suggest .ep-suggest-item { border: 0; }
.ep-suggest .ep-suggest-item:hover,
.ep-suggest .ep-suggest-item:focus {
  background: #f6f7fb; /* neutral, not blue */
}


/* Footer alert changes are polled in the background. Make a new status
   visible without interrupting office work or showing a blocking modal. */
#system-alert-bar.system-alert-pulse {
  display: inline-block;
  animation: ep-system-alert-pulse 1.1s ease-in-out 2;
}

@keyframes ep-system-alert-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: .55; }
}
