html, body {
    margin: 0;
    padding: 0;
    background: var(--page-background-color, #f4f2ec);
    color: var(--content-font-color, #3b454c);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 16px;
}

.crm-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 12px 0;
    border-bottom: 1px solid var(--highlight-color, #48a8e7);
}

.crm-header .logo {
    font-weight: 700;
    font-size: 20px;
    color: var(--highlight-color, #48a8e7);
}

.crm-header .menu-items {
    display: flex;
    gap: 16px;
    flex: 1;
}

.crm-header .menu-items a {
    text-decoration: none;
    color: inherit;
}

.crm-header .navbar-nav {
    display: flex;
    gap: 12px;
    list-style: none;
    margin: 0;
    padding: 0;
}

main {
    padding: 24px 0;
    background: var(--content-background-color, #fff);
}

h1, h2, h3 {
    color: var(--highlight-color, #48a8e7);
}

.module-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 8px;
}

.muted { color: #888; }
.text-danger { color: #c0392b; }

.toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 12px 0;
}

.filter-form {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.filter-form input {
    padding: 6px 8px;
    min-width: 280px;
}

button, .btn-primary {
    padding: 6px 14px;
    background: var(--highlight-color, #48a8e7);
    color: var(--highlight-contrast-color, #fff);
    border: 0;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
}

button[type=button], button.secondary {
    background: #ccc;
    color: #333;
}

input, select, textarea {
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

.data-table th,
.data-table td {
    padding: 8px;
    border-bottom: 1px solid #eee;
    text-align: left;
}

.data-table thead th {
    background: #f0f0f0;
}

.pagination {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 12px;
}

.form-row {
    margin: 8px 0;
    display: grid;
    grid-template-columns: 160px 1fr;
    align-items: center;
    gap: 8px;
}

.form-row.checkbox {
    grid-template-columns: auto 1fr;
}

.form-row textarea {
    min-height: 80px;
    font-family: inherit;
}

.alert {
    padding: 12px;
    border-radius: 4px;
    margin: 12px 0;
}

.alert-warning {
    background: #fff8e1;
    border: 1px solid #ffd54f;
    color: #5a4500;
}

.entity-summary {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 4px 12px;
    margin: 16px 0;
}

.entity-summary dt {
    font-weight: 600;
    color: #555;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
}

.activity-feed {
    list-style: none;
    padding: 0;
    margin: 12px 0;
    border-left: 2px solid var(--highlight-color, #48a8e7);
}

.activity-item {
    padding: 8px 12px;
    margin-left: 8px;
    margin-bottom: 8px;
    background: #fafafa;
    border-radius: 4px;
}

.activity-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #888;
}

.activity-type {
    font-weight: 600;
    text-transform: uppercase;
}

.activity-subject {
    font-weight: 600;
    margin-top: 2px;
}

.activity-body {
    margin-top: 4px;
    white-space: pre-wrap;
}

.page-header {
    display: flex;
    align-items: baseline;
    gap: 16px;
}

.page-header h1 {
    flex: 1;
}
