.custom-feature-dialog .modal-body {
    background: #f8fafc;
}

.custom-loading,
.custom-empty {
    padding: 32px 16px;
    text-align: center;
    color: #64748b;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #fff;
}

.custom-callout,
.custom-panel,
.custom-section {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    padding: 16px;
}

.custom-callout {
    margin-bottom: 16px;
    border-left: 4px solid #0f9f94;
}

.custom-callout strong,
.custom-panel h4,
.custom-section h4 {
    color: #0f172a;
    font-size: 16px;
    font-weight: 800;
}

.custom-callout p,
.custom-panel p,
.custom-section-head p,
.custom-rule-item p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.6;
}

.custom-panel--accent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    border-color: #99f6e4;
    background: #f0fdfa;
}

.custom-section + .custom-section {
    margin-top: 16px;
}

.custom-section-head,
.remarks-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.custom-count {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #fff1f2;
    color: #e11d48;
    font-weight: 800;
}

.custom-inline-form,
.custom-rule-form,
.custom-filter-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    align-items: end;
}

.custom-panel .custom-inline-form {
    grid-template-columns: minmax(150px, 1fr) auto;
}

.custom-rule-form {
    grid-template-columns: 120px 1fr 1.6fr auto;
    margin-bottom: 14px;
}

.custom-invite-form {
    grid-template-columns: 1.4fr 1fr 100px auto;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    margin-bottom: 12px;
}

.custom-form {
    display: grid;
    gap: 14px;
}

.custom-form label,
.custom-filter-row label {
    display: grid;
    gap: 6px;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
}

.custom-form label small {
    color: #0f9f94;
    font-weight: 600;
}

.custom-alert-list,
.custom-rule-list,
.remarks-results {
    display: grid;
    gap: 10px;
}

.discipline-alert,
.custom-rule-item,
.remark-item {
    display: grid;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
}

.discipline-alert {
    grid-template-columns: 58px 1fr auto;
    border-left: 4px solid #f43f5e;
}

.discipline-alert__score {
    color: #e11d48;
    font-size: 21px;
    font-weight: 900;
    text-align: center;
}

.discipline-alert__body {
    min-width: 0;
}

.discipline-alert__body strong,
.discipline-alert__body span {
    display: block;
}

.discipline-alert__body span {
    margin-top: 2px;
    color: #64748b;
    font-size: 12px;
}

.discipline-alert__body p {
    margin: 6px 0 0;
    color: #334155;
    font-size: 13px;
}

.custom-rule-item {
    grid-template-columns: auto 1fr auto;
}

.custom-threshold {
    min-width: 64px;
    padding: 7px 9px;
    border-radius: 6px;
    color: #be123c;
    background: #fff1f2;
    text-align: center;
    font-weight: 800;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #cbd5e1;
}

.status-dot.is-active {
    background: #10b981;
    box-shadow: 0 0 0 4px #d1fae5;
}

.generated-link {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin: 12px 0;
    padding: 14px;
    border: 1px solid #99f6e4;
    border-radius: 8px;
    background: #f0fdfa;
}

.generated-link strong {
    grid-column: 1 / -1;
}

.custom-filter-row {
    margin-bottom: 16px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    grid-template-columns: 1fr 1fr 1fr 1.3fr auto;
}

.remark-item {
    align-items: start;
}

.remark-item > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.remark-item span,
.remarks-actions span {
    color: #64748b;
    font-size: 12px;
}

.remark-item textarea {
    width: 100%;
    line-height: 1.7;
    resize: vertical;
}

.remarks-actions {
    justify-content: flex-end;
}

.discipline-fab-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #e11d48;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
}

@media (max-width: 760px) {
    .custom-panel--accent {
        align-items: stretch;
        flex-direction: column;
    }

    .custom-inline-form,
    .custom-rule-form,
    .custom-invite-form,
    .custom-filter-row,
    .generated-link {
        grid-template-columns: 1fr;
    }

    .discipline-alert {
        grid-template-columns: 48px 1fr;
    }

    .discipline-alert .btn {
        grid-column: 1 / -1;
    }
}
