/* Discrepancy-style table loading (shimmer skeleton + navy spinner). */

@keyframes disc-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
@keyframes disc-spin {
    to { transform: rotate(360deg); }
}
@keyframes disc-pulse-dot {
    0%, 80%, 100% { transform: translateY(0); opacity: .35; }
    40%           { transform: translateY(-6px); opacity: 1; }
}
@keyframes disc-scan-line {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.disc-sk {
    background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 35%, #f8fafc 50%, #e2e8f0 65%, #f1f5f9 100%);
    background-size: 200% 100%;
    animation: disc-shimmer 1.6s ease-in-out infinite;
    border-radius: 5px;
}
.disc-sk-count {
    display: inline-block;
    width: 48px;
    height: 28px;
    color: transparent !important;
    border-radius: 6px;
}
.disc-sk-stat {
    display: block;
    width: 100%;
    min-width: 48px;
    height: 28px;
    color: transparent !important;
    border-radius: 6px;
}
.disc-sk-stat-lg { min-width: 100%; height: 28px; }
.disc-sk-inline {
    display: inline-block;
    min-width: 72px;
    height: 14px;
    color: transparent !important;
    vertical-align: middle;
    border-radius: 4px;
}

.disc-loading-table { padding: 8px 0 4px; overflow: hidden; }
.disc-loading-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 16px 16px;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
    overflow: hidden;
}
.disc-loading-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(30,58,95,.06), transparent);
    animation: disc-scan-line 2s ease-in-out infinite;
}
.disc-spinner {
    width: 22px;
    height: 22px;
    border: 2.5px solid #e2e8f0;
    border-top-color: #1e3a5f;
    border-radius: 50%;
    animation: disc-spin .7s linear infinite;
    flex-shrink: 0;
}
.disc-loading-text { font-size: .82rem; font-weight: 600; color: #64748b; }
.disc-loading-dots { display: inline-flex; gap: 4px; margin-left: 2px; vertical-align: middle; }
.disc-loading-dots span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #94a3b8;
    animation: disc-pulse-dot 1.2s ease-in-out infinite;
}
.disc-loading-dots span:nth-child(2) { animation-delay: .15s; }
.disc-loading-dots span:nth-child(3) { animation-delay: .3s; }

.disc-sk-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    border-bottom: 1px solid #f8fafc;
}
.disc-sk-row:nth-child(even) .disc-sk { animation-delay: .12s; }
.disc-sk-row:nth-child(3n)   .disc-sk { animation-delay: .24s; }
.disc-sk-num    { width: 18px;  height: 12px; flex-shrink: 0; }
.disc-sk-id     { width: 52px;  height: 12px; flex-shrink: 0; }
.disc-sk-name   { flex: 2;     height: 14px; min-width: 80px; }
.disc-sk-batch  { flex: 1;     height: 12px; min-width: 60px; }
.disc-sk-amt    { width: 72px;  height: 12px; flex-shrink: 0; }
.disc-sk-sm     { width: 44px;  height: 12px; flex-shrink: 0; }
.disc-sk-action { width: 56px;  height: 24px; flex-shrink: 0; border-radius: 4px; }

.disc-table-loader-wrap { position: relative; min-height: 280px; }
.disc-table-loader {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: rgba(255,255,255,.94);
    border-radius: .5rem;
    overflow: hidden;
}
.disc-table-loader.d-none { display: none !important; }

.disc-dt-wrapper { position: relative; min-height: 220px; }
.disc-dt-wrapper > .disc-table-loader-auto {
    position: absolute;
    inset: 0;
    z-index: 10;
    background: rgba(255,255,255,.94);
    border-radius: .25rem;
    overflow: hidden;
}

div.dataTables_processing { display: none !important; }

.loading-ph { text-align: center; padding: 40px; color: #94a3b8; font-size: .9rem; }

.disc-modal-loading { padding: 8px 4px; }
.disc-modal-sk-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; }
@media (max-width: 768px) { .disc-modal-sk-grid { grid-template-columns: 1fr; } }
.disc-modal-sk-card { border: 1px solid #e2e8f0; border-radius: .5rem; padding: 16px; }
.disc-modal-sk-line { height: 12px; margin-bottom: 10px; }
.disc-modal-sk-line.w60 { width: 60%; }
.disc-modal-sk-line.w80 { width: 80%; }
.disc-modal-sk-line.w40 { width: 40%; }
.disc-modal-sk-line.w100 { width: 100%; }
.disc-modal-sk-line:last-child { margin-bottom: 0; }
