/* Shared base tokens, page shell, auth, and common primitives */

:root {
  --bg: #0b1118;
  --bg-accent: #101a26;
  --surface: #131e2b;
  --surface-hover: #192738;
  --surface-active: #1b2d43;
  --line: #28384e;
  --line-strong: #3e5b82;
  --ink: #e8eef5;
  --muted: #9eb0c5;
  --accent: #60a5fa;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}

body {
  font-family: "Mitr", sans-serif;
  color: var(--ink);
  background-color: #0a0a0f;
}

.page {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 100vh;
  padding: 24px 0 36px;
}

.page.page-project {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 24px 22px 36px;
}

.page.page-project .project-layout {
  min-height: calc(100vh - 110px);
}

.page.page-project .project-shell {
  min-height: 100%;
}

.page.page-project .project-content-card {
  min-height: 0;
}

.top {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  margin: 0;
  font-family: "Mitr", sans-serif;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(19, 30, 43, 0.72);
  padding: 6px 10px 6px 6px;
}

.avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  object-fit: cover;
}

.user-name {
  font-size: 0.8rem;
  color: var(--ink);
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logout-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #132131;
  color: var(--ink);
  font: inherit;
  font-size: 0.72rem;
  padding: 5px 8px;
  cursor: pointer;
}

.logout-btn:hover {
  border-color: #4a6a95;
}

.auth-view {
  min-height: clamp(300px, 54vh, 560px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 22px;
}

/* ── Auth Gate Overlay (replaces old auth-view) ── */
.auth-gate-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
  padding: 40px 20px;
}

.auth-gate-overlay.is-hidden {
  display: none;
}

.auth-gate-content {
  max-width: 420px;
  text-align: center;
}

.auth-gate-icon {
  margin-bottom: 20px;
  color: rgba(139, 92, 246, 0.6);
}

.auth-gate-title {
  margin: 0 0 10px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #e2efff;
}

.auth-gate-description {
  margin: 0 0 24px;
  font-size: 0.92rem;
  color: rgba(180, 200, 230, 0.6);
  line-height: 1.5;
}

.auth-gate-features {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.auth-gate-features li {
  position: relative;
  padding-left: 22px;
  font-size: 0.88rem;
  color: rgba(200, 215, 240, 0.75);
  line-height: 1.45;
}

.auth-gate-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #8b5cf6;
  font-weight: 700;
}

.auth-gate-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 28px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.3);
  transition: filter 0.15s, box-shadow 0.15s;
}

.auth-gate-login-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 24px rgba(124, 58, 237, 0.4);
}

.login-google-btn {
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  min-width: min(360px, 100%);
  padding: 14px 18px;
  background: linear-gradient(140deg, #1a2b40, #1d314a);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease, filter 0.2s ease;
}

.login-google-btn:hover:not(:disabled) {
  border-color: #6ca8f1;
  filter: brightness(1.04);
}

.login-google-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.login-google-btn:active:not(:disabled) {
  transform: translateY(1px);
}

.google-g {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #ffffff;
  color: #2563eb;
  display: inline-grid;
  place-items: center;
  font-family: "Mitr", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
}

.auth-status {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 1.1rem;
}

.auth-bootstrap-overlay {
  position: fixed;
  inset: 0;
  z-index: 7000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(4, 10, 18, 0.82);
  backdrop-filter: blur(2px);
}

.auth-bootstrap-overlay-card {
  width: min(360px, 100%);
  border: 1px solid rgba(96, 138, 188, 0.6);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(15, 27, 41, 0.98), rgba(11, 21, 33, 0.98));
  padding: 16px 14px;
  display: grid;
  justify-items: center;
  gap: 10px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.45);
}

.auth-bootstrap-overlay-text {
  margin: 0;
  color: #d7e8ff;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
}

.is-hidden {
  display: none !important;
}

.top-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.project-top-info {
  display: grid;
  gap: 2px;
}

.page.page-project .project-top-info .brand {
  margin-bottom: 1px;
}

.page.page-project .project-top-info .project-title {
  font-size: 1.2rem;
  line-height: 1.2;
}

.page.page-project .project-top-info .project-meta-line {
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  text-transform: none;
}

.back-link {
  color: var(--muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  line-height: 1;
  transition: transform 0.18s ease, filter 0.2s ease;
}

.back-link:hover {
  transform: translateX(-1px);
  filter: brightness(1.08);
}

.back-link-icon {
  position: relative;
  top:2px;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.layout {
  display: grid;
  gap: 18px;
}

.new-project-btn {
  width: 100%;
  min-height: clamp(124px, 19vh, 180px);
  /*border: 1px solid var(--line-strong);*/
  border-radius: 14px;
  /*background: linear-gradient(140deg, rgba(19, 30, 43, 0.95), rgba(22, 35, 50, 0.95));*/
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: inherit;
  font-size: clamp(1.4rem, 2.5vw, 2.25rem);
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
  animation: rise 0.45s ease both;
}

.new-project-btn:hover {
  border-color: #4f75a7;
  background: linear-gradient(140deg, #1a2b40, #1d314a);
}

.new-project-btn:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.45);
  outline-offset: 2px;
}

.new-project-btn:active {
  transform: translateY(1px);
}

.new-project-btn:disabled {
  opacity: 0.72;
  cursor: wait;
}

.new-project-btn.tap {
  animation: tap 0.28s ease;
}

.plus {
  font-family: "Mitr", sans-serif;
  font-size: 1.06em;
  line-height: 1;
  color: var(--accent);
}

/* ── Shared Auth Gate Showcase Styles ── */
.auth-gate-showcase-kicker {
  margin: 0 0 10px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #a78bfa;
}

.auth-gate-showcase-title {
  margin: 0 0 32px;
  font-size: clamp(3.0rem, 2.8vw, 2.2rem);
  font-weight: 500;
  line-height: 1.0;
  color: #e2efff;
}

.auth-gate-showcase-desc {
  font-size: 0.92rem;
  line-height: 1.65;
  color: rgba(180, 200, 230, 0.5);
}

.auth-gate-showcase-points {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.auth-gate-showcase-points span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: rgba(200, 215, 240, 0.65);
}

.auth-gate-showcase-points svg {
  color: #8b5cf6;
  flex-shrink: 0;
}

.auth-gate-login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 24px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  color: #fff;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
  transition: filter 0.15s, box-shadow 0.15s, transform 0.15s;
}

.auth-gate-login-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 28px rgba(124, 58, 237, 0.4);
  transform: translateY(-1px);
}

.auth-gate-collage-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: authGateFloat 18s ease-in-out infinite alternate;
}

.auth-gate-collage-col.is-offset {
  animation-delay: -6s;
  margin-top: -30px;
}

.auth-gate-collage-col:nth-child(3) {
  animation-delay: -12s;
  margin-top: -15px;
}

@keyframes authGateFloat {
  0%   { transform: translateY(0); }
  100% { transform: translateY(-20px); }
}

.auth-gate-collage-col img {
  width: 140px;
  border-radius: 12px;
  object-fit: cover;
  aspect-ratio: 3 / 4;
  border: 1px solid rgba(255, 255, 255, 0.06);
  opacity: 0.85;
  transition: opacity 0.3s, transform 0.3s;
}

.auth-gate-collage-col img:hover {
  opacity: 1;
  transform: scale(1.03);
}

