/* ============================================================
   ND HUB Mobility — design system tema scuro
   ============================================================ */

/* ------------------------------------------------------------
   Tokens
   ------------------------------------------------------------ */
:root {
    --nd-bg: #07090d;
    --nd-bg2: #0b0e14;
    --nd-card: #10141c;
    --nd-card2: #151a24;
    --nd-border: #1e2432;
    --nd-border2: #2a3346;
    --nd-text: #f2f5fa;
    --nd-muted: #8b93a7;
    --nd-muted2: #5d6579;
    --nd-blue: #2563eb;
    --nd-blue2: #3b82f6;
    --nd-blue-soft: rgba(59, 130, 246, .14);
    --nd-green: #22c55e;
    --nd-green-soft: rgba(34, 197, 94, .14);
    --nd-orange: #f59e0b;
    --nd-orange-soft: rgba(245, 158, 11, .15);
    --nd-red: #ef4444;
    --nd-red-soft: rgba(239, 68, 68, .14);
    --nd-purple: #8b5cf6;
    --nd-purple-soft: rgba(139, 92, 246, .15);
    --nd-cyan: #22d3ee;
    --nd-cyan-soft: rgba(34, 211, 238, .13);
    --nd-radius: 14px;
    --nd-radius-sm: 10px;
    --nd-font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ------------------------------------------------------------
   Base
   ------------------------------------------------------------ */
body.nd-app {
    background: var(--nd-bg);
    color: var(--nd-text);
    font-family: var(--nd-font);
    min-height: 100vh;
}

.nd-app ::selection {
    background: var(--nd-blue);
    color: #fff;
}

.nd-app ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.nd-app ::-webkit-scrollbar-track {
    background: var(--nd-bg2);
}

.nd-app ::-webkit-scrollbar-thumb {
    background: var(--nd-border2);
    border-radius: 4px;
}

.nd-app a {
    color: inherit;
}

.text-muted-nd {
    color: var(--nd-muted) !important;
}

.fw-600 {
    font-weight: 600;
}

/* ------------------------------------------------------------
   Shell / sidebar / main
   ------------------------------------------------------------ */
.nd-shell {
    display: flex;
    min-height: 100vh;
}

.nd-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 250px;
    background: var(--nd-bg2);
    border-right: 1px solid var(--nd-border);
    padding: 22px 14px;
    display: flex;
    flex-direction: column;
    z-index: 1010;
}

.nd-sidebar .nd-logo {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: .04em;
    padding: 0 12px 22px;
}

.nd-logo__nd {
    background: linear-gradient(90deg, var(--nd-blue), var(--nd-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.nd-logo__sub {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .35em;
    color: var(--nd-muted);
    margin-top: 2px;
}

.nd-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nd-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--nd-radius-sm);
    color: var(--nd-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    transition: background .15s, color .15s;
}

.nd-nav a:hover {
    background: var(--nd-card);
    color: var(--nd-text);
}

.nd-nav a.active {
    background: var(--nd-blue-soft);
    color: var(--nd-blue2);
}

.nd-nav a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 2px;
    background: var(--nd-blue2);
}

.nd-nav__badge {
    margin-left: auto;
    background: var(--nd-blue);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
}

.nd-nav--bottom {
    margin-top: auto;
    border-top: 1px solid var(--nd-border);
    padding-top: 10px;
}

.nd-nav .nd-nav-exit {
    color: var(--nd-red);
}

.nd-nav .nd-nav-exit:hover {
    background: var(--nd-red-soft);
    color: var(--nd-red);
}

.nd-main {
    flex: 1;
    margin-left: 250px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* ------------------------------------------------------------
   Topbar
   ------------------------------------------------------------ */
.nd-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    max-width: 1080px;
    width: 100%;
    margin: 0 auto;
}

.nd-topbar__hello {
    font-size: 15px;
    color: var(--nd-muted);
}

.nd-topbar__hello strong {
    color: var(--nd-text);
}

.nd-topbar__actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nd-bell {
    position: relative;
    color: var(--nd-muted);
    text-decoration: none;
    display: inline-flex;
}

.nd-bell:hover {
    color: var(--nd-text);
}

.nd-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--nd-red);
    border: 2px solid var(--nd-bg);
}

.nd-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--nd-blue);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
}

.nd-avatar:hover {
    color: #fff;
}

.nd-avatar--lg {
    width: 84px;
    height: 84px;
    font-size: 28px;
    display: flex;
}

/* ------------------------------------------------------------
   Content
   ------------------------------------------------------------ */
.nd-content {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 8px 24px 40px;
    flex: 1;
}

/* ------------------------------------------------------------
   Card / stat
   ------------------------------------------------------------ */
.nd-card {
    background: var(--nd-card);
    border: 1px solid var(--nd-border);
    border-radius: var(--nd-radius);
    padding: 16px;
}

.nd-grid-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.nd-grid-stats--2 {
    grid-template-columns: repeat(2, 1fr);
}

.nd-grid-stats--3 {
    grid-template-columns: repeat(3, 1fr);
}

.nd-stat__icon {
    width: 38px;
    height: 38px;
    border-radius: var(--nd-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    background: var(--nd-blue-soft);
    color: var(--nd-blue2);
}

.nd-stat--green .nd-stat__icon {
    background: var(--nd-green-soft);
    color: var(--nd-green);
}

.nd-stat--orange .nd-stat__icon {
    background: var(--nd-orange-soft);
    color: var(--nd-orange);
}

.nd-stat--purple .nd-stat__icon {
    background: var(--nd-purple-soft);
    color: var(--nd-purple);
}

.nd-stat__num {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.15;
}

.nd-stat__label {
    font-size: 12px;
    color: var(--nd-muted);
    margin-top: 2px;
}

/* ------------------------------------------------------------
   Badge
   ------------------------------------------------------------ */
.nd-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .03em;
    white-space: nowrap;
}

.nd-badge--blue {
    background: var(--nd-blue-soft);
    color: var(--nd-blue2);
}

.nd-badge--green {
    background: var(--nd-green-soft);
    color: var(--nd-green);
}

.nd-badge--orange {
    background: var(--nd-orange-soft);
    color: var(--nd-orange);
}

.nd-badge--red {
    background: var(--nd-red-soft);
    color: var(--nd-red);
}

.nd-badge--cyan {
    background: var(--nd-cyan-soft);
    color: var(--nd-cyan);
}

.nd-badge--purple {
    background: var(--nd-purple-soft);
    color: var(--nd-purple);
}

.nd-badge--gray {
    background: rgba(139, 147, 167, .14);
    color: var(--nd-muted);
}

.nd-badge--gray-green {
    background: rgba(34, 197, 94, .08);
    color: rgba(34, 197, 94, .75);
}

/* ------------------------------------------------------------
   Bottoni
   ------------------------------------------------------------ */
.nd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--nd-blue);
    color: #fff;
    border: 1px solid var(--nd-blue);
    border-radius: var(--nd-radius-sm);
    padding: 11px 20px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}

.nd-btn:hover {
    background: var(--nd-blue2);
    border-color: var(--nd-blue2);
    color: #fff;
}

.nd-btn--block {
    display: flex;
    width: 100%;
}

.nd-btn--outline {
    background: transparent;
    border-color: var(--nd-border2);
    color: var(--nd-text);
}

.nd-btn--outline:hover {
    background: var(--nd-card2);
    border-color: var(--nd-blue2);
    color: var(--nd-text);
}

.nd-btn--danger {
    background: var(--nd-red);
    border-color: var(--nd-red);
    color: #fff;
}

.nd-btn--danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.nd-btn--outline.nd-btn--danger {
    background: transparent;
    border-color: var(--nd-red);
    color: var(--nd-red);
}

.nd-btn--outline.nd-btn--danger:hover {
    background: var(--nd-red-soft);
    color: var(--nd-red);
}

.nd-btn--green {
    background: var(--nd-green);
    border-color: var(--nd-green);
    color: #06240f;
}

.nd-btn--green:hover {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

.nd-btn--ghost {
    background: transparent;
    border-color: transparent;
    color: var(--nd-muted);
}

.nd-btn--ghost:hover {
    background: var(--nd-card2);
    color: var(--nd-text);
}

.nd-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--nd-radius-sm);
    color: var(--nd-muted);
    text-decoration: none;
    transition: background .15s, color .15s;
}

.nd-icon-btn:hover {
    background: var(--nd-card2);
    color: var(--nd-text);
}

.nd-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--nd-radius-sm);
    border: 1px solid var(--nd-border);
    background: var(--nd-card);
    color: var(--nd-muted);
    text-decoration: none;
    flex-shrink: 0;
    transition: border-color .15s, color .15s;
}

.nd-back:hover {
    border-color: var(--nd-blue2);
    color: var(--nd-text);
}

/* ------------------------------------------------------------
   Form
   ------------------------------------------------------------ */
.nd-field label {
    display: block;
    font-size: 12px;
    color: var(--nd-muted);
    margin-bottom: 4px;
    font-weight: 500;
}

.nd-input,
input.nd-input,
select.nd-input,
textarea.nd-input {
    display: block;
    width: 100%;
    background: var(--nd-bg2);
    border: 1px solid var(--nd-border);
    border-radius: var(--nd-radius-sm);
    color: var(--nd-text);
    padding: 10px 12px;
    font-size: 14px;
    font-family: var(--nd-font);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.nd-input:focus {
    border-color: var(--nd-blue2);
    box-shadow: 0 0 0 3px var(--nd-blue-soft);
    background: var(--nd-bg2);
    color: var(--nd-text);
}

.nd-input::placeholder {
    color: var(--nd-muted2);
}

select.nd-input {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b93a7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

select.nd-input option {
    background: var(--nd-bg2);
    color: var(--nd-text);
}

.nd-input--search {
    border-radius: 24px;
    padding-left: 18px;
}

input[type="date"].nd-input::-webkit-calendar-picker-indicator {
    filter: invert(.7);
}

/* Righe servizio con checkbox custom */
.nd-check-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--nd-border);
    border-radius: var(--nd-radius-sm);
    background: var(--nd-bg2);
    padding: 12px 14px;
    cursor: pointer;
    font-size: 14px;
    transition: border-color .15s, background .15s;
}

.nd-check-row:hover {
    border-color: var(--nd-border2);
}

.nd-check-row:has(input:checked) {
    border-color: var(--nd-blue2);
    background: var(--nd-blue-soft);
}

.nd-check {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--nd-border2);
    border-radius: 6px;
    background: var(--nd-bg2);
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: background .15s, border-color .15s;
}

.nd-check:checked {
    background: var(--nd-blue);
    border-color: var(--nd-blue);
}

.nd-check:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.nd-price {
    font-weight: 600;
    white-space: nowrap;
}

.nd-cat-heading {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    color: var(--nd-muted2);
    margin: 14px 0 8px;
}

.nd-total-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    bottom: 0;
    background: var(--nd-card2);
    border: 1px solid var(--nd-border);
    border-radius: var(--nd-radius-sm);
    padding: 12px 14px;
    margin-top: 8px;
}

/* ------------------------------------------------------------
   Tabs pill
   ------------------------------------------------------------ */
.nd-tabs {
    display: inline-flex;
    background: var(--nd-bg2);
    border: 1px solid var(--nd-border);
    border-radius: 24px;
    padding: 4px;
    gap: 2px;
    max-width: 100%;
}

.nd-tabs a {
    padding: 6px 14px;
    border-radius: 20px;
    color: var(--nd-muted);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s, color .15s;
}

.nd-tabs a:hover {
    color: var(--nd-text);
}

.nd-tabs a.active {
    background: var(--nd-blue);
    color: #fff;
}

.nd-tabs--scroll {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
}

.nd-tabs--scroll::-webkit-scrollbar {
    display: none;
}

/* ------------------------------------------------------------
   Timeline
   ------------------------------------------------------------ */
.nd-timeline {
    display: flex;
    flex-direction: column;
}

.nd-step {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 14px;
}

.nd-step__col {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.nd-step__dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--nd-border2);
    background: var(--nd-bg2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.nd-step.done .nd-step__dot {
    background: var(--nd-blue);
    border-color: var(--nd-blue);
}

.nd-step.current .nd-step__dot {
    border-color: var(--nd-blue2);
    box-shadow: 0 0 0 4px var(--nd-blue-soft);
    animation: nd-pulse 1.6s ease-in-out infinite;
}

.nd-step__line {
    width: 2px;
    flex: 1;
    min-height: 22px;
    background: var(--nd-border);
    margin: 2px 0;
}

.nd-step__line.done {
    background: var(--nd-blue);
}

.nd-step__body {
    display: flex;
    flex-direction: column;
    padding-bottom: 14px;
}

.nd-step__label {
    font-size: 14px;
    font-weight: 600;
}

.nd-step.current .nd-step__label {
    color: var(--nd-blue2);
}

.nd-step__time {
    font-size: 12px;
    color: var(--nd-muted);
}

@keyframes nd-pulse {
    0%, 100% {
        box-shadow: 0 0 0 4px var(--nd-blue-soft);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(59, 130, 246, .06);
    }
}

/* ------------------------------------------------------------
   Calendario
   ------------------------------------------------------------ */
.nd-cal-strip {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.nd-cal-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    padding: 6px 0;
}

.nd-cal-day__dow {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .08em;
    color: var(--nd-muted);
}

.nd-cal-day__num {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--nd-text);
    transition: background .15s;
}

.nd-cal-day:hover .nd-cal-day__num {
    background: var(--nd-card2);
}

.nd-cal-day.today .nd-cal-day__num {
    background: var(--nd-blue);
    color: #fff;
}

.nd-cal-day.selected .nd-cal-day__num {
    box-shadow: 0 0 0 2px var(--nd-blue2);
}

.nd-cal-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--nd-radius-sm);
    border: 1px solid var(--nd-border);
    background: var(--nd-card);
    color: var(--nd-muted);
    font-size: 18px;
    text-decoration: none;
    line-height: 1;
    transition: border-color .15s, color .15s;
}

.nd-cal-arrow:hover {
    border-color: var(--nd-blue2);
    color: var(--nd-text);
}

.nd-cal-agenda {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 10px 12px;
    align-items: stretch;
}

.nd-cal-agenda__time {
    font-size: 13px;
    font-weight: 600;
    color: var(--nd-muted);
    padding-top: 12px;
}

.nd-cal-slot {
    display: block;
    border-radius: var(--nd-radius-sm);
    padding: 10px 14px;
    text-decoration: none;
    color: var(--nd-text);
    border-left: 3px solid var(--nd-blue2);
    background: var(--nd-blue-soft);
    transition: filter .15s;
}

.nd-cal-slot:hover {
    filter: brightness(1.2);
    color: var(--nd-text);
}

.nd-cal-slot--blue, .nd-cal--blue {
    border-left-color: var(--nd-blue2);
    background: var(--nd-blue-soft);
}

.nd-cal-slot--green, .nd-cal--green {
    border-left-color: var(--nd-green);
    background: var(--nd-green-soft);
}

.nd-cal-slot--orange, .nd-cal--orange {
    border-left-color: var(--nd-orange);
    background: var(--nd-orange-soft);
}

.nd-cal-slot--purple, .nd-cal--purple {
    border-left-color: var(--nd-purple);
    background: var(--nd-purple-soft);
}

.nd-cal-slot--cyan, .nd-cal--cyan {
    border-left-color: var(--nd-cyan);
    background: var(--nd-cyan-soft);
}

.nd-cal-slot--red, .nd-cal--red {
    border-left-color: var(--nd-red);
    background: var(--nd-red-soft);
}

/* ------------------------------------------------------------
   List item generico
   ------------------------------------------------------------ */
.nd-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--nd-text);
    transition: border-color .15s;
}

a.nd-list-item:hover,
.nd-list-item[role="button"]:hover {
    border-color: var(--nd-blue2);
    color: var(--nd-text);
    cursor: pointer;
}

.nd-booking-card__time {
    text-align: center;
    min-width: 48px;
}

.nd-booking-card__body {
    flex: 1;
    min-width: 0;
}

/* Targa */
.nd-plate {
    display: inline-block;
    background: var(--nd-bg2);
    border: 1px solid var(--nd-border2);
    border-radius: 6px;
    padding: 1px 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--nd-text);
}

.nd-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--nd-bg2);
    border: 1px solid var(--nd-border);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 13px;
}

/* Righe chiave/valore */
.nd-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--nd-border);
    font-size: 14px;
}

.nd-info-row > span:first-child {
    color: var(--nd-muted);
}

.nd-info-row:last-child {
    border-bottom: 0;
}

.nd-info-row--total {
    border-top: 1px solid var(--nd-border2);
    border-bottom: 0;
    margin-top: 4px;
    padding-top: 12px;
}

.nd-info-row--total > span:first-child {
    color: var(--nd-text);
}

/* ------------------------------------------------------------
   Foto
   ------------------------------------------------------------ */
.nd-photos {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.nd-photo {
    aspect-ratio: 4 / 3;
    width: 100%;
    border-radius: var(--nd-radius-sm);
    object-fit: cover;
}

.nd-photo--empty {
    background: var(--nd-bg2);
    border: 1px dashed var(--nd-border2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--nd-muted2);
}

.nd-photo-add {
    cursor: pointer;
    transition: border-color .15s, color .15s;
}

.nd-photo-add:hover {
    border-color: var(--nd-blue2);
    color: var(--nd-blue2);
}

/* ------------------------------------------------------------
   Grafici
   ------------------------------------------------------------ */
.nd-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 160px;
}

.nd-bar {
    flex: 1;
    background: var(--nd-blue);
    border-radius: 3px 3px 0 0;
    min-height: 4px;
    transition: background .15s;
}

.nd-bar:hover {
    background: var(--nd-blue2);
}

.nd-bar-labels {
    display: flex;
    justify-content: space-between;
    color: var(--nd-muted);
    font-size: 10px;
    margin-top: 6px;
}

.nd-bar-labels span {
    flex: 1;
    text-align: center;
    min-width: 0;
}

.nd-progress {
    display: block;
    height: 8px;
    background: var(--nd-bg2);
    border-radius: 4px;
    overflow: hidden;
}

.nd-progress__fill {
    display: block;
    height: 100%;
    background: var(--nd-blue);
    border-radius: 4px;
}

.nd-spark {
    display: block;
    width: 100%;
    height: 56px;
}

/* ------------------------------------------------------------
   FAB + bottom navigation (mobile)
   ------------------------------------------------------------ */
.nd-fab {
    display: none;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 38px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--nd-blue);
    color: #fff;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 22px rgba(37, 99, 235, .45);
    z-index: 1030;
    text-decoration: none;
}

.nd-fab:hover {
    background: var(--nd-blue2);
    color: #fff;
}

.nd-bottomnav {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--nd-bg2);
    border-top: 1px solid var(--nd-border);
    grid-template-columns: repeat(5, 1fr);
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
    z-index: 1020;
}

.nd-bottomnav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: var(--nd-muted);
    text-decoration: none;
    font-size: 10px;
    position: relative;
}

.nd-bottomnav a.active {
    color: var(--nd-blue2);
}

.nd-bottomnav__bell .nd-dot {
    top: 0;
    right: calc(50% - 14px);
}

/* ------------------------------------------------------------
   Empty state
   ------------------------------------------------------------ */
.nd-empty {
    text-align: center;
    padding: 48px 16px;
    color: var(--nd-muted);
}

/* ------------------------------------------------------------
   Auth
   ------------------------------------------------------------ */
body.nd-auth {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.nd-auth-card {
    max-width: 420px;
    width: 100%;
    background: var(--nd-card);
    border: 1px solid var(--nd-border);
    border-radius: var(--nd-radius);
    padding: 28px 24px;
}

.nd-logo-big {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: .04em;
}

/* ------------------------------------------------------------
   Stelle rating
   ------------------------------------------------------------ */
.nd-stars {
    display: inline-flex;
    gap: 2px;
}

.nd-stars svg {
    fill: var(--nd-border2);
}

.nd-stars svg.filled {
    fill: #fbbf24;
}

/* ------------------------------------------------------------
   Notifiche
   ------------------------------------------------------------ */
.nd-notif--unread {
    border-left: 3px solid var(--nd-blue2);
}

.nd-notif__icon {
    width: 40px;
    height: 40px;
    border-radius: var(--nd-radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--nd-blue-soft);
    color: var(--nd-blue2);
}

.nd-notif__icon--success {
    background: var(--nd-green-soft);
    color: var(--nd-green);
}

.nd-notif__icon--info {
    background: var(--nd-blue-soft);
    color: var(--nd-blue2);
}

.nd-notif__icon--warning {
    background: var(--nd-orange-soft);
    color: var(--nd-orange);
}

.nd-notif__icon--invoice,
.nd-notif__icon--booking {
    background: var(--nd-purple-soft);
    color: var(--nd-purple);
}

/* ------------------------------------------------------------
   Menu profilo
   ------------------------------------------------------------ */
.nd-menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--nd-border);
    color: var(--nd-text);
    text-decoration: none;
    font-size: 14px;
}

.nd-menu-item:last-child {
    border-bottom: 0;
}

.nd-menu-item:hover {
    color: var(--nd-blue2);
}

.nd-menu-item__chevron {
    color: var(--nd-muted2);
    font-size: 18px;
    line-height: 1;
}

/* ------------------------------------------------------------
   Flash toast
   ------------------------------------------------------------ */
#nd-flash {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 340px;
}

.nd-flash {
    background: var(--nd-card2);
    border: 1px solid var(--nd-border2);
    border-left: 4px solid var(--nd-blue2);
    border-radius: var(--nd-radius-sm);
    color: var(--nd-text);
    padding: 12px 16px;
    font-size: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}

.nd-flash--success {
    border-left-color: var(--nd-green);
}

.nd-flash--error,
.nd-flash--danger {
    border-left-color: var(--nd-red);
}

.nd-flash--warning {
    border-left-color: var(--nd-orange);
}

/* ------------------------------------------------------------
   Winter AJAX loading indicator
   ------------------------------------------------------------ */
.stripe-loading-indicator {
    background: transparent;
}

.stripe-loading-indicator .stripe,
.stripe-loading-indicator .stripe-loaded {
    background: var(--nd-blue2);
}

/* ------------------------------------------------------------
   Responsive <992px
   ------------------------------------------------------------ */
@media (max-width: 991.98px) {
    .nd-sidebar {
        display: none;
    }

    .nd-main {
        margin-left: 0;
        padding-bottom: 90px;
    }

    .nd-topbar {
        padding: 14px 16px;
    }

    .nd-content {
        padding: 4px 16px 32px;
    }

    .nd-grid-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .nd-grid-stats--3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .nd-fab {
        display: flex;
    }

    .nd-bottomnav {
        display: grid;
    }

    .nd-photos {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================================
   EVOLUTION LAYER — profondità, glow, blur, micro-interazioni
   (override additivi: vince la cascata)
   ============================================================ */

body.nd-app {
    background:
        radial-gradient(900px 480px at 85% -10%, rgba(37, 99, 235, .16), transparent 60%),
        radial-gradient(700px 420px at -10% 35%, rgba(34, 211, 238, .07), transparent 55%),
        var(--nd-bg);
    background-attachment: fixed;
}

.nd-content {
    animation: nd-fadeup .35s ease both;
}

@keyframes nd-fadeup {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

/* Card: gradiente + luce interna + ombra profonda */
.nd-card {
    background: linear-gradient(180deg, var(--nd-card2), var(--nd-card));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .035),
        0 12px 34px -20px rgba(0, 0, 0, .85);
}

/* Card hero (fatturato dashboard) */
.nd-card--hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(37, 99, 235, .24), rgba(37, 99, 235, .06) 45%, var(--nd-card));
    border-color: rgba(59, 130, 246, .32);
}

.nd-card--hero::after {
    content: '';
    position: absolute;
    top: -70px;
    right: -50px;
    width: 240px;
    height: 200px;
    background: radial-gradient(closest-side, rgba(59, 130, 246, .28), transparent);
    pointer-events: none;
}

/* Stat: icona con gradiente e alone */
.nd-stat__icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, .28), rgba(59, 130, 246, .1));
    box-shadow: 0 6px 18px -8px rgba(59, 130, 246, .55);
}

.nd-stat--green .nd-stat__icon {
    background: linear-gradient(135deg, rgba(34, 197, 94, .28), rgba(34, 197, 94, .1));
    box-shadow: 0 6px 18px -8px rgba(34, 197, 94, .5);
}

.nd-stat--orange .nd-stat__icon {
    background: linear-gradient(135deg, rgba(245, 158, 11, .3), rgba(245, 158, 11, .1));
    box-shadow: 0 6px 18px -8px rgba(245, 158, 11, .5);
}

.nd-stat--purple .nd-stat__icon {
    background: linear-gradient(135deg, rgba(139, 92, 246, .3), rgba(139, 92, 246, .12));
    box-shadow: 0 6px 18px -8px rgba(139, 92, 246, .5);
}

.nd-stat__num {
    letter-spacing: -.02em;
}

/* Bottoni: gradiente, glow, micro-lift */
.nd-btn {
    background: linear-gradient(180deg, var(--nd-blue2), var(--nd-blue));
    box-shadow: 0 10px 24px -12px rgba(37, 99, 235, .65);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.nd-btn:hover {
    background: linear-gradient(180deg, #4c8dff, var(--nd-blue2));
    transform: translateY(-1px);
    box-shadow: 0 14px 30px -12px rgba(37, 99, 235, .75);
}

.nd-btn:active {
    transform: translateY(0);
}

.nd-btn--outline,
.nd-btn--ghost {
    background: transparent;
    box-shadow: none;
}

.nd-btn--green {
    background: linear-gradient(180deg, #2fd371, var(--nd-green));
    box-shadow: 0 10px 24px -12px rgba(34, 197, 94, .6);
}

.nd-btn--danger {
    background: linear-gradient(180deg, #f87171, var(--nd-red));
    box-shadow: 0 10px 24px -12px rgba(239, 68, 68, .55);
}

.nd-btn--outline.nd-btn--danger {
    background: transparent;
    box-shadow: none;
}

/* Topbar sticky con blur */
.nd-topbar {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(7, 9, 13, .72);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(30, 36, 50, .6);
}

/* Sidebar: gradiente e voce attiva luminosa */
.nd-sidebar {
    background: linear-gradient(180deg, #0c0f16, #080a0f);
}

.nd-nav a.active {
    box-shadow: inset 0 0 0 1px rgba(59, 130, 246, .22), 0 6px 18px -12px rgba(37, 99, 235, .8);
}

/* Avatar: gradiente + anello */
.nd-avatar {
    background: linear-gradient(135deg, var(--nd-blue2), #1d4ed8);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, .28), 0 8px 20px -10px rgba(37, 99, 235, .7);
}

/* Bottom nav mobile: vetro sfocato */
.nd-bottomnav {
    background: rgba(9, 11, 16, .8);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(30, 36, 50, .7);
}

.nd-fab {
    background: linear-gradient(135deg, #4c8dff, var(--nd-blue));
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .18), 0 14px 30px -8px rgba(37, 99, 235, .8);
}

/* Liste: lift al passaggio */
.nd-list-item,
.nd-cal-slot {
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.nd-list-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px -18px rgba(0, 0, 0, .9);
}

.nd-cal-slot:hover {
    transform: translateX(2px);
}

/* Foto: zoom morbido */
.nd-photo,
.nd-photos img {
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.nd-photo:hover,
.nd-photos img:hover {
    transform: scale(1.045);
    border-color: rgba(59, 130, 246, .45);
    box-shadow: 0 10px 26px -12px rgba(37, 99, 235, .5);
    z-index: 1;
}

/* Timeline: step corrente con alone pulsante più marcato */
.nd-step.current .nd-step__dot {
    box-shadow: 0 0 0 5px rgba(59, 130, 246, .16), 0 0 22px rgba(59, 130, 246, .55);
}

/* Input: anello luminoso in focus */
.nd-input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .18), 0 6px 20px -12px rgba(37, 99, 235, .5);
}

/* Auth: card in vetro + hero */
.nd-auth {
    background:
        radial-gradient(700px 420px at 50% -8%, rgba(37, 99, 235, .22), transparent 60%),
        radial-gradient(560px 320px at 50% 108%, rgba(34, 211, 238, .1), transparent 60%),
        var(--nd-bg);
}

.nd-auth-card {
    background: rgba(15, 19, 27, .74);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(59, 130, 246, .18);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .05),
        0 34px 90px -34px rgba(0, 0, 0, .95),
        0 0 60px -22px rgba(37, 99, 235, .35);
}

.nd-auth-hero {
    max-width: 380px;
    margin: 0 auto -14px;
    filter: drop-shadow(0 22px 44px rgba(37, 99, 235, .3));
}

.nd-auth-hero svg {
    width: 100%;
    height: auto;
    display: block;
}

/* Hero veicolo (dettaglio prenotazione) */
.nd-vehicle-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px;
    border-radius: var(--nd-radius);
    border: 1px solid rgba(59, 130, 246, .3);
    background: linear-gradient(120deg, rgba(37, 99, 235, .26), rgba(10, 12, 17, .92) 58%), linear-gradient(180deg, var(--nd-card2), var(--nd-card));
}

.nd-vehicle-hero::before {
    content: '';
    position: absolute;
    top: -60px;
    left: -40px;
    width: 220px;
    height: 190px;
    background: radial-gradient(closest-side, rgba(59, 130, 246, .3), transparent);
    pointer-events: none;
}

.nd-vehicle-hero__name {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 0 0 6px;
}

.nd-vehicle-hero__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--nd-muted);
}

.nd-vehicle-hero__sub {
    margin-top: 8px;
    font-size: 12px;
    color: var(--nd-muted2);
}

.nd-vehicle-hero__img {
    width: 172px;
    height: 116px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--nd-border2);
    box-shadow: 0 16px 34px -16px rgba(0, 0, 0, .9);
    flex-shrink: 0;
}

@media (max-width: 575.98px) {
    .nd-vehicle-hero__img {
        width: 118px;
        height: 82px;
    }

    .nd-vehicle-hero__name {
        font-size: 19px;
    }
}

/* Form caricamento foto: trasparente nel grid */
.nd-photo-form {
    display: contents;
}

/* Confronto foto Prima/Dopo: slider trascinabile */
.nd-compare {
    position: relative;
    overflow: hidden;
    border-radius: var(--nd-radius-sm);
    border: 1px solid var(--nd-border2);
    aspect-ratio: 4 / 3;
    cursor: ew-resize;
    touch-action: none;
    user-select: none;
}

.nd-compare__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.nd-compare__before {
    clip-path: inset(0 calc(100% - var(--nd-pos, 50%)) 0 0);
}

.nd-compare__handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--nd-pos, 50%);
    width: 2px;
    margin-left: -1px;
    background: rgba(255, 255, 255, .85);
    box-shadow: 0 0 12px rgba(0, 0, 0, .6);
    pointer-events: none;
}

.nd-compare__grip {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(10, 13, 19, .85);
    border: 2px solid rgba(255, 255, 255, .9);
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .55);
}

.nd-compare__tag {
    position: absolute;
    top: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .08em;
    color: #fff;
    background: rgba(10, 13, 19, .72);
    border: 1px solid rgba(255, 255, 255, .18);
    pointer-events: none;
}

.nd-compare__tag--left {
    left: 10px;
}

.nd-compare__tag--right {
    right: 10px;
    background: rgba(37, 99, 235, .8);
    border-color: rgba(255, 255, 255, .25);
}

/* Stepper stato lavorazione ORIZZONTALE */
.nd-stepper {
    display: flex;
    align-items: flex-start;
}

.nd-stepper__step {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    text-align: center;
    min-width: 0;
}

/* Connettore verso lo step successivo */
.nd-stepper__step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 12px;
    left: calc(50% + 17px);
    right: calc(-50% + 17px);
    height: 2px;
    border-radius: 2px;
    background: var(--nd-border2);
}

.nd-stepper__step.done:not(:last-child)::after {
    background: linear-gradient(90deg, var(--nd-blue2), var(--nd-blue));
    box-shadow: 0 0 8px rgba(59, 130, 246, .45);
}

.nd-stepper__dot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    border: 2px solid var(--nd-border2);
    background: var(--nd-bg2);
    color: #fff;
    flex-shrink: 0;
}

.nd-stepper__step.done .nd-stepper__dot {
    border-color: var(--nd-blue2);
    background: linear-gradient(135deg, var(--nd-blue2), var(--nd-blue));
    box-shadow: 0 4px 14px -6px rgba(37, 99, 235, .8);
}

.nd-stepper__step.current .nd-stepper__dot {
    border-color: var(--nd-blue2);
    box-shadow: 0 0 0 5px rgba(59, 130, 246, .16), 0 0 20px rgba(59, 130, 246, .55);
    animation: nd-pulse 1.6s ease infinite;
}

.nd-stepper__step.current .nd-stepper__dot::before {
    content: '';
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--nd-blue2);
}

.nd-stepper__label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--nd-muted);
    line-height: 1.25;
}

.nd-stepper__step.done .nd-stepper__label,
.nd-stepper__step.current .nd-stepper__label {
    color: var(--nd-text);
}

.nd-stepper__time {
    font-size: 11px;
    color: var(--nd-muted2);
}

.nd-stepper__step.done .nd-stepper__time,
.nd-stepper__step.current .nd-stepper__time {
    color: var(--nd-blue2);
}

@media (max-width: 575.98px) {
    .nd-stepper__label {
        font-size: 10.5px;
    }

    .nd-stepper__time {
        font-size: 10px;
    }

    .nd-stepper__step:not(:last-child)::after {
        left: calc(50% + 15px);
        right: calc(-50% + 15px);
    }
}

/* Progress bar dello stato lavorazione */
.nd-progress--status {
    height: 8px;
    border-radius: 999px;
}

.nd-progress--status .nd-progress__fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--nd-blue), var(--nd-cyan));
    box-shadow: 0 0 14px rgba(59, 130, 246, .5);
    transition: width .5s ease;
}

/* Banner "consegnata" / "pronta per il ritiro" */
.nd-status-done {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--nd-radius-sm);
    border: 1px solid rgba(34, 197, 94, .35);
    background: linear-gradient(120deg, rgba(34, 197, 94, .18), rgba(34, 197, 94, .05));
    color: var(--nd-green);
    font-weight: 600;
    font-size: 14px;
}

/* Undo avanzamento */
.nd-undo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    padding: 9px;
    background: none;
    border: 0;
    border-radius: var(--nd-radius-sm);
    color: var(--nd-muted2);
    font-size: 12.5px;
    cursor: pointer;
    transition: color .15s ease, background .15s ease;
}

.nd-undo:hover {
    color: var(--nd-red);
    background: var(--nd-red-soft);
}

/* Auto pronte per il ritiro (dashboard) */
.nd-ready-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 18px;
    border-radius: var(--nd-radius);
    border: 1px solid rgba(34, 197, 94, .32);
    background: linear-gradient(120deg, rgba(34, 197, 94, .14), var(--nd-card));
    color: var(--nd-text);
    text-decoration: none;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.nd-ready-item:hover {
    color: var(--nd-text);
    transform: translateY(-1px);
    border-color: rgba(34, 197, 94, .55);
    box-shadow: 0 14px 30px -18px rgba(34, 197, 94, .55);
}

.nd-ready-item__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    flex-shrink: 0;
    color: var(--nd-green);
    background: linear-gradient(135deg, rgba(34, 197, 94, .3), rgba(34, 197, 94, .1));
    box-shadow: 0 6px 18px -8px rgba(34, 197, 94, .55);
}

/* ------------------------------------------------------------
   Respiro: layout più spazioso e chiaro
   ------------------------------------------------------------ */
.nd-content {
    max-width: 1120px;
    padding: 10px 28px 56px;
}

.nd-card {
    padding: 22px;
}

.nd-grid-stats {
    gap: 14px;
}

.nd-info-row {
    padding: 12px 0;
}

.nd-step {
    padding-bottom: 6px;
}

.nd-step__body {
    padding-bottom: 16px;
}

.nd-timeline .nd-step__label {
    font-size: 14.5px;
}

.nd-content h2.h6 {
    letter-spacing: .01em;
}

@media (max-width: 991.98px) {
    .nd-content {
        padding: 6px 18px 100px;
    }

    .nd-card {
        padding: 18px;
    }
}

/* Accessibilità: rispetta la preferenza di riduzione del movimento */
@media (prefers-reduced-motion: reduce) {
    .nd-content,
    .nd-btn,
    .nd-list-item,
    .nd-cal-slot,
    .nd-photo,
    .nd-photos img {
        animation: none !important;
        transition: none !important;
    }
}
