:root {
  --bg: #0f1420;
  --panel: #171d2b;
  --border: #2a3142;
  --text: #e6e9f0;
  --muted: #8b93a7;
  --accent: #4f8cff;
  --accent-hover: #6ea0ff;
  --ok: #3ecf8e;
  --warn: #f0b429;
  --err: #f0554f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.topbar a { color: var(--text); text-decoration: none; margin-right: 16px; font-weight: 500; }
.topbar a:hover { color: var(--accent-hover); }

.container { max-width: 100%; margin: 0; padding: 24px 40px; }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
}

h1 { font-size: 22px; margin-top: 0; }
h2 { font-size: 17px; color: var(--muted); font-weight: 600; }

label { display: block; margin: 12px 0 4px; font-size: 13px; color: var(--muted); }

input[type=text], input[type=password], input[type=file], select {
  width: 100%;
  padding: 9px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #10151f;
  color: var(--text);
  font-size: 14px;
}

button, .btn {
  display: inline-block;
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  margin-top: 16px;
}
button:hover, .btn:hover { background: var(--accent-hover); }
.btn-secondary { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-danger { background: var(--err); }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
th { color: var(--muted); font-weight: 600; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.badge-ok { background: rgba(62,207,142,0.15); color: var(--ok); }
.badge-warn { background: rgba(240,180,41,0.15); color: var(--warn); }
.badge-err { background: rgba(240,85,79,0.15); color: var(--err); }

.stats { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.stat { background: #10151f; border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; min-width: 120px; }
.stat .num { font-size: 20px; font-weight: 700; }
.stat .label { font-size: 12px; color: var(--muted); }

.reason { font-size: 11px; color: var(--muted); max-width: 220px; white-space: normal; }
.error-box { background: rgba(240,85,79,0.1); border: 1px solid var(--err); color: var(--err); padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; }
.table-scroll { overflow-x: auto; }
