﻿body {
    padding-top: 50px;
    padding-bottom: 20px;
}

/* Set padding to keep content from hitting the edges */
.body-content {
    padding-left: 15px;
    padding-right: 15px;
}

/* Override the default bootstrap behavior where horizontal description lists 
   will truncate terms that are too long to fit in the left column 
*/
.dl-horizontal dt {
    white-space: normal;
}

/* Set width on the form input elements since they're 100% wide by default */
input,
select,
textarea {
    max-width: 280px;
}
/* ------------------------------ */
/*   FACTORIAL STYLE REWORK      */
/* ------------------------------ */

/* Font più moderno e compatto */
body {
    font-size: 0.92rem;
    background-color: #f7f8fa;
    color: #333;
    font-family: "Inter", "Segoe UI", sans-serif;
}

/* Titoli più eleganti */
h2, h3, h4 {
    font-weight: 600;
    color: #2b2b2b;
    margin-bottom: 0.8rem;
}

/* Card stile Factorial */
.card-factorial {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Tabelle più compatte e moderne */
.table-factorial {
    font-size: 0.88rem;
}

    .table-factorial th {
        background-color: #f1f3f5;
        font-weight: 600;
    }

    .table-factorial td,
    .table-factorial th {
        padding: 10px 12px;
        vertical-align: middle;
    }

/* Badge stile Factorial */
.badge-factorial {
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-bozza {
    background: #ced4da;
    color: #333;
}

.badge-inviata {
    background: #74c0fc;
    color: #fff;
}

.badge-approvata {
    background: #69db7c;
    color: #fff;
}

.badge-rifiutata {
    background: #ff6b6b;
    color: #fff;
}

/* Bottoni più moderni */
.btn-factorial {
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 600;
}

.spesify-header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

.spesify-header-logo {
    height: 42px;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15));
}

@keyframes fadeInWelcome {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Overlay upload */
#overlayUpload {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(2px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* Spinner elegante */
.loader {
    border: 5px solid rgba(255,255,255,0.3);
    border-top: 5px solid white;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* CARD GENERALI — FIX DEFINITIVA */
.card {
    border-radius: 18px !important;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08) !important;
    /* NON TOCCARE IL BORDER QUI */
}

/* CARD DASHBOARD — BORDO VERDE */
.card-dashboard {
    border: 2px solid #0B7A4B !important;
}

/* TITOLI SEZIONI */
h3 {
    font-weight: 700 !important;
    color: #0B7A4B !important;
    margin-bottom: 14px !important;
}

/* LABEL */
strong {
    font-weight: 600 !important;
    color: #333 !important;
}

/* VALORI */
.nota-value,
td,
span,
div {
    font-size: 16px;
}

/* COMMENTO */
.p-3.bg-light.rounded {
    background: #F7F7F7 !important;
    border-radius: 12px !important;
    padding: 14px !important;
    font-size: 16px !important;
}

/* TABELLE */
.table-hover tbody tr:hover {
    background-color: #f5fdf8 !important;
}

.table-success th {
    background-color: #0B7A4B !important;
    color: white !important;
    font-weight: 600 !important;
}

/* BADGE STATO */
.badge {
    font-size: 16px !important;
    padding: 8px 14px !important;
    border-radius: 12px !important;
}

/* BOTTONI */
.btn {
    border-radius: 10px !important;
    font-weight: 600 !important;
}

.btn-primary {
    background-color: #0B7A4B !important;
    border-color: #0B7A4B !important;
}

.btn-warning {
    background-color: #ffb703 !important;
    border-color: #ffb703 !important;
    color: #000 !important;
}

.btn-danger {
    background-color: #d62828 !important;
    border-color: #d62828 !important;
}

.btn-success {
    background-color: #0B7A4B !important;
    border-color: #0B7A4B !important;
}

/* CARD PRINCIPALE DETTAGLIO */
.card.shadow-sm.p-4.mb-5 {
    background: #f4fbf7 !important;
    border-radius: 18px !important;
}

    .card.shadow-sm.p-4.mb-5 h3 {
        font-size: 28px !important;
        letter-spacing: 1px;
        text-transform: uppercase;
    }

/* SEZIONE 1 — MOBILE FIRST */
.dati-nota-mobile {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.info-block {
    background: #ffffff;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid #e6e6e6;
}

.info-label {
    font-size: 15px;
    font-weight: 600;
    color: #555;
    margin-bottom: 4px;
}

.info-value {
    font-size: 17px;
    font-weight: 700;
    color: #222;
}

.info-total {
    font-size: 22px;
    font-weight: 800;
    color: #0B7A4B;
}

.badge-large {
    font-size: 16px !important;
    padding: 10px 16px !important;
    border-radius: 10px !important;
}

.comment-box {
    font-size: 16px;
    line-height: 1.4;
}

.spese-sep-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    border-radius: 14px;
    padding: 14px 18px;
    margin: 35px 0 20px 0;
    border: 2px solid #e5e5e5;
    font-weight: 800;
    font-size: 18px;
}

.sep-icon {
    font-size: 24px;
}

.sep-title {
    font-size: 18px;
    font-weight: 800;
}

.sep-km {
    border-color: #0d6efd;
    background: #e8f1ff;
}

.sep-ord {
    border-color: #198754;
    background: #e9f7ef;
}

.sep-diaria {
    border-color: #ffc107;
    background: #fff8e1;
}

/* DIVISORI DI SEZIONE */
.spese-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    margin: 40px 0 25px 0;
    font-size: 20px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.divider-icon {
    font-size: 26px;
}

.divider-text {
    font-size: 20px;
    font-weight: 900;
}

.divider-km {
    border-top: 4px solid #0d6efd;
    border-bottom: 4px solid #0d6efd;
    color: #0d6efd;
}

.spese-divider-green {
    border: none !important;
    border-top: 8px solid #0B7A4B !important;
    margin: 40px 0 30px 0 !important;
    height: 0 !important;
    display: block !important;
    opacity: 1 !important;
}

/* Bottoni finali della nota */
.btn-nota {
    width: auto !important;
    display: inline-block !important;
    padding-left: 28px;
    padding-right: 28px;
}

@media (max-width: 576px) {
    .btn-nota {
        width: 100% !important;
        display: block !important;
    }
}
/*.card {
    border: 2px solid #0B7A4B !important;
}*/
.card-blue {
    border: 2px solid #007bff !important;
    color: #007bff;
}

.card-green {
    border: 2px solid #28a745 !important;
    color: #28a745;
}

.card-yellow {
    border: 2px solid #ffc107 !important;
    color: #ffc107;
}

.card-teal {
    border: 2px solid #17a2b8 !important;
    color: #17a2b8;
}
