:root {
  --bg: #0f1420;
  --panel: #171d2e;
  --panel-2: #1e2538;
  --border: #2a3350;
  --text: #e7eaf3;
  --muted: #8a93ab;
  --accent: #4f7cff;
  --accent-2: #3a5fd9;
  --green: #2fb380;
  --red: #e5584a;
  --amber: #d9a441;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

a { color: var(--accent); text-decoration: none; }

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

.topbar .brand { font-weight: 700; font-size: 15px; }
.topbar nav a { margin-right: 18px; color: var(--muted); font-size: 14px; }
.topbar nav a.active, .topbar nav a:hover { color: var(--text); }
.topbar .logout { color: var(--muted); font-size: 13px; cursor: pointer; }

.container { max-width: 1100px; margin: 0 auto; padding: 24px; }

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

h1 { font-size: 20px; margin: 0 0 16px; }
h2 { font-size: 16px; margin: 0 0 12px; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { background: var(--accent-2); }
.btn.secondary { background: var(--panel-2); color: var(--text); border: 1px solid var(--border); }
.btn.danger { background: var(--red); }
.btn.success { background: var(--green); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

input, select, textarea {
  width: 100%;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
  margin-bottom: 10px;
}
textarea { font-family: inherit; }
label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 4px; }

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

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge.generating { background: #3a3f55; color: var(--muted); }
.badge.pending_review { background: #4a3c1e; color: var(--amber); }
.badge.approved { background: #1e4a38; color: var(--green); }
.badge.synced { background: #1e3a4a; color: #5fb4e5; }
.badge.rejected { background: #4a1e1e; color: var(--red); }

.login-wrap { display: flex; align-items: center; justify-content: center; height: 100vh; }
.login-box { width: 320px; }

.toast {
  position: fixed; top: 16px; right: 16px; padding: 10px 16px;
  border-radius: 8px; font-size: 13px; font-weight: 600; color: #fff;
  z-index: 100;
}
.toast.ok { background: var(--green); }
.toast.err { background: var(--red); }

.flex { display: flex; gap: 10px; align-items: center; }
.muted { color: var(--muted); font-size: 12px; }
.content-preview { max-height: 400px; overflow-y: auto; background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 12px; }
