/* BOM V1.1 + UI V2.1 - target currency RFQ controls and visual refinement. */
.bom-wrap{
    padding:24px 0 42px;
    font-family:"Microsoft YaHei","PingFang SC","Helvetica Neue",Arial,sans-serif;
    color:#1f2937;
    -webkit-font-smoothing:antialiased;
    text-rendering:optimizeLegibility;
}
.bom-wrap *{box-sizing:border-box;}

.bom-hero{
    position:relative;
    padding:27px 32px 25px;
    margin-bottom:18px;
    background:#f7f9fc;
    border:1px solid #d8dee8;
    border-radius:3px;
    box-shadow:0 1px 2px rgba(16,24,40,.03);
}
.bom-hero:before{
    content:"";
    position:absolute;
    left:0;
    top:0;
    bottom:0;
    width:4px;
    background:#2f78c4;
}
.bom-hero h1{
    margin:0 0 10px;
    font-size:30px;
    line-height:1.35;
    font-weight:500;
    letter-spacing:.05px;
    color:#202733;
}
.bom-hero p{
    margin:0;
    max-width:900px;
    font-size:15px;
    line-height:1.8;
    color:#596579;
}

.bom-panel{
    margin-bottom:18px;
    padding:24px;
    background:#fff;
    border:1px solid #d7dde6;
    border-radius:3px;
    box-shadow:0 1px 3px rgba(16,24,40,.035);
}
.bom-panel-title{
    min-height:32px;
    padding-bottom:15px;
    margin-bottom:18px;
    border-bottom:1px solid #e5e9ef;
}
.bom-panel-title h2{
    float:left;
    margin:0;
    font-size:20px;
    line-height:30px;
    font-weight:600;
    color:#273142;
}
.bom-template-link,
.bom-source-name{
    float:right;
    line-height:30px;
    font-size:14px;
}
.bom-template-link{
    color:#2f78c4;
    text-decoration:none;
    font-weight:500;
}
.bom-template-link:hover{color:#1f5f9e;text-decoration:underline;}
.bom-source-name{color:#667085;}

.bom-tabs{
    position:relative;
    margin:0 0 16px;
    border-bottom:1px solid #d9dfe7;
}
.bom-tab{
    position:relative;
    float:left;
    min-width:126px;
    padding:10px 20px 11px;
    margin:0 6px -1px 0;
    border:0;
    background:transparent;
    color:#667085;
    font-size:15px;
    line-height:22px;
    font-weight:500;
    text-align:center;
    text-decoration:none;
    cursor:pointer;
}
.bom-tab:hover{color:#2f78c4;text-decoration:none;}
.bom-tab.active{
    color:#1f5f9e;
    font-weight:600;
    background:#fff;
}
.bom-tab.active:after{
    content:"";
    position:absolute;
    left:15px;
    right:15px;
    bottom:0;
    height:2px;
    background:#2f78c4;
}

.bom-pane{display:none;}
.bom-pane.active{display:block;}

.bom-drop-zone{
    position:relative;
    min-height:190px;
    padding:30px 24px 25px;
    text-align:center;
    background:#fbfcfe;
    border:1px dashed #aeb9c8;
    border-radius:3px;
    transition:border-color .15s ease,background .15s ease,box-shadow .15s ease;
}
.bom-drop-zone:before{
    content:"↑";
    display:block;
    width:42px;
    height:42px;
    margin:0 auto 11px;
    border:1px solid #b8c7d9;
    border-radius:50%;
    background:#fff;
    color:#2f78c4;
    font-family:Arial,sans-serif;
    font-size:25px;
    line-height:39px;
    font-weight:400;
}
.bom-drop-zone.dragover{
    border-color:#2f78c4;
    background:#f4f8fd;
    box-shadow:inset 0 0 0 1px rgba(47,120,196,.08);
}
.bom-drop-title{
    margin-bottom:6px;
    font-size:18px;
    line-height:1.45;
    font-weight:600;
    color:#273142;
}
.bom-drop-help,
.bom-format-help,
.bom-preview-hint,
.bom-submit-note{
    color:#596579;
    font-size:13px;
    line-height:1.7;
}
.bom-file-button{
    display:inline-block;
    min-width:126px;
    margin-top:14px;
    padding:9px 18px;
    background:#fff;
    border:1px solid #aeb8c6;
    border-radius:3px;
    color:#344054;
    font-size:14px;
    font-weight:600;
    line-height:20px;
    cursor:pointer;
    transition:border-color .15s ease,color .15s ease,box-shadow .15s ease;
}
.bom-file-button:hover{
    border-color:#2f78c4;
    color:#2f78c4;
    box-shadow:0 1px 2px rgba(16,24,40,.06);
}
.bom-file-button input{display:none;}
.bom-file-name{
    min-height:22px;
    margin-top:12px;
    color:#2f78c4;
    font-size:14px;
    line-height:22px;
    font-weight:600;
    word-break:break-all;
}

.bom-source-actions{
    padding-top:14px;
    text-align:center;
}
.bom-primary-button{
    min-width:148px;
    height:42px;
    padding:0 26px;
    border:1px solid #2f78c4;
    border-radius:3px;
    background:#2f78c4;
    color:#fff;
    font-family:"Microsoft YaHei","PingFang SC",Arial,sans-serif;
    font-size:14px;
    line-height:40px;
    font-weight:600;
    text-align:center;
    cursor:pointer;
    box-shadow:0 1px 2px rgba(16,24,40,.08);
    transition:background .15s ease,border-color .15s ease,box-shadow .15s ease;
}
.bom-primary-button:hover{
    background:#2569ad;
    border-color:#2569ad;
    box-shadow:0 2px 5px rgba(47,120,196,.18);
}
.bom-primary-button:focus{outline:1px dotted #1d4f83;outline-offset:2px;}
.bom-primary-button[disabled]{
    background:#aab4c1;
    border-color:#aab4c1;
    color:#f7f8fa;
    cursor:default;
    box-shadow:none;
}

.bom-paste-text{
    display:block;
    width:100%;
    min-height:220px;
    padding:15px 16px;
    border:1px solid #bfc8d4;
    border-radius:2px;
    background:#fff;
    color:#202939;
    font-family:Consolas,"SFMono-Regular",Menlo,"Courier New",monospace;
    font-size:14px;
    line-height:1.7;
    letter-spacing:.05px;
    resize:vertical;
    outline:none;
    box-shadow:inset 0 1px 2px rgba(16,24,40,.02);
}
.bom-paste-text:hover{border-color:#9eabba;}
.bom-paste-text:focus{
    border-color:#4f8fcf;
    box-shadow:0 0 0 2px rgba(47,120,196,.08);
}
.bom-paste-text::placeholder{color:#7b8795;opacity:1;}
.bom-format-help{
    margin-top:14px;
    padding:9px 12px;
    background:#fafbfc;
    border-left:3px solid #c2d0df;
    color:#596579;
}

.bom-notice{
    padding:13px 16px;
    margin-bottom:18px;
    border:1px solid #e2c36f;
    border-radius:3px;
    background:#fff9e9;
    color:#725900;
    font-size:14px;
    line-height:1.6;
}
.bom-notice.success{
    border-color:#9dc9a9;
    background:#f3fbf5;
    color:#286a3a;
}
.bom-notice.error{
    border-color:#e0aaaa;
    background:#fff5f5;
    color:#9f3131;
}

.bom-summary{
    margin:0 -6px 18px;
}
.bom-summary-card{
    float:left;
    width:23%;
    min-height:82px;
    margin:0 1%;
    padding:14px 8px 12px;
    text-align:center;
    background:#f8fafc;
    border:1px solid #dde3ea;
    border-radius:3px;
}
.bom-summary-card .num{
    display:block;
    font-size:25px;
    line-height:32px;
    font-weight:700;
    color:#273142;
}
.bom-summary-card .label{
    display:block;
    margin-top:4px;
    color:#596579;
    font-size:13px;
    line-height:20px;
}
.bom-summary-ok .num{color:#2f7d4d;}
.bom-summary-warn .num{color:#a66c08;}
.bom-summary-miss .num{color:#ad3b3b;}
.bom-preview-hint{
    margin:0 0 12px;
    color:#667085;
}
.bom-preview-tools{
    margin:0 0 13px;
    padding:11px 12px;
    border:1px solid #d7dee7;
    border-radius:3px;
    background:#f8fafc;
}
.bom-currency-control{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:9px;
}
.bom-currency-control label{
    color:#344054;
    font-size:14px;
    line-height:34px;
    font-weight:600;
}
.bom-currency-control select{
    width:260px;
    max-width:100%;
    height:36px;
    padding:5px 9px;
    border:1px solid #b9c4d0;
    border-radius:2px;
    background:#fff;
    color:#273142;
    font-family:"Microsoft YaHei","PingFang SC",Arial,sans-serif;
    font-size:13px;
    line-height:24px;
    outline:none;
}
.bom-currency-control select:hover{border-color:#9eabba;}
.bom-currency-control select:focus{
    border-color:#4f8fcf;
    box-shadow:0 0 0 2px rgba(47,120,196,.07);
}
.bom-currency-help{
    color:#667085;
    font-size:13px;
    line-height:20px;
}

.bom-table-scroll{
    overflow:auto;
    max-height:620px;
    border:1px solid #cfd6df;
    border-radius:2px;
    background:#fff;
}
.bom-table{
    width:100%;
    border-collapse:separate;
    border-spacing:0;
    background:#fff;
    color:#344054;
    font-size:13px;
    line-height:1.45;
}
.bom-table th{
    position:sticky;
    top:0;
    z-index:1;
    padding:10px 8px;
    background:#f4f6f9;
    border-bottom:1px solid #cfd6df;
    border-right:1px solid #e4e8ee;
    color:#475467;
    font-size:12px;
    line-height:18px;
    font-weight:600;
    text-align:left;
    white-space:nowrap;
}
.bom-table th:last-child{border-right:0;}
.bom-table td{
    padding:7px 6px;
    border-bottom:1px solid #e7ebf0;
    border-right:1px solid #eef1f4;
    vertical-align:middle;
    background:#fff;
}
.bom-table tr:last-child td{border-bottom:0;}
.bom-table td:last-child{border-right:0;}
.bom-table tbody tr:hover td{background:#fbfcfe;}
.bom-table input{
    width:100%;
    min-width:64px;
    height:34px;
    padding:6px 7px;
    border:1px solid #c7ced8;
    border-radius:2px;
    background:#fff;
    color:#273142;
    font-family:"Microsoft YaHei","PingFang SC",Arial,sans-serif;
    font-size:13px;
    line-height:20px;
    outline:none;
}
.bom-table input:hover{border-color:#aab4c1;}
.bom-table input:focus{
    border-color:#4f8fcf;
    box-shadow:0 0 0 2px rgba(47,120,196,.07);
}
.bom-row-no{text-align:center;color:#7b8794;font-variant-numeric:tabular-nums;}
.bom-status{
    display:inline-block;
    min-width:54px;
    padding:4px 8px;
    border-radius:2px;
    font-size:12px;
    line-height:18px;
    font-weight:600;
    text-align:center;
    white-space:nowrap;
}
.bom-status-matched{background:#eaf6ee;color:#2b7545;border:1px solid #cde6d5;}
.bom-status-ambiguous{background:#fff6df;color:#9a6508;border:1px solid #f0ddb0;}
.bom-status-unmatched{background:#fceeee;color:#a33a3a;border:1px solid #eccccc;}
.bom-remove{color:#b33c3c;text-decoration:none;font-size:13px;}
.bom-remove:hover{color:#8f2525;text-decoration:underline;}

.bom-contact-grid{margin-right:-20px;}
.bom-field{
    float:left;
    width:31%;
    margin:0 2% 17px 0;
}
.bom-field-wide{width:64%;}
.bom-field label{
    display:block;
    margin-bottom:7px;
    color:#475467;
    font-size:14px;
    line-height:20px;
    font-weight:500;
}
.bom-field.required label:after{content:' *';color:#c62828;}
.bom-field input,
.bom-field select{
    width:100%;
    height:40px;
    padding:7px 10px;
    border:1px solid #bcc6d2;
    border-radius:2px;
    background:#fff;
    color:#273142;
    font-family:"Microsoft YaHei","PingFang SC",Arial,sans-serif;
    font-size:14px;
    line-height:24px;
    outline:none;
}
.bom-field input:hover,.bom-field select:hover{border-color:#9eabba;}
.bom-field input:focus,.bom-field select:focus{
    border-color:#4f8fcf;
    box-shadow:0 0 0 2px rgba(47,120,196,.07);
}
.bom-submit-bar{
    padding-top:18px;
    border-top:1px solid #e3e8ef;
}
.bom-submit-button{
    min-width:172px;
    margin-right:14px;
}
.bom-submit-note{
    display:inline-block;
    max-width:720px;
    vertical-align:middle;
}

.bom-success-panel{text-align:center;padding:48px 24px;}
.bom-success-icon{
    width:62px;
    height:62px;
    margin:0 auto 16px;
    border-radius:50%;
    background:#318650;
    color:#fff;
    font-size:33px;
    line-height:62px;
    box-shadow:0 2px 5px rgba(49,134,80,.18);
}
.bom-success-panel h2{
    margin:0 0 12px;
    color:#273142;
    font-size:24px;
    line-height:1.4;
    font-weight:600;
}
.bom-success-panel p{
    margin:7px 0;
    color:#667085;
    font-size:14px;
    line-height:1.7;
}
.bom-success-panel strong{color:#273142;}

@media (max-width:1100px){
    .bom-panel{padding:20px;}
    .bom-hero{padding:26px 28px;}
    .bom-summary-card{width:48%;margin-bottom:10px;}
}
@media (max-width:900px){
    .bom-wrap{padding-top:18px;}
    .bom-hero{padding:22px 22px 21px;}
    .bom-hero h1{font-size:26px;}
    .bom-panel{padding:16px;}
    .bom-tab{min-width:0;padding-left:16px;padding-right:16px;}
    .bom-field,.bom-field-wide{width:97%;}
    .bom-submit-note{display:block;margin-top:10px;}
    .bom-currency-control{display:block;}
    .bom-currency-control label,.bom-currency-help{display:block;}
    .bom-currency-control select{width:100%;margin:4px 0 5px;}
}
@media (max-width:600px){
    .bom-hero h1{font-size:24px;}
    .bom-hero p{font-size:14px;}
    .bom-panel-title h2{font-size:18px;}
    .bom-template-link,.bom-source-name{float:none;display:block;clear:both;padding-top:4px;}
    .bom-tab{width:50%;margin-right:0;padding:11px 8px;font-size:14px;}
    .bom-drop-zone{min-height:185px;padding:28px 15px 24px;}
    .bom-summary-card{width:48%;margin:0 1% 10px;}
    .bom-primary-button{width:100%;}
}
