.orders-layout{display:grid;grid-template-columns:minmax(320px,.9fr) minmax(360px,1.1fr);gap:16px;align-items:start}.orders-form-card h2,.orders-result-card h2{font-size:18px;margin:6px 0 18px}.orders-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.orders-wide{grid-column:1/-1}.orders-fields .field{min-width:0}.orders-fields input,.orders-fields select,.orders-fields textarea{display:block;width:100%;margin-top:7px;border:1px solid #ffffff1b;border-radius:11px;background:#120d10;color:var(--ink);padding:11px 12px;min-height:42px}.orders-fields textarea{resize:vertical;min-height:88px;line-height:1.6}.orders-fields input::placeholder,.orders-fields textarea::placeholder{color:#8f7d82}.orders-fields [hidden]{display:none!important}.orders-form-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:16px}.orders-preview{min-height:220px;white-space:pre-wrap;overflow-wrap:anywhere;border:1px solid #ffffff13;background:#100b0d;border-radius:13px;padding:18px;color:#f4edee;font:13px/1.8 ui-monospace,Consolas,monospace}.orders-result-card .card-head{align-items:center}.orders-result-card .card-head h2{margin-bottom:0}.orders-apply-wrap{padding:13px;border:1px solid #d5a0a735;background:#d5a0a70b;border-radius:12px}.orders-apply-wrap p{margin:0 0 10px}.orders-template-list{margin-top:22px;padding-top:17px;border-top:1px solid #ffffff12}.orders-template-list>div:last-child{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}.orders-template-list span{font-size:9px;color:#cbbcc0;background:#ffffff08;border:1px solid #ffffff12;border-radius:20px;padding:6px 9px}@media(max-width:900px){.orders-layout{grid-template-columns:1fr}}@media(max-width:560px){.orders-fields{grid-template-columns:1fr}.orders-wide{grid-column:auto}.orders-form-actions>.button{flex:1}.orders-preview{font-size:11px;padding:13px}}
.order-person-field>label{display:block;color:var(--muted);font-size:10px}.order-person-picker{position:relative}.order-person-picker>input[type="search"]{padding-right:38px}.order-person-clear{position:absolute;right:7px;top:14px;width:28px;height:28px;border:0;border-radius:8px;background:transparent;color:#cbbcc0;font-size:20px;line-height:1}.order-person-clear:hover{background:#ffffff12;color:var(--ink)}.order-person-options{position:absolute;z-index:30;top:calc(100% + 5px);left:0;right:0;max-height:270px;overflow-y:auto;padding:5px;border:1px solid #d5a0a744;border-radius:12px;background:#1a1216;box-shadow:0 16px 38px #0009}.order-person-option{width:100%;display:flex;justify-content:space-between;align-items:center;gap:12px;border:0;border-radius:8px;background:transparent;text-align:left;padding:10px;color:var(--ink)}.order-person-option:hover,.order-person-option:focus-visible{background:#d5a0a71a;outline:none}.order-person-option span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}.order-person-option small{flex:none;color:var(--muted);font-size:9px}.order-person-empty{padding:12px;color:var(--muted);font-size:10px}

.orders-fields input[type=hidden]{display:none!important}

/* Compact, predictable employee picker that stays aligned with its field. */
.order-person-options{box-sizing:border-box;max-height:min(220px,38vh);overscroll-behavior:contain;scrollbar-gutter:stable}
.order-person-option{box-sizing:border-box;display:grid;grid-template-columns:minmax(0,1fr);gap:3px;min-height:44px;padding:8px 10px}
.order-person-option span,.order-person-option small{display:block;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.order-person-option span{font-size:12px}
.order-person-option small{font-size:10px}
@media(max-width:640px){.order-person-options{max-height:min(190px,34vh)}}
.order-template-manager{margin-top:16px}.order-template-manager>summary{display:flex;justify-content:space-between;align-items:center;gap:12px;cursor:pointer;list-style:none}.order-template-manager>summary::-webkit-details-marker{display:none}.order-template-manager>summary span{display:grid;gap:4px}.order-template-manager>summary b{font-size:14px}.order-template-manager>summary small,.order-template-admin-item small{color:var(--muted);font-size:10px}.order-template-manager>summary i{font-style:normal;color:var(--accent);font-size:18px;transition:transform .18s}.order-template-manager[open]>summary i{transform:rotate(180deg)}.order-template-manager-body{display:grid;grid-template-columns:minmax(240px,.85fr) minmax(320px,1.15fr);gap:20px;margin-top:18px;padding-top:17px;border-top:1px solid #ffffff12}.order-template-admin-list{display:grid;align-content:start;gap:8px}.order-template-admin-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px;border:1px solid #ffffff15;border-radius:11px;background:#100b0d}.order-template-admin-item>div:first-child{display:grid;gap:4px;min-width:0}.order-template-admin-item b{font-size:11px;overflow-wrap:anywhere}.order-template-admin-item>div:last-child{display:flex;gap:6px;flex:none}.order-template-admin-item .button{min-height:32px;padding:6px 9px;font-size:10px}.order-template-delete{color:#ef8992!important}.order-template-editor{min-width:0}.order-template-editor .subtle-copy{margin:12px 0}.order-template-editor code{color:var(--accent)}.order-template-status{display:block;min-height:18px;margin-top:9px;color:var(--muted);font-size:10px}.order-template-editor input[readonly]{opacity:.65;cursor:not-allowed}@media(max-width:700px){.order-template-manager-body{grid-template-columns:1fr}.order-template-admin-item{align-items:flex-start}.order-template-admin-item>div:last-child{flex-wrap:wrap}}
