:root {
  --bg: #090f1d;
  --surface: #0f1a2c;
  --surface-soft: #13223a;
  --ink: #f4f8ff;
  --muted: #b9c8df;
  --muted-soft: #8ea3c3;
  --accent: #ff5a1f;
  --accent-strong: #ff7f4f;
  --teal: #27d6ba;
  --teal-soft: rgba(39, 214, 186, 0.14);
  --line: rgba(173, 194, 226, 0.24);
  --line-soft: rgba(173, 194, 226, 0.16);
  --warning: #b54708;
  --shadow: 0 24px 48px rgba(2, 8, 24, 0.45);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 90, 31, 0.25), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(39, 214, 186, 0.21), transparent 30%),
    linear-gradient(180deg, #090f1d 0%, #0b1324 36%, #0f1b31 100%);
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell,
.detail-shell {
  width: min(1360px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 28px 0 100px;
}

.topbar {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  margin-bottom: 22px;
  border-radius: 999px;
  background: rgba(9, 15, 29, 0.66);
  border: 1px solid rgba(173, 194, 226, 0.22);
  box-shadow: 0 20px 36px rgba(1, 7, 20, 0.48);
  backdrop-filter: blur(12px);
}

.topbar-brand,
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-brand {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #f5f9ff;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(255, 106, 61, 0.18);
}

.topbar-nav a {
  color: #d4e2f8;
  text-decoration: none;
  font-weight: 700;
}

.topbar-button {
  padding: 9px 14px;
}

.hero,
.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.88fr);
  gap: 18px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.dashboard-section,
.category-block,
.dialog-card,
.detail-copy,
.detail-thumb-wrap,
.detail-meta {
  background: linear-gradient(160deg, rgba(16, 30, 52, 0.96), rgba(12, 23, 40, 0.96));
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-copy,
.detail-copy {
  padding: 34px;
}

.hero-copy {
  min-height: 560px;
  background:
    radial-gradient(circle at 10% 16%, rgba(255, 90, 31, 0.26), transparent 38%),
    radial-gradient(circle at 88% 80%, rgba(39, 214, 186, 0.2), transparent 34%),
    linear-gradient(160deg, rgba(20, 34, 58, 0.97), rgba(11, 21, 37, 0.98));
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(270px, 390px);
  gap: 16px;
  align-items: center;
}

.hero-copy-main {
  position: relative;
  z-index: 2;
}

.hero-figure {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100%;
}

.hero-figure-shell {
  width: 100%;
  max-width: 370px;
  aspect-ratio: 1;
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 48%, rgba(39, 214, 186, 0.3), rgba(39, 214, 186, 0.03) 56%, transparent 78%),
    linear-gradient(180deg, rgba(24, 39, 63, 0.94), rgba(16, 28, 47, 0.94));
  border: 1px solid rgba(173, 194, 226, 0.22);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero-orbit {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.orbit-text {
  position: absolute;
  inset: -2% 3% 8% 3%;
  width: 94%;
  height: 94%;
  z-index: 3;
  pointer-events: none;
  animation: orbit-spin 18s linear infinite;
  filter: drop-shadow(0 0 12px rgba(39, 214, 186, 0.22));
}

.orbit-text text {
  font-family: "Manrope", sans-serif;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  fill: rgba(231, 241, 255, 0.84);
  stroke: rgba(39, 214, 186, 0.16);
  stroke-width: 0.35px;
}

.hero-portrait-wrap {
  position: relative;
  width: 90%;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: end center;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 90, 31, 0.34), rgba(255, 90, 31, 0.06) 60%),
    linear-gradient(180deg, rgba(31, 49, 79, 0.96), rgba(20, 34, 58, 0.94));
  box-shadow:
    inset 0 0 0 1px rgba(173, 194, 226, 0.32),
    0 28px 42px rgba(2, 8, 24, 0.54);
  overflow: hidden;
  z-index: 2;
}

.hero-portrait {
  width: 194%;
  max-width: none;
  transform: translateX(1%) translateY(8%);
  filter: drop-shadow(0 30px 36px rgba(2, 8, 24, 0.62));
}

.hero-panel {
  padding: 24px;
  display: grid;
  gap: 22px;
}

.eyebrow {
  margin: 0 0 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.74rem;
  color: #ffb39a;
  font-weight: 900;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.03em;
}

h1 {
  font-family: "Fraunces", serif;
  font-size: clamp(3rem, 5.2vw, 5.5rem);
  line-height: 0.9;
  max-width: 12.2ch;
  color: #fbfdff;
  text-wrap: balance;
}

h2 {
  font-size: 1.72rem;
}

h3 {
  font-size: 1.15rem;
}

.hero-text,
.section-head p,
.detail-copy p,
.category-meta,
.card-description,
.panel-note,
.section-summary,
.mono {
  color: var(--muted);
}

.hero-text {
  max-width: 62ch;
  font-size: 1.04rem;
  color: #c9d8ef;
}

.hero-actions,
.card-actions,
.card-footer,
.dialog-actions,
.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-actions {
  margin-top: 26px;
}

.hero-status {
  display: grid;
  gap: 10px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-soft);
}

.status-kicker {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-soft);
  font-weight: 900;
}

.status-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--muted);
}

.status-line strong {
  color: #fbfdff;
}

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

.metric-card {
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(19, 34, 58, 0.96), rgba(15, 28, 48, 0.96));
  border: 1px solid var(--line-soft);
  display: grid;
  gap: 8px;
}

.metric-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-soft);
  font-weight: 900;
}

.metric-card strong {
  font-size: 2rem;
  line-height: 1;
}

.toolbar {
  justify-content: space-between;
  margin: 26px 0 26px;
}

.toolbar-main,
.toolbar-side,
.search-wrap {
  display: grid;
  gap: 12px;
}

.toolbar-main {
  flex: 1 1 760px;
}

.toolbar-side {
  justify-items: end;
  min-width: 220px;
}

.search-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-soft);
  font-weight: 900;
}

.search-input-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.search-input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 15px 18px;
  background: rgba(10, 18, 32, 0.75);
  color: #f4f8ff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.24);
}

.search-input::placeholder {
  color: var(--muted-soft);
}

.search-clear {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(10, 18, 32, 0.75);
  color: #d6e4f8;
  padding: 14px 16px;
  cursor: pointer;
}

.search-results-summary {
  font-size: 0.88rem;
  color: var(--muted);
  text-align: right;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-pill,
.ghost-button,
.primary-button,
.primary-link,
.mini-link,
.back-link {
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 11px 16px;
  text-decoration: none;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.category-pill,
.ghost-button,
.mini-link,
.back-link {
  background: rgba(10, 18, 32, 0.75);
  color: #ecf3ff;
}

.category-pill:hover,
.ghost-button:hover,
.primary-button:hover,
.primary-link:hover,
.mini-link:hover,
.back-link:hover {
  transform: translateY(-1px);
}

.primary-button,
.primary-link {
  background: linear-gradient(135deg, #ff4f16, #ff8a5c 54%, #ffc08d);
  color: #fff;
  border-color: transparent;
  font-weight: 800;
}

.delete-button {
  color: #b42318;
  border-color: rgba(180, 35, 24, 0.22);
  background: rgba(254, 243, 242, 0.96);
}

.dashboard-section {
  padding: 24px;
  margin-top: 20px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 18px;
}

.section-summary {
  font-size: 0.94rem;
  max-width: 52ch;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
}

.category-entries {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.entry-card {
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  background: linear-gradient(165deg, rgba(18, 31, 53, 0.98), rgba(14, 26, 44, 0.98));
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.entry-card:hover {
  transform: translateY(-4px);
  border-color: rgba(39, 214, 186, 0.46);
  box-shadow: 0 22px 34px rgba(2, 8, 24, 0.46);
}

.entry-media {
  position: relative;
}

.entry-card img.card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--line-soft);
  background: #102037;
}

.thumbnail-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 999px;
  background: rgba(255, 239, 226, 0.95);
  color: #8f3400;
  border: 1px solid rgba(181, 71, 8, 0.2);
}

.card-topline,
.category-meta,
.lock-note {
  font-size: 0.84rem;
}

.card-topline {
  color: #79f3e0;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.card-title {
  font-size: 1.16rem;
  line-height: 1.2;
  color: #f9fcff;
}

.card-description {
  min-height: 2.8em;
  margin: 0;
}

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

.qr-overlay {
  position: absolute;
  bottom: 12px;
  left: 12px;
  width: 70px;
  height: 70px;
  padding: 4px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  z-index: 10;
}

.entry-media:hover .qr-overlay {
  transform: scale(1.15);
}

.qr-image {
  width: 100%;
  height: 100%;
  display: block;
}

.categories-root {
  display: grid;
  gap: 18px;
}

.category-block {
  padding: 24px;
}

.category-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.category-count {
  padding: 9px 12px;
  border-radius: 999px;
  background: var(--teal-soft);
  border: 1px solid rgba(15, 118, 110, 0.14);
  color: #7af7e4;
  font-weight: 800;
}

.dialog {
  border: 0;
  padding: 0;
  background: transparent;
}

.dialog::backdrop {
  background: rgba(14, 26, 43, 0.44);
  backdrop-filter: blur(6px);
}

.dialog-card {
  width: min(560px, calc(100vw - 24px));
  padding: 24px;
  display: grid;
  gap: 14px;
}

.dialog-card.wide {
  width: min(760px, calc(100vw - 24px));
}

.admin-stack {
  gap: 24px;
  max-height: min(88vh, 980px);
  overflow: auto;
}

.admin-form {
  display: grid;
  gap: 14px;
}

.admin-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.admin-form-secondary {
  padding-top: 22px;
  border-top: 1px solid var(--line-soft);
}

.dialog-card label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.dialog-card input,
.dialog-card select,
.dialog-card textarea {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(8, 15, 28, 0.72);
  color: #f4f8ff;
}

.checkbox-row {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.sticky-actions {
  position: sticky;
  bottom: -24px;
  padding-top: 16px;
  padding-bottom: 4px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.98) 26%);
}

.close-x {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(8, 15, 28, 0.72);
  color: #f4f8ff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.secret-trigger {
  position: fixed;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  opacity: 0.01;
  border: 0;
  background: transparent;
  z-index: 50;
}

.detail-thumb-wrap,
.detail-meta {
  padding: 24px;
}

.detail-thumb {
  border-radius: 18px;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.detail-meta {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  align-items: center;
}

.detail-qr {
  width: min(320px, 100%);
  border-radius: 22px;
  border: 1px solid var(--line);
  background: #ffffff;
  padding: 14px;
}

.detail-lock {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(181, 71, 8, 0.08);
  color: var(--warning);
}

.back-link {
  display: inline-flex;
  margin-bottom: 24px;
}

.dialog-card h3,
.dialog-card p,
.section-head h2,
.category-head h2,
.search-results-summary,
.category-meta,
.panel-note,
.status-line,
.metric-label,
.lock-note {
  color: #d4e2f8;
}

@keyframes orbit-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 980px) {
  .hero,
  .detail-hero,
  .detail-meta,
  .section-head,
  .category-head,
  .toolbar {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .app-shell,
  .detail-shell {
    width: min(100vw - 20px, 1000px);
    padding-top: 20px;
  }

  .topbar {
    border-radius: 24px;
    align-items: start;
    flex-direction: column;
  }

  .hero-layout {
    grid-template-columns: 1fr;
  }

  h1 {
    max-width: 100%;
  }

  .hero-figure {
    order: -1;
    min-height: auto;
    padding-bottom: 8px;
  }

  .hero-figure-shell {
    max-width: 320px;
  }

  .orbit-text text {
    font-size: 14px;
  }

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

  .toolbar-side {
    justify-items: stretch;
  }

  .search-results-summary {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .card-grid,
  .category-entries,
  .metrics-grid {
    grid-template-columns: 1fr;
  }

  .search-input-wrap {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-panel,
  .dashboard-section,
  .category-block {
    padding: 18px;
  }

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