:root {
    --primary: #2c7be5;
    --secondary: #6c757d;
    --success: #26ce80;
    --danger: #e63757;
    --warning: #ffc108;
    --info: #00c8ff;
    --light: #edf2f9;
    --dark: #12263f;
    --navy: #05102a;
    --gray-header: #f5f7fa;
    --purple: #7c69ef;
    --teal: #02a8b5;
    --gray-100: #f8f9fa;
    --gray-200: #edf2f9;
    --gray-300: #e3ebf6;
    --gray-400: #d2ddec;
    --gray-500: #b1c2d9;
    --gray-600: #95aac9;
    --gray-700: #6e84a3;
    --gray-800: #3b506c;
    --gray-900: #12263f;
    --rent-bg: #d7cfe5;
    --rent-text: #8b64c6;
    --sale-bg: #b3e5fc;
    --sale-text: #00acc1;
    --orange: #FF8C00;
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--gray-100);
    color: var(--gray-800);
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

.sidebar {
    background-color: var(--dark);
    color: white;
    height: 100vh;
    position: fixed;
    width: 240px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar .nav-link {
    color: var(--gray-500);
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.05);
}

.sidebar .nav-link i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    margin-top: auto;
    text-align: center;
}

.sidebar-footer h5 {
    margin-bottom: 15px;
}

.sidebar-footer ul {
    list-style-type: none;
    padding: 0;
    display: flex;
    justify-content: center;
}

.sidebar-footer ul li {
    margin-right: 15px;
}

.sidebar-footer ul li:last-child {
    margin-right: 0;
}

.main-content {
    margin-left: 240px;
    padding: 2rem;
    transition: margin-left 0.3s ease;
    max-width: calc(100% - 240px);
    padding-top: 3.5rem;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-300);
}

.title-date-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-sxm { font-size: 1rem; }
.icon-sm { font-size: 1.5rem; }
.icon-md { font-size: 2rem; }
.icon-lg { font-size: 3rem; }
.icon-xl { font-size: 4rem; }

.icon-tools {
    color: #F1F1F1;
    background-color: var(--orange);
    border-radius: 50%;
    padding: 0.75rem;
    font-size: 20px;
}

.icon-expired {
    background-color: #FF9800;
    font-size: 18px;
    color: white;
    border-radius: 5px;
}

.icon-success {
    background-color: #198754 !important;
}

.icon-info {
    background-color: #00C8FF !important;
}

.icon-article {
    background-color: #FF8C00 !important;
}

.icon-alert {
    background-color: #ff0000 !important;
}

.icon-alert-v2 {
    color: #ff0000 !important;
    background-color: #ffcccc;
    font-size: 1.25rem;
    vertical-align: middle;
    border-radius: 5px;
    padding: 0.2rem;
}

.icon-warning-v2 {
    color: #ffc108 !important;
    background-color: #fff3ce;
    font-size: 1.4rem;
}

.signature-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.signature-container .form-label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-600);
}

.signature-canvas {
    display: block;
    border: 1px solid var(--gray-400);
    border-radius: 0.25rem;
    background-color: white;
    width: 100%;
    max-width: 400px;
}

.signature-btn {
    margin-left: 0.5rem;
}

.btn-deleted {
    background-color: #ff0000 !important;
    color: white;
}

.btn-history {
    background-color: var(--dark);
    color: white;
}

.btn-add {
    background-color: var(--dark);
    color: white;
    transition: background-color 0.3s, color 0.3s;
}

.btn-add:hover {
    background-color: var(--light);
    color: black;
}

.card {
    border: none;
    box-shadow: 0 0.25rem 0.75rem rgba(18, 38, 63, 0.05);
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    margin-left: 0;
    margin-right: 0;
}

.card-prepare {
    border-top: solid #FFC108 !important;
}

.card-out {
    border-top: solid #198754 !important;
}

.card-in {
    border-top: solid #08ccfc !important;
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--gray-300);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
}

.card-header h5 {
    margin-bottom: 0;
    font-weight: 600;
}

.search-container {
    position: relative;
    display: inline-block;
}

.search-container .form-control {
    padding-right: 30px;
}

.clear-search {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--gray-600);
    display: none;
    font-size: 16px;
}

.clear-search:hover {
    color: var(--dark);
}

.date-small {
    width: 150px;
}

.view-products {
    transition: transform 0.3s ease, color 0.2s;
}

.view-products.rotated {
    transform: rotate(180deg);
}

.view-products:hover {
    color: #007bff;
}

.status-card {
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0.25rem 0.75rem rgba(18, 38, 63, 0.1);
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.status-card .text-container {
    position: absolute;
    top: 70px;
    left: 20px;
    right: 20px;
    padding-bottom: 50px;
}

.status-card .text-container h4 {
    margin: 0;
    font-size: 1.25rem;
}

.status-card .text-container .small {
    margin-top: 5px;
    font-size: 0.9rem;
}

.status-card .count,
.status-card .tools-count {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.status-card .subtitle {
    font-size: 0.875rem;
    opacity: 0.85;
}

.status-card .icon {
    position: absolute;
    right: 1.25rem;
    top: 1.25rem;
    font-size: 1.5rem;
    opacity: 0.8;
}

.status-card-prepare {
    background-color: var(--warning);
}

.status-card-exit {
    background-color: var(--success);
}

.status-card-entry {
    background-color: var(--info);
}

.status-card-tools {
    background-color: white;
    color: var(--dark);
    box-shadow: 0 0.25rem 0.75rem rgba(18, 38, 63, 0.05);
}

.alert-box {
    padding: 0.5rem 0.75rem;
    border-radius: 0.25rem;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.5rem;
}

.alert-box i {
    margin-right: 0.5rem;
    font-size: 1.5rem;
}

.alert-box span {
    font-size: 1.25rem;
}

.alert-box-v1 {
    border-radius: 0.25rem;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: white;
}

.alert-delay {
    background-color: #cc9a06;
    color: white;
    padding: 8px 12px;
}

.alert-box-v1 i {
    margin-right: 0.5rem;
    font-size: 1.5rem;
}

.alert-box-v1 .alert-text {
    flex-grow: 1;
    text-align: center;
    font-size: 1.25rem;
}

.alert-enter-delay {
    background-color: #ff0000;
    color: white;
    display: flex;
    align-items: center;
}

.alert-text {
    flex-grow: 1;
    text-align: center;
    font-size: 1.25rem;
}

.alert-number {
    background-color: #a37b05;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
}

.alert-enter-number {
    background-color: #ff7f7f;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
}

.alert-prepare {
    background-color: #cc9a06;
    margin-right: auto;
    margin-top: 50px;
}

.alert-prepare-number {
    background-color: #a37b05;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
}

.alert-expired {
    background-color: #ff0000;
    border-radius: 0.25rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.alert-expired-v1 {
    background-color: #ff0000;
    margin-left: auto;
    margin-top: 50px;
}

.alert-expired-number {
    background-color: #cc0000;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
}

.alert-must-exit-number {
    background-color: #a3b5a1;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
}

.alert-articles {
    background-color: #091747;
    margin-left: auto;
    margin-top: 50px;
}

.alert-articles-number {
    background-color: #6b6b6b;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
}

.alert-expired-prepared {
    background-color: #198754;
}

.alert-expired-prepared-number {
    background-color: #a3b5a1;
}

.microsoft-link i {
    color: #00A1F1;
    font-size: 2rem;
    transition: color 0.3s ease;
}

.microsoft-link:hover i {
    color: #6c757d; 
}

.waiting-number {
    background-color: #a3b5a1;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
}

.alert-waiting {
    background-color: #198754;
    color: white;
    border-radius: 0.25rem;
    opacity: 0.9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    width: 100%;
    box-sizing: border-box;
}

.alert-unrecognized {
    background-color: var(--danger);
    color: white;
}

.select:disabled {
    background-color: #f8f9fa;
    opacity: 0.7;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
}

.status-badge-pending {
    background-color: rgba(246, 195, 67, 0.1);
    color: var(--warning);
}

.status-badge-progress {
    background-color: rgba(44, 123, 229, 0.1);
    color: var(--primary);
}

.status-badge-completed {
    background-color: rgba(0, 217, 126, 0.1);
    color: var(--success);
}

.status-badge-waiting {
    background-color: rgba(230, 55, 87, 0.1);
    color: var(--danger);
}

.status-badge-new {
    background-color: #CED1DA !important;
    color: #091747 !important;
}

.status-badge-created {
    background-color: #ffc108 !important;
    color: #091747 !important;
}

.status-badge-preparing {
    background-color: #fff3ce;
    color: #f9926f;
}

.status-badge-prepared {
    background-color: #D1E7DD;
    color: #198754;
}

.status-badge-on_way_out {
    background-color: #198754;
    color: white;
}

.status-badge-out {
    background-color: #00C8FF;
    color: white;
}

.status-badge-on_way_in {
    background-color: #d5f6ff;
    color: #00C8FF;
}

.status-badge-in {
    background-color: #00C8FF !important;
    color: white !important;
}

.status-badge-closed {
    background-color: #00C8FF !important;
    color: white !important;
}

.status-badge-expired {
    background-color: #FFCCCC;
    color: #FF0000;
}

.status-badge-canceled {
    background-color: #e6e6e6;
    color: #686868;
}

.status-open {
    background-color: #D1E7DD;
    color: #198754;
    font-weight: bold;
    padding: 0.5rem;
    margin-right: 8px;
    border-radius: 5px;
}

.status-closed {
    background-color: #FFCCCC;
    color: #FF0000;
    font-weight: bold;
    padding: 0.5rem;
    margin-right: 8px;
    border-radius: 5px;
}

.status-border-open {
    border: 2px solid #D1E7DD;
}

.status-border-closed {
    border: 2px solid #FFCCCC;
}

.table {
    margin-bottom: 0;
    border-collapse: collapse;
    width: 100%;
    min-width: 600px;
}

.table th,
.table td {
    padding: 0.75rem;
    border: 1px solid var(--gray-200);
}

.table th {
    background-color: var(--gray-200);
}

.action-icon {
    height: 32px;
    width: 32px;
    border-radius: 50%;
    background-color: var(--gray-200);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-700);
    margin-right: 0.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.table td.text-center .action-icon {
    height: 32px;
    width: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.25rem;
    cursor: pointer;
    transition: background-color 0.2s;
    background-color: transparent;
}

.table td.text-center .action-icon a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit !important;
}

.table td.text-center .action-icon .status-prepared {
    color: #26ce80 !important;
}

.table td.text-center .action-icon .status-created,
.table td.text-center .action-icon .status-preparing {
    color: #ffc108 !important;
}

.table td.text-center .action-icon .status-expired {
    color: #e63757 !important;
}

.table td.text-center .action-icon .status-incoming {
    color: var(--info) !important;
}

.table td.text-center .action-icon:hover {
    background-color: var(--gray-400);
    color: white !important;
}

.version-tabs {
    display: inline-flex;
    background-color: var(--gray-200);
    border-radius: 0.5rem;
    padding: 0.25rem;
    margin-bottom: 1rem;
}

.version-tabs a {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    text-decoration: none;
}

.version-tabs a.active {
    background-color: white;
    color: var(--dark);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.user-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
}

.user-profile .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: white;
    margin-right: 0.75rem;
}

.user-profile .info {
    margin-bottom: 10px;
}

.user-profile .name {
    font-weight: 600;
    margin-bottom: 0.125rem;
}

.user-profile .role {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: auto;
}

.user-icon,
.logout-icon {
    font-size: 24px;
    color: #828282;
    transition: color 0.3s ease;
}

.user-icon:hover,
.logout-icon:hover {
    color: #ffffff;
}

.table-selector {
    margin: 0;
    padding: 10px 10px 5px 10px;
    background-color: #fff;
}

.tab-link {
    padding: 8px 16px;
    cursor: pointer;
    color: #6c757d;
    transition: all 0.3s;
}

.tab-link.active {
    background-color: #edf2f9;
    text-decoration: underline;
    font-weight: bold;
    color: #000;
}

.table-responsive {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    display: block;
}

.warning-icon {
    color: #ffc107;
    margin-left: 10px;
    font-size: 1.25rem;
}

.bell-icon {
    color: #ff0000;
    margin-left: 10px;
    font-size: 1.25rem;
}

#ordiniTable,
#articoliTable {
    display: none;
}

#ordiniTable {
    display: block;
}

.modal-dialog.modal-sm {
    max-width: 250px;
    margin: 1.75rem auto;
}

.modal-content {
    padding: 0.5rem;
}

.modal-header {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

.modal-body {
    padding: 0.75rem;
}

.modal-footer {
    padding: 0.5rem 0.75rem;
}

.modal-body .form-label {
    font-size: 0.85rem;
}

.modal-body .form-control {
    font-size: 0.85rem;
    padding: 0.3rem 0.5rem;
}

.modal-body textarea.form-control {
    min-height: 60px;
}

.error-message {
    font-size: 0.75rem;
    margin-top: 0.2rem;
}

.status-badge-available {
    margin-right: 8px;
    color: #198754;
}

.close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
}

.pagination-container {
    margin-top: 1rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination li {
    margin: 0 5px;
}

.pagination li a {
    padding: 5px 10px;
    border: 1px solid var(--gray-400);
    border-radius: 4px;
    text-decoration: none;
    color: var(--gray-700);
}

.pagination li a:hover:not(.disabled) {
    background-color: var(--gray-200);
}

.pagination li.active a {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination li.disabled a {
    color: var(--gray-500);
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.6;
}

#prev-page {
    margin-right: 10px;
}

#next-page {
    margin-left: 10px;
}

.page-number-current {
    font-size: 1.2rem;
    margin: 0 10px;
    font-weight: bold;
}

.page-number-small {
    font-size: 0.9rem;
    color: #888;
    margin: 0 5px;
}

.page-number-small:empty {
    display: none;
}

.table tbody tr {
    min-height: 60px;
    height: 60px;
}

.table td,
.table th {
    vertical-align: middle;
}

.alert-box-full {
    width: 95%;
    margin: 0 auto;
    padding: 5px;
    border-radius: 5px;
}

#articoliTable {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    display: table;
}

#articoliTable th,
#articoliTable td {
    word-wrap: break-word;
    border-top: 1px solid var(--gray-400);
    border-bottom: 1px solid var(--gray-400);
    border-left: none;
    border-right: none;
    padding: 0.75rem;
}

#articoliTable thead th {
    border-top: none;
    background-color: var(--gray-200);
}

#articoliTable tbody tr:last-child td {
    border-bottom: none;
}

#articoliTable .col-select { width: 5%; }
#articoliTable .col-id { width: 5%; }
#articoliTable .col-nome { width: 15%; }
#articoliTable .col-produttore { width: 15%; }
#articoliTable .col-quantita { width: 15%; }
#articoliTable .col-disponibilita { width: 20%; }
#articoliTable .col-tipo { width: 15%; }
#articoliTable .col-azioni { width: 10%; }

.custom-dropdown {
    position: relative;
    width: 100%;
}

.no-results-item {
    color: #6c757d;
    padding: 8px 12px;
    text-align: center;
    font-style: italic;
}

.custom-dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid var(--gray-400);
    border-radius: 0.25rem;
    background: white;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.custom-dropdown-list.visible {
    display: block;
}

.custom-dropdown-item {
    padding: 0.5rem;
    cursor: pointer;
    display: none;
}

.custom-dropdown-item.visible {
    display: block;
}

.custom-dropdown-item:hover {
    background-color: var(--gray-100);
}

.no-items {
    text-align: center;
    color: var(--gray-700);
    padding: 1.25rem;
}

.delete-btn {
    cursor: pointer;
    color: var(--danger);
    text-align: center;
}

.delete-btn:hover {
    color: #a71d2a;
}

.btn-actions {
    background-color: var(--gray-200);
    padding: 0.75rem;
    border-radius: 50%;
}

.btn-actions:hover {
    background-color: var(--gray-500);
    color: var(--gray-400);
    padding: 0.5rem;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.input-error {
    border-color: var(--danger);
    box-shadow: 0 0 0 0.2rem rgba(230, 55, 87, 0.25);
}

.duration-input {
    background-color: var(--gray-300);
}

#articoliTable.error {
    border: 2px solid var(--danger);
    border-radius: 0.25rem;
}

.input-with-button {
    position: relative;
    display: flex;
    align-items: center;
}

#generateRentCodeButton{
    margin-top: 0px;
}

.custom-dropdown-input {
    width: 100%;
    border-color: none !important;
}

.bg-articles {
    background-color: #FF8C00;
}

.input-with-button .btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

#articoliTable tr.error {
    background-color: rgba(230, 55, 87, 0.1);
}

.qty-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn {
    cursor: pointer;
    padding: 5px;
    font-size: 0.875rem;
    color: var(--dark);
}

.qty-btn:hover {
    color: var(--gray-800);
}

.qty-input {
    width: 60px;
    text-align: center;
    margin: 0 5px;
    border: 1px solid var(--gray-400);
    border-radius: 0.25rem;
    padding: 0.25rem;
}

.type-rent {
    background-color: var(--rent-bg) !important;
    color: var(--rent-text) !important;
    padding: 0.25rem 0.5rem !important;
    border-radius: 0.25rem !important;
}

.type-sale {
    background-color: var(--sale-bg);
    color: var(--sale-text);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.card-container {
    display: none;
}

.articolo-card {
    background-color: white;
    border: 1px solid var(--gray-400);
    border-radius: 0.25rem;
    padding: 0.9375rem;
    margin-bottom: 0.9375rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.status-circle {
    color: white;
    padding: 0.25rem;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.status-circle.green {
    background-color: #28a745 !important;
}

.status-circle.yellow {
    background-color: #ffc107 !important;
}

.status-circle.red {
    background-color: #dc3545 !important;
}

.articolo-card .card-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.articolo-card .card-label {
    font-weight: bold;
    color: var(--gray-700);
}

.articolo-card .card-value {
    color: var(--gray-900);
}

.articolo-card .qty-input {
    width: 60px;
}

.articolo-card .delete-btn {
    color: var(--danger);
    cursor: pointer;
    font-size: 1.125rem;
}

.articolo-card .delete-btn:hover {
    color: #a71d2a;
}

.sidebar-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: white;
    background-color: var(--dark);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1100;
    width: 100vw;
    box-sizing: border-box;
    align-items: center;
    justify-content: space-between;
    height: 50px;
}

.toggle-user-info {
    flex-grow: 1; /* Takes available space to center content */
    display: flex; /* Use flexbox to keep name and role in one line */
    align-items: center; /* Vertically center name and role */
    justify-content: center; /* Horizontally center the content */
    gap: 0.5rem; /* Small space between name and role */
    white-space: nowrap; /* Prevent wrapping to keep everything in one line */
}

.toggle-user-name {
    color: white;
    font-weight: 600;
    font-size: 1rem;
}

.toggle-user-role {
    color: var(--gray-500); /* Gray color for role, matching sidebar */
    font-style: italic; /* Italic as requested */
    font-size: 0.875rem; /* Slightly smaller for hierarchy */
}

.toggle-icons {
    display: flex;
    align-items: center;
    gap: 15px; /* Space between user and logout icons */
    padding-right: 1rem; /* Padding to keep icons from edge */
}

.accordion-item {
    margin-bottom: 1rem;
    border: none;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.accordion-button {
    padding: 0 !important;
    background-color: var(--gray-header);
    box-shadow: none !important;
    width: 100% !important;
    border: none !important;
}

.accordion-button:not(.collapsed) {
    background-color: var(--navy);
    color: white;
}

.accordion-button:focus {
    box-shadow: none !important;
    border-color: transparent !important;
}

.accordion-button::after {
    display: none !important;
}

.accordion-header {
    width: 100% !important;
}

.order-header {
    display: flex;
    width: 100%;
    align-items: center;
    padding: 1rem;
}

.arrow-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    min-width: 32px;
    background-color: #4c5561;
    border-radius: 0.25rem;
    margin-right: 1rem;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.accordion-button.collapsed .arrow-box {
    transform: rotate(-90deg);
}

.arrow-box i {
    color: white;
    font-size: 1rem;
}

.order-info {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    flex-grow: 1;
    max-width: calc(100% - 48px);
}

.order-field {
    margin-right: 2rem;
    margin-bottom: 0.5rem;
}

.order-field:last-child {
    margin-right: 0;
}

.order-field-label {
    font-size: 0.75rem;
    color: var(--gray-600);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.accordion-button:not(.collapsed) .order-field-label {
    color: var(--gray-400);
}

.order-field-value {
    font-weight: 600;
    font-size: 0.875rem;
}

.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 0.25rem;
    display: inline-block;
}

.check-icon,
.check-all-icon {
    cursor: pointer;
}

.check-icon-created {
    color: #ffc108 !important;
}

.check-icon-preparing {
    color: #f9926f;
}

.check-icon-prepared {
    color: #D1E7DD;
}

.check-icon-on_way_out {
    color: #198754;
}

.check-icon-out {
    color: #00C8FF;
}

.check-icon-on_way_in {
    color: #d5f6ff;
}

.check-icon-in {
    color: #00C8FF !important;
}

.check-icon-closed {
    color: #00C8FF !important;
}

.check-icon-expired {
    color: #FF0000;
}

.check-icon-canceled {
    color: #686868;
}

.check-icon.fa-circle-check,
.check-all-icon.fa-circle-check {
    font-size: 1.2em;
    font-weight: 900;
}

.check-all-icon.disabled {
    color: var(--gray-400);
    cursor: not-allowed;
}

.accordion-body {
    padding: 0;
    background-color: white;
}

.product-table {
    width: 100%;
}

.product-table th {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-600);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-300);
}

.product-table td {
    font-size: 0.875rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-300);
    vertical-align: middle;
}

.product-table tbody tr:last-child td {
    border-bottom: none;
}

.checkbox-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkbox-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.checkbox-circle.checked {
    background-color: var(--danger);
    border-color: var(--danger);
}

.checkbox-circle.checked i {
    color: white;
    font-size: 0.75rem;
}

.checkbox-circle[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.td-quantity {
    font-weight: 700;
    text-align: center;
}

.td-backorder {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.quantity-out {
    width: 100px;
    margin: 0 8px 0 0;
    display: inline-block;
}

.save-qty-icon {
    font-size: 1.2em;
    transition: color 0.2s;
    vertical-align: middle;
}

.save-qty-icon:hover {
    color: #218838 !important;
}

.disabled-row {
    background-color: #f8d7da !important;
    opacity: 0.7;
}

.closed-rental {
    opacity: 0.7;
    background-color: var(--gray-200);
}

.closed-rental .accordion-button {
    cursor: not-allowed;
}

.pagination {
    display: flex !important;
}

.swal2-custom-popup {
    border-radius: 10px;
    padding: 20px;
}

.swal2-input {
    width: 100%;
    margin: 10px 0;
    padding: 8px;
    border-radius: 5px;
    border: 1px solid #ced4da;
}

.btn {
    padding: 8px 16px;
    margin: 5px;
}

/* Estilos adicionales para transiciones y submenús */
.transition-icon {
    transition: transform 0.3s ease;
}

.rotate {
    transform: rotate(180deg);
}

.cursor-pointer {
    cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    #sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 240px;
        height: 100vh; /* Ensure full viewport height */
        background-color: var(--dark);
        color: white;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999; /* Ensure sidebar is above content but below toggle */
        display: flex;
        flex-direction: column; /* Stack content vertically */
        overflow-y: auto; /* Enable scrolling for the entire sidebar */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on mobile */
    }

    #sidebar.active {
        transform: translateX(0);
        padding-top: 50px; /* Space for sidebar-toggle */
    }

    #sidebar .nav {
        flex-grow: 1; /* Allow nav to take available space */
        padding-top: 1rem;
        padding-bottom: 1rem; /* Ensure padding at bottom for footer */
    }

    .sidebar-footer {
        position: sticky; /* Keep footer at bottom of sidebar */
        bottom: 0;
        background-color: var(--dark); /* Match sidebar background */
        z-index: 1; /* Ensure footer is above scrolling content */
        padding: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1); /* Subtle separator */
    }

    .main-content {
        margin-left: 0;
        max-width: 100%;
        padding-top: 50px; /* Adjust for sidebar-toggle */
        box-sizing: border-box;
    }

    .sidebar-toggle {
        display: flex;
        position: fixed;
        top: 0;
        width: 100%;
        height: 50px;
        background-color: var(--dark);
        z-index: 1000; /* Above sidebar */
        align-items: center;
        justify-content: space-between;
        padding: 0 1rem;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }

    .toggle-user-info {
        flex-grow: 1;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .toggle-user-name {
        font-weight: 600;
        color: white;
        font-size: 1rem;
    }

    .toggle-user-role {
        font-size: 0.875rem;
        color: var(--gray-500); /* #b1c2d9 */
        font-style: italic;
    }

    .toggle-icons {
        display: flex;
        align-items: center;
        gap: 15px;
        padding-right: 1rem;
    }

    .toggle-icons a {
        color: var(--gray-500); /* #b1c2d9 */
        font-size: 1.25rem;
        transition: color 0.3s ease;
    }

    .toggle-icons a:hover {
        color: white;
    }

    .user-profile {
        display: none; /* Ocultar el user-profile en el sidebar en mobile */
    }

    .table {
        font-size: 0.9rem;
        min-width: 400px;
    }

    .table th,
    .table td {
        padding: 0.6rem;
        border: 1px solid var(--gray-200);
    }

    .order-field {
        margin-right: 1.5rem;
    }
}

@media (max-width: 768px) {
    .main-header {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        padding: 1rem;
    }

    .main-header h1 {
        font-size: 2.5rem;
        text-align: center;
        width: 100%;
        margin: 0 auto;
    }

    .main-header .d-flex.align-items-center {
        display: flex;
        align-items: center;
        width: auto;
    }

    .main-header .icon-box {
        font-size: 1.25rem;
        margin-right: 0.5rem;
        padding: 0.25rem;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 1.5rem;
        width: 1.5rem;
    }

    .main-header h2 {
        font-size: 1rem;
        line-height: 1.5rem;
        margin: 0 0 0 0.5rem;
        display: inline-flex;
        align-items: center;
        vertical-align: middle;
    }

    .title-date-container {
        display: flex;
        flex-direction: row;
        align-items: center;
    }

    .table {
        font-size: 0.75rem;
    }

    .table.desktop-table {
        display: none !important;
    }

    .status-badge {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
        line-height: 1.2;
    }

    .icon-alert {
        font-size: 1rem !important;
        padding: 0.15rem;
    }

    .icon-expired {
        font-size: 14px;
        padding: 0.2rem;
    }

    .icon-alert-v2 {
        font-size: 1rem !important;
        padding: 0.15rem;
    }

    .card-container.mobile-cards {
        display: block !important;
    }

    .type-rent {
        font-size: 0.85rem;
    }

    .type-sale {
        font-size: 0.85rem;
    }

    .table th,
    .table td {
        padding: 0.4rem;
    }

    .status-card {
        height: auto;
        padding: 1rem;
    }

    .status-card .count,
    .status-card .tools-count {
        font-size: 1.5rem;
    }

    .status-card .text-container {
        position: static;
        padding-bottom: 0;
    }

    .table-responsive {
        display: flex;
        flex-direction: column;
    }

    .table-responsive .table {
        order: 1;
    }

    .table-responsive .pagination-container {
        order: 2;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 1rem;
        width: 100%;
        visibility: visible !important;
    }

    .card-header .rows-per-page-container {
        display: none;
    }

    .rows-per-page-container {
        display: flex !important;
        align-items: center;
        visibility: visible !important;
    }

    .rows-per-page-container .dropdown {
        margin-right: 1rem;
    }

    .pagination {
        margin: 0;
        visibility: visible !important;
    }

    #articleTablePrepare .pagination-container,
    #articleTablePrepare .rows-per-page-container,
    #articleTablePrepare .pagination {
        display: flex !important;
        visibility: visible !important;
    }

    .card-container {
        display: block;
    }

    .order-info {
        flex-direction: column;
        align-items: flex-start;
    }

    .order-field {
        margin-right: 0;
        margin-bottom: 0.75rem;
        width: 100%;
    }

    .product-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 576px) {
    .main-header h1 {
        font-size: 1.5rem;
        text-align: center;
    }

    .main-header h2 {
        font-size: 0.875rem;
    }

    .table {
        font-size: 0.65rem;
    }

    .table th,
    .table td {
        padding: 0.3rem;
    }

    .status-card .icon {
        font-size: 1.25rem;
        top: 0.75rem;
        right: 0.75rem;
    }

    .status-card .count,
    .status-card .tools-count {
        font-size: 1.25rem;
    }

    .status-card .text-container h4 {
        font-size: 1rem;
    }

    .status-card .text-container .small {
        font-size: 0.75rem;
    }

    #expiredRentalsTable th:nth-child(4),
    #expiredRentalsTable td:nth-child(4),
    #expiredRentalsTable th:nth-child(5),
    #expiredRentalsTable td:nth-child(5) {
        display: none;
    }

    #ordiniTable th:nth-child(5),
    #ordiniTable td:nth-child(5),
    #ordiniTable th:nth-child(7),
    #ordiniTable td:nth-child(7),
    #ordiniTable th:nth-child(8),
    #ordiniTable td:nth-child(8) {
        display: none;
    }

    #ordiniTable .action-icon .btn {
        padding: 0.2rem;
        font-size: 0.75rem;
    }

    .sidebar-toggle {
        padding: 0.3rem;
        height: 40px;
    }

    .toggle-user-name {
        font-size: 0.875rem;
    }

    .toggle-user-role {
        font-size: 0.75rem;
    }

    .toggle-icons {
        gap: 10px;
        padding-right: 0.5rem;
    }

    .user-icon,
    .logout-icon {
        font-size: 1.25rem;
    }
}