.mgc-crm-wrap {
    max-width: none;
}

.mgc-crm-userbar {
    position: fixed;
    top: 0;
    left: 160px;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 22px;
    background: linear-gradient(135deg, #0f2d2e, #1f5c52);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 22px rgba(15, 45, 46, 0.16);
}

body.folded .mgc-crm-userbar {
    left: 36px;
}

.mgc-crm-userbar__brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
    color: #fff;
}

.mgc-crm-userbar__brand strong {
    font-size: 16px;
    line-height: 1.1;
}

.mgc-crm-userbar__brand span {
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
}

.mgc-crm-userbar__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mgc-crm-userbar__nav {
    display: flex;
    flex: 1 1 auto;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.mgc-crm-userbar__nav-link {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    padding: 8px 12px;
    text-decoration: none;
}

.mgc-crm-userbar__nav-link:hover,
.mgc-crm-userbar__nav-link:focus,
.mgc-crm-userbar__nav-link.is-active {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
}

.mgc-crm-intro {
    list-style: disc;
    margin: 12px 0 18px 1.5rem;
}

.mgc-crm-intro li {
    margin-bottom: 6px;
}

.mgc-crm-section-title {
    margin: 24px 0 12px;
}

.mgc-crm-command-bar {
    align-items: center;
    background: linear-gradient(135deg, #0f2d2e 0%, #1f5c52 55%, #d29f13 100%);
    border-radius: 10px;
    color: #fff;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin: 18px 0;
    padding: 20px 22px;
}

.mgc-crm-command-bar h2,
.mgc-crm-hero h2 {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.15;
    margin: 0 0 6px;
}

.mgc-crm-command-bar p,
.mgc-crm-hero p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    max-width: 820px;
}

.mgc-crm-command-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.mgc-crm-stats-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    margin: 18px 0;
}

.mgc-crm-stat {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    padding: 16px;
}

.mgc-crm-stat-link {
    color: inherit;
    display: block;
    text-decoration: none;
}

.mgc-crm-stat-link:hover,
.mgc-crm-stat-link:focus {
    border-color: #1f5c52;
    box-shadow: 0 0 0 1px #1f5c52;
}

.mgc-crm-stat span {
    color: #50575e;
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.mgc-crm-stat strong {
    color: #1d2327;
    display: block;
    font-size: 26px;
    line-height: 1.2;
    margin-top: 7px;
}

.mgc-crm-stat small {
    color: #646970;
    display: block;
    margin-top: 5px;
}

.mgc-crm-stat--danger {
    border-color: #d63638;
}

.mgc-crm-stat--success {
    border-color: #00a32a;
}

.mgc-crm-workspace-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    margin: 18px 0;
}

.mgc-crm-hero {
    align-items: center;
    background: linear-gradient(135deg, #0f2d2e 0%, #1f5c52 55%, #d29f13 100%);
    border-radius: 10px;
    color: #fff;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin: 18px 0;
    padding: 20px 22px;
}

.mgc-crm-hero h2,
.mgc-crm-hero p {
    color: #fff;
}

.mgc-crm-card {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    padding: 16px;
}

.mgc-crm-help-banner {
    background: linear-gradient(135deg, #f6fbf8 0%, #edf6f1 100%);
    border: 1px solid #c8ddd2;
    border-left: 5px solid #1f5c52;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(15, 45, 46, 0.06);
    margin: 16px 0 18px;
    padding: 16px 18px;
}

.mgc-crm-help-banner__header {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: space-between;
    margin-bottom: 8px;
}

.mgc-crm-help-banner__eyebrow {
    color: #355f58;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mgc-crm-help-banner__role {
    background: #fff;
    border: 1px solid #d4e4dc;
    border-radius: 999px;
    color: #274843;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
}

.mgc-crm-help-banner h3 {
    color: #143734;
    font-size: 18px;
    margin: 0 0 6px;
}

.mgc-crm-help-banner p {
    color: #2d3d3a;
    font-size: 14px;
    line-height: 1.55;
    margin: 0;
    max-width: 980px;
}

.mgc-crm-help-banner__tip {
    color: #32423f;
    font-size: 13px;
    line-height: 1.5;
    margin-top: 10px;
}

.mgc-crm-card h3 {
    margin: 0 0 12px;
}

.mgc-crm-card h4 {
    margin: 0 0 12px;
}

.mgc-crm-card-header {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.mgc-crm-context-panel {
    margin: 18px 0;
}

.mgc-crm-dashboard-detail {
    border-color: #1f5c52;
    box-shadow: 0 8px 24px rgba(15, 45, 46, 0.12);
    margin: 20px 0;
}

.mgc-crm-record-detail,
.mgc-crm-task-work {
    border-color: #1f5c52;
    box-shadow: 0 8px 24px rgba(15, 45, 46, 0.1);
    margin: 20px 0;
    max-width: none;
}

.mgc-crm-task-work-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 72px 24px 24px;
    background: rgba(10, 31, 27, 0.36);
}

.mgc-crm-task-work-modal {
    width: min(1180px, calc(100vw - 48px));
    max-height: calc(100vh - 96px);
    overflow: auto;
    margin: 0;
    box-shadow: 0 24px 80px rgba(10, 31, 27, 0.28);
}

.mgc-crm-entry-modal {
    width: min(980px, calc(100vw - 48px));
}

.mgc-crm-rental-modal {
    width: min(1180px, calc(100vw - 48px));
}

.mgc-crm-relationship-work-modal {
    width: min(1040px, calc(100vw - 48px));
}

.mgc-crm-relationship-work-modal .mgc-crm-two-column {
    gap: 14px;
    grid-template-columns: 1fr;
}

.mgc-crm-relationship-form {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 16px;
}

.mgc-crm-relationship-form__header {
    align-items: baseline;
    border-bottom: 1px solid #dcdcde;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin: 0 0 14px;
    padding-bottom: 10px;
}

.mgc-crm-relationship-form__header h4 {
    font-size: 16px;
    margin: 0;
}

.mgc-crm-relationship-form__header p {
    color: #646970;
    margin: 0;
}

.mgc-crm-relationship-fields {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(150px, 0.8fr) minmax(220px, 1.2fr) minmax(220px, 1.2fr);
}

.mgc-crm-relationship-fields--task {
    grid-template-columns: minmax(200px, 1.4fr) minmax(150px, 0.9fr) minmax(170px, 1fr) minmax(120px, 0.7fr);
}

.mgc-crm-relationship-fields label {
    color: #1d2327;
    display: flex;
    flex-direction: column;
    font-size: 13px;
    font-weight: 700;
    gap: 6px;
    min-width: 0;
}

.mgc-crm-relationship-fields input[type="text"],
.mgc-crm-relationship-fields input[type="email"],
.mgc-crm-relationship-fields input[type="datetime-local"],
.mgc-crm-relationship-fields input[type="date"],
.mgc-crm-relationship-fields input[type="number"],
.mgc-crm-relationship-fields select,
.mgc-crm-relationship-fields textarea {
    font-weight: 400;
    max-width: 100%;
    min-height: 34px;
    width: 100%;
}

.mgc-crm-relationship-fields textarea {
    min-height: 88px;
    resize: vertical;
}

.mgc-crm-relationship-fields .mgc-crm-field-wide {
    grid-column: 1 / -1;
}

.mgc-crm-relationship-form__actions {
    display: flex;
    margin-top: 14px;
    justify-content: flex-end;
}

.mgc-crm-relationship-form__actions .submit {
    margin: 0;
    padding: 0;
}

.mgc-crm-relationship-form__actions .button,
.mgc-crm-relationship-form__actions .button-primary {
    min-height: 36px;
    min-width: 120px;
}

.mgc-crm-relationship-work-modal .mgc-crm-reminder-control {
    align-self: start;
}

.mgc-crm-two-column {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mgc-crm-record-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    margin-top: 14px;
}

.mgc-crm-record-detail .mgc-crm-record-grid > div,
.mgc-crm-task-work .mgc-crm-record-grid > div {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    min-width: 0;
    padding: 14px 16px;
}

.mgc-crm-record-detail h4,
.mgc-crm-task-work h4 {
    margin-top: 0;
}

.mgc-crm-task-summary {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    margin-bottom: 14px;
}

.mgc-crm-task-summary span {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 10px 12px;
    min-width: 0;
}

.mgc-crm-task-summary strong,
.mgc-crm-task-notes strong {
    color: #50575e;
    display: block;
    font-size: 12px;
    letter-spacing: 0.04em;
    margin-bottom: 3px;
    text-transform: uppercase;
}

.mgc-crm-task-notes {
    background: #fff8e5;
    border: 1px solid #f0c36d;
    border-radius: 8px;
    margin-bottom: 14px;
    padding: 12px;
}

.mgc-crm-task-notes p {
    margin: 0;
    white-space: pre-wrap;
}

.mgc-crm-inline-form {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 14px;
}

.mgc-crm-inline-form h4,
.mgc-crm-inline-form .submit,
.mgc-crm-inline-form .mgc-crm-field-wide {
    grid-column: 1 / -1;
}

.mgc-crm-inline-form .submit {
    margin: 0;
    padding: 0;
}

.mgc-crm-record-grid > .mgc-crm-inline-form,
.mgc-crm-record-detail .mgc-crm-record-grid > form,
.mgc-crm-task-work .mgc-crm-record-grid > form {
    min-width: 0;
}

.mgc-crm-inline-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0;
    min-width: 0;
}

.mgc-crm-inline-form input[type="text"],
.mgc-crm-inline-form input[type="email"],
.mgc-crm-inline-form input[type="datetime-local"],
.mgc-crm-inline-form input[type="date"],
.mgc-crm-inline-form input[type="number"],
.mgc-crm-inline-form select,
.mgc-crm-inline-form textarea {
    display: block;
    font-weight: 400;
    margin-top: 4px;
    max-width: 100%;
    width: 100%;
}

.mgc-crm-inline-form textarea {
    min-height: 96px;
    resize: vertical;
}

.mgc-crm-inline-form .button,
.mgc-crm-inline-form .button-primary,
.mgc-crm-inline-form .button-secondary {
    min-height: 36px;
}

.mgc-crm-reminder-control select {
    margin-bottom: 8px;
}

.mgc-crm-next-actions-panel .mgc-crm-command-actions {
    justify-content: flex-start;
}

.mgc-crm-entry-modal form {
    background: transparent;
    border: 0;
    padding: 0;
}

.mgc-crm-entry-modal .form-table,
.mgc-crm-entry-modal .form-table tbody {
    display: block;
    width: 100%;
}

.mgc-crm-entry-modal .form-table tbody {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.mgc-crm-entry-modal .form-table tr {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    display: block;
    margin: 0;
    min-width: 0;
    padding: 12px;
}

.mgc-crm-entry-modal .form-table th,
.mgc-crm-entry-modal .form-table td {
    display: block;
    padding: 0;
    width: auto;
}

.mgc-crm-entry-modal .form-table th {
    margin-bottom: 8px;
}

.mgc-crm-entry-modal .form-table th label {
    display: block;
    font-size: 13px;
    font-weight: 700;
}

.mgc-crm-form-table th {
    text-align: left;
}

.mgc-crm-entry-modal .form-table input[type="text"],
.mgc-crm-entry-modal .form-table input[type="email"],
.mgc-crm-entry-modal .form-table input[type="number"],
.mgc-crm-entry-modal .form-table input[type="date"],
.mgc-crm-entry-modal .form-table input[type="datetime-local"],
.mgc-crm-entry-modal .form-table select,
.mgc-crm-entry-modal .form-table textarea {
    width: 100%;
    max-width: 100%;
}

.mgc-crm-entry-modal .form-table textarea {
    min-height: 140px;
}

.mgc-crm-entry-modal .form-table tr:last-child {
    grid-column: 1 / -1;
}

.mgc-crm-entry-modal .form-table tr.mgc-crm-entry-modal__full-row {
    grid-column: 1 / -1;
}

.mgc-crm-entry-modal .submit {
    margin: 16px 0 0;
    padding: 0;
}

.mgc-crm-form-section {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    display: grid;
    gap: 12px 14px;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    margin: 0 0 14px;
    padding: 14px;
}

.mgc-crm-form-section h5 {
    color: #0f2d2e;
    font-size: 13px;
    grid-column: 1 / -1;
    letter-spacing: 0.04em;
    margin: 0;
    text-transform: uppercase;
}

.mgc-crm-inline-fields {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    max-width: 820px;
}

.mgc-crm-inline-fields input {
    width: 100%;
}

.mgc-crm-form-section label span {
    color: #1d2327;
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
}

.mgc-crm-form-section label {
    display: block;
    min-width: 0;
    width: 100%;
}

.mgc-crm-form-section select[multiple] {
    min-height: 180px;
}

.mgc-crm-form-section input[type="text"],
.mgc-crm-form-section input[type="email"],
.mgc-crm-form-section input[type="number"],
.mgc-crm-form-section input[type="date"],
.mgc-crm-form-section input[type="datetime-local"],
.mgc-crm-form-section select,
.mgc-crm-form-section textarea {
    max-width: 100%;
    width: 100%;
}

.mgc-crm-email-composer-meta {
    align-items: start;
    gap: 18px;
    grid-template-columns: 1fr;
    padding-top: 6px;
}

.mgc-crm-email-composer__meta-row {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(180px, 220px) minmax(220px, 320px) minmax(0, 1fr);
    width: 100%;
}

.mgc-crm-email-composer-body {
    display: block;
}

.mgc-crm-email-composer__to {
    min-width: 0;
    padding-top: 2px;
}

.mgc-crm-email-composer__to strong {
    color: #50575e;
    font-size: 13px;
    margin: 0;
}

.mgc-crm-email-composer__to span {
    color: #1d2327;
    display: block;
    font-size: 14px;
    line-height: 1.45;
}

.mgc-crm-email-composer__campaign,
.mgc-crm-email-composer__subject {
    min-width: 0;
}

.mgc-crm-email-composer__subject {
    grid-column: 1 / -1;
    width: 100%;
}

.mgc-crm-email-composer__campaign input,
.mgc-crm-email-composer__subject input {
    max-width: none !important;
    width: 100%;
}

.mgc-crm-email-composer__subject input {
    font-size: 16px;
}

.mgc-crm-email-composer__body {
    display: block;
    margin-top: 4px;
    min-width: 0;
    width: 100%;
}

.mgc-crm-email-composer-body .wp-editor-wrap,
.mgc-crm-email-composer-body .wp-editor-container,
.mgc-crm-email-composer-body .mce-container,
.mgc-crm-email-composer-body .mce-container-body,
.mgc-crm-email-composer-body .tmce-active iframe {
    max-width: none;
    width: 100% !important;
}

.mgc-crm-email-composer-body .wp-editor-wrap {
    border: 1px solid #dcdcde;
    border-radius: 8px;
    overflow: hidden;
    width: 100% !important;
}

.mgc-crm-email-composer-body .wp-switch-editor {
    font-size: 12px;
    padding: 4px 12px;
}

.mgc-crm-email-composer-body .quicktags-toolbar,
.mgc-crm-email-composer-body .mce-toolbar-grp {
    border-bottom: 1px solid #dcdcde;
}

.mgc-crm-email-composer-body .wp-editor-area {
    min-height: 320px;
}

@media (max-width: 960px) {
    .mgc-crm-email-composer__meta-row {
        grid-template-columns: 1fr;
    }
}

.mgc-crm-inline-notice {
    background: #fff;
    border-left: 4px solid #00a32a;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    margin: 16px 0;
    padding: 12px 16px;
}

.mgc-crm-inline-notice p {
    margin: 0;
}

.mgc-crm-email-direct-recipient {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    grid-column: 1 / -1;
    padding: 14px 16px;
}

.mgc-crm-email-direct-recipient strong,
.mgc-crm-email-direct-recipient span {
    display: block;
}

.mgc-crm-email-direct-recipient strong {
    margin-bottom: 6px;
}

.mgc-crm-pricing-panel {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 12px;
}

.mgc-crm-pricing-panel p {
    margin: 0 0 8px;
}

.mgc-crm-pricing-lines {
    margin: 8px 0 0 18px;
}

.mgc-crm-pricing-lines li {
    margin-bottom: 4px;
}

.mgc-crm-shared-space {
    display: grid;
    gap: 12px;
    max-width: 100%;
}

.mgc-crm-shared-space label {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.mgc-crm-shared-space input[type="text"],
.mgc-crm-shared-space input[type="number"],
.mgc-crm-shared-space select {
    box-sizing: border-box;
    max-width: 100%;
    width: 100%;
}

.mgc-crm-shared-space .mgc-crm-check-row {
    align-items: start;
    display: flex;
    gap: 8px;
}

.mgc-crm-shared-space details {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    padding: 10px 12px;
}

.mgc-crm-shared-space details .mgc-crm-inline-fields {
    align-items: start;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-top: 10px;
}

.mgc-crm-shared-space details .mgc-crm-inline-fields label {
    min-width: 0;
}

.mgc-crm-shared-space details .mgc-crm-inline-fields input {
    width: 100%;
}

.mgc-crm-shared-space summary {
    cursor: pointer;
    font-weight: 600;
}

.mgc-crm-data-table {
    max-width: none;
}

.mgc-crm-table-subtext {
    color: #646970;
    display: block;
    margin-top: 3px;
}

.mgc-crm-field-wide {
    grid-column: 1 / -1;
}

.mgc-crm-follow-up-switch {
    border: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 14px;
    padding: 0;
}

.mgc-crm-follow-up-switch legend {
    color: #50575e;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
    text-transform: uppercase;
    width: 100%;
}

.mgc-crm-follow-up-switch label {
    align-items: center;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 999px;
    display: inline-flex;
    font-weight: 600;
    gap: 6px;
    margin: 0;
    padding: 8px 12px;
}

.mgc-crm-follow-up-fields {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    display: none;
    gap: 10px 14px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-top: 10px;
    padding: 12px;
}

.mgc-crm-contact-related-fields {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    display: none;
    gap: 10px 14px;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    margin-top: 10px;
    max-width: 760px;
    padding: 12px;
}

.mgc-crm-contact-related-fields label {
    display: block;
    font-weight: 600;
}

.mgc-crm-contact-type-guidance {
    max-width: 760px;
}

.mgc-crm-contact-type-guidance__panel {
    background: #eef6f3;
    border-left: 4px solid #0f4f45;
    border-radius: 8px;
    color: #1d2d2a;
    display: none;
    padding: 10px 12px;
}

.mgc-crm-form-table:has(select[name="contact_type"] option[value="general"]:checked) .mgc-crm-contact-type-guidance__panel--general,
.mgc-crm-form-table:has(select[name="contact_type"] option[value="rental"]:checked) .mgc-crm-contact-type-guidance__panel--rental,
.mgc-crm-form-table:has(select[name="contact_type"] option[value="donor"]:checked) .mgc-crm-contact-type-guidance__panel--donor,
.mgc-crm-form-table:has(select[name="contact_type"] option[value="legacy_donor"]:checked) .mgc-crm-contact-type-guidance__panel--donor,
.mgc-crm-form-table:has(select[name="contact_type"] option[value="grant"]:checked) .mgc-crm-contact-type-guidance__panel--grant {
    display: block;
}

.mgc-crm-contact-related-picker {
    display: none;
}

.mgc-crm-contact-related-fields:has(select[name="related_record_type"] option[value="rentals"]:checked) .mgc-crm-contact-related-picker--rentals,
.mgc-crm-contact-related-fields:has(select[name="related_record_type"] option[value="donations"]:checked) .mgc-crm-contact-related-picker--donations,
.mgc-crm-contact-related-fields:has(select[name="related_record_type"] option[value="grants"]:checked) .mgc-crm-contact-related-picker--grants {
    display: block;
}

.mgc-crm-contact-related-fields select {
    display: block;
    margin-top: 4px;
    width: 100%;
}

.mgc-crm-form-table:has(input[name="connect_existing_record"][value="yes"]:checked) .mgc-crm-contact-related-fields {
    display: grid;
}

.mgc-crm-task-work-form:has(input[name="follow_up_kind"][value="task"]:checked) .mgc-crm-follow-up-fields--task,
.mgc-crm-task-work-form:has(input[name="follow_up_kind"][value="activity"]:checked) .mgc-crm-follow-up-fields--activity {
    display: grid;
}

.mgc-crm-report-form {
    align-items: end;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.mgc-crm-report-form label {
    font-weight: 600;
}

.mgc-crm-report-form input,
.mgc-crm-report-form select {
    display: block;
    font-weight: 400;
    margin-top: 4px;
    max-width: 100%;
    width: 100%;
}

.mgc-crm-report-results {
    margin-top: 18px;
}

.mgc-crm-import-review-panel {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-left: 4px solid #2271b1;
    border-radius: 8px;
    margin-top: 18px;
    padding: 16px;
}

.mgc-crm-selected-import-batch td {
    background: #f0f6fc;
}

.mgc-crm-settings-panel {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    margin: 1rem 0 1.5rem;
    max-width: 1100px;
    padding: 16px;
}

.mgc-crm-settings-panel h2 {
    margin-top: 0;
}

.mgc-crm-settings-panel label {
    display: block;
    font-weight: 600;
    max-width: 760px;
}

.mgc-crm-settings-panel label span {
    display: block;
    margin-bottom: 4px;
}

.mgc-crm-settings-panel input[type="url"] {
    width: 100%;
}

.mgc-crm-settings-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.mgc-crm-settings-facts span {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 999px;
    padding: 6px 10px;
}

.mgc-crm-list-controls {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    margin: 8px 0 12px;
}

.mgc-crm-list-controls form,
.mgc-crm-list-controls__pager {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mgc-crm-list-controls label {
    font-weight: 600;
}

.mgc-crm-list-controls select {
    margin-left: 4px;
}

.mgc-crm-list-controls__pager span {
    color: #646970;
}

.mgc-crm-timeline {
    margin: 0;
}

.mgc-crm-mini-list {
    margin: 0;
}

.mgc-crm-mini-list li {
    border-top: 1px solid #dcdcde;
    margin: 0;
    padding: 9px 0;
}

.mgc-crm-mini-list strong,
.mgc-crm-mini-list span {
    display: block;
}

.mgc-crm-mini-list span {
    color: #646970;
    margin-top: 2px;
}

.mgc-crm-timeline li {
    border-left: 3px solid #1f5c52;
    margin: 0 0 12px;
    padding-left: 11px;
}

.mgc-crm-timeline strong,
.mgc-crm-timeline span,
.mgc-crm-timeline small {
    display: block;
}

.mgc-crm-timeline span,
.mgc-crm-timeline small {
    color: #646970;
    margin-top: 2px;
}

.mgc-crm-click-list {
    margin: 0;
}

.mgc-crm-click-list li {
    margin: 0 0 8px;
}

.mgc-crm-click-list a {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    color: #1d2327;
    display: block;
    padding: 10px 12px;
    text-decoration: none;
}

.mgc-crm-click-list a:hover,
.mgc-crm-click-list a:focus {
    background: #edf6f3;
    border-color: #1f5c52;
}

.mgc-crm-click-list__static {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    display: block;
    padding: 12px;
}

.mgc-crm-click-list strong,
.mgc-crm-click-list span,
.mgc-crm-click-list small {
    display: block;
}

.mgc-crm-click-list span,
.mgc-crm-click-list small {
    color: #646970;
}

.mgc-crm-click-list small {
    margin-top: 2px;
}

.mgc-crm-dashboard-list-card {
    display: flex;
    flex-direction: column;
}

.mgc-crm-dashboard-list-footer {
    margin-top: auto;
    padding-top: 8px;
}

.mgc-crm-dashboard-list-footer a {
    font-weight: 600;
}

.mgc-crm-action-list {
    display: grid;
    gap: 10px;
}

.mgc-crm-action-row {
    align-items: center;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    color: #1d2327;
    display: flex;
    gap: 14px;
    justify-content: space-between;
    padding: 12px 14px;
    text-decoration: none;
}

.mgc-crm-action-row:hover,
.mgc-crm-action-row:focus {
    background: #edf6f3;
    border-color: #1f5c52;
    box-shadow: 0 0 0 1px #1f5c52;
    color: #0f2d2e;
}

.mgc-crm-action-row strong,
.mgc-crm-action-row small,
.mgc-crm-action-row em,
.mgc-crm-action-row b {
    display: block;
}

.mgc-crm-action-row small,
.mgc-crm-action-row em {
    color: #646970;
}

.mgc-crm-action-row em {
    font-style: normal;
}

.mgc-crm-action-row__side {
    text-align: right;
}

.mgc-crm-checkbox-grid {
    display: grid;
    gap: 8px 16px;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    margin-bottom: 14px;
}

.mgc-crm-detail-list {
    display: grid;
    gap: 8px 16px;
    grid-template-columns: minmax(120px, 190px) minmax(0, 1fr);
    margin: 0;
}

.mgc-crm-detail-list dt {
    color: #50575e;
    font-weight: 700;
}

.mgc-crm-detail-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.mgc-crm-stage-list {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

.mgc-crm-stage {
    align-items: center;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    color: #1d2327;
    cursor: default;
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
    text-decoration: none;
}

.mgc-crm-stage--filter {
    cursor: pointer;
}

.mgc-crm-stage:hover,
.mgc-crm-stage:focus,
.mgc-crm-stage.is-active {
    background: #edf6f3;
    border-color: #1f5c52;
    color: #0f2d2e;
}

.mgc-crm-stage--filter.is-active {
    box-shadow: inset 4px 0 0 #1f5c52;
}

.mgc-crm-stage strong {
    font-size: 18px;
}

.mgc-crm-attention-list {
    margin: 0;
}

.mgc-crm-attention-list li {
    border-left: 4px solid #dba617;
    margin: 0 0 10px;
    padding: 2px 0 2px 10px;
}

.mgc-crm-attention-list li.is-danger {
    border-left-color: #d63638;
}

.mgc-crm-attention-list strong,
.mgc-crm-attention-list span {
    display: block;
}

.mgc-crm-attention-list span {
    color: #50575e;
    margin-top: 2px;
}

.mgc-crm-panel {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-radius: 6px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    margin: 22px 0;
    padding: 0;
}

.mgc-crm-panel summary {
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    padding: 14px 16px;
}

.mgc-crm-panel[open] summary {
    border-bottom: 1px solid #dcdcde;
}

.mgc-crm-panel__body {
    padding: 4px 16px 16px;
}

.mgc-crm-form-table th {
    width: 210px;
}

.mgc-crm-table-scroll {
    background: #fff;
    border: 1px solid #c3c4c7;
    overflow-x: auto;
}

.mgc-crm-table {
    border: 0;
    min-width: 1100px;
}

.mgc-crm-table th,
.mgc-crm-table td {
    vertical-align: top;
}

.mgc-crm-badge {
    border-radius: 999px;
    display: inline-block;
    font-weight: 600;
    line-height: 1.6;
    padding: 2px 9px;
}

.mgc-crm-badge--clear {
    background: #e7f7ed;
    color: #116329;
}

.mgc-crm-badge--conflict {
    background: #fcf0f1;
    color: #8a2424;
}

.mgc-crm-stage-pill {
    background: #f0f6fc;
    border-radius: 999px;
    color: #135e96;
    display: inline-block;
    font-weight: 600;
    padding: 3px 9px;
}

.mgc-crm-table-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mgc-crm-inline-form {
    display: inline-flex;
    margin: 0;
}

.mgc-crm-inline-form .button {
    margin: 0;
}

.mgc-crm-conflict-list {
    color: #50575e;
    list-style: disc;
    margin: 6px 0 0 1rem;
}

.mgc-crm-muted {
    color: #646970;
    margin-top: 4px;
}

.mgc-crm-empty-state {
    background: #fff;
    border: 1px dashed #c3c4c7;
    margin: 18px 0;
    padding: 14px 16px;
}

.mgc-crm-option-set-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.mgc-crm-option-set {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 12px;
    display: grid;
    gap: 8px;
    padding: 14px;
}

.mgc-crm-option-set textarea {
    font-family: Consolas, Monaco, monospace;
    min-height: 150px;
    width: 100%;
}

.mgc-crm-reminder-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100000;
    background: rgba(10, 31, 27, 0.34);
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 56px 24px 24px;
}

.mgc-crm-reminder-modal {
    width: min(680px, calc(100vw - 48px));
    max-height: calc(100vh - 96px);
    overflow: auto;
    background: #fbfaf5;
    border: 1px solid #0f3d35;
    border-radius: 18px;
    box-shadow: 0 24px 80px rgba(10, 31, 27, 0.28);
}

.mgc-crm-reminder-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px 18px;
    background: linear-gradient(135deg, #0f3d35, #1f5c52);
    color: #fff;
}

.mgc-crm-reminder-header h2 {
    color: #fff;
    margin: 4px 0 0;
}

.mgc-crm-reminder-header .mgc-crm-eyebrow {
    color: rgba(255, 255, 255, 0.76);
    margin: 0;
}

.mgc-crm-reminder-list {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.mgc-crm-reminder-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    padding: 18px;
    background: #fff;
    border: 1px solid #d8dfd6;
    border-left: 5px solid #d49b26;
    border-radius: 14px;
}

.mgc-crm-reminder-main h3 {
    margin: 8px 0 6px;
    font-size: 18px;
}

.mgc-crm-reminder-main p {
    margin: 0 0 12px;
    color: #34423f;
}

.mgc-crm-reminder-contact {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 12px;
}

.mgc-crm-reminder-contact div {
    padding: 10px;
    background: #f6f7f2;
    border: 1px solid #e2e5dd;
    border-radius: 10px;
}

.mgc-crm-reminder-contact dt {
    margin: 0 0 3px;
    color: #51615d;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.mgc-crm-reminder-contact dd {
    margin: 0;
}

.mgc-crm-reminder-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #51615d;
    font-size: 12px;
}

.mgc-crm-reminder-meta span {
    padding: 4px 8px;
    background: #eef2ed;
    border-radius: 999px;
}

.mgc-crm-reminder-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    min-width: 130px;
}

.mgc-crm-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.mgc-crm-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
}

.mgc-crm-calendar-weekday {
    color: #51615d;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    padding: 0 4px;
    text-transform: uppercase;
}

.mgc-crm-calendar-day {
    min-height: 128px;
    padding: 10px;
    border: 1px solid #d8dfd6;
    border-radius: 12px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mgc-crm-calendar-day.is-outside-month {
    background: #f6f7f2;
    opacity: 0.72;
}

.mgc-crm-calendar-day.has-events {
    border-color: #8fb5aa;
    box-shadow: inset 0 0 0 1px rgba(31, 92, 82, 0.08);
}

.mgc-crm-calendar-day:not(.has-events) {
    cursor: pointer;
}

.mgc-crm-calendar-day.is-today {
    border-color: #0f3d35;
    box-shadow:
        inset 0 0 0 2px #0f3d35,
        0 8px 18px rgba(15, 61, 53, 0.12);
}

.mgc-crm-calendar-day.is-selected {
    border-color: #0f3d35;
    box-shadow: 0 0 0 2px rgba(15, 61, 53, 0.14);
}

.mgc-crm-calendar-day.is-today.is-selected {
    box-shadow:
        inset 0 0 0 2px #0f3d35,
        0 0 0 3px rgba(15, 61, 53, 0.18);
}

.mgc-crm-calendar-day__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
}

.mgc-crm-calendar-day__header a {
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
}

.mgc-crm-calendar-day__header span {
    color: #51615d;
}

.mgc-crm-calendar-event {
    display: block;
    padding: 8px 9px;
    border-radius: 10px;
    background: #f3f7f5;
    text-decoration: none;
}

.mgc-crm-calendar-event strong,
.mgc-crm-calendar-event span {
    display: block;
}

.mgc-crm-calendar-event span,
.mgc-crm-calendar-more {
    color: #51615d;
    font-size: 12px;
    margin-top: 4px;
}

.mgc-crm-day-detail {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #e2e5dd;
}

.mgc-crm-calendar-choice-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100002;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 96px 24px 24px;
    background: rgba(10, 31, 27, 0.36);
}

.mgc-crm-calendar-choice-backdrop.is-open {
    display: flex;
}

.mgc-crm-calendar-choice-modal {
    width: min(560px, calc(100vw - 48px));
    margin: 0;
    box-shadow: 0 24px 80px rgba(10, 31, 27, 0.28);
}

.mgc-crm-calendar-choice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.mgc-crm-checkbox-list {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    max-height: 180px;
    overflow: auto;
    padding: 10px;
    border: 1px solid #d8dfd6;
    border-radius: 8px;
    background: #fff;
}

.mgc-crm-checkbox-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

body.login {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(210, 159, 19, 0.24), transparent 34%),
        radial-gradient(circle at bottom right, rgba(31, 92, 82, 0.24), transparent 30%),
        linear-gradient(135deg, #0c2223, #173f3a 58%, #224c45);
    display: flex;
    align-items: center;
    justify-content: center;
}

body.login div#login {
    width: min(460px, calc(100vw - 32px));
    padding: 36px 0 24px;
}

body.login h1 {
    display: none;
}

.mgc-crm-login-intro {
    margin: 0 0 18px;
    padding: 26px 26px 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(8, 18, 18, 0.24);
    text-align: left;
    backdrop-filter: blur(8px);
}

.mgc-crm-login-intro__eyebrow {
    margin: 0 0 8px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.mgc-crm-login-intro h1 {
    display: block;
    margin: 0 0 8px;
    color: #fff;
    font-size: 30px;
    line-height: 1.1;
}

.mgc-crm-login-intro p {
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
}

body.login #loginform,
body.login #lostpasswordform,
body.login #registerform {
    margin-top: 0;
    padding: 28px 26px 24px;
    border: 1px solid rgba(19, 50, 46, 0.16);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(8, 18, 18, 0.18);
}

body.login label {
    color: #31403d;
    font-weight: 600;
}

body.login .input,
body.login input[type="text"],
body.login input[type="password"] {
    min-height: 46px;
    border-radius: 10px;
    border-color: #ccd6d1;
}

body.login .button.wp-hide-pw {
    color: #1f5c52;
}

body.login .button-primary {
    min-height: 42px;
    padding: 0 18px;
    border-color: #1f5c52;
    background: #1f5c52;
}

body.login .button-primary:hover,
body.login .button-primary:focus {
    border-color: #163f3a;
    background: #163f3a;
}

body.login #nav,
body.login #backtoblog {
    text-align: center;
}

body.login #nav a,
body.login #backtoblog a,
body.login .privacy-policy-page-link a {
    color: rgba(255, 255, 255, 0.86);
}

@media (max-width: 960px) {
    body.wp-admin #wpcontent:has(.mgc-crm-wrap),
    body.wp-admin #wpbody:has(.mgc-crm-wrap),
    body.wp-admin #wpbody-content:has(.mgc-crm-wrap),
    body.wp-admin #wpfooter:has(.mgc-crm-wrap) {
        box-sizing: border-box !important;
        margin-left: 0 !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
    }

    body.wp-admin .mgc-crm-wrap {
        box-sizing: border-box !important;
        margin: 0 !important;
        max-width: 100% !important;
        padding: 0 14px 18px !important;
        width: 100% !important;
    }
}

@media (max-width: 782px) {

    .mgc-crm-userbar {
        position: static;
        top: auto;
        left: 0;
        align-items: flex-start;
        flex-direction: column;
        box-sizing: border-box;
        padding: 12px 14px;
        width: 100%;
    }

    body.folded .mgc-crm-userbar {
        left: 0;
    }

    .mgc-crm-command-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .mgc-crm-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .mgc-crm-command-actions {
        justify-content: flex-start;
        width: 100%;
    }

    .mgc-crm-workspace-grid {
        grid-template-columns: 1fr;
    }

    .mgc-crm-card-header,
    .mgc-crm-record-grid,
    .mgc-crm-two-column {
        grid-template-columns: 1fr;
    }

    .mgc-crm-card-header {
        display: block;
    }

    .mgc-crm-list-controls,
    .mgc-crm-list-controls form,
    .mgc-crm-list-controls__pager,
    .mgc-crm-calendar-nav,
    .mgc-crm-reminder-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .mgc-crm-command-actions .button,
    .mgc-crm-userbar__actions .button,
    .mgc-crm-list-controls .button,
    .mgc-crm-calendar-nav .button {
        width: 100%;
        text-align: center;
    }

    .mgc-crm-userbar__nav {
        justify-content: flex-start;
        width: 100%;
    }

    .mgc-crm-detail-list {
        grid-template-columns: 1fr;
    }

    .mgc-crm-stage-list,
    .mgc-crm-checkbox-grid,
    .mgc-crm-inline-fields,
    .mgc-crm-form-section,
    .mgc-crm-task-summary,
    .mgc-crm-report-form,
    .mgc-crm-follow-up-fields,
    .mgc-crm-contact-related-fields {
        grid-template-columns: 1fr;
    }

    .mgc-crm-action-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .mgc-crm-action-row__side {
        text-align: left;
    }

    .mgc-crm-form-table th {
        width: auto;
    }

    .mgc-crm-panel summary {
        padding: 12px;
    }

    .mgc-crm-panel__body {
        padding: 0 12px 12px;
    }

    .mgc-crm-reminder-backdrop {
        justify-content: center;
        padding: 24px 12px;
    }

    .mgc-crm-reminder-modal {
        width: 100%;
    }

    .mgc-crm-reminder-item,
    .mgc-crm-reminder-contact {
        grid-template-columns: 1fr;
    }

    .mgc-crm-task-work-backdrop {
        padding: 24px 12px;
    }

    .mgc-crm-task-work-modal {
        width: 100%;
    }

    .mgc-crm-entry-modal {
        width: 100%;
    }

    .mgc-crm-entry-modal .form-table tbody {
        grid-template-columns: 1fr;
    }

    .mgc-crm-relationship-fields,
    .mgc-crm-relationship-fields--task {
        grid-template-columns: 1fr;
    }

    .mgc-crm-relationship-form__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .mgc-crm-calendar {
        grid-template-columns: 1fr;
    }

    .mgc-crm-calendar-weekday {
        display: none;
    }

    .mgc-crm-calendar-day {
        min-height: 0;
    }

    .mgc-crm-reminder-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

@media (max-width: 600px) {
    .mgc-crm-wrap {
        padding: 0 10px 16px;
    }

    .mgc-crm-userbar {
        gap: 10px;
        padding: 10px 12px;
    }

    .mgc-crm-userbar__brand strong {
        font-size: 14px;
    }

    .mgc-crm-userbar__brand span {
        font-size: 11px;
    }

    .mgc-crm-userbar__actions {
        width: 100%;
    }

    .mgc-crm-userbar__nav {
        display: grid;
        gap: 8px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mgc-crm-userbar__nav-link {
        align-items: center;
        border-radius: 10px;
        justify-content: center;
        min-height: 40px;
        text-align: center;
    }

    .mgc-crm-command-bar,
    .mgc-crm-hero,
    .mgc-crm-card,
    .mgc-crm-record-detail,
    .mgc-crm-task-work,
    .mgc-crm-panel,
    .mgc-crm-dashboard-detail {
        border-radius: 8px;
    }

    .mgc-crm-command-bar,
    .mgc-crm-hero {
        margin: 14px 0;
        padding: 16px;
    }

    .mgc-crm-command-bar h2,
    .mgc-crm-hero h2 {
        font-size: 20px;
    }

    .mgc-crm-command-bar p,
    .mgc-crm-hero p {
        font-size: 13px;
    }

    .mgc-crm-stats-grid,
    .mgc-crm-record-grid,
    .mgc-crm-two-column,
    .mgc-crm-workspace-grid {
        gap: 12px;
    }

    .mgc-crm-stat {
        padding: 14px;
    }

    .mgc-crm-stat strong {
        font-size: 22px;
    }

    .mgc-crm-card,
    .mgc-crm-record-detail .mgc-crm-record-grid > div,
    .mgc-crm-task-work .mgc-crm-record-grid > div,
    .mgc-crm-inline-form,
    .mgc-crm-panel__body {
        padding: 12px;
    }

    .mgc-crm-entry-modal .form-table tr {
        padding: 10px;
    }

    .mgc-crm-follow-up-switch label {
        width: 100%;
        justify-content: center;
    }

    .mgc-crm-list-controls {
        gap: 10px;
    }

    .mgc-crm-list-controls form,
    .mgc-crm-list-controls__pager {
        width: 100%;
    }

    .mgc-crm-list-controls select,
    .mgc-crm-list-controls input,
    .mgc-crm-list-controls .button {
        width: 100%;
        margin-left: 0;
    }

    .mgc-crm-table-scroll {
        background: transparent;
        border: 0;
        overflow: visible;
    }

    .mgc-crm-table {
        border: 0;
        min-width: 0;
    }

    .mgc-crm-table thead {
        border: 0;
        clip: rect(0 0 0 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        width: 1px;
    }

    .mgc-crm-table tbody,
    .mgc-crm-table tr,
    .mgc-crm-table td {
        display: block;
        width: 100%;
    }

    .mgc-crm-table tr {
        background: #fff;
        border: 1px solid #dcdcde;
        border-radius: 10px;
        margin-bottom: 12px;
        overflow: hidden;
        padding: 6px 0;
    }

    .mgc-crm-table td {
        border: 0;
        display: grid;
        gap: 8px;
        grid-template-columns: minmax(96px, 110px) minmax(0, 1fr);
        padding: 8px 12px;
    }

    .mgc-crm-table td::before {
        color: #50575e;
        content: attr(data-label);
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }

    .mgc-crm-table td:last-child {
        padding-bottom: 12px;
    }

    .mgc-crm-table td .button,
    .mgc-crm-table td a.button,
    .mgc-crm-table td .button-link {
        margin-bottom: 4px;
    }

    .mgc-crm-action-row {
        padding: 10px 12px;
    }

    .mgc-crm-action-row__side {
        text-align: left;
        width: 100%;
    }

    .mgc-crm-reminder-backdrop,
    .mgc-crm-task-work-backdrop {
        padding: 12px;
    }

    .mgc-crm-reminder-modal,
    .mgc-crm-task-work-modal,
    .mgc-crm-entry-modal {
        border-radius: 14px;
        max-height: calc(100vh - 24px);
        width: 100%;
    }

    .mgc-crm-reminder-header,
    .mgc-crm-reminder-list {
        padding: 14px;
    }

    .mgc-crm-reminder-item {
        padding: 14px;
    }

    .mgc-crm-calendar-day {
        padding: 8px;
    }

    .mgc-crm-calendar-event {
        padding: 8px;
    }
}

.mgc-crm-resource-library {
    align-items: flex-start;
    display: grid;
    gap: 18px;
    grid-template-columns: 240px minmax(0, 1fr);
}

.mgc-crm-resource-library__sidebar {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 14px;
}

.mgc-crm-resource-library__sidebar h3 {
    margin-top: 0;
}

.mgc-crm-resource-library__sidebar a {
    align-items: center;
    border-radius: 6px;
    color: #1d2327;
    display: flex;
    justify-content: space-between;
    padding: 8px 10px;
    text-decoration: none;
}

.mgc-crm-resource-library__sidebar a:hover,
.mgc-crm-resource-library__sidebar a.is-active {
    background: #edf2f0;
    color: #0f2f2a;
}

.mgc-crm-resource-library__main {
    min-width: 0;
}

.mgc-crm-resource-library__toolbar {
    align-items: center;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px;
}

.mgc-crm-resource-library__toolbar input[type="search"] {
    max-width: 420px;
    width: 100%;
}

.mgc-crm-resource-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.mgc-crm-resource-card {
    align-items: flex-start;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    display: flex;
    gap: 14px;
    padding: 14px;
}

.mgc-crm-resource-card__icon {
    align-items: center;
    background: #0f2f2a;
    border-radius: 7px;
    color: #fff;
    display: flex;
    flex: 0 0 52px;
    font-size: 12px;
    font-weight: 700;
    height: 60px;
    justify-content: center;
}

.mgc-crm-resource-card__body {
    min-width: 0;
    width: 100%;
}

.mgc-crm-resource-card h3 {
    margin: 0 0 4px;
}

.mgc-crm-resource-card__roles {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0;
}

.mgc-crm-resource-card__roles span {
    background: #f4efe3;
    border-radius: 999px;
    color: #3b3324;
    font-size: 12px;
    padding: 3px 8px;
}

.mgc-crm-resource-card__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mgc-crm-resource-card__actions form {
    margin: 0;
}

@media (max-width: 900px) {
    .mgc-crm-resource-library {
        grid-template-columns: 1fr;
    }
}

.mgc-crm-registration-fields {
    display: grid;
    gap: 10px;
}

.mgc-crm-registration-field-row {
    align-items: center;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: 150px minmax(180px, 1fr) auto auto;
    padding: 10px;
}

.mgc-crm-registration-field-row label {
    align-items: center;
    display: flex;
    gap: 6px;
}

.mgc-crm-registration-field-row input[type="text"] {
    width: 100%;
}

.mgc-crm-registration-custom-fields {
    border-top: 1px solid #dcdcde;
    margin-top: 12px;
    padding-top: 12px;
}

.mgc-crm-registration-custom-fields h4 {
    margin: 0 0 10px;
}

.mgc-crm-registration-custom-field-row {
    align-items: start;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(160px, 1fr) 150px 150px minmax(190px, 1fr) auto auto auto;
    margin-bottom: 10px;
    padding: 10px;
}

.mgc-crm-registration-custom-field-row label {
    display: grid;
    gap: 5px;
}

.mgc-crm-registration-custom-field-row input[type="text"],
.mgc-crm-registration-custom-field-row select,
.mgc-crm-registration-custom-field-row textarea {
    width: 100%;
}

.mgc-crm-public-registration {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    margin: 18px 0;
    max-width: 760px;
    padding: 18px;
}

.mgc-crm-public-registration__form {
    display: grid;
    gap: 14px;
}

.mgc-crm-public-registration__form label {
    display: grid;
    gap: 6px;
}

.mgc-crm-public-registration__form input,
.mgc-crm-public-registration__form select,
.mgc-crm-public-registration__form textarea {
    border: 1px solid #8c8f94;
    border-radius: 4px;
    box-sizing: border-box;
    min-height: 40px;
    padding: 8px 10px;
    width: 100%;
}

.mgc-crm-public-registration__checkbox {
    align-items: center;
    display: flex !important;
    gap: 8px;
}

.mgc-crm-public-registration__checkbox input {
    min-height: 0;
    width: auto;
}

.mgc-crm-public-registration__form button {
    justify-self: start;
}

.mgc-crm-registration-hp {
    left: -9999px;
    position: absolute;
}

.mgc-crm-registration-message {
    border-left: 4px solid #dba617;
    margin: 0 0 14px;
    padding: 10px 12px;
}

.mgc-crm-registration-message--success {
    border-left-color: #008a20;
}

.mgc-crm-registration-message--error {
    border-left-color: #d63638;
}

.mgc-crm-registration-filters {
    align-items: end;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 14px;
    padding: 12px;
}

.mgc-crm-registration-filters label {
    display: grid;
    gap: 4px;
}

.mgc-crm-registration-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 12px;
}

.mgc-crm-registration-summary span {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 6px 10px;
}

.mgc-crm-inline-action {
    margin: 8px 0 0;
}

.mgc-crm-registration-workspace .mgc-crm-hero {
    margin-top: 10px;
}

.mgc-crm-registration-workspace .form-table th {
    color: #1d2327;
    font-size: 13px;
    padding: 14px 16px 14px 0;
}

.mgc-crm-registration-workspace .form-table td {
    padding: 10px 0;
}

.mgc-crm-registration-workspace input[type="text"],
.mgc-crm-registration-workspace input[type="email"],
.mgc-crm-registration-workspace input[type="number"],
.mgc-crm-registration-workspace input[type="search"],
.mgc-crm-registration-workspace input[type="url"],
.mgc-crm-registration-workspace select,
.mgc-crm-registration-workspace textarea {
    border-color: #a7aaad;
    border-radius: 4px;
}

.mgc-crm-registration-primary-grid {
    margin: 18px 0 0;
}

.mgc-crm-registration-builder {
    border-top: 4px solid #1f5c52;
}

.mgc-crm-registration-builder .mgc-crm-card-header {
    background: #fff;
    border-bottom: 1px solid #dcdcde;
    margin: -16px -16px 14px;
    padding: 16px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.mgc-crm-registration-forms-list,
.mgc-crm-registration-results {
    border-top: 4px solid #d29f13;
}

.mgc-crm-registration-forms-list code {
    white-space: normal;
    word-break: break-word;
}

.mgc-crm-registration-fields {
    display: grid;
    gap: 10px;
}

.mgc-crm-fluent-bridge {
    border-top: 4px solid #1f5c52;
    margin: 18px 0;
}

.mgc-crm-fluent-bridge h4 {
    color: #143734;
    font-size: 14px;
    margin: 18px 0 8px;
}

.mgc-crm-fluent-bridge-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.mgc-crm-fluent-bridge-grid label {
    display: grid;
    gap: 5px;
}

.mgc-crm-fluent-bridge-grid label span {
    color: #143734;
    font-weight: 700;
}

.mgc-crm-fluent-bridge-grid input,
.mgc-crm-fluent-bridge-grid select {
    max-width: 100%;
    width: 100%;
}

.mgc-crm-registration-field-row,
.mgc-crm-registration-custom-field-row {
    background: #f8faf9;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 12px;
}

.mgc-crm-registration-field-row input[type="text"],
.mgc-crm-registration-custom-field-row input[type="text"],
.mgc-crm-registration-custom-field-row select,
.mgc-crm-registration-custom-field-row textarea {
    width: 100%;
}

.mgc-crm-registration-custom-fields {
    border-top: 1px solid #dcdcde;
    margin-top: 10px;
    padding-top: 12px;
}

.mgc-crm-registration-custom-fields h4 {
    color: #143734;
}

.mgc-crm-checkin-workspace {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.mgc-crm-checkin-header {
    align-items: center;
    background: linear-gradient(120deg, #123f3a, #256251 58%, #d29f13);
    border-radius: 8px;
    color: #fff;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 20px;
}

.mgc-crm-checkin-header h2 {
    color: #fff;
    font-size: 24px;
    margin: 0 0 6px;
}

.mgc-crm-checkin-header p {
    color: #fff;
    margin: 0;
}

.mgc-crm-checkin-header .button {
    border-color: #fff;
}

.mgc-crm-checkin-summary {
    margin: 0;
}

.mgc-crm-checkin-search {
    margin: 0;
}

.mgc-crm-checkin-list {
    display: grid;
    gap: 12px;
}

.mgc-crm-checkin-row {
    align-items: center;
    background: #fff;
    border: 1px solid #dcdcde;
    border-left: 4px solid #dba617;
    border-radius: 4px;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 12px;
    padding: 14px;
}

.mgc-crm-checkin-row.is-checked-in {
    border-left-color: #008a20;
}

.mgc-crm-checkin-row h3 {
    margin: 0 0 4px;
}

.mgc-crm-checkin-row__main p {
    margin: 4px 0;
}

.mgc-crm-checkin-row__actions {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.mgc-crm-checkin-row__actions label {
    display: grid;
    gap: 4px;
}

.mgc-crm-checkin-row__actions input[type="number"] {
    width: 90px;
}

@media (max-width: 782px) {
    .mgc-crm-checkin-header,
    .mgc-crm-checkin-row {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .mgc-crm-checkin-header {
        display: grid;
    }

    .mgc-crm-checkin-row__actions {
        justify-content: flex-start;
    }
}

.mgc-crm-printable-registrations {
    display: none;
}

.mgc-crm-registration-redirect {
    color: #3c434a;
    font-size: 14px;
    margin: -4px 0 14px;
    padding: 0 12px 0 16px;
}

@media print {
    @page {
        margin: 0.45in;
    }

    html,
    body {
        background: #fff !important;
    }

    #adminmenumain,
    #wpadminbar,
    #wpfooter,
    #screen-meta,
    #screen-meta-links,
    .notice,
    .update-nag,
    .mgc-crm-registration-workspace > :not(.mgc-crm-printable-registrations) {
        display: none !important;
    }

    #wpcontent,
    #wpbody-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .mgc-crm-printable-registrations,
    .mgc-crm-printable-registrations * {
        display: revert !important;
    }

    .mgc-crm-printable-registrations {
        background: #fff;
        color: #1f2933;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 12px;
        line-height: 1.35;
        margin: 0 !important;
        padding: 0;
    }

    .mgc-crm-print-sheet-header {
        align-items: center;
        background: #123f3a !important;
        border-bottom: 5px solid #d29f13;
        color: #fff !important;
        display: flex !important;
        justify-content: space-between;
        margin: 0 0 18px;
        padding: 18px 20px;
    }

    .mgc-crm-print-sheet-header h1 {
        color: #fff !important;
        font-size: 24px;
        line-height: 1.15;
        margin: 4px 0 0;
    }

    .mgc-crm-print-brand {
        color: #f5c542 !important;
        display: block !important;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .mgc-crm-print-meta {
        color: #fff !important;
        display: grid !important;
        gap: 4px;
        max-width: 45%;
        text-align: right;
    }

    .mgc-crm-print-meta strong,
    .mgc-crm-print-meta span {
        color: #fff !important;
    }

    .mgc-crm-print-summary {
        border: 1px solid #d6d8db;
        border-left: 5px solid #d29f13;
        display: block !important;
        margin: 0 0 12px;
        padding: 8px 10px;
    }

    .mgc-crm-printable-registrations table {
        border-collapse: collapse;
        width: 100%;
    }

    .mgc-crm-printable-registrations th,
    .mgc-crm-printable-registrations td {
        border: 1px solid #c9ced3;
        padding: 8px;
        text-align: left;
        vertical-align: top;
    }

    .mgc-crm-printable-registrations th {
        background: #edf4f1 !important;
        color: #123f3a !important;
        font-size: 11px;
        text-transform: uppercase;
    }

    .mgc-crm-printable-registrations tbody tr:nth-child(even) td {
        background: #f7f9f8 !important;
    }

    .mgc-crm-printable-registrations a {
        color: #123f3a !important;
        text-decoration: none;
    }
}

.mgc-crm-email-log-body {
    background: #f6f8f7;
    border: 1px solid #d6d8db;
    border-radius: 6px;
    margin: 0;
    max-height: 320px;
    overflow: auto;
    padding: 12px;
    white-space: pre-wrap;
}

@media (max-width: 780px) {
    .mgc-crm-registration-field-row {
        grid-template-columns: 1fr;
    }

    .mgc-crm-registration-custom-field-row {
        grid-template-columns: 1fr;
    }
}
