:root {
  color-scheme: light dark;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-2: #f1f3f9;
  --border: #e0e4f0;
  --text: #101828;
  --muted: #475467;
  --primary: #4f46e5;
  --primary-contrast: #ffffff;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] {
  --bg: #0b1020;
  --surface: #12182b;
  --surface-2: #1b233a;
  --border: #2b3550;
  --text: #f8fafc;
  --muted: #cbd5f5;
  --primary: #8b5cf6;
  --primary-contrast: #0b1020;
  --shadow: 0 20px 40px rgba(3, 6, 14, 0.45);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #0b1020;
    --surface: #12182b;
    --surface-2: #1b233a;
    --border: #2b3550;
    --text: #f8fafc;
    --muted: #cbd5f5;
    --primary: #8b5cf6;
    --primary-contrast: #0b1020;
    --shadow: 0 20px 40px rgba(3, 6, 14, 0.45);
  }
}

* {
  box-sizing: border-box;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

[data-theme="dark"] .topbar,
:root:not([data-theme]) .topbar {
  background: rgba(12, 16, 32, 0.75);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0;
}

.brand {
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-links a {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  color: var(--muted);
  transition: all 0.2s ease;
}

.nav-links a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.theme-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.page {
  padding: 2.5rem 0 3rem;
}

.content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 0 0 0.6rem;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 2rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface-2);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border) !important;
}

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

input,
select,
textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

input[type="radio"],
input[type="checkbox"] {
  width: auto;
}

button {
  background: var(--primary);
  color: var(--primary-contrast);
  border: none;
  padding: 0.6rem 1.1rem;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow);
}

button:hover {
  transform: translateY(-1px);
}

.notification {
  padding: 0.8rem 1rem;
  border-radius: 12px;
  margin: 1rem 0;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.notification.is-danger {
  border-color: rgba(239, 68, 68, 0.4);
  color: #ef4444;
}

.notification.is-success {
  border-color: rgba(34, 197, 94, 0.4);
  color: #22c55e;
}

.footer {
  padding: 1.5rem 0 2rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.muted {
  color: var(--muted);
}

@media (max-width: 720px) {
  .topbar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .content-card {
    padding: 1.5rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: 0.4rem;
  }
}
