/* iPOS order form kit - one fixed layout for the made-to-order apps (Furniture, PrintShop, Tailor, AutoShop, Optix).
   Zones: 1 header row (customer, mobile, date, rate list) · 2 lines table · 3 more details (folded) · 4 money panel · 5 buttons. */
.of { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 14px; align-items: stretch; }
.of-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 0; overflow: auto; }
.of-card { background: var(--card, #fff); border: 1px solid var(--line, #e2e7ef); border-radius: 12px; }
.of-head { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .75fr) minmax(0, 1.95fr) minmax(0, .7fr); gap: 12px; align-items: start; padding: 10px 14px; flex: none; }
.of-head label.f, .of-head .f { margin: 0; }
.of-head input, .of-head select { height: 38px; min-height: 38px; }
.of-lbl { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.of-due { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.of-due input { width: 148px; flex: none; }
.of-due button { height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line, #e2e7ef); background: #fff; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; color: inherit; }
.of-due button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.of-sub { font-size: 12px; margin-top: 4px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; min-height: 18px; }
.of-sub a { cursor: pointer; font-weight: 600; }
.of-bal { font-weight: 700; font-size: 12px; padding: 2px 8px; border-radius: 6px; background: #fdebe6; color: #a3270f; }
.of-bal.cr { background: #e7f6ec; color: #166534; }
.of-items { flex: 1; min-height: 240px; display: flex; flex-direction: column; overflow: hidden; }
.of-items-h { display: flex; align-items: center; gap: 10px; padding: 9px 14px 6px; }
.of-items-h h2 { margin: 0; font-size: 17px; }
.of-items-h input { flex: 1; max-width: 420px; }
.of-often { display: flex; gap: 6px; align-items: center; padding: 0 14px 8px; overflow-x: auto; white-space: nowrap; scrollbar-width: thin; }
.of-often > span { font-size: 12px; color: var(--muted); font-weight: 600; }
.of-often button { height: 30px; padding: 0 11px; border-radius: 15px; border: 1px dashed color-mix(in srgb, var(--brand) 45%, #fff); background: color-mix(in srgb, var(--brand) 6%, #fff); color: var(--brand); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.of-often button:hover { background: color-mix(in srgb, var(--brand) 14%, #fff); }
.of-lines { flex: 1; min-height: 0; overflow: auto; border-top: 1px solid var(--line, #e2e7ef); }
.of-lines table { width: 100%; }
.of-lines thead th { position: sticky; top: 0; z-index: 1; background: #faf8f5; }
.of-more-bar { flex: none; display: flex; align-items: center; gap: 10px; padding: 7px 14px; border-top: 1px solid var(--line, #e2e7ef); background: #faf8f5; }
.of-more-bar .btn { padding: 5px 12px; min-height: 32px; font-size: 13px; }
.of-more-sum { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.of-more { flex: none; padding: 10px 14px; }
.of-more .grid { gap: 10px 14px; }
.of-side { background: var(--brand-soft, #eef4f8); border: 1px solid color-mix(in srgb, var(--brand) 18%, #fff); border-radius: 12px; padding: 10px 14px 0; display: flex; flex-direction: column; gap: 6px; min-height: 0; overflow: auto; }
.of-row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.of-row > span:first-child { flex: 1; color: var(--muted); }
.of-row input, .of-row select { width: 112px; height: 32px; min-height: 32px; padding-top: 0; padding-bottom: 0; text-align: right; }
.of-row select { text-align: left; }
.of-dm { display: inline-flex; border: 1px solid var(--line, #e2e7ef); border-radius: 8px; overflow: hidden; }
.of-dm button { height: 32px; padding: 0 9px; border: 0; background: #fff; font-weight: 700; font-size: 12.5px; cursor: pointer; color: var(--muted); }
.of-dm button.on { background: var(--brand); color: #fff; }
.of-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid color-mix(in srgb, var(--brand) 25%, #fff); padding-top: 7px; }
.of-total b { font-size: 20px; color: var(--brand-2, var(--brand)); }
.of-total b:first-child { font-size: 18px; }
.of-adv { background: #fff; border: 1px solid var(--line, #e2e7ef); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.of-adv .of-row > span:first-child { color: var(--ink, #1f2937); font-weight: 600; }
.of-pct { display: flex; gap: 6px; }
.of-pct button { flex: 1; height: 30px; border-radius: 8px; border: 1px solid var(--line, #e2e7ef); background: #fff; font-weight: 700; font-size: 12.5px; cursor: pointer; color: inherit; }
.of-pct button:hover { border-color: var(--brand); color: var(--brand); }
.of-pct select { flex: 1.4; height: 30px; min-height: 30px; padding: 0 6px; font-size: 13px; }
.of-hint { font-size: 12px; color: var(--muted); }
.of-hint.warn { color: #b45309; font-weight: 600; } .of-hint.ok { color: #15803d; }
.of-owner { border: 1px dashed color-mix(in srgb, var(--brand) 35%, #fff); border-radius: 10px; padding: 6px 10px; font-size: 13px; display: flex; flex-direction: column; gap: 3px; }
.of-owner > small { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.of-owner .of-row input { height: 30px; min-height: 30px; }
.of-acts { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding: 8px 0 10px; position: sticky; bottom: 0; background: var(--brand-soft, #eef4f8); box-shadow: 0 -6px 10px -8px rgba(0,0,0,.25); }
.of-acts > .btn { width: 100%; }
.of-acts .btn.primary { min-height: 40px; font-size: 15px; }
.of-acts .of-two { display: flex; gap: 6px; }
.of-acts .of-two .btn { flex: 1; min-height: 32px; padding: 5px 6px; font-size: 12.5px; }
.of-acts .of-cancel { align-self: center; font-size: 13px; color: var(--muted); background: none; border: 0; cursor: pointer; padding: 2px 8px; }
@media (max-width: 1100px) { .of-head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
@media (max-width: 1000px) {
  .of { grid-template-columns: 1fr; height: auto !important; }
  .of-main, .of-side { overflow: visible; }
  .of-items { min-height: 0; }
  .of-lines { overflow-x: auto; }
  .of-due { flex-wrap: wrap; }
}
body.of-mode .app, body.of-mode .main { min-height: 0 !important; }
.of-lact { white-space: nowrap; } .of-lact .btn { min-width: 30px; padding: 4px 7px; } .of-lact .btn + .btn { margin-left: 4px; }
.of-acts .btn:not(.primary) { min-height: 34px; padding-top: 5px; padding-bottom: 5px; }
.of-adv { padding: 7px 10px; gap: 5px; }
body.of-mode .content { padding-bottom: 10px !important; }
.of-lines td.w-l { min-width: 200px; } .of-lines td.w-l select[data-f=svc] { min-width: 190px; width: 100%; }
.of-lines input[data-f=size] { min-width: 0 !important; width: 120px; }
.of-lines input[data-f=wood], .of-lines input[data-f=finish] { min-width: 0 !important; width: 100%; }
.of-lines .lines { min-width: 0; }
.of-lines .lines td, .of-lines .lines th { padding-left: 4px; padding-right: 4px; }
.of-lines td.w-l { min-width: 180px; } .of-lines td.w-l select[data-f=svc] { min-width: 175px; }
.of-lines .lines .w-s { width: 56px; }
.of-lines input[data-f=w], .of-lines input[data-f=h] { width: 44px; }
.of-lines select[data-f=su] { min-width: 0 !important; width: 66px; padding-right: 18px !important; }
.of-lines input[data-f=size] { width: 110px; }
.of-lines input[data-f=rate] { width: 80px !important; }
.of-lines input[data-f=wood], .of-lines input[data-f=finish] { width: 100%; min-width: 90px !important; }
/* Tailor Master: measurements and items side by side in the lines zone */
.of-two-pane { flex: 1; min-height: 0; display: flex; border-top: 1px solid var(--line, #e2e7ef); }
.of-two-pane > div { min-width: 0; overflow: auto; padding: 10px 14px; }
.of-two-pane > .of-meas { flex: 1.05; border-right: 1px solid var(--line, #e2e7ef); }
.of-two-pane > .of-itm { flex: 1; }
.of-pane-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; gap: 6px; }
.of-more > .card { box-shadow: none; border: 1px solid var(--line, #e2e7ef); margin: 8px 0 0; }
@media (max-width: 1000px) { .of-two-pane { flex-direction: column; } .of-two-pane > .of-meas { border-right: 0; border-bottom: 1px solid var(--line, #e2e7ef); } }
