/* Általános stílusok */
body {
    font-family: -apple-system, BlinkMacMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    margin: 0;
    line-height: 1.6;
}

/* Base container for general content (index.php) */
.container {
    max-width: 1100px;
    margin: 20px auto;
    padding: 0 20px;
}

/* Fejléc */
.header {
    background: #fff;
    padding: 15px 30px;
    display: flex;
    flex-direction: column; /* Stack logo and nav vertically */
    align-items: center;   /* Center items horizontally */
    border-bottom: 1px solid #e0e0e0;
}

.header .logo {
    height: 40px;
    margin-bottom: 15px; /* Add space below the logo */
}

.header .nav-menu {
    display: flex;
    justify-content: center; /* Center menu items */
    width: 100%; /* Ensure nav-menu takes full width for centering */
}

.header .nav-menu a {
    color: #555;
    text-decoration: none;
    margin: 0 10px; /* Adjust margin for centered items */
    font-weight: 500;
    padding-bottom: 5px;
}

.header .nav-menu a:hover {
    color: #007bff;
}

.header .nav-menu a.active {
    color: #007bff;
    border-bottom: 2px solid #007bff;
}

/* Kártya stílus a szekcióknak */
.card {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
}

.card h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.25rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

/* Űrlapok */
form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin: 0;
}

.form-group-full {
    flex-basis: 100%;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 5px;
}

input[type="text"],
input[type="datetime-local"],
input[type="month"],
select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4-x;
    font-size: 1rem;
    box-sizing: border-box;
    min-width: 240px;
}

.form-inline {
    align-items: flex-end;
}
.form-inline .form-group {
    flex-direction: row;
    align-items: center;
}
.form-inline label {
    margin-bottom: 0;
    margin-right: 10px;
}

.button-orange,
button[type="submit"] {
    background-color: #ff8c00;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}

.button-orange:hover,
button[type="submit"]:hover {
    background-color: #e67e00;
}

/* === NORMÁL (ASZTALI) NÉZET TÁBLÁZAT STÍLUSAI === */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.95rem;
}

table th, table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #eef0f2;
    vertical-align: middle;
}

table th {
    background-color: #343a40;
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table tbody tr:hover {
    background-color: #f8f9fa;
}

table td[colspan="4"],
table td[colspan="5"] {
    text-align: center;
    color: #777;
    padding: 20px;
    font-style: italic;
}

table a {
    color: #dc3545;
    text-decoration: none;
    font-weight: bold;
}
table a:hover {
    text-decoration: underline;
}

/* === INDEX.PHP FŐ TARTALOM ELRENDEZÉS === */
/* This will arrange your main content boxes (e.g., "Korábbi bejegyzések" and "Havi napi összesítő") */
.main-content-grid {
    display: flex; /* Use flexbox for the main content areas */
    flex-wrap: wrap; /* Allow items to wrap to the next line */
    gap: 25px; /* Space between columns/rows */
    margin-top: 25px; /* Space below header */
}

.main-content-grid > div { /* Apply to direct children of this grid */
    flex: 1; /* Allow items to grow and shrink */
    min-width: 300px; /* Minimum width before wrapping */
}

/* If you have specific classes for your sidebars/main content, use them here */
/* Example:
.left-column {
    flex: 1;
    min-width: 300px;
}
.right-column {
    flex: 2; // Make it wider
    min-width: 300px;
}
*/

/* === RESZPONZÍV STÍLUSOK (TELEFON) === */
@media screen and (max-width: 768px) {

    .container {
        padding: 0 10px;
    }

    .header {
        flex-direction: column;
        gap: 15px;
    }

    .header .nav-menu {
        border-top: 1px solid #eee;
        padding-top: 15px;
        width: 100%;
        text-align: center;
    }

    .header .nav-menu a {
        margin: 0 10px;
    }

    form {
        gap: 10px;
    }

    .form-group,
    .form-group-full {
        flex-basis: 100%;
        margin-right: 0;
    }

    input[type="text"],
    input[type="datetime-local"],
    input[type="month"],
    select {
        width: 100%;
        min-width: unset; /* Remove min-width on mobile */
    }

    /* Stack main content grid items on mobile */
    .main-content-grid {
        flex-direction: column; /* Stack columns vertically */
        gap: 15px; /* Adjust gap for mobile */
    }

    /* Reszponzív, "kártyás" táblázat mobilra */
    table {
        border: 0;
    }

    table thead {
        display: none;
    }

    table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 5px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    }

    table td {
        display: block;
        text-align: right;
        padding: 10px;
        border-bottom: 1px solid #eee;
        position: relative;
    }

    table td:last-child {
        border-bottom: 0;
    }

    table td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        text-transform: uppercase;
        font-size: 0.85em;
        color: #555;
    }

    table td a {
        font-size: 1em;
    }

    /* Üres sorok elrejtése mobil nézetben */
    table td.action-cell-empty,
    table td.comment-cell-empty {
        display: none;
    }
}

/* === LOGIN PAGE SPECIFIC STYLES === */
.login-page-body {
    /* Only apply these styles when body has login-page-body class */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Ensures the container takes full viewport height */
    padding: 20px; /* Add some padding for smaller screens */
    box-sizing: border-box;
    background-color: #f4f7f6; /* Ensure background color if body default is overridden */
}

/* Override .container specific to login page if needed, though login-page-body .container is more specific */
.login-page-body .container {
    margin: 0; /* Remove default margin */
    padding: 0; /* Remove default padding */
    max-width: none; /* Remove max-width so it can be controlled by login-card */
}

.logo-login {
    max-width: 100%; /* Ensures the image doesn't overflow its container */
    height: auto;    /* Maintains the image's aspect ratio */
    display: block;  /* Removes extra space below the image if it's inline */
    margin: 0 auto 20px auto; /* Centers the image and adds some bottom margin */
}

@media (max-width: 768px) {
    .logo-login {
        max-width: 80%; /* Example: make it slightly smaller on tablets */
    }
}

@media (max-width: 480px) {
    .logo-login {
        max-width: 70%; /* Example: make it even smaller on mobile phones */
    }
}

.login-card {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%; /* Ensure the card itself is responsive */
    max-width: 400px; /* Set a maximum width for the card */
    box-sizing: border-box; /* Include padding and border in the element's total width */
    text-align: center; /* Center the logo and form elements within the card if needed */
}

/* General improvements for form elements to be more responsive on login page */
.login-card .form-group-full input[type="text"],
.login-card .form-group-full input[type="password"] {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box; /* Important for width: 100% */
}

.login-card .button-orange {
    width: 100%; /* Make the button fill its container */
    padding: 10px 15px;
    background-color: #FFA500; /* Example orange color */
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    box-sizing: border-box;
}

.login-card .button-orange:hover {
    background-color: #E69500; /* Darker orange on hover */
}
