/* App shell layout */
.app-shell {
  display: grid;
  grid-template-columns: var(--nav-width) 1fr;
  min-height: 100vh;
}

.app-nav {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1.5rem 1rem;
  background: linear-gradient(180deg, #101419 0%, #0c0e10 100%);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.brand {
  padding: 0.25rem 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.brand-mark {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1;
}

.brand-mark span {
  color: var(--accent);
}

.brand-sub {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-links a {
  display: block;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-weight: 500;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--accent-soft);
  color: var(--text);
  text-decoration: none;
}

.nav-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-faint);
}

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

.app-top {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.75rem;
  border-bottom: 1px solid var(--border);
  background: rgba(12, 14, 16, 0.72);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.app-content {
  padding: 1.75rem;
  max-width: 1200px;
  width: 100%;
}

.page-header {
  margin-bottom: 1.5rem;
}

.page-header p {
  max-width: 42rem;
}

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

.stat {
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}

.stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-top: 0.25rem;
}

/* Auth / landing */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
}

.auth-hero {
  position: relative;
  padding: clamp(2rem, 5vw, 4.5rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background:
    linear-gradient(160deg, rgba(12, 14, 16, 0.2), rgba(12, 14, 16, 0.92)),
    linear-gradient(135deg, #1a0a0c 0%, #0c0e10 45%, #101820 100%);
  overflow: hidden;
}

.auth-hero::before {
  content: "";
  position: absolute;
  inset: auto -20% -30% 20%;
  height: 70%;
  background: radial-gradient(circle, rgba(225, 29, 46, 0.35), transparent 65%);
  pointer-events: none;
}

.auth-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 34rem;
}

.auth-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ff8a95;
  margin-bottom: 1rem;
  font-weight: 600;
}

.auth-hero h1 {
  font-size: clamp(2.8rem, 6vw, 4.4rem);
  margin-bottom: 1rem;
}

.auth-hero p {
  font-size: 1.05rem;
  color: #c5cbd3;
  max-width: 28rem;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border);
}

.auth-card {
  width: 100%;
  max-width: 380px;
}

.auth-card h2 {
  margin-bottom: 0.35rem;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--text-faint);
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-strong);
}

.hub-hero {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background:
    linear-gradient(120deg, rgba(225, 29, 46, 0.18), transparent 55%),
    var(--surface);
  padding: clamp(1.75rem, 4vw, 3rem);
  margin-bottom: 1.5rem;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hub-hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.2rem);
}

.hub-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
}

.hub-action {
  display: block;
  padding: 1.15rem 1.2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none !important;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.hub-action:hover {
  border-color: rgba(225, 29, 46, 0.45);
  transform: translateY(-2px);
}

.hub-action strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.hub-action span {
  color: var(--text-muted);
  font-size: 0.9rem;
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-nav {
    position: relative;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .nav-links { flex-direction: row; flex-wrap: wrap; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-hero { min-height: 42vh; }
  .grid-2 { grid-template-columns: 1fr; }
  .app-content { padding: 1.1rem; }
}
