@font-face {
    font-family: Urbanist;
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../lib/fonts/urbanist/Urbanist-Regular.ttf") format("truetype");
}

@font-face {
    font-family: Urbanist;
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../lib/fonts/urbanist/Urbanist-Bold.ttf") format("truetype");
}

:root {
    --bs-font-sans-serif: "Urbanist", "Segoe UI", sans-serif;
    --app-primary: #8174b8;
    --app-primary-dark: #6f62a5;
    --app-primary-rgb: 129, 116, 184;
    --app-teal: #69b8b2;
    --app-pink: #c88eaa;
    --app-amber: #d7b16e;
    --app-ink: #34364a;
    --app-surface: #ffffff;
    --app-canvas: #f7f8fc;
    --bs-primary: var(--app-primary);
    --bs-primary-rgb: var(--app-primary-rgb);
    --bs-primary-text-emphasis: #51477f;
    --bs-primary-bg-subtle: #f0eef9;
    --bs-primary-border-subtle: #d8d2ef;
}

body {
    font-family: var(--bs-font-sans-serif);
    color: var(--app-ink);
    background:
        radial-gradient(ellipse at 5% 0%, rgb(129 116 184 / 9%), transparent 34rem),
        radial-gradient(ellipse at 95% 8%, rgb(105 184 178 / 8%), transparent 30rem),
        linear-gradient(145deg, #fafbfe 0%, var(--app-canvas) 52%, #f3f5fb 100%);
    min-height: 100vh;
    margin: 0;
    min-width: 320px;
}

.navbar.bg-primary {
    background: linear-gradient(110deg, #3e336b 0%, var(--app-primary) 54%, #8578b5 100%) !important;
}

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--app-primary);
    --bs-btn-border-color: var(--app-primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--app-primary-dark);
    --bs-btn-hover-border-color: var(--app-primary-dark);
    --bs-btn-active-bg: var(--app-primary-dark);
    --bs-btn-active-border-color: var(--app-primary-dark);
    --bs-btn-disabled-bg: var(--app-primary);
    --bs-btn-disabled-border-color: var(--app-primary);
    background-image: linear-gradient(115deg, #7468aa, #9183c2);
    box-shadow: 0 0.25rem 0.65rem rgb(var(--app-primary-rgb) / 18%);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    background-image: linear-gradient(115deg, #675b9b, #8173b4);
}

.btn-outline-primary {
    --bs-btn-color: var(--app-primary-dark);
    --bs-btn-border-color: #b7afd9;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--app-primary);
    --bs-btn-hover-border-color: var(--app-primary);
    --bs-btn-active-bg: var(--app-primary-dark);
    --bs-btn-active-border-color: var(--app-primary-dark);
}

.card {
    border-color: #e8e9f1;
    background: linear-gradient(145deg, #fff 0%, #fcfcff 100%);
    box-shadow: 0 0.35rem 1.1rem rgb(54 55 84 / 5%);
}

.card-header {
    border-bottom-color: #ececf4;
    background: linear-gradient(100deg, #faf9fe 0%, #f8fbfc 100%);
}

.app-content-row > .col > main.container-fluid > .row.g-3 > section:nth-child(1) .card {
    background: linear-gradient(125deg, #f3f0fc 0%, #fff 88%);
}

.app-content-row > .col > main.container-fluid > .row.g-3 > section:nth-child(2) .card {
    background: linear-gradient(125deg, #edf8f7 0%, #fff 88%);
}

.app-content-row > .col > main.container-fluid > .row.g-3 > section:nth-child(3) .card {
    background: linear-gradient(125deg, #f8f0f5 0%, #fff 88%);
}

.app-content-row > .col > main.container-fluid > .row.g-3 > section:nth-child(4) .card {
    background: linear-gradient(125deg, #fbf6eb 0%, #fff 88%);
}

.form-control:focus,
.form-select:focus {
    border-color: #aaa0d2;
    box-shadow: 0 0 0 0.25rem rgb(var(--app-primary-rgb) / 18%);
}

.progress {
    --bs-progress-bg: #eeedf5;
}

.progress-bar {
    background: linear-gradient( 90deg, #594b8d, #9c95bf);
}

.table thead.table-light th {
    color: #5d5877;
    background: linear-gradient(100deg, #f3f1fa 0%, #f0f7f7 100%);
}

.form-control.invalid,
.form-select.invalid {
    border-color: var(--bs-form-invalid-border-color);
}

.app-content-row {
    min-height: calc(100vh - 56px);
    min-height: calc(100dvh - 56px);
}

.app-navigation {
    position: fixed;
    z-index: 1041;
    top: 56px;
    bottom: 0;
    left: 0;
    width: min(82vw, 320px);
    max-height: calc(100dvh - 56px);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-105%);
    visibility: hidden;
    box-shadow: none;
    transition: transform 240ms ease, visibility 240ms ease, box-shadow 240ms ease;
}

.app-navigation.is-open {
    transform: translateX(0);
    visibility: visible;
    box-shadow: 0 0.65rem 1.5rem rgb(82 72 132 / 14%);
}

.app-navigation-backdrop {
    position: fixed;
    z-index: 1040;
    inset: 56px 0 0;
    border: 0;
    background: rgb(0 0 0 / 40%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 240ms ease, visibility 240ms ease;
}

.app-navigation-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

@media (min-width: 992px) {

    .app-navigation,
    .app-navigation.is-open {
        position: relative;
        z-index: auto;
        top: auto;
        bottom: auto;
        left: auto;
        width: auto;
        transform: none;
        visibility: visible;
        max-height: none;
        overflow: visible;
        box-shadow: none;
    }

    .app-navigation-backdrop {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {

    .app-navigation,
    .app-navigation-backdrop {
        transition: none;
    }
}

.app-navigation .nav-link {
    margin: 0.125rem 0.5rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--bs-border-radius);
    color: var(--bs-secondary-color);
    transition: color 150ms ease, background-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.app-navigation .nav-link:hover,
.app-navigation .nav-link:focus-visible {
    color: var(--bs-primary-text-emphasis);
    background-color: var(--bs-primary-bg-subtle);
    box-shadow: 0 0.2rem 0.55rem rgb(var(--app-primary-rgb) / 10%);
}

.app-navigation .nav-link.active {
    color: var(--bs-primary-text-emphasis);
    background-color: var(--bs-primary-bg-subtle);
    font-weight: 600;
    box-shadow: inset 0.18rem 0 0 var(--app-primary), 0 0.15rem 0.45rem rgb(var(--app-primary-rgb) / 8%);
}

.app-navigation .nav-link:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgb(var(--bs-primary-rgb) / 25%);
}

@media (prefers-reduced-motion: reduce) {
    .app-navigation .nav-link {
        transition: none;
    }
}

.app-navigation .nav-link:hover {
    transform: translateX(2px);
}

.app-navigation .nav-link:focus-visible {
    transform: none;
}

.app-navigation .nav-link.active:hover {
    transform: none;
}

.app-navigation .nav-accordion-btn {
    margin: 0.125rem 0.5rem;
    padding: 0.625rem 0.75rem;
    border-radius: var(--bs-border-radius);
    color: var(--bs-secondary-color);
    background: transparent;
    border: none;
    font-size: 1rem;
    font-family: inherit;
    text-align: left;
    width: calc(100% - 1rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
    cursor: pointer;
}

.app-navigation .nav-accordion-btn:hover,
.app-navigation .nav-accordion-btn:focus-visible {
    color: var(--bs-primary-text-emphasis);
    background-color: var(--bs-primary-bg-subtle);
    outline: none;
}

.app-navigation .nav-submenu {
    padding-left: 0.75rem;
    margin-left: 0.75rem;
    border-left: 2px solid var(--bs-primary-border-subtle);
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}

.app-navigation .nav-submenu .nav-link {
    font-size: 0.9rem;
    padding: 0.45rem 0.6rem;
    margin: 0.1rem 0;
}

.card {
    box-shadow: 0 0.35rem 1.1rem rgb(54 55 84 / 7%), 0 0.08rem 0.25rem rgb(var(--app-primary-rgb) / 5%);
    transition: box-shadow 180ms ease, transform 180ms ease;
}

.card:hover {
    box-shadow: 0 0.55rem 1.35rem rgb(54 55 84 / 9%), 0 0.12rem 0.35rem rgb(var(--app-primary-rgb) / 7%);
}

.navbar.bg-primary {
    box-shadow: 0 0.25rem 0.9rem rgb(82 72 132 / 16%) !important;
}

@media (prefers-reduced-motion: reduce) {
    .card {
        transition: none;
    }
}

.signature-pad {
    border: 1px solid #e6e6e6;
    border-radius: 4px;
    display: block;
    margin-inline: auto;
    width: min(100%, 500px);
    max-width: 100%;
    height: 180px;
    touch-action: none;
}

.report-company-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #111;
    color: #111;
    text-align: left;
}

.report-company-name {
    font-size: 2rem;
    border-bottom: 1px solid;
    width: 100%;
    padding-bottom: 4px;
    margin-bottom: 13px;
    overflow-wrap: anywhere;
}

.report-company-details {
    font-size: 0.95rem;
    line-height: 1.35;
}

.report-company-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid #111;
    color: #111;
    font-size: 7.5pt;
    white-space: normal;
    overflow-wrap: anywhere;
}

.work-log-table-wrapper {
    width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}

.work-log-table {
    min-width: 1090px;
}

.work-log-table table {
    width: 100%;
    table-layout: fixed;
}

.work-log-table thead th {
    color: var(--app-primary-dark);
    font-weight: 700;
    white-space: nowrap;
}

.work-log-table th,
.work-log-table td {
    vertical-align: middle;
}

.work-log-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.work-log-table th:nth-child(1),
.work-log-table td:nth-child(1) {
    width: 170px;
    min-width: 170px;
}

.work-log-table th:nth-child(2),
.work-log-table th:nth-child(3),
.work-log-table td:nth-child(2),
.work-log-table td:nth-child(3) {
    width: 340px;
    min-width: 340px;
}

.work-log-table th:nth-child(4),
.work-log-table th:nth-child(5),
.work-log-table td:nth-child(4),
.work-log-table td:nth-child(5) {
    width: 70px;
    min-width: 70px;
}

.work-log-table th:nth-child(6),
.work-log-table td:nth-child(6) {
    width: 100px;
    min-width: 100px;
}

.work-date-picker {
    display: block;
    width: 100%;
    min-width: 157px;
}

.work-date-picker input {
    width: 100%;
}

.work-time-range {
    display: grid;
    width: 100%;
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 0.2rem;
    white-space: nowrap;
}

.work-time-separator {
    flex: 0 0 auto;
    color: #6c757d;
}

.work-time-picker {
    display: contents;
}

.work-time-part {
    width: 100%;
    min-width: 0;
    padding: 0.375rem 1rem 0.375rem 0.2rem;
    background-position: right 0.3rem center;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.work-travel-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    padding: 0.75rem 1rem;
    border: 1px solid #e4e1f0;
    border-radius: 4px;
    background: linear-gradient(115deg, #f5f3fb 0%, #f2f8f8 100%);
}

@media (min-width: 1200px) and (max-width: 1599.98px) {
    .work-log-table {
        min-width: 1000px;
    }

    .work-log-table th:nth-child(1),
    .work-log-table td:nth-child(1) {
        width: 150px;
        min-width: 150px;
    }

    .work-log-table th:nth-child(2),
    .work-log-table th:nth-child(3),
    .work-log-table td:nth-child(2),
    .work-log-table td:nth-child(3) {
        width: 320px;
        min-width: 320px;
    }

    .work-log-table th:nth-child(4),
    .work-log-table th:nth-child(5),
    .work-log-table td:nth-child(4),
    .work-log-table td:nth-child(5) {
        width: 65px;
        min-width: 65px;
    }

    .work-log-table th:nth-child(6),
    .work-log-table td:nth-child(6) {
        width: 90px;
        min-width: 90px;
    }
}

@media (max-width: 575.98px) {
    .report-company-name {
        font-size: 1.5rem;
    }

    .report-company-footer {
        justify-content: flex-start;
        gap: 0.35rem 0.75rem;
    }

    .work-travel-summary {
        gap: 0.75rem;
        align-items: flex-start;
    }
}

@media (max-width: 1199.98px) {
    .work-log-table-wrapper {
        overflow-x: hidden;
    }

    .work-log-table {
        min-width: 0;
        width: 100%;
        border: 0;
    }

    .work-log-table thead {
        display: none;
    }

    .work-log-table tbody {
        display: grid;
        gap: 0.75rem;
    }

    .work-log-table tbody tr {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        border: 1px solid #dee2e6;
        border-radius: 6px;
        overflow: hidden;
    }

    .work-log-table tbody td {
        display: flex;
        width: auto !important;
        min-width: 0 !important;
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        border: 0;
        border-bottom: 1px solid #e9ecef;
        padding: 0.625rem;
    }

    .work-log-table tbody td::before {
        margin-bottom: 0.35rem;
        color: #6c757d;
        font-size: 0.7rem;
        font-weight: 700;
    }

    .work-log-table tbody td:nth-child(1),
    .work-log-table tbody td:nth-child(2),
    .work-log-table tbody td:nth-child(3),
    .work-log-table tbody td:nth-child(6) {
        grid-column: 1 / -1;
    }

    .work-log-table tbody td:nth-child(1)::before {
        content: "DATA";
    }

    .work-log-table tbody td:nth-child(2)::before {
        content: "MATTINO";
    }

    .work-log-table tbody td:nth-child(3)::before {
        content: "POMERIGGIO";
    }

    .work-log-table tbody td:nth-child(4)::before {
        content: "PAUSA PRANZO";
    }

    .work-log-table tbody td:nth-child(5)::before {
        content: "PERNOTTAMENTO";
    }

    .work-log-table tbody td:nth-child(6) {
        align-items: flex-end;
        border-bottom: 0;
    }

    .work-log-table tbody td:nth-child(6)::before {
        content: "AZIONI";
    }

    .work-log-table .work-date-picker {
        min-width: 0;
    }

    .work-log-table .work-time-range {
        gap: 0.2rem;
    }

    .work-log-table .work-time-part {
        padding-right: 1rem;
        padding-left: 0.15rem;
        background-position: right 0.2rem center;
    }
}
