:root {
  --bg: #050509;
  --bg-alt: #0b0b14;
  --accent: #ffd700;
  --accent-soft: rgba(255,215,0,0.15);
  --border-soft: rgba(255,255,255,0.12);
  --text: #f8f1d4;
  --text-muted: #a89c7a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #1a1205 0, #050509 45%, #000 100%);
  color: var(--text);
  min-height: 100vh;
  display: flex;
}

.app-sidebar {
  width: 250px;
  background: radial-gradient(circle at top left, rgba(255,215,0,0.12), #050509 55%, #000 100%);
  border-right: 1px solid var(--border-soft);
  padding: 1.2rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.app-logo {
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.9rem;
  text-transform: uppercase;
}
.app-logo span {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.app-role {
  margin-top: 0.6rem;
  font-size: 0.75rem;
  color: var(--accent);
}

.nav-section-title {
  margin-top: 1.2rem;
  margin-bottom: 0.4rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.app-nav {
  list-style: none;
  padding: 0;
  margin: 0;
}
.app-nav li {
  margin-bottom: 0.25rem;
}
.app-nav button {
  width: 100%;
  text-align: left;
  padding: 0.45rem 0.65rem;
  border-radius: 0.6rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
}
.app-nav button:hover {
  border-color: var(--accent-soft);
  color: var(--text);
}
.app-nav button.active {
  background: radial-gradient(circle at left, rgba(255,215,0,0.28), transparent 60%);
  border-color: rgba(255,215,0,0.6);
  color: #2a1c07;
}

.sidebar-footer {
  margin-top: 1.2rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-soft);
  padding-top: 0.6rem;
}

.app-main {
  flex: 1;
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
}
.app-topbar h1 {
  margin: 0;
  font-size: 1.25rem;
}
.app-topbar p {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.app-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pill {
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--accent-soft);
  background: rgba(0,0,0,0.5);
  font-size: 0.75rem;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #ffe7a0, #b8860b);
  border: 1px solid rgba(255,255,255,0.3);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(160px,1fr));
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.stat-card {
  padding: 0.65rem 0.7rem;
  border-radius: 0.9rem;
  background: radial-gradient(circle at top, rgba(255,215,0,0.18), rgba(2,2,10,0.98));
  border: 1px solid rgba(255,215,0,0.35);
  box-shadow: 0 0 18px rgba(0,0,0,0.6);
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.stat-value {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 0.2rem;
}
.stat-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.panels-row {
  display: grid;
  grid-template-columns: minmax(0,1.4fr) minmax(0,1fr);
  gap: 0.8rem;
}

.panel {
  background: radial-gradient(circle at top, rgba(255,215,0,0.08), rgba(3,3,12,0.98));
  border-radius: 1rem;
  border: 1px solid var(--border-soft);
  padding: 0.75rem 0.8rem 0.85rem;
  box-shadow: 0 0 20px rgba(0,0,0,0.7);
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.5rem;
}
.panel-header h2 {
  margin: 0;
  font-size: 0.95rem;
}
.panel-header span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}
.table thead tr {
  background: rgba(255,255,255,0.02);
}
.table th, .table td {
  padding: 0.28rem 0.35rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.table th {
  text-align: left;
  font-weight: 500;
  color: var(--text-muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(255,215,0,0.65);
  background: radial-gradient(circle at top, #ffe38c, #d19b15);
  color: #2b1904;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 0 18px rgba(255,215,0,0.35);
}
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.badge-result {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,215,0,0.5);
  font-size: 0.78rem;
}

.form-field {
  margin-bottom: 0.6rem;
  font-size: 0.78rem;
}
.form-field label {
  display: block;
  margin-bottom: 0.2rem;
}
.form-field input,
.form-field select {
  width: 100%;
  padding: 0.35rem 0.45rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(0,0,0,0.7);
  color: var(--text);
  font-size: 0.78rem;
}
.form-hint {
  font-size: 0.7rem;
  color: var(--text-muted);
}
