/* ============================================================
   AdminLTE → Tabler Compatibility Bridge
   ============================================================
   Alias per classi AdminLTE ancora usate nelle view.
   Da rimuovere progressivamente man mano che le view vengono
   aggiornate ai componenti nativi Tabler.
   ============================================================ */

/* ===== SMALL-BOX (dashboard stat cards) ===== */
.small-box {
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    display: block;
    margin-bottom: 1rem;
    color: #fff;
}

.small-box .inner {
    padding: 1rem;
    position: relative;
    z-index: 1;
}

.small-box .inner h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    white-space: nowrap;
}

.small-box .inner p {
    font-size: 0.875rem;
    margin: 0;
    opacity: 0.85;
}

.small-box .icon {
    position: absolute;
    top: 10px;
    right: 15px;
    z-index: 0;
    color: rgba(0, 0, 0, 0.15);
}

.small-box .icon > i { font-size: 60px; }

.small-box > a,
.small-box > .small-box-footer {
    display: block;
    padding: 0.4rem 1rem;
    background: rgba(0, 0, 0, 0.1);
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.8rem;
    text-align: center;
    transition: background 0.2s;
}

.small-box > a:hover,
.small-box > .small-box-footer:hover {
    background: rgba(0, 0, 0, 0.15);
    color: #fff;
}

.small-box.bg-info      { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.small-box.bg-success   { background: linear-gradient(135deg, #10b981, #059669); }
.small-box.bg-warning   { background: linear-gradient(135deg, #f59e0b, #d97706); }
.small-box.bg-danger    { background: linear-gradient(135deg, #ef4444, #dc2626); }
.small-box.bg-primary   { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.small-box.bg-secondary { background: linear-gradient(135deg, #64748b, #475569); }

/* ===== INFO-BOX ===== */
.info-box {
    display: flex;
    align-items: stretch;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 1rem;
    min-height: 80px;
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
}

.info-box .info-box-icon {
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    width: 70px;
    min-width: 70px;
}

.info-box .info-box-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 10px;
    flex: 1;
}

.info-box .info-box-text {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.info-box .info-box-number {
    font-size: 1.25rem;
    font-weight: 700;
}

.info-box.bg-primary,
.info-box.bg-success,
.info-box.bg-warning,
.info-box.bg-danger,
.info-box.bg-info {
    color: #fff;
    border: none;
}

.info-box.bg-primary .info-box-icon,
.info-box.bg-success .info-box-icon,
.info-box.bg-warning .info-box-icon,
.info-box.bg-danger .info-box-icon,
.info-box.bg-info .info-box-icon {
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
}

/* ===== ELEVATION ===== */
.elevation-1 { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.elevation-2 { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04); }
.elevation-3 { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04); }
.elevation-4 { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04); }
.elevation-5 { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); }

/* ===== BS4 → BS5 Spacing Aliases ===== */
.ml-auto { margin-left: auto !important; }
.mr-auto { margin-right: auto !important; }
.ml-0 { margin-left: 0 !important; }
.ml-1 { margin-left: 0.25rem !important; }
.ml-2 { margin-left: 0.5rem !important; }
.ml-3 { margin-left: 1rem !important; }
.ml-4 { margin-left: 1.5rem !important; }
.ml-5 { margin-left: 3rem !important; }
.mr-0 { margin-right: 0 !important; }
.mr-1 { margin-right: 0.25rem !important; }
.mr-2 { margin-right: 0.5rem !important; }
.mr-3 { margin-right: 1rem !important; }
.mr-4 { margin-right: 1.5rem !important; }
.mr-5 { margin-right: 3rem !important; }
.pl-0 { padding-left: 0 !important; }
.pl-1 { padding-left: 0.25rem !important; }
.pl-2 { padding-left: 0.5rem !important; }
.pl-3 { padding-left: 1rem !important; }
.pr-0 { padding-right: 0 !important; }
.pr-1 { padding-right: 0.25rem !important; }
.pr-2 { padding-right: 0.5rem !important; }
.pr-3 { padding-right: 1rem !important; }

/* Float aliases */
.float-left    { float: left !important; }
.float-right   { float: right !important; }
.float-sm-right { float: right !important; }

/* Text alignment */
.text-left  { text-align: left !important; }
.text-right { text-align: right !important; }

/* Badge color aliases (BS4 badge-* → BS5 bg-*) */
.badge.badge-primary   { background-color: var(--tblr-primary) !important; color: #fff; }
.badge.badge-secondary { background-color: var(--tblr-secondary) !important; color: #fff; }
.badge.badge-success   { background-color: var(--tblr-success) !important; color: #fff; }
.badge.badge-danger    { background-color: var(--tblr-danger) !important; color: #fff; }
.badge.badge-warning   { background-color: var(--tblr-warning) !important; color: #fff; }
.badge.badge-info      { background-color: var(--tblr-info) !important; color: #fff; }
.badge.badge-light     { background-color: #f8f9fa !important; color: #212529; }
.badge.badge-dark      { background-color: #212529 !important; color: #fff; }

/* Close button alias */
.close {
    background: transparent;
    border: 0;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1;
    opacity: 0.5;
    padding: 0;
    cursor: pointer;
}

.close:hover { opacity: 0.75; }

/* AdminLTE form-group */
.form-group { margin-bottom: 1rem; }

/* data-dismiss alias */
[data-dismiss="alert"] { cursor: pointer; }

/* AdminLTE card-tools */
.card-tools {
    float: right;
    margin-right: -0.5rem;
}

.card-tools .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Content wrapper */
.content-wrapper { min-height: auto; }

/* Products list */
.products-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.products-list > li {
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.products-list > li:last-child { border-bottom: none; }
.products-list .product-info { margin-left: 0; }
