body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(to bottom, #f0f4f8, #d9e2ec);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.header-logo {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 75px;
    height: auto;
    z-index: 1002;
}

.login-container {
    position: relative;
    background: #fff;
    padding: 40px 50px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    text-align: center;
    width: 360px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.login-logo {
    position: absolute;
    top: -40px;
    left: -40px;
    width: 100px;
    height: auto;
}

.login-container h2 {
    margin-top: -20px;
    margin-bottom: 20px;
    color: #1490b1;
}

.login-container input {
    width: 100%;
    padding: 12px 15px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 16px;
}

.login-container button {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    background-color: #1490b1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
}

.login-container button:hover {
    background-color: #0f6d8a;
}

.login-footer {
    position: fixed;
    bottom: 0;
    padding: 10px 20px;
    background-color: #1490b1;
    color: #fff;
    text-align: center;
    font-size: 14px;
    border-radius: 8px 8px 0 0;
    z-index: 999;
}

.flex-spacer {
    flex: 1;
}

.error {
    color: #ff4d4f;
    margin-bottom: 10px;
    font-weight: bold;
}

.logout-btn {
    position: absolute;
    top: 20px;
    right: 15px;
    padding: 10px 18px;
    background-color: #ff4d4f;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
    z-index: 1000;
}

.logout-btn:hover {
    background-color: #d9363e;
}

.admin-btn {
    position: absolute;
    top: 20px;
    right: 105px;
    padding: 10px 18px;
    background-color: #1490b1;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
    z-index: 1001;
}

.admin-btn:hover {
    background-color: #0f6d8a;
}

.change-btn {
    position: absolute;
    top: 20px;
    right: 105px;
    padding: 10px 18px;
    background-color: #1490b1;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
    z-index: 1001;
}

.change-btn:hover {
    background-color: #0f6d8a;
}

.change-password-container {
    width: 400px;
    margin: 80px auto;
    padding: 40px 30px;
    background-color: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    text-align: center;
}

.change-password-container input[type=password] {
    width: 100%;
    padding: 12px 15px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
}

.change-password-container .form-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.change-password-container .form-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    background-color: #1490b1;
    color: #fff;
    transition: 0.3s;
}

.change-password-container .form-buttons button:hover {
    background-color: #0f6d8a;
}

.change-password-container .form-buttons a button {
    background-color: #888;
}

.change-password-container .form-buttons a button:hover {
    background-color: #555;
}

.container {
    width: 96%;
    margin: 40px auto 40px auto;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow: auto;
}

.container::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}

.container {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ip-search {
    margin-bottom: 10px;
    text-align: left;
}

.search-wrapper {
    position: relative;
    display: inline-block;
}

.search-wrapper input {
    padding-right: 35px; /* Platz für das X-Button */
}

.clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;          /* neue Größe */
    height: 20px;         /* neue Größe */
    border: none;
    border-radius: 50%;
    background-color: #ff4d4f;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    display: flex;         /* Flexbox aktivieren */
    align-items: center;   /* vertikal zentrieren */
    justify-content: center; /* horizontal zentrieren */
    padding: 0;
    font-size: 12px;       /* Schriftgröße anpassen */
    transition: 0.3s;
    display: none;         /* unsichtbar standardmäßig */
}

.clear-btn:hover {
    background-color: #d9363e;
}

.ip-search input {
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    width: 200px;
}

.admin-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.admin-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    background: #fff;
    padding: 40px 50px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    z-index: 1000;
    text-align: center;
}

.admin-container h2 {
    color: #1490b1;
    margin-bottom: 20px;
}

.admin-container input[type=text],
.admin-container input[type=password] {
    width: 100%;
    padding: 12px 15px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
}

.admin-container button {
    padding: 10px 18px;
    background-color: #1490b1;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.3s;
}

.admin-container button:hover {
    background-color: #0f6d8a;
}

.admin-container .delete-btn {
    background-color: #ff4d4f;
}

.admin-container .delete-btn:hover {
    background-color: #d9363e;
}

.admin-container .back-btn {
    margin-top: 20px;
    background-color: #888;
    color: #fff;
}

.admin-container .back-btn:hover {
    background-color: #555;
}

.admin-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px; 
}

.admin-tabs .tab-btn {
    padding: 10px 20px;
    border: none;
    background-color: #e0e6ed;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-weight: bold;
    color: #333;
    transition: 0.3s;
}

.admin-tabs .tab-btn.active {
    background-color: #1490b1;
    color: #fff;
}

.admin-tabs .tab-btn:hover {
    background-color: #0f6d8a;
    color: #fff;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #1490b1;
}

.tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tabs-left {
    display: flex;
    gap: 10px;
    margin-left: -5px;
}

.tabs-right input#ipFilter {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 16px;
    width: 220px;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.tab-btn {
    padding: 12px 30px;
    margin: 0 5px;
    border: none;
    background: #e0e6ed;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-weight: bold;
    color: #333;
    transition: 0.3s;
}

.tab-btn.active {
    background: #1490b1;
    color: #fff;
    margin-bottom: -10px;
}

.tab-content {
    display: none;
    overflow-x: auto;
}

.tab-content.active {
    display: block;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

th, td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    font-size: 15px;
    overflow-wrap: break-word;
}

th:nth-child(1), td:nth-child(1) { width: 110px; }
th:nth-child(2), td:nth-child(2) { width: 270px; }
th:nth-child(3), td:nth-child(3) { width: 130px; }
th:nth-child(4), td:nth-child(4) { width: 80px; }
th:nth-child(5), td:nth-child(5) { width: auto; }

table th:not(:last-child) {
    text-align: center;
}

table td:not(:last-child) {
    text-align: center;
}

table th:last-child,
table td:last-child {
    text-align: left;
}

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

tr:hover {
    background-color: #f1f5f9;
}

th {
    background-color: #1490b1;
    color: #fff;
    font-weight: 600;
}

@media (max-width: 768px) {
    .login-container {
        width: 90%;
        padding: 30px 20px;
    }
    .tab-btn {
        padding: 10px 15px;
        font-size: 14px;
    }

    th:nth-child(1), td:nth-child(1) { width: 80px; }
    th:nth-child(2), td:nth-child(2) { width: 100px; }
    th:nth-child(3), td:nth-child(3) { width: 140px; }
    th:nth-child(4), td:nth-child(4) { width: 80px; }
    th:nth-child(5), td:nth-child(5) { width: auto; }
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    flex: 1;
}

.footer {
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #1490b1;
    color: #fff;
    text-align: center;
    font-size: 14px;
    border-radius: 8px 8px 0 0;
}

#toTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background-color: #1490b1;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    opacity: 0; 
    pointer-events: none;
    transition: opacity 0.4s, transform 0.2s, background 0.3s;
}

#toTopBtn.show {
    opacity: 1;
    pointer-events: auto;
}

#toTopBtn:hover {
    background-color: #0f6d8a;
    transform: translateY(-2px);
}
