/* ==========================================================================
   Bunker Soratte – Back Office – stili personalizzati
   ========================================================================== */

:root {
    /* Logo #ae0000, attenuato (~10% più scuro, stessa tonalità) */
    --bbo-brand: #9b0000;
    --bbo-brand-dark: #7d0000;
    --bbo-brand-light: #f5e6e6;
    --bbo-text: #2c2c2c;
    --bbo-text-muted: #6b7280;
    --bbo-surface: #ffffff;
    --bbo-bg: #f4f5f7;
    --bbo-border: #e8eaed;
    --bbo-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    --bbo-shadow-hover: 0 8px 32px rgba(155, 0, 0, 0.12);
    --bbo-radius: 12px;
    --bbo-transition: 0.25s ease;
}

/* Base più grande per tutte le pagine dashboard */
html:has(body.dashboard-page) {
    font-size: 15px;
}

/* --------------------------------------------------------------------------
   Dashboard home
   -------------------------------------------------------------------------- */

.dashboard-home .wrapper.scrollable {
    background: var(--bbo-bg);
}

.dashboard-page .dashboard-hero {
    text-align: center;
    padding: 2rem 1.5rem 1.5rem;
    margin-bottom: 0.5rem;
}

.dashboard-page .dashboard-hero__logo {
    display: inline-block;
    padding: 1.25rem 2rem;
    background: var(--bbo-surface);
    border-radius: var(--bbo-radius);
    box-shadow: var(--bbo-shadow);
    border: 1px solid var(--bbo-border);
    transition: box-shadow var(--bbo-transition);
}

.dashboard-page .dashboard-hero__logo:hover {
    box-shadow: var(--bbo-shadow-hover);
}

.dashboard-page .dashboard-hero__logo img {
    height: 90px;
    width: auto;
    display: block;
}

.dashboard-page .dashboard-hero__subtitle {
    margin: 1rem 0 0;
    font-size: 1rem;
    color: var(--bbo-text-muted);
    letter-spacing: 0.02em;
}

.dashboard-home .dashboard-content {
    padding: 0 20px 2rem;
    width: 100%;
    box-sizing: border-box;
}

.dashboard-home .dashboard-col-left .welcome-card {
    min-height: 360px;
}

.dashboard-home .dashboard-col-right .stats-column {
    min-height: 420px;
}

/* Welcome card */

.dashboard-home .welcome-card {
    background: var(--bbo-surface);
    border-radius: var(--bbo-radius);
    border: 1px solid var(--bbo-border);
    box-shadow: var(--bbo-shadow);
    overflow: hidden;
    margin-bottom: 1.5rem;
    height: 100%;
}

.dashboard-home .welcome-card__header {
    background: linear-gradient(135deg, var(--bbo-brand) 0%, var(--bbo-brand-dark) 100%);
    color: #fff;
    padding: 2rem 2.25rem;
}

.dashboard-home .welcome-card__header h1 {
    margin: 0 0 0.5rem;
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.3;
}

.dashboard-home .welcome-card__header p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

.dashboard-home .welcome-card__body {
    padding: 2rem 2.25rem;
}

.dashboard-home .welcome-card__user {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    background: var(--bbo-brand-light);
    border-radius: 8px;
    border-left: 4px solid var(--bbo-brand);
    margin-bottom: 1.5rem;
}

.dashboard-home .welcome-card__user i {
    font-size: 1.5rem;
    color: var(--bbo-brand);
}

.dashboard-home .welcome-card__user-label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bbo-text-muted);
    margin-bottom: 0.15rem;
}

.dashboard-home .welcome-card__user-email {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--bbo-text);
    word-break: break-all;
}

.dashboard-home .welcome-card__section-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--bbo-text-muted);
    margin: 0 0 1rem;
    font-weight: 600;
}

/* Quick links */

.dashboard-home .quick-links {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: flex-start;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    gap: 12px;
}

.dashboard-home .quick-links__item {
    flex: 1 1 0;
    min-width: 0;
    margin: 0;
}

.dashboard-home .quick-links__item a {
    display: block;
    width: 100%;
    text-align: center;
    text-decoration: none;
    color: var(--bbo-text);
    background: transparent;
    border: none;
    padding: 0;
}

.dashboard-home .quick-links__item a:hover,
.dashboard-home .quick-links__item a:focus {
    text-decoration: none;
    color: var(--bbo-brand-dark);
}

.dashboard-home .quick-links__box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50%;
    aspect-ratio: 1;
    background: #ffffff;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    box-sizing: border-box;
    transition: all var(--bbo-transition);
    margin-left: 34px;
}

.dashboard-home .quick-links__box i {
    display: inline-block;
    font-size: 24px;
    line-height: 1;
    color: var(--bbo-brand);
}

.dashboard-home .quick-links__item a:hover .quick-links__box,
.dashboard-home .quick-links__item a:focus .quick-links__box {
    background: var(--bbo-brand-light);
    border-color: var(--bbo-brand);
    box-shadow: var(--bbo-shadow-hover);
}

.dashboard-home .quick-links__label {
    display: block;
    width: 88%;
    margin-top: 8px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.25;
    white-space: normal;
    word-wrap: break-word;
}

/* Stat cards */

.dashboard-home .stats-column {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    height: 100%;
    justify-content: stretch;
}

.dashboard-home .stat-card {
    background: var(--bbo-surface);
    border-radius: var(--bbo-radius);
    border: 1px solid var(--bbo-border);
    box-shadow: var(--bbo-shadow);
    overflow: hidden;
    transition: transform var(--bbo-transition), box-shadow var(--bbo-transition);
    position: relative;
    min-height: 100px;
}

.dashboard-home .stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--bbo-shadow-hover);
}

.dashboard-home .stat-card__inner {
    display: flex;
    align-items: center;
    padding: 1.75rem 2rem;
    gap: 1.25rem;
    height: 100%;
    box-sizing: border-box;
}

.dashboard-home .stat-card__icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 1.5rem;
}

.dashboard-home .stat-card--events .stat-card__icon {
    background: var(--bbo-brand-light);
    color: var(--bbo-brand);
}

.dashboard-home .stat-card--users .stat-card__icon {
    background: #e8f0fe;
    color: #2563eb;
}

.dashboard-home .stat-card__info {
    flex: 1;
    min-width: 0;
}

.dashboard-home .stat-card__label {
    margin: 0;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bbo-text-muted);
    font-weight: 600;
    line-height: 1.3;
}

.dashboard-home .stat-card__value {
    margin: 0.35rem 0 0;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--bbo-text);
    line-height: 1;
}

.dashboard-home .stat-card__accent {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 4px;
}

.dashboard-home .stat-card--events .stat-card__accent {
    background: var(--bbo-brand);
}

.dashboard-home .stat-card--users .stat-card__accent {
    background: #2563eb;
}

/* Responsive */

@media (max-width: 991px) {
    .dashboard-home .dashboard-col-left,
    .dashboard-home .dashboard-col-right {
        margin-bottom: 1.25rem;
    }

    .dashboard-home .stats-column {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .dashboard-home .stat-card {
        flex: 1 1 calc(50% - 0.625rem);
        min-width: 200px;
    }
}

@media (max-width: 575px) {
    .dashboard-page .dashboard-hero__logo img {
        height: 70px;
    }

    .dashboard-home .welcome-card__header h1 {
        font-size: 1.2rem;
    }

    .dashboard-home .quick-links {
        gap: 8px;
    }

    .dashboard-home .quick-links__box i {
        font-size: 18px;
    }

    .dashboard-home .quick-links__label {
        font-size: 9px;
    }

    .dashboard-home .stats-column {
        flex-direction: column;
    }

    .dashboard-home .stat-card {
        flex: 1 1 100%;
    }
}

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */

.dashboard-page nav.main-menu.bbo-sidebar {
    background: linear-gradient(180deg, #141414 0%, #1f1f1f 100%);
    border-right: 1px solid #2e2e2e;
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.18);
}

.dashboard-page nav.main-menu.bbo-sidebar .bbo-sidebar__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    padding: 0 12px;
    border-bottom: 1px solid #2e2e2e;
    background: rgba(0, 0, 0, 0.2);
    overflow: hidden;
    box-sizing: border-box;
}

.dashboard-page nav.main-menu.bbo-sidebar .bbo-sidebar__brand img {
    max-height: 34px;
    width: auto;
    flex-shrink: 0;
}

.dashboard-page nav.main-menu.bbo-sidebar .bbo-sidebar__brand-text {
    display: none;
    margin-left: 10px;
    color: #f5f5f5;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.dashboard-page nav.main-menu.bbo-sidebar > ul {
    margin-top: 4px;
}

.dashboard-page nav.main-menu.bbo-sidebar li > a {
    color: #d4d4d4;
    transition: background var(--bbo-transition), color var(--bbo-transition);
}

.dashboard-page nav.main-menu.bbo-sidebar .nav-icon {
    color: var(--bbo-brand);
    transition: color var(--bbo-transition);
}

.dashboard-page nav.main-menu.bbo-sidebar .bbo-sidebar__chevron {
    display: table-cell;
    width: 20px;
    vertical-align: middle;
    font-size: 11px;
    opacity: 0.6;
    color: #aaa;
    visibility: hidden;
}

.dashboard-page nav.main-menu.bbo-sidebar > ul.logout {
    border-top: 1px solid #2e2e2e;
    padding-top: 4px;
}

.dashboard-page nav.main-menu.bbo-sidebar > ul.logout .nav-icon {
    color: #f87171;
}

.no-touch .dashboard-page nav.main-menu.bbo-sidebar li:hover > a,
.dashboard-page nav.main-menu.bbo-sidebar li.active > a {
    background-color: var(--bbo-brand);
    color: #ffffff;
}

.no-touch .dashboard-page nav.main-menu.bbo-sidebar li:hover > a .nav-icon,
.dashboard-page nav.main-menu.bbo-sidebar li.active > a .nav-icon,
.no-touch .dashboard-page nav.main-menu.bbo-sidebar li:hover > a .bbo-sidebar__chevron,
.dashboard-page nav.main-menu.bbo-sidebar li.active > a .bbo-sidebar__chevron {
    color: #ffffff;
    opacity: 1;
}

.no-touch .dashboard-page nav.main-menu.bbo-sidebar > ul.logout li:hover > a,
.dashboard-page nav.main-menu.bbo-sidebar > ul.logout li.active > a {
    background-color: #991b1b;
}

.dashboard-page nav.main-menu.bbo-sidebar li ul {
    background: #262626;
    border-left: 3px solid var(--bbo-brand);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.25);
}

.dashboard-page nav.main-menu.bbo-sidebar li li > a {
    color: #bdbdbd;
}

.no-touch .dashboard-page nav.main-menu.bbo-sidebar li li:hover a,
.dashboard-page nav.main-menu.bbo-sidebar li li.active a {
    color: #ffffff;
    background-color: var(--bbo-brand-dark);
}

@media (min-width: 480px) {
    .no-touch .dashboard-page nav.main-menu.bbo-sidebar:hover .bbo-sidebar__brand-text,
    .dashboard-page nav.main-menu.bbo-sidebar.expanded .bbo-sidebar__brand-text {
        display: inline;
    }

    .no-touch .dashboard-page nav.main-menu.bbo-sidebar:hover .bbo-sidebar__chevron,
    .dashboard-page nav.main-menu.bbo-sidebar.expanded .bbo-sidebar__chevron {
        visibility: visible;
    }

    .dashboard-page nav.main-menu.bbo-sidebar .bbo-sidebar__brand {
        justify-content: flex-start;
        padding-left: 14px;
    }

    .dashboard-page nav.main-menu.bbo-sidebar:not(:hover):not(.expanded) .bbo-sidebar__brand {
        justify-content: center;
        padding-left: 0;
    }

    .dashboard-page nav.main-menu.bbo-sidebar li > a {
        min-height: 42px;
    }

    .dashboard-page nav.main-menu.bbo-sidebar .nav-icon {
        font-size: 17px;
    }
}

@media (max-width: 479px) {
    .dashboard-page nav.main-menu.bbo-sidebar {
        background: #1a1a1a;
    }

    .dashboard-page nav.main-menu.bbo-sidebar .bbo-sidebar__brand-text {
        display: inline;
    }

    .dashboard-page nav.main-menu.bbo-sidebar .bbo-sidebar__brand {
        justify-content: flex-start;
        padding-left: 16px;
    }

    .dashboard-page nav.main-menu.bbo-sidebar li > a {
        color: #cccccc;
    }

    .dashboard-page nav.main-menu.bbo-sidebar li ul {
        border-left: none;
    }
}

/* --------------------------------------------------------------------------
   Top navigation (quick launch bar)
   -------------------------------------------------------------------------- */

.dashboard-page .quick-launch-bar.bbo-topnav {
    background: #ffffff;
    border: 1px solid var(--bbo-border);
    border-radius: var(--bbo-radius);
    margin: 0 20px 20px;
    box-shadow: var(--bbo-shadow);
}

.dashboard-page .quick-launch-bar.bbo-topnav ul {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: center;
    min-height: 0;
    margin: 0;
    padding: 10px 14px;
    text-align: center;
    font-size: 13px;
    gap: 4px;
}

.dashboard-page .quick-launch-bar.bbo-topnav li {
    display: block;
    flex: 0 0 auto;
    width: auto;
    height: auto;
    font-size: 12px;
}

.dashboard-page .quick-launch-bar.bbo-topnav .bbo-topnav__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: auto;
    height: auto;
    min-height: 76px;
    padding: 10px 8px;
    color: var(--bbo-text-muted);
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid transparent;
    box-sizing: border-box;
    transition: all var(--bbo-transition);
}

.dashboard-page .quick-launch-bar.bbo-topnav .bbo-topnav__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--bbo-bg);
    border: 1px solid var(--bbo-border);
    transition: all var(--bbo-transition);
}

.dashboard-page .quick-launch-bar.bbo-topnav .bbo-topnav__icon i {
    font-size: 16px;
    color: var(--bbo-text);
    line-height: 1;
}

.dashboard-page .quick-launch-bar.bbo-topnav .bbo-topnav__label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.no-touch .dashboard-page .quick-launch-bar.bbo-topnav .bbo-topnav__link:hover,
.dashboard-page .quick-launch-bar.bbo-topnav .bbo-topnav__link:focus {
    color: var(--bbo-brand-dark);
    text-decoration: none;
    background: var(--bbo-brand-light);
    border-color: transparent;
}

.no-touch .dashboard-page .quick-launch-bar.bbo-topnav .bbo-topnav__link:hover .bbo-topnav__icon,
.dashboard-page .quick-launch-bar.bbo-topnav .bbo-topnav__link:focus .bbo-topnav__icon {
    border-color: var(--bbo-brand);
    background: #ffffff;
}

.no-touch .dashboard-page .quick-launch-bar.bbo-topnav .bbo-topnav__link:hover .bbo-topnav__icon i,
.dashboard-page .quick-launch-bar.bbo-topnav .bbo-topnav__link:focus .bbo-topnav__icon i {
    color: var(--bbo-brand);
}

.dashboard-page .quick-launch-bar.bbo-topnav .bbo-topnav__link--active {
    color: var(--bbo-brand-dark);
    background: var(--bbo-brand-light);
    border-color: var(--bbo-brand);
}

.dashboard-page .quick-launch-bar.bbo-topnav .bbo-topnav__link--active .bbo-topnav__icon {
    background: var(--bbo-brand);
    border-color: var(--bbo-brand);
}

.dashboard-page .quick-launch-bar.bbo-topnav .bbo-topnav__link--active .bbo-topnav__icon i {
    color: #ffffff;
}

@media (min-width: 480px) {
    .dashboard-page .quick-launch-bar.bbo-topnav ul {
        padding: 12px 16px;
    }
}

@media (max-width: 767px) {
    .dashboard-page .quick-launch-bar.bbo-topnav {
        margin: 0 12px 16px;
        overflow-x: auto;
    }

    .dashboard-page .quick-launch-bar.bbo-topnav ul {
        min-width: 520px;
        justify-content: center;
        gap: 3px;
    }

    .dashboard-page .quick-launch-bar.bbo-topnav li {
        flex: 0 0 auto;
        width: auto;
    }
}

@media (max-width: 479px) {
    .dashboard-page .quick-launch-bar.bbo-topnav .bbo-topnav__link {
        min-height: 68px;
        padding: 8px 4px;
    }

    .dashboard-page .quick-launch-bar.bbo-topnav .bbo-topnav__icon {
        width: 34px;
        height: 34px;
    }

    .dashboard-page .quick-launch-bar.bbo-topnav .bbo-topnav__icon i {
        font-size: 14px;
    }

    .dashboard-page .quick-launch-bar.bbo-topnav .bbo-topnav__label {
        font-size: 9px;
    }
}

/* --------------------------------------------------------------------------
   List pages (utenti, eventi, ecc.)
   -------------------------------------------------------------------------- */

.bbo-list-page .wrapper.scrollable {
    background: var(--bbo-bg);
}

.bbo-page-content {
    padding: 0 20px 2rem;
}

.bbo-page-top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.bbo-page-header {
    margin-bottom: 0;
    flex: 1 1 auto;
}

.bbo-page-top .bbo-page-toolbar {
    margin-bottom: 0;
    flex: 0 0 auto;
}

.bbo-page-header__title {
    margin: 0 0 0.35rem;
    font-size: 1.65rem;
    font-weight: 600;
    color: var(--bbo-text);
    line-height: 1.3;
}

.bbo-page-header__title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 1.1em;
    margin-right: 10px;
    vertical-align: -0.1em;
    background: var(--bbo-brand);
    border-radius: 2px;
}

.bbo-page-header__desc {
    margin: 0 0 0 14px;
    font-size: 1rem;
    color: var(--bbo-text-muted);
}

.bbo-page-toolbar {
    margin-bottom: 1rem;
}

.bbo-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.1rem;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: all var(--bbo-transition);
    cursor: pointer;
}

.bbo-btn:hover,
.bbo-btn:focus {
    text-decoration: none;
}

.bbo-btn--primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--bbo-brand) 0%, var(--bbo-brand-dark) 100%);
    border-color: var(--bbo-brand-dark);
    box-shadow: 0 2px 8px rgba(155, 0, 0, 0.2);
}

.bbo-btn--primary:hover,
.bbo-btn--primary:focus {
    color: #ffffff;
    background: var(--bbo-brand-dark);
    box-shadow: 0 4px 14px rgba(155, 0, 0, 0.25);
    transform: translateY(-1px);
}

.bbo-panel {
    background: var(--bbo-surface);
    border: 1px solid var(--bbo-border);
    border-radius: var(--bbo-radius);
    box-shadow: var(--bbo-shadow);
    overflow: hidden;
}

.bbo-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.35rem;
    background: linear-gradient(135deg, var(--bbo-brand) 0%, var(--bbo-brand-dark) 100%);
    color: #ffffff;
}

.bbo-panel__title {
    margin: 0 0 0.2rem;
    font-size: 1.15rem;
    font-weight: 600;
}

.bbo-panel__meta {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.bbo-panel__header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    font-size: 1.1rem;
}

.bbo-panel__body--flush {
    padding: 0;
}

.bbo-list-page .bbo-table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    border: none;
    border-radius: 0;
    background: var(--bbo-surface);
}

.bbo-list-page .bbo-table--list thead th {
    background: #2c2c2c;
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: none;
    border-bottom: 3px solid var(--bbo-brand);
    padding: 12px 14px;
    vertical-align: middle;
}

.bbo-list-page .bbo-table--list thead th:first-child {
    border-radius: 0;
}

.bbo-list-page .bbo-table--list tbody td {
    padding: 12px 14px;
    vertical-align: middle;
    color: var(--bbo-text);
    font-size: 0.95rem;
    border: none;
    border-bottom: 1px solid var(--bbo-border);
}

.bbo-list-page .bbo-table--list tbody tr:nth-child(even) td {
    background: #fafbfc;
}

.bbo-list-page .bbo-table--list tbody tr:hover td {
    background: var(--bbo-brand-light);
}

.bbo-list-page .bbo-table--list tbody tr:last-child td {
    border-bottom: none;
}

.bbo-list-page .bbo-table__col-id {
    width: 70px;
    text-align: center;
}

.bbo-list-page .bbo-table__badge {
    display: inline-block;
    min-width: 36px;
    padding: 5px 10px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--bbo-brand-dark);
    background: var(--bbo-brand-light);
    border: 1px solid #f5c6c6;
    border-radius: 6px;
    text-align: center;
}

.bbo-list-page .bbo-table__user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.bbo-list-page .bbo-table__avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bbo-brand) 0%, var(--bbo-brand-dark) 100%);
    color: #ffffff;
    font-size: 0.82rem;
}

.bbo-list-page .bbo-table__name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--bbo-text);
}

.bbo-list-page .bbo-table__email,
.bbo-list-page .bbo-table__username {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.92rem;
    color: var(--bbo-text-muted);
}

.bbo-list-page .bbo-table__email i,
.bbo-list-page .bbo-table__username i,
.bbo-list-page .bbo-table__date i {
    color: var(--bbo-brand);
    font-size: 0.88rem;
    opacity: 0.85;
}

.bbo-list-page .bbo-table__date {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.92rem;
    color: var(--bbo-text-muted);
}

.bbo-list-page .bbo-table__status {
    width: 100px;
    text-align: center;
    white-space: nowrap;
}

.bbo-status-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    min-width: 64px;
    padding: 5px 9px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid var(--bbo-border);
    transition: all var(--bbo-transition);
}

.bbo-status-toggle:hover,
.bbo-status-toggle:focus {
    text-decoration: none;
}

.bbo-status-toggle i {
    font-size: 1rem;
    line-height: 1;
}

.bbo-status-toggle--on {
    color: #15803d;
    background: #f0fdf4;
    border-color: #86efac;
}

.bbo-status-toggle--on:hover,
.bbo-status-toggle--on:focus {
    color: #15803d;
    background: #dcfce7;
    border-color: #4ade80;
}

.bbo-status-toggle--off {
    color: var(--bbo-text-muted);
    background: var(--bbo-bg);
    border-color: var(--bbo-border);
}

.bbo-status-toggle--off:hover,
.bbo-status-toggle--off:focus {
    color: var(--bbo-brand-dark);
    background: var(--bbo-brand-light);
    border-color: var(--bbo-brand);
}

.bbo-status-toggle--static {
    cursor: default;
}

.bbo-list-page .bbo-table__badge--order {
    color: #1e40af;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.bbo-list-page .bbo-table__link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    max-width: 280px;
    font-size: 0.92rem;
    color: var(--bbo-brand);
    text-decoration: none;
    word-break: break-all;
}

.bbo-list-page .bbo-table__link:hover,
.bbo-list-page .bbo-table__link:focus {
    color: var(--bbo-brand-dark);
    text-decoration: underline;
}

.bbo-list-page .bbo-table__link i {
    flex-shrink: 0;
    font-size: 0.82rem;
}

.bbo-list-page .bbo-table__col-thumb {
    width: 110px;
    text-align: center;
}

.bbo-list-page .bbo-table__thumb {
    display: inline-block;
    padding: 4px;
    background: #ffffff;
    border: 1px solid var(--bbo-border);
    border-radius: 8px;
    line-height: 0;
    transition: all var(--bbo-transition);
}

.bbo-list-page .bbo-table__thumb:hover {
    border-color: var(--bbo-brand);
    box-shadow: var(--bbo-shadow-hover);
}

.bbo-list-page .bbo-table__thumb img {
    display: block;
    max-height: 56px;
    max-width: 88px;
    width: auto;
    height: auto;
    border-radius: 4px;
}

.bbo-list-page .bbo-table__thumb-empty {
    color: var(--bbo-text-muted);
    font-size: 0.92rem;
}

.bbo-list-page .bbo-table__actions {
    width: 110px;
    text-align: center;
    white-space: nowrap;
}

.bbo-list-page .bbo-table__actions-group {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.bbo-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--bbo-border);
    background: var(--bbo-bg);
    color: var(--bbo-text-muted);
    text-decoration: none;
    transition: all var(--bbo-transition);
}

.bbo-action-icon:hover,
.bbo-action-icon:focus {
    text-decoration: none;
}

.bbo-action-icon i {
    font-size: 15px;
    line-height: 1;
}

.bbo-action-icon--edit:hover,
.bbo-action-icon--edit:focus {
    color: #2563eb;
    border-color: #93c5fd;
    background: #eff6ff;
}

.bbo-action-icon--delete:hover,
.bbo-action-icon--delete:focus {
    color: var(--bbo-brand);
    border-color: #fca5a5;
    background: var(--bbo-brand-light);
}

/* DataTables overrides */

.bbo-list-page .dataTables_wrapper {
    padding: 1rem 1rem 0.5rem;
}

.bbo-list-page .dataTables_wrapper .row:first-child {
    margin-bottom: 0.75rem;
}

.bbo-list-page .dataTables_filter input,
.bbo-list-page .dataTables_length select {
    border: 1px solid var(--bbo-border);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.9rem;
}

.bbo-list-page .dataTables_wrapper,
.bbo-list-page .dataTables_info,
.bbo-list-page .dataTables_length label,
.bbo-list-page .dataTables_filter label,
.bbo-list-page .dataTables_paginate {
    font-size: 0.9rem;
}

.bbo-list-page .dataTables_paginate .paginate_button.current,
.bbo-list-page .dataTables_paginate .paginate_button.current:hover {
    background: var(--bbo-brand) !important;
    border-color: var(--bbo-brand) !important;
    color: #fff !important;
}

@media (max-width: 767px) {
    .bbo-page-content {
        padding: 0 12px 1.5rem;
    }

    .bbo-page-header__title {
        font-size: 1.35rem;
    }

    .bbo-page-header__desc {
        font-size: 0.9rem;
    }

    .bbo-list-page .bbo-table--list tbody td {
        font-size: 0.9rem;
    }

    .bbo-page-top {
        flex-direction: column;
        align-items: stretch;
    }

    .bbo-page-top .bbo-page-toolbar .bbo-btn {
        width: 100%;
        justify-content: center;
    }

    .dashboard-page .dashboard-hero__logo img {
        height: 70px;
    }

    .bbo-list-page .bbo-table__user {
        gap: 0.5rem;
    }

    .bbo-list-page .bbo-table__avatar {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
}

/* Fallback senza :has() – base testo dashboard */
body.dashboard-page {
    font-size: 0.9375rem;
}

/* --------------------------------------------------------------------------
   Form pages
   -------------------------------------------------------------------------- */

.bbo-form-page .wrapper.scrollable {
    background: var(--bbo-bg);
}

.bbo-form-panel .bbo-panel__body {
    padding: 1.5rem 1.75rem 1.75rem;
}

.bbo-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem 1.5rem;
}

.bbo-form__group {
    margin: 0;
}

.bbo-form__group--full {
    grid-column: 1 / -1;
}

.bbo-form__label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--bbo-text-muted);
}

.bbo-form__input {
    width: 100%;
    height: auto;
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
    color: var(--bbo-text);
    background: #ffffff;
    border: 1px solid var(--bbo-border);
    border-radius: 8px;
    box-shadow: none;
    transition: border-color var(--bbo-transition), box-shadow var(--bbo-transition);
}

.bbo-form__input:focus {
    border-color: var(--bbo-brand);
    box-shadow: 0 0 0 3px rgba(155, 0, 0, 0.12);
    outline: none;
}

.bbo-form__input[readonly] {
    background: #f8f9fb;
    color: var(--bbo-text-muted);
}

.bbo-form__hint {
    margin: 0.4rem 0 0;
    font-size: 0.82rem;
    color: var(--bbo-text-muted);
}

.bbo-form__hint--preview a {
    color: var(--bbo-brand);
    font-weight: 600;
}

.bbo-form__section {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--bbo-border);
}

.bbo-form__section-title {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--bbo-text);
}

.bbo-form__textarea {
    min-height: 180px;
    resize: vertical;
}

.bbo-form__select {
    appearance: auto;
    cursor: pointer;
}

.bbo-form__file {
    width: 100%;
    padding: 0.55rem;
    font-size: 0.9rem;
    background: #ffffff;
    border: 1px dashed var(--bbo-border);
    border-radius: 8px;
}

.bbo-form__file:focus {
    outline: none;
    border-color: var(--bbo-brand);
}

.bbo-form__preview {
    margin: 0 0 1rem;
}

.bbo-form__preview img {
    display: block;
    max-width: 280px;
    width: 100%;
    height: auto;
    border: 1px solid var(--bbo-border);
    border-radius: 8px;
    padding: 4px;
    background: #ffffff;
}

.bbo-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--bbo-border);
}

.bbo-btn--secondary {
    color: var(--bbo-text);
    background: #ffffff;
    border: 1px solid var(--bbo-border);
}

.bbo-btn--secondary:hover,
.bbo-btn--secondary:focus {
    color: var(--bbo-brand-dark);
    background: var(--bbo-brand-light);
    border-color: var(--bbo-brand);
}

.bbo-btn--ghost {
    color: var(--bbo-text-muted);
    background: transparent;
    border: 1px solid var(--bbo-border);
}

.bbo-btn--ghost:hover,
.bbo-btn--ghost:focus {
    color: var(--bbo-text);
    background: #ffffff;
    border-color: #cbd5e1;
}

.bbo-form__alert {
    display: none;
    align-items: center;
    gap: 0.6rem;
    margin: 1rem 0 0;
    padding: 0.85rem 1rem;
    font-size: 0.92rem;
    font-weight: 600;
    color: #15803d;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
}

.bbo-form__alert--visible,
.bbo-form__alert.bbo-form__alert--visible {
    display: flex;
}

.bbo-form__alert i {
    font-size: 1.1rem;
}

@media (max-width: 767px) {
    .bbo-form-panel .bbo-panel__body {
        padding: 1.15rem;
    }

    .bbo-form__grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .bbo-form__actions {
        flex-direction: column;
    }

    .bbo-form__actions .bbo-btn {
        width: 100%;
        justify-content: center;
    }
}
