:root {
    --vezzola-green: #008f3a;
    --vezzola-green-2: #00b957;
    --vezzola-dark: #1f1f1d;
    --vezzola-soft: #f5f7f5;
    --vezzola-line: rgba(31, 31, 29, 0.10);
    --vezzola-shadow: 0 18px 45px rgba(20, 35, 24, 0.12);
}

* { -webkit-tap-highlight-color: transparent; }

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(0, 143, 58, 0.18), transparent 28%),
        radial-gradient(circle at bottom right, rgba(0, 185, 87, 0.10), transparent 32%),
        linear-gradient(135deg, #f8faf8 0%, #e9eee9 100%);
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--vezzola-dark);
}

.app-container { max-width: 1180px; }

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px;
}

.login-shell {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.80);
    border-radius: 34px;
    box-shadow: var(--vezzola-shadow);
    overflow: hidden;
    backdrop-filter: blur(18px);
}

.login-hero {
    min-height: 580px;
    padding: 46px;
    align-items: flex-end;
    background:
        linear-gradient(145deg, rgba(0, 143, 58, 0.94), rgba(31, 31, 29, 0.92)),
        url('/static/img/logo.png') center 72px / 72% auto no-repeat;
    color: #fff;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.20);
    font-size: 0.9rem;
    margin-bottom: 22px;
}

.login-hero h2 {
    max-width: 430px;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.login-hero p {
    max-width: 430px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.05rem;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.hero-features div {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-features i { font-size: 1.35rem; }
.hero-features span { font-size: 0.88rem; font-weight: 700; }

.login-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.97);
    padding: 46px 40px;
}

.login-logo {
    max-width: 290px;
    width: 86%;
}

.login-title {
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--vezzola-dark);
}

.login-subtitle {
    color: #6c757d;
    margin-bottom: 0;
}

.form-label { color: #384039; }

.input-wow {
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
}

.input-wow .input-group-text {
    background: #f1f5f1;
    border-right: 0;
    color: var(--vezzola-green);
    border-radius: 16px 0 0 16px;
}

.input-wow .form-control {
    border-left: 0;
    border-radius: 0 16px 16px 0;
}

.input-wow .form-control:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 0.22rem rgba(0, 143, 58, 0.14);
    border-color: var(--vezzola-green);
}

.btn-vezzola {
    background: linear-gradient(135deg, var(--vezzola-green), var(--vezzola-green-2));
    color: white;
    border: 0;
    border-radius: 16px;
    padding: 12px 18px;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(0, 143, 58, 0.20);
}

.btn-vezzola:hover,
.btn-vezzola:focus {
    color: white;
    filter: brightness(0.97);
}

.login-footer {
    margin-top: 24px;
    text-align: center;
    color: #7b7b7b;
    font-size: 0.85rem;
}

.nav-vezzola {
    background: linear-gradient(135deg, #1f1f1d, #343a35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.nav-logo {
    height: 38px;
    background: white;
    padding: 4px 10px;
    border-radius: 10px;
}

.brand-text { font-weight: 850; letter-spacing: -0.02em; }
.user-pill {
    color: rgba(255,255,255,.82);
    background: rgba(255,255,255,.10);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.88rem;
}

.section-kicker {
    display: inline-block;
    color: var(--vezzola-green);
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .76rem;
    margin-bottom: 6px;
}

.welcome-box,
.request-card,
.menu-card,
.request-item,
.empty-state {
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(255,255,255,.90);
}

.welcome-box {
    border-radius: 28px;
    padding: 32px;
    border-left: 8px solid var(--vezzola-green);
}

.welcome-box h1,
.page-heading h1 {
    font-weight: 900;
    letter-spacing: -0.04em;
    margin-bottom: 6px;
}

.welcome-box p,
.page-heading p {
    color: #6c757d;
    margin-bottom: 0;
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.menu-card-link {
    text-decoration: none;
    color: inherit;
}

.menu-card {
    border-radius: 26px;
    padding: 28px;
    height: 100%;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.menu-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.10);
}

.primary-card::after {
    content: "";
    position: absolute;
    right: -50px;
    top: -50px;
    width: 150px;
    height: 150px;
    background: rgba(0, 143, 58, 0.08);
    border-radius: 50%;
}

.menu-icon {
    width: 62px;
    height: 62px;
    border-radius: 20px;
    background: rgba(0, 143, 58, 0.10);
    color: var(--vezzola-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    margin-bottom: 18px;
}

.menu-card h3 {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.menu-card p { color: #6c757d; }
.card-action { color: var(--vezzola-green); font-weight: 850; }
.disabled-card { opacity: 0.76; }

.request-card {
    border-radius: 30px;
    padding: 34px;
    border-top: 7px solid var(--vezzola-green);
}

.card-header { background: #f8faf8; }
.request-table thead th {
    color: #66706a;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom-color: var(--vezzola-line);
}
.request-table tbody td { padding-top: 1rem; padding-bottom: 1rem; }

.mobile-request-list { display: none; }
.request-item {
    border-radius: 22px;
    padding: 18px;
    margin-bottom: 14px;
}
.request-type { font-weight: 900; font-size: 1.05rem; }
.request-prog { color: #7a827c; font-size: .9rem; }
.request-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.request-grid div {
    background: #f6f8f6;
    border-radius: 16px;
    padding: 12px;
}
.request-grid span {
    display: block;
    color: #7a827c;
    font-size: .78rem;
    margin-bottom: 2px;
}
.request-grid strong { font-size: .92rem; }
.request-note {
    background: rgba(0, 143, 58, 0.08);
    color: #36523f;
    border-radius: 14px;
    padding: 10px 12px;
    font-size: .92rem;
}
.empty-state {
    border-radius: 22px;
    padding: 28px;
    text-align: center;
    color: #6c757d;
}
.empty-state i { font-size: 2rem; color: var(--vezzola-green); margin-bottom: 10px; }
.empty-state p { margin-bottom: 0; }

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

@media (max-width: 991.98px) {
    .login-shell { display: block; max-width: 520px; }
}

@media (max-width: 575.98px) {
    body {
        background:
            radial-gradient(circle at top, rgba(0, 143, 58, 0.16), transparent 34%),
            linear-gradient(180deg, #f8faf8 0%, #edf1ed 100%);
    }

    .login-page {
        align-items: flex-start;
        padding: 18px 14px;
    }

    .login-shell {
        border-radius: 26px;
        box-shadow: 0 16px 36px rgba(20, 35, 24, 0.14);
    }

    .login-card {
        padding: 30px 20px 24px;
        border-radius: 26px;
    }

    .login-logo { max-width: 235px; }
    .login-title { font-size: 1.45rem; }
    .login-subtitle { font-size: .95rem; }

    .form-control-lg,
    .form-select-lg,
    .btn-lg {
        font-size: 1rem;
        min-height: 50px;
    }

    .nav-logo { height: 32px; padding: 3px 7px; }
    .brand-text { font-size: .98rem; }
    .nav-exit-btn { border-radius: 999px; width: 38px; height: 34px; padding: 0; }

    .app-container { padding-left: 14px; padding-right: 14px; }
    .welcome-box,
    .request-card {
        border-radius: 24px;
        padding: 22px;
    }

    .welcome-box h1,
    .page-heading h1 { font-size: 1.65rem; }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .page-heading .btn,
    .back-btn { width: 100%; }

    .menu-card {
        border-radius: 22px;
        padding: 22px;
    }

    .desktop-table-card { display: none; }
    .mobile-request-list { display: block; }

    .form-actions {
        flex-direction: column-reverse;
    }
    .form-actions .btn { width: 100%; }
}

/* Fix mobile ferie/documenti - 22/06 */
.min-w-0 { min-width: 0; }
.compact-alert {
    padding: 14px 18px;
    margin-bottom: 16px;
}
.new-request-btn {
    white-space: nowrap;
}
.mobile-request-list {
    display: none;
}
.request-topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.request-status {
    flex: 0 0 auto;
}
.request-period {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    background: #f6f8f6;
    border-radius: 18px;
    padding: 12px;
}
.request-period span {
    display: block;
    color: #7a827c;
    font-size: .76rem;
    margin-bottom: 3px;
}
.request-period strong {
    display: block;
    font-size: .94rem;
    line-height: 1.2;
}
.request-period i {
    color: var(--vezzola-green);
    opacity: .7;
}
.form-actions-spaced {
    padding-top: 18px;
    border-top: 1px solid var(--vezzola-line);
}

@media (max-width: 767.98px) {
    .app-container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .compact-heading {
        gap: 14px;
        margin-bottom: 16px !important;
    }

    .compact-heading h1 {
        font-size: 1.65rem;
        line-height: 1.08;
    }

    .compact-heading .section-kicker {
        margin-bottom: 3px;
    }

    .new-request-btn {
        width: auto !important;
        min-width: 132px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .desktop-table-card {
        display: none !important;
    }

    .mobile-request-list {
        display: block !important;
    }

    .request-item.compact-request {
        border-radius: 22px;
        padding: 16px;
        margin-bottom: 12px;
    }

    .request-type {
        font-size: 1.05rem;
        line-height: 1.15;
    }

    .request-prog {
        font-size: .86rem;
        margin-top: 4px;
    }

    .request-note {
        font-size: .88rem;
        padding: 9px 11px;
    }

    .new-request-card {
        padding: 22px;
    }

    .new-request-card .page-heading {
        margin-bottom: 22px !important;
    }

    .new-request-card .page-heading h1 {
        font-size: 1.75rem;
    }

    .form-actions-spaced {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
        margin-top: 32px !important;
        padding-top: 20px;
    }

    .form-actions-spaced .btn {
        width: 100%;
        min-height: 54px;
    }

    .form-actions-spaced .btn-vezzola {
        margin-top: 2px;
    }
}

/* UI refresh richiesto - mobile app style con FontAwesome */
.dashboard-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
    padding: 30px;
    border-radius: 32px;
    background:
        radial-gradient(circle at top right, rgba(0, 185, 87, .20), transparent 34%),
        linear-gradient(135deg, rgba(255,255,255,.98), rgba(255,255,255,.86));
    border: 1px solid rgba(255,255,255,.95);
}
.dashboard-hero::after {
    content: "";
    position: absolute;
    width: 170px;
    height: 170px;
    right: -70px;
    bottom: -90px;
    border-radius: 999px;
    background: rgba(0, 143, 58, .10);
}
.hero-icon-wow {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--vezzola-green), var(--vezzola-green-2));
    box-shadow: 0 16px 28px rgba(0, 143, 58, .24);
}
.dashboard-hero h1 {
    margin: 0 0 6px;
    font-weight: 950;
    letter-spacing: -.045em;
    font-size: clamp(1.85rem, 4vw, 3rem);
}
.dashboard-hero p { margin: 0; color: #607068; }
.hero-main-action { min-height: 54px; display: inline-flex; align-items: center; justify-content: center; }
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.quick-action-card {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0,1fr) auto;
    grid-template-areas:
        "icon title arrow"
        "icon sub arrow";
    align-items: center;
    gap: 4px 14px;
    text-decoration: none;
    color: inherit;
    padding: 22px;
    min-height: 116px;
    border-radius: 26px;
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(255,255,255,.92);
    box-shadow: 0 12px 30px rgba(0,0,0,.06);
    transition: transform .18s ease, box-shadow .18s ease;
}
.quick-action-card:hover { color: inherit; transform: translateY(-3px); box-shadow: 0 18px 42px rgba(0,0,0,.10); }
.quick-action-primary { background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(238,255,246,.98)); }
.quick-action-icon {
    grid-area: icon;
    width: 56px;
    height: 56px;
    border-radius: 19px;
    display: grid;
    place-items: center;
    color: var(--vezzola-green);
    background: rgba(0, 143, 58, .10);
    font-size: 1.45rem;
}
.quick-action-title { grid-area: title; font-weight: 950; font-size: 1.05rem; letter-spacing: -.02em; }
.quick-action-subtitle { grid-area: sub; color: #6c757d; font-size: .92rem; }
.quick-action-arrow { grid-area: arrow; color: var(--vezzola-green); }
.quick-action-disabled { opacity: .76; }
.soon-pill {
    grid-area: arrow;
    color: #66706a;
    background: #eef2ee;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: .78rem;
    font-weight: 800;
}

.requests-heading h1,
.new-request-heading h1 { letter-spacing: -.045em; }
.request-card-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.request-smart-card {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    padding: 18px;
    background: rgba(255,255,255,.97);
    border: 1px solid rgba(255,255,255,.94);
}
.request-smart-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, var(--vezzola-green), var(--vezzola-green-2));
}
.request-smart-main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 15px;
    align-items: flex-start;
}
.request-smart-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: var(--vezzola-green);
    background: rgba(0,143,58,.10);
    font-size: 1.35rem;
}
.request-smart-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.request-smart-top h2 {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.18;
    font-weight: 950;
    letter-spacing: -.025em;
}
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: .76rem;
    font-weight: 950;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: .02em;
}
.status-ok { color: #08763a; background: rgba(25,135,84,.13); }
.status-ko { color: #a21725; background: rgba(220,53,69,.12); }
.status-wait { color: #806000; background: rgba(255,193,7,.22); }
.request-smart-date {
    margin-top: 13px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    color: #37433c;
    font-size: .98rem;
}
.request-smart-date i { color: var(--vezzola-green); }
.date-separator { color: #7a827c; margin: 0 2px; }
.request-smart-note {
    margin-top: 12px;
    border-radius: 15px;
    padding: 10px 12px;
    color: #40564a;
    background: #f4f8f4;
    font-size: .9rem;
}

.smart-form .form-label { margin-bottom: 8px; }
.smart-control {
    border-radius: 18px !important;
    border-color: rgba(31,31,29,.12);
    background-color: rgba(255,255,255,.96);
    box-shadow: 0 8px 18px rgba(0,0,0,.035);
}
.submit-wow-btn {
    min-width: 220px;
    min-height: 56px;
    font-size: 1.05rem;
}

@media (max-width: 767.98px) {
    .dashboard-hero {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 22px;
        border-radius: 26px;
    }
    .hero-icon-wow { width: 62px; height: 62px; border-radius: 21px; font-size: 1.65rem; }
    .hero-main-action { width: 100%; min-height: 56px; }
    .quick-actions-grid { grid-template-columns: 1fr; gap: 12px; }
    .quick-action-card { min-height: 96px; border-radius: 22px; padding: 18px; }
    .quick-action-icon { width: 50px; height: 50px; border-radius: 17px; }

    .requests-heading {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }
    .requests-heading h1 { font-size: 1.52rem; }
    .requests-heading .section-kicker { font-size: .68rem; }
    .requests-heading .new-request-btn {
        width: auto !important;
        min-width: 106px;
        flex: 0 0 auto;
        border-radius: 999px;
        padding: 11px 16px;
    }
    .request-card-list { grid-template-columns: 1fr; gap: 11px; }
    .request-smart-card { border-radius: 22px; padding: 15px 14px 15px 16px; }
    .request-smart-main { gap: 12px; }
    .request-smart-icon { width: 48px; height: 48px; border-radius: 16px; font-size: 1.2rem; }
    .request-smart-top { align-items: flex-start; }
    .request-smart-top h2 { font-size: 1rem; }
    .status-pill { padding: 6px 9px; font-size: .68rem; }
    .request-smart-date { margin-top: 9px; font-size: .92rem; line-height: 1.25; }
    .request-smart-note { margin-top: 9px; font-size: .84rem; padding: 8px 10px; }

    .new-request-card { padding: 22px 18px; }
    .smart-control { min-height: 52px; }
    .submit-wow-btn { width: 100%; min-height: 58px; }
}

/* 20260622 - 2FA + CRUD richieste */
.otp-input {
    font-size: 2rem !important;
    font-weight: 900;
    letter-spacing: .35rem;
}

.qr-wow-box {
    border-radius: 1.8rem;
    background: linear-gradient(135deg, #f3fbf6 0%, #ffffff 100%);
    border: 1px solid #dcefe4;
    padding: 1.4rem;
    box-shadow: 0 18px 40px rgba(29, 41, 57, .08);
}

.qr-wow-img {
    width: min(260px, 88vw);
    border-radius: 1.2rem;
    background: #fff;
    padding: .75rem;
    box-shadow: 0 12px 30px rgba(29, 41, 57, .10);
}

.manual-secret-box {
    border: 1px dashed #b7d9c5;
    border-radius: 1.25rem;
    padding: 1rem;
    background: #fbfffd;
}

.manual-secret-box summary {
    cursor: pointer;
    font-weight: 800;
    color: #157347;
}

.manual-secret-box code {
    display: block;
    margin-top: .75rem;
    white-space: normal;
    word-break: break-all;
    color: #1f2428;
}

.security-status-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #effaf4 100%);
    box-shadow: 0 14px 32px rgba(29, 41, 57, .08);
}

.security-status-card > i {
    width: 54px;
    height: 54px;
    border-radius: 19px;
    background: #e8f8ef;
    color: #009f45;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.45rem;
    flex: 0 0 auto;
}

.security-status-card p {
    margin: .15rem 0 0 0;
    color: #667085;
}

.request-actions {
    display: flex;
    gap: .55rem;
    flex-wrap: wrap;
}

.request-action-btn {
    border-radius: 999px;
    font-weight: 800;
    padding: .45rem .8rem;
}
