* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

header .logo {
    height: 50px;
    width: auto;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

.info-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.info-section p {
    margin: 0 0 10px 0;
    line-height: 1.6;
}

.info-section p:last-child {
    margin-bottom: 0;
}

.doc-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.doc-link:hover {
    text-decoration: underline;
}

.loading, .error {
    text-align: center;
    padding: 40px;
    font-size: 1.2rem;
}

.error {
    background-color: #fee;
    color: #c33;
    border-radius: 5px;
    border: 1px solid #c33;
}

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

.stats {
    background: white;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    color: #667eea;
    flex: 1;
}

.toggle-container {
    display: flex;
    gap: 10px;
}

.toggle-btn {
    padding: 10px 20px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn:hover {
    background: #f0f0ff;
}

.toggle-btn.active {
    background: #667eea;
    color: white;
}

.toggle-btn.active:hover {
    background: #5568d3;
}

.filters {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    background: white;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    max-width: 300px;
}

.filter-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #555;
}

.multi-select {
    position: relative;
}

.select-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.select-header:hover {
    border-color: #667eea;
}

.select-header span:first-child {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.arrow {
    margin-left: 10px;
    font-size: 0.8rem;
    color: #667eea;
}

.select-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #667eea;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.select-dropdown.open {
    display: block;
}

.filter-option {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.filter-option:hover {
    background-color: #f0f0ff;
}

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

.filter-option label {
    cursor: pointer;
    flex: 1;
    font-weight: normal;
}

.text-filter {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    width: 100%;
}

.text-filter:focus {
    outline: none;
    border-color: #667eea;
}

.text-filter::placeholder {
    color: #aaa;
}

.alert-summary-display {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: #f0f0ff;
    border: 2px solid #667eea;
    border-radius: 5px;
}

.alert-summary-display span {
    font-weight: 600;
    color: #667eea;
}

.remove-filter-btn {
    background: #667eea;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: background-color 0.2s;
}

.remove-filter-btn:hover {
    background: #5568d3;
}

.date-filter {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.date-filter:focus {
    outline: none;
    border-color: #667eea;
}

.clear-btn {
    padding: 10px 20px;
    border: 2px solid #d32f2f;
    background: white;
    color: #d32f2f;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    height: fit-content;
}

.clear-btn:hover {
    background: #d32f2f;
    color: white;
}

table {
    width: 100%;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-collapse: collapse;
}

/* Remove border radius from nested tables */
.details-cell table {
    border-radius: 0;
    box-shadow: none;
}

thead {
    background: #667eea;
    color: white;
}

thead th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

thead th:first-child {
    width: 40px;
}

thead th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.2s;
}

thead th.sortable:hover {
    background-color: #5568d3;
}

/* Nested table headers should not have hover effect */
.details-cell table thead th {
    cursor: default !important;
    user-select: none;
    transition: none !important;
    background-color: #8b9ff5 !important;
}

.details-cell table thead tr:hover th {
    background-color: #8b9ff5 !important;
}

.details-cell table thead tr th:hover {
    background-color: #8b9ff5 !important;
}

/* Remove rounded corners from nested table headers */
.details-cell table thead th:first-child {
    border-top-left-radius: 0 !important;
}

.details-cell table thead th:last-child {
    border-top-right-radius: 0 !important;
}

thead th.sortable::after {
    content: ' ⇅';
    opacity: 0.3;
    font-size: 0.8rem;
}

thead th.sorted-asc::after {
    content: ' ↑';
    opacity: 1;
}

thead th.sorted-desc::after {
    content: ' ↓';
    opacity: 1;
}

tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.2s;
}

tbody tr:hover {
    background-color: #f9f9f9;
}

tbody tr.main-row {
    cursor: pointer;
}

tbody tr.main-row:hover {
    background-color: #f0f0ff;
}

tbody tr.group-header {
    background-color: #f5f5ff;
    font-weight: 600;
}

tbody tr.group-header:hover {
    background-color: #e8e8ff;
}

tbody td {
    padding: 12px 15px;
    font-size: 0.95rem;
}

tbody td.probe-cell {
    font-family: 'Courier New', Courier, monospace;
    white-space: pre;
}

.expand-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #667eea;
    padding: 5px;
    transition: transform 0.2s;
}

.expand-btn:hover {
    transform: scale(1.2);
}

.expand-btn.expanded {
    transform: rotate(90deg);
}

.details-row {
    display: none;
    background-color: #fafafa;
}

.details-row.visible {
    display: table-row;
}

.details-cell {
    padding: 20px 15px;
    border-top: 2px solid #667eea;
}

.details-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.detail-item {
    background: white;
    padding: 12px;
    border-radius: 5px;
    border-left: 3px solid #667eea;
}

.detail-label {
    font-weight: 600;
    color: #666;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.detail-value {
    color: #333;
    word-break: break-all;
}

.detail-value a {
    color: #667eea;
    text-decoration: none;
}

.detail-value a:hover {
    text-decoration: underline;
}

.bug-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.bug-link:hover {
    text-decoration: underline;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge.new {
    background-color: #e3f2fd;
    color: #1976d2;
}

.badge.fixed {
    background-color: #e8f5e9;
    color: #388e3c;
}

.badge.invalid {
    background-color: #ffebee;
    color: #d32f2f;
}

.badge.inactive {
    background-color: #f5f5f5;
    color: #757575;
}

.badge.duplicate {
    background-color: #fff3e0;
    color: #f57c00;
}

.badge.na {
    background-color: #eeeeee;
    color: #666;
}
