@font-face {
    font-family: Sansita;
    src: url("font/Sansita-Regular.otf");
}
@font-face {
    font-family: Sansita;
    src: url("../font/Sansita-Regular.otf");
}
@font-face {
    font-family: Sansita;
    src: url("font/Sansita-Medium.otf");
    font-weight: bold;
}
@font-face {
    font-family: Sansita;
    src: url("font/Sansita-Italic.otf");
    font-style: italic;
}
@font-face {
    font-family: Sansita;
    src: url("font/Sansita-MediumItalic.otf");
    font-weight: bold;
    font-style: italic;
}

@font-face {
    font-family: 'FontAwesome';
    src: url('font/fa-solid-900.ttf');
    src: url('font/fa-solid-900.woff2') format('woff');
    font-weight: normal;
    font-style: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html,
body {
    height: 100%;
    min-height: 100%;
    overflow: hidden;
}

body {
    font-family: Arial, sans-serif;
    font-size: 12px;
    margin: 0;
    padding: 0;
    background-color: #beb6b6;
}
header {
    background-color: #15171aa2;
    color: white;
    padding: 1rem;
    font-family: Sansita, Arial, sans-serif;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    letter-spacing: 2px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
/*    animation: slideDown 0.5s ease-out; */
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
    width: 100%;
}
.logoarea {
    font-size: 2rem;
    font-weight: bold;
    margin-left: 20px;
    text-align: left;
}
.userinfoarea {
    font-size: 1.2rem;
    font-weight: normal;
    margin-right: 20px;
}
.userinfo {
    color: #ff0;
    font-style: italic;
    font-size: 1.2rem;
}
main {
    position: absolute;
    top: 4rem;
    bottom: 2.2rem;
    left: 0rem;
    right: 0;
    background: url('img/bg-paper.jpg') no-repeat center center fixed;
    background-size: cover;
    display: flex;
    flex-direction: column;
}
h1, h2, h3 {
    margin-bottom: 20px;
    color: #333;
    font-family: Sansita, Arial, sans-serif;
}
h1 {
    font-size: 2.5rem;
}
h2 {
    font-size: 2rem;
}
h3 {
    font-size: 1.5rem;
}
p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #555;
    font-size: 1rem;
}
a {
    color: #007BFF;
    text-decoration: none;
}
button {
    background-color: #007BFF;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}
button:hover {
    background-color: #0056b3;
}
footer {
    background-color: #15171aa2;
    color: white;
    text-align: center;
    padding: 10px 0;
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 2.2rem;
    font-size: 1rem;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-around;
}

nav {
    position: fixed;
    top: 4rem;
    bottom: 2.2rem;
    left: 0;
    width: 11rem;
    text-align: left;
    background-color: #2872c2;
    padding-top: 1rem;
    z-index: 9999;
}
nav a, nav .hassubmenu, nav .hassubsubmenu {
    display: block;
    color: white;
    padding: 10px 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: opacity 0.3s ease, max-height 0.3s ease;
}
nav a:hover {
    background-color: #bcd2ec;
    color: #2872c2;
}
nav a.active {
    background-color: #14559f;
    font-weight: bold;
    opacity: 1;
}
nav a:last-child {
    border-bottom: none;
}
nav .hassubmenu, nav .hassubsubmenu {
    position: relative;
}
nav .submenu, nav .subsubmenu {
    display: none;
    position: absolute;
    top: 0;
    left: 90%;
    min-width: 150px;
    z-index: 1001;
}
nav .submenu, nav .subsubmenu {
    background-color: #2360a6;
}
nav .subsubmenu {
    background-color: #004494;
}

nav .hassubmenu:hover {
    background-color: #bcd2ec;
    color: #2872c2;
    cursor: pointer;
}

nav .hassubmenu:hover .submenu, nav .hassubsubmenu:hover .subsubmenu {
    display: block;
}
nav .submenu a, nav .subsubmenu a {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
nav .submenu li, nav .subsubmenu li {
    list-style: none;
}
nav .hassubmenu:after, nav .hassubsubmenu:after {
    content: '\25BA';
    font-size: 0.8rem;
    float: right;
}
nav .menu li, nav .menu .hassubmenu, nav .menu .hashassubmenu {
    height: 48px;
}

img {
    height: 50px;
    margin: 0 20px;
}
img:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.box {
    flex: 1;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 1rem;
    background-color: #abc5d2;
    box-shadow: 0 4px 6px rgba(208, 165, 165, 0.1);
    position: absolute;
    top: 1rem;
    left: 12rem;
    right: 1rem;
    bottom: 1rem;
    display: flex;
    flex-direction: column;
}
.box-header {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    border-bottom: 2px solid #007BFF;
    padding-bottom: 5px;
}
.box-header .iconheader {
    height: 32px;
    width: 32px;
    vertical-align: middle;
    margin-right: 10px;
}
.box-content {
    font-size: 12px;
    color: #555;
    line-height: 1.6;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    margin-top: .5rem;
}
form {
    display: flex;
    flex-direction: column;
}
form label {
    margin-bottom: 5px;
    font-weight: bold;
}
form input, form select {
    margin-bottom: 15px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}
form input:focus {
    border-color: #007BFF;
    outline: none;
}
form button {
    align-self: flex-start;
}
.tablerow {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin: 1rem 0;
    width: 100%;
    max-width: 100%;
}
.tablerow label {
    flex: 0 0 150px;
    font-weight: bold;
}
.tablerow div {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    width: auto;
}
.tablerow input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}
.tablerow input:focus {
    border-color: #007BFF;
    outline: none;
}
.tablerow input:read-only {
    background-color: #d2d2d2;
    color: #777;
}
.form-check {
    display: flex;
    align-items: center;
    width: auto;
    justify-content: flex-start;
    gap: .3rem;
}
.form-check-input {
    width: 1.5rem;
    height: 1.5rem;
    margin: 0;
    padding: 0;
    vertical-align: middle;
}
.form-check-label {
    font-weight: normal;
    white-space: normal;
    margin: 0;
    padding: 0;
    vertical-align: middle;
}
.btn {
    background-color: #007BFF;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    margin-right: 1rem;
    margin-bottom: 1rem;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}
.btn:last-child {
    margin-right: 0;
    margin-bottom: 0;
}

.btn:hover {
    background-color: #0056b3;
}
.btn-link {
    background: none;
    border: none;
    color: #007BFF;
    text-decoration: none;
    cursor: pointer;
    padding: 10px 20px;
    font-size: 1rem;
    margin-left: 10px;
}
.btn-link:hover {
    color: white;
    text-decoration: underline;
}
.btngreen {
    background-color: #28a745;
}
.btngreen:hover {
    background-color: #1e7e34;
}
.btnblue {
    background-color: #007BFF;
}
.btnblue:hover {
    background-color: #0056b3;
}
.btnred {
    background-color: #dc3545;
}
.btnred:hover {
    background-color: #c82333;
}
.btnyellow {
    background-color: #e6ff07;
    color: black;
}
.btnyellow:hover {
    background-color: #d8e000;
    color: black;
}
.btngrey {
    background-color: #8b9095;
}
.btngrey:hover {
    background-color: #727578;
}

.alert {
    padding: 15px;
    background-color: #f44336;
    color: white;
    margin-bottom: 20px;
    border-radius: 4px;
}
.alert ul {
    margin: 0;
    padding-left: 20px;
}
.alert ul li {
    list-style: disc;
}.alert-success {
    background-color: #4CAF50;
}
.alert-info {
    background-color: #2196F3;
}
.alert-warning {
    background-color: #ff9800;
}
.alert-danger {
    background-color: #f44336;
}

.tabla {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    margin-bottom: 20px;
}
.tabla th, .tabla td {
    border: 1px solid #6c7eba;
    padding: 2px 8px;
    position: relative;
    height: 38px;
    vertical-align: middle;
}
.tabla th {
    background-color: #236276;
    font-weight: bold;
    color: whitesmoke;
}
.tabla tr:nth-child(even) {
    background-color: #82bacb;
}
.tabla tr:nth-child(odd) {
    background-color: #aacbd4;
}
.tabla tr:hover {
    background-color: #d8d4d4;
}

.tabla td.actions {
    width: 1%;                 /* minimalizálja az oszlopot, a tartalom méretéhez igazodik */
    padding-right: 6px;
    white-space: nowrap; /* prevent wrapping */
}

/* ikonok egymás mellett, kis távolsággal */
.tabla td.actions .actions-wrap {
    display: inline-flex;
    align-items: center;
}

/* képosztály: kisebb ikonok, ugyanakkor élesek maradjanak */
.tabla td.actions img.icon {
    width: 2rem;
    height: 2rem;
    margin: 3px;
    display: inline-block;
    vertical-align: middle;
}

/* a formok ne foglaljanak külön sortot */
.tabla td.actions form {
    display: inline !important;
    margin: 0;
    padding: 0;
    line-height: 0;
}


.tabla td.actions > a,
.tabla td.actions > form {
    display: inline-block; /* make both anchor and form sit inline */
    vertical-align: middle;
    margin: 0;
    padding: 0;
}
.tabla td.actions img {
    vertical-align: middle; /* align images with text baseline */
}

.tableinput {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border: none;
    padding: 8px;
    font-size: 1rem;
    vertical-align: middle;
    font-size: .8rem;
}
.tableinput:focus {
    outline: 2px solid #007BFF;
    background-color: #fff7ae;
}

.resizable-table { table-layout: fixed; width: 100%; }
.resizable-table thead th { position: relative; padding-right: 10px; }
.resizable-table .resizer {
    position: absolute;
    right: 0;
    top: 0;
    width: 8px;
    cursor: col-resize;
    user-select: none;
    height: 100%;
    z-index: 5;
}

/* műveletek oszlop finomítása */
.table td.actions {
    white-space: wrap;
    width: 1%;
    padding-right: 6px;
}
.table td.actions .actions-wrap { display: inline-flex; align-items: center; }
.table td.actions form { display: inline-block; margin: 0; padding: 0; line-height: 0; }

.resizable-table col:first-child,
.resizable-table th:first-child,
.resizable-table td:first-child { 
    width: 3rem; 
    max-width: 4rem;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}
.resizable-table col:last-child,
.resizable-table th:last-child,
.resizable-table td:last-child { 
    width: 8rem; 
    max-width: 10rem;
    text-overflow: clip;
    overflow: hidden;
}

.tabla li {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 5px;
}

.icon {
    width: 2rem;
    height: 2rem;
    margin: 0 2px;
    vertical-align: middle;
    border: 1px solid #777;
    border-radius: 4px;
    padding: 2px;
    display: inline-block;
}
.icon:hover {
    transform: scale(1.5);
    transition: transform 0.2s ease-in-out;
    cursor: pointer;
}
.icon:last-child {
    margin-right: 0;
}

.iconred {
    background-color: #d15763;
}
.iconred:hover {
    background-color: #ff0019;
}

.icongreen {
    background-color: #89dc9b;
}
.icongreen:hover {
    background-color: #70ee7f;
}

.iconblue {
    background-color: #66a9f5;
}
.iconblue:hover {
    background-color: #6a75ce;
}

.iconyellow {
    background-color: #f5e66a;
}
.iconyellow:hover {
    background-color: #e0d200;
}
.icongrey {
    background-color: #d3d3d3;
}
.icongrey:hover {
    background-color: #a9a9a9;
}

.btnicon {
    background: none;
    border: none;
    padding: 0;
    margin: 0 15px 0 0;
    cursor: pointer;
    display: inline-block;
    height: 32px;
    width: 32px;
    vertical-align: middle;
}

.menuicon {
    background: none;
    border: none;
    padding: 0;
    margin: 0 5px 0 0;
    cursor: pointer;
    display: inline-block;
    height: 24px;
    width: 24px;
    vertical-align: middle;
}

.hassubmenu:hover .menuicon {
    width: 32px;
    height: 32px;
    transition: opacity 1.3s ease, max-height 1.3s ease;
}

.workspace {
    margin: 20px;
    padding: 20px;
    display: flex;
    flex-direction: row;
    gap: 20px;
    flex-wrap: wrap;
}
.workitem {
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 15px;
    width: 200px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.2s ease-in-out;
    position: relative;
}
.workitem:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}
.workitem-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 10px;  
}
.iconleft {
    margin-right: 8px;
    float: left;
}
.iconright {
    margin-left: 8px;
    float: right;
}
.clear {
    clear: both;
}


.checkbox-list { list-style: none; padding-left: 0; display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
/* make the LABEL cover the whole li so clicking anywhere toggles the checkbox */
.checkbox-item { margin: 0; padding: 0; display: flex; align-items: stretch; box-sizing: border-box; min-width: 160px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; width: 100%; cursor: pointer; padding: 8px; border: 1px solid #888; border-radius: 4px; background-color: #f9f9f9; box-sizing: border-box; }
.checkbox-item input[type="checkbox"] { margin: 0; width: 18px; height: 18px; -webkit-appearance: auto; appearance: auto; accent-color: #0b78d1; }
@media (max-width: 480px) { .checkbox-item { min-width: 120px; padding: 6px; } }



.toright {
    text-align: right !important;
}
.toleft {
    text-align: left !important;
}
center {
    text-align: center !important;
}

.w100 {
    width: 100px;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        font-size: 1.5rem;
        /* Make header flow with document on small screens to avoid overlap */
        position: relative;
        height: auto;
        padding: 0.6rem 1rem;
        letter-spacing: normal;
        text-shadow: none;
        box-shadow: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        align-items: center;
    }
    img {
        margin: 10px 0;
        height: 40px;
    }
    main {
        padding: 15px;
        margin: 10px;
        margin-top: 0; /* header is no longer fixed on mobile */
    }
    footer {
        flex-direction: column;
        font-size: 0.9rem;
    }
    /* Make nav flow with document on small screens so it doesn't overlap content */
    nav {
        position: relative;
        top: auto;
        bottom: auto;
        left: auto;
        width: 100%;
        height: auto;
        padding: 0.5rem 0;
        z-index: 1000;
    }
    /* increase touch targets for nav links on mobile */
    nav a, nav .hassubmenu, nav .hassubsubmenu {
        padding: 12px 18px;
    }
    nav .submenu, nav .subsubmenu {
        position: static;
        left: auto;
        top: auto;
        min-width: auto;
        display: none; /* keep submenus collapsed on mobile */
    }
    nav .hassubmenu:after, nav .hassubsubmenu:after { float: right; }
    main { padding-left: 15px; }
}
@media (max-width: 480px) {
    header {
        font-size: 1.2rem;
    }
    img {
        height: 30px;
    }
    main {
        padding: 10px;
        margin: 5px;
    }
    footer {
        font-size: 0.8rem;
    }
}
@media (max-width: 1360px) {
    .btn {
        padding: 6px 12px;
        font-size: 0.6rem;
    }
}

.icon {
    width: 2rem;
    height: 2rem;
    margin: 0 2px;
    vertical-align: middle;
    border: 1px solid #777;
    border-radius: 4px;
    padding: 2px;
    display: inline-block;
}
.icon:hover {
    transform: scale(1.5);
    transition: transform 0.2s ease-in-out;
    cursor: pointer;
}
.icon:last-child {
    margin-right: 0;
}

.iconred {
    background-color: #d15763;
}
.iconred:hover {
    background-color: #ff0019;
}

.icongreen {
    background-color: #89dc9b;
}
.icongreen:hover {
    background-color: #70ee7f;
}

.iconblue {
    background-color: #66a9f5;
}
.iconblue:hover {
    background-color: #6a75ce;
}

.iconyellow {
    background-color: #f5e66a;
}
.iconyellow:hover {
    background-color: #e0d200;
}

.page {
    margin: 20px auto;
    padding: 20px;
    background-color: #ffffffaa;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        font-size: 1.5rem;
    }
    header img {
        display: none;
    }
    img {
        margin: 10px 0;
        height: 40px;
    }
    main {
        padding: 15px;
        margin: 10px;
    }
    footer {
        flex-direction: column;
        font-size: 0.9rem;
    }
    .box {
        margin-top: 10px;
    }
}
@media (max-width: 480px) {
    header {
        font-size: 1.2rem;
    }
    img {
        height: 30px;
    }
    main {
        padding: 10px;
        margin: 5px;
    }
    footer {
        font-size: 0.8rem;
    }
    button, .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
        width: 100%;
    }
}
