:root {
  --brand: #200f46;
  --brand-light: #3a2370;
  --bg: #f5f4f8;
  --card: #ffffff;
  --text: #1c1c24;
  --muted: #6b6b78;
  --border: #e2e0ea;
  --error: #b3261e;
  --success: #1e6b3a;
}

* { box-sizing: border-box; }

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

body.watermarked {
  background-image: url("watermark.png");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: min(92vw, 1200px) auto;
  background-attachment: fixed;
}

body.watermarked main {
  position: relative;
  z-index: 1;
}

header.topbar {
  background: var(--brand);
  color: #fff;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header.topbar a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

header.topbar nav a {
  margin-left: 18px;
  font-weight: 400;
  opacity: 0.9;
}

header.topbar nav a:hover { opacity: 1; text-decoration: underline; }

main {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

h1 { font-size: 1.5rem; }

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

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.btn {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 9px 16px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.95rem;
}

.btn:hover { background: var(--brand-light); }

.btn.secondary {
  background: transparent;
  color: var(--brand);
  border: 1px solid var(--brand);
}

.btn.danger { background: var(--error); }

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

label { display: block; margin: 12px 0 4px; font-weight: 600; font-size: 0.9rem; }
input[type=text], input[type=email], input[type=password], select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
}

.flash { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 0.92rem; }
.flash.error { background: #fbe9e7; color: var(--error); }
.flash.success { background: #e8f3ec; color: var(--success); }

.muted { color: var(--muted); font-size: 0.88rem; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--border); font-size: 0.78rem; }

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