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

:root {
  --bg: #10131A;
  --surface: #1A1F2B;
  --surface-alt: #222838;
  --border: #2B3142;
  --text: #EEF0F5;
  --text-muted: #8D93A6;
  --indigo: #5B5FEF;
  --indigo-soft: rgba(91, 95, 239, 0.14);
  --mint: #35D399;
  --mint-soft: rgba(53, 211, 153, 0.14);
  --danger: #EF6B6B;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
}

h1, h2, h3, .brand {
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

a { color: inherit; text-decoration: none; }

.mono { font-family: var(--font-mono); }

/* ---------- Top nav ---------- */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 700;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px var(--mint-soft);
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.nav-links a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  padding: 90px 40px 60px;
  max-width: 1100px;
  margin: 0 auto;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--mint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
  display: inline-block;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 700;
  margin: 0 0 20px;
  max-width: 18ch;
}

.hero p {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 52ch;
  margin-bottom: 32px;
}

.hero-actions { display: flex; gap: 14px; }

/* ---------- Status strip (signature element) ---------- */
.status-strip {
  max-width: 1100px;
  margin: 0 auto 70px;
  padding: 0 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.status-cell {
  padding: 24px 28px;
  border-right: 1px solid var(--border);
  background: var(--surface);
}

.status-cell:last-child { border-right: none; }

.status-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.status-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
}

.status-bar {
  margin-top: 12px;
  height: 3px;
  background: var(--surface-alt);
  border-radius: 2px;
  overflow: hidden;
}

.status-bar span {
  display: block;
  height: 100%;
  background: var(--indigo);
  width: 0%;
  transition: width 0.8s ease;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary { background: var(--indigo); color: #fff; }
.btn-primary:hover { background: #6b6ff5; }

.btn-ghost { border-color: var(--border); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--indigo); }

.btn-danger { background: transparent; color: var(--danger); border-color: var(--border); }
.btn-danger:hover { border-color: var(--danger); }

/* ---------- Grid / cards ---------- */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px 80px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 26px;
}

.section-head h2 { font-size: 1.5rem; margin: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.app-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--indigo-soft);
  color: var(--indigo);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 16px;
}

.card h3 { font-size: 1.02rem; margin: 0 0 6px; }
.card p { color: var(--text-muted); font-size: 0.88rem; margin: 0 0 14px; }

.empty-state {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

/* ---------- Photo grid ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.photo-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.photo-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.photo-caption {
  padding: 10px 12px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---------- Admin layout ---------- */
.admin-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 220px;
  border-right: 1px solid var(--border);
  padding: 28px 20px;
  flex-shrink: 0;
}

.sidebar-link {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 4px;
  cursor: pointer;
}

.sidebar-link.active, .sidebar-link:hover {
  background: var(--surface);
  color: var(--text);
}

.admin-content {
  flex: 1;
  padding: 40px;
  max-width: 900px;
}

.panel {
  display: none;
}
.panel.active { display: block; }

.form-row { margin-bottom: 16px; }

.form-row label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-row input, .form-row textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.92rem;
}

.form-row input:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--indigo);
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
}

.list-row-main { display: flex; flex-direction: column; }
.list-row-main span:first-child { font-weight: 500; }
.list-row-main span:last-child { color: var(--text-muted); font-size: 0.82rem; }

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  width: 340px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.login-card h2 { margin-top: 0; }

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 0.88rem;
  opacity: 0;
  transform: translateY(8px);
  transition: all 0.25s ease;
  pointer-events: none;
}

.toast.show { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

@media (max-width: 720px) {
  .topnav, .hero, .section { padding-left: 20px; padding-right: 20px; }
  .status-strip { padding: 0 20px; grid-template-columns: 1fr; }
  .status-cell { border-right: none; border-bottom: 1px solid var(--border); }
  .admin-shell { flex-direction: column; }
  .sidebar { width: auto; border-right: none; border-bottom: 1px solid var(--border); display: flex; gap: 8px; overflow-x: auto; }
}
