/* ===========================================================================
   Paintify · Zone Colours screen
   Uses the existing paintify.css design tokens only — no new palette.
   =========================================================================== */

.zcard { margin-top: 18px; }

.zhead {
  display: flex; align-items: baseline; gap: 14px;
  flex-wrap: wrap; margin-bottom: 14px;
}
.zh { font-family: var(--f-disp); font-size: 1.05rem; font-weight: 600; margin: 0; }
.zhead .zactions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.zhint { color: var(--muted); font-size: .82rem; }
.zhint.zpad { margin: 8px 2px 16px; }
.zhint code {
  font-family: var(--f-mono); font-size: .78rem;
  background: var(--surface-2); padding: 1px 5px; border-radius: var(--r-sm);
}

/* ---- zone chips ---- */
.zonegrid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}
.zloading { color: var(--muted); font-size: .9rem; padding: 10px 2px; }

.zchip {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 13px; cursor: pointer;
  border: 1.5px solid var(--subtle); border-radius: var(--r-md);
  background: var(--surface); transition: all .16s var(--ease);
}
.zchip:hover { border-color: var(--brand-soft); background: var(--surface-2); }
.zchip.on { border-color: var(--brand); background: var(--brand-ghost); }
.zchip.off { opacity: .55; }
.zchip input { accent-color: var(--brand); width: 16px; height: 16px; cursor: pointer; }
.zname { font-weight: 600; font-size: .9rem; }
.zn {
  margin-left: auto; font-family: var(--f-mono); font-size: .74rem;
  color: var(--muted); background: var(--surface-2);
  padding: 2px 7px; border-radius: 999px;
}
.zchip.on .zn { background: var(--brand-soft); color: var(--text); }
.zoff {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted);
}
.zsel { margin: 14px 2px 0; color: var(--muted); font-size: .86rem; }

/* ---- depots ---- */
.drow {
  padding: 13px 0; border-top: 1px solid var(--subtle);
  display: grid; gap: 9px;
}
.drow:first-child { border-top: 0; }
.dname { font-weight: 600; font-size: .88rem; }
.daddrow { display: flex; gap: 8px; }
.dadd { flex: 1; min-width: 0; }

/* ---- shade search ---- */
.zsearch { position: relative; flex: 1; min-width: 0; }
.zresults {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 6px);
  max-height: 320px; overflow-y: auto;
  background: var(--surface); border: 1.5px solid var(--subtle);
  border-radius: var(--r-md); box-shadow: var(--sh-lg);
}
.zhit {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; cursor: pointer; font-size: .86rem;
}
.zhit:hover, .zhit.on { background: var(--brand-ghost); }

/* ---- colour rows ---- */
.zlist {
  max-height: 480px; overflow-y: auto;
  border: 1px solid var(--subtle); border-radius: var(--r-md);
}
.zrow {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-bottom: 1px solid var(--subtle); font-size: .86rem;
}
.zrow:last-child { border-bottom: 0; }
.zempty { padding: 26px 16px; text-align: center; color: var(--muted); font-size: .88rem; }

.zsw {
  width: 26px; height: 26px; flex: 0 0 26px; border-radius: var(--r-sm);
  border: 1px solid rgba(0, 0, 0, .16);
}
.zcode {
  font-family: var(--f-mono); font-size: .78rem;
  flex: 0 0 82px; color: var(--muted);
}
.zname2 { font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.zfam {
  font-size: .72rem; color: var(--muted); text-transform: lowercase;
  flex: 0 0 auto; display: none;
}
@media (min-width: 720px) { .zfam { display: block; } }

.zwarn, .zban, .zbad {
  font-size: .68rem; padding: 2px 7px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .04em; flex: 0 0 auto;
}
.zwarn { background: var(--yellow-ghost); color: var(--text); }
.zban  { background: var(--peach-ghost);  color: var(--text); }
.zbad  { background: var(--pink-ghost);   color: var(--text); }

.zfoot {
  display: flex; align-items: center; gap: 14px;
  margin-top: 16px; flex-wrap: wrap;
}
.zcount { color: var(--muted); font-size: .85rem; }
.zfoot .btn { margin-left: auto; }

/* ---- sign-in card ---- */
.zlogin { padding: 8px 2px 4px; }
.zloginmsg { font-size: .88rem; margin-bottom: 6px; }
.zloginrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.zloginrow .addcode { flex: 1 1 180px; min-width: 0; }
.zloginerr { color: var(--pink); font-size: .84rem; margin-top: 10px; min-height: 1em; }
