/* RMOS - custom overrides for PlainAdmin + Bootstrap 5 */

pre { white-space: pre-wrap; }

/* ----- Preloader ----- */
#preloader {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    z-index: 9999;
}
#preloader .spinner {
    width: 2.5rem;
    height: 2.5rem;
}

/* ----- Login page ----- */
.signin-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--body-color, #f5f5f5);
    padding: 2rem 1rem;
}
.signin-section .card-style {
    width: 100%;
    max-width: 440px;
}
.signin-section .signin-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.signin-section .signin-logo img {
    height: 40px;
}

/* ----- DataTables (Bootstrap 5) - custom spacing in card-style ----- */
.card-style .dataTables_wrapper .row:first-child,
.card-style .dataTables_wrapper .row:last-child {
    padding: .5rem 0;
}
.card-style .dataTables_wrapper table.dataTable {
    margin-top: .5rem !important;
    margin-bottom: .5rem !important;
}
.dataTables_wrapper .dataTables_filter input {
    margin-left: .5rem;
}

/* ----- Loader inline (spinner in card) ----- */
.rb-loader {
    text-align: center;
    padding: 2rem 0;
}
.rb-loader .spinner-border {
    width: 2rem;
    height: 2rem;
}

/* ----- Pulsanti azione in tabella ----- */
.rb-btn-azione {
    background: none;
    border: none;
    outline: none;
    box-shadow: none;
    padding: 2px 6px;
    cursor: pointer;
    font-size: 1rem;
    opacity: .75;
    transition: opacity .15s;
    line-height: 1;
}
.rb-btn-azione:hover,
.rb-btn-azione:focus {
    opacity: 1;
    outline: none;
    box-shadow: none;
}
.rb-btn-azione.btn-info    { color: #0dcaf0; }
.rb-btn-azione.btn-danger  { color: #dc3545; }
.rb-btn-azione.btn-success { color: #198754; }

/* ----- Filtri sopra tabella ----- */
.rb-filtri {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: flex-end;
    margin-bottom: 1rem;
}
.rb-filtri .form-control,
.rb-filtri .form-select {
    max-width: 220px;
}

/* ----- Badge compatibilità (rinominati da BS4 a BS5) ----- */
.badge.badge-success { background-color: #198754; }
.badge.badge-danger  { background-color: #dc3545; }
.badge.badge-warning { background-color: #ffc107; color: #000; }
.badge.badge-info    { background-color: #0dcaf0; color: #000; }

/* ----- Title wrapper ----- */
.title-wrapper.pt-30 {
    padding-top: 30px;
}
.title-wrapper h6.mb-0 {
    font-size: 1.1rem;
    font-weight: 600;
}

.rb-btn-azione.btn-warning { color: #ffc107; }
.rb-btn-azione.btn-primary { color: #007bff; }

/* ----- Controlli compatti (override PlainAdmin default padding eccessivo) ----- */
.input-style-1 input,
.input-style-1 textarea {
    padding: .5rem .75rem;
    font-size: .9rem;
}
.input-style-1 {
    margin-bottom: 1rem;
}
.select-style-1 {
    margin-bottom: 1rem;
}
.select-style-1 .select-position select {
    padding: .5rem .75rem;
    font-size: .9rem;
}

/* override template: fix errori! */
.table > :not(caption) > * > * {
    padding: 15px 6px;
}
dt-column-order::before {
    content: "\f0d7";
    font-family: "Font Awesome 7 Free";
    font-weight: 900;
}
dt-column-order::after {
    content: "\f0d8";
    font-family: "Font Awesome 7 Free";
    font-weight: 900;
}
span.dt-column-order::before  {
    line-height: 13px !important;
}
/* annulla il padding-bottom:0 dell'ultima riga ereditato da main.css su .table */
table.dataTable tbody tr:last-child > * {
 padding-bottom: 15px !important;   
}