/* Base theme tokens + modern rounded UI */

:root {
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";

  /* These are overridden by theme-light / theme-dark */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f6fb;
  --text: #111827;
  --muted: #6b7280;
  --border: rgba(17, 24, 39, 0.12);
  --primary: #2563eb;
  --primary-contrast: #ffffff;
  --danger: #b00020;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 24px;
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 20% 0%, rgba(37, 99, 235, 0.08), transparent 50%),
              radial-gradient(1000px 500px at 90% 20%, rgba(16, 185, 129, 0.06), transparent 55%),
              var(--bg);
  color: var(--text);
}

body > * {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

/* Simple site brand (icon + name) */
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.site-admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.site-admin-brand:hover {
  text-decoration: none;
  box-shadow: var(--shadow);
}

.site-admin-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(14, 165, 233, 0.22));
  border: 1px solid rgba(15, 23, 42, 0.10);
}

.site-admin-title {
  display: block;
  font-weight: 900;
  letter-spacing: -0.2px;
  line-height: 1.1;
}

.site-admin-sub {
  display: block;
  margin-top: 3px;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.1;
}

h1, h2, h3 { margin: 0 0 12px; letter-spacing: -0.02em; }

p { color: var(--text); }

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

a:hover { text-decoration: underline; }

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

/* Cards for lists */
ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}

img {
  border-radius: var(--radius-sm);
}

/* Forms */
form { margin: 8px 0; }

input, select, textarea {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(37, 99, 235, 0.5);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

button {
  font: inherit;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--primary);
  color: var(--primary-contrast);
  cursor: pointer;
}

button:hover { filter: brightness(0.98); }

button[type="submit"] { font-weight: 600; }

/* Secondary buttons in inline forms */
form[style*="display:inline"] button,
button.secondary {
  background: var(--surface);
  color: var(--text);
}

/* Tables (admin-ish) */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

th, td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

th { color: var(--muted); font-weight: 600; }

/* Small helpers */
.muted { color: var(--muted); }
.error { color: var(--danger); }
.success { color: #0a7a3a; }
