/* ------------------------------------------------------------
   Grundlegende Styles
------------------------------------------------------------ */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;       /* hält main zentriert, Inhalt in main ist volle Breite */
  background-color: #f5f5f5;
}

header {
  width: 100%;
  background-color: #003366;
  color: #ffffff;
  padding: 1rem;
  text-align: center;
}

main {
  width: 90%;
  max-width: 900px;
  margin-top: 1rem;
  background-color: #ffffff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

h2 {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-top: 0.5rem;
  font-weight: bold;
}

input, select, button, textarea {
  width: 100%;
  padding: 0.5rem;
  margin-top: 0.25rem;
  box-sizing: border-box;
}


html, body {
  margin: 0;
  padding: 0;
}

.site-footer {
  display: block;
  width: 100%;
  background: #E0E0E0;
  color: #333;
  text-align: center;
  font-size: 0.9em;
  padding: 5px 0;
  margin-top: 40px;
  box-sizing: border-box;
}

.site-footer button.reload-btn {
  background: #969090;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  width: 150px;
  font-size: 0.9em;
  padding: 6px 14px;
  margin-bottom: 0px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: background 0.3s, color 0.3s;
}

.site-footer button.reload-btn:hover {
  background: #102030;
  color: #fff;
}

.site-footer div {
  margin-top: 4px;
}

.site-footer a {
  color: #204060;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.inline-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.inline-group > div {
  flex: 1;
  min-width: 200px;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

th, td {
  border: 1px solid #dddddd;
  padding: 0.5rem;
  text-align: left;
}

th {
  background-color: #f0f0f0;
}

.btn-add, .btn-save, .btn-log{
  margin-top: 1rem;
  background-color: #0066cc;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  width: 100%;
  padding: 0.5rem 1rem;
}

.btn-prof {
  margin-top: 1rem;
  background-color: #828282;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  width: 100%;
  padding: 0.5rem 1rem;
}

.btn-add:hover, .btn-save:hover, .btn-prof:hover, .btn-log:hover, .generate-btn:hover{
  background-color: #c40000;
}

.edit-btn, .send-btn, .delete-btn, .remove-btn, .generate-btn {
  background-color: #cc0000;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  padding: 0.25rem 0.5rem;
  margin-right: 0.25rem;
}

.vorschau-btn {
  background-color: #007BFF;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 4px 10px;
  cursor: pointer;
}
.vorschau-btn:hover {
  background-color: #0056b3;
}

.edit-btn {
  background-color: #ffaa00;
}

.edit-btn:hover {
  background-color: #e69900;
}

.send-btn {
  background-color: #009900;
}

.send-btn:hover {
  background-color: #008000;
}

.delete-btn {
  background-color: #cc0000;
}

.delete-btn:hover {
  background-color: #b30000;
}

/* Standard-Checkbox-Gruppe */
.checkbox-group {
  margin-top: 1rem;
}

.checkbox-group label {
  font-weight: normal;
  display: flex;
  align-items: center;
}

.checkbox-group input[type="checkbox"] {
  margin-right: 0.5rem;
}


/* Modal Overlay */
.modal {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 9999;
  display: flex; 
  align-items: center;
  justify-content: center;
}

/* Modal Content */
.modal-content {
  background: #fff;
  padding: 20px 30px;
  max-width: 600px;
  width: 90%;
  margin: 40px auto;
  border-radius: 10px;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Modal Close Button */
.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #333;
}

/* Form Layout */
.profile-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.profile-form .form-row {
  flex: 1 1 45%;
  display: flex;
  flex-direction: column;
}

.profile-form .form-row.full-width {
  flex: 1 1 100%;
}

.profile-form label {
  font-weight: bold;
  margin-bottom: 4px;
}

.profile-form input[type="text"],
.profile-form input[type="email"],
.profile-form input[type="password"] {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* Success & Error Messages */
.success-message {
  color: green;
  display: none;
  margin-top: 10px;
}

.error-message {
  color: red;
  display: none;
  margin-top: 10px;
}

details summary {
  cursor: pointer;
  font-weight: bold;
  font-size: 1.1rem;
  padding: 0.5rem;
  background-color: #e0e0e0;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

details[open] summary {
  background-color: #d0d0d0;
}

details > div {
  padding: 0.5rem;
  border: 1px solid #cccccc;
  border-radius: 4px;
  margin-bottom: 1rem;
  background-color: #fafafa;
}

/* ------------------------------------------------------------
   Responsive: Tabellen auf Smartphones untereinander
   (Tabellentitel ausblenden)
------------------------------------------------------------ */
@media (max-width: 600px) {
  table, thead, tbody, th, td, tr {
    display: block;
  }
  thead tr {
    display: none;  /* Tabellentitel auf Smartphones ausblenden */
  }
  tr {
    margin-bottom: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.5rem;
  }
  td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
  }
  td:before {
    content: attr(data-label);
    font-weight: bold;
    flex: 1;
  }
  td:last-child {
    justify-content: flex-end;
  }
}

/* ------------------------------------------------------------
   Spezifische Anpassungen für den Bereich „3. Verzollung“
   (Checkboxen linksbündig ausrichten)
------------------------------------------------------------ */

#verzollung-section {
  width: 100%;         /* ganze Breite des Formulars */
  text-align: left;    /* Inhalt linksbündig */
  padding-left: 0;     /* kein zusätzlicher Innenabstand links */
}

/* „3. Verzollung“ als grauer Balken mit größerer Schrift */
#verzollung-section h3 {
  background-color: #e0e0e0;  /* heller Grauton */
  color: #000;                /* Text in Schwarz */
  padding: 0.5rem 1rem;       /* etwas Innenabstand */
  font-size: 1.25rem;         /* größere Schrift */
  margin: 1rem 0 0.5rem 0;     /* Abstand nach oben und unten */
  border-radius: 4px;         /* leicht abgerundet */
}

/* Checkbox-Gruppe in voller Breite, linksbündig */
#verzollung-section .checkbox-group {
  margin: 0;                  /* keine seitliche Einrückung */
  padding: 0;                 /* kein zusätzlicher Innenabstand */
  display: block;             /* Block-Layout, Labels untereinander */
  width: 100%;                /* füllt ganze Breite von main */
}

/* Label (Checkbox + Text) ganz links, mit kleinem Abstand darunter */
#verzollung-section .checkbox-group label {
  display: flex;
  align-items: center;
  justify-content: flex-start;  /* Checkbox + Text linksbündig */
  margin-bottom: 0.5rem;         /* kleiner Abstand zwischen den Zeilen */
}

/* Checkbox selbst mit kleinem Abstand zum Text */
#verzollung-section .checkbox-group input[type="checkbox"] {
  margin-right: 0.5rem;  /* Abstand zwischen Checkbox und Text */
}

/* ------------------------------------------------------------
   3. Verzollung: Links­bündige Darstellung der Checkboxen
------------------------------------------------------------ */
#verzollung-section {
  margin-top: 1.5rem;
}

#verzollung-section h3 {
  margin-bottom: 0.75rem;
  color: #003366;
}

.verzollung-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-left: 0;      /* keine Einrückung */
  margin-left: 0;       /* komplett linksbündig */
}

.verzollung-container .checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  /* Optional: ein wenig Abstand nach unten, falls gewünscht */
}

.verzollung-container .checkbox-row input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  margin: 0;            /* kein zusätzlicher Margin */
}

.verzollung-container .checkbox-row label {
  font-weight: normal;
  font-size: 1rem;
  margin: 0;
  cursor: pointer;
}

/* Optional: Bei sehr engen Displays (Smartphones) immer noch linksbündig */
@media (max-width: 600px) {
  .verzollung-container {
    padding-left: 0;
    margin-left: 0;
  }
}

/* Neue Buttons mit einheitlicher Breite, besser erreichbar */
.edit-btn, .generate-btn, .delete-btn {
  width: 100px;
  padding: 10px 0;
  font-size: 0.9em;
  box-sizing: border-box;
  text-align: center;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
  margin: 2px 4px;
  display: inline-block;
}

.edit-btn {
  background-color: #ffcc00;
  color: #003366;
}
.edit-btn:hover {
  background-color: #e6b800;
}

.generate-btn {
  background-color: #27ae60;
  color: #fff;
}
.generate-btn:hover {
  background-color: #1e8449;
}

.delete-btn {
  background-color: #c0392b;
  color: #fff;
}
.delete-btn:hover {
  background-color: #922b21;
}