:root{font-family:system-ui,-apple-system,"Segoe UI",Tahoma,Arial,sans-serif;color:#2d2924;background:#f7f5f2;font-size:14px}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #ba9267;outline-offset:2px}.topline{background:#f5e6d1;color:#654624;text-align:center;padding:10px 14px;font-size:12px;font-weight:700}.shell{max-width:1220px;margin:auto;padding:0 22px}.header{height:88px;display:flex;justify-content:space-between;align-items:center}.identity{display:flex;align-items:center;gap:12px}.identity strong{display:block;font-size:19px}.identity small{color:#82766c;font-size:12px}.symbol{background:#60472d;color:#fff;width:44px;height:44px;border-radius:14px;display:grid;place-items:center;font-size:24px}.righthead{display:flex;align-items:center;gap:8px;color:#71675f;font-size:12px}.state-dot{width:8px;height:8px;background:#c88c48;border-radius:50%}.hero{border-radius:22px;background:#3c332a;color:#fff;padding:34px 40px;display:flex;justify-content:space-between;align-items:center;gap:20px;box-shadow:0 16px 32px rgba(50,37,25,.08)}.eyebrow{color:#e7c8a4;letter-spacing:.4px;margin:0 0 12px;font-size:12px}.hero h1{margin:0;font-size:28px;line-height:1.5}.subtitle{margin:12px 0 0;color:#d4c8ba;max-width:760px;line-height:1.85}.heroMark{border:1px solid #776450;padding:18px;border-radius:19px;color:#e3cbab;font-size:19px;white-space:nowrap}.heroMark span{color:#fff;font-size:26px;margin-right:5px}.tabs{display:flex;gap:6px;margin:22px 0}.tab{padding:11px 19px;background:transparent;border:0;border-radius:11px;color:#706359;font-weight:700}.tab.active{background:#fff;box-shadow:0 2px 10px #3827190d;color:#553c23}.metricGrid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:0 0 16px}.metric{background:#fff;border-radius:16px;padding:23px;border:1px solid #efe9e2;display:flex;flex-direction:column;gap:8px}.metric span,.metric small{color:#85786d;font-size:12px}.metric strong{font-size:32px}.workspace{background:#fff;border:1px solid #efe9e2;border-radius:18px;padding:24px;margin-bottom:22px}.bar{display:flex;justify-content:space-between;gap:16px;align-items:center}.bar h2,.workspace h2{font-size:18px;margin:0 0 8px}.bar p,.formIntro{margin:0;color:#807469;line-height:1.8}.filters{display:flex;gap:10px;align-items:center}.filters label{white-space:nowrap;color:#6d6259}select,input{border:1px solid #ded8d0;border-radius:10px;background:#fff;min-height:42px;padding:9px 12px;color:#38322e}select{min-width:156px}.searchBox{display:flex;align-items:center;gap:12px;margin:22px 0 14px}.searchBox input{width:min(100%,370px)}.searchBox label{color:#796d64}.tablewrap{overflow-x:auto;border:1px solid #eee9e2;border-radius:12px}table{width:100%;border-collapse:collapse;min-width:1080px;text-align:right}thead{background:#f8f5f0}th{font-weight:700;font-size:12px;color:#65584c}td,th{padding:14px 12px;border-bottom:1px solid #f0ece7;vertical-align:middle}td{font-size:12px;line-height:1.8}tbody tr:last-child td{border-bottom:0}.id{font-weight:800;white-space:nowrap;color:#5e4934}.desc{min-width:200px;max-width:330px}.muted{color:#99918b}.pill{display:inline-flex;padding:4px 9px;border-radius:7px;font-size:12px;white-space:nowrap;font-weight:700}.paid{background:#70452f;color:#fff}.shipping{background:#b47a50;color:#fff}.note{background:#e6c9ad;color:#4a2b20;max-width:160px;white-space:normal}.done{background:#dcfce7;color:#166534}.pending{background:#efebe6;color:#6e6257}.statusButton{border:1px solid #dad3ca;background:#fff;border-radius:8px;padding:6px 10px}.statusButton:hover{border-color:#a98b69}.notice{color:#6f655d;background:#fbf7ee;padding:12px 15px;border-radius:10px;font-size:12px;margin:16px 0 0;line-height:1.8}.formGrid{display:grid;grid-template-columns:repeat(2,1fr);gap:17px;margin-top:22px}.formGrid label{display:flex;flex-direction:column;gap:7px;color:#52483f;font-weight:600}.formGrid label.wide{grid-column:span 2}.formGrid input,.formGrid select{width:100%}.formActions{display:flex;align-items:center;gap:15px;margin-top:24px}.primary{background:#60472d;color:#fff;border:0;border-radius:11px;padding:13px 19px;font-weight:700}.primary:hover{background:#4f3724}#formMsg{font-size:12px;color:#3c7046}.steps{margin-top:22px;display:grid;gap:10px}.steps>div{display:flex;align-items:flex-start;gap:16px;border:1px solid #ece6df;border-radius:12px;padding:15px}.steps b{background:#f6e8d5;color:#63472d;padding:9px 11px;border-radius:10px}.steps p{color:#817568;margin:7px 0 0;line-height:1.8}footer{text-align:center;color:#92887f;padding:6px 0 30px;font-size:12px}@media(max-width:730px){.shell{padding:0 12px}.header{height:70px}.hero{padding:25px 20px}.hero h1{font-size:21px}.heroMark{display:none}.metricGrid{gap:8px}.metric{padding:13px}.metric strong{font-size:23px}.metric small{font-size:10px}.workspace{padding:15px}.bar{display:block}.filters{margin-top:14px}.searchBox{display:block}.searchBox label{display:block;margin-bottom:7px}.searchBox input{width:100%}.formGrid{grid-template-columns:1fr}.formGrid label.wide{grid-column:1}.tabs{flex-wrap:wrap}.tab{padding:10px 12px}.righthead{font-size:11px}}

/* Mobile-first readable table: identifiers never wrap; descriptions may wrap. */
.scrollHint{font-size:12px;color:#746252;margin:14px 0 7px}.tablewrap{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}table{width:max-content;min-width:100%;table-layout:auto}th{white-space:nowrap}td.nowrap{white-space:nowrap;min-width:max-content}td.longtext{white-space:normal;overflow-wrap:anywhere;min-width:210px;max-width:320px;line-height:1.75}td.address{min-width:240px;max-width:330px}td.desc{min-width:280px;max-width:390px}td.phone,td.date{direction:ltr;text-align:right;unicode-bidi:isolate}td .pill{white-space:nowrap}td .pill.note{white-space:normal;max-width:230px}td .statusButton{white-space:nowrap}@media(max-width:730px){.workspace{padding:12px}.tablewrap{margin-inline:-5px}.scrollHint{display:block}.hero{padding:18px 15px}.subtitle{font-size:12px}}

.settingsGrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px;margin:18px 0}.settingsGrid label,.fieldForm label{display:flex;flex-direction:column;gap:8px;font-weight:600}.settingsGrid input,.settingsGrid select,.fieldForm input,.fieldForm select{width:100%;padding:12px;border:1px solid #d7d5d0;border-radius:10px;background:white;color:#242424}.settingsActions{margin:14px 0 24px}.fieldSettings{display:grid;gap:8px;margin:14px 0}.fieldRow{display:flex;justify-content:space-between;align-items:center;gap:12px;border:1px solid #e7e4dd;border-radius:12px;padding:12px}.fieldToggle{display:flex;align-items:center;gap:8px;white-space:nowrap}.fieldForm{display:grid;grid-template-columns:2fr 1fr auto;gap:12px;align-items:end;margin:16px 0 28px}.smallBtn{padding:8px 12px;border-radius:9px;border:1px solid #ddd;background:white;cursor:pointer}.settingsMsg{color:#6c4b35}.tablewrap th[hidden],.tablewrap td[hidden]{display:none!important}@media(max-width:680px){.fieldForm{grid-template-columns:1fr}.settingsGrid{grid-template-columns:1fr}}


/* v4: professional, centered, readable data table in RTL and on mobile. */
.tablewrap{
  position:relative;
  max-width:100%;
  max-height:min(72vh,760px);
  overflow:auto;
  border:1px solid #d8cec2;
  border-radius:13px;
  background:#fff;
  box-shadow:0 3px 18px rgba(73,50,26,.06);
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
}
.ordersTable{
  width:max-content;
  min-width:100%;
  border-collapse:separate;
  border-spacing:0;
  table-layout:auto;
  font-variant-numeric:tabular-nums;
}
.ordersTable th,
.ordersTable td{
  text-align:center;
  vertical-align:middle;
  padding:13px 13px;
  border-block-end:1px solid #e8e1d9;
  border-inline-end:1px solid #e8e1d9;
  background-clip:padding-box;
}
.ordersTable tr > :last-child{border-inline-end:0}
.ordersTable thead th{
  position:sticky;
  top:0;
  z-index:2;
  background:#ede3d6;
  color:#493929;
  font-weight:800;
  font-size:12.5px;
  line-height:1.45;
  white-space:nowrap;
  border-block-end:2px solid #c8ae90;
  box-shadow:0 2px 0 rgba(74,50,28,.04);
}
.ordersTable tbody td{
  font-size:12.5px;
  line-height:1.7;
  color:#332c25;
}
.ordersTable tbody tr:nth-child(even) td{background:#fcfaf7}
.ordersTable tbody tr:hover td{background:#f6eee4}
.ordersTable tbody tr:last-child td{border-block-end:0}
.ordersTable tbody td.nowrap{
  white-space:nowrap;
  overflow-wrap:normal;
  word-break:normal;
}
.ordersTable .id{color:#63482e;font-weight:800}
.ordersTable td.phone,.ordersTable td.date{
  direction:ltr;
  unicode-bidi:isolate;
  text-align:center;
  white-space:nowrap;
}
.ordersTable td.longtext{
  white-space:normal;
  text-align:center;
  vertical-align:middle;
  overflow-wrap:break-word;
  word-break:normal;
}
.ordersTable .balancedText{
  display:block;
  margin-inline:auto;
  text-align:center;
  white-space:pre-line;
  overflow-wrap:break-word;
  word-break:normal;
  text-wrap:balance;
  line-height:1.75;
  max-width:100%;
}
.ordersTable td.address{width:330px;min-width:300px;max-width:350px}
.ordersTable td.desc{width:400px;min-width:365px;max-width:430px}
.ordersTable td.longtext:not(.address):not(.desc){width:235px;min-width:205px;max-width:245px}
.ordersTable th:nth-child(1),.ordersTable td:nth-child(1){min-width:120px}
.ordersTable th:nth-child(2),.ordersTable td:nth-child(2){min-width:156px}
.ordersTable th:nth-child(3),.ordersTable td:nth-child(3){min-width:150px}
.ordersTable th:nth-child(6),.ordersTable td:nth-child(6){min-width:135px}
.ordersTable th:nth-child(7),.ordersTable td:nth-child(7){min-width:128px}
.ordersTable th:nth-child(8),.ordersTable td:nth-child(8){min-width:128px}
.ordersTable th:nth-child(9),.ordersTable td:nth-child(9){min-width:147px}
.ordersTable th:nth-child(10),.ordersTable td:nth-child(10){min-width:167px}
.ordersTable th:nth-child(12),.ordersTable td:nth-child(12){min-width:165px}
.ordersTable .pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  vertical-align:middle;
  line-height:1.55;
}
.ordersTable .pill.note{
  width:100%;
  max-width:235px;
  padding:7px 10px;
  white-space:normal;
  text-wrap:balance;
}
.ordersTable .statusActions{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  white-space:nowrap;
}
.ordersTable td.statusCell{text-align:center}
.ordersTable .statusButton{min-height:32px;padding:5px 10px}
.ordersTable th[hidden],.ordersTable td[hidden]{display:none!important}
@media(max-width:730px){
  .tablewrap{max-height:70vh;margin-inline:0;border-radius:11px}
  .ordersTable th,.ordersTable td{padding:11px 12px}
  .ordersTable td.address{width:300px;min-width:295px;max-width:330px}
  .ordersTable td.desc{width:355px;min-width:345px;max-width:390px}
  .ordersTable td.longtext:not(.address):not(.desc){width:225px;min-width:200px;max-width:240px}
  .scrollHint{text-align:center}
}
@media(prefers-reduced-motion:reduce){.tablewrap{scroll-behavior:auto}}
/* v5 secure login and adaptive settings */
[hidden]{display:none!important}
.authPage{min-height:100vh;display:grid;place-items:center;padding:22px;background:#f6f2ed}
.authCard{width:min(100%,460px);background:#fff;padding:30px;border-radius:18px;border:1px solid #ebe1d8;box-shadow:0 16px 40px #342c2012}
.authCard h1{font-size:24px;margin:18px 0 0}.authCard p{color:#75695d}.authCard form{display:grid;gap:15px;margin-top:22px}
.authCard label{display:grid;gap:7px;font-weight:600}.authCard input{width:100%}.authCard button{margin-top:7px}
#authMsg,#globalNotice,#usersMsg{font-size:13px;line-height:1.8;color:#7c4432}
#customInputs{margin-top:16px}
#customInputs textarea{min-height:85px;width:100%;resize:vertical;padding:10px;border:1px solid #ded8d0;border-radius:10px}
