﻿    position:fixed;
    inset:0;
    background:rgba(15,23,42,0.36);
    backdrop-filter:blur(2px);
    opacity:0;
    pointer-events:none;
    transition:0.2s ease;
    z-index:40;
}
.drawer-overlay{
    position:fixed;
    inset:0;
    background:rgba(15,23,42,0.36);
    backdrop-filter:blur(2px);
    opacity:0;
    pointer-events:none;
    transition:0.2s ease;
    z-index:40;
}

.drawer-overlay.show{
    opacity:1;
    pointer-events:auto;
}

.repair-drawer{
    position:fixed;
    top:0;
    right:0;
    height:100vh;
    width:min(1358px, calc(100vw - 197px));
    background:#ffffff;
    border-left:1px solid var(--line);
    box-shadow:var(--shadow);
    transform:translateX(100%);
    transition:0.24s ease;
    z-index:50;
    overflow:hidden;
}

.repair-drawer.show{
    transform:translateX(0);
}

.drawer-shell{
    height:100%;
    min-height:0;
    display:grid;
    grid-template-columns:minmax(0, 1fr) 358px;
    grid-template-rows:minmax(0, 1fr) auto;
    column-gap:12px;
    align-items:stretch;
}

.drawer-shell.timeline-rail-collapsed{
    grid-template-columns:minmax(0, 1fr) 34px;
}

.drawer-main-shell{
    min-width:0;
    min-height:0;
    display:flex;
    flex-direction:column;
}

.drawer-side-shell{
    min-width:0;
    min-height:0;
    padding:0 14px 12px 0;
    display:flex;
    align-items:stretch;
    gap:8px;
    overflow:visible;
}

.drawer-side-shell.collapsed{
    padding:0 8px 12px 0;
}

.timeline-card{
    background:#eef5ff;
    border:1px solid #d9e6fb;
    border-radius:16px;
    padding:12px;
    width:100%;
    height:100%;
    min-height:0;
    display:flex;
    flex-direction:column;
    box-sizing:border-box;
    overflow:hidden;
    transition:opacity 0.18s ease, transform 0.22s ease, width 0.22s ease, padding 0.22s ease;
}

.drawer-header{
    background:white;
    border-bottom:1px solid var(--line);
    padding:14px 18px 10px;
    flex-shrink:0;
}

.drawer-header-top{
    display:flex;
    justify-content:flex-start;
    align-items:flex-start;
    gap:12px;
    margin-bottom:10px;
}

.drawer-header-actions{
    display:flex;
    align-items:flex-start;
    gap:8px;
    margin:-46px 0 8px;
}

.drawer-header-side{
    margin-left:auto;
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:8px;
    flex:0 0 auto;
}

.drawer-title-wrap{
    min-width:0;
    flex:0 1 auto;
}

.drawer-title{
    margin:0;
    font-size:22px;
    line-height:1.2;
}

.drawer-subtitle{
    margin-top:6px;
    font-size:13px;
    color:var(--muted);
}

.drawer-subtitle{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
}

.drawer-header-referrer-control{
    position:relative;
    display:inline-flex;
    align-items:center;
    gap:6px;
    min-height:28px;
    color:#667085;
}

.drawer-header-referrer-label{
    color:#667085;
}

.drawer-header-referrer-control .referrer-selected-name{
    margin-top:0;
}

.drawer-header-referrer-input{
    width:220px;
    height:30px;
    padding:5px 9px;
    font-size:13px;
}

.drawer-header-referrer-results{
    position:absolute;
    top:calc(100% + 4px);
    left:58px;
    width:260px;
    z-index:90;
    margin-top:0;
}

.drawer-close{
    width:36px;
    height:36px;
    padding:0;
    min-height:36px;
    border-radius:8px;
    background:#f3f6fb;
    color:#344054;
    border:1px solid #d9e2f1;
    font-size:18px;
    line-height:1;
}

.drawer-close:hover{
    background:#e9eef8;
}

.drawer-status-select{
    display:inline-flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    min-width:112px;
    max-width:148px;
    min-height:40px;
    height:auto;
    padding:5px 24px 5px 10px;
    border:1px solid var(--status-select-border, #d9e2f1);
    border-radius:6px;
    background:var(--status-select-bg, #fff);
    color:#ffffff;
    font-size:12px;
    font-weight:500;
    line-height:1.1;
    cursor:pointer;
    box-shadow:inset 0 0 0 1px rgba(15,23,42,0.10);
}

.drawer-status-select::after{
    content:"▾";
    font-size:11px;
    line-height:1;
    color:#667085;
    flex-shrink:0;
}

.drawer-status-select-label{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:normal;
    flex:1 1 auto;
}

.status-trigger-lines{
    display:grid;
    min-width:0;
    line-height:1.1;
}

.status-trigger-stage{
    display:block;
    font-size:10px;
    color:#667085;
    margin-bottom:2px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.status-trigger-text{
    display:block;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.drawer-status-picker{
    position:relative;
    display:inline-flex;
    flex-direction:column;
}

.drawer-status-menu{
    position:absolute;
    top:calc(100% + 6px);
    left:0;
    min-width:176px;
    padding:8px;
    border:1px solid #d9e2f1;
    border-radius:12px;
    background:#ffffff;
    box-shadow:0 14px 36px rgba(15,23,42,0.14);
    display:none;
    z-index:40;
}

.drawer-status-picker.open .drawer-status-menu{
    display:grid;
    gap:6px;
}

.drawer-status-group{
    display:grid;
    gap:6px;
}

.drawer-status-group + .drawer-status-group{
    margin-top:2px;
}

.drawer-status-group-title{
    padding:2px 4px 0;
    color:#667085;
    font-size:12px;
    line-height:1.2;
}

.drawer-status-group-list{
    display:grid;
    gap:6px;
}

.drawer-status-option-row{
    width:100%;
    padding:3px 6px;
    border-radius:8px;
    transition:background 0.15s ease;
}

.drawer-status-option-row:hover{
    background:#eef1f5;
}

.drawer-status-option{
    width:auto;
    max-width:100%;
    display:inline-flex;
    align-items:center;
    min-height:34px;
    padding:7px 10px;
    border:1px solid var(--status-select-border, #d9e2f1);
    border-radius:8px;
    background:var(--status-select-bg, #ffffff);
    color:#ffffff;
    font-size:13px;
    font-weight:500;
    line-height:1.2;
    text-align:left;
    box-shadow:inset 0 0 0 1px rgba(15,23,42,0.10);
}

.drawer-status-option.active{
    box-shadow:inset 0 0 0 1px rgba(24,34,48,0.10);
}

.drawer-status-option:hover{
    box-shadow:inset 0 0 0 1px rgba(15,23,42,0.10);
}

.drawer-header-tool-row{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    justify-content:flex-end;
    margin-top:19px;
}

.drawer-header-tool{
    min-height:34px;
    padding:7px 12px;
    border:1px solid #d9e2f1;
    border-radius:8px;
    background:#fff;
    color:#344054;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    font-size:14px;
    font-weight:500;
}

.drawer-header-tool:hover{
    background:#f8fbff;
}

.drawer-header-tool-icon{
    min-width:46px;
    padding:7px 10px;
}

.drawer-header-tool svg{
    width:18px;
    height:18px;
    flex-shrink:0;
}

.drawer-header-tool-caret{
    font-size:11px;
    line-height:1;
    color:#667085;
}

.drawer-header-actions-menu-wrap{
    position:relative;
    display:inline-flex;
}

.drawer-header-actions-menu{
    position:absolute;
    top:calc(100% + 6px);
    right:0;
    z-index:30;
    min-width:238px;
    padding:6px;
    border:1px solid #d9e2f1;
    border-radius:8px;
    background:#fff;
    box-shadow:0 14px 34px rgba(15,23,42,0.14);
    display:none;
}

.drawer-header-actions-menu-wrap.open .drawer-header-actions-menu{
    display:block;
}

.drawer-header-actions-menu button{
    width:100%;
    min-height:34px;
    padding:8px 10px;
    border:0;
    border-radius:6px;
    background:transparent;
    color:#344054;
    font-size:14px;
    font-weight:500;
    text-align:left;
}

.drawer-header-actions-menu button:hover{
    background:#f3f7fd;
}

.drawer-tabs{
    display:flex;
    gap:22px;
    flex-wrap:wrap;
    align-items:flex-end;
    padding-top:27px;
}

.drawer-tab{
    padding:0 0 10px;
    border:none;
    border-radius:0;
    background:transparent;
    color:#667085;
    font-size:15px;
    font-weight:700;
    line-height:1.2;
    border-bottom:2px solid transparent;
}

.drawer-tab.active{
    color:#1d4ed8;
    border-bottom-color:#1d4ed8;
}

.drawer-tab.disabled{
    opacity:1;
    color:#98a2b3;
}

.drawer-body{
    padding:12px 14px 16px;
    overflow:auto;
    flex:1 1 auto;
    min-height:0;
    box-sizing:border-box;
}

.drawer-main{
    min-width:0;
}

.drawer-grid{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
    align-items:start;
    margin-bottom:12px;
}

.drawer-column{
    min-width:0;
}

.field-stack{
    display:grid;
    gap:12px;
}

.drawer-responsibles-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    align-items:center;
}

.drawer-responsibles-grid .inline-pair-stack{
    margin-top:0;
}

.drawer-responsibles-grid .inline-pair{
    grid-template-columns:max-content minmax(0, 1fr);
}

@media (max-width: 980px){
    .drawer-responsibles-grid{
        grid-template-columns:1fr;
    }
}

.repair-type-select-field .device-label{
    margin:0 0 6px;
}

.custom-field-toggle-row{
    margin-bottom:0;
}

.drawer-custom-fields-card{
    margin-top:12px;
}

.drawer-custom-fields-zone-card{
    margin-top:0;
}

.drawer-custom-fields-zone{
    margin-top:12px;
}

.drawer-custom-fields-zone-builder{
    min-height:28px;
    padding:6px;
    border:1px dashed transparent;
    border-radius:8px;
    transition:background .15s ease, border-color .15s ease;
}

.drawer-custom-fields-zone-builder.order-card-builder-zone-drop{
    border-color:#2f80ed;
    background:#f1f8ff;
}

.drawer-custom-field{
    display:grid;
    gap:6px;
}

.order-card-builder-live-custom-field{
    position:relative;
    padding:8px;
    border:1px solid transparent;
    border-radius:8px;
    cursor:grab;
    transition:background .15s ease, border-color .15s ease, opacity .15s ease;
}

.order-card-builder-live-custom-field:hover{
    border-color:#bfd3ea;
    background:#f8fbff;
}

.order-card-builder-live-custom-field:active{
    cursor:grabbing;
}

.order-card-builder-live-custom-field.order-card-builder-dragging{
    opacity:.45;
    border-color:#70a8d9;
    background:#eef7ff;
}

.order-card-builder-live-custom-field.order-card-builder-drop-before::before,
.order-card-builder-live-custom-field.order-card-builder-drop-after::after{
    content:"";
    position:absolute;
    left:8px;
    right:8px;
    height:3px;
    border-radius:8px;
    background:#2f80ed;
}

.order-card-builder-live-custom-field.order-card-builder-drop-before::before{
    top:-7px;
}

.order-card-builder-live-custom-field.order-card-builder-drop-after::after{
    bottom:-7px;
}

.drawer-custom-field-empty{
    padding:10px 12px;
    border:1px dashed #cfd8e3;
    border-radius:8px;
    background:#ffffff;
    color:#667085;
    font-size:13px;
}

.drawer-custom-field-check{
    display:flex;
    align-items:center;
    gap:8px;
    min-height:36px;
    margin:0;
    color:#344054;
    font-weight:600;
}

.drawer-custom-field-check input{
    width:auto;
    margin:0;
}

.meta-row{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
    margin-bottom:12px;
    align-items:start;
}

.meta-row-single{
    grid-template-columns:1fr;
}

.documents-grid{
    display:grid;
    grid-template-columns:repeat(4, minmax(0, 1fr));
    gap:10px;
}

.documents-grid button{
    width:100%;
}

.drawer-services-layout{
    display:grid;
    gap:12px;
}

.drawer-services-card{
    display:grid;
    gap:10px;
}

.drawer-line-search-card{
    display:grid;
    gap:8px;
}

.repair-line-search-layout{
    display:grid;
    grid-template-columns:178px minmax(0, 1fr);
    gap:12px;
    align-items:end;
}

.drawer-line-search-card label{
    color:#0f172a;
    font-weight:700;
}

.repair-line-executor-field,
.repair-line-search-field{
    min-width:0;
    display:grid;
    gap:7px;
}

.repair-line-executors-select-wrap{
    position:relative;
    display:flex;
    align-items:center;
    min-width:0;
}

.repair-line-executors-select{
    width:100%;
    min-height:38px;
    padding:6px 26px 6px 38px;
    border:1px solid transparent;
    border-radius:8px;
    background:#fff;
    color:#344054;
    font-size:13px;
    font-weight:600;
}

.repair-line-executors-select:hover,
.repair-line-executors-select:focus{
    border-color:#d9e2f1;
    background:#f8fbff;
}

.repair-line-executors-avatar{
    position:absolute;
    left:8px;
    z-index:1;
    pointer-events:none;
    width:22px;
    height:22px;
    border-radius:50%;
    background:#7c3aed;
    color:#fff;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    flex:0 0 auto;
    font-size:12px;
    font-weight:800;
}

.drawer-line-search{
    display:grid;
    grid-template-columns:1fr;
    align-items:center;
}

.drawer-line-search input{
    width:100%;
}

.repair-line-search-actions{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:8px;
    margin-top:8px;
}

.repair-line-search-actions[hidden]{
    display:none;
}

.repair-line-search-empty{
    color:#667085;
    font-size:12px;
    font-weight:600;
}

.repair-line-search-actions button{
    border:1px solid #d9e2f1;
    border-radius:8px;
    background:#fff;
    color:#2563eb;
    cursor:pointer;
    font-size:12px;
    font-weight:700;
    line-height:1;
    padding:8px 10px;
}

.repair-line-search-actions button:hover{
    border-color:#bcd0f5;
    background:#f8fbff;
}

@media (max-width: 760px){
    .repair-line-search-layout{
        grid-template-columns:1fr;
    }
}

.drawer-services-separator{
    border-top:1px solid var(--line);
    margin:0;
}

.repair-line-employee-row td{
    padding:14px 8px 8px;
    border-bottom:1px solid var(--line);
    color:#0f172a;
    font-weight:800;
}

.drawer-services-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:14px;
    flex-wrap:wrap;
}

.drawer-services-subtitle{
    margin-top:4px;
    color:#667085;
    font-size:13px;
    line-height:1.35;
}

.repair-services-table-wrap{
    overflow:auto;
}

.repair-services-table{
    width:100%;
    min-width:860px;
    border-collapse:collapse;
}

.repair-services-table th,
.repair-services-table td{
    padding:12px 8px;
    border-bottom:1px solid var(--line);
    text-align:left;
    vertical-align:middle;
}

.repair-services-table th{
    color:#475467;
    font-size:13px;
    font-weight:700;
}

.repair-services-table:not(.repair-payments-table) th{
    text-align:center;
}

.repair-line-name-cell{
    display:flex;
    align-items:center;
    gap:10px;
}

.repair-line-name-wrap{
    display:grid;
    gap:4px;
    flex:1 1 auto;
    min-width:0;
}

.repair-line-name{
    color:#2563eb;
    font-weight:600;
    line-height:1.25;
}

.repair-line-comment-add,
.repair-line-comment-text{
    border:0;
    background:transparent;
    padding:0 0 0 4px;
    color:#667085;
    font:inherit;
    cursor:pointer;
}

.repair-line-comment-add{
    font-weight:800;
}

.repair-line-comment-add:hover,
.repair-line-comment-text:hover{
    color:#344054;
    text-decoration:underline;
}

.repair-line-comment-text{
    font-weight:500;
}

.repair-line-comment-static{
    padding-left:4px;
    color:#667085;
    font-weight:500;
}

.repair-line-comment-dialog textarea{
    width:100%;
    min-height:92px;
    resize:vertical;
}

.repair-line-comment-title{
    margin-bottom:8px;
    color:#344054;
    font-weight:700;
}

.repair-line-sku,
.repair-line-muted{
    color:#667085;
    font-size:13px;
}

.repair-line-inline-value{
    border:0;
    background:transparent;
    padding:3px 4px;
    border-radius:4px;
    color:#0f172a;
    font:inherit;
    cursor:pointer;
}

.repair-line-inline-value:hover{
    background:#eef4ff;
    color:#1d4ed8;
}

.repair-line-inline-value-readonly,
.repair-line-inline-value-readonly:hover{
    background:transparent;
    color:#0f172a;
    cursor:default;
}

.drawer-services-locked-note{
    color:#667085;
    font-size:14px;
    font-weight:700;
}

.repair-line-inline-input{
    width:100%;
    max-width:110px;
    height:30px;
    padding:3px 6px;
}

.repair-line-inline-warranty-editor{
    display:inline-grid;
    grid-template-columns:64px 28px 28px;
    align-items:center;
    justify-content:end;
}

.repair-line-inline-warranty-editor .repair-line-inline-input{
    width:64px;
    max-width:none;
    border-radius:6px 0 0 6px;
}

.repair-line-inline-warranty-editor button{
    height:30px;
    min-width:0;
    padding:0;
    border:1px solid var(--line);
    border-left:0;
    border-radius:0;
    background:#f8fafc;
    color:#344054;
    font-weight:700;
    cursor:pointer;
}

.repair-line-inline-warranty-editor button:last-child{
    border-radius:0 6px 6px 0;
}

.repair-line-inline-warranty-editor button.active{
    background:#dcfce7;
    color:#166534;
    border-color:#86efac;
}

.repair-line-type-icon{
    flex:0 0 26px;
    width:26px;
    height:26px;
    border-radius:6px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    font-size:13px;
    font-weight:800;
    line-height:1;
}

.repair-line-type-service{
    background:#eaf2ff;
    border:1px solid #bfd6ff;
}

.repair-line-type-service::before{
    content:"🛠";
    color:#2563eb;
    font-size:15px;
}

.repair-line-type-product{
    background:#fff7df;
    border:1px solid #f0d28a;
}

.repair-line-type-product::before{
    content:"📦";
    font-size:15px;
}

.repair-services-table:not(.repair-payments-table) th:nth-child(1),
.repair-services-table:not(.repair-payments-table) td:nth-child(1){
    width:auto;
    min-width:360px;
}

.repair-services-table:not(.repair-payments-table) th:nth-child(2),
.repair-services-table:not(.repair-payments-table) td:nth-child(2),
.repair-services-table:not(.repair-payments-table) th:nth-child(3),
.repair-services-table:not(.repair-payments-table) td:nth-child(3){
    width:120px;
}

.repair-services-table:not(.repair-payments-table) td:nth-child(2),
.repair-services-table:not(.repair-payments-table) td:nth-child(3),
.repair-services-table:not(.repair-payments-table) td:nth-child(4){
    text-align:right;
}

.repair-services-table:not(.repair-payments-table) th:nth-child(2),
.repair-services-table:not(.repair-payments-table) th:nth-child(3),
.repair-services-table:not(.repair-payments-table) th:nth-child(4){
    text-align:center;
}

.repair-services-table:not(.repair-payments-table) th:nth-child(4),
.repair-services-table:not(.repair-payments-table) td:nth-child(4){
    width:130px;
}

.repair-line-warranty{
    flex:0 0 auto;
    margin-left:auto;
    color:#475467;
    white-space:nowrap;
    text-align:right;
}

.repair-line-warranty .repair-line-inline-value{
    display:inline-flex;
    align-items:center;
    gap:7px;
}

.repair-line-warranty .repair-line-inline-value.has-warranty::before{
    content:"";
    width:18px;
    height:20px;
    flex:0 0 18px;
    background:#16a34a;
    background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 24 26' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 1.8 21 4.6v7.1c0 5.8-3.6 10.6-9 12.5-5.4-1.9-9-6.7-9-12.5V4.6l9-2.8Z' fill='%2316a34a' stroke='%23166534' stroke-width='2.4' stroke-linejoin='round'/%3E%3Cpath d='m7.2 13.1 3 3.1 6.7-7.2' fill='none' stroke='white' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-color:transparent;
    background-repeat:no-repeat;
    background-position:center;
    background-size:contain;
}

.repair-service-total{
    position:relative;
    font-weight:700;
    color:#0f172a;
    white-space:nowrap;
    text-align:right;
}

.repair-line-total-value{
    display:inline-flex;
    align-items:center;
    justify-content:flex-end;
    min-height:28px;
    transition:opacity .12s ease;
}

.repair-line-row-actions{
    position:absolute;
    right:6px;
    top:50%;
    transform:translateY(-50%);
    display:inline-flex;
    align-items:center;
    justify-content:flex-end;
    gap:4px;
    opacity:0;
    pointer-events:none;
    transition:opacity .12s ease;
}

.repair-services-table tbody tr:hover .repair-line-total-value,
.repair-services-table tbody tr:focus-within .repair-line-total-value{
    opacity:0;
}

.repair-services-table tbody tr:hover .repair-line-row-actions,
.repair-services-table tbody tr:focus-within .repair-line-row-actions{
    opacity:1;
    pointer-events:auto;
}

.repair-service-actions{
    display:flex;
    justify-content:flex-end;
    align-items:center;
    gap:6px;
}

.repair-service-delete{
    color:#a13b3b;
    border-color:#f0c4c4;
}

.repair-line-icon-btn{
    width:28px;
    height:28px;
    padding:0;
    border:0;
    border-radius:6px;
    background:transparent;
    color:#2563eb;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
}

.repair-line-icon-btn:hover{
    background:#eaf2ff;
}

.repair-line-icon-btn svg{
    width:17px;
    height:17px;
    fill:currentColor;
}

.repair-line-editor-backdrop{
    position:fixed;
    inset:0;
    background:rgba(15, 23, 42, .58);
    z-index:1100;
}

.repair-line-editor-panel{
    position:fixed;
    top:0;
    right:0;
    bottom:0;
    width:min(440px, 100vw);
    background:#fff;
    z-index:1101;
    box-shadow:-10px 0 28px rgba(15, 23, 42, .2);
    display:grid;
    grid-template-rows:auto 1fr auto;
}

.repair-line-editor-head{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:16px;
    padding:18px 16px 12px;
    border-bottom:1px solid var(--line);
}

.repair-line-editor-head h3{
    margin:0;
    color:#344054;
    font-size:24px;
    line-height:1.15;
    font-weight:500;
}

.repair-line-editor-close{
    border:0;
    background:transparent;
    color:#667085;
    font-size:28px;
    line-height:1;
    padding:0;
    width:28px;
    height:28px;
}

.repair-line-editor-body{
    padding:16px;
    display:flex;
    flex-direction:column;
    gap:14px;
}

.repair-line-editor-field{
    display:grid;
    gap:6px;
    margin:0;
    color:#344054;
    font-weight:600;
}

.repair-line-editor-field input,
.repair-line-editor-field select,
.repair-line-editor-field textarea{
    width:100%;
}

.repair-line-editor-field textarea{
    min-height:86px;
    resize:vertical;
}

.repair-line-editor-segmented{
    display:grid;
    grid-template-columns:minmax(0, 1fr) 40px 40px;
    align-items:stretch;
}

.repair-line-editor-segmented input{
    border-radius:6px 0 0 6px;
}

.repair-line-editor-segmented button{
    min-width:0;
    padding:0;
    border:1px solid var(--line);
    border-left:0;
    border-radius:0;
    background:#f8fafc;
    color:#344054;
    font-weight:700;
}

.repair-line-editor-segmented button:last-child{
    border-radius:0 6px 6px 0;
}

.repair-line-editor-segmented button.active{
    background:#eaf2ff;
    color:#2563eb;
    border-color:#bfd6ff;
}

.repair-line-editor-footer{
    padding:14px 16px;
    border-top:1px solid var(--line);
    background:#eef4ff;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
}

.repair-line-editor-delete{
    width:44px;
    height:44px;
    padding:0;
    border:0;
    border-radius:6px;
    background:#e51b2b;
    color:#fff;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

.repair-line-editor-delete svg{
    width:20px;
    height:20px;
    fill:currentColor;
}

.drawer-services-empty{
    padding:16px;
    border:1px dashed #cfd8e3;
    border-radius:8px;
    background:#fbfdff;
    color:#667085;
}

.drawer-services-summary{
    display:flex;
    justify-content:flex-end;
    align-items:center;
    gap:10px;
    padding-top:4px;
    font-size:15px;
}

.drawer-services-summary strong{
    color:#0f172a;
    font-size:18px;
}

.drawer-financial-card{
    display:grid;
    gap:7px;
    justify-items:end;
    padding-top:10px;
    padding-bottom:10px;
}

.drawer-financial-row{
    display:grid;
    grid-template-columns:170px 110px;
    column-gap:10px;
    align-items:center;
    justify-content:end;
    width:min(100%, 290px);
    min-height:24px;
}

.drawer-financial-row span{
    color:#1f2937;
    font-size:13px;
    text-align:right;
}

.drawer-financial-row strong{
    color:#0f172a;
    font-size:14px;
    font-weight:700;
    text-align:right;
}

.drawer-financial-discount{
    margin:0;
}

.drawer-financial-discount button{
    position:relative;
    justify-self:end;
    border:0;
    background:transparent;
    padding:0;
    color:#2563eb;
    font:inherit;
    cursor:pointer;
}

.drawer-financial-discount button:hover{
    text-decoration:underline;
}

.drawer-financial-discount button::after{
    content:attr(data-discount-tooltip);
    position:absolute;
    left:50%;
    bottom:calc(100% + 7px);
    transform:translateX(-50%);
    padding:5px 8px;
    border-radius:6px;
    background:#1f2937;
    color:#fff;
    font-size:12px;
    font-weight:700;
    line-height:1;
    white-space:nowrap;
    opacity:0;
    pointer-events:none;
    transition:opacity .12s ease;
    z-index:5;
}

.drawer-financial-discount button::before{
    content:"";
    position:absolute;
    left:50%;
    bottom:calc(100% + 2px);
    transform:translateX(-50%);
    border:5px solid transparent;
    border-top-color:#1f2937;
    opacity:0;
    pointer-events:none;
    transition:opacity .12s ease;
    z-index:5;
}

.drawer-financial-discount button:hover::after,
.drawer-financial-discount button:hover::before,
.drawer-financial-discount button:focus-visible::after,
.drawer-financial-discount button:focus-visible::before{
    opacity:1;
}

.drawer-financial-discount strong{
    color:#0f172a;
}

.drawer-financial-divider{
    width:min(100%, 290px);
    border-top:1px solid var(--line);
    margin:2px 0;
}

.drawer-financial-total{
    padding:5px 8px;
    border-radius:6px;
    background:#e9eaec;
}

.drawer-financial-total span{
    color:#0f172a;
}

.drawer-financial-total strong{
    color:#0f172a;
    font-weight:700;
}

.drawer-financial-total strong{
    font-size:14px;
}

.drawer-financial-profit{
    margin-top:4px;
}

.repair-discount-dialog .crm-modal-body{
    display:grid;
    gap:12px;
}

.repair-discount-dialog-field{
    display:grid;
    gap:6px;
    margin:0;
    color:#344054;
    font-weight:600;
}

.repair-discount-dialog-control{
    display:grid;
    grid-template-columns:minmax(0, 1fr) 42px 42px;
}

.repair-discount-dialog-control input{
    width:100%;
    border-radius:6px 0 0 6px;
}

.repair-discount-dialog-control button{
    min-width:0;
    padding:0;
    border:1px solid var(--line);
    border-left:0;
    border-radius:0;
    background:#f8fafc;
    color:#344054;
    font-weight:700;
    cursor:pointer;
}

.repair-discount-dialog-control button:last-child{
    border-radius:0 6px 6px 0;
}

.repair-discount-dialog-control button.active{
    background:#eaf2ff;
    color:#2563eb;
    border-color:#bfd6ff;
}

.repair-discount-templates{
    display:grid;
    grid-template-columns:minmax(0, 1fr) 34px;
    gap:6px;
    align-items:center;
    margin-top:7px;
}

.repair-discount-template-items{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:6px;
}

.repair-discount-template-items button,
.repair-discount-template-items input{
    height:28px;
    min-width:0;
    border:1px solid #dbe5f2;
    border-radius:6px;
    background:#f8fafc;
    color:#344054;
    font-size:12px;
    font-weight:700;
    text-align:center;
}

.repair-discount-template-items button{
    cursor:pointer;
}

.repair-discount-template-items button:hover{
    background:#eaf2ff;
    color:#2563eb;
    border-color:#bfd6ff;
}

.repair-discount-template-items input{
    padding:0 4px;
}

.repair-discount-template-edit{
    width:34px;
    height:28px;
    padding:0;
    border:1px solid #dbe5f2;
    border-radius:6px;
    background:#fff;
    color:#667085;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
}

.repair-discount-template-edit:hover,
.repair-discount-template-edit.active{
    background:#eaf2ff;
    color:#2563eb;
    border-color:#bfd6ff;
}

.repair-discount-template-edit svg{
    width:15px;
    height:15px;
    fill:currentColor;
}

.repair-discount-dialog-note{
    margin:0;
    color:#667085;
    font-size:13px;
    line-height:1.45;
}

.drawer-payments-summary-card{
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:12px;
}

.drawer-payment-metric{
    padding:14px;
    border:1px solid var(--line);
    border-radius:8px;
    background:#fbfdff;
}

.drawer-payment-metric span{
    display:block;
    color:#667085;
    font-size:13px;
    margin-bottom:6px;
}

.drawer-payment-metric strong{
    color:#0f172a;
    font-size:22px;
}

.drawer-payment-metric.debt strong{
    color:#a13b3b;
}

.drawer-payment-metric.paid strong{
    color:#16803a;
}

.drawer-payments-card{
    display:grid;
    gap:14px;
}

.repair-payment-head-actions{
    display:flex;
    align-items:center;
    gap:8px;
    flex-wrap:wrap;
    justify-content:flex-end;
}

.repair-payment-refund-btn{
    display:flex;
    align-items:center;
    gap:6px;
    background:#fff0f0;
    color:#e06b6b;
    border:1.5px solid #f5c5c5;
    border-radius:8px;
    padding:7px 13px;
    font-size:12px;
    font-weight:600;
    cursor:pointer;
}

.repair-payment-refund-btn:disabled{
    opacity:.55;
    cursor:not-allowed;
}

.repair-payment-list{
    background:#fff;
    border-radius:12px;
    overflow:hidden;
    box-shadow:0 1px 4px rgba(0,0,0,.06);
    margin-bottom:14px;
}

.repair-payment-list-head,
.repair-payment-row{
    display:grid;
    grid-template-columns:minmax(150px, 1.15fr) minmax(100px, .75fr) minmax(110px, .85fr) minmax(160px, 1.25fr) 28px;
    align-items:center;
    column-gap:12px;
}

.repair-payment-list-head{
    padding:10px 16px;
    background:#f1f5f9;
    border-bottom:1px solid #e8ecf2;
}

.repair-payment-col{
    font-size:11px;
    font-weight:600;
    color:#94a3b8;
    text-transform:uppercase;
    letter-spacing:.4px;
}

.repair-payment-row{
    padding:12px 16px;
    border-bottom:1px solid #f1f5f9;
    transition:background .1s;
}

.repair-payment-row:last-child{
    border-bottom:0;
}

.repair-payment-row:hover{
    background:#f8fafc;
}

.repair-payment-cell{
    min-width:0;
    font-size:13px;
    color:#334155;
    display:flex;
    align-items:center;
    gap:4px;
}

.repair-payment-id{
    font-size:11px;
    color:#b0bac8;
    margin-right:6px;
    font-family:monospace;
}

.repair-payment-amount{
    justify-content:flex-end;
    font-weight:700;
    white-space:nowrap;
}

.repair-payment-row.refund .repair-payment-amount{
    color:#e06b6b;
}

.repair-payment-note{
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}

.repair-payment-actions{
    justify-content:flex-end;
}

.repair-payment-delete{
    width:24px;
    height:24px;
    padding:0;
    border:0;
    border-radius:6px;
    background:transparent;
    color:#b0bac8;
    font-size:18px;
    line-height:1;
    cursor:pointer;
}

.repair-payment-delete svg{
    width:15px;
    height:15px;
    fill:currentColor;
}

.repair-payment-delete:hover{
    background:#fff0f0;
    color:#e06b6b;
}

.repair-payment-footer{
    display:flex;
    align-items:center;
    gap:6px;
    font-size:11px;
    color:#b0bac8;
    padding-left:2px;
}

.repair-payment-form{
    display:grid;
    grid-template-columns:minmax(120px, 160px) minmax(130px, 160px) minmax(180px, 220px) minmax(180px, 1fr) auto;
    gap:10px;
    align-items:center;
    padding:12px;
    border:1px solid var(--line);
    border-radius:8px;
    background:#fbfdff;
}

.repair-payment-form input,
.repair-payment-form select{
    width:100%;
}

.repair-payment-form-actions{
    display:flex;
    gap:8px;
    justify-content:flex-end;
}

.repair-payment-amount{
    font-weight:700;
    white-space:nowrap;
}

.repair-payment-modal-overlay{
    background:rgba(15,23,42,.25);
    backdrop-filter:blur(2px);
}

.repair-payment-card-layer{
    position:absolute;
    inset:0;
    z-index:30;
}

.repair-payment-card-backdrop{
    position:absolute;
    inset:0;
    background:rgba(15,23,42,.25);
    backdrop-filter:blur(2px);
}

.repair-payment-card{
    position:absolute;
    top:0;
    right:0;
    bottom:0;
    left:50%;
    width:auto;
    min-width:480px;
    max-width:none;
    background:#fff;
    border:0;
    border-left:1px solid #d9e2f1;
    border-radius:0;
    box-shadow:-12px 0 36px rgba(15,23,42,.16);
    display:grid;
    grid-template-rows:auto 1fr auto;
    overflow:hidden;
    animation:repair-payment-card-in .16s ease-out;
}

.crm-modal-root.repair-payment-modal-root{
    padding:0;
    overflow:hidden;
}

.crm-modal-root.repair-payment-modal-root .repair-payment-modal-overlay{
    position:fixed;
    inset:0;
}

.crm-modal.repair-payment-modal{
    position:fixed;
    top:58px;
    right:auto;
    bottom:20px;
    transform:none;
    left:var(--repair-payment-modal-left, 228px);
    width:var(--repair-payment-modal-width, 452px);
    max-height:none;
    height:auto;
    padding:0;
    border:1px solid #d9e2f1;
    border-radius:12px;
    box-shadow:0 20px 60px rgba(0,0,0,.15);
    display:grid;
    grid-template-rows:auto 1fr auto;
    overflow:hidden;
    animation:repair-payment-card-in .16s ease-out;
}

@keyframes repair-payment-card-in{
    from{
        opacity:0;
        transform:translateX(18px);
    }
    to{
        opacity:1;
        transform:translateX(0);
    }
}

.crm-modal.repair-payment-modal .repair-payment-modal-header,
.repair-payment-card .repair-payment-modal-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin:0;
    padding:14px 16px;
    border-bottom:1px solid #e2e8f0;
}

.crm-modal.repair-payment-modal .repair-payment-modal-title,
.repair-payment-card .repair-payment-modal-title{
    margin:0;
    font-size:24px;
    font-weight:500;
    color:#1e293b;
}

.crm-modal.repair-payment-modal .repair-payment-modal-close{
    background:none;
    border-left:1px solid #e2e8f0;
    border-top:0;
    border-right:0;
    border-bottom:0;
    align-self:stretch;
    min-width:48px;
    margin:-14px -16px -14px 0;
    font-size:24px;
    color:#94a3b8;
    cursor:pointer;
    padding:0 14px;
}

.repair-payment-card .repair-payment-modal-close{
    background:none;
    border-left:1px solid #e2e8f0;
    border-top:0;
    border-right:0;
    border-bottom:0;
    align-self:stretch;
    min-width:48px;
    margin:-14px -16px -14px 0;
    font-size:24px;
    color:#94a3b8;
    cursor:pointer;
    padding:0 14px;
}

.repair-payment-card .repair-payment-modal-close:hover{
    background:#f8fafc;
    color:#64748b;
}

.crm-modal.repair-payment-modal .repair-payment-modal-body,
.repair-payment-card .repair-payment-modal-body{
    display:grid;
    gap:28px;
    align-content:start;
    padding:16px;
    overflow:auto;
    background:#fff;
}

.repair-payment-modal-field{
    display:block;
    margin:0;
}

.repair-payment-modal-field[hidden]{
    display:none;
}

.repair-payment-modal-field span{
    display:block;
    font-size:11px;
    font-weight:600;
    color:#94a3b8;
    text-transform:uppercase;
    letter-spacing:.4px;
    margin-bottom:6px;
}

.repair-payment-date-tabs,
.repair-payment-method-tabs{
    display:flex;
    align-items:center;
}

.repair-payment-date-tabs button,
.repair-payment-method-tabs button{
    border:1px solid #cbd5e1;
    border-radius:0;
    background:#fff;
    color:#334155;
    padding:8px 18px;
    font-size:13px;
    cursor:pointer;
}

.repair-payment-date-tabs button:first-child,
.repair-payment-method-tabs button:first-child{
    border-radius:6px 0 0 6px;
}

.repair-payment-date-tabs button + button,
.repair-payment-method-tabs button + button{
    border-left:0;
}

.repair-payment-date-tabs button:last-child,
.repair-payment-method-tabs button:last-child{
    border-radius:0 6px 6px 0;
}

.repair-payment-date-tabs button.active,
.repair-payment-method-tabs button.active{
    background:#eaf2ff;
    color:#1d4ed8;
    border-color:#93c5fd;
    font-weight:700;
    box-shadow:inset 0 0 0 1px #93c5fd;
}

.repair-payment-modal-field input,
.repair-payment-modal-field select,
.repair-payment-modal-field textarea{
    width:100%;
    border:1.5px solid #e2e8f0;
    border-radius:8px;
    padding:9px 12px;
    font-size:13px;
    color:#1e293b;
    outline:none;
    background:#f8fafc;
    box-sizing:border-box;
    font-family:inherit;
}

.repair-payment-modal-field textarea{
    min-height:86px;
    resize:vertical;
    line-height:1.35;
}

.repair-payment-commission-summary{
    display:grid;
    grid-template-columns:minmax(0, 1fr) 110px;
    gap:6px 10px;
    margin:-4px 0 12px;
    color:#334155;
    font-size:12px;
}

.repair-payment-commission-summary.hidden{
    display:none;
}

.repair-payment-commission-summary strong{
    text-align:right;
}

.crm-modal.repair-payment-modal .repair-payment-modal-footer,
.repair-payment-card .repair-payment-modal-footer{
    display:flex;
    gap:10px;
    margin:0;
    padding:16px;
    border-top:0;
    background:#fff;
}

@media (max-width: 900px){
    .repair-payment-card{
        top:0;
        right:0;
        bottom:0;
        left:0 !important;
        width:auto !important;
        min-width:0;
        max-width:none;
    }

    .crm-modal.repair-payment-modal{
        top:24px;
        right:16px;
        bottom:20px;
        left:16px;
        width:auto;
    }
}

.repair-payment-cancel-btn,
.repair-payment-confirm-btn{
    flex:1;
    padding:10px;
    border-radius:8px;
    font-size:13px;
    font-weight:600;
    cursor:pointer;
}

.repair-payment-cancel-btn{
    border:1.5px solid #e2e8f0;
    background:#fff;
    color:#64748b;
}

.repair-payment-confirm-btn{
    border:0;
    background:linear-gradient(135deg, #a8dbc5 0%, #5dbf9a 100%);
    color:#fff;
    font-weight:700;
}

.drawer-footer{
    grid-column:1 / -1;
    background:white;
    border-top:1px solid var(--line);
    padding:10px 16px;
    display:flex;
    justify-content:space-between;
    gap:12px;
    align-items:center;
    flex-wrap:wrap;
}

.drawer-footer-left,
.drawer-footer-right{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    align-items:center;
}

.drawer-footer-create .drawer-footer-left{
    flex:1 1 auto;
}

.drawer-footer-create .drawer-footer-right{
    flex:0 0 auto;
    margin-right:348px;
}

.drawer-footer-edit .drawer-footer-left{
    flex:1 1 auto;
}

.drawer-footer-edit .drawer-footer-right{
    flex:0 0 auto;
    margin-right:0;
}

.drawer-note{
    font-size:13px;
    color:var(--muted);
}

.placeholder-card{
    background:white;
    border:1px dashed #cdd8ea;
    border-radius:14px;
    padding:18px;
    margin-bottom:18px;
}

.placeholder-card strong{
    display:block;
    margin-bottom:8px;
    font-size:15px;
}

.status-settings-screen{
    display:grid;
    gap:16px;
}

.settings-screen-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:18px;
    flex-wrap:wrap;
    padding-bottom:10px;
    border-bottom:1px solid var(--line);
}

.settings-screen-head h2{
    margin:0 0 4px;
    font-size:32px;
    line-height:1.05;
}

.settings-screen-head-main{
    display:grid;
    gap:4px;
}

.settings-screen-subtitle{
    color:var(--muted);
    font-size:14px;
}

.status-entity-tabs{
    display:flex;
    align-items:center;
    gap:18px;
    margin-top:-2px;
    padding-bottom:2px;
    border-bottom:1px solid var(--line);
}

.status-entity-tab{
    min-height:auto;
    padding:0 0 10px;
    border:none;
    border-bottom:2px solid transparent;
    border-radius:0;
    background:transparent;
    color:#98a2b3;
    font-size:15px;
    font-weight:600;
}

.status-entity-tab:hover{
    background:transparent;
    color:#344054;
}

.status-entity-tab.active{
    background:transparent;
    color:#1d4ed8;
    border-color:#2f6df6;
}

.status-stage-list{
    display:grid;
    gap:12px;
}

.status-stage-card{
    border:1px solid #d9e2f1;
    border-radius:14px;
    background:linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
    padding:14px 14px 12px;
    box-shadow:0 1px 0 rgba(16,24,40,0.02);
    transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease, opacity .18s ease;
}

.status-stage-card.dragging{
    opacity:.68;
    transform:scale(.995);
}

.status-stage-card.drag-over{
    border-color:#9dbcfb;
    box-shadow:0 0 0 2px rgba(47,128,237,.12);
}

.status-stage-head{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    flex-wrap:wrap;
    margin-bottom:10px;
}

.status-stage-head-main{
    display:grid;
    gap:6px;
}

.status-stage-title-row{
    display:flex;
    align-items:center;
    gap:8px;
}

.status-stage-drag{
    color:#98a2b3;
    font-size:13px;
    line-height:1;
    letter-spacing:-1px;
    user-select:none;
    cursor:grab;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:18px;
}

.status-stage-title{
    font-size:17px;
    font-weight:700;
    color:var(--text);
}

.status-stage-meta{
    display:flex;
    align-items:center;
    gap:8px;
}

.status-stage-count{
    display:inline-flex;
    align-items:center;
    min-height:24px;
    padding:4px 10px;
    border-radius:999px;
    background:#ffffff;
    border:1px solid #d9e2f1;
    color:#667085;
    font-size:12px;
    font-weight:600;
}

.status-stage-actions,
.status-item-actions{
    display:flex;
    align-items:center;
    gap:6px;
    flex-wrap:wrap;
}

.status-item-list{
    display:grid;
    gap:8px;
}

.status-item-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    flex-wrap:wrap;
    min-height:48px;
    padding:8px 10px 8px 12px;
    border:1px solid #e2e8f3;
    border-radius:10px;
    background:white;
}

.status-item-main{
    display:flex;
    align-items:center;
    gap:10px;
    min-width:0;
}

.status-item-grip{
    color:#98a2b3;
    font-size:12px;
    line-height:1;
    letter-spacing:-1px;
    flex-shrink:0;
}

.status-item-name{
    display:inline-flex;
    align-items:center;
    min-height:28px;
    padding:4px 10px;
    border:1px solid transparent;
    border-radius:8px;
    font-size:14px;
    font-weight:600;
    color:var(--text);
    line-height:1.1;
}

.status-icon-btn,
.status-text-btn,
.status-primary-btn{
    min-height:32px;
    padding:6px 10px;
    border-radius:8px;
    font-size:13px;
    font-weight:600;
}

.status-icon-btn{
    min-width:32px;
    padding:0;
    border:1px solid #d9e2f1;
    background:#fff;
    color:#475467;
}

.status-icon-btn:hover{
    background:#f8fbff;
}

.status-icon-btn:disabled{
    opacity:0.4;
}

.status-text-btn{
    border:1px solid #d9e2f1;
    background:#fff;
    color:#475467;
}

.status-text-btn:hover{
    background:#f8fbff;
}

.status-primary-btn{
    border:1px solid #bfd2ff;
    background:#eef4ff;
    color:#1d4ed8;
}

.status-primary-btn:hover{
    background:#dfeaff;
}

.crm-modal.crm-modal-wide{
    width:min(860px, calc(100vw - 32px));
}

.status-permission-note{
    margin-bottom:14px;
}

.timeline-task-title{
    display:inline-flex;
    border:none;
    background:transparent;
    padding:0;
    color:#1d4ed8;
    font:inherit;
    font-weight:700;
    cursor:pointer;
    text-align:left;
}

.timeline-task-title:hover{
    text-decoration:underline;
}

.timeline-marker-task{
    background:#eef2f7;
    color:#475467;
}

.timeline-item-task .timeline-item-body{
    border-color:#cdebd8;
}

.timeline-task-compact .timeline-item-marker{
    width:18px;
    height:18px;
    border:1px solid #98a2b3;
    border-radius:3px;
    background:#f8fafc;
    color:#475467;
    font-size:14px;
    font-weight:700;
    line-height:16px;
}

.timeline-task-compact .timeline-item-body{
    border:none;
    background:transparent;
    padding:0 0 0 6px;
    box-shadow:none;
}

.timeline-task-created-row{
    display:flex;
    align-items:center;
    gap:8px;
    color:#475467;
    font-size:13px;
    line-height:18px;
}

.timeline-task-compact .timeline-task-title{
    margin-top:4px;
    color:#2563eb;
    font-size:13px;
    font-weight:500;
    background:transparent;
    border:none;
    border-radius:0;
    padding:0;
    box-shadow:none;
}

.timeline-task-due{
    color:#60708a;
}

.timeline-task-done{
    color:#13824b;
    font-weight:700;
}

.timeline-item-text a{
    color:#1d4ed8;
    font-weight:600;
    text-decoration:none;
}

.timeline-item-text a:hover{
    text-decoration:underline;
}

/* ── New client search (create repair drawer) ─────────────────────────── */
.nc-search-box{
    position:relative;
    display:flex;
    align-items:center;
    border:1px solid #d1d5db;
    border-radius:8px;
    background:#fff;
    padding:0 10px;
    gap:8px;
}
.nc-search-icon{
    width:16px;
    height:16px;
    flex-shrink:0;
    color:#9ca3af;
}
.nc-search-input{
    border:none;
    outline:none;
    background:transparent;
    flex:1;
    padding:8px 0;
    font-size:14px;
}
.nc-tabs{
    display:flex;
    gap:4px;
    margin:10px 0 6px;
    border-bottom:1px solid #e5e7eb;
    padding-bottom:2px;
}
.nc-tab{
    border:none;
    background:none;
    cursor:pointer;
    font-size:13px;
    color:#6b7280;
    padding:4px 10px;
    border-radius:6px 6px 0 0;
    font-weight:500;
    transition:color .15s;
}
.nc-tab.active{
    color:#2563eb;
    border-bottom:2px solid #2563eb;
    margin-bottom:-3px;
}
.nc-tab:hover:not(.active){
    color:#374151;
    background:#f3f4f6;
}
.nc-result-list{
    border:1px solid #e5e7eb;
    border-radius:8px;
    overflow:hidden;
    margin-top:4px;
}
.nc-result-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:9px 12px;
    cursor:pointer;
    gap:8px;
    background:#fff;
    transition:background .12s;
}
.nc-result-row:not(:last-child){
    border-bottom:1px solid #f3f4f6;
}
.nc-result-row:hover{
    background:#eff6ff;
}
.nc-result-main{
    display:flex;
    align-items:center;
    gap:6px;
    min-width:0;
}
.nc-result-name{
    font-size:14px;
    color:#111827;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.nc-result-phone{
    font-size:13px;
    color:#6b7280;
    white-space:nowrap;
    flex-shrink:0;
}
.nc-lead-result-row{
    align-items:flex-start;
    flex-direction:column;
    gap:5px;
    width:100%;
    border:0;
    background:#fff;
    text-align:left;
}
.nc-lead-result-row:hover{
    background:#eff6ff;
}
.nc-lead-result-row .nc-result-phone{
    white-space:normal;
}
.nc-lead-result-details{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    width:100%;
}
.nc-lead-result-details span{
    min-width:0;
}
.nc-lead-result-details small{
    display:block;
    color:#667085;
    font-size:11px;
    line-height:1.2;
}
.nc-lead-result-details strong{
    display:block;
    color:#111827;
    font-size:13px;
    line-height:1.25;
    white-space:normal;
    overflow-wrap:anywhere;
}
.new-device-results{
    margin-top:-4px;
}
.new-device-suggestion-list{
    border:1px solid #e5e7eb;
    border-radius:8px;
    overflow:hidden;
    background:#fff;
}
.new-device-suggestion-row{
    width:100%;
    min-height:38px;
    padding:8px 12px;
    border:0;
    border-bottom:1px solid #f3f4f6;
    border-radius:0;
    background:#fff;
    color:#111827;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    text-align:left;
    font-size:13px;
    font-weight:500;
}
.new-device-suggestion-row:last-child{
    border-bottom:0;
}
.new-device-suggestion-row:hover{
    background:#eff6ff;
}
.new-device-suggestion-row span{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
}
.new-device-suggestion-row small{
    color:#2563eb;
    font-size:12px;
    font-weight:700;
    flex-shrink:0;
}
.new-device-suggestion-empty{
    padding:8px 10px;
    border:1px solid #e5e7eb;
    border-radius:8px;
    background:#f9fafb;
    color:#6b7280;
    font-size:12px;
    line-height:1.35;
}
.nc-type-badge{
    font-size:11px;
    font-weight:600;
    color:#6b7280;
    background:#f3f4f6;
    border-radius:4px;
    padding:1px 5px;
    flex-shrink:0;
}
.nc-empty{
    padding:20px 16px;
    text-align:center;
}
.nc-empty-title{
    font-size:14px;
    font-weight:600;
    color:#374151;
    margin-bottom:4px;
}
.nc-empty-hint{
    font-size:13px;
    color:#6b7280;
    margin-bottom:14px;
}
.nc-create-btn{
    display:inline-flex;
    align-items:center;
    gap:4px;
    border:1px solid #d1d5db;
    background:#fff;
    color:#374151;
    border-radius:8px;
    padding:7px 16px;
    font-size:13px;
    font-weight:500;
    cursor:pointer;
    transition:background .12s,border-color .12s;
}
.nc-create-btn:hover{
    background:#f9fafb;
    border-color:#9ca3af;
}
.nc-back-btn{
    border:none;
    background:none;
    color:#2563eb;
    font-size:13px;
    font-weight:500;
    cursor:pointer;
    padding:0;
    margin-bottom:10px;
    display:inline-block;
}
.nc-back-btn:hover{
    text-decoration:underline;
}
.nc-selected-card{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    border:1px solid #d1d5db;
    border-radius:8px;
    padding:10px 12px;
    background:#f9fafb;
}
.nc-selected-name{
    font-size:14px;
    font-weight:600;
    color:#111827;
    margin-bottom:2px;
}
.nc-selected-phone,.nc-selected-email{
    font-size:13px;
    color:#6b7280;
}
.nc-selected-type{
    font-size:12px;
    color:#9ca3af;
    margin-top:2px;
}
.nc-selected-change{
    border:none;
    background:none;
    color:#2563eb;
    font-size:13px;
    font-weight:500;
    cursor:pointer;
    white-space:nowrap;
    padding:0;
    flex-shrink:0;
}
.nc-selected-change:hover{
    text-decoration:underline;
}

.deadline-rel-check-label{
    display:flex;
    align-items:center;
    gap:6px;
    font-size:13px;
    color:#6b7280;
    margin-top:6px;
    cursor:pointer;
    user-select:none;
}
.deadline-rel-check-label input[type="checkbox"]{
    width:16px;
    height:16px;
    min-width:16px;
    flex:0 0 auto;
    margin:0;
}
.deadline-rel-line{
    display:grid;
    grid-template-columns:minmax(0, 1fr) auto;
    align-items:center;
    gap:8px;
}
.deadline-rel-wrap{
    display:flex;
    align-items:center;
    gap:8px;
    margin-top:6px;
}
.deadline-rel-line .deadline-rel-wrap{
    margin-top:0;
}
.deadline-rel-input{
    width:70px;
    text-align:center;
}
.deadline-unit-btns{
    display:flex;
    gap:4px;
}
.deadline-unit-btn{
    border:1px solid #d1d5db;
    background:#fff;
    border-radius:6px;
    padding:6px 14px;
    font-size:13px;
    font-weight:500;
    cursor:pointer;
    color:#374151;
    transition:background .12s,border-color .12s,color .12s;
}
.deadline-unit-btn.active{
    background:#2563eb;
    color:#fff;
    border-color:#2563eb;
}
.deadline-unit-btn:hover:not(.active){
    background:#f3f4f6;
}

.nc-field-search-wrap{
    position:relative;
}
.nc-field-results{
    position:absolute;
    top:100%;
    left:0;
    right:0;
    z-index:60;
    margin-top:2px;
}
.nc-field-results .nc-result-list{
    border:1px solid #d1d5db;
    border-radius:8px;
    overflow:hidden;
    background:#fff;
    box-shadow:0 8px 24px rgba(15,23,42,0.12);
}

.referrer-search-panel{
    margin-top:8px;
}
.drawer-referrer-card{
    display:flex;
    align-items:center;
    gap:14px;
    padding:12px 14px;
}
.drawer-referrer-card h3{
    flex:0 0 auto;
    margin:0;
    font-size:16px;
}
.drawer-referrer-editor{
    flex:1 1 auto;
    min-width:0;
    margin-top:0;
}
.drawer-referrer-editor-row{
    display:flex;
    align-items:center;
    gap:8px;
    min-height:34px;
}
.drawer-referrer-editor .referrer-selected-name{
    margin-top:0;
}
.drawer-referrer-search-input{
    max-width:360px;
}
.referrer-search-results{
    position:relative;
    margin-top:4px;
    background:#fff;
    border-radius:8px;
    overflow:hidden;
    box-shadow:0 4px 16px rgba(15,23,42,.1);
}
.referrer-search-item{
    display:block;
    width:100%;
    text-align:left;
    padding:8px 12px;
    background:none;
    border:none;
    cursor:pointer;
    font-size:13px;
    color:#1e293b;
    border-bottom:1px solid #f1f5f9;
}
.referrer-search-item:last-child{border-bottom:none;}
.referrer-search-item:hover{background:#f8fafc;}
.referrer-search-loading,.referrer-search-empty{
    padding:8px 12px;
    font-size:13px;
    color:#64748b;
}
.referrer-selected-name{
    margin-top:6px;
}
.referrer-tag{
    display:inline-flex;
    align-items:center;
    gap:4px;
    background:#dcfce7;
    border:1px solid #86efac;
    border-radius:20px;
    padding:3px 10px 3px 12px;
}
.referrer-tag-name{
    font-size:13px;
    color:#15803d;
    font-weight:500;
    text-decoration:none;
    cursor:pointer;
}
.referrer-tag-name:hover{text-decoration:underline;}
.referrer-tag-clear{
    background:none;
    border:none;
    cursor:pointer;
    font-size:16px;
    line-height:1;
    color:#16a34a;
    padding:0 0 1px 2px;
    opacity:0.7;
}
.referrer-tag-clear:hover{opacity:1;}
