/* Mobile ATI editor: route first, a separate loading period, one scroll region. */
.m-ati-open { overflow: hidden; }
.m-ati-open .m-nav, .m-ati-open .m-tabbar { visibility: hidden; }
.m-ati-sheet[hidden], .m-ati-sheet [hidden] { display: none !important; }
.m-ati-sheet { --ati-ink: #20342d; --ati-muted: #62766d; --ati-line: #d7e2dc; --ati-green: #398262; position: fixed; inset: 0; z-index: 12000; display: flex; align-items: flex-end; justify-content: center; color: var(--ati-ink); }
.m-ati-sheet *, .m-ati-sheet *::before, .m-ati-sheet *::after { box-sizing: border-box; }
.m-ati-backdrop { position: absolute; inset: 0; background: #15281dcc; }
.m-ati-panel { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 580px; height: calc(100% - max(12px, env(safe-area-inset-top))); max-height: 960px; min-height: 0; margin: 0; overflow: hidden; background: #fff; border-radius: 22px 22px 0 0; box-shadow: 0 -10px 36px #0002; }
.m-ati-head { flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px 12px; border-bottom: 1px solid var(--ati-line); }
.m-ati-head h2 { margin: 0; font-size: 20px; line-height: 1.25; font-weight: 750; letter-spacing: -.3px; }
.m-ati-head p { margin: 3px 0 0; color: var(--ati-muted); font-size: 12px; }
.m-ati-close { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 11px; border: 1px solid var(--ati-line); border-radius: 12px; background: #fff; color: var(--ati-ink); }
.m-ati-close svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.8; fill: none; }
.m-ati-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0 18px 20px; scroll-padding: 18px; }
.m-ati-section { padding: 20px 0 16px; border-bottom: 1px solid var(--ati-line); }
.m-ati-section h3 { margin: 0 0 15px; font-size: 16px; line-height: 1.3; font-weight: 750; }
.m-ati-field { display: grid; gap: 7px; min-width: 0; margin: 0 0 14px; }
.m-ati-field > span, .m-ati-days-label { color: var(--ati-muted); font-size: 13px; line-height: 1.4; font-weight: 600; }
.m-ati-field b { color: #b42318; font-weight: 600; }
.m-ati-sheet input, .m-ati-sheet textarea, .m-ati-sheet select { display: block; width: 100%; min-width: 0; max-width: 100%; min-height: 48px; padding: 11px 12px; border: 1px solid var(--ati-line); border-radius: 10px; background-color: #fbfcfb; color: var(--ati-ink); font: inherit; font-size: 16px; line-height: 1.45; }
.m-ati-sheet textarea { resize: vertical; font-size: 16px; font-weight: 400; }
.m-ati-sheet select { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2362766d' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.m-ati-sheet input[type=date] { appearance: none; -webkit-appearance: none; min-height: 50px; text-align: left; }
.m-ati-sheet input[type=date]::-webkit-date-and-time-value { text-align: left; min-height: 1.45em; }
.m-ati-sheet input[type=date]::-webkit-datetime-edit { min-width: 0; padding: 0; }
.m-ati-sheet :is(input,select,textarea,button):focus-visible { outline: 2px solid var(--ati-green); outline-offset: 2px; }
.m-ati-sheet [aria-invalid=true] { border-color: #b42318; }
.m-ati-field-error { color: #b42318; display: block; font-size: 13px; line-height: 1.4; margin: 0; }
.m-ati-address-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.m-ati-secondary { padding: 10px 12px; min-height: 44px; border: 1px solid var(--ati-line); border-radius: 10px; background: #f2f7f4; color: var(--ati-green); font: inherit; font-size: 13px; font-weight: 650; }
.m-ati-status { margin: 10px 0 0; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; color: var(--ati-muted); }
.m-ati-status[data-state=ok] { color: #28704f; }
.m-ati-status[data-state=error] { color: #a83121; }
.m-ati-choices { display: grid; gap: 8px; margin-top: 12px; }
.m-ati-choices button { min-height: 48px; padding: 12px; text-align: left; font: inherit; font-size: 14px; line-height: 1.45; border: 1px solid #83b49b; border-radius: 10px; background: #f0f7f3; color: var(--ati-ink); overflow-wrap: anywhere; }
.m-ati-date-shortcuts { display: flex; gap: 8px; margin: -6px 0 18px; }
.m-ati-date-shortcuts button { min-height: 40px; padding: 8px 16px; border: 1px solid var(--ati-line); border-radius: 9px; color: var(--ati-green); background: #fff; font: inherit; font-size: 13px; }
.m-ati-stepper { display: grid; grid-template-columns: 52px minmax(0,1fr) 52px; gap: 10px; margin: 8px 0; }
.m-ati-stepper input { text-align: center; font-weight: 650; }
.m-ati-stepper button { min-height: 48px; border: 1px solid var(--ati-line); border-radius: 10px; color: var(--ati-green); background: #f2f7f4; font-size: 26px; touch-action: manipulation; }
.m-ati-period { margin: 8px 0 0; font-size: 13px; line-height: 1.4; color: var(--ati-muted); }
.m-ati-cargo { padding: 18px 0 0; }
.m-ati-cargo summary { cursor: pointer; font-size: 15px; font-weight: 650; line-height: 1.4; }
.m-ati-cargo summary span { display: block; margin: 5px 0 0; color: var(--ati-muted); font-size: 13px; font-weight: 400; }
.m-ati-cargo > p { color: var(--ati-muted); font-size: 13px; line-height: 1.5; }
.m-ati-cargo-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 12px; }
.m-ati-error { white-space: pre-line; padding: 12px; margin-top: 16px; background: #fff3ef; border-radius: 10px; color: #a83121; font-size: 14px; line-height: 1.5; }
.m-ati-footer { flex: 0 0 auto; padding: 12px max(18px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left)); border-top: 1px solid var(--ati-line); background: #fff; }
.m-ati-footer button { width: 100%; min-height: 50px; padding: 12px; border: 0; border-radius: 12px; background: var(--ati-green); color: #fff; font: inherit; font-size: 16px; font-weight: 700; }
.m-ati-sheet button:disabled { opacity: .45; cursor: default; }
@media (min-width: 620px) { .m-ati-panel { margin-bottom: 12px; height: calc(100% - 24px); border-radius: 18px; } }
