.review-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', sans-serif;
}

.review-window {
    background: #fff;
    width: 98vw;
    height: 94vh;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.review-header {
    padding: 1.5rem 2rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.header-top-row h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #1e293b;
    font-weight: 800;
}

.header-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.review-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.sum-pill {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid transparent;
}

.sum-active { background: #dcfce7; color: #166534; }
.sum-dup { background: #fef9c3; color: #854d0e; }
.sum-excl { background: #fee2e2; color: #991b1b; }

.review-search-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-grow: 1;
    justify-content: flex-end;
}

.review-search {
    width: 100%;
    max-width: 400px;
    padding: 10px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    outline: none;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.review-search:focus { border-color: #3b82f6; }

.review-toolbar {
    padding: 1.5rem 2rem;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 30px;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.filter-group-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.filter-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    margin-right: 4px;
    letter-spacing: 0.025em;
}

.filter-pill {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    color: #475569;
    transition: all 0.2s;
}

.filter-pill:hover { background: #e2e8f0; }
.filter-pill.active {
    background: #3b82f6;
    color: #fff;
    border-color: #2563eb;
}

.filter-select {
    padding: 7px 12px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    background: #fff;
    cursor: pointer;
    outline: none;
    min-width: 180px;
}

.review-table-container {
    flex-grow: 1;
    overflow: auto;
    background: #fff;
}

.review-table {
    width: 100%;
    min-width: 2200px;
    border-collapse: separate;
    border-spacing: 0;
}

.review-table th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    padding: 14px 1rem;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #64748b;
    border-bottom: 2px solid #e2e8f0;
    z-index: 10;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

.review-table th .header-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.review-table th i { 
    font-size: 0.7rem; 
    color: #cbd5e1; 
}

.review-table th.sort-active { 
    color: #1e293b; 
    background: #f1f5f9; 
}

.review-table th.sort-active i { 
    color: #3b82f6; 
}

.review-table td {
    padding: 10px 1rem;
    font-size: 0.85rem;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    white-space: nowrap;
}

.review-table input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.review-table input[type="checkbox"]:focus {
    outline: none !important;
    box-shadow: none !important;
}

.row-active { background-color: #ffffff; }
.row-duplicate { background-color: #fffdf5; }
.row-excluded { background-color: #fffafa; }

.status-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-active { color: #16a34a; border: 1px solid #bbf7d0; background: #f0fdf4; }
.badge-duplicate { color: #ca8a04; border: 1px solid #fef08a; background: #fffbeb; }
.badge-excluded { color: #dc2626; border: 1px solid #fecaca; background: #fef2f2; }

.review-footer {
    padding: 1.25rem 2rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}

.save-indicator {
    font-size: 0.8rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: auto;
    opacity: 0;
    transition: opacity 0.3s;
}
.save-indicator.visible { opacity: 1; }

.btn-review-close {
    background: #fff;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

.btn-review-export {
    background: #3b82f6;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
}

.tooltip-wrapper {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    width: 320px;
    background-color: #1e293b;
    color: #fff;
    text-align: left;
    border-radius: 12px;
    padding: 16px;
    position: absolute;
    z-index: 100;
    bottom: 140%;
    left: 50%;
    margin-left: -160px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.5;
    pointer-events: none;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}

.tooltip-wrapper:last-child .tooltip-text {
    left: auto;
    right: 0;
    margin-left: 0;
}

.tooltip-wrapper:last-child .tooltip-text::after {
    left: auto;
    right: 40px;
}

.tooltip-text b { 
    color: #60a5fa; 
    display: block; 
    margin-bottom: 6px; 
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #1e293b transparent transparent transparent;
}

.tooltip-wrapper:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.review-table tr:hover td { background-color: rgba(59, 130, 246, 0.03); }