/* =============================================================================
   Avhad Chakki CRM - Add Order page 2026 (approved layout "C2 - slimmest")
   File: /css/add-order-2026.css     Pairs with: /js/add-order-2026.js
   Every rule is scoped under html.xa-2026 (added by the JS), so if the JS is
   not loaded this file changes nothing.
   ============================================================================= */

html.xa-2026 form.ajaxSubmitForm > .container { padding-bottom: 96px; max-width: 760px; }
html.xa-2026 form.ajaxSubmitForm .row { margin-bottom: 0; }

/* ---- search (no customer picked yet) ---- */
html.xa-2026 .xa-search { margin: 8px 0 6px; }
html.xa-2026 .xa-search .input-field { margin: 0; }
html.xa-2026 .xa-search label { display: none; }
html.xa-2026 .xa-search input#full_name {
	height: 44px; margin: 0; padding: 0 12px 0 38px; box-sizing: border-box;
	border: 2px solid #6366f1 !important; border-radius: 12px; background: #fff
	url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2.5'><circle cx='11' cy='11' r='7'/><path d='M20 20l-4-4'/></svg>") no-repeat 12px center;
	box-shadow: 0 0 0 3px rgba(99,102,241,.12) !important; font-size: 15px;
}
html.xa-2026 .xa-search #activeOrderBadge { top: 8px !important; }

/* ---- customer banner ---- */
html.xa-2026 .xa-banner {
	margin: 8px 0 6px; border-radius: 12px; padding: 8px 10px; color: #fff;
	background: linear-gradient(120deg, #0ea5e9, #6366f1);
	display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
	box-shadow: 0 4px 14px rgba(99,102,241,.25);
}
html.xa-2026 .xa-who { flex: 1; min-width: 0; }
html.xa-2026 .xa-nm { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.xa-2026 .xa-mb { font-size: 12px; opacity: .95; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html.xa-2026 .xa-change { color: #fff; text-decoration: underline; margin-left: 4px; font-weight: 700; }
html.xa-2026 .xa-back { background: #fff; color: #4338ca; border-radius: 10px; padding: 4px 9px; text-align: center; line-height: 1.05; flex-shrink: 0; min-width: 52px; }
html.xa-2026 .xa-back b { display: block; font-size: 18px; }
html.xa-2026 .xa-back small { font-size: 9px; font-weight: 700; text-transform: uppercase; }
html.xa-2026 .xa-pills { width: 100%; display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; }
html.xa-2026 .xa-pills::-webkit-scrollbar { display: none; }
html.xa-2026 .xa-pill { white-space: nowrap; font-size: 11.5px; font-weight: 700; border-radius: 20px; padding: 3px 9px; background: rgba(255,255,255,.2); color: #fff; }
html.xa-2026 .xa-pill.late { background: #fef3c7; color: #b45309; }
html.xa-2026 .xa-pill.early { background: #dbeafe; color: #1d4ed8; }
html.xa-2026 .xa-pill.ok { background: #d1fae5; color: #047857; }
html.xa-2026 .xa-pill.due { background: #fee2e2; color: #b91c1c; }
html.xa-2026 .xa-pill.last { background: #ecfdf5; color: #047857; }

/* ---- note + details drawer ---- */
html.xa-2026 .xa-card { background: #fff; border-radius: 12px; padding: 8px; margin: 0 0 6px; box-shadow: 0 1px 3px rgba(15,23,42,.08); }
html.xa-2026 .xa-noteline { display: flex; align-items: center; gap: 6px; }
html.xa-2026 .xa-noteline .input-field { flex: 1; margin: 0; }
html.xa-2026 .xa-noteline label { display: none; }
html.xa-2026 .xa-noteline input, html.xa-2026 .xa-drawer input:not([type=checkbox]):not([type=radio]) {
	height: 36px !important; margin: 0 !important; padding: 0 10px !important; box-sizing: border-box;
	border: 1.5px solid #e2e8f0 !important; border-radius: 9px; background: #fff; box-shadow: none !important; font-size: 14px;
}
html.xa-2026 .xa-more { flex-shrink: 0; height: 36px; border: 1.5px solid #c7d2fe; background: #eef2ff; color: #4338ca; border-radius: 9px; padding: 0 10px; font-weight: 700; font-size: 12.5px; cursor: pointer; }
html.xa-2026 .xa-drawer { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #e2e8f0; }
html.xa-2026 .xa-drawer .row { margin: 0 0 6px !important; }
html.xa-2026 .xa-drawer .col { padding: 0; }
html.xa-2026 .xa-drawer .input-field { margin: 14px 0 4px; }
html.xa-2026 .xa-drawer .input-field.suffix .prefix { top: 4px; }
html.xa-2026 .xa-drawer .input-field.suffix input { width: calc(100% - 3rem) !important; }
html.xa-2026 .xa-drawer .input-field label { font-size: 11px; transform: translateY(-16px) !important; color: #64748b; }
html.xa-2026 .xa-drawer .input-label { font-size: 11px; color: #64748b; font-weight: 500 !important; margin-bottom: 3px; }
html.xa-2026 .xa-drawer label > span { font-size: 12.5px; }

/* ---- atta type: segmented ---- */
html.xa-2026 .xa-grind { margin: 0 0 6px !important; }
html.xa-2026 .xa-grind .col { display: flex; align-items: center; gap: 4px; padding: 0 !important; background: #eef2ff; border-radius: 10px; padding: 3px !important; }
html.xa-2026 .xa-grind .input-label { font-size: 10.5px !important; font-weight: 700 !important; color: #4338ca; text-transform: uppercase; padding: 0 6px; margin: 0; }
html.xa-2026 .xa-grind label { flex: 1; margin: 0; }
html.xa-2026 .xa-grind label input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
html.xa-2026 .xa-grind label span { display: block !important; text-align: center; padding: 6px 0 !important; height: auto !important; line-height: 1.2 !important; border-radius: 8px; font-size: 13px !important; font-weight: 500; color: #4338ca !important; cursor: pointer; }
html.xa-2026 .xa-grind label span:before, html.xa-2026 .xa-grind label span:after { display: none !important; }
html.xa-2026 .xa-grind label input[type=radio]:checked + span { background: #4f46e5; color: #fff !important; box-shadow: 0 2px 6px rgba(79,70,229,.35); }

/* ---- grain table ---- */
html.xa-2026 .xa-table .col { padding: 0; }
html.xa-2026 .xa-table table.order-grains { background: #fff; border-radius: 12px; border-collapse: separate; border-spacing: 0 3px; padding: 4px 6px; box-shadow: 0 1px 3px rgba(15,23,42,.08); }
html.xa-2026 .xa-table table.order-grains thead th { font-size: 10.5px; text-transform: uppercase; color: #64748b; padding: 4px 3px; border: 0; }
html.xa-2026 .xa-table table.order-grains tbody tr { border: 0; }
html.xa-2026 .xa-table table.order-grains tbody td { padding: 2px 3px; border: 0; }
html.xa-2026 .xa-table table.order-grains tbody td:first-child { border-left: 6px solid var(--xa-c, #e2e8f0); border-radius: 6px 0 0 6px; padding-left: 8px; font-size: 13.5px; }
html.xa-2026 .xa-table table.order-grains tbody tr.xa-on td { background: #eef2ff; }
html.xa-2026 .xa-table table.order-grains tbody tr.xa-on td:last-child { border-radius: 0 6px 6px 0; }
html.xa-2026 .xa-table table.order-grains tbody tr.xa-on td:first-child { font-weight: 700; }
html.xa-2026 .xa-table table.order-grains td input { height: 32px !important; border: 1.5px solid #e2e8f0 !important; border-radius: 8px !important; text-align: right; padding: 0 6px !important; box-sizing: border-box; }
html.xa-2026 .xa-table table.order-grains tr.xa-on td input { border-color: #6366f1 !important; font-weight: 700; }
html.xa-2026 .xa-table table.order-grains tfoot td { font-weight: 900; font-size: 14px; border-top: 2px solid #0f172a; }

/* ---- sticky bottom bar ---- */
html.xa-2026 .xa-bar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
	display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
	background: #0f172a; color: #fff; box-shadow: 0 -4px 14px rgba(0,0,0,.2);
}
html.xa-2026 .xa-sum { flex: 0 1 auto; min-width: 0; margin-right: 4px; font-size: 11.5px; color: #cbd5e1; line-height: 1.25; }
html.xa-2026 .xa-bar .xa-close {
	flex-shrink: 0; height: 44px; border: 1.5px solid #475569; border-radius: 12px; cursor: pointer;
	background: transparent; color: #e2e8f0; font-size: 13px; font-weight: 700; padding: 0 12px; white-space: nowrap;
}
html.xa-2026 .xa-sum b { display: block; font-size: 17px; color: #fff; white-space: nowrap; }
html.xa-2026 .xa-gro { border: 0; border-radius: 12px; height: 44px; padding: 0 12px; font-weight: 700; font-size: 13px; color: #fff; background: #f59e0b; cursor: pointer; }
html.xa-2026 .xa-bar .submit-order-btn.xa-add {
	position: static !important; width: auto !important; height: 44px !important; margin: 0 !important; padding: 0 18px !important;
	border-radius: 12px !important; font-weight: 700; font-size: 14px; letter-spacing: .3px; line-height: 44px;
	background: linear-gradient(135deg, #10b981, #059669) !important; color: #fff !important; box-shadow: 0 4px 14px rgba(16,185,129,.4) !important;
	left: auto !important; right: auto !important; bottom: auto !important; transform: none !important;
}
@media only screen and (min-width: 993px) {
	html.xa-2026 .xa-bar { left: 50%; right: auto; width: 760px; transform: translateX(-50%); border-radius: 14px 14px 0 0; }
}

/* old grey header (dues / order count / icons) and the floating back arrow are
   replaced by the banner, the bottom bar and the back button at the top */
html.xa-2026 .header-inner, html.xa-2026 .back-button { display: none !important; }
html.xa-2026 body { padding-top: 0 !important; }



/* ---- popup ---- */
.xa-pop { position: fixed; inset: 0; z-index: 10000; background: rgba(15,23,42,.55); display: flex; align-items: flex-end; justify-content: center; }
.xa-pbox { background: #fff; width: 100%; max-width: 460px; max-height: 88vh; overflow: auto; border-radius: 18px 18px 0 0; padding: 16px 14px calc(14px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 30px rgba(0,0,0,.3); font-family: inherit; color: #0f172a; }
@media (min-width: 600px) { .xa-pop { align-items: center; } .xa-pbox { border-radius: 16px; } }
.xa-ptitle { font-size: 16px; font-weight: 700; margin-bottom: 10px; line-height: 1.35; }
.xa-ccard { border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 10px; background: #f8fafc; margin-bottom: 8px; }
.xa-cn { font-weight: 700; font-size: 15px; }
.xa-cm { font-size: 13px; color: #334155; margin-top: 2px; }
.xa-cs { font-size: 12px; color: #64748b; margin-top: 4px; }
.xa-red { color: #b91c1c; }
.xa-help { font-size: 12.5px; color: #475569; margin: 6px 0; line-height: 1.45; }
.xa-btns { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.xa-b { border: 0; border-radius: 12px; min-height: 44px; padding: 8px 12px; font-weight: 700; font-size: 14px; cursor: pointer; background: #eef2ff; color: #3730a3; }
.xa-b.pri { background: linear-gradient(135deg, #10b981, #059669); color: #fff; }
.xa-b.warn { background: #fee2e2; color: #b91c1c; }
.xa-b.ghost { background: #fff; color: #475569; border: 1.5px solid #e2e8f0; }
.xa-b:disabled { opacity: .55; }
.xa-nums { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 6px 0; }
.xa-nums th { font-size: 11px; color: #64748b; text-transform: uppercase; text-align: center; padding: 4px; border-bottom: 1px solid #e2e8f0; }
.xa-nums th:first-child { text-align: left; }
.xa-nums td { padding: 7px 4px; border-bottom: 1px solid #f1f5f9; text-align: center; }
.xa-nums td:first-child { text-align: left; }
.xa-nums td small { display: block; font-size: 11px; color: #64748b; }
.xa-nums input[type=radio] { position: static !important; opacity: 1 !important; pointer-events: auto !important; width: 20px; height: 20px; accent-color: #4f46e5; }

/* ---- small phones: keep the 4 footer items on one line ---- */
@media only screen and (max-width: 420px) {
	html.xa-2026 .xa-bar { gap: 6px; padding-left: 6px; padding-right: 6px; }
	html.xa-2026 .xa-sum b { font-size: 15px; }
	html.xa-2026 .xa-gro { padding: 0 9px; font-size: 12.5px; }
	html.xa-2026 .xa-bar .submit-order-btn.xa-add { padding: 0 11px !important; font-size: 13px; }
	html.xa-2026 .xa-bar .xa-close { padding: 0 9px; font-size: 12.5px; }
}

/* Duplicate-order guard (2026-10-06) */
html.xa-2026 .xa-warn { width: 100%; display: flex; flex-direction: column; gap: 3px; }
html.xa-2026 .xa-warn-line { background: #fee2e2; color: #b91c1c; font-weight: 800; font-size: 12.5px; border-radius: 8px; padding: 5px 10px; border: 1px solid #fca5a5; }

/* ---- v2026-10-21 notes chips (approved Variant 2) ---- */
html.xa-2026 .xa-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
html.xa-2026 .xa-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; height: 28px; padding: 0 10px; border-radius: 14px; border: 1px solid #fcd34d; background: #fffbeb; color: #92400e; font-size: 12.5px; font-weight: 600; cursor: pointer; }
html.xa-2026 .xa-chip .xa-ct { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.xa-2026 .xa-chip-map { border-color: #93c5fd; background: #eff6ff; color: #1d4ed8; }
html.xa-2026 .xa-chip.xa-empty { border-style: dashed; background: #fff; color: #64748b; }
html.xa-2026 .xa-chip-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
html.xa-2026 .xa-chip-edit .xa-ce-in { flex: 1 1 180px; min-width: 0; height: 36px; margin: 0; padding: 0 10px; box-sizing: border-box; border: 1.5px solid #c7d2fe; border-radius: 9px; font-size: 14px; background: #fff; }
html.xa-2026 .xa-chip-edit button { height: 36px; padding: 0 12px; border-radius: 9px; border: 1.5px solid #c7d2fe; background: #eef2ff; color: #4338ca; font-weight: 700; font-size: 12.5px; cursor: pointer; }
html.xa-2026 .xa-chip-edit .xa-ce-ok { background: #4f46e5; border-color: #4f46e5; color: #fff; }
html.xa-2026 .xa-chip-edit .xa-ce-del { border-color: #fca5a5; background: #fef2f2; color: #b91c1c; }
html.xa-2026 .xa-ce-err { flex-basis: 100%; color: #b91c1c; font-size: 12px; font-weight: 600; }
html.xa-2026 .xa-webnote-lb { font-size: 11.5px; font-weight: 700; color: #b91c1c; margin: 0 0 4px; }
html.xa-2026 .xa-noteline input.xa-webnote { background: #fef2f2 !important; border-color: #fca5a5 !important; }
