/* Grundlayout */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: #f4f7f9;
    color: #333;
}

nav {
    background-color: #0077cc;
    color: #fff;
    padding: 15px;
    text-align: center;
}

nav a {
    color: #fff;
    text-decoration: none;
    margin: 0 15px;
    font-weight: bold;
}

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

hr {
    border: none;
    height: 2px;
    background: #0077cc;
    margin: 0;
}

/* Hauptinhalt */
h2 {
    color: #0077cc;
    margin-top: 30px;
}

form {
    background: #fff;
    padding: 20px;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 119, 204, 0.1);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

form input, form select, form button {
    width: 100%;
    margin: 10px 0;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 16px;
}

form button {
    background-color: #0077cc;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

form button:hover {
    background-color: #005fa3;
}

/* Tabelle */
table {
    width: 95%;
    margin: 40px auto;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 119, 204, 0.1);
}

table th, table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    text-align: center;
}

table th {
    background-color: #0077cc;
    color: white;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

table tr:hover {
    background-color: #e6f2ff;
}

img {
    max-height: 60px;
    border-radius: 4px;
    box-shadow: 0 0 4px rgba(0,0,0,0.1);
}

/* Links */
a {
    color: #0077cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Profil - Gewässer Verwaltung */

table.profil-waters {
    width: 95%;
    margin: 40px auto;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 119, 204, 0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

table.profil-waters th,
table.profil-waters td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    text-align: left;
}

table.profil-waters th {
    background-color: #0077cc;
    color: white;
}

table.profil-waters tr:nth-child(even) {
    background-color: #f9f9f9;
}

table.profil-waters tr:hover {
    background-color: #e6f2ff;
}

/* Aktionen: Formulare inline nebeneinander */
table.profil-waters td form {
    display: inline-block;
    margin: 0 8px 0 0;
}

table.profil-waters td form input[type="text"] {
    width: 180px;
    padding: 8px 10px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    vertical-align: middle;
}

table.profil-waters td form button {
    padding: 8px 14px;
    font-size: 14px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

table.profil-waters td form button[name="edit_water"] {
    background-color: #28a745; /* grün */
    color: white;
}

table.profil-waters td form button[name="edit_water"]:hover {
    background-color: #218838;
}

table.profil-waters td form button[name="delete_water"] {
    background-color: #dc3545; /* rot */
    color: white;
}

table.profil-waters td form button[name="delete_water"]:hover {
    background-color: #c82333;
}

/* Verwaltung der Registrierungscodes (codes.php) */

.codes-container {
    width: 80%;
    margin: 20px auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.codes-table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 0 10px rgba(0, 119, 204, 0.1);
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
}

.codes-table th,
.codes-table td {
    border: 1px solid #ddd;
    padding: 10px 15px;
    text-align: center;
}

.codes-table th {
    background-color: #0077cc;
    color: white;
}

.codes-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.codes-table tr:hover {
    background-color: #e6f2ff;
}

.codes-message {
    text-align: center;
    color: green;
    font-weight: bold;
    margin: 20px auto;
}

.codes-form {
    width: 80%;
    margin: 20px auto;
    text-align: center;
}

.codes-form button {
    background-color: #0077cc;
    color: white;
    border: none;
    padding: 10px 20px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.codes-form button:hover {
    background-color: #005fa3;
}

.codes-link-delete {
    color: #dc3545;
    font-weight: bold;
    text-decoration: none;
}

.codes-link-delete:hover {
    text-decoration: underline;
}

.codes-form button,
.codes-form-button,
.codes-button {
    background-color: #4CAF50;
    padding: 10px 18px;
    border: none;
    cursor: pointer;
    font-weight: bold;
    margin-top: 10px;
}

.codes-form button:hover,
.codes-form-button:hover,
.codes-button:hover {
    background-color: #45a049;
}

/* Tabelle für Gewässerverwaltung im Profil */
.table-waters {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.table-waters th,
.table-waters td {
    padding: 8px;
    text-align: left;
}

.table-waters th:nth-child(1),
.table-waters td:nth-child(1) {
    width: 50%;
}

.table-waters th:nth-child(2),
.table-waters td:nth-child(2) {
    width: 50%;
}

.diagramm-buttons {
    margin-bottom: 30px;
    text-align: center;
}

.diagramm-buttons a {
    display: inline-block;
    padding: 10px 25px;
    margin: 0 10px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: 6px;
    transition: all 0.3s ease;
    background-color: #f8f8f8;
}

.diagramm-buttons a:hover {
    background-color: #ddd;
    border-color: #999;
}

.diagramm-buttons a.active {
    background-color: #007BFF;
    color: white;
    border-color: #0056b3;
    font-weight: 700;
}

body::before {
  content: "";
  position: fixed;
  top: 50%;
  left: 50%;
  width: 300px; /* Größe anpassen */
  height: 300px;
  background: url('/images/watermark.png') no-repeat center center;
  background-size: contain;
  opacity: 0.1; /* Transparenz */
  transform: translate(-50%, -50%);
  pointer-events: none; /* Klicks passieren durchs Wasserzeichen */
  z-index: 9999; /* Ganz oben anzeigen */
}