/* ERP-wide layout layer. Desktop, print documents and drawing coordinates stay unchanged. */
.extra-item-add{display:flex;justify-content:center;margin:24px 0}.extra-item-add .button{width:52px;height:52px;font-size:28px;padding:0;display:grid;place-items:center}
.workflow-extra-dialog{width:min(640px,calc(100% - 24px));max-height:calc(100dvh - 24px);padding:20px;border:1px solid var(--line);border-radius:16px;background:var(--surface,#fff);color:var(--ink);overflow:auto;overscroll-behavior:contain}
.workflow-extra-dialog::backdrop{background:#11182080}.workflow-extra-dialog header{display:flex;justify-content:space-between;align-items:center;gap:12px}.workflow-extra-dialog .workflow-extra-form{margin:0;border:0;padding:0}.workflow-extra-dialog .actions{margin-top:18px}
.sales-plan-actions{display:flex;flex-wrap:wrap;gap:8px}.sales-tax-field{max-width:280px}.sales-finance [data-discount-fields][hidden]{display:none!important}
.drawing-elevation-scroll{width:100%;max-width:100%;min-width:0}.drawing-elevation-scroll canvas{display:block;min-width:0!important;width:100%!important;max-width:100%!important;height:auto!important;max-height:none!important}
.erp-mobile-scroll{max-width:100%;min-width:0}
.erp-mobile-nav>summary{display:none}
@media screen and (max-width:760px){
 html body .shell,html body .shell :where(section,article,aside,form,fieldset,.field,.actions,.form-grid,.admin-grid,.drawing-workspace,.project-editor){min-width:0}
 html body .shell :where(h1,h2,h3,h4,p,dd,legend,.badge,.notice,.field-hint){overflow-wrap:anywhere}
 html body .shell :where(input,select,textarea){max-width:100%;box-sizing:border-box}
 html body.has-side-menu .top{opacity:1;filter:none;backdrop-filter:none;-webkit-backdrop-filter:none;background:var(--bg,#f2f4f5)}
 html body.has-side-menu .brand small{color:var(--ink,#111820);font-size:10px;font-weight:600;opacity:1}
 html body :is(.shell,.erp-mobile-dialog) select{padding:8px 10px;line-height:1.35}
 html body :is(.shell,.erp-mobile-dialog) :where(input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not(.signed-file-input),select,textarea,.check-line,.quote-review-check,.ogm3d-check){min-height:44px!important}
 html body .shell :where(button,.button,.icon-button,.portal-power,.menu-toggle,.menu-close,.dialog-close,.contact-add,.location-button,.master-pagination a){min-height:44px!important;min-width:44px!important}
 html body .shell :where(.icon-button,.portal-power,.menu-toggle,.menu-close,.dialog-close,.contact-remove,.contact-default,.location-button){min-width:44px;flex-shrink:0}
 html body .shell :where(button,.button){white-space:normal;overflow-wrap:anywhere}
 html body .shell :where(.actions,.row-actions,.section-heading,.parameter-list-heading,.hr-heading,.project-title-row,.project-form-footer,.payment-entry-head,.cost-primary-summary,.drawing-footer,.drawing-top,.drawing-system,.customer-match-choice){flex-wrap:wrap;max-width:100%}
 html body .shell :where(.search,.systems-search){display:flex;flex-wrap:wrap;gap:8px}
 html body .shell :where(.search,.systems-search) input{min-width:0;flex:1 1 160px}
 html body .shell :where(.project-title-field,.customer-picker-row input){min-width:0}
 html body .shell :where(.project-editor-grid,.admin-grid,.parameter-layout){grid-template-columns:minmax(0,1fr)!important}
 html body .shell .project-form-footer .field-hint{max-width:100%;flex:1 1 100%;font-size:12px}
 html body .shell .project-form-footer .button{margin-left:auto}
 html body .shell .project-tabs{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}
 html body .shell .project-tabs .button{min-height:44px!important;font-size:12px!important;padding:8px 4px!important}
 html body .shell :where(.system-tabs,.admin-tabs,.parameter-tabs){display:flex;flex-wrap:wrap;gap:6px;max-width:100%}
 html body .shell :where(.system-tabs,.admin-tabs,.parameter-tabs) a{min-height:44px;display:flex;align-items:center;white-space:normal}
 html body .erp-mobile-dialog{width:min(100% - 16px, var(--erp-dialog-width, 1040px))!important;max-width:calc(100vw - 16px)!important;max-height:calc(var(--erp-viewport-height,100dvh) - 16px)!important;overflow-y:auto;overscroll-behavior:contain;scroll-padding-block:16px;overflow-wrap:anywhere}
 html body .erp-mobile-dialog :where(form,fieldset,header,footer,.field){min-width:0;max-width:100%}
 html body .erp-mobile-dialog :where(button,.button){min-height:44px!important;min-width:44px!important;white-space:normal;overflow-wrap:anywhere}
 html body .erp-mobile-dialog :where(footer,.actions,.dialog-actions,.front-dialog-footer){flex-wrap:wrap;gap:8px}
 html body .erp-mobile-dialog :where(footer,.dialog-actions,.front-dialog-footer) .button{flex:1 1 110px;min-height:44px}
 html body .erp-mobile-dialog :where(h2,h3){padding-right:36px}
 html body .erp-mobile-dialog :where(.dialog-close,.icon-button){min-width:44px;min-height:44px}
 html body .shell .panel-modal{padding:8px}
 html body .shell .panel-modal form,html body .shell .drawing-3d-modal>section{max-width:100%;max-height:calc(var(--erp-viewport-height,100dvh) - 16px);overflow:auto;overscroll-behavior:contain}
 html body .shell :where(.detail,.drawing-summary dl){grid-template-columns:minmax(0,1fr);gap:6px}
 html body .shell :where(.detail dd,.drawing-summary dd){margin:0 0 12px;overflow-wrap:anywhere}
 html body .shell .payment-entry-head>div{min-width:0}
 html body .shell .payment-entry-totals{grid-template-columns:repeat(2,minmax(0,1fr))}
 html body .shell .payment-entry-totals>*{min-width:0;overflow-wrap:anywhere}
 html body .shell .payment-entry-head strong{white-space:normal}
 html body .shell .customer-contact-standard{grid-template-columns:minmax(0,1fr)}
 html body .shell .contact-row.phone{grid-template-columns:88px minmax(0,1fr) 44px;gap:6px}
 html body .shell .contact-row.phone .contact-code{grid-column:1;grid-row:1}
 html body .shell .contact-row.phone input[data-value]{grid-column:2/-1;grid-row:1}
 html body .shell .contact-row.phone .contact-default{grid-column:1/3;grid-row:2;display:flex;gap:8px;width:auto;justify-content:flex-start}
 html body .shell .contact-default::after{content:'Varsayılan';font-size:12px}
 html body .shell .contact-default{width:auto;min-height:44px;display:flex;gap:8px;padding:4px}
 html body .shell .contact-remove{width:44px;height:44px}
 html body .shell .contact-row.phone .contact-remove{grid-column:3;grid-row:2}
 html body .shell .contact-row.email{display:grid;grid-template-columns:minmax(0,1fr) 44px}
 html body .shell .contact-row.email input[data-value]{grid-column:1/-1}
 html body .shell .contact-row.email .contact-default{grid-column:1}
 html body .shell .contact-code::after{font-size:16px}
 html body .shell .contact-address-card{grid-template-columns:minmax(0,1fr) 44px}
 html body .shell .contact-address-edit{grid-column:1/-1;min-height:44px}
 html body .shell .contact-address-edit span{white-space:normal;overflow-wrap:anywhere}
 html body .shell .contact-address-edit small{flex-shrink:0}
 html body .shell :where(.contact-hint,.contact-error,.field-hint){font-size:12px;line-height:1.5}
 html body .shell .erp-mobile-nav>summary{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px;cursor:pointer;font-weight:700;list-style:none}
 html body .shell .erp-mobile-nav>summary::after{content:'⌄';font-size:20px}
 html body .shell .erp-mobile-nav[open]>summary{margin-bottom:12px}
 html body .shell .erp-mobile-nav[open]>summary::after{content:'⌃'}
 html body .shell .parameter-sidebar{margin-bottom:12px;position:static}
 html body .shell .erp-mobile-scroll{overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scroll-padding:8px}
 html body .shell .erp-mobile-scroll>table:not(.erp-mobile-records){display:table;min-width:560px;overflow:visible}
 html body .shell table.erp-mobile-records{display:block;width:100%;overflow:visible}
 html body .shell .erp-mobile-records>thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 html body .shell .erp-mobile-records>tbody{display:grid;gap:12px;width:100%}
 html body .shell .erp-mobile-records>tbody>tr{display:grid;grid-template-columns:minmax(0,1fr);border:1px solid var(--line,#e5e8ea);border-radius:10px;padding:10px;min-width:0}
 html body .shell .erp-mobile-records>tbody>tr>td{display:block!important;padding:8px 0;min-width:0;overflow-wrap:anywhere;white-space:normal;border:0;border-bottom:1px solid var(--line,#e5e8ea)}
 html body .shell .erp-mobile-records>tbody>tr>td:last-child{border-bottom:0}
 html body .shell .erp-mobile-records>tbody>tr>td::before{content:attr(data-mobile-label);display:block;margin-bottom:4px;font-size:12px;font-weight:700;color:var(--muted,#70777d)}
 html body .shell .erp-mobile-records>tbody>tr>td.erp-mobile-cell-wide{display:block}
 html body .shell .erp-mobile-records>tbody>tr>td.erp-mobile-cell-wide::before{display:none}
 html body .shell .erp-mobile-records td>*{min-width:0;max-width:100%}
 html body .shell .erp-mobile-records td form{display:flex;flex-wrap:wrap;gap:8px}
 html body .shell .erp-mobile-records td form select{flex:1 1 100%}
 html body .shell .erp-mobile-records td :where(img,video){max-width:100%;height:auto}
 html body .ogm3d-dialog :where(button,.ogm3d-toolbar button,.ogm3d-motion button){min-height:44px!important}
 html body .ogm3d-swatches button{width:44px;height:44px;min-width:44px}
 html body .ogm3d-motion{grid-template-columns:auto auto minmax(0,1fr) 32px}
 html body .ogm3d-dialog .ogm3d-motion button{padding:6px;font-size:11px}
 html body .ogm3d-options details[open]{grid-template-columns:minmax(0,1fr)}
 html body .ogm3d-stage{min-height:240px}
 html body .shell .drawing-stepper{flex-wrap:wrap}
 html body .shell .drawing-stepper :where(button,a){min-height:44px}
 html body .shell .drawing-top{grid-template-columns:44px minmax(0,1fr) auto}
 html body .shell .drawing-top>a{width:44px;height:44px}
 html body .shell .drawing-checks-grid label{min-height:44px}
 html body .shell .catalog-color-options span{min-height:44px;display:flex;align-items:center}
 html body .shell :where(.hr-form-footer,.drawing-settings-footer){flex-wrap:wrap}
 html body .shell .drawing-tools [data-tool-panel]{max-width:calc(100vw - 48px);right:0}
 html body .shell .drawing-tools [data-tool-panel] button{min-height:44px}
}
@media screen and (max-width:600px){
 html body .shell :where(.form-grid,.admin-form .form-grid,.parameter-dialog .form-grid,.front-form .form-grid,.drawing-fields-grid,.cost-form-minimal .cost-grid,.address-editor-grid,.project-extra .form-grid,.theme-tokens){grid-template-columns:repeat(auto-fit,minmax(min(100%,148px),1fr))!important;gap:12px}
 html body .erp-mobile-dialog :where(.form-grid,.address-editor-grid){grid-template-columns:repeat(auto-fit,minmax(min(100%,148px),1fr))!important;gap:12px}
 html body .shell .drawing-settings-grid{grid-template-columns:minmax(0,1fr)!important}
 html body :is(.shell,.erp-mobile-dialog) :where(.form-grid,.address-editor-grid)>.field:has(textarea){grid-column:1/-1!important}
 html body .shell .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 html body .shell .metric strong{font-size:24px}
 html body .shell .card{padding:14px}
 html body .shell .erp-mobile-dialog :where(.customer-standard-dialog form,.customer-dialog form){padding:18px 14px}
 html body .shell .ogm3d-dialog{padding:0}
 html body .shell .ogm3d-dialog h2{padding-right:0}
 html body .shell .drawing-stepper small{font-size:11px}
 html body .shell .project-overview-metrics{font-size:12px;flex-wrap:wrap}
 html body .shell .cost-primary-summary>div:last-child{font-size:12px;text-align:left}
 html body .shell .customer-picker-row{flex-direction:row;flex-wrap:wrap}
 html body .shell .customer-picker-row input{flex:1 1 160px}
 html body .shell .customer-picker-row .button{flex:1 1 90px}
 html body .shell .customer-picker-results{max-height:40dvh;overflow:auto}
 html body .shell .drawing-3d-actions{flex-wrap:wrap}
 html body .shell .drawing-3d-actions button{min-height:44px}
 html body .shell .drawing-3d-swatch{width:44px;height:44px}
}
@media screen and (max-width:359px){
 html body .shell .payment-entry-totals{grid-template-columns:minmax(0,1fr)}
 html body .ogm3d-motion{grid-template-columns:1fr 1fr}
 html body .ogm3d-motion label{grid-column:1;min-height:44px}
 html body .ogm3d-motion output{grid-column:2}
}
/* At most two field columns, including tablet widths. A spanning note must not
   leave unused auto-fit columns beside two short fields. */
@media screen and (max-width:900px){
 html body :is(.shell,.erp-mobile-dialog) :is(.form-grid,.drawing-fields-grid,.cost-grid,.address-editor-grid,.theme-tokens){grid-template-columns:repeat(auto-fit,minmax(min(100%,max(148px,calc((100% - 12px)/2))),1fr))!important;gap:12px}
 html body :is(.shell,.erp-mobile-dialog) :where(.form-grid,.address-editor-grid)>.field:has(textarea){grid-column:1/-1!important}
 html body :is(.shell,.erp-mobile-dialog) :where(input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not(.signed-file-input),select,textarea,button,.button){min-height:44px!important}
}
/* Native iOS date fields have an intrinsic minimum width; allow the actual
   controls to shrink and use a full row on phones, not just their labels. */
@media screen and (max-width:900px){
 html body :is(.shell,.erp-mobile-dialog) input:is([type=date],[type=datetime-local]){width:100%;min-width:0;min-inline-size:0;max-width:100%;box-sizing:border-box;font-size:16px!important}
 html body :is(.shell,.erp-mobile-dialog) input::-webkit-date-and-time-value{text-align:left;min-width:0}
 html body :is(.shell,.erp-mobile-dialog) .drawing-fields-grid select{appearance:none;-webkit-appearance:none;box-sizing:border-box;width:100%;height:48px;min-height:48px!important;padding:10px 34px 10px 12px;line-height:1.35;font-size:16px!important;border-radius:8px;background-repeat:no-repeat;background-position:right 11px center;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%2365707b' stroke-width='1.6'/%3E%3C/svg%3E")}
 html body .shell .sales-plan-heading{flex-wrap:wrap;gap:12px}.sales-plan-actions{width:100%}.sales-plan-actions .button{flex:1 1 120px}
 html body :is(.shell,.erp-mobile-dialog) .drawing-fields-grid select.drawing-color-select[data-color-tone=dark]{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' stroke='%23ffffff' stroke-width='1.6'/%3E%3C/svg%3E")}
}
@media screen and (max-width:600px){
 html body .shell .project-extra[aria-labelledby=project-dates-heading]>.form-grid{grid-template-columns:minmax(0,1fr)!important}
}
/* Read-only steps retain real links; mutation fields remain disabled. */
.parameter-add-button{display:inline-grid!important;place-items:center;flex:none;width:44px;min-width:44px;height:44px;min-height:44px;padding:0!important;font-size:25px;line-height:1;text-decoration:none}
.drawing-readonly-fields{border:0;margin:0;padding:0;min-width:0;width:100%}
[data-drawing-readonly="1"] :is(.drawing-add-button,.drawing-remove-button,.front-add-row,[data-object-edit],.panel-modal,[data-panel-select]){display:none!important}
@media screen and (max-width:700px){
 html body .sales-list .sales-filter-dates{grid-template-columns:minmax(0,1fr)!important;width:100%;max-width:100%;box-sizing:border-box;min-inline-size:0}
 html body .sales-list .sales-filter-dates label{display:block;min-width:0;max-width:100%}
 html body .sales-list .sales-filter-dates input[type=date]{display:block;appearance:none;-webkit-appearance:none;width:100%;max-width:100%;min-width:0;min-inline-size:0;box-sizing:border-box;font-size:16px!important;min-height:48px}
 html body .sales-list .sales-filter-dates input::-webkit-date-and-time-value{min-width:0;text-align:left}
}

/* Theme-aware fallback for lists without a semantic stage colour. */
:is(.shell,.erp-mobile-dialog) {
    --list-zebra-surface: color-mix(in srgb, var(--surface) 95%, var(--ink) 5%);
}
:is(.shell,.erp-mobile-dialog) :is([data-list-zebra],.sales-compact-list,.crm-message-list,.crm-recipient-list,.crm-customer-results,.notification-list,.message-log-list,.system-list,.attachment-list,.mail-profile-list,.integration-account-list,.joining-list,.dash-agenda-list,.dash-work-list,.minimal-drawing-list,.sales-payment-list,.payment-entry-list)
> :nth-child(even of :not([hidden],script,template,[data-list-no-zebra])) {
    --list-card-surface: var(--list-zebra-surface);
    background: var(--list-stage-surface,var(--list-card-surface));
}
    html body :is(.shell,.erp-mobile-dialog) :is(.erp-mobile-records,.customer-list-table,.work-issue-list,.request-list-table,.sales-list-table)
    > tbody > tr:nth-child(even of :not([hidden],:has(> td[colspan]),[data-list-no-zebra])):not([data-sales-stage="draft"],[data-sales-stage="measurement"],[data-sales-stage="offer"],[data-sales-stage="awaiting_deposit"],[data-sales-stage="confirmed"],[data-sales-stage="production"],[data-sales-stage="assembly"],[data-sales-stage="delivery_ready"],[data-sales-stage="completed"],[data-request-state="new"],[data-request-state="pending"],[data-request-state="confirmed"],[data-request-state="completed"],[data-request-state="cancelled"]) {
        background: var(--list-stage-surface,var(--list-zebra-surface));
    }

/* Keyboard-only bounds follow the visual viewport, including Safari's pan offset. */
@media screen {
 html body .erp-keyboard-overlay{position:fixed!important;top:var(--erp-surface-top,0px)!important;bottom:auto!important;height:var(--erp-viewport-height,100dvh)!important;max-height:var(--erp-viewport-height,100dvh)!important;min-height:0!important;box-sizing:border-box;align-items:start!important;align-content:start!important;grid-template-rows:minmax(0,1fr);overflow-y:hidden!important;padding-block:8px!important;scroll-padding-block:12px}
 html body .erp-keyboard-overlay>form,html body .erp-keyboard-overlay>section,html body .erp-keyboard-overlay>.modal-content{max-height:calc(var(--erp-viewport-height,100dvh) - 16px)!important;min-height:0!important;overflow-y:auto!important;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;scroll-padding-block:12px}
 html body dialog.erp-keyboard-dialog{position:fixed!important;top:var(--erp-surface-top,0px)!important;bottom:auto!important;margin-block:8px!important;max-height:calc(var(--erp-viewport-height,100dvh) - 16px)!important;min-height:0!important;overflow-y:auto!important;overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;scroll-padding-block:12px}
 html body :is(.erp-keyboard-overlay,.erp-keyboard-dialog) :is(input,select,textarea,[contenteditable=true]){scroll-margin-block:12px}
}

@media screen{html.erp-keyboard-page body{padding-bottom:calc(var(--erp-body-bottom,0px) + var(--erp-keyboard-inset,0px) + var(--erp-focus-space,0px))!important}}

@media screen{html body .erp-keyboard-scroller{padding-bottom:calc(var(--erp-scroller-bottom,0px) + var(--erp-focus-space,0px))!important}}

@media screen{
 html body :is(.erp-keyboard-overlay,.erp-keyboard-dialog,.erp-keyboard-scroller){overflow-anchor:none;scroll-behavior:auto!important}
}
