:root{
  --bg:#0b0b0b;
  --panel:#121212;
  --panel2:#161616;
  --text:#f2f2f2;
  --muted:#a7a7a7;
  --accent:#ff3b30;    /* Feuerwehr-Rot */
  --accent2:#ff9500;   /* Orange */
  --line:#2a2a2a;
}

/* Grundlegendes Styling */
*{box-sizing:border-box}
html, body{
  height:100%;
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a{color:inherit; text-decoration:none}

/* Allgemeiner Container */
.container{
  max-width:1100px;
  width:90%;
  margin:0 auto;
  padding:14px;
}

/* Header */
header{
  position:sticky;
  top:0;
  z-index:10;
  background: rgba(11,11,11,.82);
  backdrop-filter: blur(8px);
  border-bottom:1px solid var(--line);
}
.header-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 14px;
  gap:10px;
  flex-wrap:wrap;
}

/* Brand/Logo */
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:800;
  letter-spacing:.5px;
}
.brand-badge{
  width:36px; height:36px;
  border-radius:10px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}

/* Inputs & Buttons */
input[type="text"], input[type="password"], input[type="number"], select{
  width:100%;
  background: var(--panel);
  border:1px solid var(--line);
  color: var(--text);
  padding:10px 12px;
  border-radius:12px;
  outline:none;
  font-size:16px;
}
input::placeholder{color:#777}
select{appearance:none}

button{
  width:100%;
  border:1px solid var(--line);
  background: linear-gradient(180deg, #1b1b1b, #111);
  color: var(--text);
  padding:10px 12px;
  border-radius:12px;
  cursor:pointer;
  font-weight:700;
  font-size:16px;
  transition:0.3s;
}
button:hover{border-color:#3a3a3a}
button.primary{
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent;
}

/* a.primary für Links wie Buttons */
a.primary {
  display: inline-block;
  text-align: center;
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  text-decoration: none;
  transition: 0.3s;
}
a.primary:hover {
  opacity: 0.9;
}

/* Container / Karten / Modal */
.card, .modal-content, .container{
  background: var(--panel2);
  border-radius:12px;
  padding:20px;
}

/* Modal */
.modal{
  display:none;
  position: fixed;
  top:0; left:0;
  width:100%; height:100%;
  background: rgba(0,0,0,0.75);
  justify-content:center;
  align-items:center;
}
.modal-content{
  width:350px;
  max-width:90%;
  background: var(--panel2);
  padding:30px;
  border-radius:12px;
}

/* Tabellen */
.table{
  width:100%;
  border-collapse: separate;
  border-spacing:0 8px;
}
.table th{
  text-align:left;
  font-size:12px;
  color:var(--muted);
  font-weight:800;
  padding:0 10px;
}
.table td{
  background: var(--panel2);
  border:1px solid var(--line);
  padding:10px;
}
.table tr td:first-child{border-top-left-radius:14px; border-bottom-left-radius:14px;}
.table tr td:last-child{border-top-right-radius:14px; border-bottom-right-radius:14px;}
.table td input:not([type="checkbox"]){
  background:transparent;
  border:none;
  padding:0;
  border-radius:0;
  width:100%;
  height:auto;
}
.table td input:focus{outline:none}

/* Fehlermeldungen */
.error{color:var(--accent); text-align:center; margin-bottom:15px}

/* Footer */
footer{
  position:sticky;
  bottom:0;
  background: rgba(11,11,11,.88);
  backdrop-filter: blur(8px);
  border-top:1px solid var(--line);
}
.footer-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 14px;
  gap:10px;
  flex-wrap:wrap;
}

/* Responsive Anpassungen */
@media (max-width:860px){
  .header-row, .footer-row{flex-direction:column; align-items:flex-start;}
}
@media (max-width:480px){
  .container{padding:10px;}
  .modal-content{width:90%; padding:20px;}
  input, button{font-size:14px; padding:10px;}
  .table{display:block; overflow-x:auto;}
}
/* Links in Listen fett und ohne Button-Styling */
.list-link {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.list-link:hover {
  text-decoration: underline;
}

/* Suchfunktion Dropdown */
.dropdown{
  position:absolute;
  top:100%;
  left:0;
  right:0;
  background:var(--panel);
  border:1px solid var(--line);
  z-index:20;
  max-height:240px;
  overflow:auto;
}
.dropdown div{
  padding:6px 10px;
  cursor:pointer;
}
.dropdown div:hover{
  background:var(--accent-soft);
}
#searchDropdown {
  background: #000;
  color: #fff;
  border: 1px solid #444;
}
#searchDropdown div {
  padding: 8px;
  cursor: pointer;
}
#searchDropdown div:hover {
  background: #333;
}

/* =========================
   CHECKBOX FIX
========================= */
input[type="checkbox"]{
  -webkit-appearance: checkbox !important;
  -moz-appearance: checkbox !important;
  appearance: checkbox !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  width: auto !important;
  height: auto !important;
  cursor: pointer;
  margin-right: 6px;
}
#extrasWrap input[type="checkbox"]{
  -webkit-appearance: checkbox !important;
  -moz-appearance: checkbox !important;
  appearance: checkbox !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  width: auto !important;
  height: auto !important;
  cursor: pointer;
  margin-right: 6px;
}

/* ==============================
   Eingabefelder – Schrift weiss
   (Formular + Tabellen)
   ============================== */

/* Normale Inputs */
input,
select,
textarea {
  color: #ffffff;
}

/* Tabellen-Inputs explizit */
.table td input:not([type="checkbox"]),
.table td select {
  color: #ffffff;
}

/* Dropdown-Optionen */
select option {
  color: #000000;
  background: #ffffff;
}

/* Placeholder */
input::placeholder,
textarea::placeholder {
  color: rgba(255,255,255,0.5);
}
/* ==============================
   Neues-Person-Popup Styling
   ============================== */

#newPersonModal .modal-content {
  background: var(--panel2);
  border-radius: 12px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 350px;
  max-width: 90%;
}

/* Inputs im Popup */
#newPersonModal input {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  color: #fff; /* Text sichtbar */
  font-size: 16px;
  outline: none;
}

/* Placeholder Popup */
#newPersonModal input::placeholder {
  color: rgba(255,255,255,0.5);
}

/* Buttons im Popup */
#newPersonModal button {
  width: 100%;
  border-radius: 12px;
  font-weight: 700;
  font-size: 16px;
  padding: 10px 12px;
  cursor: pointer;
  border: 1px solid var(--line);
  transition: 0.3s;
  background: linear-gradient(180deg, #1b1b1b, #111);
  color: var(--text);
}

#newPersonModal button.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-color: transparent;
}

#newPersonModal button:hover {
  opacity: 0.9;
  border-color: #3a3a3a;
}

.section-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-top: 20px;
}

.dark-field {
    background: #111;
    color: #fff;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.input-textarea {
    width: 100%;
    min-height: 140px;
    background: var(--panel);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px;
    font-size: 15px;
    resize: vertical;
}


button.danger {
  background: linear-gradient(135deg, #b00000, #ff3b30);
  border-color: transparent;
}
