html { font-size: 15px; }
body { background: #fff; color: #1d2329; }
.navbar.bg-body-tertiary { background: #fff !important; box-shadow: 0 2px 8px rgba(16, 24, 40, .06); }
.card { box-shadow: 0 2px 6px rgba(16, 24, 40, .06); }

/* ---------- card 3D della home */
.tile-3d { perspective: 900px; }
.tile {
    --rx: 0deg; --ry: 0deg; --lift: 0px; --mx: 30%; --my: 20%;
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem;
    height: 170px; border-radius: 1.2rem; color: #fff; text-decoration: none; font-size: 1.3rem; font-weight: 700;
    letter-spacing: .02em; text-shadow: 0 2px 4px rgba(0,0,0,.45);
    transform-style: preserve-3d;
    transform: rotateX(var(--rx)) rotateY(var(--ry)) translateY(var(--lift));
    transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s;
    /* luce dall'alto a sinistra + ombra in basso: effetto rilievo */
    background-image:
        linear-gradient(155deg, rgba(255,255,255,.32) 0%, rgba(255,255,255,.06) 38%, rgba(0,0,0,.08) 60%, rgba(0,0,0,.38) 100%);
    border: 1px solid rgba(255,255,255,.18);
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,.45),      /* bordo superiore lucido */
        inset 0 -7px 0 rgba(0,0,0,.28),           /* spessore inferiore */
        inset 0 0 0 1px rgba(255,255,255,.06),
        0 8px 0 -1px rgba(0,0,0,.45),             /* lato della "piastrella" */
        0 22px 30px -6px rgba(0,0,0,.7),           /* ombra portata */
        0 40px 60px -20px rgba(0,0,0,.6);
}
/* riflesso che segue il puntatore */
.tile::after {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: radial-gradient(circle at var(--mx) var(--my), rgba(255,255,255,.35), rgba(255,255,255,0) 55%);
    opacity: .55; transition: opacity .25s; mix-blend-mode: overlay;
}
.tile i {
    font-size: 3.2rem; transform: translateZ(45px);
    filter: drop-shadow(0 8px 6px rgba(0,0,0,.45));
}
.tile span { transform: translateZ(28px); }
.tile:hover { --lift: -6px; color: #fff; }
.tile:hover::after { opacity: 1; }
.tile:active {
    --lift: 3px; transition-duration: .08s;
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,.35), inset 0 -3px 0 rgba(0,0,0,.28),
        0 3px 0 -1px rgba(0,0,0,.45), 0 8px 14px -4px rgba(0,0,0,.7);
}
@media (prefers-reduced-motion: reduce) { .tile { transition: none; } }

.table td, .table th { vertical-align: middle; }
.color-dot { display: inline-block; width: 1rem; height: 1rem; border-radius: 50%; vertical-align: middle; border: 1px solid #0006; }
.stat-card .display-6 { font-weight: 700; }

/* ---------- editor mappa sala (gestione) */
.mappa-editor { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: .75rem; overflow: hidden; border: 2px dashed #ffffff33; }
.mappa-editor .tav {
    position: absolute; width: 9%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
    background: #3a4756; color: #fff; font-weight: 700; border: 2px solid #ffffff66; border-radius: .5rem;
    cursor: grab; user-select: none; touch-action: none;
}
.mappa-editor .tav.Rotondo { border-radius: 50%; }
.mappa-editor .tav.Rettangolare { width: 14%; aspect-ratio: 1.6; }
.mappa-editor .tav.drag { cursor: grabbing; outline: 3px solid #ffc107; z-index: 10; }

/* ---------- colori reparti */
.rep-Bar { background: #0a7ea4 !important; color: #fff; }
.rep-Cucina { background: #b85c00 !important; color: #fff; }
.rep-Pizzeria { background: #c0392b !important; color: #fff; }

/* ---------- riordino con drag & drop (Gestione > Categorie / Prodotti) */
.maniglia { width: 2.2rem; text-align: center; cursor: grab; color: #8a939d; font-size: 1.25rem; touch-action: none; user-select: none; }
.maniglia:active { cursor: grabbing; }
tr.in-trascinamento > td { background: #fff3cd !important; box-shadow: inset 0 1px 0 #ffc107, inset 0 -1px 0 #ffc107; }
tbody[data-riordina] + tbody[data-riordina] { border-top: 2px solid #dee2e6; }
.riordina-salvo { opacity: .6; }
