/* RMOS - custom
*/

:root {
    --font-base: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}


/* ===== rb-multiselect custom dropdown ===== */
.rb-ms-wrap { position: relative; }
.rb-ms-trigger {
    display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; user-select: none; width: 100%;
    background-color: #fff; border: 1px solid #dee2e6;
    border-radius: .375rem; padding: .5rem .75rem; font-size: .9rem;
    color: #212529; text-align: left;
}
.rb-ms-trigger:focus { outline: 0; border-color: #86b7fe; box-shadow: 0 0 0 .25rem rgba(13,110,253,.25); }
.rb-ms-trigger::after {
    content: ""; flex-shrink: 0; display: inline-block;
    border: 4px solid transparent; border-top: 5px solid #999;
    margin-left: 8px; margin-top: 3px;
}
.rb-ms-trigger.open::after { border-top-color: transparent; border-bottom: 5px solid #999; margin-top: -2px; }
.rb-ms-dropdown {
    position: absolute; z-index: 1050; width: 100%;
    background: #fff; border: 1px solid #dee2e6;
    border-radius: .375rem; box-shadow: 0 .5rem 1rem rgba(0,0,0,.12);
    max-height: 220px; overflow-y: auto; top: calc(100% + 2px); left: 0;
}
.rb-ms-item {
    display: flex; align-items: center; gap: 0;
    padding: 7px 12px; cursor: pointer; font-size: .88rem; color: #212529;
}
.rb-ms-item:hover { background: #f8f9fa; }
.rb-ms-item input[type=checkbox] { flex-shrink: 0; cursor: pointer; width: 15px; height: 15px; accent-color: #4f46e5; margin-right: 10px; }
.rb-ms-item span { line-height: 1.3; }
/* ===== fine rb-multiselect ===== */

pre { white-space: pre-wrap; }

body {
    font-family: var(--font-base);
    font-size: 0.925rem;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ----- 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 styles */
.badge { font-family: var(--font-mono); }
.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;   
}

/* Tables general */
.table {
    font-size: 0.875rem;
}

.table th {
    font-weight: 600;
    letter-spacing: 0.01em;
}

.table td,
.table th {
    vertical-align: middle;
}

/* Monospace classes for IDs, codici e importi */
.text-mono,
.col-id,
.col-codice,
.col-importo,
.col-numero,
.col-pod,
.col-pdr,
.col-cf,
.col-piva {
    font-family: var(--font-mono) !important;
    font-variant-numeric: tabular-nums;
}

.col-importo,
.text-right,
.text-end {
    text-align: right;
}

/* Utility weights */
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }

/* Specific DataTable cell override (uses base font variable) */
table.dataTable td {
  font-size: 11pt;
  font-family: var(--font-base);
  font-weight: 400;
  font-style: normal;
}

.btnResetFiltri {
    padding: 5px 10px;
    background-color:  #DC3545;
    color: #FFFFFF;
    border: 1px solid #FFFFFF;
}