/***************************************
 * SHARED COMPONENT STYLES
 * Core UI components used across multiple pages
 ***************************************/

/* Import CSS variables */
@import url('variables.css');

/***************************************
 * 1. CARDS & CONTAINERS
 ***************************************/

/*additional*/
/* Override body styling for theme compatibility */
body {
    background: var(--background);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--background);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    min-height: 100vh;
}

/* Light green border and text styling for scanned serials */
.scanned-border {
    border: 2px solid var(--success-color) !important;
    border-radius: 12px;
    background-color: rgba(16, 185, 129, 0.1);
}

    .scanned-border .scanned-serial-number {
        color: var(--success-color) !important;
        font-weight: 600;
    }

/* Smooth transition for border changes */
.scanned-serial-item {
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

/***************************************
 * TAB BLOCKING OVERLAY
 ***************************************/
.tab-blocking-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.tab-blocking-modal {
    background: var(--surface);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-width: 500px;
    width: 90%;
    margin: 20px;
    animation: slideUp 0.3s ease;
}

.tab-blocking-content {
    padding: 40px 30px;
    text-align: center;
}

.tab-blocking-icon {
    font-size: 3rem;
    color: #f59e0b;
    margin-bottom: 20px;
}

.tab-blocking-content h3 {
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.tab-blocking-content p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 30px;
}

.tab-blocking-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.tab-blocking-actions .btn {
    min-width: 120px;
    padding: 12px 24px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.tab-blocking-content small {
    display: block;
    margin-top: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
    opacity: 0.7;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dark theme adjustments for tab blocking */
[data-bs-theme="dark"] .tab-blocking-modal {
    background: var(--surface-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .tab-blocking-content h3 {
    color: var(--text-dark);
}

[data-bs-theme="dark"] .tab-blocking-content p {
    color: var(--text-muted-dark);
}

[data-bs-theme="dark"] .tab-blocking-content small {
    color: var(--text-muted-dark);
}

/* Header Enhancement */
.premium-header {
    background: linear-gradient(145deg, var(--card) 0%, var(--card-lighter) 100%);
    border-radius: 20px;
    padding: 24px 32px;
    margin-bottom: 32px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

    .premium-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(45deg, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
        pointer-events: none;
    }

.header-content {
    position: relative;
    z-index: 2;
}

.action-group {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.premium-btn {
    position: relative;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

    .premium-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.5s ease;
    }

    .premium-btn:hover::before {
        left: 100%;
    }

.btn-start {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

    .btn-start:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
        color: white;
    }

    .btn-start:disabled {
        opacity: 0.6;
        transform: none;
        cursor: not-allowed;
    }

.btn-submit {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

    .btn-submit:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
        color: white;
    }

    .btn-submit:disabled {
        opacity: 0.6;
        transform: none;
        cursor: not-allowed;
    }

.btn-config {
    background: var(--glass-card);
    color: var(--text);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

    .btn-config:hover {
        background: var(--glass-hover);
        transform: translateY(-1px);
        color: var(--text);
    }

.btn-demo {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.3);
    backdrop-filter: blur(10px);
}

    .btn-demo:hover {
        background: rgba(245, 158, 11, 0.2);
        transform: translateY(-1px);
        color: var(--warning-color);
    }

.btn-warning {
    background: var(--warning-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(var(--warning-color-rgb), 0.4);
}

    .btn-warning:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(var(--warning-color-rgb), 0.5);
        color: white;
    }

/* Stats Enhancement */
.stats-container {
    display: flex;
    gap: 20px;
    align-items: center;
}

.stat-card {
    background: var(--glass-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    min-width: 120px;
}

    .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

    .stat-icon::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.5s ease;
    }

    .stat-icon:hover::before {
        left: 100%;
    }

.stat-card:hover .stat-icon {
    transform: translateY(-2px) scale(1.05);
}

.stat-icon.progress-icon {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

    .stat-icon.progress-icon:hover {
        background: rgba(139, 92, 246, 0.2);
        box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
    }

.stat-icon.total-icon {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

    .stat-icon.total-icon:hover {
        background: rgba(59, 130, 246, 0.2);
        box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
    }

.stat-icon.valid-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

    .stat-icon.valid-icon:hover {
        background: rgba(16, 185, 129, 0.2);
        box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
    }

.stat-icon.invalid-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

    .stat-icon.invalid-icon:hover {
        background: rgba(239, 68, 68, 0.2);
        box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
    }

.stat-info {
    flex: 1;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-dim);
}

/* Content Cards */
.content-card {
    background: linear-gradient(145deg, var(--card) 0%, var(--card-lighter) 100%);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    height: calc(100vh - 280px);
    min-height: 400px;
    max-height: 800px;
    display: flex;
    flex-direction: column;
}

    .content-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    }

.content-header {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.content-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    min-width: 0; /* Allows flex items to shrink */
}

.search-group {
    position: relative;
    min-width: 180px;
    flex: 1;
    max-width: 250px;
}

.search-input {
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 8px 12px 8px 36px;
    color: var(--text);
    font-size: 14px;
    width: 100%;
}

    .search-input:focus {
        background: var(--glass-hover);
        border-color: var(--primary-color);
        outline: none;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        color: var(--text);
    }

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 14px;
}

.btn-clear {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger-color);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

    .btn-clear:hover:not(:disabled) {
        background: rgba(239, 68, 68, 0.2);
        transform: translateY(-1px);
        color: var(--danger-color);
    }

    .btn-clear:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

/* Items Container */
.items-container {
    padding: 12px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0; /* Important for flex item to shrink */
}

/* Detail Items */
.detail-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-xs);
}

    .detail-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: var(--primary-color);
        transform: scaleY(0);
        transition: transform 0.3s ease;
    }

    .detail-item:hover::before {
        transform: scaleY(1);
    }

    .detail-item:hover {
        background: var(--glass-hover);
        border-color: var(--primary-color);
        transform: translateX(4px);
        cursor: pointer;
        box-shadow: var(--shadow-md);
    }

.detail-item-left {
    flex: 1;
}

.detail-item-sku {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
}

.detail-item-uom {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.detail-item-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-status-badge {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: right;
    min-width: 90px;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.detail-status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .detail-status-pending::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.5s ease;
    }

    .detail-status-pending:hover {
        background: rgba(245, 158, 11, 0.2);
        transform: translateY(-1px);
        color: var(--warning-color);
    }

        .detail-status-pending:hover::before {
            left: 100%;
        }

.detail-status-scanned {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .detail-status-scanned::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.5s ease;
    }

    .detail-status-scanned:hover {
        background: rgba(16, 185, 129, 0.2);
        transform: translateY(-1px);
        color: var(--success-color);
    }

        .detail-status-scanned:hover::before {
            left: 100%;
        }

    .detail-status-scanned.has-scanned {
        background: rgba(16, 185, 129, 0.2);
        box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
        border: 1px solid rgba(16, 185, 129, 0.5);
    }

.detail-status-label {
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

.detail-item-overlay {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.detail-item:hover .detail-item-overlay {
    opacity: 1;
}

/* Invalid Items */
.invalid-item {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .invalid-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: var(--danger-color);
        transform: scaleY(0);
        transition: transform 0.3s ease;
    }

    .invalid-item:hover::before {
        transform: scaleY(1);
    }

    .invalid-item:hover {
        background: rgba(239, 68, 68, 0.15);
        border-color: var(--danger-color);
        transform: translateX(4px);
    }

.invalid-item-left {
    flex: 1;
}

.invalid-item-serial {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--text);
}

.invalid-item-sku .badge {
    background: rgba(100, 116, 139, 0.3) !important;
    color: var(--text-dim);
    border: 1px solid rgba(100, 116, 139, 0.5);
}

.reason-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.reason-not-registered {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.reason-invalid-sku {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.reason-received-before {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.reason-not-in-order {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}

    .empty-state i {
        font-size: 4rem;
        margin-bottom: 16px;
        opacity: 0.3;
    }

    .empty-state h6 {
        margin-bottom: 8px;
        font-weight: 600;
    }

.invalid-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-dim);
}

    .invalid-empty-state i {
        font-size: 4rem;
        margin-bottom: 16px;
        color: var(--success-color);
        opacity: 0.8;
    }

/* Modal Enhancements */
.modal-content {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    color: var(--text);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--primary-color);
}

    .modal-header.bg-danger {
        background: var(--danger-gradient);
    }

.modal-body {
    background: var(--surface);
}

.modal-footer {
    background: var(--surface);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.rfid-animation {
    margin: 40px 0;
    text-align: center;
}

.rfid-icon {
    font-size: 5rem;
    color: var(--primary-color);
    animation: rfid-pulse 2s infinite;
}

@@keyframes rfid-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.7;
    }
}

.manual-entry {
    background: var(--glass-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-xs);
}

/* Form Controls */
.form-control {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text);
    border-radius: 8px;
    font-family: inherit;
}

    .form-control:focus {
        background: var(--input-bg);
        border-color: var(--input-focus);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        color: var(--text);
    }

    .form-control::placeholder {
        color: var(--text-dim);
    }

.form-select {
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text);
    border-radius: 8px;
    font-family: inherit;
}

    .form-select:focus {
        background: var(--input-bg);
        border-color: var(--input-focus);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        color: var(--text);
    }

/* Premium Select Styling */
.premium-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 8px 12px;
    color: var(--text);
    min-width: 120px;
    max-width: 140px;
    font-size: 14px;
    font-family: inherit;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

    .premium-select:focus {
        background: var(--glass-hover);
        border-color: var(--primary-color);
        outline: none;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        color: var(--text);
    }

    .premium-select option {
        background: var(--surface);
        color: var(--text);
        padding: 8px;
    }

/* Ensure all buttons use the same font family */
button, .btn {
    font-family: inherit;
}

/* Custom Scrollbar */
.items-container::-webkit-scrollbar {
    width: 6px;
}

.items-container::-webkit-scrollbar-track {
    background: var(--surface);
    border-radius: 3px;
}

.items-container::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

    .items-container::-webkit-scrollbar-thumb:hover {
        background: var(--text-dim);
    }

/* Responsive Design */
@@media (max-width: 1200px) {
    .content-card {
        height: calc(100vh - 320px);
    }
}

@@media (max-width: 992px) {
    .content-card {
        height: calc(100vh - 350px);
        margin-bottom: 20px;
    }
}

@@media (max-width: 768px) {
    .premium-header {
        padding: 20px;
        border-radius: 16px;
    }

    .action-group {
        flex-direction: column;
        align-items: stretch;
    }

    .premium-btn {
        justify-content: center;
    }

    .stats-container {
        flex-direction: column;
        gap: 12px;
    }

    .stat-card {
        width: 100%;
        justify-content: center;
    }

    .content-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .content-actions {
        justify-content: space-between;
        gap: 8px;
    }

    .search-group {
        min-width: 140px;
        max-width: 180px;
    }

    .btn-clear {
        min-width: 80px !important;
        padding: 6px 10px !important;
        font-size: 11px !important;
    }

    .content-card {
        height: calc(100vh - 400px);
        min-height: 300px;
        margin-bottom: 16px;
    }

    .row.g-4 {
        --bs-gutter-y: 1rem;
    }
}

@@media (max-width: 576px) {
    .content-card {
        height: calc(100vh - 450px);
        min-height: 250px;
    }

    .items-container {
        padding: 8px;
    }
}

/* Scanned Serial Items */
.scanned-serial-item {
    background: var(--glass-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
}

    .scanned-serial-item::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: var(--success-color);
        transform: scaleY(0);
        transition: transform 0.3s ease;
    }

    .scanned-serial-item:hover::before {
        transform: scaleY(1);
    }

    .scanned-serial-item:hover {
        background: var(--glass-hover);
        border-color: var(--success-color);
        transform: translateX(4px);
    }

.scanned-serial-left {
    flex: 1;
}

.scanned-serial-number {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--text);
}

.scanned-serial-epc {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.scanned-serial-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.scanned-serial-qty .badge {
    background: rgba(16, 185, 129, 0.2) !important;
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 600;
}

/* Animation for updating numbers */
.updating-number {
    animation: number-update 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@@keyframes number-update {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
        color: var(--primary-color);
        text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
    }

    100% {
        transform: scale(1);
    }
}

/* Enhanced icon animation when numbers update */
.stat-card.updating .stat-icon {
    animation: icon-pulse 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@@keyframes icon-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    }

    100% {
        transform: scale(1);
    }
}

/* Base card styling */
.card,
.dashboard-card {
    border-radius: var(--card-border-radius, 12px);
    border: none;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    background-color: var(--card);
}

.card:hover,
.dashboard-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

/* Card header */
.card-header,
.dashboard-card .card-header {
    background: var(--primary-gradient);
    color: white;
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
}

.card-header h4,
.card-header h5,
.dashboard-card .card-header h5 {
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    color: var(--header-text, white);
}

.card-header h5 i,
.dashboard-card .card-header h5 i {
    margin-right: 0.75rem;
    font-size: 1.2rem;
}

/* Card body */
.card-body,
.dashboard-card .card-body {
    padding: 1.5rem;
    background-color: var(--card);
    color: var(--text);
}

/* Summary card */
.summary-card {
    border-left: 5px solid var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.summary-card .card-title {
    display: flex;
    align-items: center;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text);
}

.summary-card .card-title i {
    margin-right: 0.75rem;
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Card header variants */
.chart-card .card-header {
    background: var(--info-gradient);
}

/***************************************
 * 2. STATISTICS COMPONENTS
 ***************************************/

/* Stats summary layout */
.stats-summary {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

/* Base stat box */
.stat-box {
    background-color: var(--card);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 0;
    border: 1px solid var(--border-color);
    height: 100%;
}

/* Colored accent bar for stat boxes */
.stat-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--primary-gradient);
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* Color variants for stat boxes */
.stat-box-primary::before { background: var(--primary-gradient); }
.stat-box-secondary::before { background: var(--secondary-gradient); }
.stat-box-success::before { background: var(--success-gradient); }
.stat-box-danger::before { background: var(--danger-gradient); }
.stat-box-warning::before { background: var(--warning-gradient); }
.stat-box-info::before { background: var(--info-gradient); }

/* Icon styling */
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Color variants for stat icons */
.stat-box-primary .stat-icon { color: var(--primary-color); }
.stat-box-secondary .stat-icon { color: var(--secondary-color); }
.stat-box-success .stat-icon { color: var(--success-color); }
.stat-box-danger .stat-icon { color: var(--danger-color); }
.stat-box-warning .stat-icon { color: var(--warning-color); }
.stat-box-info .stat-icon { color: var(--info-color); }

/* Text container */
.stat-info {
    flex: 1;
}

/* Value display */
.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.25rem;
    color: var(--text);
}

/* Label styling */
.stat-label {
    text-transform: uppercase;
    font-size: 0.85rem;
    color: var(--text-dim);
    font-weight: 500;
    margin-top: 0.35rem;
}

/***************************************
 * 3. FORM ELEMENTS
 ***************************************/

/* Common form styling */
.form-control {
    background-color: var(--input-bg);
    border: 2px solid var(--input-border);
    color: var(--text);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    transition: var(--transition-normal);
}

.form-control:focus {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 0.2rem rgba(51, 204, 255, 0.25);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-dim);
}

/* Form labels */
.form-label {
    color: var(--text);
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

.form-label.small {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.required-field::after {
    content: " *";
    color: var(--error-color);
    font-weight: bold;
}

/* Input groups */
.input-group-text {
    background-color: var(--input-bg);
    border: 2px solid var(--input-border);
    border-right: none;
    color: var(--text-dim);
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.input-group .form-control {
    border-left: none;
    margin-bottom: 0;
}

/* Checkboxes */
.form-check-input {
    background-color: var(--input-bg);
    border: 2px solid var(--input-border);
    width: 1.25rem;
    height: 1.25rem;
}

.form-check-input:checked {
    background-color: var(--info-color);
    border-color: var(--info-color);
}

.form-check-label {
    color: var(--text-dim);
    font-weight: 500;
}

/***************************************
 * 4. BUTTONS & ACTIONS
 ***************************************/

/* Button base */
.btn {
    border-radius: var(--border-radius);
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: var(--transition-normal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
}

.btn i {
    margin-right: 0.25rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Button variants */
.btn-primary {
    background: var(--primary-gradient);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background: var(--secondary-gradient);
    color: white;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-danger {
    background-color: var(--error-color);
    color: white;
}

.btn-warning {
    background-color: var(--warning-color);
    color: white;
}

.btn-outline-secondary {
    border: 1px solid var(--border-color);
    background-color: transparent;
    color: var(--text);
}

.btn-outline-secondary:hover {
    background-color: var(--card-darker);
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 1em;
}

/***************************************
 * 5. BADGES & STATUS INDICATORS
 ***************************************/

/* Status badge styling */
.badge {
    padding: 0.5em 0.75em;
    border-radius: 6px;
    font-weight: 500;
}

.badge-valid {
    background-color: var(--success-color);
}

.badge-invalid {
    background-color: var(--danger-color);
}

/***************************************
 * 6. TABLES & DATA DISPLAY
 ***************************************/

/* Table row interactions */
.tag-row {
    cursor: pointer;
    transition: all 0.2s ease;
}

.tag-row:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.tag-row.selected {
    background-color: rgba(var(--primary-color-rgb), 0.1);
}

/* Table container */
.table-responsive::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Sticky header */
.table-responsive .sticky-top {
    top: 0;
    z-index: 1020;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/***************************************
 * 7. PANELS & OVERLAYS
 ***************************************/

/* Sliding panel container */
.tag-details-panel {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100vh;
    background-color: var(--card);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1050;
    overflow-y: auto;
    border-left: 5px solid var(--primary-color);
}

.tag-details-panel.show {
    right: 0;
}

/* Panel header */
.tag-details-header {
    background: var(--primary-gradient);
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1;
}

.tag-details-content {
    padding: 1rem;
}

/* Close button */
.close-panel-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-panel-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Overlay */
.panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    display: none;
    pointer-events: none;
}

.panel-overlay.active {
    pointer-events: auto;
}

/* Detail rows (Waze-inspired) */
.details-rows {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-row {
    display: flex;
    align-items: center;
    background-color: var(--card-darker);
    padding: 0.85rem 1.25rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.detail-row:hover {
    transform: translateX(3px);
    box-shadow: var(--shadow-sm);
    border-left: 3px solid var(--info-color);
    padding-left: calc(1.25rem - 2px);
}

.detail-row strong {
    flex: 0 0 160px;
    font-weight: 600;
    color: var(--text-dim);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.detail-row strong i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
    color: var(--info-color);
}

.detail-row .badge {
    display: inline-block;
    padding: 0.5rem 0.85rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    background-color: var(--card);
    color: var(--text);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xs);
}

/***************************************
 * 8. ALERTS & NOTIFICATIONS
 ***************************************/

/* Alert styling */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.alert i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.alert-info {
    background-color: rgba(51, 204, 255, 0.1);
    border: 1px solid rgba(51, 204, 255, 0.2);
    color: var(--info-color);
}

.alert-warning {
    background-color: rgba(255, 204, 0, 0.1);
    border: 1px solid rgba(255, 204, 0, 0.2);
    color: var(--warning-color);
}

.alert-danger {
    background-color: rgba(255, 51, 51, 0.1);
    border: 1px solid rgba(255, 51, 51, 0.2);
    color: var(--error-color);
}

.alert-success {
    background-color: rgba(0, 204, 102, 0.1);
    border: 1px solid rgba(0, 204, 102, 0.2);
    color: var(--success-color);
}

/***************************************
 * 9. RESPONSIVE STYLES
 ***************************************/

/* Mobile adaptations */
@media (max-width: 992px) {
    .btn {
        padding: 0.625rem 1.25rem;
    }
    
    .card-header, .card-body {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .tag-details-panel {
        width: 100%;
        right: -100%;
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .detail-row strong {
        flex: 0 0 auto;
        margin-bottom: 0.25rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 576px) {
    .row .btn {
        min-width: 0;
        font-size: 1em;
        padding: 0.5rem 0.75rem;
    }
}

/* Dark mode overrides */
[data-bs-theme="dark"] .summary-card {
    background: var(--card-gradient-dark);
}

[data-bs-theme="dark"] .stat-box {
    background-color: var(--card-dark);
    border-color: var(--border-color-dark);
}

[data-bs-theme="dark"] .summary-card .card-title {
    border-bottom-color: var(--border-color-dark);
}

/***************************************
 * PREMIUM COMPONENTS
 ***************************************/

/* Premium Header */
.premium-header {
    background: linear-gradient(145deg, var(--card) 0%, var(--card-lighter) 100%);
    border-radius: 20px;
    padding: 24px 32px;
    margin-bottom: 32px;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.premium-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 2;
}

.action-group {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Premium Buttons */
.premium-btn {
    position: relative;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    font-family: inherit;
}

.premium-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.premium-btn:hover::before {
    left: 100%;
}

.btn-start {
    background: linear-gradient(135deg, var(--success-color) 0%, #047857 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-start:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
    color: white;
}

.btn-start:disabled {
    opacity: 0.6;
    transform: none;
    cursor: not-allowed;
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e40af 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
    color: white;
}

.btn-submit:disabled {
    opacity: 0.6;
    transform: none;
    cursor: not-allowed;
}

.btn-config {
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-config:hover {
    background: var(--card-lighter);
    transform: translateY(-1px);
    color: var(--text);
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Light mode specific styling for reader button */
@media (prefers-color-scheme: light) {
    .btn-config {
        background: rgba(0, 0, 0, 0.05);
        border: 1px solid rgba(0, 0, 0, 0.1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    
    .btn-config:hover {
        background: rgba(0, 0, 0, 0.08);
        border-color: var(--primary-color);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    }
}

/* Dark mode specific styling for reader button */
@media (prefers-color-scheme: dark) {
    .btn-config {
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    
    .btn-config:hover {
        background: rgba(255, 255, 255, 0.12);
        border-color: var(--primary-color);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    }
}

/* Manual theme class support */
[data-bs-theme="light"] .btn-config {
    background: rgba(0, 0, 0, 0.05) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: var(--text) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

[data-bs-theme="light"] .btn-config:hover {
    background: rgba(0, 0, 0, 0.08) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
}

[data-bs-theme="dark"] .btn-config {
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: var(--text) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

[data-bs-theme="dark"] .btn-config:hover {
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

.btn-demo {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.3);
    backdrop-filter: blur(10px);
}

.btn-demo:hover {
    background: rgba(245, 158, 11, 0.2);
    transform: translateY(-1px);
    color: var(--warning-color);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
    color: white;
}

/* Stats Container */
.stats-container {
    display: flex;
    gap: 20px;
    align-items: center;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    min-width: 120px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.stat-card:hover .stat-icon {
    transform: translateY(-2px) scale(1.05);
}

/* Enhanced animation when numbers update */
.stat-card.updating .stat-icon {
    animation: icon-pulse 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes icon-pulse {
    0% { 
        transform: scale(1);
    }
    50% { 
        transform: scale(1.1);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    }
    100% { 
        transform: scale(1);
    }
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.stat-icon:hover::before {
    left: 100%;
}

.stat-card:hover .stat-icon {
    transform: translateY(-2px) scale(1.05);
}

.stat-icon.progress-icon {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.stat-icon.progress-icon:hover {
    background: rgba(139, 92, 246, 0.2);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

.stat-icon.total-icon {
    background: rgba(59, 130, 246, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.stat-icon.total-icon:hover {
    background: rgba(59, 130, 246, 0.2);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

.stat-icon.valid-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.stat-icon.valid-icon:hover {
    background: rgba(16, 185, 129, 0.2);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.stat-icon.invalid-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.stat-icon.invalid-icon:hover {
    background: rgba(239, 68, 68, 0.2);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
}

.stat-info {
    flex: 1;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-dim);
}

/* Content Cards */
.content-card {
    background: linear-gradient(145deg, var(--card) 0%, var(--card-lighter) 100%);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    height: calc(100vh - 280px);
    min-height: 400px;
    max-height: 800px;
    display: flex;
    flex-direction: column;
}

.content-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.content-header {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.content-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    min-width: 0;
}

/* Search Components */
.search-group {
    position: relative;
    min-width: 180px;
    flex: 1;
    max-width: 250px;
}

.search-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 12px 8px 36px;
    color: var(--text);
    font-size: 14px;
    width: 100%;
    font-family: inherit;
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    color: var(--text);
}

.search-input::placeholder {
    color: var(--text-dim);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 14px;
}

/* Premium Select */
.premium-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 8px 12px;
    color: var(--text);
    min-width: 120px;
    max-width: 140px;
    font-size: 14px;
    font-family: inherit;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.premium-select:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    color: var(--text);
}

.premium-select option {
    background: var(--surface, var(--card));
    color: var(--text);
    padding: 8px;
}

/* Clear Button */
.btn-clear {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--danger-color);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-clear:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-1px);
    color: var(--danger-color);
}

.btn-clear:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Items Container */
.items-container {
    padding: 12px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
}

/* Animation for updating numbers */
.updating-number {
    animation: number-update 0.5s ease;
}

@keyframes number-update {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); color: var(--primary-color); }
    100% { transform: scale(1); }
}

/* Premium Notifications/Toasts */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 350px;
}

#notification-container .toast, .toast-container .toast {
    background: linear-gradient(145deg, var(--card) 0%, var(--card-lighter) 100%) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(10px) !important;
    margin-bottom: 12px;
    overflow: hidden;
    position: relative;
}

#notification-container .toast::before, .toast-container .toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

#notification-container .toast.bg-success, .toast-container .toast.bg-success {
    border-left: 4px solid var(--success-color) !important;
}

#notification-container .toast.bg-success::before, .toast-container .toast.bg-success::before {
    background: linear-gradient(45deg, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
}

#notification-container .toast.bg-danger, .toast-container .toast.bg-danger {
    border-left: 4px solid var(--danger-color) !important;
}

#notification-container .toast.bg-danger::before, .toast-container .toast.bg-danger::before {
    background: linear-gradient(45deg, rgba(239, 68, 68, 0.1) 0%, transparent 50%);
}

#notification-container .toast.bg-warning, .toast-container .toast.bg-warning {
    border-left: 4px solid var(--warning-color) !important;
}

#notification-container .toast.bg-warning::before, .toast-container .toast.bg-warning::before {
    background: linear-gradient(45deg, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
}

#notification-container .toast.bg-info, .toast-container .toast.bg-info {
    border-left: 4px solid var(--info-color) !important;
}

#notification-container .toast.bg-info::before, .toast-container .toast.bg-info::before {
    background: linear-gradient(45deg, rgba(8, 145, 178, 0.1) 0%, transparent 50%);
}

.toast-body {
    color: var(--text) !important;
    font-weight: 500 !important;
    padding: 16px 20px !important;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
}

#notification-container .toast .btn-close, .toast-container .toast .btn-close {
    background: none !important;
    color: var(--text-dim) !important;
    opacity: 0.7 !important;
    position: relative;
    z-index: 3;
    margin: 8px 12px 8px 0 !important;
    transition: all 0.3s ease !important;
}

#notification-container .toast .btn-close:hover, .toast-container .toast .btn-close:hover {
    opacity: 1 !important;
    transform: scale(1.1) !important;
}

/* Animation for new toasts */
#notification-container .toast.show, .toast-container .toast.show {
    animation: toastSlideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes toastSlideIn {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Custom Scrollbar */
.items-container::-webkit-scrollbar,
.scanned-serials-container::-webkit-scrollbar {
    width: 6px;
}

.items-container::-webkit-scrollbar-track,
.scanned-serials-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.items-container::-webkit-scrollbar-thumb,
.scanned-serials-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.items-container::-webkit-scrollbar-thumb:hover,
.scanned-serials-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Reason Badges for Invalid Items */
.reason-badge {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.8em;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.reason-not-registered {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.reason-invalid-sku {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.reason-received-before {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.reason-issued-before {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.reason-not-in-order {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/***************************************
 * DETAIL ITEMS WITH GLASS EFFECTS
 ***************************************/

/* Detail Items */
.detail-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.detail-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.detail-item:hover::before {
    transform: scaleY(1);
}

.detail-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
    transform: translateX(4px);
    cursor: pointer;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.detail-item-left {
    flex: 1;
}

.detail-item-sku {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--text);
}

.detail-item-uom {
    font-size: 0.85rem;
    color: var(--text-dim);
}

.detail-item-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-status-badge {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: right;
    min-width: 90px;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.detail-status-pending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-color);
    border: 1px solid rgba(245, 158, 11, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.detail-status-pending::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.detail-status-pending:hover {
    background: rgba(245, 158, 11, 0.25);
    transform: translateY(-1px);
    color: var(--warning-color);
}

.detail-status-pending:hover::before {
    left: 100%;
}

.detail-status-scanned {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.3);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.detail-status-scanned::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.detail-status-scanned:hover {
    background: rgba(16, 185, 129, 0.25);
    transform: translateY(-1px);
    color: var(--success-color);
}

.detail-status-scanned:hover::before {
    left: 100%;
}

.detail-status-scanned.has-scanned {
    background: rgba(16, 185, 129, 0.25);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
    border: 1px solid rgba(16, 185, 129, 0.5);
}

.detail-status-label {
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

.detail-item-overlay {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.detail-item:hover .detail-item-overlay {
    opacity: 1;
}

/***************************************
 * INVALID ITEMS WITH GLASS EFFECTS
 ***************************************/

/* Invalid Items */
.invalid-item {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.invalid-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--danger-color);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.invalid-item:hover::before {
    transform: scaleY(1);
}

.invalid-item:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--danger-color);
    transform: translateX(4px);
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.25);
}

.invalid-item-left {
    flex: 1;
}

.invalid-item-serial {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--text);
}

.invalid-item-sku .badge {
    background: rgba(100, 116, 139, 0.3) !important;
    color: var(--text-dim);
    border: 1px solid rgba(100, 116, 139, 0.5);
} 