/* --- Γενικές Ρυθμίσεις --- */
body {
    font-family: Arial, sans-serif;
    margin: 20px;
    background-color: #f4f4f4;
    padding-top: 80px; /* Ύψος της κεφαλίδας για την οθόνη */
}

/* ΔΙΟΡΘΩΣΗ: Το .header ΠΡΕΠΕΙ να είναι έξω από το .container */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-color: #f8f8f8;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: left;
    padding: 0 20px;
    z-index: 1000;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.logo {
    height: 50px;
}

.title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.content {
    padding: 20px;
}

h2 {
    color: #333;
    text-align: center;
    font-size: 16px;
}

/* --- Φόρμα --- */
form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}

form label {
    font-weight: normal;
    margin-bottom: 5px;
    display: block;
}

form input[type="date"],
form input[type="number"],
form input[type="text"] {
    width: calc(100% - 10px);
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

form button {
    grid-column: span 2;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

form button:hover {
    background-color: #0056b3;
}

/* --- Πίνακας --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th, table td {
    border: 1px solid #ddd;
    padding: 10px;
    font-size: 12px;
    text-align: left;
}

table th {
    background-color: #e0e0e0;
    color: #333;
}

table tr:nth-child(even) {
    background-color: #f2f2f2;
}

caption {
    font-size: 16px;
    color: #333;
    margin-top: 8px;
    font-weight: bold;
}

/* --- Μηνύματα --- */
.no-results {
    text-align: center;
    color: #666;
    margin-top: 30px;
    padding: 15px;
    background-color: #ffe0b2;
    border: 1px solid #ffcc80;
    border-radius: 5px;
}

.error-message {
    color: red;
    background-color: #ffebee;
    border: 1px solid #ef9a9a;
    padding: 10px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.error {
    border: 2px solid red;
    background-color: #ffe6e6;
}

/* --- Language Switcher --- */
.language-switcher {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 9999;
    display: flex;
    gap: 10px;
}

.language-switcher button {
    background: none;
    border: none;
    cursor: pointer;
}

.language-switcher img {
    width: 30px;
    height: auto;
}

/* --- ΡΥΘΜΙΣΕΙΣ ΕΚΤΥΠΩΣΗΣ (PRINT) --- */
@media print {
    /* Εξαφανίζουμε το fixed positioning για να μην επαναλαμβάνεται */
    .header {
        position: absolute !important; /* Το absolute στην εκτύπωση μένει ΜΟΝΟ στην 1η σελίδα */
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 80px !important;
        background-color: white !important;
        border-bottom: 2px solid #000 !important;
        display: flex !important;
    }

    body {
        padding-top: 100px !important; /* Δημιουργεί χώρο ΜΟΝΟ στην 1η σελίδα για το header */
        margin: 0 !important;
        background-color: white !important;
    }

    .container {
        box-shadow: none !important;
        border: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Κρύβουμε ό,τι δεν θέλουμε στο χαρτί */
    form, .language-switcher, button {
        display: none !important;
    }

    /* Διασφαλίζουμε ότι ο πίνακας δεν σπάει άσχημα */
    table {
        page-break-inside: auto;
    }
    tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
}