.order-tool-page {
  min-height: 100vh;
  padding: 180px 0 110px;
  background:
    radial-gradient(circle at 7% 4%, rgba(255,90,31,.13), transparent 26%),
    radial-gradient(circle at 92% 18%, rgba(255,191,0,.10), transparent 24%),
    #f5f3ee;
}
.order-app { width: min(1240px, calc(100% - 36px)); margin: 0 auto; }
.order-app button, .order-app input, .order-app select, .order-app textarea { font: inherit; }
.order-hero { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(290px,.65fr); gap: 60px; align-items: end; margin-bottom: 46px; }
.order-hero-copy { max-width: 850px; }
.order-kicker, .step-label { display: inline-flex; align-items: center; gap: 9px; color: #b53f16; font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.order-kicker i { width: 8px; height: 8px; background: #ff5a1f; border-radius: 50%; box-shadow: 0 0 0 6px rgba(255,90,31,.12); }
.order-hero h1 { max-width: 900px; margin: 18px 0 22px; font-size: clamp(52px, 6.5vw, 92px); line-height: .92; letter-spacing: -.072em; }
.order-hero p { max-width: 700px; margin: 0; color: #62625c; font-size: 18px; line-height: 1.65; }
.privacy-card { display: flex; gap: 15px; align-items: center; padding: 22px; background: rgba(255,255,255,.78); border: 1px solid rgba(17,17,15,.09); border-radius: 22px; box-shadow: 0 14px 36px rgba(17,17,15,.07); }
.privacy-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; background: #dff5e8; color: #167a45; border-radius: 14px; font-weight: 900; }
.privacy-card strong, .privacy-card small { display: block; }
.privacy-card strong { margin-bottom: 5px; font-size: 15px; }
.privacy-card small { color: #6a6a63; line-height: 1.4; }
.workspace-card, .results-section { margin-bottom: 18px; padding: 34px; background: rgba(255,255,255,.88); border: 1px solid rgba(17,17,15,.09); border-radius: 28px; box-shadow: 0 20px 50px rgba(17,17,15,.06); }
.workspace-head, .results-head, .preview-toolbar, .action-strip, .modal-head, .modal-actions { display: flex; justify-content: space-between; gap: 24px; align-items: center; }
.workspace-head { margin-bottom: 26px; }
.workspace-head h2, .results-head h2, .modal-head h2 { margin: 8px 0 5px; font-size: 30px; letter-spacing: -.045em; }
.workspace-head p, .modal-head p { margin: 0; color: #73736c; }
.file-counter { padding: 9px 13px; background: #efeee9; border-radius: 999px; color: #55554f; font-size: 12px; font-weight: 800; }
.upload-zone { min-height: 230px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 28px; border: 1.5px dashed #c9c6bd; border-radius: 22px; background: #faf9f6; cursor: pointer; text-align: center; transition: .2s ease; }
.upload-zone:hover, .upload-zone.is-dragging { border-color: #ff5a1f; background: #fff5ef; transform: translateY(-2px); }
.upload-zone input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.upload-mark { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 4px; background: #11110f; color: #fff; border-radius: 17px; font-size: 28px; font-weight: 300; }
.upload-zone strong { font-size: 19px; }
.upload-zone > span:not(.upload-mark) { color: #777770; font-size: 14px; }
.upload-zone em { margin-top: 8px; color: #a09d94; font-size: 10px; font-style: normal; font-weight: 900; letter-spacing: .12em; }
.file-list { display: grid; gap: 10px; margin-top: 14px; }
.file-row { display: grid; grid-template-columns: 44px minmax(180px,1fr) 190px 200px 36px; gap: 13px; align-items: center; padding: 13px; background: #f5f3ee; border: 1px solid #e5e2da; border-radius: 16px; }
.file-icon { width: 42px; height: 42px; display: grid; place-items: center; background: #dff5e8; color: #167a45; border-radius: 12px; font-size: 11px; font-weight: 900; }
.file-meta { min-width: 0; }
.file-meta strong, .file-meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta strong { margin-bottom: 4px; font-size: 13px; }
.file-meta small { color: #77776f; font-size: 11px; }
.file-row label, .rule-editor-row label { display: grid; gap: 5px; }
.file-row label > span, .rule-editor-row label > span { color: #77766f; font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.file-row input, .file-row select, .rule-editor-row input, .rule-editor-row select { width: 100%; min-height: 39px; padding: 0 10px; background: #fff; border: 1px solid #d9d6cd; border-radius: 10px; outline: none; }
.file-row input:focus, .file-row select:focus, .rule-editor-row input:focus, .rule-editor-row select:focus { border-color: #ff5a1f; box-shadow: 0 0 0 3px rgba(255,90,31,.1); }
.remove-file, .delete-rule { width: 34px; height: 34px; display: grid; place-items: center; background: transparent; color: #88867f; border: 0; border-radius: 9px; cursor: pointer; font-size: 21px; }
.remove-file:hover, .delete-rule:hover { background: #ffe1d8; color: #b53f16; }
.rule-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.rule-chip { display: flex; align-items: center; gap: 14px; padding: 13px 16px; background: #f1f0eb; border: 1px solid #e7e4dc; border-radius: 15px; }
.rule-chip b { font-size: 14px; }
.rule-chip small { padding: 4px 8px; background: #fff; border-radius: 8px; color: #b53f16; font-weight: 900; }
.soft-button, .export-button, .add-rule-button { min-height: 44px; padding: 0 17px; background: #fff; color: #191916; border: 1px solid #d9d6cd; border-radius: 13px; cursor: pointer; font-weight: 800; }
.action-strip { margin-bottom: 18px; padding: 26px 30px; background: #181816; color: #fff; border-radius: 24px; }
.action-strip strong, .action-strip span { display: block; }
.action-strip strong { margin-bottom: 5px; font-size: 18px; }
.action-strip > div > span { color: rgba(255,255,255,.58); font-size: 13px; }
.primary-button { min-height: 50px; display: inline-flex; align-items: center; justify-content: center; gap: 24px; padding: 0 21px; background: #ff5a1f; color: #fff; border: 0; border-radius: 14px; cursor: pointer; font-weight: 900; }
.primary-button:disabled, .export-button:disabled { opacity: .42; cursor: not-allowed; }
.results-head { margin-bottom: 24px; }
.export-button { background: #1b1b18; color: #fff; border-color: #1b1b18; }
.metric-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 12px; margin-bottom: 22px; }
.metric-grid article { min-height: 130px; display: flex; flex-direction: column; justify-content: space-between; padding: 20px; background: #f2f0ea; border-radius: 18px; }
.metric-grid span { color: #76766f; font-size: 12px; font-weight: 800; }
.metric-grid strong { font-size: clamp(27px, 3vw, 42px); letter-spacing: -.05em; }
.preview-panel { overflow: hidden; border: 1px solid #e2dfd7; border-radius: 19px; }
.preview-toolbar { padding: 17px 18px; border-bottom: 1px solid #e2dfd7; }
.preview-toolbar h3 { margin: 0; font-size: 16px; }
.table-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.reset-filter-button { min-height: 34px; padding: 0 11px; background: #fff; color: #686861; border: 1px solid #d8d5cd; border-radius: 9px; cursor: pointer; font-size: 11px; font-weight: 800; }
.reset-filter-button:hover { border-color: #ff5a1f; color: #b53f16; }
.table-search { display: flex; align-items: center; gap: 8px; padding: 0 12px; background: #f4f3ef; border-radius: 11px; }
.table-search input { width: 230px; height: 38px; background: transparent; border: 0; outline: 0; font-size: 13px; }
.empty-state { min-height: 250px; display: grid; place-items: center; align-content: center; text-align: center; color: #7b7a74; }
.empty-state > span { font-size: 32px; color: #b3b0a7; }
.empty-state strong { margin: 8px 0 2px; color: #2c2c28; }
.empty-state p { margin: 0; font-size: 13px; }
.table-wrap { overflow: auto; max-height: 520px; }
.table-wrap table { width: 100%; border-collapse: collapse; min-width: 1040px; }
.table-wrap th { position: sticky; top: 0; z-index: 1; padding: 13px 14px; background: #f2f0ea; color: #686861; text-align: left; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.column-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.sort-button { display: inline-flex; align-items: center; gap: 6px; padding: 0; background: transparent; color: inherit; border: 0; cursor: pointer; font: inherit; font-weight: 850; letter-spacing: inherit; text-align: left; text-transform: inherit; white-space: nowrap; }
.sort-button::after { content: "↕"; color: #aaa79e; font-size: 11px; }
.sort-button.is-active[data-direction="asc"]::after { content: "↑"; color: #ff5a1f; }
.sort-button.is-active[data-direction="desc"]::after { content: "↓"; color: #ff5a1f; }
.filter-toggle { width: 25px; height: 25px; display: grid; place-items: center; flex: 0 0 auto; padding: 0; background: #fff; color: #77746c; border: 1px solid #d8d4cb; border-radius: 7px; cursor: pointer; font-size: 13px; line-height: 1; }
.filter-toggle:hover, .filter-toggle.has-filter { background: #ff5a1f; color: #fff; border-color: #ff5a1f; }
.filter-row th { top: 39px; z-index: 2; padding: 7px 8px 9px; background: #ebe9e3; }
.filter-row input, .filter-row select { width: 100%; min-width: 90px; height: 34px; padding: 0 9px; background: #fff; color: #373732; border: 1px solid #d7d3ca; border-radius: 8px; outline: none; font-size: 11px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.filter-row input:focus, .filter-row select:focus { border-color: #ff5a1f; box-shadow: 0 0 0 2px rgba(255,90,31,.1); }
.filter-row input[type="number"] { min-width: 72px; }
.table-wrap td { padding: 14px; border-top: 1px solid #ece9e1; font-size: 13px; vertical-align: top; }
.table-wrap .numeric { text-align: right; white-space: nowrap; }
.order-id { white-space: nowrap; font-variant-numeric: tabular-nums; }
.platform-pill { display: inline-flex; padding: 5px 8px; background: #e7f4ef; color: #116044; border-radius: 999px; white-space: nowrap; font-size: 10px; font-weight: 850; }
.sku-code { white-space: nowrap; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; }
.title-exclusion-input { width: 100%; resize: vertical; min-height: 145px; padding: 16px; background: #faf9f6; border: 1px solid #d9d6cd; border-radius: 15px; outline: none; line-height: 1.55; }
.title-exclusion-input:focus { border-color: #ff5a1f; box-shadow: 0 0 0 3px rgba(255,90,31,.1); }
.inline-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.sku-panel { overflow: hidden; margin-top: 18px; border: 1px solid #e2dfd7; border-radius: 19px; }
.report-controls { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.report-controls label:not(.import-button) { display: grid; gap: 6px; }
.report-controls label > span { color: #77766f; font-size: 10px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.report-controls input[type="month"] { min-height: 44px; padding: 0 13px; background: #fff; border: 1px solid #d9d6cd; border-radius: 13px; }
.danger-button { color: #a92f20; border-color: #efc9c2; }
.import-button { display: inline-flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.import-button input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.report-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(250px,1fr)); gap: 10px; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.report-item { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px; background: #f5f3ee; color: #191916; border: 1px solid #e5e2da; border-radius: 15px; cursor: pointer; text-align: left; }
.report-item:hover { border-color: #ff5a1f; background: #fff8f3; }
.report-item span, .report-item strong, .report-item small { display: block; }
.report-item small { margin-top: 5px; color: #77766f; }
.report-item b { white-space: nowrap; }
.empty-report { padding: 26px; background: #f5f3ee; color: #77766f; border-radius: 15px; text-align: center; }
.auth-modal[hidden] { display: none; }
.auth-modal { position: fixed; z-index: 1400; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(10,10,9,.72); backdrop-filter: blur(12px); }
.auth-panel { width: min(440px,100%); padding: 34px; background: #f8f6f1; border: 1px solid rgba(255,255,255,.5); border-radius: 26px; box-shadow: 0 30px 100px rgba(0,0,0,.35); }
.auth-panel h2 { margin: 22px 0 8px; font-size: 34px; letter-spacing: -.05em; }
.auth-panel p { margin: 0 0 24px; color: #6d6c66; line-height: 1.55; }
.auth-panel form label { display: grid; gap: 7px; margin-bottom: 13px; }
.auth-panel form label span { color: #66655f; font-size: 10px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.auth-panel form input { width: 100%; min-height: 48px; padding: 0 13px; background: #fff; border: 1px solid #d6d2c9; border-radius: 12px; outline: none; }
.auth-panel form input:focus { border-color: #ff5a1f; box-shadow: 0 0 0 3px rgba(255,90,31,.1); }
.auth-panel form > .primary-button { width: 100%; margin-top: 7px; }
.auth-panel .modal-actions { align-items: stretch; }
.auth-panel .modal-actions > * { flex: 1; }
body.app-locked { overflow: hidden; }
.rule-modal[hidden] { display: none; }
.rule-modal { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(10,10,9,.58); backdrop-filter: blur(5px); }
.modal-panel { position: relative; width: min(880px,100%); max-height: min(820px,90vh); overflow: auto; padding: 30px; background: #f8f6f1; border-radius: 26px; box-shadow: 0 30px 100px rgba(0,0,0,.28); }
.close-button { width: 43px; height: 43px; background: #e9e6df; border: 0; border-radius: 50%; cursor: pointer; font-size: 25px; }
.rules-editor { display: grid; gap: 11px; margin: 26px 0 12px; }
.rule-editor-row { display: grid; grid-template-columns: 34px 1fr 1.35fr 145px 135px 34px; gap: 10px; align-items: end; padding: 13px; background: #eeece6; border: 1px solid #dfdcd3; border-radius: 15px; }
.rule-editor-row .exclude-field { grid-column: 2 / 6; }
.toggle-field { align-self: center; }
.toggle-field input { position: absolute; opacity: 0; }
.toggle-field span { width: 32px; height: 19px; position: relative; display: block; background: #bbb8b0; border-radius: 999px; cursor: pointer; }
.toggle-field span::after { content: ""; width: 13px; height: 13px; position: absolute; top: 3px; left: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.toggle-field input:checked + span { background: #ff5a1f; }
.toggle-field input:checked + span::after { transform: translateX(13px); }
.add-rule-button { width: 100%; border-style: dashed; background: transparent; }
.modal-actions { margin-top: 24px; padding-top: 20px; border-top: 1px solid #ddd9d0; }
.muted-note { color: #77766f; font-size: 13px; }
.app-toast { position: fixed; z-index: 1100; right: 22px; bottom: 22px; max-width: min(420px,calc(100% - 44px)); padding: 15px 18px; background: #18241e; color: #fff; border-radius: 14px; box-shadow: 0 18px 50px rgba(0,0,0,.22); font-size: 13px; font-weight: 750; }
.app-toast[data-type="error"] { background: #a92f20; }
@media (max-width: 900px) {
  .order-hero { grid-template-columns: 1fr; gap: 25px; }
  .privacy-card { max-width: 520px; }
  .metric-grid { grid-template-columns: repeat(2,1fr); }
  .file-row { grid-template-columns: 44px 1fr 36px; }
  .file-row label { grid-column: span 3; }
  .rule-editor-row { grid-template-columns: 34px 1fr 1fr 34px; }
  .rule-editor-row .alias-field { grid-column: 2 / 4; }
  .rule-editor-row .exclude-field { grid-column: 2 / 4; }
}
@media (max-width: 650px) {
  .order-tool-page { padding-top: 145px; }
  .order-app { width: min(100% - 20px, 600px); }
  .order-hero h1 { font-size: 48px; }
  .order-hero p { font-size: 15px; }
  .workspace-card, .results-section { padding: 22px; border-radius: 22px; }
  .workspace-head, .results-head, .preview-toolbar, .action-strip { align-items: flex-start; flex-direction: column; }
  .action-strip .primary-button, .export-button { width: 100%; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric-grid article { min-height: 105px; }
  .table-search, .table-search input { width: 100%; }
  .table-toolbar { width: 100%; align-items: stretch; flex-direction: column; }
  .modal-panel { padding: 21px; }
  .rule-editor-row { grid-template-columns: 34px 1fr 34px; }
  .rule-editor-row label, .rule-editor-row .alias-field, .rule-editor-row .exclude-field { grid-column: 1 / -1; }
  .rule-editor-row .toggle-field { grid-column: 1; }
  .rule-editor-row .delete-rule { grid-column: 3; grid-row: 1; }
  .report-controls, .report-controls > * { width: 100%; }
}
