html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}
.nav-tabs{
    box-shadow:none!important;
    border-bottom:0px!important;
}
.nav-item{
    border:0px!important;
    border-radius:13px;
}
.nav-link {
    border: 0px !important;
    border-radius: 15px 15px 0 0;
    box-shadow: 0 0 20px 0 #ddd;
    color: var(--primary-orange);
}
.nav-link.active { 
    background: var(--primary-orange)!important;
}
.nav-link:hover { 
    color: var(--bg-orange)!important;
}
html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}
:root {
    --primary-orange: #f97316;
    --bg-orange: #ffe6c6;
    --primary-dark: #0f172a;
    --bg-warm: #fcf8f5;
    --sidebar-bg: #ffffff;
    --text-main: #334155;
    --border-color: #e2e8f0;
}

body.lofatturo-body {
    background-color: var(--bg-warm);
    color: var(--text-main);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
}
/* 1. Dimensioni generali della scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

/* 2. Sfondo della traccia trasparente */
::-webkit-scrollbar-track {
    background: transparent;
}

/* 3. Maniglia (thumb) con sfumatura arancione e bordi arrotondati */
::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #FFAA33, #FF5500);
    border-radius: 10px;
}

    /* 4. Sfumatura pił intensa al passaggio del mouse */
    ::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(135deg, #FFBB55, #E04400);
    }

/* 5. Blocco totale e forzato dei pulsanti/frecce (su tutti gli stati) */
::-webkit-scrollbar-button,
::-webkit-scrollbar-button:start,
::-webkit-scrollbar-button:end,
::-webkit-scrollbar-button:single-button,
::-webkit-scrollbar-button:decrement,
::-webkit-scrollbar-button:increment {
    display: none !important;
    height: 0 !important;
    width: 0 !important;
    background: transparent !important;
}
::-webkit-scrollbar-button {
    display: none;
}
/* 6. Per Firefox */


/* Layout a griglia / flex per sidebar fissa */
.app-container {
    display: flex;
    min-height: 100vh;
}
.container{
    margin-left:50px;
    margin-right:50px;
}

/* Sidebar Styling */
.sidebar {
    overflow:auto;
    width: 300px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s ease-in-out;
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 10px;
}

.logo-badge {
    background-color: var(--primary-orange);
    color: white;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.3);
}

.brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.sidebar-menu {
    padding: 1rem;
    margin: 0;
    flex-grow: 1;
    height: -webkit-fill-available;
    overflow: auto;
}

.sidebar-item {
    margin-bottom: 0.5rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 500;
    font-size:15px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

    .sidebar-link:hover, .sidebar-link.active {
        background-color: var(--bg-orange);
        color: var(--primary-orange);
    }

    .sidebar-link i {
        width: 20px;
        text-align: center;
    }

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* Main Content Area */
.main-content-wrapper {
    margin-left:300px; /* Lascia spazio alla sidebar fissa */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-menu-toggle, .btn-toggle-sidebar {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--primary-dark);
}

.mobile-title {
    font-weight: bold;
    color: var(--primary-dark);
}

.content-area {
    padding: 2rem;
    flex-grow: 1;
}
.btn {
    border-radius: 50px;
    /*padding: 0.5rem 1.5rem;*/
    font-weight: 500;
    border-width:2px;
}
/* Stili coerenti per card e bottoni ispirati allo screen */
.text-primary { 
     color: var(--primary-orange)!important;
}
.border-primary { 
    border-color: var(--primary-orange)!important;
}
.btn-primary, .btn-dark {
    background-color: var(--primary-orange);
    border-color: var(--primary-orange);
}
.btn-outline-primary  { 
    border-color: var(--primary-orange);
    color:var(--primary-orange);
}

    .btn-primary:hover, .btn-dark:hover {
        background-color: #1e293b;
        border-color: #1e293b;
    }
    .btn-outline-primary:hover  {
        background-color: var(--primary-orange);
        border-color:var(--primary-orange);
    }

.card {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    overflow:hidden;
}
.card-header{
    border:0!important;
    background-color:var(--bg-orange);
}
/* Responsive per dispositivi mobili */
@media (max-width: 767.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

        .sidebar.active {
            transform: translateX(0);
        }

    .main-content-wrapper {
        margin-left: 0;
    }
}