@font-face {
    font-family: 'Maher';
    src: url('../fonts/Maher.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: verdana, sans-serif;
    font-size: 16px;
    background-color: #eef3f7;
    color: #184e98;
    min-height: 100vh;
}

.contenitore {
    display: flex;
    min-height: calc(100vh - 56px);
}

.menu {
    width: 20%;
    min-width: 200px;
    background-color: #eef3f7;
    padding: 20px 15px 80px;
}

.menu-brand {
    text-align: center;
    margin-bottom: 12px;
}

.menu-logo {
    max-width: 100%;
    height: auto;
    max-height: 72px;
    object-fit: contain;
}

.menu ul {
    list-style: none;
}

.menu-sub {
    margin: 4px 0 8px 10px;
}

.menu-item,
.menu a {
    display: block;
    width: 100%;
    padding: 12px 15px;
    color: #184e98;
    text-decoration: none;
    background-color: #eef3f7;
    border: none;
    border-radius: 5px;
    text-align: left;
    font: inherit;
    cursor: pointer;
    transition: 0.3s;
}

.menu-item:hover,
.menu a:hover {
    background-color: #7192c8;
    color: #eef3f7;
}

.menu-item-parent,
.menu-item-static {
    cursor: default;
    font-weight: bold;
}

.menu-group-expanded > .menu-item-parent:hover {
    background-color: #eef3f7;
    color: #184e98;
}

.menu-group-condensed > details {
    margin: 0;
}

.menu-group-condensed > details > summary.menu-item-parent {
    cursor: pointer;
    list-style: none;
}

.menu-group-condensed > details > summary.menu-item-parent::-webkit-details-marker {
    display: none;
}

.menu-group-condensed > details > summary.menu-item-parent::before {
    content: '▸';
    display: inline-block;
    width: 1.1em;
    margin-right: 2px;
}

.menu-group-condensed > details[open] > summary.menu-item-parent::before {
    content: '▾';
}

.menu-group-condensed > details > summary.menu-item-parent:hover {
    background-color: #7192c8;
    color: #eef3f7;
}

.menu form {
    margin: 0;
}

.hr-line {
    border: 0;
    height: 1px;
    background-color: #C8D4DC;
    margin: 4px 0;
}

.hr-line-logo {
    border: 0;
    height: 1px;
    background-color: #0bb8b6;
    margin-bottom: 16px;
}

.contenuto {
    width: 80%;
    padding: 30px;
    padding-bottom: 80px;
}

.contenuto h1 {
    margin-bottom: 25px;
    letter-spacing: 2px;
    color: #184e98;
    font-family: Maher, verdana, sans-serif;
    text-align: center;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #eef3f7;
    color: #184e98;
}

table.data-table th {
    background-color: #eef3f7;
    color: #FF9700;
    padding: 14px;
    text-align: left;
}

table.data-table td {
    padding: 12px;
    border-bottom: 1px solid #0bb8b6;
}

table.data-table tbody tr:hover {
    background-color: #0bb8b6;
    color: #ffffff;
}

/* Icon buttons keep white bg + navy glyph on row hover (avoid white-on-white) */
table.data-table tbody tr:hover a {
    color: #ffffff;
}

table.data-table tbody tr:hover .icon-btn {
    background: #ffffff;
    color: #184e98;
    border-color: #184e98;
}

table.data-table tbody tr:hover .icon-btn:hover {
    background: #184e98;
    color: #ffffff;
    border-color: #184e98;
}

.bottone {
    display: inline-block;
    margin-top: 16px;
    background-color: white;
    color: #0bb8b6;
    border: 2px solid #0bb8b6;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: inherit;
}

.bottone:hover {
    background-color: #0bb8b6;
    color: white;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.20);
}

.bottone-small {
    padding: 6px 16px;
    font-size: 14px;
    margin-top: 0;
}

.bottone-danger {
    color: #c0392b;
    border-color: #c0392b;
}

.bottone-danger:hover {
    background-color: #c0392b;
    color: #fff;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #0bb8b6;
    border-radius: 8px;
    background: #fff;
    color: #184e98;
    cursor: pointer;
    margin-right: 6px;
    transition: 0.2s;
    font-size: 16px;
}

.icon-btn:hover {
    background: #0bb8b6;
    color: #fff;
}

.actions-inline {
    display: flex;
    gap: 4px;
    align-items: center;
}

.actions-inline form {
    display: inline;
    margin: 0;
}

.user-bar {
    position: fixed;
    left: 12px;
    bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(238, 243, 247, 0.95);
    border: 1px solid #0bb8b6;
    border-radius: 24px;
    padding: 8px 14px;
    z-index: 50;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.user-face {
    font-size: 22px;
    line-height: 1;
}

.user-name {
    font-weight: bold;
    color: #184e98;
}

.error-msg {
    background: #fdecea;
    color: #922b21;
    border: 1px solid #e74c3c;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.ok-msg {
    background: #e8f8f5;
    color: #0b6e6c;
    border: 1px solid #0bb8b6;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 12px 16px;
    max-width: 720px;
    align-items: center;
}

.form-grid label {
    color: #184e98;
    font-weight: bold;
}

.form-grid input[type="text"],
.form-grid input[type="password"],
.form-grid input[type="number"],
.form-grid input[type="date"],
.form-grid input[type="datetime-local"],
.form-grid input[type="file"],
.form-grid select,
.form-grid textarea {
    padding: 10px 12px;
    border: 1px solid #C8D4DC;
    border-radius: 6px;
    font: inherit;
    color: #184e98;
    background: #fff;
}

.form-grid textarea {
    min-height: 120px;
    resize: vertical;
    width: 100%;
}

.form-grid .hint {
    font-size: 13px;
    color: #7192c8;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
    outline: 2px solid #0bb8b6;
    border-color: #0bb8b6;
}

.form-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.toolbar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    align-items: center;
}

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(160deg, #eef3f7 0%, #d5e4f2 50%, #c8ebea 100%);
}

.login-box {
    background: #eef3f7;
    border: 1px solid #0bb8b6;
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 12px 32px rgba(24, 78, 152, 0.12);
}

.login-logo {
    display: block;
    width: 120px;
    height: auto;
    margin: 0 auto 24px;
}

.login-box label {
    display: block;
    margin: 12px 0 6px;
    font-weight: bold;
}

.login-box input[type="text"],
.login-box input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #C8D4DC;
    border-radius: 6px;
    font: inherit;
}

.login-box .bottone {
    width: 100%;
    margin-top: 20px;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
    margin-bottom: 20px;
}

.debt-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
}

.filter-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.filter-checkbox-inline {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    margin-bottom: 0 !important;
    font-weight: normal !important;
    white-space: nowrap;
    cursor: pointer;
}

.filter-checkbox-inline input[type="checkbox"] {
    margin: 0;
    padding: 0;
    min-width: 0;
    width: auto;
    height: auto;
    border: none;
    border-radius: 0;
}

.filter-bar label {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
    font-weight: bold;
}

.filter-bar select,
.filter-bar input[type="checkbox"],
.filter-bar input[type="text"] {
    margin-right: 6px;
    padding: 8px 10px;
    border: 1px solid #C8D4DC;
    border-radius: 6px;
    font: inherit;
    color: #184e98;
    background: #fff;
    min-width: 160px;
}

.filter-bar input[type="text"]:focus,
.filter-bar select:focus {
    outline: 2px solid #0bb8b6;
    border-color: #0bb8b6;
}

.filter-field {
    display: flex;
    flex-direction: column;
}

.filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-name-wrap {
    min-width: 260px;
    flex: 1 1 260px;
}

.suggest-box {
    position: relative;
}

.suggest-box input[type="text"] {
    width: 100%;
    box-sizing: border-box;
}

.suggest-list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 2px);
    z-index: 40;
    list-style: none;
    margin: 0;
    padding: 4px 0;
    background: #ffffff;
    border: 1px solid #0bb8b6;
    border-radius: 8px;
    box-shadow: 0 8px 18px rgba(24, 78, 152, 0.15);
    max-height: 240px;
    overflow-y: auto;
}

.suggest-list .suggest-item {
    display: block;
    width: 100%;
    text-align: left;
    border: 0;
    background: transparent;
    color: #184e98;
    font: inherit;
    padding: 10px 14px;
    cursor: pointer;
}

.suggest-list .suggest-item:hover,
.suggest-list .suggest-item:focus {
    background: #0bb8b6;
    color: #ffffff;
    outline: none;
}

.users-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
    flex: 1 1 auto;
}

.miomed-calendar {
    margin-top: 16px;
    border: 1px solid #C8D4DC;
    border-radius: 8px;
    padding: 8px;
    background: #fff;
}

.miomed-calendar .fc-button {
    background: #184e98;
    border-color: #184e98;
}

.miomed-calendar .fc-button:hover {
    background: #0bb8b6;
    border-color: #0bb8b6;
}

.miomed-calendar .fc-today-button {
    background: #7192c8;
    border-color: #7192c8;
}

.window-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
    padding: 8px;
    border: 1px solid #C8D4DC;
    border-radius: 6px;
    background: #f8fbff;
}

.window-row select,
.window-row input[type="time"],
.window-row input[type="datetime-local"] {
    padding: 6px 8px;
    border: 1px solid #C8D4DC;
    border-radius: 6px;
    font: inherit;
    color: #184e98;
    background: #fff;
}

.window-list {
    margin: 0;
    padding-left: 1.2em;
    color: #184e98;
}

.info-box {
    border: 1px solid #0bb8b6;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: #eef3f7;
}

.view-tabs {
    margin-bottom: 12px;
}

.notif-bell {
    position: relative;
    border: 2px solid #0bb8b6;
    background: #fff;
    color: #184e98;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0;
    margin-right: 8px;
}

.notif-bell:hover,
.notif-bell-active {
    background: #0bb8b6;
    color: #fff;
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9px;
    background: #FF9700;
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    line-height: 18px;
    text-align: center;
}

.badge-today {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #FF9700;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.row-today {
    background: #fff8e8;
}

.row-unread {
    font-weight: bold;
}

.checklist-label {
    flex: 1 1 220px;
    min-width: 180px;
}

.checklist-view {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.checklist-view li {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #C8D4DC;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #fff;
}

.checklist-view li.done {
    opacity: 0.7;
    text-decoration: line-through;
}

.action-list {
    list-style: none;
    padding: 0;
}

.action-list li {
    padding: 10px 0;
    border-bottom: 1px solid #C8D4DC;
}

.disclaimer-ack {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 12px 0;
    font-size: 13px;
    color: #184e98;
}

.radio-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hint {
    font-size: 13px;
    color: #7192c8;
    margin-bottom: 8px;
}

@media (max-width: 768px) {
    .contenitore {
        flex-direction: column;
    }

    .menu,
    .contenuto {
        width: 100%;
    }

    .menu ul.menu-list {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .user-bar {
        left: 8px;
        right: 8px;
        bottom: 8px;
        justify-content: space-between;
    }
}
