.table>:not(caption)>*>* {
    padding: .40rem !important;
}

.form-container {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background-color: #fff;
}

.overlapping-label {
    position: absolute;
    left: 10px;
    background-color: white;
    color: #007bff;
    padding: 0 5px;
}

.floating-label-group {
    position: relative;
    margin-top: 10px;
}

.form-label {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    color: #b9c2ca;
    transition: all 0.2s ease-out;
    pointer-events: none;
    background: white;
    padding: 0 5px;
}

.form-control:not(:placeholder-shown)+.form-label,
.form-select:not([selected=""])+.form-label,
.select2:not([selected=""])+.form-label,
.form-control:focus+.form-label,
.select2:focus+.form-label,
.form-select:focus+.form-label {
    top: 0px;
    font-size: 0.733rem;
    color: #007bff;
}

.page-content {
    padding: 80px 10px 0px !important;
}

.page-title-box {
    padding-bottom: 10px !important;
}

.card-body-custome {
    padding-top: 10px !important;
    padding-bottom: 0px !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

.custom-select2 {
    position: relative;
    width: 300px;
}

#search-box {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
}

#options-list {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    width: 100%;
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #ccc;
    background-color: #fff;
    z-index: 1000;
}

#options-list li {
    padding: 8px;
    cursor: pointer;
}

#options-list li:hover {
    background-color: #f0f0f0;
}

.hidden {
    display: none;
}

body[data-sidebar=dark].vertical-collpsed {
    min-height: 760px !important;
}

/* Readonly field styling */
input[readonly], 
select[readonly], 
textarea[readonly] {
    background-color: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    color: #6c757d !important;
    cursor: not-allowed;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.075);
}

input[readonly]:focus, 
select[readonly]:focus, 
textarea[readonly]:focus {
    border-color: #e9ecef !important;
    box-shadow: none !important;
}

/* Custom styling for readonly fields */
.readonly-field {
    position: relative;
}

.readonly-field::after {
    content: "🔒";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 14px;
    pointer-events: none;
}

/* Hover effect for readonly fields */
.readonly-field:hover {
    background-color: #f1f3f5 !important;
}

/* Custom label color for readonly fields */
.readonly-field + label {
    color: #6c757d;
}

/* Custom placeholder color for readonly fields */
.readonly-field::placeholder {
    color: #adb5bd;
}


.custome-card {
    margin-bottom: 10px !important;
}

/* Custom styles for improved product index page */

/* Statistics cards */
.mini-stats-wid {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 0 20px rgba(0,0,0,0.08);
}

.mini-stats-wid:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

.mini-stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.font-size-24 {
    font-size: 24px !important;
}

/* Table improvements */
.table-hover tbody tr:hover {
    background-color: rgba(0,123,255,0.05);
    cursor: pointer;
}

.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

/* Status toggle switch */
.form-check-input.status-toggle {
    width: 3rem;
    height: 1.5rem;
    cursor: pointer;
}

.form-check-input.status-toggle:checked {
    background-color: #198754;
    border-color: #198754;
}

/* Badge improvements */
.badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

/* Dropdown improvements */
.dropdown-menu {
    border: none;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    border-radius: 8px;
    z-index: 1050 !important;
    position: absolute !important;
    display: none;
}

.dropdown-menu.show {
    display: block !important;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item.text-danger:hover {
    background-color: #dc3545;
    color: white !important;
}

/* Ensure dropdown button is properly styled */
.dropdown-toggle::after {
    margin-left: 0.255em;
    vertical-align: 0.255em;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
}

/* Search form improvements */
.input-group {
    border-radius: 8px;
    overflow: hidden;
}

.input-group-text {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

/* Button improvements */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

/* Card improvements */
.card {
    border: none;
    box-shadow: 0 0 20px rgba(0,0,0,0.08);
    border-radius: 12px;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

/* Pagination improvements */
.pagination {
    gap: 0.25rem;
}

.page-link {
    border-radius: 6px;
    border: 1px solid #dee2e6;
    color: #495057;
    transition: all 0.2s ease;
}

.page-link:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: #495057;
}

.page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Modal improvements */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1.5rem;
}

/* Form improvements */
.form-select, .form-control {
    border-radius: 6px;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.form-select:focus, .form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Empty state improvements */
.text-muted {
    color: #6c757d !important;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .d-flex.gap-2 {
        gap: 0.5rem !important;
    }
    
    .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .mini-stats-wid .card-body {
        padding: 1rem;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Animation for status changes */
.status-toggle {
    transition: all 0.3s ease;
}

/* Custom scrollbar */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Tooltip improvements */
.tooltip {
    font-size: 0.875rem;
}

/* Alert improvements */
.alert {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Breadcrumb improvements */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #6c757d;
}

/* Image placeholder */
.bg-light.rounded {
    background-color: #f8f9fa !important;
    border: 1px solid #e9ecef;
}

/* Variant count badge */
.small.text-muted {
    font-size: 0.75rem;
    color: #6c757d;
}

/* Bulk action improvements */
#bulkAction {
    min-width: 150px;
}

/* Per page selector */
#perPageSelect {
    min-width: 120px;
}

/* Search form improvements */
#searchForm .form-select {
    min-width: 140px;
}

/* Statistics card animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mini-stats-wid {
    animation: fadeInUp 0.6s ease-out;
}

.mini-stats-wid:nth-child(1) { animation-delay: 0.1s; }
.mini-stats-wid:nth-child(2) { animation-delay: 0.2s; }
.mini-stats-wid:nth-child(3) { animation-delay: 0.3s; }
.mini-stats-wid:nth-child(4) { animation-delay: 0.4s; }

/* Additional dropdown fixes */
.dropdown {
    position: relative;
}

.dropdown-menu {
    margin-top: 0.125rem;
}

/* Ensure dropdowns work in table cells */
.table td .dropdown {
    position: relative;
}

.table td .dropdown-menu {
    position: absolute;
    right: 0;
    left: auto;
    min-width: 10rem;
}

/* Fix for dropdown positioning in responsive tables */
@media (max-width: 768px) {
    .table td .dropdown-menu {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 300px;
    }
}

/* Open dropdown upwards if .dropdown-menu-up is present */
.dropdown-menu-up {
    top: auto !important;
    bottom: 100% !important;
    transform: translateY(-0.25rem);
    animation: fadeInUp 0.2s;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Ensure dropdowns in table cells are never clipped */
.table-responsive { overflow: visible !important; }
.table td .dropdown-menu { position: absolute !important; right: 0; left: auto; min-width: 10rem; z-index: 1050; }