html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-wrapper {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.d-flex {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
}

.content {
  flex-grow: 1;
  min-width: 0;
}

.main-logo-area {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}
.main-logo-img {
  max-width: 350px;
  width: calc(100vw - 150px - 30px); /* 150px sidebar + 15px each side */
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-sizing: border-box;
  display: block;
}
@media (max-width: 600px) {
  .main-logo-img {
    width: calc(100vw - 30px); /* sidebar stacks, so use full width minus padding */
    max-width: 100%;
  }
}
.header-bar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid #dee2e6;
  padding: 0.75rem 2rem 0.75rem 1.5rem;
  min-height: 64px;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-logo img {
  height: 40px;
  width: auto;
  background: #fff;
  border-radius: 8px;
  padding: 2px 6px;
}
.sidebar {
  transition: width 0.2s;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-top: 0;
  width: 150px !important;
  min-width: 150px !important;
  max-width: 150px !important;
  background-color: #343a40;
  color: #fff;
}
.sidebar-collapsed {
  width: 60px !important;
  min-width: 60px !important;
  max-width: 60px !important;
  transition: width 0.2s;
}
.sidebar-toggler {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  padding: 10px 0 10px 18px;
  cursor: pointer;
  border: none;
  background: none;
  font-size: 1.5rem;
  color: #adb5bd;
  transition: background 0.2s;
  margin-bottom: 8px;
}
.sidebar-toggler:hover {
  background: #21252910;
  color: #0d6efd;
}
.sidebar .nav-link {
  display: flex;
  align-items: center;
  padding: 12px 8px 12px 18px;
  color: #adb5bd;
  border-radius: 0.375rem;
  margin: 2px 0;
  transition: background 0.2s, color 0.2s;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}
.sidebar .nav-link.active,
.sidebar .nav-link:hover {
  background-color: #0d6efd;
  color: #fff !important;
}
.sidebar .nav-link .sidebar-label {
  transition: opacity 0.2s, width 0.2s, margin 0.2s;
  white-space: nowrap;
  margin-left: 8px;
}
.sidebar-collapsed .nav-link .sidebar-label {
  opacity: 0;
  width: 0;
  overflow: hidden;
  margin-left: 0;
  padding: 0;
}
.sidebar .nav-link i {
  font-size: 1.25rem;
  min-width: 24px;
  text-align: center;
}
footer {
  width: 100%;
  padding: 1rem 0 1rem 0;
  background: #fff;
  border-top: 1px solid #dee2e6;
  text-align: center;
  color: #6c757d;
}

@media (max-width: 600px) {
  .sidebar {
    align-items: center !important;
    min-height: unset;
    height: auto;
  }
  .sidebar .nav-link {
    padding: 10px 8px;
    font-size: 0.95rem;
    margin: 2px 2px;
  }
}