.deal-form-page{width:min(820px,100%);margin:0 auto}.deal-form-page.in-drawer{width:100%}.deal-form-header{align-items:flex-start}.deal-form-header .screen-subtitle{color:var(--muted-foreground);font-size:13px}.deal-form-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;border:1px solid var(--accent-border);border-radius:var(--radius-control);background:var(--accent-soft);color:var(--foreground);font-size:13px}.deal-form-pending{margin:0;color:var(--muted-foreground);font-size:13px}.crm-form-grid>.is-wide{grid-column:1/-1;min-width:0}.deal-form .crm-form-field>label{color:var(--text-secondary);font-size:13px;font-weight:500}.deal-form .crm-form-field input::placeholder,.deal-form .crm-form-field textarea::placeholder{color:#6b6f76}.crm-lookup .field-error,.deal-form .crm-form-field .field-error,.deal-form .field-error{display:block;margin-top:-2px;color:var(--critical-fg);font-family:var(--font-text);font-size:12px;font-weight:500;line-height:1.35}.crm-lookup .crm-lookup-hint,.deal-form .field-hint{color:var(--muted-foreground);font-family:var(--font-text);font-size:12px;font-weight:400}.deal-form .crm-form-field.has-error input:not([type=checkbox]),.deal-form .crm-form-field.has-error select,.deal-form .crm-form-field.has-error textarea,.deal-form .crm-lookup.has-error .crm-lookup-control input,.deal-form .deal-product-quantity.has-error input{border-color:var(--critical-fg);box-shadow:inset 0 0 0 1px var(--critical-fg)}.deal-form .crm-form-field.has-error input:not([type=checkbox]):focus,.deal-form .crm-form-field.has-error select:focus,.deal-form .crm-form-field.has-error textarea:focus{box-shadow:0 0 0 3px rgba(140,28,0,.16)}.crm-form-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-gap:12px;gap:12px;min-width:0}.deal-form .crm-form-field select{-webkit-appearance:none;-moz-appearance:none;appearance:none;padding-right:34px;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23666666' stroke-width='1.6'><path d='M3 4.5l3 3 3-3'/></svg>");background-repeat:no-repeat;background-position:right 12px center;background-size:12px}.deal-amount-control{position:relative;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;grid-gap:8px;gap:8px}.deal-amount-control input{font-family:var(--font-numeric);font-feature-settings:"tnum";font-variant-numeric:tabular-nums;padding-right:34px!important}.deal-amount-suffix{position:absolute;right:12px;color:var(--muted-foreground);font-family:var(--font-numeric);font-size:14px;pointer-events:none}.deal-amount-control:has(.deal-amount-currency) input{padding-right:12px!important}.deal-form .crm-form-field .deal-amount-currency{width:auto;min-width:108px}.deal-form .deal-amount-other{justify-self:start;min-height:24px;padding:0 4px;color:var(--muted-foreground);font-size:12px}.deal-products-label{color:var(--text-secondary);font-size:13px;font-weight:500}.deal-form .deal-products-field .deal-product-grid{padding:0}.deal-product-quantity{display:grid;grid-gap:4px;gap:4px}.deal-product-quantity label{color:var(--muted-foreground);font-size:12px;font-weight:500}.deal-product-quantity input{width:100%;min-height:40px;padding:0 10px;border:1px solid var(--border);border-radius:var(--radius-control);background:#fff;font-family:var(--font-numeric);font-size:14px;font-feature-settings:"tnum";font-variant-numeric:tabular-nums}.deal-product-quantity input:focus{border-color:var(--foreground);box-shadow:var(--ring-accent-soft);outline:none}.deal-form .deal-product-option{border-radius:var(--radius-control)}.deal-form .deal-product-check strong{font-family:var(--font-text);font-size:14px;font-weight:600}.deal-source-field>span{color:var(--text-secondary);font-size:13px;font-weight:500}.deal-source-chip{display:flex;align-items:center;gap:10px;min-height:42px}.deal-source-chip .chip.is-source{display:inline-flex;align-items:center;min-height:30px;padding:0 12px;border:1px solid var(--accent-border);border-radius:var(--radius-control);background:var(--accent-soft);color:var(--warning-fg);font-size:13px;font-weight:500}.deal-open-deals{display:grid;grid-gap:6px;gap:6px;margin-top:4px;padding:10px 12px;border:1px solid var(--border);border-radius:var(--radius-control);background:#fafaf7;font-weight:400}.deal-open-deals-title{color:var(--text-secondary);font-size:12px;font-weight:500}.deal-open-deals ul{display:grid;grid-gap:4px;gap:4px;margin:0;padding:0;list-style:none}.deal-open-deals li{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) auto;align-items:center;grid-gap:8px;gap:8px;min-width:0;color:var(--foreground);font-size:13px}.deal-open-deals-meta,.deal-open-deals-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.deal-open-deals small,.deal-open-deals-meta{color:var(--muted-foreground)}.deal-open-deals small{font-size:12px}.crm-lookup{position:relative}.crm-lookup-control{position:relative;min-width:0}.crm-lookup-control input{width:100%;min-height:42px;padding:0 36px 0 12px;border:1px solid var(--border);border-radius:var(--radius-control);background:#fff;color:var(--foreground);font-family:var(--font-text);font-size:14px;font-weight:400}.crm-lookup-control input:focus{border-color:var(--foreground);box-shadow:var(--ring-accent-soft);outline:none}.crm-lookup.is-disabled .crm-lookup-control input{color:#686868;background:#f3f3ef;cursor:not-allowed}.crm-lookup-caret,.crm-lookup-clear{position:absolute;top:50%;right:6px;display:grid;width:30px;height:30px;place-items:center;transform:translateY(-50%);color:var(--muted-foreground)}.crm-lookup-caret{pointer-events:none;font-size:12px}.crm-lookup-clear{padding:0;border:0;border-radius:50%;background:transparent;font-size:18px;line-height:1;cursor:pointer}.crm-lookup-clear:hover{background:rgba(17,17,17,.06);color:var(--foreground)}.crm-lookup-list{position:absolute;top:calc(100% + 4px);left:0;right:0;z-index:30;max-height:288px;margin:0;padding:4px;overflow:auto;list-style:none;border:1px solid var(--border);border-radius:var(--radius-control);background:#fff;box-shadow:var(--shadow-md)}.crm-lookup-option{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:40px;padding:8px 10px;border-radius:var(--radius-control);color:var(--foreground);font-family:var(--font-text);font-size:14px;font-weight:400;cursor:pointer}.crm-lookup-option-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.crm-lookup-option small{flex-shrink:0;color:var(--muted-foreground);font-family:var(--font-text);font-size:12px}.crm-lookup-option mark{background:transparent;color:inherit;font-weight:700}.crm-lookup-option.is-active{background:var(--secondary)}.crm-lookup-option.is-selected{font-weight:600}.crm-lookup-more{justify-content:center;color:var(--muted-foreground);font-size:13px}.crm-lookup-create{margin-top:2px;padding-top:10px;border-top:1px solid var(--border);border-radius:0 0 var(--radius-control) var(--radius-control);color:var(--warning-fg);font-weight:600}.crm-lookup-status{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:40px;padding:8px 10px;color:var(--muted-foreground);font-size:13px;font-weight:400}.crm-lookup-status.is-error{color:var(--critical-fg)}.deal-form-details>summary{list-style:none;cursor:pointer}.deal-form-details>summary::-webkit-details-marker{display:none}.deal-form-details:not([open])>summary{border-bottom:0;border-radius:calc(var(--radius-card) - 1px)}.deal-form-details>summary>div{position:relative;padding-right:24px}.deal-form-details>summary>div:after{content:"";position:absolute;top:6px;right:4px;width:8px;height:8px;border-right:1.6px solid var(--muted-foreground);border-bottom:1.6px solid var(--muted-foreground);transform:rotate(45deg);transition:transform var(--transition-fast)}.deal-form-details[open]>summary>div:after{transform:rotate(-135deg);top:10px}.deal-form .deal-form-actions{position:-webkit-sticky;position:sticky;bottom:0;z-index:5;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px;margin:4px -4px 0;padding:12px 4px;border-top:1px solid var(--border);background:var(--background)}.crm-deal-panel .deal-form .deal-form-actions{bottom:-28px;margin:4px -28px 0;padding:12px 28px}.deal-form-actions-status{flex:1 1 240px;min-width:0}.deal-form-buttons{display:flex;flex-shrink:0;gap:10px;margin-left:auto}.deal-form-summary{margin:0;color:var(--critical-fg);font-size:13px;font-weight:500;line-height:1.4}.deal-form-summary.is-error{font-weight:400}.deal-form-summary-link{padding:0;border:0;background:transparent;color:inherit;font:inherit;text-decoration:underline;text-underline-offset:2px;cursor:pointer}.deal-form-draft-note,.deal-form-step{color:var(--muted-foreground);font-size:12px}.deal-form-step{font-family:var(--font-text);white-space:nowrap}.crm-form-section-head.is-sub{grid-template-columns:minmax(0,1fr)}.deal-form-confirm{position:fixed;inset:0;z-index:120;display:grid;place-items:center;padding:16px;background:rgba(17,17,17,.42)}.deal-form-confirm-box{display:grid;grid-gap:8px;gap:8px;width:min(440px,100%);padding:20px;border:1px solid var(--border);border-radius:var(--radius-card);background:var(--card);box-shadow:var(--shadow-md)}.deal-form-confirm-box h3{margin:0;font-size:17px;font-weight:600}.deal-form-confirm-box p{margin:0;color:var(--muted-foreground);font-size:14px;line-height:1.45}.deal-form-confirm-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;margin-top:8px}@media (max-width:767px){.crm-form-grid,.crm-form-row,.deal-form .deal-product-grid{grid-template-columns:minmax(0,1fr)}.crm-lookup-control input,.deal-form .crm-form-field input,.deal-form .crm-form-field select,.deal-form .crm-form-field textarea,.deal-product-quantity input{font-size:16px}.deal-form .deal-form-actions{gap:8px 12px;margin:4px -14px 0;padding:8px 14px calc(8px + env(safe-area-inset-bottom, 0px))}.crm-deal-panel .deal-form .deal-form-actions{bottom:calc(-16px - env(safe-area-inset-bottom, 0px));margin:4px -16px calc(-16px - env(safe-area-inset-bottom, 0px));padding:8px 16px calc(8px + env(safe-area-inset-bottom, 0px))}.deal-form-actions-status{flex:0 1 auto}.deal-form-actions-status.is-message{flex-basis:100%}.deal-form-actions-status:empty{display:none}.deal-form-buttons{display:grid;flex:1 1;grid-template-columns:2fr 3fr;grid-gap:8px;gap:8px;min-width:0;margin-left:0}.deal-form-buttons .button-ghost,.deal-form-buttons .button-solid{grid-row:1;min-height:44px;width:100%;padding-inline:8px;white-space:nowrap}.deal-form-buttons .button-ghost{grid-column:1}.deal-form-buttons .button-solid{grid-column:2}.deal-form-header .deal-header-left{flex-wrap:wrap}.crm-lookup-list{position:fixed;inset:auto 0 0 0;max-height:60dvh;border-radius:var(--radius-card) var(--radius-card) 0 0;padding-bottom:calc(8px + env(safe-area-inset-bottom, 0px))}.deal-open-deals li{grid-template-columns:minmax(0,1fr) auto}.deal-open-deals-meta{grid-column:1/-1}}.crm-amo-history{margin-top:20px;min-width:0}.crm-amo-history>summary{cursor:pointer;padding:16px}.crm-amo-history>summary h3{display:inline;font-size:16px}.crm-amo-history-body{padding:0 16px 16px;overflow-wrap:anywhere}.crm-amo-history-body section{margin-bottom:20px}.crm-amo-history .screen-actions{flex-wrap:wrap;gap:8px}.crm-amo-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr));grid-gap:12px;gap:12px}.crm-amo-fields dt{color:var(--muted-foreground);font-size:12px}.crm-amo-fields dd{margin:4px 0 0;white-space:pre-wrap}.crm-amo-entry{padding:14px 0;border-bottom:1px solid var(--border)}.crm-amo-entry h4{margin:0 0 8px}.crm-amo-entry p{margin:6px 0}.crm-amo-text{white-space:pre-wrap}