body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f5f5f5;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.2rem;
    background: #3A6EA5;
    color: white;
}

.topbar h1 {
    margin: 0;
    font-size: 1.2rem;
}

.topbar nav a {
    color: white;
    text-decoration: none;
    margin-left: 1rem;
    font-size: 0.95rem;
}

.topbar nav a:hover {
    text-decoration: underline;
}

.content {
    max-width: 960px;
    margin: 1.5rem auto;
    padding: 0 1rem;
}

.card {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

form .row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

input[type="text"],
input[type="date"],
input[type="time"],
textarea {
    width: 100%;
    padding: 0.4rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    background: #3A6EA5;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background: #2d5781;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

th, td {
    padding: 0.4rem;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.footer {
    text-align: center;
    padding: 1rem;
    color: #777;
    font-size: 0.8rem;
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
}

.matrix-table th,
.matrix-table td {
    padding: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.matrix-table th {
    text-align: left;
    background: #f5f7fb;
}

.matrix-table td.center {
    text-align: center;
}

.rule-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    background: #fff;
}

.rule-header {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:0.5rem;
}

.rule-tags {
    margin-top:0.5rem;
    display:flex;
    flex-wrap:wrap;
    gap:0.25rem;
}

.tag-chip {
    padding: 0.2rem 0.5rem;
    border-radius:999px;
    border:1px solid #3A6EA5;
    font-size:0.8rem;
    color:#3A6EA5;
    text-decoration:none;
}
.tag-chip:hover {
    background:#3A6EA5;
    color:#fff;
}
