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

:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --ink: #1a1a18;
  --ink-muted: #6b6b65;
  --accent: #c8451a;
  --accent-light: #fdf1ed;
  --border: #e2dfd8;
  --nav-bg: #1a1a18;
  --nav-text: #f7f5f0;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.06);
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* NAV */
nav {
  background: var(--nav-bg);
  padding: 0 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--nav-text);
  text-decoration: none;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-brand span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: #a8a8a0;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 400;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius);
  transition: all 0.15s ease;
  letter-spacing: 0.02em;
}

.nav-links a:hover {
  color: var(--nav-text);
  background: rgba(255,255,255,0.08);
}

.nav-links a.active {
  color: var(--nav-text);
  background: rgba(255,255,255,0.1);
}

/* MAIN */
main {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 2rem;
}

/* PAGE HEADER */
h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--border);
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.15s ease;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: #a83815;
  color: white;
}

.btn-secondary {
  background: var(--border);
  color: var(--ink);
}

.btn-secondary:hover {
  background: #d5d2cb;
  color: var(--ink);
}

.btn-warning {
  background: #f0a500;
  color: white;
}

.btn-warning:hover {
  background: #d4920a;
  color: white;
}

.btn-danger {
  background: #dc3545;
  color: white;
}

.btn-danger:hover {
  background: #b02a37;
  color: white;
}

.btn-sm {
  padding: 0.3rem 0.7rem;
  font-size: 0.8rem;
}

.mb-3 { margin-bottom: 1rem; }

/* TABLES */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.table th {
  background: var(--ink);
  color: var(--nav-text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.85rem 1.1rem;
  text-align: left;
}

.table td {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border);
  color: var(--ink);
  font-size: 0.9rem;
}

.table tr:last-child td { border-bottom: none; }

.table-striped tbody tr:nth-child(even) td {
  background: #faf9f7;
}

.table tr:hover td {
  background: var(--accent-light);
  transition: background 0.1s ease;
}

/* FORMS */
.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 0.4rem;
}

.form-control, .form-select {
  width: 100%;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--surface);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}

.form-control:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 69, 26, 0.1);
}

.text-danger {
  color: #dc3545;
  font-size: 0.8rem;
  margin-top: 0.25rem;
  display: block;
}

/* FORM CARD */
form {
  background: var(--surface);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

form .btn {
  align-self: flex-start;
  margin-top: 0.5rem;
  margin-right: 0.5rem;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.8rem;
  color: var(--ink-muted);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  main {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 768px) {
  nav {
    padding: 0 1.25rem;
    height: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .nav-links {
    width: 100%;
    gap: 0.1rem;
    flex-wrap: wrap;
  }

  .nav-links a {
    font-size: 0.8rem;
    padding: 0.35rem 0.65rem;
  }

  main {
    padding: 1.5rem 1rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  form {
    max-width: 100%;
    padding: 1.25rem;
  }
}

@media (max-width: 480px) {
  .nav-brand {
    font-size: 1rem;
  }

  h2 {
    font-size: 1.3rem;
  }

  .btn {
    padding: 0.45rem 0.85rem;
    font-size: 0.8rem;
  }

  .btn-sm {
    padding: 0.25rem 0.55rem;
    font-size: 0.75rem;
  }

  .table th, .table td {
    padding: 0.65rem 0.75rem;
    font-size: 0.8rem;
  }

  form {
    padding: 1rem;
  }
}