/* styles.css */

/* Basis */
* { box-sizing: border-box; }
body {
  font-family: system-ui, sans-serif;
  margin: 24px;
  background: #f7f7f9;
  color: #222;
}
header { margin-bottom: 16px; }

/* Buttons */
a.button, button, input[type="submit"] {
  background: #2d6cdf;
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
}
a.button { display: inline-block; }

/* Tabellen */
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}
th, td {
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
}
th { background: #eef2ff; }

/* Formulare */
form .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
form {
  background: #fff;
  padding: 16px;
  border-radius: 8px;
}
input[type="text"] {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
}
label { font-weight: 600; }

/* Badges */
.badge {
  padding: 3px 8px;
  border-radius: 6px;
  background: #eef2ff;
  display: inline-block;
}
.actions a { margin-right: 8px; }

/* -------------------- DARK THEME -------------------- */
body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}

/* Tabellen im Dark Mode */
body.dark-mode table {
  background: #1e1e1e;
}
body.dark-mode th {
  background: #2a2a2a;
  color: #ffffff;
}
body.dark-mode td {
  border-bottom: 1px solid #333;
}

/* Formulare im Dark Mode */
body.dark-mode form {
  background: #1e1e1e;
}
body.dark-mode input[type="text"] {
  background: #2a2a2a;
  border: 1px solid #444;
  color: #e0e0e0;
}

/* Buttons im Dark Mode */
body.dark-mode a.button,
body.dark-mode button,
body.dark-mode input[type="submit"] {
  background: #2d6cdf;
  color: #fff;
}

/* Badges im Dark Mode */
body.dark-mode .badge {
  background: #2a2a2a;
  color: #e0e0e0;
}

/* Checkbox-Spalte */
.table-checkbox {
    width: 32px;
    text-align: center;
}

/* Versteckt die echte Checkbox */
.pretty-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #888;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: 0.2s;
}

/* Hover */
.pretty-checkbox:hover {
    border-color: #1e40af;
}

/* Checked */
.pretty-checkbox:checked {
    background: #1e40af;
    border-color: #1e40af;
}

.pretty-checkbox:checked::after {
    content: "✔";
    color: white;
    font-size: 12px;
    position: absolute;
    top: -1px;
    left: 2px;
}
