body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 600px; /* Mobilra optimalizált szélesség */
    background-color: #fff;
    box-shadow: 0 0 15px rgba(0,0,0,0.05);
    padding: 20px;
    box-sizing: border-box;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

header .logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 15px;
}

h1, h2, h3 {
    color: #0056b3;
    text-align: center;
    margin-top: 0;
}

/* Navigáció az admin felületen */
nav {
    display: flex;
    flex-wrap: wrap; /* Több sorba törés mobilon */
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}
nav a {
    text-decoration: none;
    color: #007bff;
    padding: 8px 12px;
    border: 1px solid #007bff;
    border-radius: 5px;
    transition: all 0.3s ease;
}
nav a:hover {
    background-color: #007bff;
    color: white;
}

/* Üzenetek */
.message {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 5px;
    text-align: center;
}
.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Kártyák (busz járatok, admin listák) */
.card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.card h3 {
    color: #333;
    margin-top: 0;
    text-align: left;
    font-size: 1.2em;
}

/* Gombok */
button, .btn {
    display: inline-block;
    padding: 10px 18px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}
.btn-primary {
    background-color: #007bff;
    color: white;
}
.btn-primary:hover {
    background-color: #0056b3;
}
.btn-success {
    background-color: #28a745;
    color: white;
}
.btn-success:hover {
    background-color: #218838;
}
.btn-danger {
    background-color: #dc3545;
    color: white;
}
.btn-danger:hover {
    background-color: #c82333;
}
.btn-info {
    background-color: #17a2b8;
    color: white;
}
.btn-info:hover {
    background-color: #138496;
}
.btn-block {
    display: block;
    width: 100%;
}

/* Form elemek */
form {
    margin-top: 20px;
}
label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}
input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box; /* Padding nem növeli a szélességet */
    font-size: 1em;
}
textarea {
    resize: vertical; /* Csak függőlegesen lehessen méretezni */
}

/* Táblázatok */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}
th, td {
    border: 1px solid #eee;
    padding: 10px;
    text-align: left;
    vertical-align: top;
    font-size: 0.9em;
}
th {
    background-color: #f8f8f8;
    color: #555;
    font-weight: bold;
}
tr:nth-child(even) {
    background-color: #fdfdfd;
}

/* Mobil specifikus táblázat kezelés */
@media (max-width: 600px) {
    table, thead, tbody, th, td, tr {
        display: block;
    }
    thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    tr {
        margin-bottom: 15px;
        border: 1px solid #eee;
        border-radius: 8px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    }
    td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;
        text-align: right;
    }
    td:last-child {
        border-bottom: none;
    }
    td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: #555;
    }
    .action-links {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: flex-end; /* Jobbra igazítás mobil nézetben */
    }
    .action-links a {
        margin-top: 0; /* Gomboknak ne legyen extra margin felül */
    }
}

/* Booking form */
.booking-form {
    border: 1px solid #e0e0e0;
    padding: 20px;
    margin-top: 15px;
    background-color: #fefefe;
    border-radius: 8px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}
.booking-form h4 {
    margin-top: 0;
    color: #333;
    text-align: left;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Image upload */
.current-logo {
    margin-bottom: 15px;
    text-align: center;
}
.current-logo img {
    max-width: 100%;
    height: auto;
    max-height: 200px;
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 5px;
}

/* Nyomtatási stílusok */
@media print {
    body {
        background-color: #fff;
        margin: 0;
    }
    .container {
        box-shadow: none;
        padding: 0;
    }
    header, nav, .filter-controls, .action-links, .btn-print, .message {
        display: none !important;
    }
    h1 {
        display: block !important;
        text-align: center;
        margin: 20px 0;
    }
    table {
        width: 100%;
        border-collapse: collapse;
        margin-top: 0;
    }
    th, td {
        border: 1px solid #000;
        padding: 8px;
        font-size: 10pt;
        display: table-cell; /* Visszaállítja a mobil CSS felülbírálását */
        text-align: left;
    }
    td::before {
        content: normal; /* Eltávolítja a mobil labelt */
    }
    thead tr {
        position: static;
        top: auto;
        left: auto;
    }
}