:root {
  --ink: #14181f;
  --ink-soft: #3d4654;
  --steel: #2f5b8a;
  --steel-deep: #1e3f63;
  --mist: #e8eef5;
  --paper: #f4f7fb;
  --line: rgba(20, 24, 31, 0.08);
  --shadow: 0 18px 50px rgba(20, 24, 31, 0.1);
  --radius: 18px;
  --font-display: "Outfit", sans-serif;
  --font-body: "Source Sans 3", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-body);
  background: var(--paper);
  overflow-x: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(47, 91, 138, 0.18), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(30, 63, 99, 0.12), transparent 55%),
    linear-gradient(180deg, #f7fafc 0%, #eef3f8 48%, #e7eef6 100%);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(20, 24, 31, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 24, 31, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem clamp(1.2rem, 4vw, 3rem);
  backdrop-filter: blur(14px);
  background: rgba(244, 247, 251, 0.78);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}

.brand img {
  display: block;
  border-radius: 8px;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

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

.nav-link {
  position: relative;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover {
  color: var(--ink);
  background: rgba(47, 91, 138, 0.08);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0.95rem;
  right: 0.95rem;
  bottom: 0.35rem;
  height: 2px;
  border-radius: 2px;
  background: var(--steel);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: clamp(2rem, 6vh, 4.5rem) clamp(1.2rem, 4vw, 3rem) 2rem;
}

.brand-lockup {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  letter-spacing: -0.045em;
  line-height: 0.95;
  color: var(--ink);
  animation: rise 0.7s ease both;
}

.hero h1 {
  margin: 0;
  max-width: 16ch;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--ink-soft);
  animation: rise 0.7s ease 0.08s both;
}

.lede {
  margin: 1.1rem 0 0;
  max-width: 38ch;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink-soft);
  animation: rise 0.7s ease 0.16s both;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
  animation: rise 0.7s ease 0.24s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--steel) 0%, var(--steel-deep) 100%);
  box-shadow: 0 10px 28px rgba(47, 91, 138, 0.28);
}

.btn-ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}

.hero-visual {
  display: grid;
  place-items: center;
  min-height: 320px;
  animation: rise 0.9s ease 0.12s both;
}

.shaft {
  position: relative;
  width: min(320px, 70vw);
  height: min(420px, 58vh);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.75), rgba(232, 238, 245, 0.9)),
    repeating-linear-gradient(
      180deg,
      transparent 0 26px,
      rgba(47, 91, 138, 0.06) 26px 27px
    );
  border: 1px solid rgba(47, 91, 138, 0.12);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.rail {
  position: absolute;
  top: 8%;
  bottom: 8%;
  width: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, #9bb4cc, #2f5b8a 45%, #1e3f63);
}

.rail-l {
  left: 18%;
}
.rail-r {
  right: 18%;
}

.cabin {
  position: absolute;
  left: 28%;
  right: 28%;
  height: 22%;
  border-radius: 14px;
  background: linear-gradient(160deg, #fff 0%, #d7e3ef 100%);
  border: 1px solid rgba(30, 63, 99, 0.18);
  box-shadow: 0 12px 30px rgba(30, 63, 99, 0.18);
  animation: ride 4.8s ease-in-out infinite;
}

.pulse {
  position: absolute;
  left: 50%;
  top: 12%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: var(--steel);
  box-shadow: 0 0 0 0 rgba(47, 91, 138, 0.45);
  animation: ping 2.4s ease-out infinite;
}

.store {
  padding: 1rem clamp(1.2rem, 4vw, 3rem) 4.5rem;
}

.store-head {
  margin-bottom: 1.4rem;
}

.store-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.03em;
}

.store-head p {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
}

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

.module {
  display: grid;
  grid-template-rows: 160px auto;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(20, 24, 31, 0.05);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.module:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 91, 138, 0.25);
  box-shadow: var(--shadow);
}

.module-art {
  position: relative;
  background: #d9e5f1;
}

.module-art-ps {
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.85), transparent 45%),
    linear-gradient(135deg, #2f5b8a, #1e3f63 55%, #0f2438);
}

.module-art-td {
  background:
    radial-gradient(circle at 70% 35%, rgba(255, 255, 255, 0.7), transparent 40%),
    linear-gradient(145deg, #4a6f8f, #24384f 60%, #152433);
}

.module-art::after {
  content: "";
  position: absolute;
  inset: 18% 22%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.02));
}

.module-body {
  padding: 1.15rem 1.2rem 1.3rem;
}

.module-body h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.module-tag {
  margin: 0.35rem 0 0;
  color: var(--steel);
  font-weight: 700;
  font-size: 0.86rem;
}

.module-desc {
  margin: 0.65rem 0 1rem;
  color: var(--ink-soft);
  line-height: 1.45;
  font-size: 0.98rem;
}

.module-cta {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--steel-deep);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 1.25rem clamp(1.2rem, 4vw, 3rem) 2rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.footer-alt {
  opacity: 0.85;
}

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

@keyframes ride {
  0%,
  100% {
    top: 58%;
  }
  50% {
    top: 18%;
  }
}

@keyframes ping {
  0% {
    box-shadow: 0 0 0 0 rgba(47, 91, 138, 0.45);
  }
  70% {
    box-shadow: 0 0 0 18px rgba(47, 91, 138, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(47, 91, 138, 0);
  }
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 2.2rem;
  }

  .hero-visual {
    order: -1;
    min-height: 240px;
  }

  .shaft {
    height: 260px;
  }

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

@media (max-width: 520px) {
  .nav-link {
    padding: 0.45rem 0.7rem;
    font-size: 0.88rem;
  }

  .cta-row {
    width: 100%;
  }

  .btn {
    flex: 1 1 auto;
  }
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.nav-auth {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: 0.4rem;
}

.nav-user {
  color: var(--ink-soft);
  font-size: 0.92rem;
  padding: 0 0.4rem;
}

.btn-nav {
  padding: 0.45rem 0.9rem !important;
  font-size: 0.9rem !important;
}

.btn-link {
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
}

.auth-wrap,
.admin-wrap {
  width: min(1080px, calc(100% - 2rem));
  margin: 2rem auto 4rem;
}

.auth-wrap {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 140px);
}

.auth-card {
  width: min(440px, 100%);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.6rem 1.5rem 1.4rem;
  display: grid;
  gap: 0.75rem;
}

.auth-card h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.6rem;
}

.auth-hint {
  margin: 0 0 0.4rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.auth-card label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.auth-card input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  font: inherit;
  background: #fff;
}

.auth-error {
  color: #b42318;
  margin: 0;
  font-size: 0.92rem;
}

.auth-ok {
  color: #027a48;
  margin: 0;
  font-size: 0.92rem;
}

.auth-foot {
  margin: 0.2rem 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.auth-meta p {
  margin: 0.35rem 0;
}

.admin-head h1 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
}

.admin-head p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.chip {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  font: inherit;
}

.chip.active {
  background: var(--steel);
  border-color: var(--steel);
  color: #fff;
}

.admin-table-wrap {
  overflow: auto;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-size: 0.94rem;
}

.admin-table th {
  background: rgba(232, 238, 245, 0.7);
  font-weight: 700;
}

.admin-table .empty {
  text-align: center;
  color: var(--ink-soft);
  padding: 2rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.btn-tiny {
  padding: 0.35rem 0.65rem !important;
  font-size: 0.82rem !important;
  border-radius: 10px !important;
}

.btn-danger {
  background: #b42318 !important;
  color: #fff !important;
  border-color: #b42318 !important;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: #eef2f6;
}

.badge-pending {
  background: #fff4de;
  color: #b54708;
}

.badge-approved {
  background: #e8f8ef;
  color: #027a48;
}

.badge-rejected {
  background: #feeceb;
  color: #b42318;
}

.muted {
  color: var(--ink-soft);
}

.is-hidden {
  display: none !important;
}

.btn-logout {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
}

.btn-logout:hover {
  border-color: var(--steel);
  color: var(--steel);
}
