body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background: #f7f8fb;
    color: #222;
    margin: 0;
}

header {
    background: #0f5ea8;
    color: #fff;
    padding: 1rem 2rem;
}

header h1 {
    margin: 0 0 0.5rem;
}

nav a {
    color: #fff;
    margin-right: 1rem;
    text-decoration: none;
    font-weight: 600;
}

main {
    /*max-width: 900px;*/
    margin: 1.5rem auto;
    padding: 0 1rem;
}

form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 500px;
}

input,
textarea,
button {
    padding: 0.6rem;
    font-size: 1rem;
}

button {
    background: #0f5ea8;
    color: #fff;
    border: none;
    cursor: pointer;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th,
td {
    border: 1px solid #ddd;
    padding: 0.6rem;
    text-align: left;
    vertical-align: top;
}

.messages {
    margin-bottom: 1rem;
}

.message {
    padding: 0.7rem;
    border-radius: 4px;
}

.message.success {
    background: #e6f7e9;
    color: #1d6b28;
}

.message.error {
    background: #fde9e9;
    color: #8a1f1f;
}

.muted-row {
    background: #f1f1f1;
    color: #6f6f6f;
}

.similarity-guide {
    background: #fff;
    border: 1px solid #ddd;
    border-left: 4px solid #0f5ea8;
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
}

.similarity-guide p {
    margin: 0 0 0.5rem;
    font-weight: 600;
}

.similarity-guide ul {
    margin: 0;
    padding-left: 1.2rem;
}

.similarity-guide li {
    margin-bottom: 0.25rem;
}

.similarity-very-strong {
    color: #176b2c;
    font-weight: 700;
}

.similarity-strong {
    color: #3b7f22;
    font-weight: 700;
}

.similarity-moderate {
    color: #9a6b00;
    font-weight: 700;
}

.similarity-weak {
    color: #a43434;
    font-weight: 700;
}

.non-overlap-tables {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    align-items: flex-start;
}

.non-overlap-tables > article {
    min-width: 0;
}

.non-overlap-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.group-card {
    background: #fff;
    border: 1px solid #ddd;
    padding: 1rem;
    margin: 1rem 0;
}

.group-card h4 {
    margin-top: 0;
}

.group-stats {
    margin-top: 0;
    color: #555;
}

.selected-product-row {
    background: #eef6ff;
}
