/* RESET E BASE */
html, body {
    font-family: Verdana, 'Segoe UI', sans-serif;
    font-size: 14px;
    margin: 0;
    padding: 0;
    background-color: #ffffff;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.main {
    flex: 1;
}

button, input, select {
    padding: 6px;
    background-color: #e9e9ff;
    border: 1px solid #566697;
    color: #040469;
    cursor: pointer;
    box-shadow: inset 1px 1px 0px #f0f0f0, inset -1px -1px 0px #566697;
    outline: none;
}

button:hover, input[type="submit"]:hover {
    background-color: #6666aa;
    color: #ffffff;
}

/* HEADER E FOOTER */
.top, .footer {
    background-color: #6666aa;
    color: #ffffff;
    width: 100%;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
    box-sizing: border-box;
    border-bottom: 2px solid #000000;
}

.footer {
    border-top: 2px solid #000000;
}

/* HEADER INTERNO */
.top .content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
}

.top h2 {
    margin: 0;
    text-align: center;
    flex: 1;
}

.top .buttons {
    display: flex;
    gap: 10px;
}

/* WINDOW E GRID */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

@media (min-width: 900px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

.window {
    background-color: #ffffff;
    border: 1px solid #aaa;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    white-space: nowrap;
}

.window .title {
    background-color: #6666aa;
    color: #ffffff;
    font-weight: bold;
    padding: 10px;
    border-bottom: 1px solid #000;
    font-size: 16px;
}

.window .body-window {
    padding: 10px;
    font-size: 14px;
    overflow-x: auto;
    white-space: nowrap;
}

/* SIDEBAR */
.layout-container {
    display: flex;
    height: 100%;
}

.sidebar {
    width: 250px;
    background-color: #e9e9ff;
    color: #040469;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.3);
    transition: width 0.3s ease-in-out;
    overflow-y: auto;
}

.sidebar img {
    width: 95%;
}

.sidebar.hidden {
    width: 0;
    overflow: hidden;
}

.sidebar-header, .sidebar-footer {
    padding: 20px;
    text-align: center;
}

.sidebar-footer {
    margin-top: auto;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #ffffff;
}

.main {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    transition: margin-left 0.3s ease-in-out;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
    flex: 1;
    transition: width 0.3s ease-in-out;
}

/* TABELLE */
.full-table {
    width: 100%;
    border-collapse: collapse;
}

.full-table th {
    background-color: #e9e9ff;
}

.full-table .window {
    width: 100%;
}

/* EXTRA */
.index-table {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

/* POPUP */

.popup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background-color: #ffffff;
    border: 1px solid #aaa;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* overflow: hidden; */
    width: 600px;
    pointer-events: all;
    display: none;
}

.popup .title {
    background-color: #6666aa;
    color: #ffffff;
    font-weight: bold;
    padding: 10px;
    border-bottom: 1px solid #000;
    font-size: 16px;
    cursor: move; /* Indica che la finestra può essere trascinata */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup .close-btn {
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}