:root { --sidebar-width: 300px; }

body { min-height: 100vh; background: #f6f8fb; }
.app-logo { max-width: 100%; height: auto; }

/* Shared admin-style sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1030;
  display: flex;
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100vh;
  padding: 1.25rem;
  overflow: auto;
  flex-direction: column;
  color: #fff;
  background: #416499;
  transition: transform .2s ease-in-out;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 76px;
  padding: .35rem 2.3rem .9rem .35rem;
  position: relative;
}

.sidebar-brand .app-logo { max-height: 68px; object-fit: contain; }
.sidebar-brand .app-icon { width: 68px; height: 68px; }
.dashboard-brand-icon { object-fit: contain; }
.sidebar-close {
  position: absolute;
  top: .15rem;
  right: 0;
  width: 34px;
  height: 34px;
  color: #fff;
  background: rgba(255,255,255,.08);
  border: 0;
  border-radius: .5rem;
}

.sidebar-menu { gap: .15rem; }
.sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 42px;
  padding: .58rem .7rem;
  color: #fff;
  cursor: pointer;
  border: 0;
  border-radius: .5rem;
  text-align: left;
}
.sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.08); }
.sidebar .nav-link.active { color: #fff; background: rgba(255,255,255,.14); }
.sidebar .nav-link > i, .sidebar .nav-link > span > i { width: 20px; text-align: center; }
.sidebar-submenu { width: 100%; }
.sidebar-submenu > summary { width: 100%; justify-content: space-between; list-style: none; }
.sidebar-submenu > summary::-webkit-details-marker { display: none; }
.sidebar-submenu > summary > span { display: flex; align-items: center; gap: .65rem; }
.sidebar .submenu {
  display: none;
  margin: .35rem 0 .35rem 1rem;
  padding-left: 1rem;
  list-style: none;
  border-left: 1px solid rgba(255,255,255,.2);
}
.sidebar .sidebar-submenu[open] > .submenu { display: block; }
.sidebar .submenu .nav-link { min-height: 34px; padding: .38rem .55rem; font-size: .92rem; }
.chevron { margin-left: auto; font-size: .75rem; transition: transform .2s ease; }
.sidebar-submenu[open] > summary .chevron { transform: rotate(180deg); }
.logout-btn { padding: .5rem 1rem; color: #fff; background: #ffbd59; border: 0; border-radius: .25rem; }
.logout-btn:hover { color: #fff; background: #f2ae48; }

/* Shared admin-style content shell */
.content-wrap { min-height: 100vh; margin-left: var(--sidebar-width); }
.dashboard-navbar { min-height: 65px; }
.main-content { padding: 0 1.5rem 1.5rem; }
.dashboard-user-menu { color: #344054; }
.dashboard-user-menu:hover { color: #1d2939; }
.dashboard-user-menu img { object-fit: cover; }
.sidebar-backdrop { display: none; }

/* Existing auth/public helpers */
.login-sidebar-bg { padding: 1.75rem; color: #fff; background: #416499; border-radius: .5rem 0 0 .5rem; }
.login-wrapper, .auth-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.brand { font-weight: 700; letter-spacing: .4px; }
.stat-card { border-radius: .75rem; }
.pw-strength { height: 8px; overflow: hidden; background: #e9ecef; border-radius: 6px; }
.pw-strength > div { width: 0; height: 100%; transition: width .2s ease-in-out; }
footer.small { color: #6c757d; }
.table .btn { padding: .25rem .5rem; font-size: .85rem; }

@media (max-width: 991.98px) {
  .sidebar { transform: translateX(-110%); box-shadow: 15px 0 35px rgba(25, 39, 70, .18); }
  .sidebar.show { transform: translateX(0); }
  .content-wrap { margin-left: 0; }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1025;
    display: block;
    visibility: hidden;
    padding: 0;
    background: rgba(18, 29, 51, .42);
    border: 0;
    opacity: 0;
    transition: opacity .2s ease, visibility .2s ease;
  }
  .sidebar-backdrop.show { visibility: visible; opacity: 1; }
  body.sidebar-open { overflow: hidden; }
}

@media (max-width: 575.98px) {
  :root { --sidebar-width: min(300px, 88vw); }
  .main-content { padding-right: .9rem; padding-left: .9rem; }
  .dashboard-navbar { min-height: 60px; }
}
