@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500&family=Montserrat:wght@500;700&display=swap');

:root {
  --bg-page: #fafafa;
  --bg-surface: #ffffff;
  --bg-subtle: #fafafa;
  --text-primary: #313d3e;
  --text-muted: #666666;
  --border-default: #e5e5e5;
  --border-soft: #f0f0f0;
  --accent-primary: #ff0080;
  --accent-primary-hover: #e60073;
  --danger: #c62828;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-page);
}

/* Nav */
nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.6rem 1.5rem;
  background: var(--bg-surface);
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-default);
}
.brand {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  margin-right: auto;
}
nav a {
  color: var(--text-primary);
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
}
nav a:hover {
  background: var(--bg-subtle);
}
nav a.active {
  background: var(--accent-primary);
  color: #fff;
}
.logout-form { margin-left: auto; }
.logout-form button {
  background: var(--bg-subtle);
  border: 1px solid var(--border-default);
  color: var(--text-muted);
  padding: 0.25rem 0.75rem;
  cursor: pointer;
  border-radius: 8px;
}

/* Main */
main {
  max-width: 860px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}
h1 { font-size: 1.4rem; margin-bottom: 1.25rem; }
h1, h2, .brand { font-family: 'Montserrat', sans-serif; }
h2 { font-size: 1.1rem; margin: 1.5rem 0 0.75rem; }

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 12px;
  overflow: hidden;
}
th, td { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border-default); }
th {
  background: var(--bg-surface);
  color: var(--text-muted);
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
}
tr:hover td { background: var(--bg-subtle); }

/* Forms */
form { display: flex; flex-direction: column; gap: 0.75rem; max-width: 480px; }
label { display: flex; flex-direction: column; gap: 0.25rem; font-weight: 500; }
input, select, textarea {
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border-default);
  border-radius: 8px;
  font-size: 0.95rem;
  width: 100%;
  color: var(--text-primary);
  background: var(--bg-subtle);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--accent-primary) 25%, transparent);
  border-color: var(--accent-primary);
}
textarea { min-height: 80px; resize: vertical; }

/* Buttons */
.btn, button[type="submit"] {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: var(--accent-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.95rem;
  width: fit-content;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
}
.btn:hover, button[type="submit"]:hover { background: var(--accent-primary-hover); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #b71c1c; }
.btn-secondary {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}
.btn-secondary:hover { background: #f3f3f3; }

/* Misc */
.actions { display: flex; gap: 0.5rem; align-items: center; }
.error { color: var(--danger); margin-bottom: 0.5rem; }
.hint { color: var(--text-muted); font-size: 0.85rem; }
.row-actions a, .row-actions button {
  font-size: 0.85rem;
  margin-right: 0.4rem;
}

/* Login */
.login-wrap {
  max-width: 360px;
  margin: 5rem auto;
  padding: 2rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 16px;
}
.login-wrap h1 { margin-bottom: 1.5rem; }
