/* Fields and buttons, one size and one manner across the admin (Malou, 2026-10-21: "make it look a bit more slick,
   proper buttons, fields are the same heigth as buttons etc"). Laid over the admin's styles and si-admin.css.
   Two layers: the look (plain selectors, which a page may still adjust) and the height (raised specificity, so every
   page's own padding gives way and a field sits level with the button beside it). */
:root{--ctl-h:36px;--ctl-line:#d9d6cf;--ctl-r:2px}

/* ---- the look ---- */
main input[type=text],main input[type=email],main input[type=search],main input[type=tel],main input[type=url],main input[type=number],
main input[type=password],main input[type=date],main input[type=time],main input[type=datetime-local],main select,main textarea{
  font-family:var(--body,inherit);font-size:13px;color:var(--ink,#121212);background:#fff;border:1px solid var(--ctl-line)!important;
  border-radius:var(--ctl-r);transition:border-color .15s,box-shadow .15s;-webkit-appearance:none;appearance:none}
main textarea{padding:9px 11px;line-height:1.45}
main input::placeholder,main textarea::placeholder{color:#aaa69e}
main input:hover,main select:hover,main textarea:hover{border-color:#bdb9b0!important}
main input:focus,main select:focus,main textarea:focus{outline:none;border-color:var(--ink,#121212)!important;box-shadow:0 0 0 3px rgba(18,18,18,.07)}
main select{padding-right:32px!important;cursor:pointer;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23121212' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat right 12px center}
main input[type=checkbox],main input[type=radio]{accent-color:var(--ink,#121212)}

main button,main .btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding-left:16px;padding-right:16px;
  font-family:var(--body,inherit);font-weight:500;font-size:10.5px;letter-spacing:.14em;text-transform:uppercase;white-space:nowrap;
  background:var(--ink,#121212);color:#fff;border:1px solid var(--ink,#121212);border-radius:var(--ctl-r);cursor:pointer;text-decoration:none;
  transition:background-color .15s,border-color .15s,color .15s,box-shadow .15s}
main button:hover,main .btn:hover{background:#333;border-color:#333;color:#fff}
main button:active,main .btn:active{transform:translateY(1px)}
main button:focus-visible,main .btn:focus-visible{outline:none;box-shadow:0 0 0 3px rgba(18,18,18,.15)}
main button:disabled{opacity:.45;cursor:default;transform:none}
main button.quiet,main .btn.quiet{background:#fff;color:var(--ink,#121212);border-color:var(--ctl-line)}
main button.quiet:hover,main .btn.quiet:hover{background:#f6f5f2;border-color:var(--ink,#121212);color:var(--ink,#121212)}
main button.danger{background:#fff;color:var(--red,#b85450);border-color:var(--red,#b85450)}
main button.danger:hover{background:var(--red,#b85450);color:#fff}

/* rows of controls line up on their middles */
main form.search,main form.wa div,main form.ident,main .gctl form,main form.inline{align-items:center}
main form.search{gap:8px}

/* ---- the height ---- */
body:not(#_) main input[type=text],body:not(#_) main input[type=email],body:not(#_) main input[type=search],body:not(#_) main input[type=tel],
body:not(#_) main input[type=url],body:not(#_) main input[type=number],body:not(#_) main input[type=password],body:not(#_) main input[type=date],
body:not(#_) main input[type=time],body:not(#_) main input[type=datetime-local],body:not(#_) main select{
  height:var(--ctl-h);min-height:var(--ctl-h);padding-top:0;padding-bottom:0;line-height:normal;box-sizing:border-box}
body:not(#_) main button:not(.gx):not(.pw-eye):not([class*="lb-"]):not([class*="ig2-"]):not([class*="gb-"]),
body:not(#_) main .btn{height:var(--ctl-h);min-height:var(--ctl-h);padding-top:0;padding-bottom:0;line-height:1;box-sizing:border-box}
body:not(#_) main .btn{display:inline-flex;align-items:center;justify-content:center}   /* a link that looks like a button: its words in the middle too */
/* the small ones keep their size: the × in a group pill, the password eye, the reactions under a WhatsApp message */
body:not(#_) main .wa-react button{height:auto;min-height:0;padding:0 5px;line-height:1.5;background:transparent;border-color:transparent;color:inherit;font-size:13px;letter-spacing:0;text-transform:none}
body:not(#_) main button.gx{height:auto;min-height:0;padding:0 4px;background:none;border:0;color:inherit;font-size:15px;letter-spacing:0}
body:not(#_) main button.gx:hover{background:none;color:var(--red,#b85450)}

/* ---- a phone: nothing wider than the screen ---- */
@media(max-width:760px){
  body:not(#_) main form.wa input,body:not(#_) main form.wa select{min-width:0}
  /* a client's page: the columns may shrink to the screen; long links break; its tables slide sideways */
  main .cols>*{min-width:0} main code{overflow-wrap:anywhere} main .cols table{display:block;overflow-x:auto}
  body:not(#_) main form.ident input[type=text]{min-width:0}
  main .bk-section-head{flex-wrap:wrap} main .bk-section-head span{min-width:0}
}

/* ---- the Clients list's head (Malou, 2026-10-21): the group's name as the title, Add a client and Export as buttons,
   the legend in the rows' own colours, the filters frozen under the menu ---- */
.cl-head{align-items:flex-end;margin-bottom:14px}
.cl-actions{display:flex;gap:8px;flex-wrap:wrap}
.cl-count{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:0 0 14px;font-size:12.5px;color:var(--faint,#6f6c66)}
.cl-count>span:first-child{margin-right:6px}
.lg{display:inline-flex;align-items:center;height:26px;padding:0 11px;font-size:11.5px;letter-spacing:.01em;color:var(--ink,#121212);border-radius:var(--ctl-r)}
.lg-review{background:#FAF2D3;box-shadow:inset 0 0 0 1px #EBDDA6}
.lg-byhand{background:#E3EEF8;box-shadow:inset 4px 0 0 #3E7CB1,inset 0 0 0 1px #C5D8EA;padding-left:15px;color:#24547E}
.cl-filters{background:#fff;padding:10px 0 4px}
@media(min-width:761px){
  .cl-filters{position:sticky;top:var(--bk-menu-h,52px);z-index:30;margin:0 -40px;padding:10px 40px 10px}
  .cl-filters.bk-stuck{box-shadow:0 12px 18px -18px rgba(18,18,18,.5)}
  .cl-filters form.search{margin:0}
}

/* ---- the Clients filters in one row (Malou, 2026-10-21: "can we make the filters fit on one row, and two for phone?"):
   the search box a little wider, the dropdowns sharing the rest, the button at the end; on a phone the search and its
   button on the first row, the dropdowns on a second row that slides sideways ---- */
body:not(#_) main form.search{display:flex;flex-wrap:nowrap;align-items:center;gap:8px}
body:not(#_) main form.search>input[name=q]{flex:1.7 1 0;min-width:0;width:auto}
body:not(#_) main form.search>.cl-sel{flex:7 1 0;min-width:0;display:flex;gap:8px}
body:not(#_) main form.search>.cl-sel>select{flex:1 1 0;min-width:0;width:auto;text-overflow:ellipsis}
body:not(#_) main form.search>.cl-sel>select[name=group]{flex-grow:1.6}   /* a group's name is the longest choice */
body:not(#_) main form.search>button{flex:none}
@media(min-width:761px) and (max-width:1099px){   /* a narrow window: two rows rather than unreadable dropdowns */
  body:not(#_) main form.search{flex-wrap:wrap}
  body:not(#_) main form.search>input[name=q]{flex:1 1 0}
  body:not(#_) main form.search>.cl-sel{order:3;flex:1 1 100%}
}
@media(max-width:760px){
  body:not(#_) main form.search{flex-wrap:wrap}
  body:not(#_) main form.search>input[name=q]{flex:1 1 0}
  body:not(#_) main form.search>.cl-sel{order:3;flex:1 1 100%;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;
    -webkit-mask-image:linear-gradient(90deg,#000 85%,transparent);mask-image:linear-gradient(90deg,#000 85%,transparent);padding-right:24px}
  body:not(#_) main form.search>.cl-sel::-webkit-scrollbar{display:none}
  body:not(#_) main form.search>.cl-sel>select{flex:0 0 auto;width:136px}
}

/* the column heads that sort (Lifetime, Last order): quiet links, ink when they lead */
main th a.th-sort{color:inherit;text-decoration:none;font-weight:inherit} main th a.th-sort:hover{color:var(--ink,#121212)} main th a.th-sort.on{color:var(--ink,#121212)}

/* the Phone column only as wide as a number (Malou, 2026-10-21: "make the phone column slightly less wide"): its
   "assumed" / "review" mark goes under the number instead of beside it */
main th.ph,main td.ph{width:1%} body:not(#_) main td.ph{white-space:normal} main td.ph .nw{white-space:nowrap}
main td.ph .pill{display:table;margin:3px 0 0}

/* Last bought: the last order's pieces, two shown and "+n" for the rest, the whole list on hover */
main td.lastb{max-width:240px} main td.lastb .lastb-items{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
main td.lastb .more{color:var(--faint,#6f6c66);font-size:11.5px}

/* amounts, dates and the column heads on one line; a long list slides sideways in its frame instead */
main .wide th,main .wide td.num,main .wide td.nw{white-space:nowrap}
main .wide td.em{max-width:190px;overflow:hidden;text-overflow:ellipsis}   /* a long address shortens; the whole one on hover */

/* Shopify: the latest website order's number, a link to it in Shopify admin; "+n" for the others, all of them on hover */
main td a.shop-no{font-family:var(--mono,monospace);font-size:12px;color:var(--ink,#121212);text-decoration:none;border-bottom:1px solid var(--ctl-line,#d9d6cf)}
main td a.shop-no:hover{border-bottom-color:var(--ink,#121212)}

/* a client's orders: the SAP invoice of a website order, shown, counted once on the website order */
main tr.twin td{color:var(--faint,#6f6c66)}
