@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500;9..144,600&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --black: #0A0A0A;
  --black-soft: #141414;
  --black-warm: #1C1A15;
  --gold: #E8B84A;
  --gold-bright: #F5C851;
  --gold-dim: #8A7333;
  --gold-line: #3A311C;
  --cream: #F5EFE0;
  --cream-dim: #9C9385;
  --muted: #5A544A;
  --line: #2A2620;
}

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

body {
  background-color: var(--black);
  color: var(--cream);
  font-family: 'Inter', system-ui, sans-serif;
  min-height: 100vh;
  padding: 24px;
  -webkit-font-smoothing: antialiased;
}

.font-fraunces {
  font-family: 'Fraunces', serif;
}

.max-w-1400 {
  max-width: 1400px;
  margin: 0 auto;
}

/* Header */
.topbar-admin {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gold-line);
  margin-bottom: 30px;
}

.brand-mark {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 4px 10px;
  margin-right: 12px;
}

/* Cards */
.card-theme {
  background: var(--black-soft);
  border: 1px solid var(--gold-line);
  border-radius: 4px;
  padding: 28px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  position: relative;
}

.card-theme::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gold);
}

.card-title {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  color: var(--cream);
  margin-bottom: 20px;
  font-weight: 400;
}

.card-title em {
  font-style: italic;
  color: var(--gold);
}

/* Stats */
.stat-box {
  background: var(--black);
  border: 1px solid var(--line);
  padding: 20px;
  text-align: center;
  border-radius: 2px;
}

.stat-num {
  font-family: 'Fraunces', serif;
  font-size: 42px;
  color: var(--gold);
  line-height: 1;
  font-weight: 500;
}

.stat-label {
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cream-dim);
  margin-top: 8px;
}

/* Inputs & Controls */
.admin-input, .admin-select {
  background: var(--black);
  border: 1px solid var(--gold-line);
  color: var(--cream);
  padding: 12px 16px;
  font-size: 14px;
  outline: none;
  border-radius: 0;
  transition: border 0.2s;
}

.admin-input:focus, .admin-select:focus {
  border-color: var(--gold);
}

.btn-gold {
  background: var(--gold);
  color: var(--black);
  border: none;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 12px 24px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-gold:hover {
  background: var(--gold-bright);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--gold-line);
  font-size: 13px;
  padding: 10px 20px;
  cursor: pointer;
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

/* Filter Bar */
.filter-bar {
  background: var(--black-warm);
  border: 1px solid var(--gold-line);
  padding: 20px;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* Table */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

table.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.admin-table th {
  background: var(--black-warm);
  color: var(--gold);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 16px;
  border-bottom: 1px solid var(--gold-line);
  text-align: left;
}

table.admin-table td {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  color: var(--cream);
}

table.admin-table tr:hover td {
  background: var(--black-soft);
}

.badge-tag {
  display: inline-block;
  font-size: 11px;
  padding: 4px 8px;
  border: 1px solid var(--gold-line);
  color: var(--gold);
  background: rgba(232, 184, 74, 0.05);
}

.new-row-flash {
  animation: flashGold 2s ease-out;
}

@keyframes flashGold {
  0% { background-color: rgba(232, 184, 74, 0.25) !important; }
  100% { background-color: transparent !important; }
}

/* Login Modal Overlay */
.login-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-box {
  background: var(--black-soft);
  border: 1px solid var(--gold);
  padding: 48px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

/* Tab Navigation */
.admin-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--gold-line);
  padding-bottom: 12px;
}

.tab-btn {
  background: transparent;
  color: var(--cream-dim);
  border: 1px solid transparent;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: var(--gold);
  border-color: var(--gold-line);
}

.tab-btn.active {
  background: rgba(232, 184, 74, 0.1);
  color: var(--gold);
  border-color: var(--gold);
}

/* Event Log Console Terminal */
.log-console {
  background: #050505;
  border: 1px solid var(--gold-line);
  border-radius: 4px;
  padding: 16px;
  font-family: monospace;
  font-size: 13px;
  color: #0ECB81;
  max-height: 260px;
  overflow-y: auto;
  line-height: 1.6;
}

.log-entry {
  border-bottom: 1px dashed rgba(255,255,255,0.05);
  padding: 4px 0;
  display: flex;
  gap: 12px;
}

.log-entry .time { color: var(--gold-dim); }
.log-entry .tag { color: var(--gold); font-weight: bold; }
.log-entry .msg { color: var(--cream); }

.btn-danger {
  background: #E0684A;
  color: #fff;
  border: none;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.2s;
}

.btn-danger:hover {
  background: #ff4d4d;
}

