/* Compact tables: smaller padding, tighter line-height and controls */
.table.table-compact > :not(caption) > * > * { padding: .08rem .2rem; }
.table-compact { font-size: .80rem; line-height: 1.0; }
.table-compact td, .table-compact th { vertical-align: middle; }
.table-compact .badge { padding: .20rem .30rem; font-size: .70rem; border-radius: .5rem; }
.table-compact .form-control-sm,
.table-compact .form-select-sm,
.table-compact input[type="time"],
.table-compact input[type="date"] {
    padding: .05rem .25rem; height: 24px; min-height: 24px; font-size: .80rem;
}
.table-compact select.form-select-sm option { font-size: .80rem; }
.table-compact .btn.btn-sm { padding: .12rem .30rem; font-size: .75rem; }
/*.col-md-1-7 {
    width: 14.285714285714285%;
    float: left;
    padding-left: 2px;
    padding-right: 2px;
    box-sizing: border-box;
}
.table {
    font-size: 12px;
}
.card-title {
    font-size: 14px;
    font-weight: bold;
}
.card-header small {
    font-size: 12px;
}
.table th, .table td {
    padding: 4px;
}
.table td {
    white-space: nowrap;
}
*/

/* AdminLTE 4 sidebar tweaks */
.app-sidebar .brand-link .brand-image {
    max-height: 33px; /* match AdminLTE 4 default */
    width: auto;
}
.app-sidebar .brand-link {
    padding: 0.8125rem .5rem;
}
/* Brand styling: yellow band like Reset PWD item */
.app-sidebar .sidebar-brand {
    background-color: #FFC107; /* Bootstrap warning */
}
.app-sidebar .sidebar-brand .brand-link {
    color: #000 !important;
    background: transparent; /* band is on the container */
    display: flex;
    align-items: center;
    gap: .5rem;
}
.app-sidebar .sidebar-brand .brand-text {
    color: #000 !important; /* black text over yellow band */
    font-family: var(--bs-body-font-family, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif);
    font-weight: 400; /* normal weight, initials will be bold */
}
.app-sidebar .sidebar-brand .brand-image {
    background: transparent; /* rely on band background */
    padding: 0;
    border-radius: 0;
}
/* Bold only the initials F and B */
.app-sidebar .sidebar-brand .brand-text .brand-initial {
    font-weight: 800;
}
/* Ensure the sidebar content scrolls independently when taller than viewport */
.app-sidebar .sidebar-wrapper {
        height: calc(100vh - 56px); /* subtract approx header height; adjust if header taller */
        overflow: hidden; /* let OverlayScrollbars manage it; fallback below */
}
@media (min-width: 992px) {
    .app-header.navbar { min-height: 56px; }
}
/* Fallback if OverlayScrollbars not loaded */
.app-sidebar .sidebar-wrapper:not(.os-host) {
        overflow-y: auto;
        overflow-x: hidden;
}
/* Optional theme colors for links on dark sidebar */
.app-sidebar[data-bs-theme="dark"] .sidebar-menu .nav-link {
    color: #FFC107;
}
.app-sidebar[data-bs-theme="dark"] .sidebar-menu .nav-link:hover {
    background-color: #495057;
    color: #FFD54F;
}

/* Compact sidebar spacing and font size (only visual tightening) */
.app-sidebar .sidebar-menu .nav-link {
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    padding-left: 0.75rem;
    padding-right: 0.5rem;
    font-size: 0.92rem;
    line-height: 1.2;
}
.app-sidebar .sidebar-menu .nav-treeview .nav-link {
    padding-top: 0.30rem;
    padding-bottom: 0.30rem;
    padding-left: 1.25rem; /* slight indent for children */
    font-size: 0.90rem;
}
.app-sidebar .sidebar-menu .nav-icon {
    font-size: 1rem; /* slightly smaller icons to match tighter layout */
    margin-right: 0.5rem;
}
.app-sidebar .nav-header {
    padding: 0.25rem 0.75rem;
    margin: 0.25rem 0;
    font-size: 0.78rem;
    letter-spacing: .02em;
}

/* Light scrollbars inside dark sidebar when using OverlayScrollbars */
.app-sidebar .os-scrollbar-horizontal, .app-sidebar .os-scrollbar-vertical {
    --os-size: 8px;
}

/* Adjust when mini (let AdminLTE handle transitions and hover expansion) */
body.sidebar-mini.sidebar-collapse .app-main { transition: margin-left .2s ease-in-out; }

/* (fullscreen feature removed) */

/* ------- Widget stato navbar (attività, commessa, timbratura) ------- */
.ua-group { display:flex; align-items:stretch; gap:.5rem; padding:0; }
.ua-box { --ua-bg:#6c757d; --ua-fg:#fff; background:var(--ua-bg); color:var(--ua-fg); min-width:88px; padding:.35rem .55rem .30rem; border-radius:.55rem; font-size:.70rem; font-weight:600; line-height:1.05; display:flex; flex-direction:column; justify-content:center; text-align:center; position:relative; box-shadow:inset 0 0 0 1px rgba(255,255,255,.18), 0 1px 2px rgba(0,0,0,.25); letter-spacing:.25px; user-select:none; text-decoration:none; margin:0; }
.ua-box .ua-label { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:120px; }
.ua-box.ua-attivita .ua-label { font-weight:700; }
.ua-box .ua-time { font-size:.60rem; font-weight:500; opacity:.85; margin-top:2px; letter-spacing:.5px; }
.navbar-nav .ua-group { padding:.25rem 0; }
/* Spazio uniforme tra gruppi (attività vs timbratura) */
.navbar-nav .ua-group + .ua-group { margin-left:.5rem; }
@media (max-width: 992px) { .ua-group { gap:.35rem; } .ua-box { min-width:70px; padding:.30rem .45rem .25rem; } .ua-box .ua-label { max-width:90px; } }

/* ------- Page Title (content-header h1) ------- */
.content-header h1, .page-title-primary { 
    font-size: clamp(1.05rem, 1.5vw + .6rem, 1.55rem); /* ridotto rispetto default AdminLTE */
    font-weight: 600;
    letter-spacing: .5px;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    margin: 0;
    line-height: 1.15;
    position: relative;
}
.content-header h1:before { /* Accent bar */
    content: '';
    width: 6px;
    height: 1.35em;
    background: linear-gradient(180deg,#FFC107,#ff9800);
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.15);
}
/* Optional subtle underline */
.content-header h1:after {
    content: '';
    position: absolute;
    left: 0.4rem;
    bottom: -4px;
    width: 42%;
    max-width: 160px;
    height: 2px;
    background: linear-gradient(90deg,#ffca2c 0%, rgba(255,202,44,0) 100%);
    border-radius: 2px;
    opacity: .9;
}
/* Smaller breadcrumb column or additional controls alignment fix */
.content-header .row.mb-2 { align-items: center; }
.content-header .col-sm-6 + .col-sm-6 { text-align: right; }

/* Dark mode tweak if used */
[data-bs-theme="dark"] .content-header h1:before { box-shadow: 0 0 0 1px rgba(255,255,255,.08), 0 1px 2px rgba(0,0,0,.6); }
[data-bs-theme="dark"] .content-header h1:after { opacity:.7; }

/* Turno row global override */
.turno-row, .turno-row>th, .turno-row>td { background-color: var(--back, #343a40) !important; color: var(--fore, #fff) !important; }
.turno-row a { color: inherit; }

/* --- Sidebar tiny color dots for RealTime / Metabase --- */
.nav-circle {
    width: .65rem; height: .65rem; border-radius:50%; display:inline-block; margin-right:.55rem; box-shadow:0 0 0 2px rgba(255,255,255,.15), 0 1px 2px rgba(0,0,0,.4); flex:0 0 .65rem; position:relative; top:1px;
}
.nav-circle.nav-circle-green { background:#7DFA9A; }
.nav-circle.nav-circle-orange { background:#FFB255; }
.nav-circle.nav-circle-blue { background:#55B9FF; }
/* High contrast fallback if forced-colors */
@media (forced-colors: active){
    .nav-circle { forced-color-adjust: none; border:1px solid GrayText; }
}

/* ------- Small box widget tweaks ------- */
.small-box.sb-a4 { position:relative; border-radius:.75rem; overflow:hidden; box-shadow:0 2px 4px rgba(0,0,0,.15); color:#fff; }
.small-box.sb-a4 .small-box-body { display:flex; align-items:stretch; justify-content:space-between; padding:.85rem .95rem; gap:.75rem; }
.small-box.sb-a4 .inner { flex:1 1 auto; }
.small-box.sb-a4 .small-box-number { font-size:1.55rem; font-weight:700; line-height:1.1; }
.small-box.sb-a4 .small-box-text { font-size:.75rem; letter-spacing:.5px; text-transform:uppercase; font-weight:500; opacity:.9; }
.small-box.sb-a4 .icon { font-size:2.5rem; line-height:1; align-self:center; opacity:.25; transition:opacity .25s; }
.small-box.sb-a4:hover .icon { opacity:.4; }
.small-box.sb-a4 .small-box-footer { display:block; padding:.45rem .75rem; background:rgba(0,0,0,.15); color:#fff; font-size:.7rem; text-transform:uppercase; font-weight:600; letter-spacing:.5px; text-decoration:none; }
.small-box.sb-a4 .small-box-footer:hover { background:rgba(0,0,0,.25); color:#fff; }
@media (max-width: 575.98px) { .small-box.sb-a4 .icon { font-size:2rem; } }


/* ------- Preloader full-screen overlay + slide-up exit ------- */
.preloader {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-body-bg, #fff);
    width: 100vw;
    height: 100vh;
    transform: translateY(0);
    transition: transform .45s ease;
    will-change: transform;
}
.preloader.slide-up { transform: translateY(-100%); }
.preloader img { max-width: min(60vw, 360px); height: auto; }
@media (prefers-reduced-motion: reduce) {
    .preloader { transition: none; }
}

/* Shake animation used by AdminLTE's animation__shake (fallback) */
@keyframes a4-shake-x {
    0% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); }
    20%, 40%, 60%, 80% { transform: translateX(6px); }
    100% { transform: translateX(0); }
}
.animation__shake { animation: a4-shake-x .8s cubic-bezier(.36,.07,.19,.97) infinite; }



/* Accessibility: honor reduced motion */
@media (prefers-reduced-motion: reduce) {
    .shake, .shake-infinite, .shake-once, .shake-hover:hover { animation: none !important; }
}


/* ---- Login page: inner login box in FastBee light gray ---- */
.gradient-card { background: #f3f4f6 !important; }

/* Lighten inputs for username/password on login page */
body.login-page .input-group-text { background: #e5e7eb !important; color: #111827 !important; border-color: #d1d5db !important; }
body.login-page .form-control { background: #f8fafc !important; color: #111827 !important; border-color: #d1d5db !important; }
body.login-page .form-control::placeholder { color: #6b7280 !important; }
body.login-page .form-control:focus { background: #ffffff !important; border-color: #FFC107 !important; box-shadow: 0 0 0 .2rem rgba(255,193,7,.22) !important; }
body.login-page .login-box-msg { color: #374151 !important; }

/* Outer login frame: make solid, remove gradient glow */
.outer-frame { background: transparent !important; border: 1px solid rgba(255,255,255,0.12) !important; box-shadow: none !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
.outer-frame::before { content: none !important; display: none !important; }


