/* ---------------------------------------------------------------------
   App shell layout: fixed sidebar + top nav + scrollable content
--------------------------------------------------------------------- */
:root {
  --als-sidebar-width: 250px;
  --als-topnav-height: 60px;
}

.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--als-sidebar-width);
  background: var(--als-sidebar-bg);
  color: var(--als-sidebar-text);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 1030;
  transition: transform 0.2s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.1rem 1.25rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--als-sidebar-text-active);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0.6rem;
  gap: 2px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.8rem;
  border-radius: 8px;
  color: var(--als-sidebar-text);
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
}

.sidebar-link i {
  width: 1.1rem;
  text-align: center;
}

.sidebar-link:hover {
  background: var(--als-sidebar-active-bg);
  color: var(--als-sidebar-text-active);
}

.sidebar-link.active {
  background: var(--als-sidebar-active-bg);
  color: var(--als-sidebar-text-active);
  font-weight: 600;
}

.app-main {
  flex: 1;
  margin-left: var(--als-sidebar-width);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.topnav {
  height: var(--als-topnav-height);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  background: var(--als-surface);
  border-bottom: 1px solid var(--als-border);
  position: sticky;
  top: 0;
  z-index: 1020;
}

.app-content {
  padding: 1.5rem;
  flex: 1;
}

@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
  }
  body.sidebar-open .sidebar {
    transform: translateX(0);
  }
  .app-main {
    margin-left: 0;
  }
}

/* ---------------------------------------------------------------------
   Cards / widgets / notification dropdown
--------------------------------------------------------------------- */
.card {
  background: var(--als-surface);
  border: 1px solid var(--als-border);
}

.kpi-card {
  border-radius: 12px;
}

.kpi-card .kpi-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.kpi-value {
  font-size: 1.6rem;
  font-weight: 700;
}

.notif-dropdown {
  width: 320px;
  max-height: 400px;
  overflow: auto;
}

/* ---------------------------------------------------------------------
   Skeleton loaders
--------------------------------------------------------------------- */
.skeleton-line {
  display: block;
  height: 0.85rem;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--als-skeleton-base) 25%, var(--als-skeleton-shine) 37%, var(--als-skeleton-base) 63%);
  background-size: 400% 100%;
  animation: skeleton-pulse 1.4s ease infinite;
}

@keyframes skeleton-pulse {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

/* ---------------------------------------------------------------------
   Auth pages (login / reset / update password)
--------------------------------------------------------------------- */
.auth-page-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--als-primary), #0d2531);
  padding: 1rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  border-radius: 14px;
  background: var(--als-surface);
  padding: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.auth-brand {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-brand i {
  font-size: 2.2rem;
  color: var(--als-primary);
}

/* ---------------------------------------------------------------------
   Misc
--------------------------------------------------------------------- */
.table-actions {
  white-space: nowrap;
}

.status-badge {
  text-transform: capitalize;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
