:root {
    color: #20242a;
    background: #f4f6f8;
    font-family: system-ui, sans-serif;
    line-height: 1.5;
}

* { box-sizing: border-box; }

body { margin: 0; }

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem max(1rem, calc((100% - 720px) / 2));
    background: #fff;
    border-bottom: 1px solid #dfe3e8;
}

.brand {
    color: inherit;
    font-weight: 700;
    text-decoration: none;
}

.header-actions { display: flex; align-items: center; gap: 1rem; }

.header-actions a { color: #2457d6; }

.page {
    width: min(720px, calc(100% - 2rem));
    margin: 3rem auto;
}

.card {
    padding: 2rem;
    background: #fff;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
}

.login-card { max-width: 420px; margin: auto; }

h1 { margin-top: 0; }

label { display: block; margin: 1rem 0 0.35rem; font-weight: 600; }

input, select {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #aeb6bf;
    border-radius: 4px;
    font: inherit;
}

textarea {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid #aeb6bf;
    border-radius: 4px;
    resize: vertical;
    font: inherit;
}

button {
    margin-top: 1.25rem;
    padding: 0.7rem 1rem;
    color: #fff;
    background: #2457d6;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    font: inherit;
}

.link-button { margin: 0; padding: 0; color: #2457d6; background: none; }

.error { padding: 0.75rem; color: #8a1c1c; background: #fdecec; border-radius: 4px; }

.success { padding: 0.75rem; color: #176b3a; background: #e8f7ee; border-radius: 4px; }

.warning { padding: 0.75rem; color: #725300; background: #fff5cc; border-radius: 4px; }

.note-card { max-width: 620px; margin: auto; }

.note-link, .cancel-link { color: #2457d6; }

.cancel-link { margin-left: 1rem; }

.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

th, td { padding: 0.75rem; text-align: left; border-bottom: 1px solid #dfe3e8; }

th { background: #f4f6f8; }

.page:has(.admin-table), .page:has(.duplicate-meetings) { width: min(1200px, calc(100% - 2rem)); }

.filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr)) auto;
    gap: 1rem;
    align-items: end;
    margin-bottom: 1.5rem;
}

.filters label { margin-top: 0; }

.filter-actions { display: flex; align-items: center; gap: 0.75rem; }

.filter-actions button { margin: 0; }

.note-preview {
    display: -webkit-box;
    max-width: 280px;
    margin-bottom: 0.25rem;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.pagination { display: flex; justify-content: center; gap: 1rem; margin-top: 1.5rem; }

.note-details { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1rem; }

.note-details dt { font-weight: 700; }

.note-details dd { margin: 0; }

.full-note { padding: 1rem; background: #f4f6f8; border-radius: 4px; white-space: pre-wrap; overflow-wrap: anywhere; }

.duplicate-meetings { max-width: 1100px; }
.duplicate-meetings > nav { display: flex; gap: 1rem; margin-bottom: 1.5rem; }
.duplicate-case { margin-top: 1.5rem; padding: 1rem; border: 1px solid #dfe3e8; border-radius: 6px; }
.duplicate-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }

@media (max-width: 800px) {
    .filters { grid-template-columns: 1fr; }
    .duplicate-grid { grid-template-columns: 1fr; }
}
