:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --surface2: #21253a;
  --border: #2a2d3a;
  --border2: #353a4f;
  --text: #e0e0e0;
  --text2: #9e9e9e;
  --accent: #4fc3f7;
  --accent2: #81d4fa;
  --green: #66bb6a;
  --orange: #ffa726;
  --red: #ef5350;
}

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

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

header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-text {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent);
  text-decoration: none;
}

nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }

nav a {
  color: var(--text2);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
}

nav a:hover, nav a.active { background: var(--surface2); color: var(--accent); }

main { padding: 1.5rem; max-width: 1200px; margin: 0 auto; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.card h2 { font-size: 1rem; margin-bottom: 0.75rem; color: var(--accent); }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }

.stat .label { color: var(--text2); font-size: 0.8rem; text-transform: uppercase; }
.stat .value { font-size: 1.4rem; margin-top: 0.25rem; }

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge.ok { background: rgba(102,187,106,0.15); color: var(--green); }
.badge.warn { background: rgba(255,167,38,0.15); color: var(--orange); }
.badge.err { background: rgba(239,83,80,0.15); color: var(--red); }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 0.65rem 0.5rem; border-bottom: 1px solid var(--border); text-align: left; }
th { color: var(--text2); font-size: 0.75rem; text-transform: uppercase; }

label { display: block; margin-bottom: 0.35rem; font-size: 0.8rem; color: var(--text2); }

input[type=text], input[type=password], input[type=number], input[type=file], select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.btn {
  display: inline-block;
  padding: 0.55rem 1rem;
  background: var(--accent);
  color: #0f1117;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.85rem;
}

.btn.secondary { background: transparent; color: var(--text2); border: 1px solid var(--border2); }
.btn.danger { background: var(--red); color: #fff; }

.alert { padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: 0.9rem; }
.alert.error { background: rgba(239,83,80,0.12); border: 1px solid rgba(239,83,80,0.4); color: #ef9a9a; }
.alert.success { background: rgba(102,187,106,0.12); border: 1px solid rgba(102,187,106,0.4); color: #a5d6a7; }
.alert.info { background: rgba(79,195,247,0.12); border: 1px solid rgba(79,195,247,0.4); color: #81d4fa; }

.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
