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

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0a0e1a;
  --bg-panel: #0f1628;
  --bg-card: #141c30;
  --border: #1a2a4c;
  --border-hover: #2a3a5c;
  --text: #c8d0e0;
  --text-muted: #6a7a9a;
  --text-bright: #e8edf5;
  --gold: #c9a84c;
  --gold-dim: #8a7030;
  --accent: #4a8af0;
  --danger: #e04050;
  --success: #40c060;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--text-bright); }

/* --- Nav --- */
.nav {
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-logo {
  font-family: 'Cinzel Decorative', serif;
  font-size: 18px;
  color: var(--gold);
  margin-right: 24px;
  white-space: nowrap;
}
.nav a {
  padding: 8px 16px;
  border-radius: 6px;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s;
}
.nav a:hover, .nav a.active {
  color: var(--text-bright);
  background: rgba(201, 168, 76, 0.1);
}
.nav a.active { color: var(--gold); }

/* --- Layout --- */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}
.page-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 24px;
  color: var(--gold);
  margin-bottom: 20px;
}

/* --- Filters --- */
.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: center;
}
.filters select, .filters input {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
}
.filters select:focus, .filters input:focus {
  border-color: var(--gold-dim);
}
.filters input { flex: 1; min-width: 200px; }
.filter-count {
  color: var(--text-muted);
  font-size: 13px;
  margin-left: auto;
}

/* --- Gallery Grid --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.asset-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}
.asset-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.asset-card .thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--bg);
  display: block;
}
.asset-card .info {
  padding: 10px 12px;
}
.asset-card .info h3 {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-bright);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.asset-card .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
}
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  background: rgba(201,168,76,0.15);
  color: var(--gold);
}
.badge.rejected { background: rgba(224,64,80,0.15); color: var(--danger); }
.badge.approved { background: rgba(64,192,96,0.15); color: var(--success); }

/* --- Asset Detail --- */
.asset-detail {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 32px;
}
@media (max-width: 900px) {
  .asset-detail { grid-template-columns: 1fr; }
}
.asset-image-wrap {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  text-align: center;
}
.asset-image-wrap img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: 6px;
}
.sidebar { display: flex; flex-direction: column; gap: 20px; }

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}
.panel h2 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.field-row:last-child { border-bottom: none; }
.field-label { color: var(--text-muted); }
.field-value { color: var(--text-bright); }

.editable {
  cursor: pointer;
  border-bottom: 1px dashed var(--border-hover);
  padding: 2px 4px;
  border-radius: 3px;
}
.editable:hover { background: rgba(255,255,255,0.05); }

/* --- Forms --- */
input, textarea, select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  width: 100%;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--gold-dim);
}
textarea { resize: vertical; min-height: 80px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-panel);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.btn:hover { border-color: var(--gold-dim); color: var(--text-bright); }
.btn-primary { background: var(--gold); color: #0a0e1a; border-color: var(--gold); }
.btn-primary:hover { background: #d4b55a; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: rgba(224,64,80,0.1); border-color: var(--danger); }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* --- Comments --- */
.comment {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.comment:last-child { border-bottom: none; }
.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.comment-author { font-weight: 600; font-size: 13px; color: var(--text-bright); }
.comment-date { font-size: 11px; color: var(--text-muted); }
.comment-body { font-size: 13px; line-height: 1.5; }
.comment-form { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.comment-form-row { display: flex; gap: 8px; }

/* --- Upload --- */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 48px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 24px;
}
.drop-zone:hover, .drop-zone.active {
  border-color: var(--gold-dim);
  background: rgba(201,168,76,0.05);
}
.drop-zone p { color: var(--text-muted); margin-top: 8px; }
.drop-zone .big { font-size: 18px; color: var(--text); }

.upload-preview {
  max-width: 300px;
  border-radius: 8px;
  margin: 16px auto;
  display: none;
}

.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}

/* --- Toast --- */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-panel);
  border: 1px solid var(--gold-dim);
  color: var(--text-bright);
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  z-index: 1000;
  animation: slideIn 0.3s ease;
}
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } }

/* --- Loading --- */
.loading {
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
}

/* --- Empty --- */
.empty {
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
  font-size: 15px;
}

/* --- Actions bar --- */
.actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
