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;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Landing */
.landing-wrap {
    min-height: calc(100vh - 90px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    background: radial-gradient(900px 500px at 20% 10%, rgba(13,110,253,.12), transparent 60%), radial-gradient(900px 500px at 90% 40%, rgba(32,201,151,.10), transparent 60%), #f7f8fb;
}

.landing-card {
    width: min(980px, 100%);
    border-radius: 22px;
    background: rgba(255,255,255,.85);
    border: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 18px 45px rgba(0,0,0,.10);
    padding: 28px;
    backdrop-filter: blur(8px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(0,0,0,.06);
}

.brand-logo {
    height: 48px;
    width: auto;
}

.brand-title {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: .2px;
}

.brand-subtitle {
    color: rgba(0,0,0,.55);
    font-size: .95rem;
}

.landing-body {
    padding-top: 18px;
}

.landing-h1 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 10px;
}

.landing-p {
    color: rgba(0,0,0,.62);
    font-size: 1.05rem;
    max-width: 64ch;
}

.landing-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.landing-footnote {
    margin-top: 18px;
    color: rgba(0,0,0,.45);
    font-size: .9rem;
}
.brand-text {
    line-height: 1.1;
}

.landing-actions-center {
    justify-content: center;
    margin-top: 22px;
}
/* Navbar 3 columns */
.nav-3col {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    align-items: center;
    gap: 12px;
}

.nav-left {
    justify-self: start;
}

.nav-center {
    justify-self: center;
}

.nav-right {
    justify-self: end;
}

.nav-title {
    font-weight: 700;
    letter-spacing: .2px;
    color: rgba(0,0,0,.78);
    font-size: 1.05rem;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60vw;
}

.nav-muted {
    color: rgba(0,0,0,.45);
    font-size: .95rem;
}

/* User pill */
.user-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.08);
    background: rgba(0,0,0,.02);
}

.user-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #20c997; /* verde bootstrap-like */
    display: inline-block;
}

.user-name {
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: .95rem;
    color: rgba(0,0,0,.72);
}

/* Logout button (soft) */
.logout-btn {
    border-radius: 999px;
    padding-left: 12px;
    padding-right: 12px;
}
@media (max-width: 576px) {
    .nav-3col {
        grid-template-columns: 48px 1fr auto;
    }

    .user-name {
        max-width: 120px;
    }
}
/* INTERNAL SHELL */
.nm-internal {
    background: #f7f8fb;
}

.nm-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: calc(100vh - 56px); /* topbar */
    gap: 0;
}

.nm-sidebar {
    background: #fff;
    border-right: 1px solid rgba(0,0,0,.06);
    overflow-y: auto;
    max-height: calc(100vh - 56px);
}

.nm-sidebar.show {
    display: block !important;
}

.nm-sidebar-inner {
    padding: 14px 10px;
    display: block;
}

.nm-nav-section {
    padding: 10px 12px 6px;
    font-size: .75rem;
    letter-spacing: .08em;
    color: rgba(0,0,0,.45);
    font-weight: 700;
    margin-top: 8px;
}

    .nm-nav-section:first-child {
        margin-top: 0;
    }

.nm-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin: 4px 6px;
    border-radius: 12px;
    color: rgba(0,0,0,.72);
    text-decoration: none;
    transition: all 0.2s ease;
}

    .nm-nav-item:hover {
        background: rgba(13,110,253,.08);
        color: rgba(0,0,0,.85);
        text-decoration: none;
    }

    .nm-nav-item.active {
        background: rgba(13,110,253,.12);
        border: 1px solid rgba(13,110,253,.18);
        color: rgba(13,110,253,.95);
        font-weight: 600;
    }

.nm-content {
    padding: 22px 22px;
    /*overflow: auto;*/
}

/* TOPBAR TITLE CENTER */
.nm-topbar {
    background: #fff;
    border-bottom: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}

.nm-topbar .container-fluid {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    align-items: center;
    column-gap: 12px;
    padding: 0.75rem 1rem;
}

.nm-topbar-title {
    justify-self: center;
    font-weight: 700;
    color: rgba(0,0,0,.75);
    font-size: 1.05rem;
}

/* MOBILE: sidebar becomes offcanvas, content full width */
@media (max-width: 991.98px) {
    .nm-shell {
        grid-template-columns: 1fr;
    }

    .nm-sidebar {
        position: fixed;
        left: -280px;
        width: 280px;
        height: calc(100vh - 56px);
        transition: left 0.3s ease;
        z-index: 1040;
        box-shadow: 2px 0 8px rgba(0,0,0,.12);
    }

    .nm-sidebar.show {
        left: 0;
    }

    .nm-content {
        padding: 16px 14px;
    }

    .nm-topbar .container-fluid {
        grid-template-columns: auto 1fr auto;
    }
}

.page-title {
    font-weight: 700;
    letter-spacing: .2px;
}

.toolbar {
    gap: .5rem;
}

.table thead th {
    white-space: nowrap;
}

.badge-soft {
    border: 1px solid rgba(0,0,0,.06);
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    border-radius: 12px;
    padding: .35rem .55rem;
    cursor: pointer;
}

    .action-btn .bi {
        font-size: 1rem;
        line-height: 1;
    }

/* su schermi piccoli mostra solo icona */
@media (max-width: 768px) {
    .action-btn .btn-text {
        display: none;
    }
}