/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body {
  background: #fff;
  color: #111;
  line-height: 1.5;
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
}

/* ===== Navigation ===== */
nav {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

nav a {
  text-decoration: none;
  color: #111;
  font-weight: 500;
}

nav a:hover {
  text-decoration: underline;
}

/* ===== Headings ===== */
h1 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* ===== Tables ===== */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.95rem;
}

thead {
  border-bottom: 1px solid #ccc;
}

th, td {
  text-align: left;
  padding: 0.5rem;
}

tbody tr {
  border-bottom: 1px solid #eee;
}

/* ===== Forms ===== */
form {
  margin-top: 1rem;
}

form div {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

input[type="text"],
input[type="date"],
input[type="password"] {
  width: 100%;
  padding: 0.4rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.95rem;
}

button,
input[type="submit"] {
  padding: 0.4rem 0.8rem;
  border: 1px solid #111;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-size: 0.95rem;
}

button:hover,
input[type="submit"]:hover {
  background: #f5f5f5;
}

/* Inline form (delete button in table) */
form.inline {
  display: inline;
}

/* ===== Flash Messages ===== */
.flash {
  padding: 0.6rem;
  margin: 1rem 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.9rem;
}

.flash.success { border-color: #4caf50; color: #2e7d32; }
.flash.error { border-color: #e53935; color: #b71c1c; }
.flash.warning { border-color: #fbc02d; color: #795548; }

/* ===== Responsive (Simple) ===== */
@media (max-width: 600px) {
  nav {
    flex-direction: column;
    gap: 0.5rem;
  }

  table, thead, tbody, th, td, tr {
    display: block;
  }

  thead { display: none; }

  tbody tr {
    margin-bottom: 1rem;
    border: 1px solid #eee;
    padding: 0.5rem;
    border-radius: 4px;
  }

  td {
    padding: 0.25rem 0;
  }

  td::before {
    content: attr(data-label);
    font-weight: 600;
    display: block;
    margin-bottom: 0.2rem;
  }
}

/* ===== Action Buttons ===== */
td a,
td button {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  border: 1px solid #111;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: none;
  color: #111;
}

td a:hover,
td button:hover {
  background: #f5f5f5;
}

.hidden { display: none; }