body {
    font-family: Arial, sans-serif;
    margin: 30px;
    background: #f6f7fb;
}

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

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.brand-logo {
    height: 72px;
    width: auto;
    display: block;
}

.controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

button,
select {
    border: none;
    background: #222;
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
}

button:disabled {
    opacity: 0.6;
    cursor: default;
}

select {
    min-width: 220px;
    min-height: 120px;
    background: white;
    color: #222;
    border: 1px solid #ccc;
}

.filter-panel {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-weight: bold;
    color: #333;
}

.message-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-card {
    background: white;
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 10px solid #ccc;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.message-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.message-card.new-card {
    animation: popIn 0.55s ease;
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: translateY(-18px) scale(0.96);
    }
    60% {
        opacity: 1;
        transform: translateY(4px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 10px;
}

.device-block {
    display: flex;
    align-items: center;
    gap: 14px;
}

.device-icon {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
}

.device-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.device {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    line-height: 1.1;
}

.device-serial {
    font-size: 14px;
    font-weight: bold;
    color: #666;
    line-height: 1.1;
}

.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    color: #222;
}

.badge-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.validation-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    color: #222;
    background: #e6e6e6;
}

.validation-valid {
    background: #d9f7df;
    color: #165b2f;
}

.validation-warning {
    background: #fff3cd;
    color: #7a5a00;
}

.validation-invalid {
    background: #f8d7da;
    color: #842029;
}

.validation-not_validated {
    background: #e9ecef;
    color: #495057;
}

.row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 6px;
}

.field {
    font-size: 15px;
    color: #333;
}

a {
    text-decoration: none;
    color: inherit;
}

.card-link {
    display: block;
}

.hint {
    color: #666;
    font-size: 14px;
}

.bottom-actions {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

#loadMoreButton {
    min-width: 180px;
}

#loadMoreStatus {
    text-align: center;
    color: #666;
    margin-top: 12px;
    font-size: 14px;
}

.validation-filter-group {
    min-width: 180px;
}

.validation-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: white;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 10px 12px;
    min-width: 160px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: normal !important;
    color: #333;
    cursor: pointer;
}

.checkbox-row input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
}

.action-filter-group {
    justify-content: flex-end;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
