[hidden] { display: none !important; }
:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --ink: #1d2330;
  --muted: #6b7280;
  --line: #e3e6eb;
  --accent: #2f5bd3;
  --accent-ink: #ffffff;
  --ok: #1f9d55;
  --warn: #c98a00;
  --bad: #d14343;
  --radius: 10px;
  --mono: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
h1, h2, h3 { margin: 0; }
button, input, select { font: inherit; }

/* ---------- top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 20px; background: var(--panel); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 25;   /* above the sticky filter bars (6), below dialogs (30) - so header menus are not covered */ flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo {
  width: 30px; height: 30px; border-radius: 7px;
  background:
    repeating-linear-gradient(90deg, #1e2a52 0 5px, #e9e9e4 5px 10px),
    repeating-linear-gradient(0deg, transparent 0 5px, rgba(190,30,45,.55) 5px 10px);
  background-blend-mode: multiply;
}
.brand h1 { font-size: 16px; }
.sub { margin: 0; font-size: 12px; color: var(--muted); }

.server { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.server label { font-size: 12px; color: var(--muted); }
.server input { width: 230px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 7px; font-family: var(--mono); font-size: 13px; }
.health { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); max-width: 360px; }
.health .dot { width: 9px; height: 9px; border-radius: 50%; background: #c3c7cf; flex: none; }
.health.ok .dot { background: var(--ok); }
.health.bad .dot { background: var(--bad); }
.health .txt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- buttons ---------- */
.btn { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 7px; padding: 7px 14px; cursor: pointer; }
.btn:hover { border-color: #c5cad3; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); width: 100%; padding: 10px; font-weight: 600; }
.btn.primary:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; }
.btn.small { padding: 3px 9px; font-size: 12px; }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 330px 1fr; gap: 18px; padding: 18px 20px; align-items: start; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.input-panel { position: sticky; top: 74px; display: flex; flex-direction: column; gap: 18px; }
.input-panel h2 { font-size: 13px; margin-bottom: 8px; }
.hint { font-weight: 400; color: var(--muted); font-size: 11px; }

.drop {
  display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center;
  border: 2px dashed #cdd2da; border-radius: var(--radius); padding: 18px 10px; cursor: pointer;
  color: var(--muted); transition: background .15s, border-color .15s;
}
.drop strong { color: var(--ink); }
.drop.over { border-color: var(--accent); background: #eef2fd; }
.drop-icon { font-size: 20px; }

.file-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 210px; overflow: auto; }
.file-list li { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.file-list img { width: 34px; height: 34px; object-fit: cover; border-radius: 5px; border: 1px solid var(--line); }
.file-list .n { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list .x { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 15px; }
#btnClear { margin-top: 8px; }

select, .opts input { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.opts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.opts label { font-size: 11px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
#colorOpts.disabled { opacity: .45; pointer-events: none; }
.progress { margin: -8px 0 0; font-size: 12px; color: var(--muted); min-height: 1em; }

/* ---------- results ---------- */
.results { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.empty { background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius); padding: 40px 24px; text-align: center; }
.muted { color: var(--muted); }
#resultList { display: flex; flex-direction: column; gap: 16px; }

.result { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.result.error { border-color: #f0b7b7; }
.result-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.meta { flex: 1; min-width: 0; }
.fname { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.info { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.badge { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 99px; }
.badge.review { background: #fff4d6; color: #8a5a00; }
.result-body { padding: 14px; display: flex; flex-direction: column; gap: 16px; }
.err-msg { color: var(--bad); margin: 0; font-family: var(--mono); font-size: 13px; white-space: pre-wrap; }

.block-title { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 8px; font-weight: 600; }

/* usage bar */
.usage-bar { display: flex; height: 26px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.usage-bar span { display: block; height: 100%; min-width: 2px; }

/* color table */
.color-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.color-table th { text-align: left; font-weight: 600; font-size: 11px; color: var(--muted); padding: 4px 8px; border-bottom: 1px solid var(--line); }
.color-table td { padding: 7px 8px; border-bottom: 1px solid #f0f1f4; vertical-align: middle; }
.color-table tr.group td { background: #fafbfc; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 5px 8px; }
.sw-pair { display: flex; gap: 3px; }
.sw { width: 30px; height: 30px; border-radius: 6px; border: 1px solid rgba(0,0,0,.12); cursor: pointer; position: relative; }
.sw.pan { border-style: dashed; }
.cname { font-weight: 600; }
.fam { display: inline-block; margin-left: 4px; font-size: 11px; padding: 1px 7px; border-radius: 99px; background: #eef0f4; color: #464d5b; }
.num { font-family: var(--mono); font-size: 12px; color: #424857; }
.pcode { font-family: var(--mono); font-size: 12px; }
.de { font-family: var(--mono); font-size: 11px; padding: 1px 6px; border-radius: 5px; }
.de.good { background: #e3f5ea; color: #13703a; }
.de.mid  { background: #fff1d1; color: #7d5600; }
.de.poor { background: #fde4e4; color: #a12727; }
.usage-cell { width: 110px; }
.mini-bar { height: 6px; background: #eef0f4; border-radius: 3px; overflow: hidden; margin-top: 3px; }
.mini-bar span { display: block; height: 100%; background: var(--accent); }

/* tags */
.tags { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.tag { border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; }
.tag .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tag .v { font-weight: 600; margin-top: 2px; word-break: break-word; }
.tag .v.na { color: #a0a6b1; font-weight: 400; font-style: italic; }
.conf { height: 5px; background: #eef0f4; border-radius: 3px; margin-top: 6px; overflow: hidden; }
.conf span { display: block; height: 100%; }
.tag .c { font-size: 11px; color: var(--muted); margin-top: 3px; font-family: var(--mono); }

/* raw json */
.raw { border-top: 1px solid var(--line); }
.raw summary { cursor: pointer; padding: 9px 14px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 10px; }
.raw pre { margin: 0; padding: 12px 14px; background: #0f1420; color: #d7dcea; font-family: var(--mono); font-size: 12px; overflow: auto; max-height: 380px; }

.toast {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: #1d2330; color: #fff; padding: 7px 14px; border-radius: 7px; font-size: 12px;
  opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 20;
}
.toast.show { opacity: 1; }

/* =================== v2: tabs, archive, search =================== */
.tabs { display: flex; gap: 4px; background: #eef0f4; padding: 3px; border-radius: 9px; }
.tab-btn { border: 0; background: transparent; padding: 7px 14px; border-radius: 7px; cursor: pointer; color: #4a5162; font-weight: 600; font-size: 13px; }
.tab-btn.active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.tab-btn .count { font-weight: 500; color: var(--muted); font-size: 11px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.sep { border-top: 1px solid var(--line); padding-top: 16px; }
.hint { font-size: 11px; color: var(--muted); font-weight: 400; margin: 4px 0; }
.small-txt { font-size: 12px; margin: 4px 0; }
.center { text-align: center; }
.row { display: flex; gap: 8px; }
.row .btn.primary { flex: 1; }
.drop.small { padding: 12px 10px; }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.field-grid label, .lbl { font-size: 11px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.lbl { margin-top: 8px; }
.field-grid .full { grid-column: 1 / -1; }
.field-grid input, .field-grid select, .lbl input, .lbl select,
.filter-bar input, .filter-bar select, .edit-grid input, .edit-grid select {
  width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 13px; color: var(--ink);
}
.check { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; margin-top: 8px; color: var(--ink); }
.check input { margin-top: 2px; }
.check.inline { margin: 0; align-items: center; white-space: nowrap; }

/* job progress */
.job { margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: #fafbfc; }
.job-head { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.pbar { height: 8px; background: #e8ebf0; border-radius: 4px; overflow: hidden; margin: 8px 0 4px; }
.pbar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.job details { font-size: 12px; }
.job ul { margin: 6px 0 0; padding-left: 16px; max-height: 160px; overflow: auto; font-family: var(--mono); font-size: 11px; }

/* filter bar + gallery */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px; }
.filter-bar input[type=search] { flex: 1 1 180px; width: auto; }
.filter-bar select { width: auto; flex: 0 1 150px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: 0 4px 14px rgba(20,30,60,.10); transform: translateY(-1px); }
.card-img { position: relative; aspect-ratio: 1 / 1; overflow: hidden; min-height: 0; background: #eef0f4; }
.card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.card-body { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 5px; }
.card-name { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { font-size: 10.5px; padding: 1px 7px; border-radius: 99px; background: #eef0f4; color: #464d5b; white-space: nowrap; }
.chip.t-type { background: #e6ecfb; color: #2a4593; }
.chip.t-pattern { background: #f1e9fb; color: #5b3593; }
.chip.t-weave { background: #e4f4ee; color: #1f6b4b; }
.chip.t-finish { background: #fbf0e3; color: #8a541b; }
.chip.t-end_use { background: #fde8ef; color: #8e2a50; }
.chip.match { outline: 2px solid var(--ok); }
.dots { display: flex; gap: 3px; }
.dots span { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); }

/* score badges */
.score { display: inline-block; font-weight: 700; font-size: 12px; padding: 2px 8px; border-radius: 99px; color: #fff; }
.card-img .score { position: absolute; z-index: 2; top: 8px; left: 8px; font-size: 13px; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.s-hi { background: #1f9d55; } .s-mid { background: #c98a00; } .s-lo { background: #6b7280; } .s-no { background: #a3a8b3; }
.legend { margin-top: 14px; font-size: 12px; color: var(--muted); }
.subscores { display: grid; grid-template-columns: 44px 1fr 34px; gap: 2px 6px; align-items: center; font-size: 10.5px; color: var(--muted); }
.subscores .bar { height: 5px; background: #eef0f4; border-radius: 3px; overflow: hidden; }
.subscores .bar span { display: block; height: 100%; background: var(--accent); }
.subscores .v { font-family: var(--mono); text-align: right; }

/* search panel */
.query-preview { max-width: 100%; max-height: 180px; border-radius: 8px; }
.slider { display: block; font-size: 12px; margin-top: 8px; }
.slider b { float: right; font-family: var(--mono); font-size: 12px; }
.slider input { width: 100%; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.query-box { display: flex; gap: 14px; align-items: center; padding: 12px; flex-wrap: wrap; }
.query-box img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.query-box .usage-bar { width: 220px; height: 18px; }
.warn { background: #fff4d6; color: #7a5200; border-radius: 7px; padding: 6px 10px; font-size: 12px; }

/* modal */
.modal { position: fixed; inset: 0; background: rgba(15,20,32,.55); z-index: 30; display: flex; align-items: flex-start; justify-content: center; padding: 30px 16px; overflow: auto; }
.modal-box { background: var(--panel); border-radius: 12px; width: min(1100px, 100%); position: relative; padding: 20px; box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.modal-x { position: absolute; top: 10px; right: 12px; border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); }
.modal h3 { margin: 0 0 12px; font-size: 16px; padding-right: 30px; }
.detail { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: 20px; }
@media (max-width: 800px) { .detail, .compare { grid-template-columns: 1fr !important; } }
.detail-img { width: 100%; border-radius: 10px; border: 1px solid var(--line); background: #eef0f4; }
.edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.edit-grid label { font-size: 11px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.edit-grid .full { grid-column: 1 / -1; }
.detail-actions { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.btn.danger { color: var(--bad); border-color: #f0c4c4; }
.btn.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.kv { font-size: 12px; color: var(--muted); margin: 6px 0; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.compare h4 { margin: 0 0 8px; font-size: 13px; }
.compare img { width: 100%; border-radius: 10px; border: 1px solid var(--line); background: #eef0f4; }
.cmp-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 10px; }
.cmp-table th, .cmp-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid #f0f1f4; }
.cmp-table th { color: var(--muted); font-size: 11px; font-weight: 600; }
.cmp-table td.ok { color: var(--ok); font-weight: 600; }
.score-big { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.score-big .score { font-size: 18px; padding: 5px 14px; }

.input-panel section .progress { margin: 6px 0 0; }

/* v3: color search */
.qcolors { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; }
.qc { display: inline-flex; align-items: center; gap: 5px; }
.sw-mini { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(0,0,0,.15); vertical-align: middle; }
.sw-mini.lg { width: 30px; height: 30px; border-radius: 6px; }
.match-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 16px; }
.match-table th { text-align: left; font-size: 11px; color: var(--muted); font-weight: 600; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.match-table td { padding: 6px; border-bottom: 1px solid #f0f1f4; vertical-align: middle; }
.match-table td.arrow { color: var(--muted); font-size: 16px; text-align: center; width: 24px; }
.ctype { display: inline-block; margin-left: 4px; font-size: 10.5px; padding: 1px 6px; border-radius: 99px; background: #f3f4f7; color: #5a6170; }
.ctype.t-vibrant { background: #fde8e4; color: #a33a22; }
.ctype.t-accent { background: #efe8fb; color: #5b3593; }
.ctype.t-dark { background: #e6e8ee; color: #2b3140; }
.ctype.t-light_neutral { background: #f6f6f1; color: #6b6b5a; }
.card .usage-bar { height: 12px; }

/* =================== v4: Dataset tab =================== */
.ds-layout { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; }
.ds-toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 12px 14px; position: sticky; top: 62px; z-index: 4; }
.ds-field { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--muted); }
.ds-field select { padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 13px; color: var(--ink); min-width: 140px; }
.ds-field.inline { flex-direction: row; align-items: center; gap: 6px; }
.ds-sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 4px; }
.ds-btn { width: auto !important; padding: 8px 14px !important; cursor: pointer; display: inline-block; }
.ds-info { padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.ds-def { background: #f7f8fa; border-radius: 7px; padding: 8px 10px; }
.ds-drop { border: 2px dashed var(--accent); background: #eef2fd; color: var(--accent); border-radius: var(--radius); padding: 22px; text-align: center; font-size: 15px; }
.ds-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ds-chip { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 4px 11px; font-size: 12px; cursor: pointer; color: var(--ink); }
.ds-chip span { color: var(--muted); margin-left: 3px; font-family: var(--mono); font-size: 11px; }
.ds-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.ds-chip.active span { color: #dfe6fb; }
.ds-chip.warn:not(.active) { border-color: #f0cf8a; background: #fffaf0; }
.ds-selbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 14px; position: sticky; top: 140px; z-index: 3; background: #f5f8ff; border-color: #cdd9f6; }
.ds-group { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 12px; }
.ds-group h3 { font-size: 14px; display: flex; align-items: center; gap: 8px; margin: 0 0 4px; }
.ds-group h3 .ds-selgroup { margin-left: auto; }
.ds-gdef { margin: 0 0 8px; }
.ds-warn { font-size: 11px; font-weight: 600; color: #8a5a00; background: #fff4d6; padding: 1px 8px; border-radius: 99px; }
.ds-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.ds-thumb { position: relative; border-radius: 8px; overflow: hidden; border: 2px solid transparent; cursor: pointer; background: #eef0f4; aspect-ratio: 1 / 1; }
.ds-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ds-thumb.sel { border-color: var(--accent); box-shadow: 0 0 0 2px #c7d5fa; }
.ds-check { position: absolute; top: 5px; left: 5px; width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.85); border: 1px solid #c5cad3; color: transparent; font-size: 12px; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.ds-thumb.sel .ds-check { background: var(--accent); border-color: var(--accent); color: #fff; }
.ds-zoom { position: absolute; top: 4px; right: 4px; border: 0; border-radius: 6px; background: rgba(15,20,32,.55); color: #fff; width: 24px; height: 24px; cursor: pointer; opacity: 0; transition: opacity .15s; }
.ds-thumb:hover .ds-zoom { opacity: 1; }
.ds-name { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(0,0,0,.6)); color: #fff; font-size: 10.5px; padding: 12px 6px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ds-badge { position: absolute; top: 30px; left: 5px; background: #fff4d6; color: #7a5200; font-size: 10px; padding: 0 5px; border-radius: 4px; }
textarea { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; font: inherit; font-size: 13px; resize: vertical; }
code { font-family: var(--mono); font-size: 12px; background: #f3f4f7; padding: 0 4px; border-radius: 4px; }

/* =================== v5: Training panel =================== */
.tr-panel { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; border-color: #cdd9f6; }
.tr-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.tr-head h3 { font-size: 15px; margin: 0; }
.tr-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.tr-row .ds-field select { min-width: 210px; }
.tr-row .ds-field input { width: 80px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; }
.tr-sub { margin: 6px 0 0; font-size: 13px; }
.tr-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tr-table th { text-align: left; font-size: 11px; color: var(--muted); font-weight: 600; padding: 5px 8px; border-bottom: 1px solid var(--line); }
.tr-table td { padding: 6px 8px; border-bottom: 1px solid #f0f1f4; vertical-align: middle; }
.tr-table tr.active td { background: #f1f7f3; }
.tr-actions { white-space: nowrap; text-align: right; }
.tr-badge { background: var(--ok); color: #fff; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 99px; }
.tr-bar { display: inline-block; width: 70px; height: 6px; background: #eef0f4; border-radius: 3px; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.tr-bar span { display: block; height: 100%; background: var(--accent); }
.tr-report { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 14px; }
@media (max-width: 900px) { .tr-report { grid-template-columns: 1fr; } }
.tr-cm { border-collapse: collapse; font-size: 11.5px; }
.tr-cm th { font-weight: 600; color: var(--muted); padding: 3px 6px; text-align: right; white-space: nowrap; }
.tr-cm thead th { text-align: center; }
.tr-cm td { width: 34px; height: 28px; text-align: center; font-family: var(--mono); border: 1px solid #fff; background: #f6f7f9; }
.tr-cm td.diag { background: rgba(31, 157, 85, calc(.15 + var(--a) * .7)); color: #0d3d22; font-weight: 700; }
.tr-cm td.off { background: rgba(209, 67, 67, calc(.15 + var(--a) * .7)); color: #4a1010; }
.tr-wrong { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tr-wrong-item { display: flex; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 6px; cursor: pointer; font-size: 12px; }
.tr-wrong-item:hover { border-color: var(--accent); }
.tr-wrong-item img { width: 52px; height: 52px; object-fit: cover; border-radius: 6px; }
.tr-test { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.tr-test img { width: 110px; height: 110px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.tr-pred { display: grid; grid-template-columns: 120px 120px 60px; gap: 8px; align-items: center; font-size: 13px; color: var(--ink); margin-bottom: 4px; }
.tr-pred .tr-bar { width: 120px; }
.tr-pred.top span:first-child { font-weight: 700; }

/* =================== v6: label fields, tick boxes =================== */
.ds-pickers { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.ds-ticks { display: flex; flex-wrap: wrap; gap: 5px; }
.ds-tick { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; font-size: 12.5px; color: var(--ink); cursor: pointer; background: #fff; }
.ds-tick input { margin: 0; }
.ds-tick span { color: var(--muted); font-family: var(--mono); font-size: 11px; }
.ds-tick.on { background: #eef2fd; border-color: var(--accent); }
.ds-chiplbl { align-self: center; margin-right: 2px; }
.ds-eff { font-size: 11px; font-weight: 600; color: #4b2a8a; background: #efe7ff; padding: 1px 8px; border-radius: 99px; }
.ds-labels { position: absolute; left: 4px; right: 4px; bottom: 22px; display: flex; flex-wrap: wrap; gap: 3px; }
.ds-labels i { font-style: normal; font-size: 10px; background: rgba(255,255,255,.9); color: #23324f; padding: 0 5px; border-radius: 4px; }
.edit-grid .lbl { font-size: 12px; color: var(--muted); display: block; margin-bottom: 4px; }
.ds-imp { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 10px 0; }
.ds-imp-box { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.ds-imp-box label.full { display: flex; flex-direction: column; gap: 3px; width: 100%; font-size: 12px; color: var(--muted); }
.ds-imp-box input[type=text], .ds-imp-box input:not([type]) { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; }
.tr-eff { border: 1px solid #ddd0fb; background: #faf7ff; border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; }
@media (max-width: 900px) { .ds-imp { grid-template-columns: 1fr; } }
.ds-chipgrp { align-self: center; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 0 2px 0 8px; }
.tr-groups { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; background: #f7f8fa; border-radius: 7px; padding: 8px 10px; font-size: 13px; }

/* =================== weave analysis =================== */
.wv { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink); }
.wv-head b { font-size: 14px; }
.wv-nums { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 12px; }
.wv-nums b { color: var(--ink); font-weight: 600; }
.wv-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.wv-tab { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 3px 10px; font-size: 12px; cursor: pointer; color: var(--ink); }
.wv-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.wv-img { width: 100%; max-width: 520px; border-radius: 8px; border: 1px solid var(--line); image-rendering: pixelated; }
.wv-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--muted); }
.wv-leg i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.di-weave { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.tr-testweave { flex: 1 1 100%; }
.tr-testweave .wv-img { max-width: 560px; }
.tr-check span:last-child { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--ink); padding: 7px 0; }
.tr-wbadge { font-size: 10.5px; background: #eef2fd; color: #2a46a8; padding: 0 6px; border-radius: 99px; }
.fv-table td { font-size: 12px; padding: 4px 6px; }
.fv-val { font-family: var(--mono); }
.fv-lvl { font-size: 11px; padding: 0 7px; border-radius: 99px; background: #eef0f4; }
.fv-lvl.high { background: #dff3e6; color: #11632f; } .fv-lvl.medium { background: #fff4d6; color: #7a5200; } .fv-lvl.low { color: var(--muted); }
.fv-st { font-size: 10.5px; padding: 0 6px; border-radius: 99px; background: #f1f1f4; color: var(--muted); white-space: nowrap; }
.fv-st.ok { background: #e7f0ff; color: #2a46a8; }

/* =================== per-module tagging / search =================== */
.md-head { font-size: 15px; font-weight: 700; margin: 2px 0 6px; }
.md-res .tr-pred { grid-template-columns: 160px 140px 60px; }
.md-analysis { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.md-match { font-size: 12.5px; font-weight: 600; color: var(--ink); margin-top: 4px; }
.tag-archive-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }

/* =================== logs =================== */
.logs-badge { background: var(--err, #d14343); color: #fff; font-size: 10.5px; border-radius: 99px; padding: 0 6px; margin-left: 3px; }
.lg-list { display: flex; flex-direction: column; gap: 6px; max-height: 420px; overflow: auto; }
.lg-item { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 12.5px; }
.lg-msg { font-family: var(--mono); font-size: 11.5px; word-break: break-word; margin-top: 2px; }
.ct-box { display: flex; flex-direction: column; gap: 8px; }
.ct-th { width: 38px; height: 38px; object-fit: cover; border-radius: 5px; }
tr.ct-bad td { background: #fff7f2; }

/* =================== hybrid tagging =================== */
.tag-st { font-size: 10px; font-weight: 600; background: #fff4d6; color: #7a5200; padding: 0 6px; border-radius: 99px; margin-left: 4px; }
.tag.st-review { border-color: #f0cf8a; }
.tag.st-no_model .v, .tag.st-not_applicable .v { color: var(--muted); font-size: 13px; font-weight: 500; }
.tag.st-error { border-color: #e9a3a3; }
.tg-ready { font-size: 11.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 6px; }
.tg-mod { padding: 0 7px; border-radius: 99px; background: #f1f1f4; }
.tg-mod.ok { background: #dff3e6; color: #11632f; }
.tg-batch { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.tg-batch label.full { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.tg-batch input:not([type]) { padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; }
.tb-links { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* =================== archive tag sources =================== */
.src { font-size: 10.5px; padding: 0 6px; border-radius: 99px; margin-left: 4px; font-weight: 600; }
.src.man { background: #efe7ff; color: #4b2a8a; }
.src.fol { background: #eef6ee; color: #2c6b2c; }
.src.auto { background: #eef2fd; color: #2a46a8; }
.rv-dot { color: #d98a00; }
.warn-txt { color: #a35d00; }

/* hybrid search */
.preset-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.preset-row .btn.on { background: var(--accent, #2b6cb0); color: #fff; border-color: transparent; }
.weights { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.wslider { font-size: 12px; }

/* more filters (shared) */
.more-row { flex-basis: 100%; }
.more-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; align-items: end; margin-top: 6px; }
.more-filters label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--muted, #667); }
.more-filters input, .more-filters select { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 13px; color: var(--ink); }
.more-filters input, .more-filters select, .filter-bar .more-filters input[type=search], .filter-bar .more-filters select { flex: none; width: 100%; height: auto; }
.more-filters label.check.inline { flex-direction: row; align-items: center; align-self: center; gap: 6px; font-size: 12px; color: var(--ink); }
.more-filters label.check.inline input { width: auto; }
#sfMore .more-filters, #sfMore.more-filters { grid-template-columns: 1fr 1fr; }
input.full { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; margin-bottom: 8px; font-size: 13px; }
#sfMoreBtn { margin-top: 8px; }

/* test set + add to dataset (Phase 6) */
.ds-testset { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; font-size: 12px; }
.ds-testset select { padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }
.ds-test { position: absolute; left: 4px; bottom: 22px; background: #7c3aed; color: #fff; font-size: 9px; font-weight: 700; padding: 1px 5px; border-radius: 4px; letter-spacing: .04em; }
.ds-chiptest { color: #7c3aed; font-weight: 600; }
.ad-wrap { display: flex; gap: 14px; align-items: flex-start; }
.ad-img { width: 150px; border-radius: 8px; border: 1px solid var(--line); }
.ad-mods { flex: 1; display: grid; gap: 10px; }
.ad-mod { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.ad-mod.off .ad-fields { opacity: .4; pointer-events: none; }
.ad-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-top: 6px; }
.ad-field { display: flex; flex-direction: column; gap: 3px; }
.ad-field[hidden] { display: none; }
.ad-field select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; }
.ad-ticks { display: flex; flex-wrap: wrap; gap: 4px 12px; grid-column: 1 / -1; }
.ad-field[data-f]:has(.ad-ticks) { grid-column: 1 / -1; }
.ad-foot { display: flex; gap: 10px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.ad-foot select { padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; }
.tr-versions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0; font-size: 12px; }
.tr-testacc { color: #7c3aed; font-weight: 600; }
.tr-note { font-style: italic; color: var(--muted, #667); }
.ds-chip.active .ds-chiptest { color: #fff; }
.ad-foot .btn { width: auto; padding-left: 28px; padding-right: 28px; }
.ad-foot label.ds-field { display: flex; flex-direction: row; align-items: center; gap: 8px; }
.ad-foot label.ds-field { white-space: nowrap; }

/* system check + backup (Phase 7) */
.logs-badge.warn { background: #d97706; }
.sys-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.sys-tabs .btn.on { background: var(--accent, #2b6cb0); color: #fff; border-color: transparent; }
.sys-sum { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sys-st { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-size: 11px; font-weight: 700; color: #fff; }
.sys-st.ok { background: #16a34a; } .sys-st.info { background: #64748b; } .sys-st.warn { background: #d97706; } .sys-st.error { background: #dc2626; }
.sys-group { margin: 8px 0; }
.sys-row { display: grid; grid-template-columns: 24px 190px 1fr; gap: 2px 8px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.sys-detail { color: var(--ink); word-break: break-word; }
.sys-fix { grid-column: 3; color: #b45309; font-size: 12px; }
.sys-row.error .sys-fix { color: #b91c1c; }
.sys-pending { background: #fff7ed; border: 1px solid #fdba74; border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; font-size: 13px; }
.sys-confirm { background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 10px; }
.bk-parts { display: grid; gap: 4px; margin-bottom: 8px; }
.bk-row { display: flex; gap: 8px; align-items: center; margin: 6px 0; }
.bk-row input[type=text] { flex: 1; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; }
.bk-row .btn { flex: none; width: auto; }

/* property editor + review (Phase 8) */
.pe-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pe-grid.pe-grid4 { grid-template-columns: repeat(4, 1fr); }
.pe-grid label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted, #667); }
.pe-grid select { padding: 7px 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; background: #fff; color: var(--ink); }
.pe-grid select:disabled { background: #f1f3f6; }
.pe-fin { margin-top: 8px; }
.pe-ticks { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; }
.pe-tri { cursor: pointer; font-size: 12px; user-select: none; padding: 2px 6px; border: 1px solid var(--line); border-radius: 6px; }
.pe-tri[data-s="1"] { background: #dcfce7; border-color: #86efac; }
.pe-tri[data-s="2"] { background: #fee2e2; border-color: #fca5a5; text-decoration: line-through; }
.pe-tri span { display: inline-block; width: 12px; font-weight: 700; }
.pe-errors { background: #fef2f2; border: 1px solid #fca5a5; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; font-size: 13px; color: #991b1b; }
.pe-errors ul, .pe-dispute ul { margin: 4px 0 4px 18px; padding: 0; }
.pe-dispute { background: #fffbeb; border: 1px solid #fcd34d; border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; font-size: 13px; }
.pe-th { width: 28px; height: 28px; object-fit: cover; border-radius: 4px; vertical-align: middle; margin-right: 4px; }
.pe-src { margin: 4px 0 8px; }
.rv-badge { position: absolute; right: 6px; top: 6px; z-index: 2; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 8px; background: #64748b; color: #fff; }
.pe-src .rv-badge { position: static; }
.rv-badge.pending { background: #2563eb; } .rv-badge.disputed { background: #d97706; } .rv-badge.approved { background: #16a34a; } .rv-badge.rejected { background: #94a3b8; }
.ar-check { position: absolute; left: 6px; top: 6px; z-index: 2; width: 22px; height: 22px; border-radius: 50%; background: rgba(255,255,255,.9); border: 2px solid #94a3b8; color: transparent; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.ar-check.on { background: var(--accent, #2b6cb0); border-color: var(--accent, #2b6cb0); color: #fff; }
#afSelect.on { background: var(--accent, #2b6cb0); color: #fff; }
.rv-panel { margin-bottom: 10px; }
.rv-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rv-head select { padding: 5px 7px; border: 1px solid var(--line); border-radius: 7px; font-size: 12px; }
.rv-count { font-size: 12px; color: var(--muted, #667); margin-right: auto; }
.rv-bulk { display: flex; gap: 8px; align-items: center; margin: 8px 0; flex-wrap: wrap; }
.rv-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 8px; max-height: 520px; overflow: auto; }
.rv-card { display: flex; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; background: #fff; }
.rv-card.sel { outline: 2px solid var(--accent, #2b6cb0); }
.rv-card.disputed { border-color: #fcd34d; background: #fffdf5; }
.rv-card > img { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; cursor: pointer; flex: none; }
.rv-body { flex: 1; min-width: 0; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.rv-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-ev { font-size: 12px; color: #92400e; }
.rv-actions { display: flex; flex-wrap: wrap; gap: 4px; }
.rv-edit { border-top: 1px dashed var(--line); padding-top: 6px; }
.rv-edit .pe-grid, .rv-edit .pe-grid.pe-grid4 { grid-template-columns: 1fr 1fr; }
.rv-train { margin-top: 12px; }
.rv-cmp { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-top: 8px; }
.rv-cmp.good { border-color: #86efac; background: #f0fdf4; }
.rv-head select { width: auto; flex: none; }

/* pages (Phase 9) */
.pager { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 8px 0; font-size: 13px; }
.pg-nav { display: flex; gap: 3px; align-items: center; }
.pg-btn { min-width: 32px; height: 30px; padding: 0 8px; border: 1px solid var(--line); background: #fff; border-radius: 7px; cursor: pointer; font-size: 13px; color: var(--ink); }
.pg-btn:hover:not(:disabled) { border-color: var(--accent, #2b6cb0); }
.pg-btn.on { background: var(--accent, #2b6cb0); border-color: var(--accent, #2b6cb0); color: #fff; font-weight: 600; }
.pg-btn:disabled { opacity: .4; cursor: default; }
.pg-gap { padding: 0 4px; color: var(--muted, #667); }
.pg-go { display: flex; align-items: center; gap: 4px; color: var(--muted, #667); }
.pg-go input { width: 60px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; }
#afPerPage { flex: 0 1 120px; }
#sPerPage { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; }

/* type & pattern analysis view (Phase 10) */
.pv-reading { background: var(--bg-soft, #f4f6fa); border-radius: 8px; padding: 8px 10px; font-weight: 600; }
.pv-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin: 8px 0; }
.pv-kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: 12px; }
.pv-kv span { color: var(--muted, #667); }
.look-lbl { margin-top: 10px; }
.look-lbl select { width: 100%; }
.client-pick { display: flex; align-items: center; gap: 6px; margin-left: auto; margin-right: 12px; }
.client-pick label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.client-pick select { min-width: 150px; max-width: 220px; font-weight: 600; }
/* roles (Phase 16): body.role-client hides SuperAdmin-only parts, body.no-write hides changing the archive */
body.role-client .sa-only, body.role-client .to-dataset, body.role-client #edDataset { display: none !important; }
body:not(.role-client) .client-only { display: none !important; }
body.no-write .write-only, body.no-write .to-archive, body.no-write #edSave, body.no-write #edRetag,
body.no-write #edDelete { display: none !important; }
body:not(.can-users) .users-only { display: none !important; }
.user-box { display: flex; align-items: center; gap: 6px; margin-right: 12px; }
.user-name { font-size: 12px; color: var(--muted); }
.user-name b { color: var(--ink, inherit); }
.login-wrap { position: fixed; inset: 0; background: rgba(20, 24, 40, .55); display: flex; align-items: center;
  justify-content: center; z-index: 1000; }
.login-card { background: #fff; border-radius: 12px; padding: 26px 28px; width: 340px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.login-card h2 { margin: 0 0 4px; }
.login-card label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); margin-top: 12px; }
.login-card input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 7px; font-size: 14px; }
.login-card .btn { width: 100%; margin-top: 16px; }
.login-card .err-msg { min-height: 18px; margin: 8px 0 0; font-size: 12px; color: #b3261e; }
.sp-ep { margin: 6px 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; }
.sp-ep summary { cursor: pointer; }
.sp-bar { display: inline-block; height: 8px; background: var(--accent, #3456d1); border-radius: 4px; vertical-align: middle; }
.rv-client { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 10px; background: #eef1fb; color: #3456d1; font-size: 11px; font-weight: 600; }
.sp-days { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.sp-days select { width: auto; padding: 3px 6px; }
.cal-prev { display: flex; gap: 12px; margin: 10px 0; }
.cal-prev figure { margin: 0; text-align: center; font-size: 11px; color: var(--muted); }
.cal-prev img { width: 220px; border-radius: 6px; border: 1px solid var(--line); }
.fb-row { display: flex; gap: 4px; margin-top: 6px; }
.fb-btn { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 1px 8px; cursor: pointer; font-size: 13px; opacity: .55; }
.fb-btn:hover { opacity: 1; }
.fb-btn.on { opacity: 1; background: #eef1fb; border-color: #3456d1; }
.gq-strip { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.gq-strip figure { margin: 0; text-align: center; font-size: 11px; color: var(--muted); }
.gq-strip img, .gq-mini { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.sq-best td { background: #f1f6ef; }
.pal-table { max-height: 380px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; margin: 6px 0; }
.pal-sw { display: inline-block; width: 22px; height: 22px; border-radius: 5px; border: 1px solid rgba(0,0,0,.15); vertical-align: middle; }
.pal-add input[type=color] { width: 40px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 6px; }
.pal-fams { display: flex; flex-wrap: wrap; gap: 6px; }
.pal-fam { border: 1px solid var(--line); border-radius: 8px; padding: 3px 4px 3px 8px; font-size: 12px; display: inline-flex; align-items: center; gap: 6px; }
.tg-mod.part { background: #fff3d6; color: #7a5600; }
.tg-mod small { color: #8a4b00; font-size: 10px; }
.tg-issues { margin-top: 6px; font-size: 12px; }
.tg-issues summary { cursor: pointer; color: #8a4b00; }
.tg-issues ul { margin: 6px 0; padding-left: 18px; }
.tg-issues li { margin: 3px 0; }
/* ---------- multi-select drop-down ---------- */
.ms { position: relative; display: inline-block; min-width: 150px; }
.ms-btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 34px; padding: 4px 9px;
  border: 1px solid var(--line); border-radius: 7px; background: #fff; font-size: 13px; color: var(--ink); cursor: pointer; text-align: left; }
.ms.on .ms-btn { border-color: var(--accent); }
.ms.open .ms-btn { border-color: var(--accent); box-shadow: 0 0 0 2px #dfe6fb; }
.ms-sum { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; overflow: hidden; }
.ms-ph { color: var(--ink); }
.ms-car { color: var(--muted); font-size: 11px; }
.ms-chip { display: inline-flex; align-items: center; gap: 4px; background: #eef2fc; border-radius: 10px; padding: 1px 7px 1px 4px; font-size: 12px; white-space: nowrap; }
.ms-chip i { font-style: normal; color: var(--muted); font-size: 11px; }
.ms-more { font-size: 11px; color: var(--muted); }
.ms-sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(0,0,0,.18); flex: none; }
.ms-pop { position: absolute; z-index: 50; top: calc(100% + 4px); left: 0; min-width: 100%; width: max-content; max-width: 420px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 40px rgba(20,30,60,.18); display: flex; flex-direction: column; }
.ms-q { margin: 8px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; }
.ms-list { max-height: 330px; overflow: auto; padding-bottom: 4px; }
.ms-head { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 7px 12px 3px; background: #f7f8fa; display: flex; align-items: center; gap: 6px; }
.ms-head.sel { cursor: pointer; }
.ms-head.on { color: var(--accent); }
.ms-hint { text-transform: none; letter-spacing: 0; font-weight: 400; }
.ms-row { display: flex; align-items: center; gap: 8px; padding: 5px 12px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.ms-row:hover { background: #f4f6fb; }
.ms-row.on { background: #eef2fc; }
.ms-row.zero { color: #9aa1ad; }
.ms-row input, .ms-head input { margin: 0; }
.ms-fam { color: var(--muted); font-size: 12px; min-width: 64px; }
.ms-lab { flex: 1; }
.ms-n { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-left: 10px; }
.ms-empty { padding: 10px 12px; color: var(--muted); font-size: 13px; margin: 0; }
.ms-foot { display: flex; gap: 6px; padding: 7px 8px; border-top: 1px solid var(--line); }
.ms-foot button { border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.ms-foot .ms-done { margin-left: auto; background: var(--accent); border-color: var(--accent); color: #fff; }
.ms-foot .ms-extra { color: var(--accent); font-weight: 600; }
.field-grid .ms { width: 100%; }

/* results filter */
.res-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; margin-bottom: 10px; }
.res-filter .ms { min-width: 130px; }
.rf-score { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.rf-score input { width: 120px; }
#sLookBox.dim { opacity: .75; }
.filter-bar .ms { flex: 0 1 160px; }
.ms .ms-q, .filter-bar .ms .ms-q { flex: none; width: auto; height: auto; min-height: 0; padding: 7px 9px; font-size: 13px; }
.ms input[type=checkbox], .filter-bar .ms input[type=checkbox] { width: auto; height: auto; padding: 0; flex: none; margin: 0; }
.ms-pop.right { left: auto; right: 0; }
/* ---------- colour palette window ---------- */
.pal-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.pal-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 10px 0 12px; }
.pal-tabs button { border: 0; background: none; padding: 9px 14px; font-size: 14px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.pal-tabs button.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }
.pal-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.pal-bar input[type=search] { width: 230px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; }
.pal-bar select { padding: 7px 9px; border: 1px solid var(--line); border-radius: 7px; }
.pal-sp { flex: 1; }
.pal-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.pal-seg button { border: 0; background: #fff; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.pal-seg button.on { background: var(--accent); color: #fff; font-weight: 600; }
.pal-seg button:disabled { color: #b5bac3; cursor: not-allowed; }
.pal-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pal-sw { display: inline-block; width: 16px; height: 16px; border-radius: 4px; border: 1px solid rgba(0,0,0,.18); vertical-align: middle; }
.pal-sw.big { width: 24px; height: 24px; border-radius: 5px; }
.pal-ref { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.pal-ref i { font-style: normal; color: var(--muted); font-size: 11px; }
.pal-act { white-space: nowrap; }
.pal-table { max-height: 56vh; overflow: auto; }
.pal-dlg { position: fixed; inset: 0; background: rgba(20,24,40,.45); z-index: 200; display: flex; align-items: center; justify-content: center; }
.pal-dlg-box { width: 440px; max-width: 94vw; background: #fff; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.25); padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.pal-dlg-box label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.pal-dlg-box input:not([type=color]) { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; color: var(--ink); font-weight: 400; }
.pal-dlg-head { display: flex; justify-content: space-between; align-items: center; }
.pal-dlg-head h3 { margin: 0; font-size: 17px; }
.pal-x { border: 0; background: none; font-size: 22px; color: var(--muted); cursor: pointer; }
.pal-dlg-row { display: flex; gap: 14px; align-items: center; }
.pal-big { width: 76px; height: 76px; border-radius: 12px; border: 1px solid rgba(0,0,0,.15); flex: none; }
.pal-dlg-col { display: flex; flex-direction: column; gap: 6px; }
.pal-dlg-col > label { margin: 0; }
.pal-dlg-ref { background: #f7f8fa; border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.pal-dlg-ref i { font-style: normal; color: var(--muted); font-size: 11px; margin-left: 4px; }
.pal-dlg-foot { display: flex; justify-content: flex-end; gap: 8px; }
/* colour dataset */
.ds-msfield { min-width: 300px; }
.ds-msfield .ms { width: 320px; }
.ds-hintsm { color: var(--muted); font-weight: 400; }
.ds-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(0,0,0,.18); vertical-align: -1px; margin-right: 4px; }
.ds-sw.big { width: 18px; height: 18px; border-radius: 4px; vertical-align: -3px; margin: 0 2px; }
.ds-chiprow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; width: 100%; }
.ds-chiprow.sub { margin-top: 6px; padding-left: 4px; }
.ds-chip.zero:not(.active) { color: #9aa1ad; }
.ds-labels b.ds-sw { margin-right: 3px; }
.di-ms .ms { width: 100%; }
.p-other { font-size: 11px; color: var(--muted); margin-top: 3px; display: flex; align-items: center; gap: 4px; }
.ms label.ms-row, .edit-grid .ms label.ms-row { display: flex; flex-direction: row; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); text-align: left; }
.ms label.ms-head, .edit-grid .ms label.ms-head { display: flex; flex-direction: row; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.ms label.ms-head.on { color: var(--accent); }
.ms label.ms-row.zero { color: #9aa1ad; }
.edit-grid .ms input.ms-q { width: auto; }
.pal-bar input, .pal-bar select, .pal-bar .btn, .pal-bar label.btn { width: auto; flex: none; }
.pal-bar input[type=search] { width: 230px; }
.pal-samples .pal-sw { width: 12px; height: 12px; margin-right: 1px; }
.pe-samples { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.pe-s { display: inline-flex; align-items: center; gap: 1px; border: 1px solid var(--line); border-radius: 6px; padding: 1px 2px 1px 3px; }
.pe-s button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 2px; font-size: 12px; }
/* training queue */
.tr-queue { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 8px 0 12px; background: #fbfcfe; }
.tq-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 6px; }
.tq-sp { flex: 1; }
.tq-head select { width: auto; padding: 3px 6px; margin-left: 4px; }
.tq-table td { vertical-align: middle; }
.tq-prog { min-width: 220px; }
.tq-prog .pbar { margin: 2px 0; }
.tq-st { font-size: 12px; padding: 1px 7px; border-radius: 99px; background: #eef0f4; }
.tq-running .tq-st { background: #e3ecff; color: #2348b8; }
.tq-finished .tq-st { background: #dff3e6; color: #11632f; }
.tq-failed .tq-st { background: #fde2e2; color: #a12b2b; }
.tq-cancelled { opacity: .6; }
.tq-act { white-space: nowrap; text-align: right; }
.tq-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 2px 14px; margin: 8px 0 12px; }
#dsTrain[data-q]:not([data-q=""])::after { content: attr(data-q); margin-left: 6px; font-size: 11px; background: var(--accent); color: #fff; border-radius: 99px; padding: 1px 6px; }
.img-view { text-align: center; } .img-view img { max-width: 100%; max-height: 80vh; object-fit: contain; } .file-list img { cursor: zoom-in; }
.ad-ms .ms { width: 100%; min-width: 220px; }
body:not(.can-users) .users-only { display: none !important; }
/* Archive + Search by image: fixed page, own scrollbars for the left panel and the results */
#tab-archive.layout, #tab-search.layout { height: calc(100vh - var(--hdr, 120px)); overflow: hidden; align-items: stretch; box-sizing: border-box; }
#tab-archive .input-panel, #tab-search .input-panel { position: static; overflow-y: auto; max-height: 100%; }
#tab-archive .results, #tab-search .results { overflow-y: auto; height: 100%; padding-right: 6px; }
#tab-archive .results > .filter-bar, #tab-search .results > .res-filter { position: sticky; top: 0; z-index: 6; }
/* query area (search by image) */
.sq-area { margin-top: 10px; }
.sq-box { position: relative; display: inline-block; max-width: 100%; cursor: crosshair; user-select: none; touch-action: none; line-height: 0; }
.sq-box img { display: block; max-width: 100%; max-height: 320px; border-radius: 8px; }
.sq-rect { position: absolute; border: 2px solid #2f5bd3; background: rgba(47,91,211,.15); box-shadow: 0 0 0 9999px rgba(0,0,0,.35); border-radius: 2px; pointer-events: none; }
.sq-box { overflow: hidden; border-radius: 8px; }
#sqDrop.drop { padding: 14px; }
.res-filter #srQ { flex: 1 1 220px; }
.res-filter select#sPerPage { width: auto; flex: 0 0 auto; }
.ds-viewsel select { min-width: 240px; } .ds-chips { align-items: center; gap: 12px; }
.ds-viewsel { white-space: nowrap; }
.file-list .n { cursor: zoom-in; }
/* bulk import popup */
.im-box { width: 760px; max-height: 92vh; overflow-y: auto; }
.im-pane { display: flex; flex-direction: column; gap: 10px; }
.im-pane .lbl { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.im-pane input[type=text], .im-pane input[type=url] { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; color: var(--ink); }
.im-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.im-note { background: #f2f6ff; border: 1px solid #cdd9fb; color: #23356e; border-radius: 8px; padding: 9px 12px; font-size: 12px; line-height: 1.5; }
.im-mono { font-family: var(--mono); font-size: 11px; word-break: break-all; }
.im-mode { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.im-tabs { margin: 4px 0 4px; }
.card-img .link-badge { position: absolute; top: 6px; left: 6px; font-size: 10px; background: #1d2330; color: #fff; padding: 1px 6px; border-radius: 4px; z-index: 2; }
.im-mode label.check { display: flex; flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.im-mode label.check input { width: auto; margin: 0; flex: none; }
/* Dataset Manager → Search model popup */
.sm-box { width: 900px; }
.sm-active { font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sm-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sm-table th { text-align: left; font-size: 11px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.sm-table td { padding: 8px; border-bottom: 1px solid #eef0f4; vertical-align: top; }
.sm-table tr.on td { background: #f2f6ff; }
.sm-btns { white-space: nowrap; text-align: right; }
.sm-btns .btn { margin-left: 4px; }
.sm-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.sm-row select { padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; }
.sm-switch { flex-direction: row !important; align-items: center; gap: 8px; font-size: 14px !important; color: var(--ink) !important; }
.badge.ok { background: #e3f6e8; color: #1c7a3a; }
.badge.warn { background: #fff4d6; color: #8a5a00; }
.badge.muted { background: #f0f1f4; color: var(--muted); }
.badge:not(.ok):not(.warn):not(.muted):not(.review) { background: #eef2ff; color: #3446a8; }
/* score / balance sliders (v50): min score = the kept part from the handle to 100; balance = two shares */
input[type=range].rng-min, input[type=range].rng-bal { -webkit-appearance: none; appearance: none; height: 6px; border-radius: 99px;
  background: #dfe3ea; outline: none; padding: 0; margin: 8px 0; }
input[type=range].rng-min { background: linear-gradient(to right, #dfe3ea 0, #dfe3ea var(--p, 0%), var(--accent) var(--p, 0%), var(--accent) 100%); }
input[type=range].rng-bal { background: linear-gradient(to right, #7fa0e8 0, #7fa0e8 var(--p, 50%), #e6a96b var(--p, 50%), #e6a96b 100%); }
input[type=range].rng-min::-webkit-slider-thumb, input[type=range].rng-bal::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; border: 2px solid var(--accent); cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
input[type=range].rng-min::-moz-range-thumb, input[type=range].rng-bal::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 2px solid var(--accent); cursor: pointer; }
.rng-shares { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted, #667); margin-top: -2px; }
.rng-shares .a { color: #3d63c4; } .rng-shares .b { color: #b8702c; }
.rng-quick { display: inline-flex; gap: 3px; flex-wrap: wrap; }
.rng-quick button { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 2px 8px; font-size: 11px; cursor: pointer; color: var(--ink); }
.rng-quick button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.rf-score { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rf-score input[type=range] { width: 120px; }
.look-warn { background: #fff4d6; border: 1px solid #f0d58a; color: #7a5200; border-radius: 8px; padding: 7px 10px; font-size: 12px; }
.sys-faiss { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; } .sys-faiss h4 { margin: 0 0 6px; font-size: 14px; }
.yarn-box { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 10px; }
/* Maintenance menu (v53) */
.mt-wrap { position: relative; display: inline-block; }
.mt-menu { position: absolute; top: 110%; right: 0; z-index: 150; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.15); padding: 6px; min-width: 300px; max-height: 75vh; overflow-y: auto; }
.mt-head { font-size: 11px; color: var(--muted); padding: 4px 8px 6px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.mt-group { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 8px 2px; }
.mt-item { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 7px; font-size: 13px; cursor: pointer; color: var(--ink); }
.mt-item:hover { background: #f2f6ff; }
.mt-item.danger { color: #b42318; }
.mt-chip { font-size: 12px; background: #f2f6ff; border: 1px solid #cdd9fb; border-radius: 99px; padding: 3px 10px; margin-left: 8px;
  display: inline-flex; align-items: center; gap: 6px; max-width: 560px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Tools (v54): Make repeat · Get design data */
.tools-menu { left: 0; right: auto; min-width: 190px; }
.to-thumb { width: 100%; max-height: 160px; object-fit: cover; border-radius: 8px; margin-top: 8px; }
.to-h { font-size: 12px; font-weight: 600; color: var(--muted); margin: 12px 0 4px; }
.to-row { display: flex; align-items: center; gap: 6px; margin: 4px 0; font-size: 13px; flex-wrap: wrap; }
.to-row input[type=number] { width: 72px; }
.to-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.to-tabs button { border: 0; background: none; padding: 7px 12px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 13px; }
.to-tabs button.on { color: #1d4ed8; border-bottom-color: #1d4ed8; font-weight: 600; }
.to-tabs.small button { padding: 4px 8px; font-size: 12px; }
.to-count { font-size: 13px; color: var(--muted); margin: 4px 0 8px; }
.to-imgbox { max-height: 70vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; background: #fafafa; }
.to-imgbox img { display: block; max-width: 100%; }
.to-dd-top { display: flex; gap: 16px; align-items: flex-start; }
.to-dd-left { flex: 1; min-width: 0; }
.to-dd-graph { width: 170px; flex: none; }
.to-rep { width: 100%; border-radius: 6px; border: 1px solid var(--line); }
.to-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 6px; }
.to-table th, .to-table td { text-align: left; padding: 5px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.to-table th { font-weight: 600; color: var(--muted); font-size: 12px; }
.to-kv th { width: 110px; }
.to-pat { word-break: break-all; }
.to-table .sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(0,0,0,.25); vertical-align: -3px; }
.est { font-size: 11px; background: #fff4d6; color: #7a5200; padding: 1px 5px; border-radius: 4px; font-family: inherit; }
.to-dd-graph { overflow-x: auto; }
.mt-steps { margin: 6px 0 8px 18px; padding: 0; color: var(--muted); }
.ms-wrap { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.ms-wrap canvas { display: block; width: 100%; height: auto; cursor: crosshair; touch-action: none; }
.ms-wrap { position: relative; }
.ms-box { position: absolute; transform: translateX(-50%); display: flex; gap: 4px; align-items: center; background: #fff;
  border: 1.5px solid #e24b4a; border-radius: 8px; padding: 3px 5px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.ms-box input { width: 70px; height: 26px; padding: 0 4px; font-size: 13px; }
.ms-box select { width: auto; height: 26px; font-size: 12px; padding: 0 4px; }

/* v73: repeat read - tiling view */
.to-rep-click { cursor: zoom-in; }
.tl-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 10px; }
.tl-bar input[type=range] { width: 180px; vertical-align: middle; }
.tl-chk { display: inline-flex; align-items: center; gap: 4px; }
.tl-view { width: 100%; height: 68vh; border: 1px solid var(--line); border-radius: 6px;
  background-repeat: repeat; background-position: 0 0; }
