* {
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, 'Iran Sans', system-ui, sans-serif;
}
body {
    background: #e9eef3;
    margin: 0;
    padding: 20px;
}
.container {
    max-width: 1400px;
    margin: auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.08);
    overflow-x: auto;
    padding: 1rem 1rem 1.5rem 1rem;
}
h1 {
    font-size: 1.6rem;
    margin: 0 0 0.25rem 0;
    color: #0a2b3e;
    text-align: right;
}
.sub {
    color: #2c5a6e;
    margin-bottom: 1.2rem;
    border-right: 4px solid #f39c12;
    padding-right: 12px;
    text-align: right;
}
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    background: #f8fafc;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid #e2edf2;
}
.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 110px;
    background: white;
    border-radius: 12px;
    padding: 6px 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.filter-group label {
    font-size: 0.7rem;
    font-weight: bold;
    color: #1e566b;
    margin-bottom: 4px;
}
.filter-group select, .filter-group input {
    border: 1px solid #cbdbe2;
    border-radius: 10px;
    padding: 8px 8px;
    font-size: 0.8rem;
    background: white;
    transition: 0.1s;
}
.filter-group select:focus, .filter-group input:focus {
    border-color: #f39c12;
    outline: none;
    box-shadow: 0 0 0 2px #fce4c2;
}
button.reset-btn {
    background: #eef2f5;
    border: 1px solid #cbdbe2;
    padding: 6px 14px;
    border-radius: 30px;
    font-weight: bold;
    color: #1e3b4a;
    cursor: pointer;
    transition: 0.2s;
    align-self: flex-end;
    margin-right: auto;
}
button.reset-btn:hover {
    background: #fdebd0;
    border-color: #f39c12;
}
.result-count {
    margin: 10px 0 16px 0;
    font-weight: bold;
    background: #eef2fa;
    display: inline-block;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    color: #004d66;
    text-align: right;
}
.table-wrapper {
    overflow-x: auto;
    border-radius: 14px;
    border: 1px solid #e2edf2;
    direction: ltr;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    direction: ltr;
}
th {
    background: #1f3e48;
    color: white;
    padding: 12px 6px;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    white-space: nowrap;
}
td {
    border-bottom: 1px solid #e0e9ef;
    padding: 10px 6px;
    text-align: center;
    vertical-align: middle;
    white-space: pre-wrap;
    word-break: break-word;
}
tr:hover td {
    background-color: rgba(0, 0, 0, 0.12) !important;
    transition: 0.1s;
}
.highlight-model {
    background-color: #ff9800;
    color: white;
    padding: 0 3px;
    border-radius: 8px;
    font-weight: bold;
}
.loading-msg {
    text-align: center;
    padding: 40px;
    font-size: 1.2rem;
    color: #555;
}
.protection-badge {
    display: inline-block;
    background-color: #e0e7ff;
    color: #1e3a8a;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 8px;
    margin: 2px 3px;
    border-radius: 20px;
    cursor: help;
    transition: 0.1s;
    border: 1px solid #b9c8ff;
}
.protection-badge:hover {
    background-color: #c7dafe;
    transform: scale(1.02);
}
.protection-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: white;
    border-radius: 12px;
    padding: 6px;
}
.protection-filter-badge {
    display: inline-block;
    background-color: #e2e8f0;
    color: #1e293b;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 4px 12px;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.1s;
    border: 1px solid #cbd5e1;
    user-select: none;
}
.protection-filter-badge.active {
    background-color: #1e3a8a;
    color: white;
    border-color: #1e3a8a;
}
.protection-filter-badge:hover {
    background-color: #b9c8ff;
    transform: scale(1.02);
}
.custom-tooltip {
    position: absolute;
    padding: 0 !important;
    overflow: visible;
    background: #1e293b;
    border-radius: 14px;
    border: 1px solid #3b82f6;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    max-width: 280px;
    z-index: 1000;
    pointer-events: none;
}

/* Header with rounded top corners */
.tooltip-header {
    background: #0f172a;
    color: #facc15;
    font-size: 1rem;
    font-weight: bold;
    padding: 8px 12px;
    margin: 0;
    text-align: center;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    border-bottom: 1px solid #334155;
}

.custom-tooltip hr {
    margin: 0;
    border: none;
    border-top: 1px solid #334155;
}

/* Description with LTR direction */
.tooltip-desc {
    padding: 10px 12px 10px 16px;
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #e2e8f0;
    border-left: 3px solid #facc15;
    background: #1e293b;
    border-radius: 0 0 12px 12px;
    direction: ltr;
    text-align: left;
}

/* Arrow for tooltip placed above (default) */
.custom-tooltip::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #1e293b;
    z-index: 1;
}

/* Arrow for tooltip placed below */
.custom-tooltip.tooltip-below::before {
    top: -6px;
    bottom: auto;
    border-top: none;
    border-bottom: 6px solid #1e293b;
}
@media (max-width: 780px) {
    .filter-group { min-width: 85px; }
    th, td { font-size: 0.7rem; padding: 7px 3px; }
}