:root {
  color-scheme: dark;
  --bg: #09090d;
  --bg-secondary: #11131a;
  --panel: rgba(17, 19, 26, 0.92);
  --panel-border: rgba(255, 255, 255, 0.09);
  --text: #f4f7fb;
  --muted: #9ba6b5;
  --accent: #d869ff;
  --accent-2: #60d9ff;
  --shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap");

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

.sync-warning {
  margin: 0;
  padding: 0.65rem 1rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1a1410;
  background: linear-gradient(90deg, #f0c14d, #ffb347);
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.sync-warning.is-hidden {
  display: none;
}

.sync-warning__text {
  margin: 0 0 0.5rem;
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}

.sync-warning__text:last-child {
  margin-bottom: 0;
}

.sync-warning__actions {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  justify-content: center;
  align-items: center;
}

.sync-warning-btn {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: #1a1410;
  color: #fff8e8;
  cursor: pointer;
}

.sync-warning-btn:hover {
  filter: brightness(1.08);
}

.sync-warning-btn--muted {
  background: rgba(26, 20, 16, 0.35);
  color: #1a1410;
  border-color: rgba(0, 0, 0, 0.15);
}

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  color: var(--text);
  line-height: 1.5;
  background:
    radial-gradient(circle at 15% 20%, rgba(216, 105, 255, 0.22), transparent 30%),
    radial-gradient(circle at 85% 0%, rgba(96, 217, 255, 0.18), transparent 28%),
    linear-gradient(180deg, #06070b 0%, #0b0d12 50%, #09090d 100%);
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent 95%);
  opacity: 0.45;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 350;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  background: rgba(6, 7, 11, 0.68);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.topbar__brand-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: linear-gradient(135deg, #d869ff, #60d9ff);
  color: #0b0d12;
}

.topbar__eyebrow {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topbar__btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 0.42rem 0.9rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.topbar__btn--ghost {
  background: rgba(255, 255, 255, 0.02);
}

.topbar__user {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-right: 0.2rem;
}

.topbar__user-name {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.1;
}

.topbar__user-email {
  font-size: 0.72rem;
  color: var(--muted);
}

.splash {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 28px;
  padding: clamp(1.1rem, 2.8vw, 2rem);
  background:
    radial-gradient(120% 85% at 10% 5%, rgba(216, 105, 255, 0.26), transparent 52%),
    radial-gradient(95% 70% at 100% 10%, rgba(96, 217, 255, 0.2), transparent 50%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  display: grid;
  grid-template-columns: 1.2fr 1fr 340px;
  gap: 1rem;
  margin-bottom: 0;
  animation: splash-enter 700ms cubic-bezier(0.2, 0.7, 0.2, 1);
  min-height: calc(100dvh - 4.2rem);
}

.splash__copy {
  position: relative;
  z-index: 2;
  animation: splash-copy-enter 900ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.splash__visual {
  position: relative;
  min-height: 620px;
  perspective: 1200px;
  transform-style: preserve-3d;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.splash__visual::before,
.splash__visual::after {
  display: none;
}

.splash-logo-scene {
  position: relative;
  width: min(92%, 640px);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border-radius: 28px;
  background:
    radial-gradient(65% 60% at 76% 24%, rgba(96, 217, 255, 0.22), transparent 68%),
    radial-gradient(55% 52% at 24% 76%, rgba(120, 130, 150, 0.18), transparent 65%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 55px rgba(0, 0, 0, 0.25), 0 30px 65px rgba(0, 0, 0, 0.35);
}

.splash-logo-m-svg {
  width: min(82%, 440px);
  max-height: min(58vh, 440px);
  height: auto;
  display: block;
  filter: drop-shadow(0 14px 36px rgba(0, 0, 0, 0.55));
  animation: splash-logo-float 7s ease-in-out infinite;
}

.splash-logo-m-path {
  shape-rendering: geometricPrecision;
}

.splash-logo-m-chrome {
  shape-rendering: geometricPrecision;
  animation: splash-m-chrome-pulse 5.5s ease-in-out infinite;
}

@keyframes splash-logo-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes splash-m-chrome-pulse {
  0%,
  100% {
    opacity: 0.92;
  }
  50% {
    opacity: 1;
  }
}

.splash-logo-tag {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  margin: 0;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(9, 11, 17, 0.62);
  color: rgba(225, 234, 248, 0.9);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.splash__visual::before {
  left: 0;
  background: linear-gradient(90deg, rgba(7, 9, 14, 0.95), rgba(7, 9, 14, 0));
}

.splash__visual::after {
  right: 0;
  background: linear-gradient(270deg, rgba(7, 9, 14, 0.95), rgba(7, 9, 14, 0));
}

.splash-planet-wrap {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 300px;
  height: 300px;
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
}

.splash-planet-glow {
  position: absolute;
  inset: -28px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 45% 42%, rgba(96, 217, 255, 0.42), transparent 52%),
    radial-gradient(circle at 62% 60%, rgba(216, 105, 255, 0.34), transparent 58%);
  filter: blur(24px);
  animation: splash-planet-breathe 6s ease-in-out infinite;
}

.splash-planet {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background:
    radial-gradient(circle at 30% 26%, rgba(255, 255, 255, 0.35), transparent 22%),
    radial-gradient(circle at 56% 62%, rgba(216, 105, 255, 0.4), transparent 62%),
    radial-gradient(circle at 42% 42%, rgba(96, 217, 255, 0.35), transparent 68%),
    linear-gradient(145deg, #171d2c, #0f1423);
  box-shadow:
    inset -16px -22px 44px rgba(0, 0, 0, 0.45),
    inset 12px 14px 30px rgba(255, 255, 255, 0.08),
    0 20px 34px rgba(0, 0, 0, 0.4);
  animation: splash-planet-rotate 18s linear infinite;
}

.splash-planet-shade {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 74% 70%, rgba(0, 0, 0, 0.5), transparent 52%),
    linear-gradient(130deg, transparent 35%, rgba(0, 0, 0, 0.5) 95%);
}

.splash__orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(30px);
  opacity: 0.55;
  pointer-events: none;
}

.splash__orb--primary {
  width: 280px;
  height: 280px;
  left: -70px;
  top: -100px;
  background: rgba(216, 105, 255, 0.6);
  animation: splash-orb-drift-1 10s ease-in-out infinite;
}

.splash__orb--secondary {
  width: 230px;
  height: 230px;
  right: 250px;
  top: -40px;
  background: rgba(96, 217, 255, 0.45);
  animation: splash-orb-drift-2 12s ease-in-out infinite;
}

.splash__orb--accent {
  width: 260px;
  height: 260px;
  right: -110px;
  bottom: -130px;
  background: rgba(255, 148, 240, 0.5);
  animation: splash-orb-drift-3 14s ease-in-out infinite;
}

.splash__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

.hero-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.56rem 1.05rem;
  font: inherit;
  font-weight: 800;
  color: #0b0d12;
  background: linear-gradient(90deg, #d869ff, #60d9ff);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.hero-btn:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 30px rgba(216, 105, 255, 0.35);
  filter: saturate(1.08);
}

.hero-btn--ghost {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
}

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

.splash-metric {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 0.65rem;
  background: rgba(255, 255, 255, 0.03);
  animation: splash-metric-pulse 5s ease-in-out infinite;
}

.splash-metric:nth-child(2) { animation-delay: 350ms; }
.splash-metric:nth-child(3) { animation-delay: 700ms; }

.splash-metric__value {
  display: block;
  font-size: 1rem;
  font-weight: 800;
}

.splash-metric__label {
  color: var(--muted);
  font-size: 0.75rem;
}

.splash-showcase {
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  top: 0.9rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(9, 9, 13, 0.6);
  backdrop-filter: blur(10px);
  padding: 0.9rem;
  transform: rotateX(8deg) rotateY(-6deg);
  animation: splash-float 6s ease-in-out infinite;
  will-change: transform;
  z-index: 3;
  display: none;
}

.splash-showcase__tag {
  display: inline-block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #f0b8ff;
}

.splash-showcase h2 {
  margin: 0.45rem 0 0.3rem;
  font-size: 1.15rem;
}

.splash-showcase p {
  margin: 0;
  color: var(--muted);
  font-size: 0.83rem;
}

.splash-phone-card {
  position: absolute;
  width: 160px;
  height: 300px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03));
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.3);
  will-change: transform;
  z-index: 4;
  display: none;
}

.splash-timeline-rail {
  position: absolute;
  left: -22%;
  width: 144%;
  top: 50%;
  z-index: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(120% 140% at 50% 50%, rgba(216, 105, 255, 0.22), transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(8px);
  overflow: hidden;
  transform: perspective(980px) rotateX(58deg) rotateZ(-11deg) translateY(-50%) scale(1.22);
  border-radius: 12px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45), inset 0 0 26px rgba(125, 220, 255, 0.18);
  animation: splash-orbit-tilt 12s ease-in-out infinite;
}

.splash-timeline-rail--back {
  display: none;
}

.splash-timeline-rail--front {
  z-index: 4;
  opacity: 0.95;
  transform: perspective(920px) rotateX(48deg) rotateZ(-10deg) translateY(-50%) scale(1.18);
  animation: splash-orbit-front-tilt 14s ease-in-out infinite;
}

.splash-timeline-occluder {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 338px;
  height: 338px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 50% 50%, transparent 55%, rgba(7, 9, 14, 0.78) 57%, rgba(7, 9, 14, 0.86) 100%);
}

.splash-timeline-track {
  display: inline-flex;
  align-items: center;
  gap: 1.9rem;
  padding: 0.95rem 0;
  white-space: nowrap;
  font-size: 1.02rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(230, 236, 247, 0.92);
  animation: splash-timeline-scroll 11.5s linear infinite;
  transform-origin: center center;
  will-change: transform;
}

.splash-timeline-track--back {
  display: none;
}

.splash-timeline-track--front {
  animation: splash-timeline-scroll-front 12.5s linear infinite;
}

.splash-timeline-track span::after {
  content: "";
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  margin-left: 1.35rem;
  border-radius: 999px;
  background: linear-gradient(120deg, #d869ff, #60d9ff);
}

.splash-phone-card--one {
  left: 26%;
  bottom: 3rem;
  --rot: -13deg;
  transform: rotate(var(--rot));
  animation: splash-float 7.2s ease-in-out infinite reverse;
}

.splash-phone-card--two {
  right: 1rem;
  bottom: 3.7rem;
  --rot: 10deg;
  transform: rotate(var(--rot));
  animation: splash-float 8s ease-in-out infinite;
}

.splash-phone-card__screen {
  position: absolute;
  inset: 10px;
  border-radius: 23px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.06)),
    radial-gradient(circle at 25% 15%, rgba(216, 105, 255, 0.5), transparent 42%),
    radial-gradient(circle at 78% 72%, rgba(96, 217, 255, 0.55), transparent 38%),
    #11131a;
}

.splash-phone-card__screen--alt {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.03)),
    radial-gradient(circle at 18% 68%, rgba(216, 105, 255, 0.52), transparent 35%),
    radial-gradient(circle at 78% 24%, rgba(96, 217, 255, 0.48), transparent 34%),
    #131722;
}

.auth-panel {
  position: relative;
  z-index: 3;
  align-self: start;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 1rem;
  background: rgba(8, 9, 14, 0.72);
  backdrop-filter: blur(14px);
}

.auth-panel__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
}

.auth-tab {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  border-radius: 10px;
  padding: 0.42rem 0.6rem;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.auth-tab.is-active {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
}

.auth-panel__body h2 {
  margin: 0;
  font-size: 1.1rem;
}

.auth-panel__lead {
  margin: 0.45rem 0 0.8rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.auth-form {
  display: grid;
  gap: 0.65rem;
}

.auth-panel__status {
  margin-top: 0.8rem;
}

.hero--app h2 {
  margin: 0 0 0.75rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.1rem, 4vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.splash h1 {
  background: linear-gradient(92deg, #f7f9ff 0%, #e5b9ff 45%, #8be4ff 85%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: splash-title-shimmer 8s linear infinite;
  background-size: 220% auto;
}

@keyframes splash-float {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50% { transform: translateY(-9px) rotate(var(--rot, 0deg)); }
}

@keyframes splash-enter {
  0% { opacity: 0; transform: translateY(12px) scale(0.99); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes splash-copy-enter {
  0% { opacity: 0; transform: translateY(16px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes splash-orb-drift-1 {
  0%,100% { transform: translate3d(0,0,0); }
  50% { transform: translate3d(16px,12px,0); }
}

@keyframes splash-orb-drift-2 {
  0%,100% { transform: translate3d(0,0,0); }
  50% { transform: translate3d(-18px,14px,0); }
}

@keyframes splash-orb-drift-3 {
  0%,100% { transform: translate3d(0,0,0); }
  50% { transform: translate3d(-14px,-10px,0); }
}

@keyframes splash-metric-pulse {
  0%,100% { transform: translateY(0); border-color: rgba(255,255,255,0.12); }
  50% { transform: translateY(-3px); border-color: rgba(255,255,255,0.28); }
}

@keyframes splash-title-shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes splash-timeline-scroll {
  0% { transform: translate3d(0, 0, 0) scale(1.03); }
  50% { transform: translate3d(-25%, 0, 0) scale(1.12); }
  100% { transform: translate3d(-50%, 0, 0) scale(1.03); }
}

@keyframes splash-timeline-scroll-back {
  0% { transform: translate3d(0, 0, 0) scale(0.9); }
  50% { transform: translate3d(-25%, 0, 0) scale(0.96); }
  100% { transform: translate3d(-50%, 0, 0) scale(0.9); }
}

@keyframes splash-timeline-scroll-front {
  0% { transform: translate3d(0, 0, 0) scale(1.1); }
  50% { transform: translate3d(-25%, 0, 0) scale(1.2); }
  100% { transform: translate3d(-50%, 0, 0) scale(1.1); }
}

@keyframes splash-orbit-tilt {
  0%, 100% {
    transform: perspective(980px) rotateX(56deg) rotateZ(-12deg) scale(1.16);
  }
  50% {
    transform: perspective(980px) rotateX(64deg) rotateZ(-9deg) scale(1.24);
  }
}

@keyframes splash-orbit-back-tilt {
  0%, 100% {
    transform: perspective(1100px) rotateX(72deg) rotateZ(-11deg) translateY(-66%) scale(1.06);
  }
  50% {
    transform: perspective(1100px) rotateX(77deg) rotateZ(-9deg) translateY(-66%) scale(1.1);
  }
}

@keyframes splash-orbit-front-tilt {
  0%, 100% {
    transform: perspective(920px) rotateX(48deg) rotateZ(-10deg) translateY(-50%) scale(1.16);
  }
  50% {
    transform: perspective(920px) rotateX(44deg) rotateZ(-9deg) translateY(-50%) scale(1.22);
  }
}

@keyframes splash-planet-rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes splash-planet-breathe {
  0%, 100% { transform: scale(0.98); opacity: 0.8; }
  50% { transform: scale(1.04); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .splash,
  .splash__copy,
  .splash__orb,
  .splash-showcase,
  .splash-phone-card,
  .splash-planet,
  .splash-planet-glow,
  .splash-timeline-track,
  .splash-timeline-track--back,
  .splash-timeline-track--front,
  .splash-metric,
  .splash h1,
  .splash-logo-m-svg,
  .splash-logo-m-chrome {
    animation: none !important;
  }
}

@media (max-width: 1100px) {
  .splash {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .splash__visual {
    min-height: 430px;
  }

  .splash__visual::before,
  .splash__visual::after {
    width: 72px;
  }

  .splash-planet-wrap {
    width: 260px;
    height: 260px;
  }

  .splash-timeline-occluder {
    width: 300px;
    height: 300px;
  }

  .auth-panel {
    max-width: 420px;
  }
}

.page {
  width: 100%;
  margin: 0 auto;
  padding: 0;
}

.app-shell {
  padding: 1.2rem 1.2rem 2.25rem;
}

.hero {
  position: relative;
  margin-bottom: 2rem;
  padding: 2rem 0 1rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: #f0b8ff;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.8rem, 8vw, 6rem);
  line-height: 0.96;
  letter-spacing: -0.05em;
}

.intro {
  max-width: 44rem;
  color: var(--muted);
  font-size: 1.08rem;
}

.intro-hint {
  display: block;
  margin-top: 0.65rem;
  font-size: 0.92rem;
  color: rgba(155, 166, 181, 0.88);
  line-height: 1.45;
}

.inventory-section {
  margin-bottom: 2.75rem;
  padding: 1.25rem 1.35rem;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.inventory-heading {
  margin: 0 0 1rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.inventory-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.inventory-item {
  --inv-accent: var(--accent);
  position: relative;
  display: flex;
  align-items: stretch;
  margin: 0;
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.inventory-item::before {
  content: "";
  width: 4px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--inv-accent), color-mix(in srgb, var(--inv-accent) 45%, #1a1a22));
}

@supports not (background: color-mix(in srgb, red, blue)) {
  .inventory-item::before {
    background: var(--inv-accent);
  }
}

.inventory-item:has(.inventory-item__btn:hover),
.inventory-item:has(.inventory-item__btn:focus-visible) {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.inventory-item__btn {
  flex: 1;
  display: flex;
  align-items: stretch;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: inherit;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  appearance: none;
}

.inventory-item__btn:focus {
  outline: none;
}

.inventory-item__btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--inv-accent) 65%, white);
  outline-offset: 2px;
}

.inventory-item__content {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  padding: 0.7rem 1rem 0.75rem 0.85rem;
  flex: 1;
  min-width: 0;
}

.inventory-item__text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  min-width: 0;
  flex: 1;
}

.inventory-item__purchase {
  font-size: 0.86rem;
  font-weight: 600;
  color: rgba(165, 178, 195, 0.95);
  letter-spacing: 0.02em;
  white-space: nowrap;
  flex-shrink: 0;
}

.inventory-item__purchase-sum {
  color: rgba(210, 220, 235, 0.98);
}

.inventory-item__brand {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  color: var(--text);
}

.inventory-item__model {
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(180, 190, 205, 0.95);
  letter-spacing: 0.01em;
}

.inventory-item--empty {
  display: block;
  padding: 0.85rem 1rem;
  text-align: center;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: none;
}

.inventory-item--empty::before {
  display: none;
}

.stats-group {
  display: grid;
  gap: 1rem;
  margin-bottom: 2.75rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.stats-main {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.stats-phones {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-card,
.phone-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 1.1rem 1.15rem;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0.8;
}

.stat-label {
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.stat-value {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
}

.history-section {
  display: grid;
  gap: 1rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
}

.section-header h2 {
  margin-bottom: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.65rem;
}

.section-header p {
  margin-bottom: 0.15rem;
  color: var(--muted);
}

.section-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-end;
  gap: 0.75rem 1rem;
}

.section-header-actions #count-label {
  margin-bottom: 0.15rem;
}

.login-btn {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 300;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(17, 19, 26, 0.92);
  color: var(--text);
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.login-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.24);
  background: rgba(24, 27, 38, 0.95);
}

.scroll-top-btn {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 300;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 35%, #11131a), #11131a);
  color: var(--text);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 200ms ease, transform 200ms ease, border-color 160ms ease;
}

.scroll-top-btn.scroll-top-btn--visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  border-color: rgba(255, 255, 255, 0.26);
}

.add-phone-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.add-phone-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.09);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
}

.modal-backdrop.is-hidden {
  display: none;
}

.modal {
  position: relative;
  width: min(420px, 100%);
  max-height: min(90vh, 720px);
  overflow: auto;
  padding: 1.35rem 1.4rem;
  border-radius: 20px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.phone-edit-saving {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 1.5rem;
  border-radius: inherit;
  background: rgba(9, 9, 13, 0.78);
  backdrop-filter: blur(4px);
}

.phone-edit-saving.is-hidden {
  display: none;
}

.phone-edit-saving__spinner {
  width: 2.25rem;
  height: 2.25rem;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: phone-edit-spin 0.65s linear infinite;
}

@keyframes phone-edit-spin {
  to {
    transform: rotate(360deg);
  }
}

.phone-edit-saving__text {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.modal--wide {
  width: min(560px, 100%);
}

.modal-title {
  margin: 0 0 0.75rem;
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.35rem;
}

.modal-status {
  margin: 0 0 1rem;
  min-height: 1.25rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.modal-status.modal-status--error {
  color: #ff9b8a;
}

.modal-label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.modal-label--full {
  grid-column: 1 / -1;
}

.modal-label--checkbox {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  grid-column: 1 / -1;
  font-weight: 600;
}

.modal-label--checkbox input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
}

.modal-input-money {
  display: flex;
  align-items: stretch;
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.modal-input-money__prefix {
  display: flex;
  align-items: center;
  padding: 0.55rem 0.35rem 0.55rem 0.7rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
  user-select: none;
}

.modal-input-money .modal-input--money {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding-left: 0.25rem;
}

.modal-input--date {
  color-scheme: dark;
}

.modal-hint {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}

.modal-field-help {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  opacity: 0.92;
  line-height: 1.35;
}

.modal-hint--error {
  color: #ff9b8a;
}

.phone-edit-image-block {
  grid-column: 1 / -1;
  display: grid;
  gap: 0.45rem;
}

.phone-edit-image-block__title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}

.phone-edit-image-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.phone-edit-image-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.modal-secondary-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  border-radius: 12px;
  padding: 0.5rem 0.85rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.modal-secondary-btn:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
}

.modal-secondary-btn--muted {
  color: var(--muted);
  font-weight: 500;
}

.modal-label--flush {
  margin: 0;
  gap: 0.35rem;
}

.phone-edit-image-preview {
  margin-top: 0.15rem;
}

.phone-edit-image-preview img {
  display: block;
  max-height: 140px;
  max-width: 100%;
  width: auto;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  object-fit: contain;
  background: rgba(0, 0, 0, 0.22);
}

.modal-input,
.modal-textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  padding: 0.55rem 0.7rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
}

.modal-textarea {
  resize: vertical;
  min-height: 4rem;
}

.modal-primary-btn {
  width: 100%;
  margin-top: 0.65rem;
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 0.65rem 1rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  color: #0b0d12;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.modal-close-btn {
  width: 100%;
  margin-top: 0.5rem;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: var(--muted);
  border-radius: 12px;
  padding: 0.55rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.modal-primary-btn:disabled,
.modal-close-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.login-code-panel {
  margin-top: 0.5rem;
}

.phone-edit-form {
  margin: 0;
}

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

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.modal-actions .modal-primary-btn,
.modal-actions .modal-close-btn {
  width: auto;
  flex: 1 1 auto;
  margin-top: 0;
}

.phone-content__footer {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.65rem;
  margin-top: auto;
  flex: 0 0 auto;
  min-height: 0;
}

.phone-content__footer--has-comment {
  justify-content: space-between;
  align-items: flex-end;
}

.phone-content__footer .phone-comment {
  margin-top: 0;
}

.phone-comment--narrow {
  flex: 1 1 auto;
  min-width: 0;
  max-width: min(85%, 50rem);
}

.phone-card__admin {
  flex: 0 0 auto;
}

.phone-edit-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

.phone-edit-btn:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 640px) {
  /* Kommentar + «Rediger» i én rad klemmer teksten på smal viewport – stable vertikalt. */
  .phone-content__footer--has-comment {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.5rem;
  }

  .phone-comment--narrow {
    max-width: 100%;
    width: 100%;
  }

  .phone-card__admin {
    align-self: flex-end;
  }
}

@media (max-width: 520px) {
  .phone-edit-grid {
    grid-template-columns: 1fr;
  }
}

.sort-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.sort-button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  font: inherit;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.sort-button:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.075);
}

.sort-button[aria-pressed="true"] {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.1);
}

.sort-button .sort-arrow {
  display: inline-block;
  margin-left: 0.35rem;
  color: var(--muted);
  font-weight: 800;
}

.phone-list {
  display: grid;
  gap: 1rem;
}

.phone-card {
  position: relative;
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  min-height: 292px;
  height: auto;
  align-items: stretch;
  overflow: hidden;
  scroll-margin-top: 1.25rem;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.phone-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(21, 24, 34, 0.8);
}

.phone-visual {
  position: relative;
  height: 100%;
  min-height: 292px;
  min-width: 0;
  background: white;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.phone-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.04));
  pointer-events: none;
}

.phone-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  z-index: 0;
  opacity: 0.94;
  padding: 1rem;
  transform: scale(1);
  transition: transform 180ms ease, opacity 180ms ease;
}

.phone-image[data-fit="cover"] {
  object-fit: cover;
}

.phone-card:hover .phone-image {
  transform: scale(1.015);
  opacity: 1;
}

.phone-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 1;
  min-width: 4.25rem;
  min-height: 2.25rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-logo-img {
  display: block;
  max-width: 92px;
  max-height: 24px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.brand-logo-img-invert {
  filter: brightness(0) invert(1);
}

.phone-badge-fallback {
  color: white;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.is-hidden {
  display: none;
}

.phone-content {
  position: relative;
  padding: 1.25rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 0;
  min-width: 0;
  flex: 1;
}

.phone-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.phone-brand {
  margin-bottom: 0.2rem;
  color: var(--muted);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.phone-heading h3 {
  margin-bottom: 0;
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.05;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.phone-summary {
  text-align: right;
}

.phone-days {
  margin: 0 0 0.15rem;
  white-space: nowrap;
  font-weight: 800;
  font-size: 1.08rem;
}

.phone-years {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.phone-progress-labels {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.phone-progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.phone-progress-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--brand-accent) 70%, white), var(--brand-accent));
  box-shadow: 0 0 22px color-mix(in srgb, var(--brand-accent) 55%, transparent);
}

.phone-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem 0.85rem;
  margin: 0;
  min-height: 0;
}

.phone-meta > div {
  min-width: 0;
}

.phone-meta dt {
  margin-bottom: 0.28rem;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.phone-meta dd {
  margin: 0;
  font-weight: 600;
}

.price-stack {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.price-original {
  color: var(--text);
}

.price-adjusted {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.phone-comment {
  margin: 0;
  margin-top: auto;
  padding: 0.65rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.035);
  color: #ffd6a7;
  font-size: 0.88rem;
  line-height: 1.35;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  flex: 0 1 auto;
  min-height: 0;
}

@media (max-width: 900px) {
  .stats-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .stats-phones {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .phone-card {
    grid-template-columns: 272px minmax(0, 1fr);
    min-height: 284px;
    height: auto;
  }

  .phone-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .app-shell {
    width: 100%;
    padding: 1rem 0.7rem 2.25rem;
  }

  .stats-main,
  .stats-finance {
    grid-template-columns: 1fr;
  }

  .stats-phones {
    grid-template-columns: 1fr;
  }

  .phone-card {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 0;
  }

  .phone-visual {
    min-height: 260px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .phone-heading,
  .section-header {
    flex-direction: column;
    align-items: start;
  }

  .phone-summary {
    text-align: left;
  }

  .phone-meta {
    grid-template-columns: 1fr;
  }
}
