/* style.css - CSS für das Drucker-Management-Dashboard */

/* Allgemeine Stile */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    margin: 0;
    line-height: 1.6;
}

header {
    background-color: #fff;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
    color: #0056b3;
}

nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

nav a:hover {
    background-color: #e9ecef;
    color: #000;
}

nav a.active {
    background-color: #007bff;
    color: #fff;
}

main {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

footer {
    text-align: center;
    padding: 1.5rem;
    margin-top: 2rem;
    color: #666;
    font-size: 0.9rem;
}

/* Karten-Layout */
.card {
    background-color: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease-in-out;
}

.card:hover {
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.card.info {
    background-color: #e9f7ff;
    border-left: 5px solid #007bff;
}

.location-section {
    margin-bottom: 3rem;
}

.location-section h2 {
    font-size: 1.8rem;
    color: #333;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Drucker-Raster */
.printer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.printer-card h3 {
    margin-top: 0;
    color: #0056b3;
    font-size: 1.2rem;
}

.printer-card p {
    margin: 0.3rem 0;
    font-size: 0.95rem;
}

.printer-card .last-updated {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 1rem;
}

.printer-card h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: #444;
}

.reading {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    border-bottom: 1px solid #f0f0f0;
}

/* Toner-Balken */
.toner-levels {
    margin-top: 0.5rem;
}

.toner-bar-container {
    background-color: #e9ecef;
    border-radius: 15px;
    margin-bottom: 0.5rem;
    position: relative;
    height: 22px;
    display: flex;
    align-items: center;
}

.toner-bar-container span {
    position: absolute;
    left: 10px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: bold;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.4);
}

.toner-bar {
    height: 100%;
    border-radius: 15px;
}

.toner-bar.black { background-color: #333; }
.toner-bar.cyan { background-color: #00aef0; }
.toner-bar.magenta { background-color: #ec008c; }
.toner-bar.yellow { background-color: #fff200; }

/* Formularelemente */
.form-container {
    max-width: 600px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    box-sizing: border-box; /* Wichtig für korrekte Breite */
}

.form-group .checkbox-group {
    display: flex;
    align-items: center;
}
.form-group .checkbox-group input {
    width: auto;
    margin-right: 0.5rem;
}


.button, input[type="submit"] {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s;
}

.button:hover, input[type="submit"]:hover {
    background-color: #0056b3;
}

.button.edit-button {
    background-color: #28a745;
    margin-top: 10px;
}
.button.edit-button:hover {
    background-color: #218838;
}

.button.delete-button {
    background-color: #dc3545;
    margin-left: 10px;
}
.button.delete-button:hover {
    background-color: #c82333;
}

/* Tabellen */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}

.data-table th, .data-table td {
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    text-align: left;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }
    nav {
        margin-top: 1rem;
    }
    main {
        padding: 1rem;
    }
    .printer-grid {
        grid-template-columns: 1fr;
    }
}
