.auth-shell {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 1.15fr) minmax(360px, 440px);
  align-items: center;
  gap: clamp(2.5rem, 5vw, 5rem);
  padding: clamp(2rem, 6vw, 4rem);
  overflow: hidden;
}

.auth-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 18%, rgba(177, 240, 206, 0.34), transparent 18%),
    radial-gradient(circle at 82% 14%, rgba(173, 214, 255, 0.24), transparent 18%),
    radial-gradient(circle at 72% 78%, rgba(255, 220, 182, 0.16), transparent 20%);
}

.auth-hero,
.auth-panel {
  position: relative;
  z-index: 1;
}

.auth-hero {
  max-width: 640px;
  padding-left: clamp(.5rem, 3vw, 2rem);
}

.brand-logo,
.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, #145c42, #2f8a66 60%, #79c8b0 100%);
  box-shadow: 0 14px 34px rgba(45, 106, 79, 0.18);
}

.auth-logo {
  width: 60px;
  height: 60px;
  border-radius: 18px;
  font-size: 1.15rem;
  margin-bottom: 1.35rem;
}

.auth-title {
  font-size: clamp(2rem, 3.8vw, 3.35rem);
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: -0.045em;
  color: #123b2a;
  max-width: 10ch;
}

.auth-title .accent {
  color: var(--accent-3);
}

.auth-copy {
  margin-top: 1rem;
  max-width: 58ch;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--muted);
}

.auth-panel {
  width: 100%;
  justify-self: end;
}

.app-layout {
  display: flex;
  flex: 1 1 auto;
  width: 100%;
  min-height: 100vh;
  align-items: stretch;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.42) 0, rgba(255,255,255,0) 18%),
    radial-gradient(circle at 100% 0%, rgba(185, 221, 255, 0.16), transparent 18%),
    radial-gradient(circle at 8% 100%, rgba(171, 228, 199, 0.14), transparent 20%);
}

.app-sidebar {
  position: sticky;
  top: 0;
  align-self: flex-start;
  display: flex;
  flex-direction: column;
  width: 244px;
  min-width: 244px;
  height: 100vh;
  overflow-y: auto;
  backdrop-filter: blur(10px);
  background:
    linear-gradient(180deg, rgba(250, 252, 247, 0.96) 0%, rgba(245, 248, 242, 0.96) 100%),
    radial-gradient(circle at 0% 0%, rgba(178, 240, 207, 0.12), transparent 24%);
  border-right: 1px solid rgba(18, 63, 44, 0.06);
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.8), 12px 0 30px rgba(34, 58, 46, 0.04);
}

.sidebar-header {
  padding: 1.2rem 1.15rem 1rem;
  border-bottom: 1px solid rgba(18, 63, 44, 0.04);
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.95rem;
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 0.95rem;
}

.brand-name {
  font-size: 1.08rem;
  font-weight: 800;
  color: #103f2b;
}

.sidebar-nav {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem 0.7rem 1.15rem;
  overflow-y: auto;
}

.nav-group-label {
  padding: 1rem 0.95rem 0.35rem;
  color: #67726d;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.nav-label {
  flex: 1;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(18, 63, 44, 0.05);
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(247,250,245,0.9));
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.78);
  border: 1px solid rgba(18, 63, 44, 0.05);
}

.avatar-dot {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, #145c42, #5fb596);
  box-shadow: 0 10px 22px rgba(45, 106, 79, 0.14);
}

.sidebar-user-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.sidebar-user-email {
  max-width: 130px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.74rem;
  color: var(--muted);
}

.sidebar-plan {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  margin-bottom: 0.8rem;
}

.page-shell {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 25% 0%, rgba(193, 230, 212, 0.1), transparent 20%),
    linear-gradient(180deg, rgba(255,255,255,0.18), rgba(255,255,255,0) 14%);
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-shrink: 0;
  height: 68px;
  padding: 0 1.55rem;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(252,253,249,0.84)),
    radial-gradient(circle at 80% 0%, rgba(190, 224, 255, 0.14), transparent 26%);
  border-bottom: 1px solid rgba(18, 63, 44, 0.05);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 24px rgba(24, 52, 40, 0.04), inset 0 -1px 0 rgba(18, 63, 44, 0.04);
}

.app-topbar-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.page-content {
  flex: 1 1 auto;
  padding: 1.8rem 1.7rem 3rem;
  background:
    radial-gradient(circle at 18% 12%, rgba(188, 231, 207, 0.08), transparent 16%),
    radial-gradient(circle at 82% 24%, rgba(198, 225, 255, 0.1), transparent 18%);
}

.page-panel {
  width: 100%;
  max-width: 1520px;
  margin: 0 auto;
}

.page {
  width: 100%;
  display: none !important;
}

.page.active {
  display: block !important;
  animation: ffPageFade 0.24s ease;
}

.page-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 1.8rem;
}

.page-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.filter-bar > * {
  min-height: 46px;
}

@media (max-width: 1180px) {
  .app-sidebar {
    width: 230px;
    min-width: 230px;
  }

  .page-content {
    padding: 1.4rem 1.15rem 2.2rem;
  }

  .page-panel {
    max-width: none;
  }
}

@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
    gap: 1.8rem;
    padding: 1.5rem 1rem 2rem;
  }

  .auth-hero {
    padding-left: 0;
  }

  .auth-panel {
    justify-self: stretch;
    max-width: none;
  }

  .app-layout {
    flex-direction: column;
  }

  .app-sidebar {
    position: static;
    width: 100%;
    min-width: 0;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(25, 28, 26, 0.06);
    box-shadow: none;
  }

  .sidebar-nav {
    overflow: visible;
    padding: 0.9rem 0.7rem 1rem;
  }

  .app-topbar {
    height: auto;
    padding: 0.95rem 1rem;
    flex-wrap: wrap;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.94);
  }

  .topbar-right {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .page-content {
    padding: 1.15rem 0.9rem 1.8rem;
  }

  .page-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .page-toolbar-actions {
    width: 100%;
  }

  .page-toolbar-actions .btn {
    width: 100%;
  }

  .filter-bar > * {
    width: 100%;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }
}

