/* Customise-scanner, account and support pages (Design v3). */

/* ---------- Shared bits ---------- */
.card-ico.ind-crit { color: var(--critical); background: var(--critical-bg); border-color: transparent; }
.card-ico.st-ok { color: var(--ok); background: var(--ok-bg); border-color: transparent; }
.field-label { font-size: 12.5px; color: var(--text-2); font-weight: 650; margin: 0 0 8px; }

/* Toggle switch (submit button styled as a switch) */
.yr-tog { position: relative; width: 38px; height: 22px; flex: none; padding: 0; border: 0; border-radius: 999px; background: var(--surface-3); cursor: pointer; transition: background .15s; }
.yr-tog::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #74747d; transition: left .15s, background .15s; }
.yr-tog[aria-pressed="true"] { background: var(--accent); }
.yr-tog[aria-pressed="true"]::after { left: 19px; background: #fff; }

/* ---------- YARA rules ---------- */
.yr-grid { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; align-items: start; }
.yr-sets { padding: 10px; position: sticky; top: 16px; }
.yr-sets-h { display: flex; align-items: baseline; gap: 10px; padding: 10px 10px 12px; }
.yr-sets-h h3 { font-size: 15.5px; flex: 1; }
.yr-sets-h .muted { font-size: 12.5px; }
.yr-list { display: flex; flex-direction: column; gap: 2px; }
.yr-set { display: flex; align-items: center; gap: 12px; padding: 11px 10px; border-radius: var(--r-sm); border: 1px solid transparent; cursor: pointer; transition: background .12s, border-color .12s; }
.yr-set:hover { background: rgba(255, 255, 255, .03); }
.yr-set.on { background: var(--surface-hi); border-color: var(--hairline-2); }
.yr-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-hi); border: 1px solid var(--hairline-2); color: var(--text-2); }
.yr-set.on .yr-ico { color: #fff; }
.yr-ico .i { width: 16px; height: 16px; }
.yr-set-t { flex: 1; min-width: 0; color: inherit; }
.yr-set-t b { display: block; font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yr-set-t small { display: block; font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yr-tog-f { margin: 0; display: flex; }
.yr-empty { padding: 22px 12px; color: var(--text-2); font-size: 13px; text-align: center; }
.yr-empty b { display: block; color: var(--text); font-size: 14px; margin-bottom: 4px; }
.yr-usage { margin: 10px 10px 6px; padding-top: 14px; border-top: 1px solid var(--hairline); }
.yr-usage-t { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--text-3); margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.yr-bar, .tm-bar { height: 6px; border-radius: 9px; background: var(--surface-3); overflow: hidden; }
.yr-bar span, .tm-bar span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }

.yr-ed { padding: 22px; min-width: 0; scroll-margin-top: 16px; }
.yr-ed-h { margin-bottom: 16px; }
.yr-ed-h h3 { font-size: 17px; margin-bottom: 4px; }
.yr-ed-h p { font-size: 13px; margin: 0; }
.yr-editor { display: grid; grid-template-columns: auto minmax(0, 1fr); border: 1px solid var(--hairline-2); border-radius: var(--r-sm); background: #08080a; overflow: hidden; transition: border-color .12s, box-shadow .12s; }
.yr-editor:focus-within { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(59, 124, 246, .18); }
.yr-gutter, .yr-code { font-family: var(--mono); font-size: 13px; line-height: 1.7; tab-size: 4; }
.yr-gutter { margin: 0; padding: 14px 12px 14px 16px; min-width: 46px; text-align: right; color: #3f3f46; background: #060607; border-right: 1px solid var(--hairline); overflow: hidden; user-select: none; white-space: pre; }
textarea.yr-code { display: block; width: 100%; min-height: 380px; max-height: 70vh; margin: 0; padding: 14px 18px; border: 0; border-radius: 0; background: transparent; color: #e8e8ec; resize: vertical; white-space: pre; overflow: auto; }
textarea.yr-code:focus { outline: none; border: 0; box-shadow: none; }
.yr-result { display: flex; align-items: flex-start; gap: 12px; margin-top: 14px; padding: 12px 16px; border-radius: var(--r-sm); font-size: 13.5px; }
.yr-result .i { margin-top: 1px; }
.yr-result > div { min-width: 0; flex: 1; }
.yr-result.good { color: var(--ok); background: var(--ok-bg); border: 1px solid rgba(61, 220, 151, .25); }
.yr-result.good span { color: var(--text-2); }
.yr-result.bad { color: var(--critical); background: var(--critical-bg); border: 1px solid var(--critical-br); }
.yr-result .yara-err { color: var(--text); }
.yr-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.yr-check { display: inline-flex; align-items: center; gap: 9px; margin: 0; font-size: 13.5px; font-weight: 600; color: var(--text-2); cursor: pointer; }
.yr-check input { width: 16px; height: 16px; accent-color: var(--accent); }
.yr-del { color: var(--critical); }
.yr-del:hover { color: var(--critical); background: var(--critical-bg); }

/* ---------- Custom strings and hashes ---------- */
.ind-stats, .tm-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.ind-stat, .tm-stat { display: flex; align-items: center; gap: 14px; padding: 16px 18px; flex-wrap: wrap; }
.ind-stat b, .tm-stat b { display: block; font: 600 24px/1.1 var(--display); letter-spacing: -.01em; }
.ind-stat b small, .tm-stat b small { font: 500 13px var(--sans); color: var(--text-3); }
.ind-stat span:not(.card-ico), .tm-stat > div > span { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 3px; }
.tm-stat > div > span::first-letter { text-transform: uppercase; }
.tm-stat .tm-bar { flex-basis: 100%; }

.ind-add { margin-bottom: 16px; }
.ind-add summary { display: flex; align-items: center; gap: 14px; padding: 16px 20px; cursor: pointer; list-style: none; border-radius: var(--r); }
.ind-add summary::-webkit-details-marker { display: none; }
.ind-add summary:hover { background: rgba(255, 255, 255, .02); }
.ind-add-t { flex: 1; min-width: 0; }
.ind-add-t b { display: block; font: 600 15px var(--display); }
.ind-add-t small { display: block; font-size: 12.5px; color: var(--text-3); }
.ind-chev { color: var(--text-3); transition: transform .15s; }
.ind-add[open] .ind-chev { transform: rotate(180deg); }
.ind-add[open] summary { border-bottom: 1px solid var(--hairline); border-radius: var(--r) var(--r) 0 0; }
.ind-add-b { padding: 18px 20px 20px; }
.ind-add-b > p { font-size: 13px; margin-bottom: 14px; }
.ind-add-row { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.ind-add-row .field { margin: 0; }
.ind-add-row .ind-grow { flex: 1; min-width: 200px; }

.ind-table { overflow: hidden; }
.ind-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--hairline); }
.ind-search { display: flex; align-items: center; gap: 8px; padding: 0 14px; height: 36px; border-radius: 999px; border: 1px solid var(--hairline-2); background: #08080a; color: var(--text-3); min-width: 220px; }
.ind-search:focus-within { border-color: var(--accent-2); }
.ind-search .i { width: 15px; height: 15px; }
.ind-search input { border: 0; background: transparent; padding: 0; height: 100%; font-size: 13px; box-shadow: none; }
.ind-search input:focus { box-shadow: none; }
.ind-kind { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 650; color: var(--text-2); white-space: nowrap; }
.ind-kind .i { width: 15px; height: 15px; color: var(--accent-2); }
.ind-val { word-break: break-all; font-size: 12.5px; color: var(--text); }
.ind-rows input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--accent); }
.ind-none { padding: 26px; text-align: center; color: var(--text-2); font-size: 13px; }
.ind-foot { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--hairline); font-size: 12.5px; }

/* ---------- Branding ---------- */
.brp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 500px); gap: 18px; align-items: start; }
.brp-form { padding: 22px; }
.brp-presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.brp-preset { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 6px; border-radius: var(--r-sm); border: 1px solid var(--hairline); background: transparent; color: var(--text-2); font: inherit; font-weight: 650; font-size: 12.5px; cursor: pointer; transition: border-color .12s, color .12s, background .12s; }
.brp-preset:hover { color: var(--text); border-color: var(--hairline-2); }
.brp-preset i { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--hairline-2); }
.brp-preset.on { border-color: #fff; color: var(--text); background: var(--surface-hi); }
.brp-colours { display: grid; gap: 8px; }
.brp-col { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: var(--r-sm); border: 1px solid var(--hairline); }
.brp-col input[type=color] { width: 36px; height: 36px; flex: none; padding: 0; border: 0; background: transparent; border-radius: 10px; cursor: pointer; }
.brp-col input[type=color]::-webkit-color-swatch-wrapper { padding: 0; }
.brp-col input[type=color]::-webkit-color-swatch { border: 1px solid var(--hairline-2); border-radius: 10px; }
.brp-col input[type=color]::-moz-color-swatch { border: 1px solid var(--hairline-2); border-radius: 10px; }
.brp-col input[type=color]:disabled { cursor: default; }
.brp-col-t { flex: 1; min-width: 0; }
.brp-col-t b { display: block; font-size: 13.5px; }
.brp-col-t small { display: block; font-size: 12px; color: var(--text-3); }
.brp-col code { font-family: var(--mono); font-size: 12px; color: var(--text-2); }
.brp-clear { width: 28px; height: 28px; flex: none; display: grid; place-items: center; padding: 0; border-radius: 8px; border: 1px solid var(--hairline); background: transparent; color: var(--text-3); cursor: pointer; }
.brp-clear:hover { color: var(--text); border-color: var(--hairline-2); }
.brp-clear .i { width: 13px; height: 13px; }
.brp-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.brp-stage { padding: 20px; position: sticky; top: 16px; }
.brp-stage-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.brp-stage-h h3 { font-size: 15.5px; }
.brp-wrap { display: grid; place-items: center; padding: 26px 12px; border-radius: var(--r-sm); border: 1px solid var(--hairline); background: repeating-linear-gradient(45deg, #0a0a0c 0 12px, #0c0c0e 12px 24px); }
#brp-canvas { display: block; width: 420px; max-width: 100%; height: auto; aspect-ratio: 420 / 520; border-radius: 8px; box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .9); }
.brp-cap { margin: 12px 2px 0; font-size: 12.5px; color: var(--text-3); }

/* ---------- Support list ---------- */
.tkx-callout { border-radius: var(--r); border-color: var(--warning-br); background: var(--warning-bg); }
.tkx-callout .tk-callout-dot { background: var(--warning); box-shadow: 0 0 0 4px var(--warning-bg); }
.tkx-callout .tk-callout-go { color: var(--warning); }
.tkx-tabs { border-bottom: 0; gap: 6px; margin: 18px 0 14px; }
.tkx-tabs .tk-tab { border: 1px solid var(--hairline-2); border-radius: 999px; padding: 7px 14px; margin: 0; font-size: 13px; }
.tkx-tabs .tk-tab.on { background: var(--surface-3); border-color: transparent; color: var(--text); }
.tkx-tabs .tk-tab .n { background: rgba(255, 255, 255, .06); }
.tkx-list { background: var(--surface); }
.tk-row.tkx-row { grid-template-columns: auto minmax(0, 1fr) auto; gap: 16px; padding: 16px 20px; }
.tkx-av { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: none; font: 600 13px var(--display); background: var(--surface-3); border: 1px solid var(--hairline-2); color: var(--text); }
.tkx-av.staff { background: #fff; color: #000000; border-color: #fff; }

/* New ticket */
.snx-cat span { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: center; padding: 13px 14px; }
.snx-cat span .i { grid-row: span 2; width: 18px; height: 18px; color: var(--text-3); }
.snx-cat input:checked + span { border-color: #fff; }
.snx-cat input:checked + span .i { color: #fff; }
.snx-actions { justify-content: flex-end; gap: 10px; }

/* ---------- Ticket chat ---------- */
.tkx-online { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); margin-right: 7px; vertical-align: 1px; }
.chat-sys { margin: 12px 0; }
.chat-sys > span, .chat-sys { align-self: center; }
.chat-sys { padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .035); border: 1px solid var(--hairline); width: max-content; max-width: 100%; }
.chat-day span { padding: 0 2px; }
.chat-compose.tkx-compose { border-top: 0; padding: 10px 18px 18px; background: transparent; }
.tkx-bar { display: flex; align-items: flex-end; gap: 10px; padding: 7px 7px 7px 18px; border-radius: 24px; border: 1px solid var(--hairline-2); background: #08080a; transition: border-color .12s, box-shadow .12s; }
.tkx-bar:focus-within { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(59, 124, 246, .16); }
.tkx-bar textarea { flex: 1; min-width: 0; min-height: 24px; max-height: 200px; margin: 0; padding: 9px 0; border: 0; border-radius: 0; background: transparent; color: var(--text); font: inherit; font-size: 14px; line-height: 1.5; resize: none; overflow-y: auto; box-shadow: none; }
.tkx-bar textarea:focus { outline: none; box-shadow: none; border: 0; }
.tkx-send { width: 40px; height: 40px; flex: none; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: #fff; color: #000000; cursor: pointer; transition: background .12s, transform .04s; }
.tkx-send:hover { background: #e6e6e9; }
.tkx-send:active { transform: translateY(1px); }
.tkx-send .i { width: 17px; height: 17px; }
.tkx-reopen { flex: none; margin: 2px 2px 2px 0; }
.tkx-hint { margin: 8px 6px 0; font-size: 12px; color: var(--text-3); }

/* ---------- Settings, security, team ---------- */
.st-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: -6px 0 20px; }
.st-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--hairline-2); color: var(--text-2); font-weight: 650; font-size: 13px; }
.st-tabs a .i { width: 15px; height: 15px; }
.st-tabs a:hover { color: var(--text); }
.st-tabs a.on { background: var(--surface-3); border-color: transparent; color: var(--text); }
.st-grid { columns: 2; column-gap: 16px; }
.st-grid > .card { break-inside: avoid; margin-bottom: 16px; }
.st-narrow { max-width: 640px; }
.st-card { padding: 22px; }
.st-h { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.st-h > div { min-width: 0; }
.st-h h3 { font-size: 15.5px; margin: 2px 0 4px; }
.st-h p { margin: 0; font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.st-h p b { color: var(--text); }
.st-inline { display: flex; gap: 10px; align-items: center; }
.st-inline .input { flex: 1; min-width: 0; }
.st-btns { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 12px; }
.st-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.st-two .field { margin-bottom: 0; }
.st-danger { border-color: var(--critical-br); }
.st-danger .card-ico { color: var(--critical); background: var(--critical-bg); border-color: transparent; }
.st-code { font-family: var(--mono); letter-spacing: .2em; text-align: center; }
.st-row { padding: 12px 0 0; border-top: 1px solid var(--hairline); font-size: 13.5px; color: var(--text-2); }
.st-row b { color: var(--text); }
.st-options { display: grid; gap: 10px; }
.st-opt { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: var(--r-sm); border: 1px solid var(--hairline-2); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .12s, background .12s; }
.st-opt:hover { border-color: #3c3c44; background: rgba(255, 255, 255, .02); }
.st-opt > span:not(.card-ico) { flex: 1; min-width: 0; }
.st-opt b { display: block; font-size: 14px; }
.st-opt small { display: block; font-size: 12.5px; color: var(--text-3); }
.st-go { color: var(--text-3); }
.st-codes .codes .c { background: #08080a; border-radius: var(--r-xs); }
.tm-who { display: inline-flex; align-items: center; gap: 10px; }
.tm-av { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; font: 600 12px var(--display); background: var(--surface-3); border: 1px solid var(--hairline-2); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .yr-grid, .brp-grid { grid-template-columns: minmax(0, 1fr); }
  .yr-sets, .brp-stage { position: static; }
}
@media (max-width: 860px) {
  .st-grid { columns: 1; }
}
@media (max-width: 640px) {
  .ind-stats, .tm-stats { gap: 8px; }
  .ind-stat, .tm-stat { padding: 12px; gap: 8px; }
  .ind-stat .card-ico, .tm-stat .card-ico { display: none; }
  .ind-stat b, .tm-stat b { font-size: 19px; }
  .ind-rows { min-width: 620px; }
  .brp-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ind-search { min-width: 0; flex: 1; }
  .st-inline { flex-wrap: wrap; }
  .st-inline .input { flex-basis: 100%; }
  .st-inline .btn { margin-left: auto; }
  .st-two { grid-template-columns: minmax(0, 1fr); }
  .st-two .field { margin-bottom: 14px; }
  .tk-row.tkx-row { grid-template-columns: auto minmax(0, 1fr); }
  .tkx-row .tk-side { grid-column: 2; }
  .yr-actions .spacer { display: none; }
  textarea.yr-code { min-height: 280px; }
}
