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

.phw-sidebar {
  width: var(--phw-sidebar-width);
  flex-shrink: 0;
  background-color: #101828;
  color: #d0d5dd;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.2s ease;
}

.phw-sidebar__brand {
  height: var(--phw-header-height);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.phw-sidebar__brand-link {
  display: flex;
  align-items: center;
  height: 100%;
}

.phw-sidebar__brand-logo {
  height: 20px;
  width: auto;
  display: block;
}

.phw-sidebar__nav {
  padding: 0.75rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.phw-sidebar__link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
}

.phw-sidebar__link:hover {
  background-color: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.phw-sidebar__link.active {
  background-color: var(--phw-primary);
  color: #fff;
}

.phw-sidebar__divider {
  margin: 0.5rem 0.75rem;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.phw-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.phw-header {
  height: var(--phw-header-height);
  background-color: var(--phw-card-bg);
  border-bottom: 1px solid var(--phw-border);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem;
}

.phw-header__toggle {
  border: none;
  background: transparent;
  font-size: 1.25rem;
  display: none;
}

.phw-header__project {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--phw-text);
}

.phw-header__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
}

.phw-header__icon-btn {
  border: none;
  background: transparent;
  font-size: 1.1rem;
  color: var(--phw-text-muted);
}

.phw-header__user {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
}

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

.phw-page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.phw-page-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
}

.phw-footer {
  padding: 1rem 1.5rem;
  font-size: 0.8rem;
  color: var(--phw-text-muted);
  border-top: 1px solid var(--phw-border);
}

html:has(body.phw-auth-body)::before,
html:has(body.phw-auth-body)::after {
  content: '';
  position: fixed;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: -1;
}

html:has(body.phw-auth-body)::before {
  left: 0;
  background: linear-gradient(160deg, #0b1220 0%, #101828 55%, #14203a 100%);
}

html:has(body.phw-auth-body)::after {
  right: 0;
  background-color: var(--phw-bg);
}

.phw-auth-body {
  max-width: 1280px;
  margin: 0 auto;
}

.phw-auth {
  min-height: 100vh;
  display: flex;
  background-color: var(--phw-bg);
}

.phw-auth__hero {
  flex: 1 1 55%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3.5rem 4rem;
  background: linear-gradient(160deg, #0b1220 0%, #101828 55%, #14203a 100%);
  color: #e7ebf3;
}

.phw-auth__hero-brand {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.phw-auth__hero-logo {
  height: 26px;
  width: auto;
  display: block;
}

.phw-auth__hero-brand-sub {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #8892a6;
  white-space: nowrap;
}

.phw-auth__hero-title {
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.28;
  margin-bottom: 1.25rem;
}

.phw-auth__hero-title span {
  background: linear-gradient(90deg, #5b8dff, #7fb1ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.phw-auth__hero-desc {
  max-width: 480px;
  margin-bottom: 2.25rem;
  color: #aab3c5;
  font-size: 0.95rem;
  line-height: 1.7;
}

.phw-auth__hero-features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.1rem 1.25rem;
  margin-bottom: 2rem;
}

.phw-auth__hero-feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: #d3d9e6;
}

.phw-auth__hero-feature i {
  color: #6f97ff;
  font-size: 1rem;
}

.phw-auth__preview {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}

.phw-auth__preview-topbar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}

.phw-auth__preview-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--phw-primary);
}

.phw-auth__preview-body {
  display: flex;
  gap: 0.75rem;
}

.phw-auth__preview-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.5rem 0.35rem;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 8px;
}

.phw-auth__preview-sidebar-item {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #8892a6;
  font-size: 0.75rem;
}

.phw-auth__preview-sidebar-item.active {
  background: var(--phw-primary);
  color: #fff;
}

.phw-auth__preview-main {
  flex: 1;
  min-width: 0;
}

.phw-auth__preview-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.phw-auth__preview-stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.phw-auth__preview-stat .label {
  font-size: 0.62rem;
  color: #8892a6;
}

.phw-auth__preview-stat .value {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.phw-auth__preview-charts {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.phw-auth__preview-chart-line {
  flex: 1;
  height: 44px;
}

.phw-auth__preview-chart-line svg {
  width: 100%;
  height: 100%;
}

.phw-auth__preview-donut {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: conic-gradient(#2454ff 0% 32%, #22c55e 32% 60%, #f59e0b 60% 80%, #8892a6 80% 100%);
}

.phw-auth__hero-footer {
  font-size: 0.75rem;
  color: #6b7685;
}

.phw-auth__panel {
  flex: 1 1 45%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background-color: var(--phw-bg);
}

.phw-auth__panel-inner {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.phw-auth__card {
  width: 100%;
  background: var(--phw-card-bg);
  border: 1px solid var(--phw-border);
  border-radius: 10px;
  padding: 2rem;
}

.phw-auth__security {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: #eaf0ff;
  border-radius: 10px;
}

.phw-auth__security-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #d6e2ff;
  color: var(--phw-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.phw-auth__security-text strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1f2a44;
  margin-bottom: 0.25rem;
}

.phw-auth__security-text p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.55;
  color: #5b6478;
}

.phw-auth__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.phw-auth__brand-logo {
  width: 190px;
  max-width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 991.98px) {
  .phw-auth__hero {
    display: none;
  }

  .phw-auth__panel {
    flex: 1 1 100%;
    padding: 10px;
  }
}

@media (max-width: 768px) {
  .phw-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1050;
    margin-left: calc(-1 * var(--phw-sidebar-width));
  }

  .phw-sidebar.is-open {
    margin-left: 0;
  }

  .phw-header__toggle {
    display: inline-block;
  }

  .phw-header {
    gap: 0.5rem;
    padding: 0 0.75rem;
  }

  .phw-header__project select,
  .phw-header__project span {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .phw-header__user span {
    display: none;
  }
}
