:root {
  --bg: #0b0b0b;
  --surface: #121212;
  --surface-2: #1a1a1a;
  --line: #2e2e2e;
  --text: #f5f5f5;
  --muted: #a5a5a5;
  --accent: #ffffff;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background:
    radial-gradient(circle at 10% -10%, #2b2b2b 0%, transparent 40%),
    radial-gradient(circle at 90% 110%, #252525 0%, transparent 45%),
    var(--bg);
  color: var(--text);
  font-family: "Google Sans", "Syne", "Segoe UI", sans-serif;
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(#ffffff15 1px, transparent 0);
  background-size: 3px 3px;
  opacity: 0.25;
  z-index: -1;
}

.site-header {
  width: 100%;
  padding: 1.2rem min(4vw, calc(50vw - 560px));
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
}

.brand-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.kicker {
  position: relative;
  margin-top: 0px;
  margin-left: 0;
  text-align: center;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.85rem;
  font-weight: 500;
  color: #a5a5a5;
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
}

.brand img {
  display: block;
  height: 40px;
  width: auto;
}

.nav {
  display: flex;
  gap: 1rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 0.85rem;
  border: 1px solid transparent;
  padding: 0.4rem 0.7rem;
  transition: border-color 180ms ease, color 180ms ease;
}

.nav a:hover {
  color: var(--text);
  border-color: var(--line);
}

main {
  width: min(1120px, 92vw);
  margin: 0 auto 3rem;
}

.hero {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: clamp(2.2rem, 6vw, 4.5rem) 0 clamp(2.6rem, 7vw, 5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.kicker-removed,
.label,
.resource-type,
.benefit-number {
  font-family: "IBM Plex Mono", "Segoe UI", monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-size: 0.75rem;
}

.hero h1 {
  margin: 0.6rem 0 1.1rem;
  max-width: 16ch;
  font-size: clamp(2.1rem, 6vw, 4.9rem);
  line-height: 0.97;
  text-transform: uppercase;
}

.lead {
  max-width: 52ch;
  color: #d6d6d6;
}

.landing-shell .hero-actions {
  margin-top: 1rem;
}

.hero-title {
  margin: 0.6rem 0 1.3rem;
  max-width: 14ch;
  font-size: clamp(2.2rem, 6.4vw, 5.2rem);
  line-height: 0.93;
  text-transform: uppercase;
  border-bottom: 3px solid var(--text);
  padding-bottom: 0.25em;
}

.cta-band {
  margin-top: 0;
  border-bottom: 1px solid var(--line);
  padding: clamp(2.4rem, 6vw, 4rem) 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.cta-title {
  margin: 0.5rem 0 1rem;
  font-size: clamp(1.7rem, 4vw, 2.9rem);
  line-height: 1.05;
  max-width: 18ch;
}

.cta-lead {
  margin: 0;
}

.btn {
  text-decoration: none;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--line);
  font-family: "IBM Plex Mono", "Segoe UI", monospace;
  text-transform: uppercase;
  font-size: 0.76rem;
  letter-spacing: 0.01em;
  word-spacing: -0.02em;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.btn-ghost:hover {
  border-color: #6a6a6a;
  color: #ffffff;
}

.btn-ghost-enterprise:hover {
  border-color: #2f7d33;
  color: #7be27f;
  box-shadow: 0 0 12px rgba(123, 226, 127, 0.35);
}

.btn-solid {
  color: #101010;
  background: var(--accent);
  border-color: var(--accent);
}

.btn-ghost {
  color: var(--text);
  background: transparent;
}

.section-card {
  margin-top: 1.1rem;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: clamp(1.2rem, 3vw, 2rem);
  animation: reveal 700ms 120ms ease-out both;
}

.section-head h2 {
  margin: 0.3rem 0 1.2rem;
  text-transform: uppercase;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.resource {
  border: 1px solid var(--line);
  padding: 1rem;
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  min-height: 230px;
}

.resource h3 {
  margin: 0.3rem 0;
  text-transform: uppercase;
}

.resource p {
  color: #d0d0d0;
}

.price {
  margin-top: auto;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
}

.benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.benefit {
  padding: clamp(1.6rem, 4vw, 2.4rem) clamp(1rem, 3vw, 1.6rem);
  border-right: 1px solid var(--line);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.benefit:last-child {
  border-right: none;
}

.benefit-number {
  font-size: 1.6rem;
}

.benefit h3 {
  margin: 0.9rem 0 0.5rem;
  text-transform: none;
  font-size: 1.45rem;
}

.site-footer {
  width: min(1120px, 92vw);
  margin: 0 auto 1.8rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 0.85rem;
}

.site-footer a {
  color: var(--text);
  text-decoration: none;
}

.site-footer-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 960px) {
  .grid,
  .benefits {
    grid-template-columns: 1fr;
  }

  .benefit {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .benefit:last-child {
    border-bottom: none;
  }

  .hero {
    min-height: auto;
  }

  .hero-title {
    border-top: none;
    border-bottom: 3px solid var(--text);
    padding-top: 0;
    padding-bottom: 0.25em;
  }
}

@media (max-width: 640px) {
  .site-header {
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
  }

  .nav {
    width: 100%;
    flex-wrap: wrap;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Landing page with glassmorphism */
body.landing-shell {
  --bg: #0c0c0c;
  --bg-elevated: #111111;
  --line: #2a2a2a;
  --text: #efefef;
  --muted: #9d9d9d;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Google Sans", "Syne", "Segoe UI", sans-serif;
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

.landing-header {
  width: 100%;
  height: 72px;
  padding: 0 min(4vw, calc(50vw - 560px));
  display: flex;
  align-items: center;
  justify-content: center;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 12, 12, 0.82);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04);
}

.landing-header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
}

.landing-shell .brand {
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.landing-shell .brand img {
  height: 270px;
  margin-top: 0px;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 3px solid var(--text);
}

.landing-shell .brand:hover {
  opacity: 0.88;
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.12));
}

.landing-shell .hero {
  border-top: none;
}

.landing-shell .hero-title {
  border-bottom: none;
  padding-bottom: 0;
  font-size: clamp(1.5rem, 4vw, 3rem);
}

.landing-shell .benefits {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(21, 21, 21, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.landing-shell .site-footer {
  background: rgba(17, 17, 17, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.landing-shell .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  border: 1px solid #404040; /* Borde un poco más visible */
  background: #1f1f1f;      /* Fondo un poco más claro que la base */
  color: #ffffff;           /* Texto completamente blanco para más contraste */
  font-weight: 500;
  padding: 0.6rem 1.2rem;   /* Un poco más de padding */
  border-radius: 999px;     /* Más redondeado */
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.landing-shell .btn:hover {
  background: #2a2a2a;
  border-color: #666;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}



@media (max-width: 640px) {
  .landing-header {
    height: auto;
    padding: 1rem;
  }
}

/* Library/Home pages (merged from home.css) */
body.app-shell {
  --bg: #0c0c0c;
  --bg-elevated: #111111;
  --panel: #151515;
  --line: #2a2a2a;
  --text: #efefef;
  --muted: #9d9d9d;
  --placeholder-1: #2e2e2e;
  --placeholder-2: #424242;
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Google Sans", "Syne", "Segoe UI", sans-serif;
  display: grid;
  grid-template-rows: 72px 1fr;
  height: 100vh;
  overflow: hidden;
}

.loader {
  width: 50px;
  aspect-ratio: 1.154;
  display: grid;
  color: #fff;
  background:
    linear-gradient(to bottom left ,#0000 calc(50% - 1px),currentColor 0 calc(50% + 1px),#0000 0) right/50% 100%,
    linear-gradient(to bottom right,#0000 calc(50% - 1px),currentColor 0 calc(50% + 1px),#0000 0) left /50% 100%,
    linear-gradient(currentColor 0 0) bottom/100% 2px;
  background-repeat: no-repeat;
  transform-origin: 50% 66%;
  animation: l5 4s infinite linear;
}
.loader::before,
.loader::after {
  content: "";
  grid-area: 1/1;
  background: inherit;
  transform-origin: inherit;
  animation: inherit;
}
.loader::after {
  animation-duration: 2s;
}
@keyframes l5{
  100% {transform:rotate(1turn)}
}

body.app-shell * {
  box-sizing: border-box;
}

body.app-shell .topbar {
  z-index: 10;
  height: 72px;
  padding: 0 1.4rem;
  border-bottom: 1px solid var(--line);
  background: rgba(12, 12, 12, 0.82);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  display: grid;
  grid-template-columns: 200px 1fr 160px;
  align-items: center;
  gap: 1.2rem;
  box-shadow: 0 1px 0 rgba(255,255,255,0.04);

  position: sticky;
  top: 0;
  z-index: 100;
}

body.app-shell .brand {
  color: var(--text);
  text-decoration: none;
  font-size: 1.45rem;
  letter-spacing: 0.03em;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  margin: 0;
  transition: opacity 0.2s ease, filter 0.2s ease;
}

body.app-shell .brand:hover {
  opacity: 0.88;
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.12));
}

body.app-shell .topbar-left {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

body.app-shell .hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171717;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
}

body.app-shell .hamburger-btn:hover {
  background: #1f1f1f;
  border-color: #3d3d3d;
}

body.app-shell .hamburger-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.25s ease, width 0.25s ease, opacity 0.25s ease;
  transform-origin: center;
}

/* Cuando el sidebar está abierto: cada span se convierte en un chevron ‹ */
body.app-shell .hamburger-btn[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(43deg) scaleX(0.65);
  transform-origin: left center;
}

body.app-shell .hamburger-btn[aria-expanded="true"] span:nth-child(2) {
  transform: scaleX(0.9);
}

body.app-shell .hamburger-btn[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-43deg) scaleX(0.65);
  transform-origin: left center;
}

body.app-shell .sidebar-overlay {
  position: fixed;
  inset: 0;
  z-index: 5;
  background: rgba(0,0,0,0.5); /* Esto es lo que oscurece, pero debería estar oculto */
  display: none;
}

body.app-shell .sidebar-overlay.is-active {
  display: block;
}

body.app-shell .brand img {
  display: block;
  height: 38px;
  width: auto;
}

body.app-shell .mode {
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.24rem 0.45rem;
  width: 6.5rem;
  text-align: center;
  box-sizing: border-box;
}

body.app-shell .mode-enterprise {
  color: #7be27f;
  border-color: #2f7d33;
  background: #0f1a10;
}

body.app-shell .search-form {
  display: flex;
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
}

body.app-shell .search {
  display: flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 44px;
  padding: 0.3rem 0.7rem 0.3rem 1rem;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.app-shell .search:hover {
  border-color: #444;
}

body.app-shell .search:focus-within {
  border-color: #5c5c5c;
  background: #141414;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.09), 0 6px 18px rgba(0,0,0,0.35);
}

body.app-shell .search span {
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
  margin-right: 0.8rem;
}

body.app-shell .search input {
  flex: 1;
  width: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: #c5c5c5;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 0.85rem;
}

body.app-shell .search input::placeholder {
  color: #6c6c6c;
}

body.app-shell .search-submit-btn {
  background: transparent;
  border: 0;
  color: #888888;
  cursor: pointer;
  padding: 0 4px 0 8px;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, transform 0.15s ease;
}

body.app-shell .search-submit-btn .search-submit-icon {
  display: inline-block;
  vertical-align: middle;
  width: 16px;
  height: 16px;
  stroke: currentColor;
  pointer-events: none;
}

body.app-shell .search-submit-btn:hover {
  color: #ffffff;
  transform: scale(1.1);
}

body.app-shell .topbar-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.55rem;
  position: relative;
  margin-left: auto;
}

body.app-shell .btn-pro {
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: #7be27f;
  background: transparent;
  border: 1px solid #2f7d33;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}

body.app-shell .btn-pro:hover {
  background: rgba(123, 226, 127, 0.08);
  border-color: #7be27f;
}

body.app-shell .circle {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #1f1f1f;
}

body.app-shell .circle.ghost {
  background: #171717;
}

body.app-shell .profile-menu-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

body.app-shell .profile-trigger {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid #444;
  background: linear-gradient(135deg, #2c2c2c, #1a1a1a);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #efefef;
  overflow: hidden;
}

body.app-shell .profile-trigger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.app-shell .profile-initials {
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  line-height: 1;
  color: #e0e0e0;
  user-select: none;
}

body.app-shell .profile-menu {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  width: min(280px, calc(100vw - 2rem));
  border: 1px solid var(--line);
  background: #111111;
  padding: 0.9rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  display: none;
  z-index: 20;
}

body.app-shell .profile-menu.is-open {
  display: grid;
  gap: 0.65rem;
}

body.app-shell .profile-menu-divider {
  height: 1px;
  background: var(--line);
}

body.app-shell .profile-menu button,
body.app-shell .profile-menu a {
  width: 100%;
  justify-content: center;
  text-align: center;
}

body.app-shell .profile-button {
  cursor: pointer;
}

body.app-shell .profile-trigger--lg {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

body.app-shell .profile-menu-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

body.app-shell .profile-menu-head .profile-menu-name {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.app-shell .profile-menu-danger {
  cursor: pointer;
}

body.app-shell .profile-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  z-index: 30;
}

body.app-shell .profile-modal.is-open {
  display: flex;
}

body.app-shell .profile-dialog {
  width: min(760px, 100%);
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 28%),
    linear-gradient(180deg, #151515, #101010);
  padding: 1rem;
  display: grid;
  gap: 1rem;
  max-height: calc(100vh - 2rem);
  overflow: auto;
}

body.app-shell .profile-dialog-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

body.app-shell .profile-dialog-head h2 {
  margin: 0.2rem 0 0.35rem;
  text-transform: uppercase;
}

body.app-shell .profile-close {
  cursor: pointer;
}

body.app-shell .profile-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1rem;
}

body.app-shell .profile-preview {
  border: 1px solid var(--line);
  background: #0e0e0e;
  padding: 1rem;
  display: grid;
  gap: 0.8rem;
  align-content: start;
}

body.app-shell .profile-preview-avatar {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 999px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: linear-gradient(135deg, #202020, #111111);
  display: grid;
  place-items: center;
  color: var(--text);
  font-size: 2rem;
  font-weight: 800;
}

body.app-shell .profile-preview-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.app-shell .profile-meta {
  margin: 0;
  color: var(--muted);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

body.app-shell .profile-form {
  display: grid;
  gap: 0.85rem;
}

body.app-shell .profile-field {
  display: grid;
  gap: 0.35rem;
}

body.app-shell .profile-field > span {
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-size: 0.72rem;
}

body.app-shell .profile-field input {
  width: 100%;
  border: 1px solid var(--line);
  background: #0d0d0d;
  color: var(--text);
  padding: 0.8rem 0.85rem;
  font: inherit;
}

body.app-shell .profile-photo-row {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}

body.app-shell .profile-note {
  margin: 0;
  color: var(--muted);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 0.72rem;
}

body.app-shell .profile-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

body.app-shell .profile-alert {
  margin: 0;
  color: #ffb0b0;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 0.76rem;
}

body.app-shell .profile-alert.is-success {
  color: #8fe6a1;
}

body.app-shell.account-shell {
  height: auto;
  min-height: 100vh;
  overflow: visible;
}

body.app-shell.viewer-shell {
  height: auto;
  min-height: 100vh;
  overflow: visible;
}

body.app-shell.account-shell .account-main {
  width: min(1120px, 92vw);
  margin: 1rem auto 3rem;
  display: grid;
  gap: 1rem;
}

body.app-shell.account-shell .account-hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1rem;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 28%),
    linear-gradient(160deg, #171717 0%, #101010 100%);
  padding: clamp(1.2rem, 3vw, 2rem);
}

body.app-shell.account-shell .account-hero h1 {
  margin: 0.35rem 0 0.8rem;
  text-transform: uppercase;
  line-height: 0.95;
  font-size: clamp(2rem, 5vw, 4rem);
}

body.app-shell.account-shell .account-card {
  border: 1px solid var(--line);
  background: #111111;
  padding: 1rem;
  display: grid;
  gap: 0.8rem;
  justify-items: center;
  align-content: start;
}

body.app-shell.account-shell .account-avatar,
body.app-shell.account-shell .account-preview-avatar {
  width: 180px;
  height: 180px;
  border-radius: 999px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: linear-gradient(135deg, #202020, #111111);
  display: grid;
  place-items: center;
  color: var(--text);
  font-size: 3rem;
  font-weight: 800;
}

body.app-shell.account-shell .account-avatar img,
body.app-shell.account-shell .account-preview-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.app-shell.account-shell .account-summary {
  text-align: center;
  display: grid;
  gap: 0.2rem;
}

body.app-shell.account-shell .account-summary strong {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body.app-shell.account-shell .account-summary p,
body.app-shell.account-shell .account-preview-note {
  margin: 0;
  color: var(--muted);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
}

body.app-shell.account-shell .account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1rem;
}

body.app-shell.account-shell .account-panel {
  margin-bottom: 0;
}

body.app-shell.account-shell .account-preview {
  display: grid;
  gap: 0.8rem;
  justify-items: center;
}

body.app-shell.account-shell .account-preview-panel {
  align-content: start;
}

body.app-shell.account-shell .account-passkey-panel {
  grid-column: 1 / -1;
}

body.app-shell.account-shell .account-passkey-actions {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  align-items: center;
  margin: 0.2rem 0 1rem;
}

body.app-shell.account-shell .passkey-message {
  margin: 0;
  flex: 1 1 220px;
}

body.app-shell.account-shell .passkey-lead {
  margin: 0 0 1rem;
  color: var(--muted);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

body.app-shell.account-shell .passkey-list {
  display: grid;
  gap: 0.7rem;
}

body.app-shell.account-shell .passkey-item {
  border: 1px solid var(--line);
  background: var(--surface-2);
  padding: 0.9rem 1rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

body.app-shell.account-shell .passkey-item-main {
  display: grid;
  gap: 0.15rem;
}

body.app-shell.account-shell .passkey-item-main strong,
body.app-shell.account-shell .passkey-item-main p,
body.app-shell.account-shell .passkey-item-meta {
  margin: 0;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

body.app-shell.account-shell .passkey-item-main p,
body.app-shell.account-shell .passkey-item-meta {
  color: var(--muted);
}

body.app-shell.account-shell .passkey-item-meta {
  display: grid;
  gap: 0.2rem;
  text-align: right;
}

body.app-shell.account-shell .passkey-delete-btn {
  color: #ffb0b0;
  border-color: rgba(255, 176, 176, 0.35);
  padding-inline: 0.75rem;
}

body.app-shell.account-shell .passkey-delete-btn:hover {
  background: rgba(255, 176, 176, 0.1);
}

body.app-shell.account-shell .passkey-empty {
  margin: 0;
  color: var(--muted);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
}

body.app-shell.account-shell .account-preview-avatar {
  width: 220px;
  height: 220px;
}

body.app-shell.account-shell .account-preview-note {
  max-width: 24ch;
}

body.app-shell .layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.02) 0%, transparent 55%);
}

body.app-shell .sidebar {
  border-right: 1px solid var(--line);
  padding: 1.3rem 0.75rem;
  background: linear-gradient(180deg, #101010 0%, #0c0c0c 100%);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  overflow-y: auto;
  overflow-x: hidden;
}

body.app-shell .layout > :not(.sidebar) {
  overflow-y: auto;
  overflow-x: hidden;
}

body.app-shell .side-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: #999999;
  padding: 0.78rem 0.85rem;
  margin-bottom: 0.1rem;
  border: 1px solid transparent;
  border-left: 2px solid transparent;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-radius: 6px;
  transition: background 0.25s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s ease, color 0.2s ease, padding-left 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

body.app-shell .side-item svg {
  transition: fill 0.2s ease;
}

body.app-shell .side-item svg .icon-inner {
  transition: stroke 0.2s ease;
}

body.app-shell .side-item:hover {
  border-color: #2f2f2f;
  background: linear-gradient(90deg, #1d1d1d 0%, #171717 100%);
  color: #ededed;
  padding-left: 1rem;
}

body.app-shell .side-item.active {
  border-color: #4a4a4a;
  border-left-color: #ffffff;
  background: linear-gradient(90deg, #242424 0%, #1a1a1a 100%);
  color: var(--text);
  font-weight: 700;
  padding-left: 1rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05);
}

body.app-shell .side-item.active svg {
  fill: #ffffff !important;
  stroke: #ffffff !important;
}

body.app-shell .side-item.active svg .icon-inner {
  stroke: #000000 !important;
}

body.app-shell .sidebar-footer-link {
  margin-top: auto;
  display: block;
  text-decoration: none;
  color: #777777;
  padding: 0.6rem 0.85rem;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

body.app-shell .sidebar-footer-link:hover {
  color: #aaaaaa;
}

body.app-shell .feed {
  padding: 1rem;
  width: 100%;
  box-sizing: border-box;
}

body.app-shell .feed-hero {
  margin: 0.2rem 0 1.2rem;
  padding: 1.2rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(160deg, #171717 0%, #101010 100%);
}

body.app-shell .feed-hero h1 {
  margin: 0.35rem 0 0.4rem;
  text-transform: uppercase;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.05;
}

body.app-shell .feed-hero .lead {
  margin: 0;
  max-width: 60ch;
  color: #bdbdbd;
}

body.app-shell .chips {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding-top: 0.3rem;
  padding-bottom: 0.6rem;
  padding-left: 1.2rem;
}

body.app-shell .chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  border: 1px solid var(--line);
  background: #181818;
  color: #cbcbcb;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 0.82rem;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}



body.app-shell .viewer_chips {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  border: 1px solid var(--line);
  background: #181818;
  color: #cbcbcb;
  padding: 0.5rem 0.9rem;
  border-radius: 20px;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 0.82rem;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}




body.app-shell .chip:hover {
  background: #222222;
  color: #ffffff;
  border-color: #3d3d3d;
  transform: translateY(-1px);
}

body.app-shell .chip-upload {
  cursor: pointer;
  gap: 0.45rem;
}

body.app-shell .chip-upload::before {
  content: "⇪";
  font-size: 0.85rem;
  line-height: 1;
}

body.app-shell .chip.profile-menu-danger {
  color: #f87171;
  border-color: rgba(248, 113, 113, 0.25);
}

body.app-shell .chip.profile-menu-danger:hover {
  background: rgba(248, 113, 113, 0.1);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.45);
  transform: translateY(-1px);
}

body.app-shell .chip-back {
  border-color: #4a4a4a;
  background: #202020;
  color: #e6e6e6;
  font-weight: 700;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
}

body.app-shell .chip.active {
  background: #ffffff;
  color: #0a0a0a;
  border-color: #ffffff;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transform: translateY(-1px);
}

body.app-shell .chip-loading {
  opacity: 0.75;
  cursor: default;
}

body.app-shell .category-header {
  margin: 0.45rem 0 1rem;
  border: 1px solid var(--line);
  background: #111111;
  padding: 1rem;
}

body.app-shell .category-header h1 {
  margin: 0.3rem 0 0.45rem;
  letter-spacing: 0.02em;
}

body.app-shell .category-header p {
  margin: 0;
  color: #bdbdbd;
}

body.app-shell .article-panel {
  border: none;
  border-radius: 0;
  background: transparent;
  padding: 0.4rem 1.2rem 1.2rem;
  margin-bottom: 1rem;
  box-shadow: none;
  position: relative;
  overflow: hidden;
}

body.app-shell .article-panel::before {
  content: none;
}

body.app-shell .article-panel h2 {
  margin: 0 0 0.9rem;
  text-transform: uppercase;
  font-size: 1.1rem;
}

body.app-shell .article-list {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.app-shell .article-doc-card {
  min-height: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #161616;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

body.app-shell .article-doc-card:hover {
  transform: translateY(-4px);
  border-color: #4a4a4a;
  box-shadow: 0 14px 32px rgba(0,0,0,0.45);
}

body.app-shell .article-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

body.app-shell .article-thumb {
  overflow: hidden;
  background: #111111;
  animation: none;
}

body.app-shell .thumb-preview {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  background: #0f0f0f;
  pointer-events: none;
}

body.app-shell .article-card-text {
  padding: 0.65rem 0.7rem 0.75rem;
}

body.app-shell .article-title {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

body.app-shell .article-caption {
  margin: 0.42rem 0 0;
  color: #b5b5b5;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 0.72rem;
}

body.app-shell .article-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0 0.7rem 0.75rem;
}

body.app-shell .action-chip {
  cursor: pointer;
}

body.app-shell .action-icon {
  display: inline-block;
  width: 0.9rem;
  text-align: center;
}

body.app-shell .action-icon-like,
body.app-shell .action-icon-download,
body.app-shell .action-icon-back {
  width: 1rem;
  height: 1rem;
  display: inline-block;
  color: currentColor;
}

body.app-shell .action-icon-like path,
body.app-shell .action-icon-download path,
body.app-shell .action-icon-back path,
body.app-shell .action-icon-back circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: none !important;
}

body.app-shell .action-icon-like path {
  fill: none !important;
  transition: none !important;
}

body.app-shell .action-icon-like path {
  stroke-width: 1.9;
}

body.app-shell .action-chip[data-action="like"] .action-icon-like,
body.app-shell .viewer-action[data-action="like"] .action-icon-like {
  color: #d0d0d0;
}

body.app-shell .action-chip.is-active[data-action="like"] .action-icon-like,
body.app-shell .viewer-action.is-active[data-action="like"] .action-icon-like {
  color: #ff6fa7;
}

body.app-shell .action-chip.is-active[data-action="like"] .action-icon-like path,
body.app-shell .viewer-action.is-active[data-action="like"] .action-icon-like path {
  fill: #ff6fa7 !important;
  stroke: none !important;
  animation: heartFillFromCenter 0.3s ease-out forwards;
}

body.app-shell .action-chip.no-animate[data-action="like"] .action-icon-like path,
body.app-shell .viewer-action.no-animate[data-action="like"] .action-icon-like path {
  animation: none;
  clip-path: none;
}

@keyframes heartFillFromCenter {
  0% {
    clip-path: circle(0% at 50% 50%);
  }
  100% {
    clip-path: circle(100% at 50% 50%);
  }
}

@keyframes likeBackgroundPulse {
  0% {
    background: #2a2a2a;
  }
  30% {
    background: rgba(255, 111, 167, 0.25);
    border-color: rgba(255, 111, 167, 0.5);
  }
  100% {
    background: #2a2a2a;
    border-color: #4a4a4a;
  }
}

body.app-shell .action-icon-on {
  display: none;
}

body.app-shell .action-chip.is-active,
body.app-shell .viewer-action.is-active {
  background: #2a2a2a;
  color: #ffffff;
  border-color: #4a4a4a;
}

body.app-shell .action-chip.is-active[data-action="like"],
body.app-shell .viewer-action.is-active[data-action="like"] {
  animation: likeBackgroundPulse 0.5s ease-out forwards;
}

body.app-shell .action-chip.no-animate[data-action="like"],
body.app-shell .viewer-action.no-animate[data-action="like"] {
  animation: none;
}

body.app-shell .action-chip.is-active .action-icon-off,
body.app-shell .viewer-action.is-active .action-icon-off {
  display: none;
}

body.app-shell .action-chip.is-active .action-icon-on,
body.app-shell .viewer-action.is-active .action-icon-on {
  display: inline-block;
}

body.app-shell .viewer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.8rem 0;
}

body.app-shell .viewer-actions .chip:not(.viewer-view-toggle),
body.app-shell .viewer-actions .viewer-action:not(.viewer-view-toggle) {
  padding: 0.55rem 1.25rem;
  height: 40px;
  min-width: 115px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  box-sizing: border-box;
}

body.app-shell .viewer-more-wrap {
  position: relative;
}

body.app-shell .viewer-more-trigger {
  cursor: pointer;
}

body.app-shell .viewer-more-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 200px;
  display: none;
  flex-direction: column;
  gap: 0.4rem;
  border: 1px solid var(--line);
  background: #111111;
  padding: 0.6rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  z-index: 20;
}

body.app-shell .viewer-more-menu.is-open {
  display: flex;
}

body.app-shell .viewer-more-item {
  width: 100%;
  min-width: 0;
  height: auto;
}

body.app-shell .viewer-actions .viewer-more-item {
  justify-content: flex-start;
}

body.app-shell .viewer-action {
  cursor: pointer;
}

body.app-shell .list-menu-wrap {
  position: relative;
  display: inline-flex;
}

body.app-shell .list-menu-trigger {
  cursor: pointer;
}

body.app-shell .list-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 200px;
  display: none;
  flex-direction: column;
  gap: 0.4rem;
  border: 1px solid var(--line);
  background: #111111;
  padding: 0.6rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  z-index: 20;
}

body.app-shell .list-menu.is-open {
  display: flex;
}

body.app-shell .list-menu-item {
  width: 100%;
  min-width: 0;
  height: auto;
  justify-content: flex-start;
  cursor: pointer;
}

body.app-shell .list-menu-item.is-active {
  border-color: var(--accent, #7dd3fc);
}

body.app-shell .list-menu-plus {
  font-weight: 700;
}

body.app-shell .list-menu-create-form {
  display: flex;
  gap: 0.4rem;
  width: 100%;
}

body.app-shell .list-menu-create-form[hidden] {
  display: none;
}

body.app-shell .list-menu-create-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 1px solid var(--line);
  color: inherit;
  padding: 0.4rem 0.6rem;
  font-size: 0.85rem;
}

body.app-shell .list-menu-create-confirm {
  width: auto;
  min-width: 0;
  cursor: pointer;
}

body.app-shell .pdf-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.65rem 0.8rem 0;
  align-items: center;
}

body.app-shell .pdf-tool,
body.app-shell .pdf-indicator {
  padding: 0.35rem 0.9rem;
}

body.app-shell .pdf-tool {
  cursor: pointer;
}

body.app-shell .pdf-tool:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

body.app-shell .pdf-indicator {
  color: #f0f0f0;
}

body.app-shell .category-empty {
  margin: 0;
  color: #bdbdbd;
}

body.app-shell .pdf-viewer-wrap {
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex: 1; /* allow it to grow in viewer-shell */
  overflow: auto;
}

body.app-shell .pdf-canvas-shell {
  width: 100%;
  max-width: 900px;
  margin: auto;
  border: 1px solid var(--line);
  background: #0f0f0f;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 0.8rem;
}

body.app-shell .pdf-page {
  display: flex;
  justify-content: center;
}

body.app-shell .pdf-canvas {
  display: block;
  background: #ffffff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

body.app-shell .pdf-status {
  margin: 0;
  min-height: 1.1rem;
  color: #bdbdbd;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

body.app-shell .pdf-status.is-error {
  color: #ff9f9f;
}

body.app-shell .doc-grid {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

body.app-shell.manager-shell .manager-main {
  width: min(1280px, 92vw);
  margin: 1rem auto 3rem;
  display: grid;
  gap: 1rem;
}

body.app-shell.manager-shell .manager-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1rem;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 30%),
    linear-gradient(160deg, #171717 0%, #101010 100%);
  padding: clamp(1.2rem, 3vw, 2rem);
}

body.app-shell.manager-shell .manager-hero h1 {
  margin: 0.35rem 0 0.8rem;
  text-transform: uppercase;
  line-height: 0.95;
  font-size: clamp(2rem, 5vw, 4rem);
}

body.app-shell.manager-shell .scope-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.1rem;
}

body.app-shell.manager-shell .manager-tab {
  cursor: pointer;
}

body.app-shell.manager-shell .manager-tab.active {
  background: #2a2a2a;
  color: #fff;
  border-color: #474747;
}

body.app-shell.manager-shell .stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

body.app-shell.manager-shell .stat-card {
  border: 1px solid var(--line);
  background: rgba(18, 18, 18, 0.9);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  min-height: 110px;
  justify-content: space-between;
}

body.app-shell.manager-shell .stat-value {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1;
}

body.app-shell.manager-shell .stat-label {
  margin-top: 0.45rem;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

body.app-shell.manager-shell .manager-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: 1rem;
}

body.app-shell.manager-shell .manager-panel {
  margin-bottom: 0;
}

body.app-shell.manager-shell .upload-form {
  display: grid;
  gap: 0.85rem;
}

body.app-shell.manager-shell .manager-field {
  display: grid;
  gap: 0.35rem;
}

body.app-shell.manager-shell .manager-field > span,
body.app-shell.manager-shell .manager-field-inline > span {
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  color: var(--muted);
}

body.app-shell.manager-shell .manager-field input,
body.app-shell.manager-shell .manager-field select {
  width: 100%;
  border: 1px solid var(--line);
  background: #0d0d0d;
  color: var(--text);
  padding: 0.8rem 0.85rem;
  font: inherit;
}

body.app-shell.manager-shell .manager-field-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

body.app-shell.manager-shell .manager-field-inline label {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  border: 1px solid var(--line);
  background: #0e0e0e;
  padding: 0.6rem 0.75rem;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 0.76rem;
  text-transform: uppercase;
}

body.app-shell.manager-shell .manager-field-inline input {
  margin: 0;
}

body.app-shell.manager-shell .manager-actions-row {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  align-items: center;
}

body.app-shell.manager-shell .manager-status {
  margin: 0;
  color: #d7d7d7;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 0.8rem;
}

body.app-shell.manager-shell .manager-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
}

body.app-shell.manager-shell .manager-meta {
  margin: 0;
  color: var(--muted);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

body.app-shell.manager-shell .manager-doc-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

body.app-shell.manager-shell .manager-doc-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
}

body.app-shell.manager-shell .manager-doc-head {
  padding-bottom: 0.45rem;
}

body.app-shell.manager-shell .manager-badges {
  display: flex;
  gap: 0.35rem;
  padding: 0 0.7rem 0.5rem;
}

body.app-shell.manager-shell .visibility-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.6rem;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  text-transform: uppercase;
  font-size: 0.68rem;
}

body.app-shell.manager-shell .visibility-badge.is-public {
  background: rgba(67, 154, 108, 0.15);
  color: #9be3bb;
}

body.app-shell.manager-shell .visibility-badge.is-private {
  background: rgba(154, 67, 67, 0.18);
  color: #ffb0b0;
}

body.app-shell.manager-shell .manager-doc-meta {
  display: grid;
  gap: 0.2rem;
  padding: 0 0.7rem 0.65rem;
  color: #b9b9b9;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 0.72rem;
}

body.app-shell.manager-shell .manager-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 0.7rem 0.75rem;
}

body.app-shell.manager-shell .manager-action {
  cursor: pointer;
}

body.app-shell.manager-shell .manager-empty {
  margin: 0;
  color: var(--muted);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
}

body.app-shell.manager-shell-plain,
body.app-shell.manager-shell-plain * {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  letter-spacing: normal;
  text-transform: none;
}

body.app-shell.manager-shell-plain {
  background: #f4f4f4;
  color: #1f1f1f;
}

body.app-shell.manager-shell-plain .topbar {
  background: #ffffff;
  border-bottom: 1px solid #d8d8d8;
}

body.app-shell.manager-shell-plain .mode,
body.app-shell.manager-shell-plain .mode-enterprise {
  background: #efefef;
  border: 1px solid #d4d4d4;
  color: #333333;
}

body.app-shell.manager-shell-plain .search {
  background: #ffffff;
  border: 1px solid #d8d8d8;
}

body.app-shell.manager-shell-plain .search span,
body.app-shell.manager-shell-plain .search input::placeholder {
  color: #666666;
}

body.app-shell.manager-shell-plain .chip,
body.app-shell.manager-shell-plain .btn,
body.app-shell.manager-shell-plain .manager-field-inline label {
  background: #ffffff;
  border: 1px solid #cfcfcf;
  color: #2a2a2a;
  border-radius: 6px;
  text-transform: none;
  font-size: 0.85rem;
}

body.app-shell.manager-shell-plain .btn-solid {
  background: #1f1f1f;
  color: #ffffff;
  border-color: #1f1f1f;
}

body.app-shell.manager-shell-plain .btn:hover {
  transform: none;
}

body.app-shell.manager-shell-plain .manager-main,
body.app-shell.manager-shell-plain .manager-hero,
body.app-shell.manager-shell-plain .manager-grid,
body.app-shell.manager-shell-plain .article-panel,
body.app-shell.manager-shell-plain .stat-card,
body.app-shell.manager-shell-plain .manager-doc-card,
body.app-shell.manager-shell-plain .profile-preview {
  background: #ffffff;
  border: 1px solid #d8d8d8;
  box-shadow: none;
}

body.app-shell.manager-shell-plain .manager-hero {
  background: #ffffff;
}

body.app-shell.manager-shell-plain .manager-hero h1,
body.app-shell.manager-shell-plain .article-title,
body.app-shell.manager-shell-plain .article-panel h2,
body.app-shell.manager-shell-plain .stat-value {
  text-transform: none;
  color: #1f1f1f;
}

body.app-shell.manager-shell-plain .kicker-removed,
body.app-shell.manager-shell-plain .manager-meta,
body.app-shell.manager-shell-plain .stat-label,
body.app-shell.manager-shell-plain .article-caption,
body.app-shell.manager-shell-plain .manager-doc-meta,
body.app-shell.manager-shell-plain .manager-field > span,
body.app-shell.manager-shell-plain .manager-field-inline > span,
body.app-shell.manager-shell-plain .manager-status {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  color: #606060;
  text-transform: none;
  letter-spacing: normal;
}

body.app-shell.manager-shell-plain .manager-field input,
body.app-shell.manager-shell-plain .manager-field select {
  background: #ffffff;
  border: 1px solid #cfcfcf;
  color: #1f1f1f;
}

body.app-shell.manager-shell-plain .visibility-badge {
  border-radius: 4px;
  font-size: 0.75rem;
  text-transform: none;
}

body.app-shell.manager-shell-plain .visibility-badge.is-public {
  background: #e8f5e9;
  color: #2e7d32;
}

body.app-shell.manager-shell-plain .visibility-badge.is-private {
  background: #fdecea;
  color: #b71c1c;
}

body.app-shell .doc-card {
  min-height: 200px;
}

body.app-shell .thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background: linear-gradient(
    100deg,
    var(--placeholder-1) 20%,
    var(--placeholder-2) 40%,
    var(--placeholder-1) 60%
  );
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
}

body.app-shell .meta {
  margin-top: 0.62rem;
}

body.app-shell .lines {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

body.app-shell .line {
  display: block;
  height: 9px;
  border-radius: 100px;
  background: linear-gradient(
    100deg,
    var(--placeholder-1) 10%,
    var(--placeholder-2) 40%,
    var(--placeholder-1) 70%
  );
  background-size: 200% 100%;
  animation: shimmer 2.2s linear infinite;
}

body.app-shell .w-92 {
  width: 92%;
}

body.app-shell .w-90 {
  width: 90%;
}

body.app-shell .w-88 {
  width: 88%;
}

body.app-shell .w-86 {
  width: 86%;
}

body.app-shell .w-85 {
  width: 85%;
}

body.app-shell .w-82 {
  width: 82%;
}

body.app-shell .w-80 {
  width: 80%;
}

body.app-shell .w-78 {
  width: 78%;
}

body.app-shell .w-70 {
  width: 70%;
}

body.app-shell .w-66 {
  width: 66%;
}

body.app-shell .w-64 {
  width: 64%;
}

body.app-shell .w-63 {
  width: 63%;
}

body.app-shell .w-60 {
  width: 60%;
}

body.app-shell .w-58 {
  width: 58%;
}

body.app-shell .w-57 {
  width: 57%;
}

body.app-shell .w-52 {
  width: 52%;
}

body.app-shell .w-50 {
  width: 50%;
}

body.app-shell .w-48 {
  width: 48%;
}

body.app-shell .w-46 {
  width: 46%;
}

body.app-shell .w-45 {
  width: 45%;
}

body.app-shell .w-44 {
  width: 44%;
}

body.app-shell .w-42 {
  width: 42%;
}

body.app-shell .w-40 {
  width: 40%;
}

body.app-shell .w-36 {
  width: 36%;
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

@media (max-width: 1200px) {
  body.app-shell .article-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.app-shell .doc-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1200px) {
    body.app-shell .hamburger-btn {
    display: inline-flex !important;
  }

  body.app-shell .layout {
    grid-template-columns: 1fr;
  }

  body.app-shell .sidebar {
    position: fixed;
    top: var(--topbar-height, 72px);
    left: 0;
    z-index: 50;
    width: 260px;
    height: calc(100vh - var(--topbar-height, 72px));
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
    overflow-y: auto;
  }

  body.app-shell .sidebar.is-open {
    transform: translateX(0);
  }

  body.app-shell .sidebar-overlay {
    display: none;
    position: fixed;
    inset: var(--topbar-height, 72px) 0 0 0;
    z-index: 40;
    background: rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
  }

  body.app-shell {
    display: block;
    height: auto;
    overflow: visible;
  }

  body.app-shell .topbar {
    grid-template-columns: 1fr auto;
    height: auto;
    padding: 0.7rem;
  }

  body.app-shell .topbar-right {
    justify-content: flex-end;
  }

  body.app-shell .layout {
    height: auto;
    overflow: visible;
  }

  body.app-shell .layout > :not(.sidebar) {
    overflow-y: visible;
    overflow-x: visible;
  }

  body.app-shell .feed {
    padding-top: 0.75rem;
  }
}

@media (max-width: 768px) {
  body.app-shell .sidebar {
    width: 280px;
    max-width: 90vw;
  }

  body.app-shell .brand img {
    height: 30px;
  }
}

@media (max-width: 700px) {
  body.app-shell .article-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.app-shell .pdf-toolbar {
    padding-top: 0.55rem;
  }

  body.app-shell .pdf-canvas-shell {
    padding: 0.45rem;
  }

  body.app-shell .doc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.app-shell .profile-grid {
    grid-template-columns: 1fr;
  }

  body.app-shell .sidebar {
    width: 280px;
    max-width: 90vw;
  }

  body.app-shell.manager-shell .manager-hero,
  body.app-shell.manager-shell .manager-grid {
    grid-template-columns: 1fr;
  }

  body.app-shell.manager-shell .stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  body.app-shell .article-list,
  body.app-shell .doc-grid {
    grid-template-columns: 1fr;
  }
}

/* Auth/Login page */
body.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-header {
  width: 100%;
  justify-content: center;
}

.auth-main {
  flex: 1;
  width: 100%;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.auth-card {
  width: min(620px, calc(100vw - 2rem));
  border: 0;
  background: transparent;
  padding: 0;
  animation: reveal 650ms ease-out both;
  text-align: center;
  margin: 0 auto;
}

.auth-card h1 {
  margin: 0.35rem 0 0.8rem;
  text-transform: uppercase;
  line-height: 1.05;
}

.auth-lead {
  margin: 0;
  color: #cdcdcd;
}

.auth-field {
  display: block;
  margin-top: 1rem;
  margin-bottom: 0.45rem;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.auth-card input {
  width: 100%;
  min-height: 44px;
  background: #111111;
  border: 1px solid var(--line);
  color: var(--text);
  padding: 0.6rem 0.75rem;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  text-align: center;
}

.auth-card input:focus {
  outline: 2px solid #6a6a6a;
  outline-offset: 1px;
}

.auth-collapsible {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-10px);
  transition:
    max-height 320ms ease,
    opacity 220ms ease,
    transform 320ms ease,
    margin-top 320ms ease;
  margin-top: 0;
}

.auth-collapsible.is-open {
  max-height: 140px;
  opacity: 1;
  transform: translateY(0);
  margin-top: 0.55rem;
}

.auth-collapsible-confirm {
  transition-delay: 70ms;
}

.auth-privacy-wrap {
  transition-delay: 110ms;
}

.auth-checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 0.78rem;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}

.auth-checkbox-field input[type="checkbox"] {
  width: auto;
  min-height: 0;
  margin: 0.15rem 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.auth-checkbox-field a {
  color: var(--text);
  text-decoration: underline;
}

.auth-status {
  min-height: 1.2em;
  margin: 0.85rem 0 0;
  color: #9bd8a2;
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  font-size: 0.8rem;
}

.auth-status.is-error {
  color: #ff9d9d;
}

.auth-actions {
  margin-top: 1.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.auth-actions button {
  cursor: pointer;
}

.auth-actions button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.auth-google-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-top: 0.15rem;
  width: 100%;
}

.auth-google-wrap.is-disabled {
  opacity: 0.7;
  pointer-events: none;
}

.auth-google-wrap.is-placeholder {
  opacity: 0.95;
}

.auth-google-placeholder {
  width: min(320px, 100%);
}

#google-button {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.auth-google-button {
  position: relative;
  width: min(320px, 100%);
  min-height: 44px;
  margin: 0 auto;
  isolation: isolate;
}

@property --google-ring-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.auth-google-button::before,
.auth-google-button::after {
  content: "";
  position: absolute;
  inset: -2px;
  pointer-events: none;
  opacity: 0;
  background: conic-gradient(
    from var(--google-ring-angle),
    #4285f4,
    #34a853,
    #fbbc05,
    #ea4335,
    #4285f4
  );
  transition: opacity 220ms ease;
}

.auth-google-button::before {
  padding: 1px;
  z-index: 0;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.auth-google-button::after {
  inset: -4px;
  filter: blur(7px);
  z-index: -1;
}

.auth-google-visual {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  background: #111111;
  color: var(--text);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
  border-radius: 0;
  pointer-events: none;
}

.auth-google-g {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.auth-google-visual > span {
  text-transform: none;
}

.auth-google-button:hover .auth-google-visual {
  background: #161616;
}

.auth-google-button:hover::before,
.auth-google-button:hover::after,
.auth-google-button:focus-within::before,
.auth-google-button:focus-within::after {
  animation: google-border-orbit 1.6s linear infinite;
}

.auth-google-button:hover::before,
.auth-google-button:focus-within::before {
  opacity: 0.62;
}

.auth-google-button:hover::after,
.auth-google-button:focus-within::after {
  opacity: 0.4;
}

#google-button > div {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  border-radius: 0 !important;
  overflow: hidden;
  opacity: 0.01;
  z-index: 2;
}

#google-button iframe {
  width: 100% !important;
}

@keyframes google-border-orbit {
  from {
    --google-ring-angle: 0deg;
  }
  to {
    --google-ring-angle: 360deg;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-google-button:hover::before,
  .auth-google-button:hover::after,
  .auth-google-button:focus-within::before,
  .auth-google-button:focus-within::after {
    animation: none;
  }
}

.auth-passkey-wrap {
  display: grid;
  gap: 0;
  justify-items: center;
  margin-top: 0.65rem;
}

.auth-passkey-wrap.is-disabled {
  opacity: 0.7;
  pointer-events: none;
}

.animating {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  background: var(--bg);
  pointer-events: none;
  opacity: 0;
  transition: opacity 400ms ease;
}

.animating.is-active {
  opacity: 1;
}

.fade-in-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  background: var(--bg);
  pointer-events: none;
  animation: fadeOutOverlay 1000ms ease-out forwards;
}

@keyframes fadeOutOverlay {
  from { opacity: 1; }
  to { opacity: 0; }
}

.fade-in {
  opacity: 0;
  animation: fadeIn 1000ms ease-in forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.auth-passkey-button:hover {
  background: #161616;
}

.auth-passkey-icon {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.auth-hidden {
  display: none;
}

.auth-code-input {
  letter-spacing: 0.35em;
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
}


.manager-doc-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #f5f5f5;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.manager-doc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.manager-doc-thumb--empty {
  background-color: #2a2a2a;
  color: #888;
  font-size: 14px;
}

.manager-thumbnail-preview {
  margin-top: 8px;
  width: 100%;
  max-width: 320px;
  aspect-ratio: 16 / 9;
  border: 1px solid #333;
  border-radius: 4px;
  overflow: hidden;
}

.manager-thumbnail-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}



@media (max-width: 768px) {
  body.app-shell.account-shell .account-hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  body.app-shell.account-shell .account-grid {
    grid-template-columns: 1fr;
  }
  body.app-shell.account-shell .account-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

.cookie-consent {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: end center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.55);
}

.cookie-consent-card {
  width: min(560px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 26px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.cookie-consent-title {
  margin: 0 0 8px;
  font-family: "Syne", "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

.cookie-consent-text {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.cookie-consent-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cookie-consent-actions .btn {
  margin: 0;
}

@media (max-width: 480px) {
  .cookie-consent {
    padding: 16px;
  }
  .cookie-consent-actions {
    flex-direction: column-reverse;
  }
  .cookie-consent-actions .btn {
    width: 100%;
  }
}
