.logo-lg img {
  height: auto;
  padding-top: 10px;
  padding-bottom: 10px;
}
.logo-lg {
  text-align: center;
}

.side-nav .side-nav-separator {
  border-top: 2px solid #047A8A;
  list-style: none;
  margin: 8px 10px 12px;
}

.side-nav .side-nav-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: calc(var(--ins-sidenav-item-font-size) * 0.8);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.side-nav .side-nav-section-title::after {
  content: "";
  flex: 1;
  border-top: 1px solid #047A8A;
}

/* ========================
   Advanced Page Styles
   ======================== */
.advanced-page .dashboard-stat {
    margin-bottom: 0;
}

.advanced-page .dashboard-stat-item {
    padding: 0;
}

.advanced-page .option-item {
    margin-bottom: 0;
}

.advanced-page .dashboard-full-stat {
    background: #fff;
    border: 1px solid #e7eaec;
    border-radius: 4px;
}

.advanced-page .list-group {
    list-style: none;
    padding: 0;
    margin: 0;
}

.advanced-page .list-group-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f3f3f3;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ========================
   Disabled Stones Section Styles
   ======================== */
.labels-page .dashboard-stat {
    margin-bottom: 0;
}

.labels-page .dashboard-stat-item {
    padding: 0;
}

.labels-page .dashboard-full-stat {
    background: #fff;
    border: 1px solid #e7eaec;
    border-radius: 4px;
}

.labels-page .list-group {
    list-style: none;
    padding: 0;
    margin: 0;
}

.labels-page .list-group-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f3f3f3;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.labels-page .list-group-item.first-item {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

/* Labels List Container */
.labels-page .labels-list-container {
    background: #fff;
    border: 1px solid #e7eaec;
    border-radius: 4px;
    padding: 20px;
}

/* Labels Grid - 3 items per line */
.labels-page .labels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Item Card */
.labels-page .labels-item-card {
    background: #fafbfc;
    border: 1px solid #e7eaec;
    border-radius: 8px;
    padding: 15px;
    transition: all 0.2s ease;
}

.labels-page .labels-item-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.labels-page .labels-item-header {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e7eaec;
}

.labels-page .labels-item-type {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.labels-page .labels-item-path,
.labels-page .labels-item-url {
    margin-bottom: 10px;
}

.labels-page .labels-item-path small,
.labels-page .labels-item-url small {
    display: block;
    font-size: 11px;
    color: #888;
    margin-bottom: 4px;
}

.labels-page .path-text,
.labels-page .url-text {
    font-size: 12px;
    color: #676a6c;
    word-break: break-all;
}

.labels-page .labels-item-qr {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e7eaec;
}

.labels-page .labels-item-qr small {
    display: block;
    font-size: 11px;
    color: #888;
    margin-bottom: 8px;
}

.labels-page .qr-placeholder {
    width: 100px;
    height: 100px;
    background: #f5f5f5;
    border: 1px solid #e7eaec;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.labels-page .qr-placeholder i {
    font-size: 32px;
    color: #ccc;
}

.labels-page .qr-placeholder .qr-loading {
    animation: spin 1s linear infinite;
}

.labels-page .qr-placeholder .qr-image {
    max-width: 100%;
    max-height: 100%;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Empty State */
.labels-page .labels-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.labels-page .labels-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    color: #e0e0e0;
}

.labels-page .labels-empty p {
    font-size: 14px;
}

/* Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    
    #printContent,
    #printContent * {
        visibility: visible;
    }
    
    #printContent {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        display: block !important;
    }
    
    .print-header {
        margin-bottom: 30px;
    }
    
    .print-header h2 {
        font-size: 24px;
        font-weight: bold;
    }
    
    .print-items-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    .print-item-card {
        border: 1px solid #ccc;
        padding: 10px;
        page-break-inside: avoid;
    }
    
    .print-item-header {
        font-weight: bold;
        font-size: 14px;
        margin-bottom: 5px;
        padding-bottom: 5px;
        border-bottom: 1px solid #eee;
    }
    
    .print-item-path {
        font-size: 11px;
        color: #666;
        margin-bottom: 8px;
    }
    
    .print-item-qr {
        margin: 10px auto;
        text-align: center;
    }
    
    .print-item-qr img {
        width: 80px;
        height: 80px;
    }
    
    .print-item-url {
        font-size: 9px;
        color: #999;
        word-break: break-all;
    }
}

/* Hide screen content when printing */
@media print {
    .labels-page .page-title-head,
    .labels-page .dashboard-stat,
    .labels-page .labels-list-container {
        display: none !important;
    }
    
    #printContent {
        display: block !important;
    }
}

/* Responsive */
@media (max-width: 992px) {
    .labels-page .labels-grid,
    .print-items-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .labels-page .labels-grid,
    .print-items-grid {
        grid-template-columns: 1fr;
    }
    
    .labels-page .list-group-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .labels-page .labels-toggle-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Dark mode support */
html[data-bs-theme="dark"] .labels-page .dashboard-full-stat,
html[data-bs-theme="dark"] .labels-page .labels-list-container {
    background: #1e1f27;
    border-color: #2a2c34;
}

html[data-bs-theme="dark"] .labels-page .list-group-item.first-item {
    background-color: #25262e;
}

html[data-bs-theme="dark"] .labels-page .labels-item-card {
    background: #25262e;
    border-color: #2a2c34;
}

html[data-bs-theme="dark"] .labels-page .labels-item-header {
    border-color: #2a2c34;
}

html[data-bs-theme="dark"] .labels-page .labels-item-type {
    color: #e0e0e0;
}

html[data-bs-theme="dark"] .labels-item-path,
html[data-bs-theme="dark"] .labels-item-url {
    color: #aaa;
}

html[data-bs-theme="dark"] .labels-page .toggle-label {
    color: #aaa;
}

html[data-bs-theme="dark"] .labels-page .path-text,
html[data-bs-theme="dark"] .labels-page .url-text {
    color: #aaa;
}

.disabled-stones-section {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #e7eaec;
}

.disabled-stones-section .card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e7eaec;
    padding: 12px 15px;
}

.disabled-stones-section .card-header h5 {
    color: #666D78;
    margin: 0;
}

.disabled-stones-section .card-body {
    padding: 15px;
}

/* Status comment styling in disabled stones table */
#disabled-stones-datatable td:nth-child(8) {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========================
   Stone Detail Status Field
   ======================== */
.status-comment-field {
    transition: all 0.3s ease;
}

.status-comment-field.hidden {
    display: none;
}

.advanced-page .list-group-item:hover {
    background-color: #f9f9f9;
}

.advanced-page .list-group-item.first-item {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.advanced-page .option-header {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.advanced-page .txt-l {
    color: #333;
}

.advanced-page .font-weight-middle {
    font-weight: 500;
}

.advanced-page .metric-title {
    font-size: 13px;
    color: #676a6c;
}

.advanced-page .metric-total {
    display: flex;
    align-items: center;
}

.advanced-page .option-icon {
    font-size: 16px;
    color: #047A8A;
}

.advanced-page a {
    text-decoration: none;
    color: inherit;
}

/* Custom arrow button with border */
.advanced-page .btn-go {
    background: transparent;
    border: 1px solid #e7eaec;
    border-radius: 4px;
    color: #047A8A;
    cursor: pointer;
    padding: 6px 8px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.advanced-page .btn-go:hover {
    background-color: #047A8A;
    border-color: #047A8A;
    color: #fff;
}

.advanced-page .btn-go i {
    font-size: 14px;
}

/* ========================
   Dropdowns Page Styles
   ======================== */

.dropdowns-container {
    background: #fff;
    border: 1px solid #e7eaec;
    border-radius: 8px;
    padding: 24px;
}

.dropdowns-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-bottom: 20px;
    margin-bottom: 24px;
    border-bottom: 2px solid #f3f3f3;
}

.dropdowns-header .header-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #047A8A 0%, #169c81 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
}

.dropdowns-header .header-text h2 {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
}

.dropdowns-header .header-text p {
    margin: 0;
    font-size: 13px;
    color: #676a6c;
}

.dropdowns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.dropdown-card {
    background: #fafbfc;
    border: 1px solid #e7eaec;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.dropdown-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.dropdown-card .card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 16px;
    border-bottom: 1px solid #e7eaec;
}

.dropdown-card .dropdown-id {
    display: inline-block;
    background: #047A8A;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.dropdown-card .dropdown-title {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.dropdown-card .dropdown-title-fr {
    font-size: 13px;
    color: #676a6c;
    font-style: italic;
}

.dropdown-card .card-body {
    padding: 0;
}

.dropdown-card .options-list {
    max-height: 250px;
    overflow-y: auto;
}

.dropdown-card .options-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid #f3f3f3;
    position: sticky;
    top: 0;
    z-index: 1;
}

.dropdown-card .options-header > div {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.dropdown-card .option-label {
    font-size: 12px;
    font-weight: 600;
    color: #676a6c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-card .option-count {
    font-size: 11px;
    color: #047A8A;
    font-weight: 600;
    background: rgba(26, 179, 148, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

.dropdown-card .add-option-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.dropdown-card .options-content {
    padding: 8px 0;
}

.dropdown-card .option-item {
    display: grid;
    grid-template-columns: 35px 1fr 1fr 60px 34px;
    gap: 8px;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid #f3f3f3;
    font-size: 12px;
    transition: background-color 0.2s;
}

.dropdown-card .option-item:last-child {
    border-bottom: none;
}

.dropdown-card .option-item:hover {
    background-color: #f9f9f9;
}

.dropdown-card .option-item-processing {
    opacity: 0.5;
    pointer-events: none;
}

.dropdown-card .option-position {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #e9ecef;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 600;
    color: #676a6c;
}

.dropdown-card .option-title-en {
    color: #2c3e50;
    font-weight: 500;
}

.dropdown-card .option-title-fr {
    color: #676a6c;
}

.dropdown-card .option-id {
    text-align: right;
    font-size: 10px;
    color: #999;
}

.dropdown-card .remove-option-form {
    margin: 0;
    text-align: right;
}

.dropdown-card .remove-option-btn {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.modal-dropdown-title {
    font-size: 12px;
    color: #676a6c;
    margin-top: 2px;
}

.dropdown-card .no-options {
    padding: 20px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

.dropdowns-container .no-data {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.dropdowns-container .no-data i {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
    color: #e0e0e0;
}

.dropdowns-container .no-data p {
    font-size: 14px;
}

/* Scrollbar styling for options list */
.dropdown-card .options-list::-webkit-scrollbar {
    width: 6px;
}

.dropdown-card .options-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.dropdown-card .options-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.dropdown-card .options-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Profile Picture Styles */
.profile-picture-preview {
    width: 100px;
    height: 100px;
    object-fit: cover;
}

.profile-picture-placeholder {
    width: 100px;
    height: 100px;
}

/* ========================
   Sidebar Dropdown Styles
   ======================== */
.sidenav-user .dropdown-menu {
    min-width: 230px;
}

.sidenav-user .dropdown-item {
    padding: 8px 16px;
}

.sidenav-user .theme-toggle-item {
    padding: 8px 16px;
}

.sidenav-user .theme-toggle-item .form-check-input {
    cursor: pointer;
    width: 44px;
    height: 24px;
}

.sidenav-user .lang-changer {
    padding: 8px 16px;
}

.sidenav-user .lang-changer > div:last-child {
    white-space: nowrap;
}

.sidenav-user .lang-changer img.active {
    opacity: 1;
    transform: scale(1.1);
}

.sidenav-user .lang-changer img.not-active {
    opacity: 0.5;
}

.sidenav-user .dropdown-divider {
    margin: 4px 0;
}

.node .toggle {
  background: var(--ins-primary);
  text-align: center;
  padding: 2px 2px;
  border-radius: 50%;
  color: #fff;
    width: 20px;
  height: 20px;
}

/* Stone toggle background - gray */
.tree .stone-node .toggle {
  background: #ccc;
  color: #fff;
}

.node.leaf {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
  .tree {
    font-family: "Inter", sans-serif;
    font-size: 14px;
}

.tree ul {
    list-style: none;
    margin: 0;
    padding-left: 25px;
    position: relative;
    box-sizing: border-box;
}

/* vertical dotted line */
.tree ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 16px;
    border-left: 2px dotted #c5c5c5;
    height: 100%;
}

/* each item */
.tree li {
    position: relative;
    margin: 10px 0;
    box-sizing: border-box;
}

/* horizontal connector */
.tree li::before {
    content: '';
    position: absolute;
    top: 16px;
    left: -8px;
    width: 20px;
    border-top: 2px dotted #c5c5c5;
}

/* node styling */
.node {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    border: 1px solid transparent;
    height: 36px;
    box-sizing: border-box;
    will-change: background-color, box-shadow, opacity;
}

/* hover */
.node:hover {
    background: #f5f7fa;
}

/* Drag styling */
.node.dragging {
    opacity: 0.5;
    outline: 1px dashed #9C1D3A;
    outline-offset: -1px;
}

/* Drop target styling */
.node.drop-target,
.tree ul.drop-target,
#boxTreeContainer.drop-target {
    outline: 1px dashed #9C1D3A;
    outline-offset: -1px;
    background: rgba(156, 29, 58, 0.1);
}

.tree ul.drop-target,
#boxTreeContainer.drop-target {
    border-radius: 6px;
    min-height: 36px;
    box-shadow: inset 0 0 0 1px rgba(156, 29, 58, 0.25);
}

/* leaf nodes (stones) */
.node.leaf {
    color: #c0392b;
    padding-left: 20px;
    cursor: not-allowed;
}

/* toggle arrow */
.toggle {
    display: inline-block;
    width: 16px;
    margin-right: 6px;
    font-size: 12px;
    transition: transform 0.25s ease;
    cursor: pointer;
}

/* collapsed state - rotated when parent LI has collapsed class */
.collapsed > .node .toggle {
    transform: rotate(-90deg);
}

/* When not collapsed (open), show normal (pointing right) */
.node .toggle {
    transform: rotate(0deg);
}

/* smooth animation */
.tree ul {
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

/* Hover Actions */
.hover-actions {
    display: none;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Show hover actions on node hover */
.node:hover .hover-actions {
    display: flex;
    opacity: 1;
}

/* Hover action buttons */
.hover-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
    color: #9C1D3A;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.hover-actions a:hover {
    background-color: rgba(156, 29, 58, 0.1);
}

/* Drag handle styling */
.drag-handle {
    cursor: grab;
    color: #6c757d;
    margin-right: 6px;
    display: inline-flex;
    align-items: center;
}

.drag-handle:active {
    cursor: grabbing;
}

/* Label styling */
.node .label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Box type indicator */
.box-type {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    background: #e9ecef;
    color: #6c757d;
    margin-left: 8px;
}

/* Sortable specific styles */
.tree ul.sortable {
    min-height: 10px;
}

.tree li.sortable-ghost {
    opacity: 0.4;
}

.tree li.sortable-drag {
    opacity: 0.9;
}

.tree li.sortable-chosen {
    opacity: 0.8;
}
.link-reset {
    color: #8795AB;
}
.tabs-custom {
    margin-top: 20px;
}
.action-btn {
    background: #f1f2f7;
    padding: 4px 6px;
}

.stone-table div span {
    float: right;
}
#commentsModal .note-insert .note-btn {
    display: none;
}

.btn.btn-outline {
  background: #fff;
  color: #9c1d3a;
}
#stoneShareModal i {
  padding-right: 3px;
}
/* Modal */
.stone-share-modal .modal-content {
    border-radius: 8px;
}

/* Header */
.stone-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.stone-modal-header .modal-title {
    font-weight: 600;
    margin: 0;
}

/* Close button */
.stone-close-btn {
    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
}

/* Section spacing */
.stone-section {
    margin-bottom: 5px;
}

.stone-section label {
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

/* Copy row */
.stone-copy-row {
    display: flex;
    gap: 10px;
}

.stone-copy-row .form-control {
    min-width: 0;
}

.stone-copy-row .btn,
.stone-share-modal .mobile-share-btn {
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.stone-copy-row .btn {
    display: inline-flex;
    flex: 0 0 auto;
    min-width: 92px;
}

/* QR layout */
.stone-qr-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 10px;
}

.stone-qr-img img {
    border: 1px solid #ddd;
    padding: 5px;
}

/* QR buttons */
.stone-qr-actions {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

/* Full width buttons */
.stone-full-btn {
    width: 100%;
    font-weight: 600;
}

/* Helper text */
.stone-helper-text {
    text-align: center;
    color: #999;
    margin-top: 10px;
    margin-bottom: 0;
}

/* Outline button fix */
button.btn.btn-outline.btn-danger:active {
    background: var(--ins-danger);
}

/* QR Code section styles */
.stone-share-modal .stone-qr-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.stone-share-modal .stone-qr-img {
    position: relative;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stone-share-modal .stone-qr-img canvas,
.stone-share-modal .stone-qr-img img {
    max-width: 100%;
    max-height: 100%;
}

.stone-share-modal .qr-logo {
    position: absolute;
    width: 40px !important;
    height: 40px !important;
    object-fit: contain;
    z-index: 10;
    background: #fff;
}

/* QR Loading Spinner */
.stone-share-modal .qr-loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 160px;
    background: #f8f9fa;
    border-radius: 4px;
}

.stone-share-modal .qr-loading-spinner i {
    font-size: 32px;
    color: #047A8A;
}

.stone-share-modal .stone-qr-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.stone-share-modal .stone-email-row {
    margin-bottom: 10px;
}

.stone-share-modal .stone-email-row input {
    width: 100%;
}

.stone-share-modal .mobile-share-btn {
    display: none;
}

.stone-share-modal .mobile-copy-share-btn {
    margin-top: 10px;
}

/* Show mobile share buttons only on mobile devices */
@media (max-width: 768px) {
    .stone-share-modal .mobile-share-btn {
        display: inline-flex !important;
    }
}
#stones-datatable_wrapper .row.mt-2.justify-content-between:first-child {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dropdowns-grid {
        grid-template-columns: 1fr;
    }
    
    .dropdown-card .option-item {
        grid-template-columns: 30px 1fr 60px 34px;
    }
    
    .dropdown-card .option-title-fr {
        display: none;
    }

    .dropdown-card .add-option-btn span {
        display: none;
    }
}
/* ========================
   Stone Image Upload Modal Styles
   ======================== */
.stone-page .image-upload-wrapper {
    text-align: center;
}

.stone-page .upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 40px 20px;
    background: #fafafa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.stone-page .upload-area:hover,
.stone-page .upload-area.drag-over {
    border-color: #047A8A;
    background: #f0faf7;
}

.stone-page .upload-area .upload-icon {
    font-size: 48px;
    color: #047A8A;
    margin-bottom: 15px;
}

.stone-page .upload-area .upload-text {
    color: #666;
    margin-bottom: 10px;
}

.stone-page .file-input-hidden {
    display: none;
}

.stone-page .upload-note {
    color: #888;
}

.stone-page .upload-error-area .alert {
    text-align: left;
}

/* Preview Grid */
.stone-page .preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.stone-page .preview-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
    background: #f5f5f5;
}

.stone-page .preview-item .preview-image {
    width: 100%;
    height: 100%;
}

.stone-page .preview-item .preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stone-page .preview-item .btn-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #e74c3c;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
}

.stone-page .preview-item .btn-remove:hover {
    background: #e74c3c;
    color: #fff;
}

/* ========================
   Stone Edit Images Modal Styles
   ======================== */
.stone-page .edit-images-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.stone-page .edit-image-card {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #eee;
    background: #f5f5f5;
    transition: all 0.2s ease;
}

.stone-page .edit-image-card.is-main {
    grid-column: span 2;
    grid-row: span 2;
    border-color: #047A8A;
}

.stone-page .edit-image-card.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.stone-page .edit-image-card.drag-over {
    border-color: #047A8A;
    background: #f0faf7;
}

.stone-page .edit-image-card .image-drag-handle {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    color: #888;
    z-index: 2;
    font-size: 12px;
}

.stone-page .edit-image-card .image-preview {
    width: 100%;
    aspect-ratio: 1;
}

.stone-page .edit-image-card.is-main .image-preview {
    aspect-ratio: 1;
}

.stone-page .edit-image-card .image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stone-page .edit-image-card .image-main-badge {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: #047A8A;
    color: #fff;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.stone-page .edit-image-card .image-actions {
    position: absolute;
    top: 5px;
    right: 5px;
}

.stone-page .edit-image-card .btn-remove {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #e74c3c;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.2s ease;
}

.stone-page .edit-image-card .btn-remove:hover {
    background: #e74c3c;
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .stone-page .edit-images-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stone-page .edit-image-card.is-main {
        grid-column: span 1;
        grid-row: span 1;
    }
}

@media (max-width: 576px) {
    .stone-page .edit-images-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================
   Stone Add Page Styles
   ======================== */
.stone-page {
    background: #f3f3f4;
}

.stone-page .card-box {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    border: 1px solid #e7eaec;
}

.stone-page .card-header-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dotted #e7eaec;
    margin-bottom: 12px;
    padding: 20px;
}

.stone-page .card-header-custom h5 {
    color: #666D78;
    margin: 0;
}

.stone-page .card-body {
    padding: 15px;
}

.stone-page .action-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* ========================
   Stone Detail Page Styles
   ======================== */
.stone-page .card-box {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    border: 1px solid #e7eaec;
}

.stone-page .card-header-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dotted #e7eaec;
    margin-bottom: 12px;
}

.stone-page .card-header-custom h5 {
    color: #666D78;
}

.stone-page .card-body {
    padding: 15px;
}

/* ACTION ICONS */
.stone-page .actions i {
    margin-left: 10px;
    color: #888;
    cursor: pointer;
}

/* ACTION BUTTONS - Common styles for all action buttons */
.stone-page .action-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.stone-page .action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #888;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.stone-page .action-btn:hover {
    color: #555;
}

.stone-page .action-btn i {
    font-size: 16px;
}

/* Immediate solid tooltips for the action icons in the first details block. */
.stone-page .row-first-section .cls-section1-details .action-btn[data-action-tooltip] {
    position: relative;
}

.stone-page .row-first-section .cls-section1-details .action-btn[data-action-tooltip]::after {
    content: attr(data-action-tooltip);
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    z-index: 20;
    padding: 7px 10px;
    border-radius: 2px;
    background: #212529;
    color: #fff;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.2;
    text-transform: none;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -2px);
    transition: opacity 0.08s ease, transform 0.08s ease;
}

.stone-page .row-first-section .cls-section1-details .action-btn[data-action-tooltip]:hover::after,
.stone-page .row-first-section .cls-section1-details .action-btn[data-action-tooltip]:focus-visible::after {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* Share button - Green color */
.stone-page .action-btn.action-share {
    color: #047A8A;
}

.stone-page .action-btn.action-share:hover {
    color: #179d86;
}

/* Edit button - Default gray */
.stone-page .action-btn.action-edit {
    color: #888;
}

.stone-page .action-btn.action-edit:hover {
    color: #555;
}

/* IMAGE */
.stone-page .stone-image-wrap {
    display: flex;
    gap: 10px;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.stone-page .main-img {
    flex: 0 0 70%;
    height: 100%;
    overflow: hidden;
    border-radius: 4px;
}

.stone-page .main-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stone-page .main-img .no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 4px;
    color: #ccc;
}

.stone-page .main-img .no-image-placeholder i {
    font-size: 24px;
}

.stone-page .main-img .no-image-placeholder span {
    display: none;
}

.stone-page .side-imgs {
    flex: 0 0 30%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    height: 100%;
    overflow: hidden;
}

.stone-page .side-imgs > div {
    flex: 1;
    position: relative;
    min-height: 0;
    overflow: hidden;
    border-radius: 4px;
}

.stone-page .side-imgs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stone-page .side-imgs .no-image-placeholder-sm {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 4px;
    color: #ccc;
}

.stone-page .overlay {
    background: rgba(0,0,0,0.6);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.stone-page .side-imgs .has-overlay {
    position: relative;
}

.stone-page .side-imgs .has-overlay .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* GRID */
.stone-page .stone-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.stone-page .stone-grid label {
    font-size: 11px;
    color: #888;
}

.stone-page .stone-table .row-item {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border-bottom: 1px solid #e7eaec;
}

.stone-page .stone-table .row-item div {
    padding: 12px;
    border-right: 1px solid #e7eaec;
}

.stone-page .highlight span {
    color: #047A8A;
}

/* PHOTOS */
.stone-page .stone-photos img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.stone-page .stone-photos .photo-thumb {
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #eee;
    background: #f5f5f5;
    height: 200px;
}

.stone-page .stone-photos .photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stone-page .stone-photos .photo-thumb .lightbox-trigger {
    display: block;
    width: 100%;
    height: 100%;
}

.stone-page .stone-photos .photo-thumb .lightbox-trigger img {
    transition: opacity 0.2s;
}

.stone-page .stone-photos .photo-thumb .lightbox-trigger:hover img {
    opacity: 0.9;
}

/* TABS */
.stone-page .tabs-custom {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.stone-page .tabs-custom a {
    padding: 10px 5px;
    text-decoration: none;
    color: #555;
}

.stone-page .tabs-custom a.active {
    border-bottom: 2px solid #047A8A;
    font-weight: 600;
}

/* SECTION 1 - TWO SEPARATE CARDS WITH EQUAL HEIGHT */
.stone-page .cls-section1-image .card-body,
.stone-page .cls-section1-details .card-body {
    display: flex;
    flex-direction: column;
}

.stone-page .cls-section1-image,
.stone-page .cls-section1-details {
    height: 100%;
    margin-bottom: 0;
    width: 100%;
}

.stone-page .row:has(.cls-section1) {
    align-items: stretch;
}

.stone-page .row:has(.cls-section1) > [class*="col-"] {
    display: flex;
}

.stone-page .card-header-custom {
    padding: 20px;
}

.stone-page .card-header-custom h5 {
    color: #666D78;
}

.stone-page .cls-section1 .card-header-custom {
    padding: 0px 0px 10px;
}

.stone-page .stone-detail-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.stone-page .stone-id-tag,
.stone-page .stone-inventory-tag {
    display: inline-flex;
    align-items: center;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    padding: 6px 10px;
}

.stone-page .stone-inventory-tag {
    background-color: #1870a8 !important;
}
.stone-page .stone-id-tag {
    background-color: var(--ins-blue) !important;
}

.stone-page .stone-detail-card > .card-header-custom,
.stone-page .stone-detail-card > .card-body {
    padding-left: 20px;
    padding-right: 20px;
}

/* Transform Modal - Merge Group Error State */
#merge_group.is-invalid .select2-selection.select2-selection--multiple {
    border: 1px solid red !important;
}
#merge_group.is-invalid {
    color: red;
}

/* Lightbox styles */
.stone-page .lightbox-trigger {
    display: block;
    cursor: pointer;
}

.stone-page .lightbox-trigger img {
    transition: opacity 0.2s;
}

.stone-page .lightbox-trigger:hover img {
    opacity: 0.9;
}

#imageLightboxModal .modal-content {
    background: transparent;
}

#imageLightboxModal .btn-close {
    width: 24px;
    height: 22px;
    margin: 0;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.92);
    background-size: 10px;
    opacity: 1;
    filter: none;
}

/* No image placeholder styles */
.stone-page .no-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 180px;
    background: #f5f5f5;
    border-radius: 6px;
    color: #ccc;
}

.stone-page .no-image-placeholder i {
    font-size: 48px;
    margin-bottom: 10px;
}

.stone-page .no-image-placeholder-sm {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border-radius: 4px;
    color: #ccc;
}

.stone-page .no-image-placeholder-sm i {
    font-size: 20px;
}

.side-nav > .side-nav-item.active .side-nav-item.active > a {
    color: #047a8a;
}
.side-nav .side-nav-item .side-nav-link.active:hover,
.side-nav .side-nav-item .side-nav-link.active:focus,
.side-nav .side-nav-item .side-nav-link.active:active {
    color: #fff;
}

/* ========================
   Stone Node in Box Tree Styles
   ======================== */
/* Stones container - connect to parent box with vertical line */
.tree .stones-container {
    padding-left: 25px;
    margin: 0;
    position: relative;
}

/* Vertical connector line for stones container */
.tree .stones-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 16px;
    border-left: 2px dotted #c5c5c5;
    height: 100%;
}

.tree .stones-container > li {
    margin: 5px 0;
    position: relative;
}

/* Horizontal connector for stones */
.tree .stones-container > li::before {
    content: '';
    position: absolute;
    top: 16px;
    left: -8px;
    width: 20px;
    border-top: 2px dotted #c5c5c5;
}

/* Stone node - same styling as box nodes */
.tree .stone-node {
    border: 1px solid transparent;
}

.tree .stone-node:hover {
    background: #f5f7fa;
}

/* Stone ID styling in label */
.tree .stone-node .label .text-muted {
    color: #999;
    font-size: 11px;
    font-weight: 400;
}

/* Stone toggle - grayed out to show it's not interactive */
.tree .stone-node .toggle {
    color: #fff;
    cursor: default;
    pointer-events: none;
}
#stones-datatable_processing {
    display: none !important;
}
.modal-body .form-select.form-control {
    background-size: calc(0.75em + 0.4532rem) calc(0.75em + 0.4532rem) !important;
}
.stone-page .stone-table .row-item:last-child {
    border-bottom: 0px;
}
.select2-selection__choice {
    background: #047A8A !important;
    border: none !important;
}

/* ========================
   Gemology Data Section Styles
   ======================== */
.gemology-data-section {
    margin-bottom: 20px;
}

.gemology-data-section .section-title {
    font-size: 16px;
    font-weight: 600;
    color: #047A8A;
    padding: 15px 20px;
    background: #f8f9fa;
    border-left: 3px solid #047A8A;
    margin: 20px 0 15px;
}

.gemology-data-section .sub-values {
    margin-top: 8px;
    padding-left: 0;
    list-style: none;
}

.gemology-data-section .sub-values span {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

/* Ensure action buttons are visible in gemology section */
.gemology-data-section .action-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.gemology-data-section .action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: #888;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.gemology-data-section .action-btn:hover {
    color: #555;
    background: #f5f5f5;
}

.gemology-data-section .action-btn i {
    font-size: 16px;
}

.gemology-data-section .action-btn.action-edit {
    color: #888;
}

.gemology-data-section .action-btn.action-edit:hover {
    color: #047A8A;
    background: #e8f8f5;
}

/* ========================
   Stone List Page Styles (from list.blade.php)
   ======================== */
.stone-list-table-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

.stone-table-scroll-hint {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin: 0.25rem 0 1rem;
    padding: 0.625rem 0.875rem;
    color: var(--ins-body-color);
    background: rgba(4, 122, 138, 0.06);
    border: 1px solid rgba(4, 122, 138, 0.18);
    border-radius: 6px;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.stone-table-scroll-hint i {
    flex: 0 0 auto;
    color: #047A8A;
    font-size: 1.25rem;
}

.stone-list-table-wrap.is-loading {
    min-height: 220px;
}

[data-table-drag-scroll].is-dragging,
[data-table-drag-scroll].is-dragging * {
    cursor: grabbing !important;
    user-select: none;
}

.stone-list-table-wrap .dt-container,
.stone-list-table-wrap .dataTables_wrapper {
    position: relative;
    box-sizing: border-box;
}

/* Keep DataTables status and paging controls clear of nearby scrollbars. */
.dt-container .dt-info,
.dt-container .dt-paging,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
    margin-top: 8px;
    margin-bottom: 12px;
    padding-top: 8px;
    padding-bottom: 8px;
}

#stones-datatable_wrapper > .row:last-child,
#disabled-stones-datatable_wrapper > .row:last-child {
    margin-bottom: 48px !important;
}

.stone-list-page .dataTable {
    width: 100% !important;
    min-width: 0;
    white-space: normal;
}

.stone-list-page #stones-datatable {
    width: 1500px !important;
    min-width: 1500px !important;
    table-layout: auto !important;
}

.stone-list-page table.dataTable thead th,
.stone-list-page table.dataTable thead th .dt-column-title {
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
}

.stone-list-page tr.child,
.stone-list-page .dtr-details {
    display: none !important;
}

.stone-list-page table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control::before,
.stone-list-page table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control::before,
.stone-list-page table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child::before,
.stone-list-page table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child::before {
    display: none !important;
}

.stone-list-page table.dataTable th,
.stone-list-page table.dataTable td {
    display: table-cell !important;
    vertical-align: middle;
}

.stone-list-page table.dataTable th:first-child,
.stone-list-page table.dataTable td:first-child {
    width: 56px;
}

.stone-list-page table.dataTable th:last-child,
.stone-list-page table.dataTable td:last-child {
    width: 132px;
    white-space: nowrap;
}

.stone-list-page .dt-layout-row,
.stone-list-page .dataTables_wrapper .row {
    max-width: 100%;
    margin-right: 0;
    margin-left: 0;
    overflow-x: clip;
}

.stone-list-page .dt-paging,
.stone-list-page .dataTables_paginate {
    max-width: 100%;
    overflow-x: auto;
}

.stone-list-page .dt-processing,
.stone-list-page .dataTables_processing,
#stones-datatable_processing,
#disabled-stones-datatable_processing {
    display: none !important;
}

.stone-list-table-loader {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    pointer-events: none;
    background: transparent;
}

.stone-list-table-loader.is-active {
    display: flex;
}

.stone-list-loading {
    --sk-size: 36px;
    --sk-color: var(--ins-primary);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-align: center;
    color: var(--ins-body-color);
    font-weight: 600;
}

.stone-list-loading-text {
    line-height: 1;
}

.stone-list-page .dt-paging .pagination,
.stone-list-page .dataTables_paginate .pagination {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.25rem;
}

.stone-list-page .table-striped tbody tr.stone-row {
    cursor: pointer;
}

.stone-list-page .table-striped tbody tr.stone-row:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.stone-list-page .stone-picture {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.stone-list-page .no-picture {
    width: 40px;
    height: 40px;
    background-color: #f5f5f5;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

.stone-list-page .no-picture i {
    font-size: 22px;
}

.stone-list-page .reset-btn {
    cursor: pointer;
    color: #888;
    transition: color 0.2s;
    font-size: 20px;
    padding: 8px;
}

.stone-list-page .reset-btn:hover {
    color: #047A8A;
}

/* DataTable header styles */
.stone-list-page .dt-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.stone-list-page .dt-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.stone-list-page .dt-length select {
    width: auto !important;
}

.stone-list-page .dt-info {
    margin: 0;
}

.stone-list-page .dt-pagination {
    margin: 0;
}

/* Hide default DataTables search */
.stone-list-page .dataTables_filter {
    display: none;
}

.stone-list-page .dt-length {
    margin-bottom: 0 !important;
}

.stone-list-page .dt-length label {
    margin-bottom: 0;
}

/* Filter field styling - consistent height and border */
.stone-list-page .filter-field {
    height: 38px;
    border: 1px solid #e7eaec;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.stone-list-page .filter-field:focus {
    border-color: #047A8A;
    box-shadow: 0 0 0 2px rgba(26, 179, 148, 0.1);
    outline: none;
}

.stone-list-page .filter-field.select2-hidden-accessible {
    height: 38px;
}

@media (max-width: 1400px) {
    .stone-list-table-wrap {
        overflow-x: auto;
    }

    .stone-list-page #disabled-stones-datatable {
        min-width: 1120px;
    }
}

@media (max-width: 1228px) {
    .stone-list-page #stones-datatable {
        width: 1500px !important;
        min-width: 1500px !important;
    }
}

@media (min-resolution: 1.25dppx) and (max-resolution: 1.49dppx) and (min-width: 1000px) {
    .stone-list-table-wrap {
        overflow-x: auto;
    }

    .stone-list-page #disabled-stones-datatable {
        min-width: 0;
    }
}

@media (max-width: 575.98px) {
    .stone-list-page .dt-layout-row,
    .stone-list-page .dataTables_wrapper .row {
        row-gap: 0.5rem;
    }

    .stone-list-page .dt-layout-cell,
    .stone-list-page .dataTables_length,
    .stone-list-page .dataTables_info,
    .stone-list-page .dataTables_paginate {
        width: 100%;
        text-align: left;
    }

    .stone-list-page .dt-paging .pagination,
    .stone-list-page .dataTables_paginate .pagination {
        justify-content: flex-start;
    }
}

/* Select2 override for consistent styling */
.stone-list-page .select2-container--default .select2-selection--single {
    height: 38px;
    border: 1px solid #e7eaec;
    border-radius: 4px;
}

.stone-list-page .select2-container--default .select2-selection--single:focus {
    border-color: #047A8A;
    box-shadow: 0 0 0 2px rgba(26, 179, 148, 0.1);
}

.stone-list-page .select2-container--default .select2-selection__rendered {
    line-height: 36px;
    padding-left: 12px;
}

.stone-list-page .select2-container--default .select2-selection__arrow {
    height: 36px;
}

.stone-list-page .select2-container--default .select2-selection--single .select2-selection__clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 36px;
    margin: 0 18px 0 0;
    padding: 0;
    color: var(--ins-body-color);
    font-size: 20px;
    line-height: 1;
    margin-top: -1px;
}

.stone-list-page .select2-container--default .select2-selection--single .select2-selection__clear:hover,
.stone-list-page .select2-container--default .select2-selection--single .select2-selection__clear:focus {
    color: var(--ins-danger);
}

/* Lightbox trigger for stone list page - no extra display:block */
.stone-list-page .lightbox-trigger {
    cursor: pointer;
}

/* ========================
   Stone History Page Styles (from detail-history.blade.php)
   ======================== */
.stone-page .history-timeline {
    position: relative;
    padding-left: 240px;
}

.stone-page .history-timeline::before {
    content: "";
    position: absolute;
    top: 0;
    left: 237px;
    height: 100%;
    border-left: 2px dotted #d1d5db;
}

.stone-page .history-row {
    position: relative;
    padding-bottom: 25px;
}

.stone-page .history-left {
    position: absolute;
    left: -240px;
    width: 200px;
    text-align: right;
}

.stone-page .history-time {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 6px;
}

.stone-page .history-user {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
}

.stone-page .user-avatar,
.stone-page .user-avatar-placeholder {
    width: 26px;
    height: 26px;
    border-radius: 50%;
}

.stone-page .user-avatar-placeholder {
    background: #9C1D3A;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stone-page .history-center {
    position: absolute;
    left: -19px;
    top: 2px;
}

.stone-page .history-icon {
    width: 32px;
    height: 32px;
    background: #fff;
    border: 2px solid #9C1D3A;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stone-page .history-icon i {
    font-size: 20px;
    color: #9C1D3A;
}

.stone-page .history-right {
    margin-left: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.stone-page .history-row:last-child .history-right {
    border-bottom: none;
}

.stone-page .history-action {
    font-size: 14px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 4px;
}

.stone-page .history-details {
    font-size: 13px;
    color: #6c757d;
}

/* ========================
   Additional Gemology Block Styles (from detail-gemology.blade.php)
   ======================== */
.gemology-block {
    background: #fff;
    border: 1px solid #e7eaec;
    border-radius: 6px;
    margin-bottom: 15px;
}

.gemology-block-title {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    padding: 12px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e7eaec;
    margin: 0;
}

.gemology-block-content {
    padding: 15px 20px;
}

.gemology-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dotted #e7eaec;
}

.gemology-row:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.gemology-item {
    flex: 1;
    min-width: 150px;
    padding-right: 15px;
}

.gemology-item:last-child {
    padding-right: 0;
}

.gemology-label {
    display: block;
    font-size: 11px;
    color: #888;
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.gemology-value {
    display: block;
    font-size: 13px;
    color: #2c3e50;
    font-weight: 500;
}

.gemology-sub-values {
    margin-top: 8px;
    padding-left: 0;
    list-style: none;
}

.gemology-sub-values span {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.gemology-placeholder {
    padding: 15px;
    text-align: center;
}

.gemology-placeholder p {
    font-size: 13px;
}

/* ========================
   Gemology Modal Scroll Fix
   ======================== */
#gemologyOpticalModal .modal-body,
#gemologyIdentificationModal .modal-body,
#gemologyObservationModal .modal-body,
#gemologyDensityModal .modal-body,
#gemologyUVModal .modal-body,
#gemologyInstrumentsModal .modal-body,
#gemologyModal .gemology-modal-body {
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Make sure modal allows scrolling within */
#gemologyOpticalModal .modal-dialog-scrollable {
    max-height: 90vh;
}

/* Fix for modal - ensure proper overflow handling */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, 0);
}

.modal.show .modal-dialog {
    transform: translate(0, 0);
}

/* Ensure body doesn't lock scroll when modal is open */
body.modal-open {
    overflow: auto !important;
    padding-right: 0 !important;
}

/* Fix for modal backdrop causing scroll issues */
.modal-backdrop {
    position: fixed !important;
    z-index: 1040;
}

/* Backdrops for dialogs opened above another modal sit between both layers. */
.modal-backdrop.modal-backdrop-stacked {
    opacity: .42;
}

/* Reliably dim a parent dialog while another modal is displayed above it. */
.modal.modal-underlay-dimmed .modal-dialog::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1000;
    border-radius: var(--bs-modal-border-radius, 5px);
    background: rgba(20, 27, 34, .46);
    pointer-events: auto;
}

/* Ensure z-index is proper for modal */
.modal {
    z-index: 1050;
}

/* Make select dropdowns scrollable within modal */
.modal .form-select {
    max-height: 150px;
    overflow-y: auto;
}

/* Gemology main modal body scroll */
.gemology-modal-body {
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
}

/* ========================
   Gemology Density Modal Styles
   Label then input on next line
   ======================== */
.gemology-density-modal .modal-body {
    padding: 20px;
}

.gemology-density-modal .form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 6px;
    display: block;
}

.gemology-density-modal .form-control {
    margin-bottom: 15px;
}

.gemology-density-modal .form-control:last-of-type {
    margin-bottom: 0;
}

.gemology-density-modal .text-muted {
    font-size: 11px;
    margin-top: 4px;
    display: block;
}

.info-item span {
  color: #047A8A !important;
}

/* ========================
   Stone Description Table Styles
   ======================== */
.stone-field-grid {
    display: grid;
    width: 100%;
    border-top: 1px solid #eef0f3;
    border-left: 1px solid #eef0f3;
}

.stone-field-grid--description {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stone-field-grid--origin {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stone-field-grid .field-item {
    display: grid;
    grid-template-columns: minmax(88px, 46%) minmax(0, 54%);
    align-items: center;
    height: 38px;
    min-height: 38px;
    padding: 7px 12px;
    border-right: 1px solid #eef0f3;
    border-bottom: 1px solid #eef0f3;
    column-gap: 10px;
}

.stone-field-grid .field-label {
    font-size: 10px;
    font-weight: 600;
    line-height: 1.3;
    text-transform: uppercase;
}

.stone-field-grid .field-value {
    min-width: 0;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
    text-align: right;
}

.stone-field-grid .stone-description-editable {
    cursor: default;
    user-select: none;
}

.stone-field-grid .stone-description-editable.is-empty .field-value,
.stone-field-grid .stone-description-editable .stone-empty-icon {
    color: #c0392b !important;
}

.stone-field-grid .stone-description-editable .stone-empty-icon,
.gemology-data-section .gemology-quick-field .stone-empty-icon {
    font-size: 15px;
    line-height: 1;
}

/* Shared read-only color summary used by General and Gemology details. */
.gemology-data-section .stone-color-summary,
.gemology-data-section .optical-property-display-column .field-item > span {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    white-space: nowrap;
    overflow-wrap: normal;
}

.gemology-data-section .stone-color-summary--stacked {
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.gemology-data-section .stone-color-dot-row {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.gemology-data-section .stone-color-option {
    color: #58616b;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}

.gemology-data-section .stone-color-separator {
    color: #8b949e;
    font-size: 13px;
    line-height: 1;
}

.gemology-data-section .stone-color-dot {
    display: inline-block;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    border: 1px solid #7b8490;
    border-radius: 50%;
}

.gemology-data-section .stone-color-intensity-separator {
    color: #8b949e !important;
}

/* Compact field editor opened by double-clicking a Stone Description value. */
#descriptionModal.description-quick-edit .modal-dialog {
    width: auto;
    max-width: min(760px, calc(100vw - 30px));
}

#descriptionModal.description-quick-edit .modal-content {
    border: 0;
    border-radius: 5px;
}

#descriptionModal.description-quick-edit .modal-header {
    display: none;
}

#descriptionModal.description-quick-edit form {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    gap: 9px;
}

#descriptionModal.description-quick-edit .modal-body {
    flex: 1 1 auto;
    max-height: none !important;
    padding: 0;
    overflow: visible !important;
}

#descriptionModal.description-quick-edit .modal-body .row {
    flex-wrap: nowrap;
    align-items: flex-start;
    margin: 0;
    column-gap: 12px;
    row-gap: 14px;
}

#descriptionModal.description-quick-edit.description-quick-edit-multiple .modal-dialog {
    max-width: min(900px, calc(100vw - 30px));
}

#descriptionModal.description-quick-edit.description-quick-edit-multiple .modal-body .row {
    flex-wrap: wrap;
}

#descriptionModal.description-quick-edit.description-quick-edit-multi-row form,
.field-quick-edit-modal.field-quick-edit-multi-row form {
    flex-wrap: wrap;
}

#descriptionModal.description-quick-edit.description-quick-edit-multi-row .modal-body,
.field-quick-edit-modal.field-quick-edit-multi-row .modal-body {
    flex: 1 0 100%;
}

#descriptionModal.description-quick-edit.description-quick-edit-multi-row .modal-footer,
.field-quick-edit-modal.field-quick-edit-multi-row .modal-footer {
    flex: 1 0 100%;
    justify-content: flex-end;
}

#descriptionModal.description-quick-edit .modal-body .row > [class*="col-"] {
    flex: 1 1 320px;
    width: auto;
    max-width: none;
    padding: 0;
}

#descriptionModal.description-quick-edit .modal-body .mb-3 {
    display: grid;
    grid-template-columns: max-content minmax(210px, 1fr);
    align-items: center;
    gap: 12px;
    margin: 0 !important;
    position: relative;
}

#descriptionModal.description-quick-edit .modal-body .form-label {
    margin: 0;
    white-space: nowrap;
}

#descriptionModal.description-quick-edit-origin .modal-body .mb-3 {
    grid-template-columns: max-content minmax(160px, 1fr);
    gap: 8px;
}

/* Keep compact-editor validation directly below its control (grid column 2). */
#descriptionModal.description-quick-edit .modal-body .invalid-feedback,
.field-quick-edit-modal .modal-body .invalid-feedback {
    grid-column: 2;
    margin-top: -4px;
}

#descriptionModal.description-quick-edit .modal-body .is-invalid ~ .invalid-feedback,
.field-quick-edit-modal .modal-body .is-invalid ~ .invalid-feedback {
    display: block;
}

#descriptionModal.description-quick-edit .modal-body .choices,
.field-quick-edit-modal .modal-body .choices {
    margin-bottom: 0 !important;
}

#descriptionModal.description-quick-edit .modal-footer {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    align-self: flex-start;
    transform: translateY(0px);
    padding: 0;
    border: 0;
    gap: 6px;
}

#descriptionModal.description-quick-edit .modal-footer > * {
    margin: 0 !important;
}

#descriptionModal .description-modal-button-icon {
    display: none;
}

#descriptionModal.description-quick-edit .description-modal-button-text {
    display: inline;
}

#descriptionModal.description-quick-edit .description-modal-button-icon {
    display: none;
}

#descriptionModal.description-quick-edit .modal-footer .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 64px;
    height: 38px;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 4px;
    font-size: 13px;
}

#descriptionModal.description-quick-edit .description-modal-save {
    background: #047A8A;
    border-color: #047A8A;
}

#descriptionModal.description-quick-edit .description-modal-cancel {
    background: #1C84C6;
    border-color: #1C84C6;
    color: #fff;
}

#descriptionModal .description-save-success,
#descriptionModal.description-quick-edit .description-save-success {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    background: #28a745 !important;
    border-color: #28a745 !important;
    color: #fff !important;
}

#descriptionModal .description-save-success i {
    font-size: 22px;
    line-height: 1;
}

.field-quick-edit-modal .modal-dialog {
    width: auto;
    max-width: min(900px, calc(100vw - 30px));
}

.field-quick-edit-modal .modal-header {
    display: none;
}

.field-quick-edit-modal form {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 16px;
}

.field-quick-edit-modal .modal-body {
    flex: 1 1 auto;
    max-height: none !important;
    padding: 0;
    overflow: visible !important;
}

.field-quick-edit-modal .modal-body .row {
    align-items: flex-start;
    margin: 0;
    gap: 10px;
}

.field-quick-edit-modal .modal-body .row > [class*="col-"] {
    flex: 1 1 260px;
    width: auto;
    max-width: none;
    padding: 0;
}

.field-quick-edit-modal .modal-body .mb-3 {
    display: grid;
    grid-template-columns: max-content minmax(190px, 1fr);
    align-items: center;
    gap: 10px;
    margin: 0 !important;
}

.field-quick-edit-modal .modal-body > .mb-4,
.field-quick-edit-modal .modal-body > div > .mb-4 {
    margin-bottom: 0 !important;
}

.field-quick-edit-modal .modal-body .form-label {
    margin: 0;
    white-space: nowrap;
}

#originModal.field-quick-edit-modal .referenced-document-current-actions {
    margin-left: 8px;
}

/* Prevent the referenced-document editor from overflowing and clipping labels. */
#originModal.field-quick-edit-modal .modal-dialog {
    width: min(760px, calc(100vw - 30px));
    margin-right: auto;
    margin-left: auto;
}

#originModal.field-quick-edit-modal form,
#originModal.field-quick-edit-modal .modal-body,
#originModal.field-quick-edit-modal .modal-body .row,
#originModal.field-quick-edit-modal .modal-body .row > [class*="col-"] {
    min-width: 0;
}

#originModal.field-quick-edit-modal input[type="file"] {
    width: 100%;
    min-width: 0;
}

#originModal.field-quick-edit-modal .stone-modal-section-title {
    display: none;
}

.field-quick-edit-modal .modal-footer {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    align-self: flex-start;
    padding: 0;
    border: 0;
    gap: 6px;
}

.field-quick-edit-modal .modal-footer > * {
    margin: 0 !important;
}

#gemologyOpticalModal.field-quick-edit-dichroscope .modal-footer {
    margin-bottom: 9px;
}

#gemologyOpticalModal.field-quick-edit-dichroscope .modal-body .row + .row {
    margin-top: 14px;
}

#gemologyOpticalModal.field-quick-edit-dichroscope .dichroscope-pairs-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 10px;
    row-gap: 14px;
}

#gemologyOpticalModal.field-quick-edit-dichroscope .dichroscope-pairs-row > [class*="col-"] {
    width: 100%;
    min-width: 0;
}

#gemologyOpticalModal.field-quick-edit-dichroscope .stone-color-list-trigger {
    min-width: 0;
    white-space: nowrap;
}

#gemologyOpticalModal.field-quick-edit-dichroscope .stone-color-list-placeholder {
    flex: 0 0 auto;
    white-space: nowrap;
}

#gemologyOpticalModal.field-quick-edit-dichroscope .stone-color-list-summary {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
}

#gemologyOpticalModal.field-quick-edit-dichroscope.field-quick-edit-multi-row .modal-footer {
    margin-bottom: 0;
}

/* Match the Chelsea, UVL and UVC color controls to adjacent selects. */
#gemologyOpticalModal.field-quick-edit-modal .stone-color-list-trigger,
#gemologyUVModal.field-quick-edit-modal .stone-color-list-trigger {
    height: 38px;
    min-height: 38px;
    flex-wrap: nowrap;
    white-space: nowrap;
}

#gemologyOpticalModal.field-quick-edit-modal .stone-color-list-placeholder,
#gemologyUVModal.field-quick-edit-modal .stone-color-list-placeholder {
    white-space: nowrap;
}

.field-quick-edit-modal .modal-footer .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 64px;
    height: 38px;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 4px;
    font-size: 13px;
}

.field-quick-edit-modal .modal-footer .btn i {
    display: none;
}

.field-quick-edit-modal .modal-footer .btn-primary {
    background: #047A8A;
    border-color: #047A8A;
}

.field-quick-edit-modal .modal-footer .btn-secondary {
    background: #1C84C6;
    border-color: #1C84C6;
    color: #fff;
}

.field-quick-edit-modal .modal-footer .description-save-success {
    background: #28a745 !important;
    border-color: #28a745 !important;
    color: #fff !important;
}

.gemology-quick-field {
    cursor: default;
    user-select: none;
}

.gemology-quick-field.is-empty > span,
.gemology-quick-field.is-empty .stone-empty-icon {
    color: #c0392b !important;
}

@media (max-width: 575.98px) {
    #descriptionModal.description-quick-edit form,
    #descriptionModal.description-quick-edit .modal-body .row,
    .field-quick-edit-modal form,
    .field-quick-edit-modal .modal-body .row {
        align-items: stretch;
        flex-direction: column;
    }

    #descriptionModal.description-quick-edit .modal-body .row > [class*="col-"],
    .field-quick-edit-modal .modal-body .row > [class*="col-"] {
        flex-basis: auto;
        width: 100%;
    }

    #descriptionModal.description-quick-edit .modal-body .mb-3,
    .field-quick-edit-modal .modal-body .mb-3 {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
        gap: 6px;
    }

    #descriptionModal.description-quick-edit .modal-body .form-label,
    .field-quick-edit-modal .modal-body .form-label {
        display: block;
        width: 100%;
        white-space: normal;
    }

    #descriptionModal.description-quick-edit .modal-body .invalid-feedback,
    .field-quick-edit-modal .modal-body .invalid-feedback {
        grid-column: 1;
        position: static;
        margin-top: 0;
    }

    #descriptionModal.description-quick-edit .modal-footer,
    .field-quick-edit-modal .modal-footer {
        align-self: flex-end;
    }
}

.stone-modal-section-title {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 1rem 0 .85rem;
    color: #8a94a3;
    font-size: .95rem;
    font-weight: 500;
    letter-spacing: 0;
}

.stone-modal-section-title::before,
.stone-modal-section-title::after {
    content: "";
    flex: 1 1 auto;
    border-top: 2px solid #b8b2aa;
}

@media (max-width: 1199.98px) {
    .stone-field-grid--description {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .stone-field-grid--description,
    .stone-field-grid--origin {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .stone-field-grid--description,
    .stone-field-grid--origin {
        grid-template-columns: 1fr;
    }
}

/* Custom classes for easy color changes */
.custom-gray {
    color: #888 !important;
}

.custom-primary {
    color: #047a8a !important;
}

/* ========================
   Stone Origin Table Styles
   ======================== */

/* Active tab color in gemology modal */
.gemology-modal-body .nav-link.active {
    color: #047A8A !important;
}
.tabs-custom {
	text-transform: uppercase;
}
.card-header-custom {
    text-transform: uppercase;
}
    .tabs-custom .active {
    color: #047A8A !important;
}

/* Fix z-index for flatpickr calendar in modals */
.flatpickr-calendar {
    z-index: 1060 !important;
}

.select2-results__option strong {
    font-weight: bold;
    font-size: 15px;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #444;
    line-height: 35px!important;
}
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 35px!important;
}
.table.table-borderless td {
    padding: 0px 10px;
}

/* ========================
   SPECTROSCOPY SECTION STYLES
   ======================== */
.spectroscopy-section {
    padding: 15px;
    background: #fff;
    border-radius: 6px;
}

.spectroscopy-header {
    margin-bottom: 15px;
}

.spectroscopy-wrapper {
    position: relative;
    width: 100%;
}

.spectrum-row {
    display: flex;
    height: 110px;
}

.side-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 3px 10px;
    font-weight: bold;
    line-height: 1.2;
    user-select: none;
    color: #495057;
    background: #e9ecef;
    border-radius: 4px;
}

.spectrum-end-labels {
    position: relative;
    height: 24px;
    margin-top: 2px;
}

.spectrum-end-labels .side-label {
    position: absolute;
    top: 7px;
    transform: translateX(-50%);
    font-size: 12px;
}

.cells {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(67, 1fr);
    position: relative;
}

.cell {
    position: relative;
    border-top: 1px solid #888;
    border-right: 1px solid #888;
    border-bottom: 1px solid #888;
    cursor: pointer;
    user-select: none;
    min-height: 100px;
}

.cell:first-child {
    border-left: 1px solid #888;
}


.cell-base,
.cell-overlay {
    position: absolute;
    inset: 0;
}


.cell-overlay {
    transition: background-color 0.1s ease;
}

.mini-values {
    position: relative;
    height: 22px;
    margin-top: 4px;
}

.mini-values span {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    font-size: 9px;
    line-height: 1.2;
    text-align: center;
    user-select: none;
    color: #fff;
    background: #5f6368;
    border-radius: 3px;
    padding: 2px 5px;
    white-space: nowrap;
    visibility: hidden;
}

.mini-values span.is-visible {
    visibility: visible;
}

.mini-values span::before,
.mini-values span::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
}

.mini-values span::before {
    top: -4px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid #5f6368;
}

.mini-values span::after {
    display: none;
}

.spectroscopy-hover-area {
    display: none;
    position: absolute;
    box-sizing: border-box;
    pointer-events: none;
    z-index: 5;
}

.uv-label {
    left: 0;
}

.ir-label {
    left: 100%;
}

.ticks {
    margin: 4px 0 0;
    position: relative;
    height: 34px;
}

.tick-line {
    height: 2px;
    background: #666;
}

.major-tick {
    position: absolute;
    width: 2px;
    height: 18px;
    background: #666;
    transform: translateX(-50%);
}

.tick-label {
    position: absolute;
    top: 20px;
    transform: translateX(-50%);
    font-size: 14px;
    user-select: none;
    color: #495057;
}

@media (max-width: 991.98px) {
    .ticks .tick-label-mobile-hidden {
        display: none;
    }
}

.axis-title {
    text-align: center;
    font-weight: bold;
    margin-top: 8px;
    user-select: none;
    color: #495057;
}


.spectroscopy-legend {
    display: inline-flex;
    gap: 15px;
}


.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1px solid #888;
}

.legend-lvl1 {
    background: #222222;
}

.legend-lvl2 {
    background: #cfcfcf;
}


.legend-lvl3 {
    background: #ffffff;
}


.spectroscopy-instructions {
    text-align: center;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
}

/* ============================================
   END SPECTROSCOPY SECTION STYLES
   ============================================ */

/* ========================
   SPECTROSCOPY READ-ONLY MODE
   ======================== */
.spectroscopy-section.spectroscopy-readonly .cell {
    cursor: default !important;
}

.spectroscopy-section.spectroscopy-readonly .cell:hover {
    cursor: default !important;
}

/* Visual indicator that cells are not clickable */
.spectroscopy-section.spectroscopy-readonly .cell-overlay {
    pointer-events: none;
}

/* ========================
   SPECTROSCOPY MODAL STYLES
   ======================== */
#spectroscopyModal .modal-dialog {
    max-width: 95vw;
    width: 95vw;
}

#spectroscopyModal .modal-body {
    padding: 20px;
}

.spectroscopy-modal-section {
    padding: 15px;
    background: #fff;
    border-radius: 6px;
}

.spectroscopy-modal-section .spectroscopy-wrapper {
    width: 100%;
}

.spectroscopy-modal-section .spectrum-row {
    display: flex;
    height: 110px;
}

.spectroscopy-modal-section .cells {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(67, 1fr);
    position: relative;
}

.spectroscopy-modal-section .cell {
    position: relative;
    border-top: 1px solid #888;
    border-right: 1px solid #888;
    border-bottom: 1px solid #888;
    cursor: pointer;
    user-select: none;
    min-height: 100px;
}

.spectroscopy-modal-section .cell:first-child {
    border-left: 1px solid #888;
}

.spectroscopy-modal-section .cell-base,
.spectroscopy-modal-section .cell-overlay {
    position: absolute;
    inset: 0;
}

.spectroscopy-modal-section .cell-overlay {
    transition: background-color 0.1s ease;
}

.spectroscopy-modal-section .mini-values {
    position: relative;
    height: 22px;
    margin-top: 4px;
}

.spectroscopy-modal-section .ticks {
    margin: 4px 0 0;
    position: relative;
    height: 34px;
}

.spectroscopy-modal-section .ticks .tick-line {
    height: 2px;
    background: #666;
}

.spectroscopy-modal-section .major-tick {
    position: absolute;
    width: 2px;
    height: 18px;
    background: #666;
    transform: translateX(-50%);
}

.spectroscopy-modal-section .tick-label {
    position: absolute;
    top: 20px;
    transform: translateX(-50%);
    font-size: 14px;
    user-select: none;
    color: #495057;
}

.spectroscopy-modal-section .axis-title {
    text-align: center;
    font-weight: bold;
    margin-top: 2px;
    user-select: none;
    color: #495057;
}

.spectroscopy-modal-section .side-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    padding: 3px 10px;
    font-weight: bold;
    line-height: 1.2;
    user-select: none;
    color: #495057;
    background: #e9ecef;
    border-radius: 4px;
}

/* Spectroscopy modal validate button */
#spectroscopyValidateBtn {
    min-width: 120px;
}

#spectroscopyValidateBtn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}
tr.clickable-row {
    cursor: pointer;
}

/* Responsive adjustments for spectroscopy modal */
@media (max-width: 768px) {
    .spectroscopy-modal-section .side-label {
        font-size: 12px;
    }
}


html[data-bs-theme="dark"] .stone-page {
    background: #15151b;
}
html[data-bs-theme="dark"] .stone-page .card-box {
    background: #1e1f27;
    border-color: #2a2c34;
}
html[data-bs-theme="dark"] .gemology-data-section .section-title , html[data-bs-theme="dark"] .stone-page .main-img .no-image-placeholder, html[data-bs-theme="dark"] .stone-page .side-imgs .no-image-placeholder-sm{
    background: #1d2a30;
}

/* ========================
   Choices.js Validation Styles
   ======================== */
/* Apply invalid styling to Choices.js dropdown containers */
.choices.is-invalid {
    border: 1px solid #dc3545;
    border-radius: 0.375rem;
}

.choices.is-invalid .choices__inner {
    border-radius: 0.375rem;
}

/* Show invalid-feedback when .choices has is-invalid class */
.choices.is-invalid ~ .invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875em;
    color: #dc3545;
}

/* Also ensure Choices container doesn't have extra styling conflict */
.choices.is-invalid.focused .choices__inner {
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}
#boxLocationForm .choices {
    margin-bottom: 0px;
}

/* ========================
   Location Button Styling
   ======================== */
.stone-page .action-btn.action-location {
    color: #047a8a;
}

.stone-page .action-btn.action-location:hover {
    color: #035a68;
}

/* ========================
   SH TOOLTIP - Simple HTML Tooltip System
   ======================== */

/* Tooltip trigger element */
.sh-tooltip-trigger {
    display: inline-flex;
    align-items: center;
    cursor: help;
    outline: none;
}

.sh-tooltip-trigger:focus {
    outline: none;
}

.sh-tooltip-trigger .sh-tooltip-icon {
    color: #047a8a;
    font-size: 16px;
    margin-left: 4px;
    transition: color 0.2s ease;
}

.sh-tooltip-trigger:hover .sh-tooltip-icon,
.sh-tooltip-trigger:focus .sh-tooltip-icon {
    color: #035a68;
}

/* Tooltip container */
#sh-tooltip-container.sh-tooltip {
    position: fixed;
    z-index: 99999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 150ms ease;
    max-width: 400px;
    min-width: 200px;
}

#sh-tooltip-container.sh-tooltip.visible {
    opacity: 1;
}

/* Tooltip content wrapper */
.sh-tooltip-content {
    background: #fff;
    border: 1px solid #e7eaec;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 12px 16px;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Dark mode support */
html[data-bs-theme="dark"] #sh-tooltip-container.sh-tooltip .sh-tooltip-content {
    background: #2a2c34;
    border-color: #3a3c44;
    color: #e0e0e0;
}

/* Tooltip arrow */
.sh-tooltip-arrow {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #fff;
    border: 1px solid #e7eaec;
    transform: rotate(45deg);
}

html[data-bs-theme="dark"] #sh-tooltip-container.sh-tooltip .sh-tooltip-arrow {
    background: #2a2c34;
    border-color: #3a3c44;
}

/* Arrow positions */
/*
.sh-tooltip-arrow-top {
    top: auto;
    bottom: -6px;
    left: 50%;
    margin-left: -6px;
    border-top: 1px solid #e7eaec;
    border-left: 1px solid #e7eaec;
    border-right: none;
    border-bottom: none;
}
.sh-tooltip-arrow-bottom {
    top: -6px;
    bottom: auto;
    left: 50%;
    margin-left: -6px;
    border-bottom: 1px solid #e7eaec;
    border-right: 1px solid #e7eaec;
    border-top: none;
    border-left: none;
}
.sh-tooltip-arrow-left {
    left: auto;
    right: -6px;
    top: 50%;
    margin-top: -6px;
    border-bottom: 1px solid #e7eaec;
    border-left: 1px solid #e7eaec;
    border-top: none;
    border-right: none;
}
 .sh-tooltip-arrow-right {
    left: -6px;
    right: auto;
    top: 50%;
    margin-top: -6px;
    border-top: 1px solid #e7eaec;
    border-right: 1px solid #e7eaec;
    border-bottom: none;
    border-left: none;
}
*/

/* Loading state */
.sh-tooltip-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #888;
}

.sh-tooltip-loading i {
    animation: sh-tooltip-spin 1s linear infinite;
}

@keyframes sh-tooltip-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========================
   Tooltip Table Styles (for location data)
   ======================== */
.sh-tooltip-table-wrapper {
    min-width: 180px;
}

.sh-tooltip-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin: 0;
    padding: 0;
}

.sh-tooltip-table tr {
    border-bottom: 1px solid #f0f0f0;
}

html[data-bs-theme="dark"] .sh-tooltip-table tr {
    border-bottom-color: #3a3c44;
}

.sh-tooltip-table tr:last-child {
    border-bottom: none;
}

.sh-tooltip-table th {
    text-align: left;
    padding: 6px 10px 6px 0;
    font-weight: 600;
    color: #555;
    white-space: nowrap;
    vertical-align: top;
    width: 40%;
}

html[data-bs-theme="dark"] .sh-tooltip-table th {
    color: #aaa;
}

.sh-tooltip-table td {
    padding: 6px 0;
    color: #333;
    word-break: break-word;
}

html[data-bs-theme="dark"] .sh-tooltip-table td {
    color: #e0e0e0;
}

/* Comment field with line breaks */
.sh-tooltip-comment {
    white-space: pre-wrap;
    line-height: 1.4;
}

/* Text muted class */
.sh-tooltip-content .text-muted {
    color: #888;
    font-style: italic;
}

/* Scrollbar for tooltip content */
.sh-tooltip-content::-webkit-scrollbar {
    width: 6px;
}

.sh-tooltip-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.sh-tooltip-content::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

html[data-bs-theme="dark"] .sh-tooltip-content::-webkit-scrollbar-track {
    background: #3a3c44;
}

html[data-bs-theme="dark"] .sh-tooltip-content::-webkit-scrollbar-thumb {
    background: #555;
}
#disabled-stones-datatable_processing {
    display: none !important;
}
.btn-success {
    --ins-btn-bg: var(--ins-primary);
    --ins-btn-border-color: var(--ins-primary);
    --ins-btn-hover-bg: var(--ins-primary-text-emphasis);
    --ins-btn-hover-border-color: var(--ins-primary-text-emphasis);
    --ins-btn-focus-shadow-rgb: var(--ins-primary-rgb);
    --ins-btn-active-bg: var(--ins-primary-text-emphasis);
    --ins-btn-active-border-color: var(--ins-primary-text-emphasis);
    --ins-btn-disabled-bg: var(--ins-primary);
    --ins-btn-disabled-border-color: var(--ins-primary);
}

/* ========================
   Boxes Page - Controls Row Styles
   ======================== */
.boxes-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e7eaec;
    margin-bottom: 15px;
}

.boxes-controls-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.boxes-controls-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

/* Vertical separator */
.boxes-controls-separator {
    width: 1px;
    height: 30px;
    background-color: #e7eaec;
    flex-shrink: 0;
}

/* Display stones toggle - label before switch */
.boxes-controls-left .form-check.form-switch {
    display: flex;
    align-items: center;
    gap: 8px;
}

.boxes-controls-left .form-check.form-switch .form-check-label {
    order: -1;
    margin-bottom: 0;
}

.boxes-controls-left .form-check.form-switch .form-check-input {
    margin-left: 0;
}

/* Stone search field styles */
.stone-search-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 400px;
    flex: 1;
}

.stone-search-wrapper label {
    white-space: nowrap;
    margin-bottom: 0;
    font-size: 13px;
    color: #666;
    padding-top: 6px;
}

.stone-search-wrapper .select2-container {
    flex: 1;
    min-width: 180px;
    max-width: 320px;
}

.stone-search-wrapper.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Stone search Select2 - auto height adjustment */
.stone-search-wrapper .select2-container--default {
    width: 100% !important;
}

.stone-search-wrapper .select2-selection--multiple {
    border: 1px solid #ced4da;
    border-radius: 4px;
    min-height: 36px;
    padding: 2px 6px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.stone-search-wrapper .select2-selection__rendered {
    padding-top: 2px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.stone-search-wrapper .select2-selection__choice {
    background: #9C1D3A !important;
    border: none !important;
    color: #fff !important;
    border-radius: 3px;
    padding: 2px 6px 2px 4px;
    font-size: 12px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.stone-search-wrapper .select2-selection__choice__remove {
    color: #fff !important;
    margin-right: 2px;
}

.stone-search-wrapper .select2-selection__choice__remove:hover {
    color: #f0f0f0 !important;
}

/* Select2 dropdown max-height and auto-scroll */
.stone-search-wrapper .select2-dropdown {
    max-height: 250px;
    overflow-y: auto;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .boxes-controls-row {
        flex-wrap: wrap;
    }
    
    .boxes-controls-separator {
        display: none;
    }
    
    .stone-search-wrapper {
        width: 100%;
        max-width: 100%;
    }
    
    .stone-search-wrapper .select2-container {
        max-width: 100%;
    }
}

/* ========================
   REFRACTOMETER SECTION STYLES
   ======================== */
.refractometer-section {
    background: #fff;
}

.refractometer-not-observable {
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    text-align: center;
}

.refractometer-not-observable span {
    color: #888;
    font-size: 13px;
    font-weight: 500;
}
.refractometer-section h6 {
    color: #2c3e50;
    font-weight: 600;
}

.refractometer-section .info-item {
    border-right: 0;
}

.refractometer-section .refractometer-table-title {
    padding: 0 0 8px;
}

.refractometer-section .refractometer-table-title label {
    margin-bottom: 0;
}

.refractometer-chart {
    width: 500px;
    min-width: 500px;
    height: 240px;
    border: 1px solid #e7eaec;
    border-radius: 6px;
    background: #fafbfc;
    padding: 10px;
    box-sizing: border-box;
}

.refractometer-chart-wrap {
    width: 500px;
    min-width: 500px;
    max-width: 500px;
}

.refractometer-chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.refractometer-chart-header h6 {
    margin-bottom: 0;
}

.refractometer-chart-legend {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #666;
    font-size: 12px;
    font-weight: 600;
}

.refractometer-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.refractometer-legend-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.refractometer-legend-dot-np {
    background: #047a8a;
}

.refractometer-legend-dot-ng {
    background: #f59e42;
}

/* Table styles for refractometer */
.refractometer-section .table {
    margin-bottom: 0;
    width: max-content;
    min-width: 0;
    table-layout: auto;
}

.refractometer-section .table th {
    font-size: 12px;
    font-weight: 600;
    color: #666;
/*    text-transform: uppercase;*/
    background: #f8f9fa;
    padding: 10px;
    text-align: left;
    white-space: nowrap;
}

.refractometer-section .table td {
    font-size: 13px;
    color: #2c3e50;
    text-align: left;
    white-space: nowrap;
}

.refractometer-table-scroll,
.refractometer-chart-scroll {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}
.refractometer-section .table td:first-child {
    font-weight: 600;
    color: #4C4C5C;
}

.refractometer-section .table th:empty,
.refractometer-section .table td:empty {
    background: #f8f9fa;
}

.refractometer-section .table td[rowspan] {
    vertical-align: middle;
    font-weight: 600;
}

.refractometer-section .table-responsive {
    margin-bottom: 0;
}

.refractometer-two-line-layout {
    row-gap: 16px;
}

.refractometer-charts-layout {
    column-gap: 16px;
    margin-right: 0;
    margin-left: 0;
}

.refractometer-two-line-primary,
.refractometer-two-line-secondary {
    width: 500px;
    max-width: 100%;
    padding-right: 0;
    padding-left: 0;
    overflow-x: auto;
    overflow-y: hidden;
}

.refractometer-two-line-layout .refractometer-two-line-table-row {
    height: 42px;
}

.refractometer-two-line-layout td[rowspan] {
    vertical-align: middle;
}
.finder-summary-chip {
    margin-left: 2px;
}
.gem-finder-result-item__body {
    padding-left: 10px;
}
.gem-finder-result-item__toggle i {
    width: 8px;
    height: 8px;
}

@media (min-width: 992px) {
    .refractometer-two-line-primary {
        flex: 0 0 auto;
        width: 500px;
    }

    .refractometer-two-line-secondary {
        flex: 0 0 auto;
        width: 500px;
    }
}

@media (max-width: 991.98px) {
    .refractometer-charts-layout {
        flex-direction: column;
        gap: 16px;
    }
}

/* Dark mode support */
html[data-bs-theme="dark"] .refractometer-section {
    background: #1e1f27;
}

html[data-bs-theme="dark"] .refractometer-section h6 {
    color: #e0e0e0;
}

html[data-bs-theme="dark"] .refractometer-section .table {
    color: #e0e0e0;
}

html[data-bs-theme="dark"] .refractometer-section .table th {
    background: #25262e;
    color: #aaa;
}

html[data-bs-theme="dark"] .refractometer-section .table td {
    color: #e0e0e0;
}

html[data-bs-theme="dark"] .refractometer-section .table th:empty,
html[data-bs-theme="dark"] .refractometer-section .table td:empty {
    background: #25262e;
}

html[data-bs-theme="dark"] .refractometer-section .refractometer-chart {
    background: #25262e;
    border-color: #3a3c44;
}

html[data-bs-theme="dark"] .refractometer-chart-legend {
    color: #aaa;
}

.refractometer-edit-table {
    min-width: 520px;
}

.refractometer-edit-table th,
.refractometer-edit-table td {
    vertical-align: middle;
    text-align: center;
}

.refractometer-edit-table th {
    white-space: nowrap;
    font-size: 12px;
}

.refractometer-edit-table td[rowspan] {
    font-weight: 600;
}

.refractometer-edit-table .form-control-sm {
    min-width: 78px;
    text-align: center;
}

.refractometer-edit-table input:disabled {
    background: #f8f9fa;
    color: #6c757d;
    opacity: 1;
}

html[data-bs-theme="dark"] .refractometer-edit-table input:disabled {
    background: #25262e;
    color: #aaa;
}
.refractometer-section.p-3 {
    padding-left: 15px !important;
    padding-top: 15px !important;
}
.refractometer-section.p-3.refractometer-type-1-line , .refractometer-section.p-3.refractometer-type-2-line {
    padding-left: 20px !important;
    padding-top: 15px !important;
}

.boxes-controls-left .form-check.form-switch {
    padding-left: 16px;
}
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover, .select2-container--default .select2-selection--multiple .select2-selection__choice__remove:focus {
    background-color: transparent!important;
}

.stone-page .history-action {
    text-transform: uppercase;
}

.side-nav-item.active .side-nav-link:hover {
    color: #fff;
}

.side-nav-item.active #sidebarAdd .side-nav-link:hover {
    color: var(--ins-primary);
}
.ladda-button {
    font-size: 13px!important;
}
.stone-grid p {
    color: var(--ins-primary); /* rgba(var(--ins-link-color-rgb), var(--ins-link-opacity, 1)); */
}
#admins-datatable_processing {
    display: none !important;
}
.finder-summary-row span {
    font-weight: 600;
}

.stone-disabled-tag {
    font-size: 12px;
    padding: 4px 10px;
}

.general-search-bar {
    position: relative;
    width: 100%;
}

.general-search-bar__icon {
    position: absolute;
    top: 50%;
    left: 16px;
    z-index: 2;
    transform: translateY(-50%);
    color: var(--ins-secondary-color);
    font-size: 20px;
    pointer-events: none;
}

.general-search-bar__input {
    min-height: 44px;
    padding-left: 48px;
    border-radius: var(--ins-border-radius-lg);
    box-shadow: var(--ins-box-shadow-sm);
}
.stone-nature-options__children .stone-nature-tile[data-nature-parent="27"][data-nature-option-id="337"] img, .stone-nature-options__children .stone-nature-tile[data-nature-parent="29"][data-nature-option-id="352"] img {
    width: 110px !important;
}
.gemology-instrument-heading.refractometer-instrument-heading {
    display: none;
}

@media (min-width: 768px) {
    .app-topbar {
        display: none;
    }

    .content-page {
        min-height: 100vh;
    }
}

@media (max-width: 550px) {
.stone-page .row-first-section .card-header-custom {
    display: block!important;
}
.stone-page .row-first-section .action-btn span {
    font-size: 8px;
}

.boxes-controls-left {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  min-width: 0;
}
.boxes-controls-row,
.boxes-controls-right {
  width: 100%;
  min-width: 0;
}
.boxes-display-mode,
#stoneSearchWrapper {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  width: 100%;
  max-width: none;
  gap: 8px;
}
.boxes-display-mode .form-select,
#stoneSearchWrapper .select2-container {
  width: 100% !important;
  min-width: 0;
  max-width: none;
}
#stoneSearchWrapper label {
  padding-top: 0;
}
.boxes-controls-left .form-check.form-switch.m-0 {
  padding-left: 0px;
}
div#editBoxModal, div#boxLocationModal {
    z-index: 999999;
}
}

@media (max-width: 399.98px) {
    html body .stone-page .cls-section1-details .stone-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 16px;
        row-gap: 14px;
    }

    html body .stone-page .cls-section1-details .stone-grid .item {
        min-width: 0;
    }

    html body .stone-page .cls-section1-details .stone-grid label,
    html body .stone-page .cls-section1-details .stone-grid p {
        display: block;
        max-width: 100%;
        margin-bottom: 0;
        overflow-wrap: anywhere;
    }
}
.general-search-bar {
    position: relative;
    z-index: 1040;
}

.general-search-bar__spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 18px;
    z-index: 2;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    color: #078fbc;
    pointer-events: none;
}

.general-search-bar.is-loading .general-search-bar__spinner { display: block; }
.general-search-bar.is-loading .general-search-bar__icon { display: none; }

.general-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: min(560px, calc(100vh - 190px));
    overflow-y: auto;
    background: var(--bs-body-bg, #fff);
    border: 1px solid var(--bs-border-color, #e5e7eb);
    border-radius: 10px;
    box-shadow: 0 18px 45px rgba(24, 39, 54, .16);
}

.general-search-results__group {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 8px 14px;
    color: #718096;
    background: var(--bs-tertiary-bg, #f7f9fb);
    border-bottom: 1px solid var(--bs-border-color, #edf0f2);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.general-search-result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    color: var(--bs-body-color, #29343d);
    border-bottom: 1px solid var(--bs-border-color, #edf0f2);
    text-decoration: none;
}

.general-search-result:hover,
.general-search-result.is-active {
    color: var(--bs-body-color, #29343d);
    background: rgba(7, 143, 188, .08);
}

.general-search-result__icon {
    display: grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    color: #078fbc;
    background: rgba(7, 143, 188, .11);
    border-radius: 9px;
    font-size: 19px;
}

.general-search-result__content { min-width: 0; flex: 1; }
.general-search-result__top { display: flex; align-items: center; gap: 8px; }
.general-search-result__top strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.general-search-result__type { padding: 2px 7px; color: #078fbc; background: rgba(7, 143, 188, .1); border-radius: 20px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.general-search-result__subtitle { display: block; overflow: hidden; margin-top: 2px; color: #7b8794; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.general-search-result__match { display: block; overflow: hidden; margin-top: 3px; color: #66737f; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.general-search-result__match b { color: var(--bs-body-color, #29343d); font-weight: 600; }
.general-search-result__arrow { flex: 0 0 auto; color: #98a3ad; }
.general-search-results__message { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 24px; color: #7b8794; }
.general-search-results__hidden-count {
    position: sticky;
    bottom: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    padding: 10px 16px;
    color: #5f6c77;
    background: var(--bs-tertiary-bg, #f7f9fb);
    border-top: 1px solid var(--bs-border-color, #e5e7eb);
    box-shadow: 0 -4px 12px rgba(24, 39, 54, .05);
    font-size: 13px;
    font-weight: 500;
    cursor: default;
    user-select: none;
}

.general-search-results__hidden-icon {
    display: inline-grid;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    place-items: center;
    color: #687680;
    background: rgba(102, 115, 127, .1);
    border-radius: 50%;
    font-size: 15px;
}

.general-search-results__hidden-label strong {
    color: var(--bs-body-color, #29343d);
    font-weight: 700;
}



.d-flex.align-items-center.gap-2.referenced-document-current-actions {
  margin-left: 0px !important;
}
#current_document_container {
  padding-bottom: 15px;
}
#current_document_container .btn.btn-outline-danger.btn-sm {
  padding: 7px;
}
#boxTreeContainer {
    padding-top: 10px;
    padding-bottom: 10px;
}

@media (max-width: 767.98px) {
    .general-search-bar { z-index: 1; }
}

@media (max-width: 575.98px) {
    .general-search-result__type { display: none; }
    .general-search-results { max-height: calc(100vh - 150px); }
    .boxes-controls-left .form-check.form-switch.m-0 {
        padding-bottom: 10px;
    }

    .stone-page .action-buttons {
        margin-top: 15px;
    }
}
