.custom-fields-screen{
    display:grid;
    gap:16px;
}

.custom-fields-head{
    display:flex;
    justify-content:space-between;
    gap:16px;
    align-items:flex-start;
}

.custom-fields-head h2{
    margin:0 0 6px;
}

.custom-fields-breadcrumb{
    margin:0 0 6px;
}

.custom-fields-head-actions{
    display:flex;
    justify-content:flex-end;
    gap:10px;
    flex-wrap:wrap;
}

.custom-fields-list-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    flex-wrap:wrap;
}

.custom-fields-list-toolbar{
    display:flex;
    justify-content:flex-end;
    gap:10px;
    flex-wrap:wrap;
    margin-left:auto;
}

.custom-fields-subtitle{
    color:#667085;
    font-size:14px;
    line-height:1.4;
}

.custom-fields-layout{
    display:grid;
    grid-template-columns:minmax(0, 1fr);
    gap:16px;
    align-items:start;
    min-width:0;
}

.custom-fields-panel{
    display:grid;
    gap:12px;
    min-width:0;
    padding:16px;
    border:1px solid #e4ebf5;
    border-radius:12px;
    background:#fbfdff;
}

.custom-fields-panel h3{
    margin:0;
    color:#0f172a;
    font-size:18px;
}

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

.custom-field-form-meta{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}

.custom-field-system-note{
    padding:10px 12px;
    border:1px solid #d7e3f7;
    border-radius:8px;
    background:#f5f9ff;
    color:#475467;
    font-size:13px;
    line-height:1.35;
}

.custom-field-check{
    display:flex;
    align-items:center;
    gap:8px;
    margin:0;
    color:#344054;
    font-weight:600;
}

.custom-field-check input{
    width:auto;
    margin:0;
}

.custom-field-form-actions{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

.custom-fields-table-wrap{
    overflow:auto;
}

.custom-fields-group-title{
    margin:2px 0 10px;
    color:#0f172a;
    font-size:15px;
    font-weight:800;
}

.custom-fields-group-title-muted{
    color:#667085;
}

.custom-fields-group-separator{
    margin:18px 0 14px;
    border-top:1px solid #e4ebf5;
}

.custom-fields-table{
    width:100%;
    border-collapse:collapse;
    min-width:1020px;
}

.custom-fields-table th,
.custom-fields-table td{
    padding:10px 12px;
    border-bottom:1px solid #e4ebf5;
    text-align:left;
    vertical-align:middle;
}

.custom-fields-table th{
    color:#475467;
    font-size:13px;
    font-weight:700;
}

.custom-fields-table td{
    color:#111827;
    font-size:14px;
}

.custom-fields-row-clickable{
    cursor:default;
}

.custom-fields-row-clickable:hover td{
    background:#f6f9ff;
}

.custom-fields-table th:last-child,
.custom-fields-table td:last-child{
    position:sticky;
    right:0;
    z-index:1;
    width:300px;
    min-width:300px;
    background:#fbfdff;
    box-shadow:-10px 0 16px rgba(15,23,42,.06);
}

.custom-fields-table th:last-child{
    z-index:2;
}

.custom-fields-table tbody tr:hover td:last-child{
    background:#f6f9ff;
}

.custom-fields-edit-row td:last-child{
    background:#f6f9ff;
}

.custom-fields-row-inactive td:last-child{
    background:#f7f9fc;
}

.custom-fields-group-row td:last-child{
    background:#f8fafc;
}

.custom-fields-table .custom-fields-edit-head,
.custom-fields-table .custom-fields-edit-cell{
    width:44px;
    min-width:44px;
    max-width:44px;
    padding-left:6px;
    padding-right:6px;
    text-align:center;
}

.custom-fields-row-inactive td{
    color:#667085;
    background:#f7f9fc;
}

.custom-fields-table-inactive{
    opacity:.92;
}

.custom-fields-name-cell{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}

.custom-fields-status-pill{
    display:inline-flex;
    align-items:center;
    min-height:22px;
    padding:2px 8px;
    border:1px solid #d0d7e2;
    border-radius:999px;
    background:#eef2f7;
    color:#475467;
    font-size:12px;
    font-weight:700;
}

.custom-fields-kind-pill{
    display:inline-flex;
    align-items:center;
    min-height:22px;
    padding:2px 8px;
    border:1px solid transparent;
    border-radius:999px;
    font-size:12px;
    font-weight:800;
    white-space:nowrap;
}

.custom-fields-kind-system{
    border-color:#bad7ff;
    background:#eef6ff;
    color:#175cd3;
}

.custom-fields-kind-custom{
    border-color:#c9ead5;
    background:#effaf3;
    color:#1f7a3b;
}

.custom-fields-group-row td{
    padding-top:14px;
    padding-bottom:8px;
    background:#f8fafc;
    color:#344054;
    font-size:13px;
    font-weight:800;
    text-transform:none;
}

.custom-fields-actions{
    white-space:nowrap;
    text-align:right;
}

.custom-fields-edit-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:32px;
    height:32px;
    margin-right:6px;
    border:1px solid #d7e3f7;
    border-radius:8px;
    background:#fff;
    color:#175cd3;
    opacity:0;
    transform:translateX(-3px);
    transition:opacity .15s ease, background .15s ease, border-color .15s ease;
}

.custom-fields-row-clickable:hover .custom-fields-edit-btn,
.custom-fields-row-clickable:focus-within .custom-fields-edit-btn{
    opacity:1;
    transform:translateX(0);
}

.custom-fields-edit-btn:hover{
    border-color:#9fc5ff;
    background:#eef6ff;
}

.custom-fields-action{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:32px;
    padding:6px 10px;
}

.custom-fields-action-danger{
    border-color:#f0c4c4;
    color:#a13b3b;
}

.custom-fields-action-danger:hover{
    border-color:#d96b6b;
    background:#fff1f1;
    color:#842b2b;
}

.custom-fields-empty{
    padding:14px 0;
    color:#667085;
}

.custom-fields-edit-row td{
    background:#f6f9ff;
}

.custom-field-inline-check span{
    color:#475467;
    font-size:12px;
    font-weight:700;
}

.custom-field-inline-control,
.custom-field-locked-control{
    width:100%;
    min-height:36px;
    padding:7px 10px;
    border:1px solid #d7dfea;
    border-radius:8px;
    background:#fff;
    color:#111827;
    font-size:14px;
}

.custom-fields-edit-row .custom-fields-edit-cell form{
    display:none;
}

.custom-field-locked-control{
    text-align:left;
    color:#667085;
    cursor:not-allowed;
}

.custom-field-locked-control:hover{
    border-color:#c7d2e5;
    background:#f8fafc;
}

.custom-field-inline-check{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:7px;
    min-height:36px;
    margin:0;
    padding:0;
    white-space:nowrap;
}

button.custom-field-inline-check{
    padding:0;
    border:0;
    background:transparent;
    color:#475467;
    font:inherit;
    cursor:not-allowed;
}

.custom-field-inline-check input{
    width:auto;
    margin:0;
}

.custom-field-cursor-hint{
    position:fixed;
    z-index:10000;
    max-width:260px;
    padding:8px 10px;
    border:1px solid #d7e3f7;
    border-radius:8px;
    background:#111827;
    color:#fff;
    box-shadow:0 8px 22px rgba(15,23,42,.18);
    font-size:13px;
    line-height:1.3;
    pointer-events:none;
}

.custom-field-inline-actions{
    display:flex;
    gap:10px;
    justify-content:flex-end;
    flex-wrap:nowrap;
    align-items:center;
}

.custom-field-inline-actions .custom-fields-status-pill,
.custom-field-inline-actions .custom-fields-kind-pill{
    display:none;
}

.custom-field-inline-actions button{
    min-width:96px;
}

.custom-field-inline-placeholder{
    display:flex;
    align-items:center;
    min-height:36px;
    color:#98a2b3;
}

@media (max-width: 900px){
    .custom-fields-head,
    .custom-fields-layout{
        grid-template-columns:1fr;
    }

    .custom-fields-head{
        display:grid;
    }

}
