/* ================= ACCOUNT DIALOG =================
   The front door (sign in / create account / guest), the forms, and the signed-in profile. Token-driven, so it
   follows dark and white & gold mode; the gold accent in white mode comes from --btn-bg. */
.account-modal.acct-modal{ max-width:460px; max-height:92vh; border-radius:18px; }
.acct{ padding:30px 28px 26px; animation:acctView .32s cubic-bezier(.16,1,.3,1) both; }
@keyframes acctView{ from{ opacity:0; transform:translateX(14px); } to{ opacity:1; transform:none; } }
.acct h3{ margin:0 0 4px; font-size:23px; font-weight:800; letter-spacing:-.01em; }
.acct-sub{ margin:0 0 18px; color:var(--muted); font-size:14px; line-height:1.4; }

/* front door */
.acct-hero{ text-align:center; margin:4px 0 20px; }
.acct-crown{ width:54px; height:54px; margin:0 auto 12px; display:grid; place-items:center; font-size:26px; border-radius:50%;
  background:var(--btn-bg); color:var(--btn-ink); box-shadow:0 6px 18px -6px rgba(0,0,0,.5); }
.acct-cat{ display:block; width:30px; height:32px; background:currentColor; -webkit-mask:url(/brand/sphinx-icon.svg) center/contain no-repeat; mask:url(/brand/sphinx-icon.svg) center/contain no-repeat; }
.acct-hero .acct-sub{ margin-bottom:0; }
.acct-actions{ display:flex; flex-direction:column; gap:10px; }
.acct-card{
  display:flex; align-items:center; gap:14px; width:100%; text-align:left; cursor:pointer;
  padding:14px 16px; border-radius:14px; border:1px solid var(--line-strong); background:var(--bg-alt); color:var(--ink);
  font:inherit; transition:transform .15s ease, border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.acct-card:hover{ transform:translateY(-1px); border-color:var(--ink); box-shadow:var(--shadow); }
.acct-card:focus-visible{ outline:2px solid var(--ink); outline-offset:2px; }
.acct-card-ic{ flex:none; width:44px; height:44px; display:grid; place-items:center; border-radius:12px; background:var(--line); color:var(--ink); }
.acct-card-tx{ flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.acct-card-tx b{ font-size:15.5px; font-weight:800; }
.acct-card-tx small{ color:var(--muted); font-size:12.5px; }
.acct-card-go{ flex:none; color:var(--muted); transition:transform .15s ease; }
.acct-card:hover .acct-card-go{ transform:translateX(3px); color:var(--ink); }
.acct-card-primary{ background:var(--btn-bg); border-color:var(--btn-bg); color:var(--btn-ink); }
.acct-card-primary .acct-card-ic{ background:rgba(255,255,255,.22); color:var(--btn-ink); }
.acct-card-primary .acct-card-tx small, .acct-card-primary .acct-card-go{ color:inherit; opacity:.75; }
.acct-card-primary:hover{ border-color:var(--btn-bg-hover); background:var(--btn-bg-hover); }
.acct-card-primary:hover .acct-card-go{ color:inherit; opacity:1; }
.acct-switch{ margin:18px 0 0; text-align:center; color:var(--muted); font-size:13.5px; }
.acct-staff{ margin-top:16px; padding-top:14px; border-top:1px solid var(--line); font-size:12.5px; }
.acct-link{ border:0; background:none; padding:0; font:inherit; font-weight:800; color:var(--ink); cursor:pointer; text-decoration:underline; text-underline-offset:3px; }
.acct-link:hover{ color:var(--muted); }

/* forms */
.acct-back{ display:inline-flex; align-items:center; gap:4px; margin:-6px 0 12px -6px; padding:6px 10px 6px 6px; border:0; border-radius:999px;
  background:none; color:var(--muted); font:700 13px/1 inherit; cursor:pointer; }
.acct-back:hover{ background:var(--line); color:var(--ink); }
.acct form .form-row{ margin-bottom:12px; }
.acct form label{ display:block; margin:0 0 6px; font-size:12.5px; font-weight:700; color:var(--muted); }
.acct form input:not([type="hidden"]){
  width:100%; box-sizing:border-box; padding:12px 14px; border-radius:12px; border:1px solid var(--line-strong);
  background:var(--bg); color:var(--ink); font:inherit; font-size:15px; transition:border-color .15s, box-shadow .15s;
}
.acct form input:focus{ outline:none; border-color:var(--ink); box-shadow:0 0 0 3px color-mix(in srgb, var(--ink) 16%, transparent); }
.acct-pw-wrap{ position:relative; }
.acct-pw-wrap input{ padding-right:64px !important; }
.acct-eye{ position:absolute; right:8px; top:50%; transform:translateY(-50%); border:0; background:none; padding:6px 8px; border-radius:8px;
  color:var(--muted); font:700 12.5px/1 inherit; cursor:pointer; }
.acct-eye:hover{ color:var(--ink); background:var(--line); }
.acct-hint{ margin:-4px 0 12px; color:var(--muted); font-size:12px; }
.acct .form-err{ margin:0 0 12px; padding:10px 12px; border-radius:10px; background:rgba(200,16,46,.14); border:1px solid rgba(200,16,46,.4); color:#ff9aa8; font-size:13.5px; }
html[data-theme="light"] .acct .form-err{ color:#9c0c24; background:rgba(200,16,46,.08); }
.acct .btn-primary{ width:100%; padding:13px 16px; border-radius:12px; font-size:15.5px; font-weight:800; margin-top:4px; }
.acct .btn-primary:disabled{ opacity:.6; cursor:progress; }

/* personal / business switch */
.acct-seg{ display:grid; grid-template-columns:1fr 1fr; gap:4px; padding:4px; margin:0 0 16px; background:var(--line); border-radius:999px; }
.acct-seg button{ border:0; background:transparent; color:var(--muted); padding:10px 8px; border-radius:999px; font:800 13.5px/1 inherit; cursor:pointer; transition:background .15s, color .15s; }
.acct-seg button:hover{ color:var(--ink); }
.acct-seg button.is-on{ background:var(--btn-bg); color:var(--btn-ink); }

/* signed in */
.acct-profile{ display:flex; align-items:center; gap:16px; margin:0 0 20px; }
.acct-avatar{ flex:none; width:64px; height:64px; display:grid; place-items:center; border-radius:50%; background:var(--btn-bg); color:var(--btn-ink); font-size:28px; font-weight:800; }
.acct-profile h3{ margin:0 0 2px; }
.acct-profile .acct-sub{ margin:0 0 8px; word-break:break-all; }
.acct-chip{ display:inline-block; padding:4px 10px; border-radius:999px; background:var(--line); color:var(--ink); font-size:12px; font-weight:800; }
.acct-signout{ margin-top:16px; width:100%; }

@media (max-width:520px){ .acct{ padding:26px 20px 22px; } }
@media (prefers-reduced-motion:reduce){ .acct{ animation:none; } .acct-card, .acct-card-go{ transition:none; } }

/* New-department dialog (the "+" on the department bar) */
.dc-form .dc-grid{ display:grid; grid-template-columns:1fr 1fr; gap:4px 14px; }
.dc-form .dc-photo{ grid-column:auto; }
.dc-opt{ color:var(--muted); font-weight:500; }
.dc-photo-row{ display:flex; align-items:center; gap:10px; }
.dc-thumb{ width:56px; height:42px; border-radius:8px; border:1px dashed var(--line-strong, #555); background:center/cover no-repeat; }
.dc-pick{ margin-top:10px; border:1px solid var(--line, #333); border-radius:12px; overflow:hidden; }
.dc-pick-head{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; padding:10px 12px; border-bottom:1px solid var(--line, #333); }
.dc-pick-head b{ margin-right:auto; }
.dc-pick-head input[type=search]{ min-width:150px; flex:1 1 150px; }
.dc-list{ list-style:none; margin:0; padding:0; max-height:min(300px, 38vh); overflow:auto; }
.dc-item{ display:grid; grid-template-columns:auto 36px 1fr auto auto; align-items:center; gap:10px; padding:6px 12px; cursor:pointer; border-bottom:1px solid var(--line, #2a2a2a); }
.dc-item:hover{ background:rgba(128,128,128,.12); }
.dc-item img{ width:36px; height:36px; object-fit:contain; border-radius:6px; background:#fff; }
.dc-nm{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .dc-nm em{ color:var(--muted); font-style:normal; font-size:12px; }
.dc-from{ color:var(--muted); font-size:12px; white-space:nowrap; }
.dc-none{ padding:18px; text-align:center; color:var(--muted); }
@media (max-width:560px){ .dc-form .dc-grid{ grid-template-columns:1fr; } .dc-from{ display:none; } .dc-item{ grid-template-columns:auto 36px 1fr; } .dc-catsel{ grid-column:3; max-width:none; } }
/* Categories inside a department: one box each, the + under them adds another. */
.dc-cats{ margin-top:12px; }
#dcCats{ display:grid; gap:6px; margin:6px 0 8px; }
.dc-cat-row{ display:flex; align-items:center; gap:8px; }
.dc-cat-in{ flex:1 1 auto; min-width:0; min-height:40px; padding:6px 10px; color:inherit; background:rgba(128,128,128,.14); border:1px solid rgba(128,128,128,.4); border-radius:8px; font:inherit; }
.dc-cat-in[readonly]{ opacity:.8; cursor:default; }
.dc-cat-n{ color:var(--muted); font-size:12px; white-space:nowrap; }
.dc-cat-x{ flex:none; width:34px; height:34px; border-radius:50%; border:1px solid rgba(128,128,128,.4); background:transparent; color:inherit; font-size:20px; line-height:1; cursor:pointer; }
.dc-cat-x:hover{ background:rgba(128,128,128,.18); }
.dc-cat-add{ display:inline-flex; align-items:center; gap:6px; } .dc-cat-add span{ font-size:18px; line-height:1; font-weight:700; }
.dc-catsel{ max-width:150px; min-height:30px; padding:2px 6px; font-size:12px; color:inherit; background:rgba(128,128,128,.14); border:1px solid rgba(128,128,128,.4); border-radius:8px; }
.dc-catsel[hidden]{ display:none; }
.dc-photo-row [hidden]{ display:none !important; }
.dc-pick-head input[type=search], .dc-pick-head select{ min-height:38px; padding:6px 10px; color:inherit; background:rgba(128,128,128,.14); border:1px solid rgba(128,128,128,.4); border-radius:8px; font:inherit; font-size:14px; }

/* Edit icon on department chips: admin only — a small glass disc (see admin-diamond.css), centred in the chip */
.dept-chip-edit{ display:none !important; }
body.is-admin .dept-chip:has(.dept-chip-edit){ display:inline-flex; align-items:center; justify-content:center; gap:8px; }
body.is-admin .dept-chip-edit{
  display:inline-flex !important; align-items:center; justify-content:center; flex:none; width:20px !important; height:20px !important; min-width:0 !important;
  margin:-6px -9px -6px 0 !important; padding:0 !important; border-radius:50% !important; line-height:0; cursor:pointer; position:relative;
}
body.is-admin .dept-chip-edit svg{ display:block; position:relative; z-index:2; }
.dc-move{ margin-top:12px; } .dc-move select{ min-height:40px; padding:6px 10px; color:inherit; background:rgba(128,128,128,.14); border:1px solid rgba(128,128,128,.4); border-radius:8px; font:inherit; font-size:14px; width:100%; }

/* Product form > "Also appears in": a department + the category it has there, one row each. */
.pf-also{ margin-top:10px; }
.pf-also-row{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto; align-items:center; gap:8px; margin:6px 0; }
.pf-also-add{ display:inline-flex; align-items:center; gap:6px; margin-top:2px; } .pf-also-add span{ font-size:18px; line-height:1; font-weight:700; }
@media (max-width:560px){ .pf-also-row{ grid-template-columns:minmax(0,1fr) auto; } .pf-also-row .pf-also-cat{ grid-column:1; } .pf-also-row .pf-also-x{ grid-row:1 / span 2; grid-column:2; } }
