.audit-library-wrapper {
    background: #f1f1f2;
    padding: 24px;
    color: #1e293b;
    box-sizing: border-box;
    max-width: unset;
    border-radius: 15px;
}

.audit-library-wrapper *, .audit-library-wrapper *::before, .audit-library-wrapper *::after {
    box-sizing: border-box;
}

.audit-container {
    display: flex;
    gap: 24px;
    margin-top: 20px;
    align-items: flex-start;
}

.search-wrapper {
    background: #ffffff;
    display: flex;
    align-items: center;
    padding: 0 18px;
    height: 52px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-wrapper:focus-within {
    border-color: #a5b4fc;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.12);
}

.search-icon-svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    color: #94a3b8;
    margin-right: 12px;
}

.audit-library-wrapper .search-wrapper input {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    width: 100%;
    font-size: 15px;
    color: #334155;
    background: transparent;
    padding: 0;
    margin: 0;
    height: auto;
    line-height: normal;
    border-radius: 0;
}

.audit-library-wrapper .search-wrapper input::placeholder {
    color: #94a3b8;
    font-size: 15px;
}

.audit-library-filters {
    width: 300px;
    flex-shrink: 0;
    background: #fff;
    border-radius: 12px;
    padding: 22px 18px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.filter-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 15px 6px;
    display: flex;
    align-items: center;
    gap: 9px;
}

.filter-title svg {
    color: #64748b;
    flex-shrink: 0;
}

.filter-item, .product-type-item {
    display: flex;
    margin-bottom: 5px;
    font-size: 14px;
    color: #475569;
}

.item-left {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 9px;
    padding-right: 7px;
}

/* Custom radio & checkbox */
input[type="checkbox"],
input[type="radio"] {
    width: 17px;
    height: 17px;
    cursor: pointer;
    accent-color: #2563eb;
    flex-shrink: 0;
}

.count-badge,
.product-count {
    background: #f1f5f9;
    color: #64748b;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.divider {
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin: 18px 0;
}

.show-more-btn {
    color: #3b82f6;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding-left: 5px;
}

.audit-library-content {
    flex: 1;
    min-width: 0;
    position: relative;
}

.audit-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 22px 24px;
    margin-bottom: 16px;
    transition: box-shadow 0.2s, border-color 0.2s;
    position: relative;
}

.card-title {
    font-size: 22px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 9px;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 12px;
}

.tag {
    padding: 4px 11px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.tag-green  { background: #e8fff3; color: #50cd89; }
.tag-purple { background: #f8f5ff; color: #7239ea; }
.tag-blue   { background: #f1faff; color: #3e97ff; }

.card-info {
    font-size: 15px;
    color: #64748b;
    margin-bottom: 12px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
.info-icon { font-size: 15px; margin-top: 2px; flex-shrink: 0; }

.product-label {
    padding: 4px 12px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 11px;
}

.btn-inquiry {
    background: #f1faff;
    color: #3e97ff;
    padding: 8px 18px;
    border-radius: 7px;
    font-weight: 500;
    text-decoration: none;
    font-size: 13px;
    white-space: nowrap;
    position: absolute;
    right: 16px;
    bottom: 16px;
}
.btn-inquiry:hover {
    background: #3e97ff;
    color: #f1faff;
}

.card-title svg { color: #94a3b8; flex-shrink: 0; }
.info-icon svg { color: #94a3b8; }

@media (max-width: 768px) {
    .audit-container { flex-direction: column; }
    .audit-library-filters { width: 100%; }
}

#audit_library_table {
    border-collapse: collapse !important;
    border: none !important;
    width: 100%;
}
#audit_library_table tr,
#audit_library_table th,
#audit_library_table td {
    border: none !important;
    padding: 0 !important;
}

.table-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.dataTables_length,
.dataTables_info {
    font-size: 13px;
    padding: 0 !important;
}

.dataTables_paginate {
    margin-left: auto;
}
/* Hide text inside length menu */
.dataTables_length label {
    font-size: 0;   /* hides text */
}

/* Restore dropdown size */
.dataTables_length select {
    font-size: 13px;
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

#audit_library_table tbody tr:hover,
#audit_library_table tbody tr:hover td {
    background-color: transparent !important;
    box-shadow: none !important;
}

#audit_library_table thead {
    display: none !important;
}

/* Pagination wrapper */
.dataTables_wrapper .dataTables_paginate {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
}

/* All buttons (Prev, Next, numbers) */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 6px;
    color: #5e6278 !important;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Hover */
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #f5f8ff !important;
    border-color: #d1d7ff;
    color: #3e97ff !important;
}

/* Active page */
.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #3e97ff !important;
    border-color: #3e97ff !important;
    color: #ffffff !important;
}

/* Disabled (Previous / Next inactive) */
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: #f5f6f8 !important;
    border-color: #e4e6ef !important;
    color: #a1a5b7 !important;
}

/* Remove default focus outline */
.dataTables_wrapper .dataTables_paginate .paginate_button:focus {
    outline: none !important;
    box-shadow: none !important;
}

.table-loader {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    display: none;
}

.loader-box {
    text-align: center;
    padding: 90px 16px;
    background: #fff;
    border: 1px solid #e4e6ef;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.spinner {
    width: 18px;
    height: 18px;
    margin: 0 auto 8px;
    border: 2px solid #3e97ff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

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