/* Zen Dhandho Production Hub — design system
   Matches zendhandho.com brand: deep forest, gold, cream.
   Cormorant Garamond headings (300). Jost body (300).
   Dark mode only. */

:root {
  --zd-bg-deep: #0B1A0E;
  --zd-bg-dark: #0f2014;
  --zd-bg-mid: #162b1a;
  --zd-bg-card: #14261a;
  --zd-border: rgba(200, 164, 40, 0.18);
  --zd-border-strong: rgba(200, 164, 40, 0.42);
  --zd-gold: #C8A428;
  --zd-gold-alt: #c9a84c;
  --zd-gold-muted: #8A7A58;
  --zd-cream: #F0E4C0;
  --zd-cream-dim: #e6d9b0;
  --zd-red: #c24a3a;
  --zd-green: #4a7c28;
  --zd-green-light: #6aa13f;
  --zd-gray: #4a4a4a;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-card: 0 2px 14px rgba(0, 0, 0, 0.35);
  --shadow-elevated: 0 8px 32px rgba(0, 0, 0, 0.55);
  --transition: 180ms ease;
  --font-heading: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-body: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--zd-bg-deep);
  color: var(--zd-gold-muted);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--zd-gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--zd-gold-alt); }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 300;
  color: var(--zd-cream);
  margin: 0 0 0.5em 0;
  line-height: 1.15;
}
h1 { font-size: 2.4rem; letter-spacing: 0.5px; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.35rem; color: var(--zd-cream-dim); }
h4 { font-size: 1.1rem; color: var(--zd-gold-alt); }

p { margin: 0 0 1em 0; }
code, pre { font-family: var(--font-mono); font-size: 0.85em; color: var(--zd-cream-dim); }
pre { background: var(--zd-bg-dark); padding: 12px 14px; border-radius: var(--radius-sm); overflow-x: auto; border: 1px solid var(--zd-border); }

/* ─── Nav ──────────────────────────────────────────── */

#nav {
  background: var(--zd-bg-dark);
  border-bottom: 1px solid var(--zd-border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  color: var(--zd-cream);
  margin-right: 36px;
}
.nav-brand:hover { color: var(--zd-cream); }
.brand-mark {
  color: var(--zd-gold);
  font-size: 1.6rem;
  line-height: 1;
}
.brand-sub {
  font-size: 0.85em;
  color: var(--zd-gold-muted);
  font-style: italic;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
  flex: 1;
}
.nav-links a {
  display: block;
  padding: 8px 16px;
  color: var(--zd-gold-muted);
  font-size: 0.95rem;
  letter-spacing: 0.3px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.nav-links a:hover { background: var(--zd-bg-mid); color: var(--zd-cream-dim); }
.nav-links a.active { background: var(--zd-bg-mid); color: var(--zd-gold); }

.nav-status { display: flex; align-items: center; }
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.status-ok { background: var(--zd-green-light); box-shadow: 0 0 6px var(--zd-green-light); }
.status-fail { background: var(--zd-red); box-shadow: 0 0 6px var(--zd-red); }
.status-unknown { background: var(--zd-gray); }

/* ─── Main content ─────────────────────────────────── */

#app {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 28px;
}

.loading-shell {
  color: var(--zd-gold-muted);
  font-style: italic;
  padding: 100px 0;
  text-align: center;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--zd-border);
}
.page-header-actions { display: flex; gap: 10px; }

.page-lead { color: var(--zd-gold-muted); max-width: 64ch; margin-top: 4px; }

/* ─── Cards + surfaces ─────────────────────────────── */

.card {
  background: var(--zd-bg-card);
  border: 1px solid var(--zd-border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-card);
  transition: border-color var(--transition);
}
.card:hover { border-color: var(--zd-border-strong); }
.card h3 { margin-top: 0; }

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

.stat-card {
  background: var(--zd-bg-card);
  border: 1px solid var(--zd-border);
  border-radius: var(--radius);
  padding: 18px 22px;
}
.stat-card .stat-label { font-size: 0.82rem; color: var(--zd-gold-muted); text-transform: uppercase; letter-spacing: 1px; }
.stat-card .stat-value { font-family: var(--font-heading); font-size: 2.2rem; color: var(--zd-cream); margin-top: 4px; }
.stat-card .stat-sub { font-size: 0.85rem; color: var(--zd-gold-muted); margin-top: 4px; }

/* ─── Forms ────────────────────────────────────────── */

.form-row { margin-bottom: 18px; }
.form-row label { display: block; color: var(--zd-cream-dim); margin-bottom: 6px; font-size: 0.9rem; letter-spacing: 0.3px; }
.form-row small { color: var(--zd-gold-muted); font-size: 0.82rem; display: block; margin-top: 4px; }

input[type="text"], input[type="password"], input[type="number"], input[type="email"],
textarea, select {
  width: 100%;
  background: var(--zd-bg-dark);
  border: 1px solid var(--zd-border);
  border-radius: var(--radius-sm);
  color: var(--zd-cream-dim);
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition);
}
textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--zd-gold);
}

button, .btn {
  background: var(--zd-bg-mid);
  color: var(--zd-gold);
  border: 1px solid var(--zd-border-strong);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
button:hover:not(:disabled), .btn:hover:not(:disabled) { background: var(--zd-bg-card); color: var(--zd-gold-alt); border-color: var(--zd-gold); }
button:disabled, .btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary { background: var(--zd-gold); color: var(--zd-bg-deep); border-color: var(--zd-gold); font-weight: 500; }
.btn-primary:hover:not(:disabled) { background: var(--zd-gold-alt); color: var(--zd-bg-deep); }
.btn-danger { color: var(--zd-red); border-color: rgba(194, 74, 58, 0.4); }
.btn-danger:hover:not(:disabled) { background: rgba(194, 74, 58, 0.15); color: var(--zd-red); border-color: var(--zd-red); }

/* ─── Tables ───────────────────────────────────────── */

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--zd-bg-card);
  border: 1px solid var(--zd-border);
  border-radius: var(--radius);
  overflow: hidden;
}
th, td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--zd-border);
}
th { color: var(--zd-cream-dim); font-weight: 400; letter-spacing: 0.3px; font-size: 0.88rem; text-transform: uppercase; background: var(--zd-bg-mid); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--zd-bg-mid); }

/* ─── Badges / pills ───────────────────────────────── */

.pill {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.78rem;
  border-radius: 999px;
  border: 1px solid var(--zd-border);
  color: var(--zd-gold-muted);
  background: transparent;
  letter-spacing: 0.3px;
}
.pill-gold { border-color: var(--zd-gold); color: var(--zd-gold); }
.pill-green { border-color: var(--zd-green-light); color: var(--zd-green-light); }
.pill-red { border-color: var(--zd-red); color: var(--zd-red); }
.pill-mythic { border-color: rgba(200, 164, 40, 0.5); color: var(--zd-gold); background: rgba(200, 164, 40, 0.08); }
.pill-educational { border-color: rgba(106, 161, 63, 0.5); color: var(--zd-green-light); background: rgba(106, 161, 63, 0.08); }

/* ─── Upload dropzone ──────────────────────────────── */

.dropzone {
  border: 2px dashed var(--zd-border-strong);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  color: var(--zd-gold-muted);
  transition: all var(--transition);
  cursor: pointer;
  background: var(--zd-bg-dark);
}
.dropzone:hover, .dropzone.dragover { border-color: var(--zd-gold); background: var(--zd-bg-mid); color: var(--zd-cream-dim); }
.dropzone-prompt { font-family: var(--font-heading); font-size: 1.3rem; color: var(--zd-cream); margin-bottom: 6px; }

/* ─── Asset grid / thumbnails ──────────────────────── */

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.asset-thumb {
  background: var(--zd-bg-card);
  border: 1px solid var(--zd-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
}
.asset-thumb:hover { border-color: var(--zd-gold); transform: translateY(-2px); box-shadow: var(--shadow-elevated); }
.asset-thumb-img { width: 100%; aspect-ratio: 1 / 1; background: var(--zd-bg-dark) center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: var(--zd-gold-muted); }
.asset-thumb-img video { width: 100%; height: 100%; object-fit: cover; }
.asset-thumb-meta { padding: 8px 10px; font-size: 0.82rem; color: var(--zd-gold-muted); border-top: 1px solid var(--zd-border); }
.asset-thumb-meta strong { color: var(--zd-cream-dim); font-weight: 400; }

/* ─── Progress bar ─────────────────────────────────── */

.progress {
  width: 100%;
  height: 8px;
  background: var(--zd-bg-dark);
  border: 1px solid var(--zd-border);
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--zd-gold) 0%, var(--zd-gold-alt) 100%);
  transition: width 400ms ease;
}
.progress-bar.indeterminate {
  width: 30% !important;
  animation: progress-slide 1.5s infinite ease-in-out;
}
@keyframes progress-slide {
  0% { margin-left: -30%; }
  100% { margin-left: 100%; }
}

/* ─── Toasts ───────────────────────────────────────── */

#toast-root {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
}
.toast {
  background: var(--zd-bg-card);
  border: 1px solid var(--zd-border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: var(--zd-cream-dim);
  box-shadow: var(--shadow-elevated);
  max-width: 380px;
  animation: toast-in 200ms ease;
}
.toast-success { border-left: 3px solid var(--zd-green-light); }
.toast-error { border-left: 3px solid var(--zd-red); }
.toast-info { border-left: 3px solid var(--zd-gold); }
@keyframes toast-in { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ─── Filter bar ───────────────────────────────────── */

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 16px;
  background: var(--zd-bg-card);
  border: 1px solid var(--zd-border);
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.filter-bar input, .filter-bar select { width: auto; min-width: 160px; }

/* ─── Utility ──────────────────────────────────────── */

.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-muted { color: var(--zd-gold-muted); }
.text-cream { color: var(--zd-cream); }
.text-gold { color: var(--zd-gold); }
.text-right { text-align: right; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; }
.full-width { width: 100%; }
.mono { font-family: var(--font-mono); font-size: 0.88em; }
.empty-state { padding: 60px 24px; text-align: center; color: var(--zd-gold-muted); }
.empty-state .empty-title { font-family: var(--font-heading); color: var(--zd-cream); font-size: 1.3rem; margin-bottom: 8px; }

/* ─── Responsive ───────────────────────────────────── */

@media (max-width: 780px) {
  #nav { padding: 0 16px; height: auto; flex-wrap: wrap; padding: 10px 16px; }
  .nav-links { order: 3; width: 100%; margin-top: 10px; overflow-x: auto; flex-wrap: nowrap; }
  .nav-links a { white-space: nowrap; }
  #app { padding: 20px 14px; }
  h1 { font-size: 1.9rem; }
}
