/* css/style.css */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f6f9; /* Helles Grau-Blau als Hintergrund */
    color: #333;
    margin: 0;
    padding: 20px;
}

/* Das Container-Design (Karte) */
.card {
    background: #ffffff;
    max-width: 500px;
    margin: 40px auto; /* Zentriert */
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

h2 {
    margin-top: 0;
    color: #2c3e50;
    text-align: center;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

/* Formular Felder */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

input[type="text"],
input[type="password"],
input[type="date"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Wichtig damit Padding nicht die Breite sprengt */
    font-size: 16px;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="date"]:focus {
    border-color: #007bff;
    outline: none;
}

/* Button Gruppe */
.btn-group {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

button, .btn-cancel {
    padding: 12px 25px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    text-align: center;
    font-family: inherit;
}

/* Speichern Button (Grün/Blau) */
button[type="save"] {
    background-color: #28a745;
    color: white;
    flex: 1;
    margin-right: 10px;
    font-weight: bold;
}

button[type="save"]:hover {
    background-color: #218838;
}

/* Abbrechen Button (Grau) */
.btn-cancel {
    background-color: #6c757d;
    color: white;
    width: 30%;
}

.btn-cancel:hover {
    background-color: #5a6268;
}

/* --- ERWEITERUNGEN FÜR INDEX.PHP --- */

/* Breitere Karte für die Tabelle */
.card.wide {
    max-width: 1200px; /* Mehr Platz für die Tabelle */
}

/* Header Bereich mit Flexbox (Titel links, User rechts) */
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.header-row h2 {
    margin: 0;
    border: none;
    padding: 0;
}

.user-info {
    font-size: 14px;
    color: #666;
}

.user-info strong {
    color: #333;
}

.logout-link {
    color: #dc3545;
    text-decoration: none;
    margin-left: 10px;
    font-weight: bold;
}

.print-link {
    color: #629a1e;
    text-decoration: none;
    margin-left: 10px;
    font-weight: bold;
}


/* Moderne Tabelle */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
}

th {
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 600;
    text-align: left;
    padding: 15px;
    border-bottom: 2px solid #dee2e6;
}

td {
    padding: 7px;
    border-bottom: 1px solid #eee;
    color: #555;
    vertical-align: middle;
}

tr:hover td {
    background-color: #fafafa; /* Leichter Hover-Effekt */
}

/* Status Badges (die farbigen Pillen) */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-green {
    background-color: #d4edda;
    color: #155724;
}

.badge-red {
    background-color: #f8d7da;
    color: #721c24;
}

.badge-orange {
    background-color: #fff3cd;
    color: #856404;
}

/* Kleine Action Buttons in der Tabelle */
.btn-sm {
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 4px;
    text-decoration: none;
    color: white;
    margin-right: 3px;
    display: inline-block;
    transition: opacity 0.2s;
}

.btn-sm:hover { opacity: 0.8; }
.btn-blue { background-color: #007bff; }
.btn-green { background-color: #28a745; }
.btn-gray  { background-color: #6c757d; }
.btn-red   { background-color: #dc3545; }

/* Erfolgsmeldung */
.alert-success {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #f5c6cb;
    margin-bottom: 20px;
}

/* Link für Server */
a.server-link {
    color: #007bff;
    text-decoration: none;
}
a.server-link:hover {
    text-decoration: underline;
}

        .toolbar { display: flex; justify-content: space-between; margin-bottom: 20px; align-items: center;}
        .search-box input { padding: 8px; border: 1px solid #ccc; border-radius: 4px; width: 250px;}
        .pagination { margin-top: 20px; text-align: center; }
        .pagination a { display: inline-block; padding: 8px 12px; border: 1px solid #ddd; margin: 0 2px; text-decoration: none; color: #333; border-radius: 4px;}
        .pagination a.active { background-color: #007bff; color: white; border-color: #007bff; }
        .pagination a:hover:not(.active) { background-color: #eee; }


/* --- LOGIN SPEZIFISCH --- */

/* Damit das Login-Fenster vertikal & horizontal zentriert ist */
body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh; /* Volle Bildschirmhöhe nutzen */
    padding: 0; /* Reset für Zentrierung */
}

/* Die Login-Karte etwas schmaler als die Edit-Karte */
.card.login-card {
    width: 100%;
    max-width: 400px;
    margin: 0 20px; /* Abstand auf Handy */
}

/* Button über die volle Breite */
.btn-full {
    width: 100%;
    font-size: 18px;
    padding: 12px;
}

/* Fehlermeldung Box (Rot) */
.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
    margin-bottom: 20px;
    text-align: center;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #999;
}

        .nav-tabs { margin-bottom: 20px; border-bottom: 1px solid #ddd; }
        .nav-link { display: inline-block; padding: 10px 15px; text-decoration: none; color: #555; border: 1px solid transparent; border-bottom: none; border-radius: 4px 4px 0 0; }
        .nav-link.active { border-color: #ddd; border-bottom-color: #fff; background: #fff; color: #000; font-weight: bold; margin-bottom: -1px; }

        .status-badge { display: inline-block; padding: 5px 10px; border-radius: 4px; font-weight: bold; width: 80px; text-align: center; }
        .bg-clean { background-color: #28a745; color: white; }
        .bg-listed { background-color: #dc3545; color: white; }
        
        .rbl-table { width: 100%; border-collapse: collapse; margin-top: 20px; }
        .rbl-table th { text-align: left; background: #eee; padding: 10px; border-bottom: 2px solid #ddd; }
        .rbl-table td { padding: 10px; border-bottom: 1px solid #eee; }
        .rbl-table tr:hover { background-color: #f9f9f9; }
      
        .result-box { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 20px; }
        .col-left { flex: 1; min-width: 300px; }
        .col-right { flex: 2; min-width: 300px; }
        
        .info-card { background: #f9f9f9; border: 1px solid #ddd; padding: 15px; border-radius: 5px; margin-bottom: 20px; }
        .info-card h4 { margin-top: 0; border-bottom: 1px solid #eee; padding-bottom: 10px; }
        
        pre { background: #333; color: #0f0; padding: 10px; overflow-x: auto; border-radius: 4px; max-height: 300px; font-size: 12px; }
        .badge-status { padding: 4px 8px; border-radius: 4px; color: #fff; font-weight: bold; }
        .bg-ok { background-color: #28a745; }
        .bg-err { background-color: #dc3545; }
        .bg-warn { background-color: #ffc107; color: #000; }
        
        .result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
        .full-width { grid-column: span 2; }
        
       
        /* Terminal Look für Service Scan */
        .terminal { background: #1e1e1e; color: #0f0; padding: 10px; border-radius: 4px; font-family: monospace; font-size: 12px; max-height: 300px; overflow-y: auto; white-space: pre-wrap; }
  /*    .terminal { background: #1e1e1e; color: #0f0; padding: 15px; border-radius: 5px; font-family: monospace; font-size: 13px; max-height: 400px; overflow-y: auto; white-space: pre-wrap; } */
        .terminal .service-head { color: #fff; font-weight: bold; margin-top: 10px; display: block; border-top: 1px solid #444; padding-top: 5px; }
        .terminal .service-head:first-child { border-top: none; margin-top: 0; }
        
        .badge-status { padding: 4px 8px; border-radius: 4px; color: #fff; font-weight: bold; font-size: 0.9em; }
        .bg-ok { background-color: #28a745; }
        .bg-err { background-color: #dc3545; }
        .bg-warn { background-color: #ffc107; color: #000; }

        table.clean-table { width: 100%; border-collapse: collapse; font-size: 13px; }
        table.clean-table th { text-align: left; background: #eee; padding: 6px; }
        table.clean-table td { border-bottom: 1px solid #eee; padding: 6px; }


        .result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
        
        .terminal { background: #1e1e1e; color: #0f0; padding: 10px; border-radius: 4px; font-family: monospace; font-size: 12px; max-height: 300px; overflow-y: auto; white-space: pre-wrap; }
        .badge-status { padding: 4px 8px; border-radius: 4px; color: #fff; font-weight: bold; font-size: 0.9em; }
        
        /* Security Grade Styles */
        .grade-badge { font-size: 40px; font-weight: bold; float: right; padding: 0 15px; border-radius: 5px; color: #fff; line-height: 50px; }
        .grade-A { background: #28a745; } 
        .grade-B { background: #17a2b8; }
        .grade-C { background: #ffc107; color: #333; }
        .grade-D, .grade-F { background: #dc3545; }

        .sec-table { width: 100%; font-size: 13px; border-collapse: collapse; }
        .sec-table td { padding: 6px 0; border-bottom: 1px solid #eee; }
        .sec-icon-ok { color: green; font-weight: bold; }
        .sec-icon-miss { color: #dc3545; font-weight: bold; }
        

