/* v32 back-office pages (shared by the admin and the shop admin websites) */
.kx-date { color: #6b7280; font-size: 13px; margin: -8px 0 12px; }
.kx-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; }
.kx-two.wide { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
@media (max-width: 1000px) { .kx-two.wide { grid-template-columns: 1fr; } }
.kx-more { float: right; font-size: 13px; font-weight: 400; }
.kx-note { font-size: 12px; margin-top: 4px; }
.kx-inline { width: auto; min-width: 0; padding: 3px 6px; font-size: 13px; margin-left: 8px; }
.kx-news { padding: 8px 0; border-top: 1px solid #eef0f3; }
.kx-news:first-of-type { border-top: 0; padding-top: 0; }

/* charts: one series, so one colour; text stays in text colours */
.kx-chart { position: relative; --series: #2a78d6; }
.kx-chart svg { width: 100%; height: auto; display: block; }
.kx-grid { stroke: #eceef2; stroke-width: 1; }
.kx-zero { stroke: #b6bcc7; stroke-width: 1; }
.kx-ax { font-size: 11px; fill: #6b7280; }
.kx-line { fill: none; stroke: var(--series); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.kx-dot { fill: var(--series); stroke: #fff; stroke-width: 2; }
.kx-hit { fill: transparent; }
.kx-hit:hover { fill: rgba(42, 120, 214, .07); }
.kx-tip { position: absolute; pointer-events: none; background: #1d2330; color: #fff; font-size: 12px; padding: 6px 9px; border-radius: 6px; white-space: nowrap; z-index: 5; }
.kx-bars { display: grid; gap: 10px; }
.kx-barrow { display: grid; grid-template-columns: minmax(90px, 30%) 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.kx-bname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kx-btrack { display: flex; height: 14px; }
.kx-bpos, .kx-bneg { flex: 1; display: flex; }
.kx-bneg { justify-content: flex-end; border-right: 1px solid #b6bcc7; }
.kx-bars.two .kx-bpos { border-left: 0; }
.kx-bpos i { display: block; height: 100%; background: #2a78d6; border-radius: 0 4px 4px 0; min-width: 0; }
.kx-bneg i { display: block; height: 100%; background: #c0392b; border-radius: 4px 0 0 4px; }
.kx-bval { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 96px; text-align: right; }

.kx-risk { display: inline-block; min-width: 34px; text-align: center; padding: 2px 8px; border-radius: 6px; font-weight: 700; font-size: 13px; background: #e7f6ec; color: #116a31; }
.kx-risk.r1 { background: #fff4d6; color: #7a5200; }
.kx-risk.r2 { background: #ffe3d1; color: #9a3a00; }
.kx-risk.r3 { background: #fbd5d5; color: #8f1d1d; }
.kx-alert { border-left: 4px solid #f59e0b; padding: 8px 12px; margin: 8px 0; background: #fffaf0; border-radius: 0 6px 6px 0; }
.kx-alert.critical { border-left-color: #e5484d; background: #fff5f5; }
.kx-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #e0e7ff; color: #2b3a8f; margin-left: 6px; vertical-align: middle; }
.kx-tag.warn { background: #ffe3d1; color: #9a3a00; }
.kx-search { min-width: 220px; }

.adm table.t td.act.wide { min-width: 205px; max-width: 420px; }
/* more pages in the menu: a little tighter so they fit on a laptop screen */
#nav a { padding: 7px 22px; font-size: 14px; }
#nav { scrollbar-width: thin; scrollbar-color: #3a3f4b transparent; }

/* v33: a setting with its explanation underneath */
.kx-field { margin: 0 0 14px; flex: 1; min-width: 0; }
.kx-field > label { margin-bottom: 4px; }
.hint { font-size: 12.5px; color: #5b6472; line-height: 1.45; margin: 2px 0 10px; max-width: 760px; }
.kx-set { border: 0; padding: 0; margin: 12px 0 0; min-width: 0; }
.kx-set[disabled] { opacity: .6; }
.kx-switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 15px; }
.kx-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.kx-slider { flex: none; width: 46px; height: 26px; border-radius: 26px; background: #c3c9d4; position: relative; transition: background .15s; }
.kx-slider::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.kx-switch input:checked + .kx-slider { background: #1c9b4b; }
.kx-switch input:checked + .kx-slider::after { left: 23px; }
.kx-switch input:focus-visible + .kx-slider { outline: 2px solid #2a78d6; outline-offset: 2px; }
.kx-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }

/* phone / tablet: the menu is a drawer, tables scroll sideways inside their panel, dialogs use the whole width */
.kx-menu { display: none; flex: none; width: 42px; height: 42px; border: 1px solid #d5d9e0; border-radius: 8px; background: #fff; padding: 10px 9px; cursor: pointer; flex-direction: column; justify-content: space-between; }
.kx-menu span { display: block; height: 3px; border-radius: 2px; background: #1d2330; }
.kx-backdrop { display: none; }
.adm .panel { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 1000px) {
  #appView { display: block !important; }
  .adm .side { position: fixed !important; z-index: 60; top: 0; left: 0; bottom: 0; width: 264px; height: 100% !important; transform: translateX(-105%); transition: transform .2s; overflow-y: auto; display: flex; flex-direction: column; }
  .adm #nav { display: block !important; flex: 1; overflow-y: auto; }
  body.nav-open .side { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.5); }
  body.nav-open .kx-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 55; }
  .kx-menu { display: flex; }
  .adm .content { padding: 14px 14px 40px; min-width: 0; }
  .topline { gap: 12px; align-items: center; }
  .topline h1 { font-size: 20px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cards { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important; gap: 10px; }
  .kx-two, .kx-two.wide { grid-template-columns: 1fr; }
  .adm table.t td.act, .adm table.t td.act.wide { min-width: 250px; }
}
@media (max-width: 640px) {
  .adm .content { padding: 10px 10px 40px; }
  .adm .panel { padding: 12px; border-radius: 8px; }
  .toolbar { gap: 8px; }
  .toolbar > label, .toolbar > .kx-search { flex: 1 1 46%; min-width: 0; }
  .toolbar > label select, .toolbar > label input { width: 100%; min-width: 0; }
  .toolbar .btn { flex: 1 1 auto; }
  .cards { grid-template-columns: 1fr 1fr !important; }
  .card .v { font-size: 20px; }
  .adm input, .adm select, .adm textarea { font-size: 16px; }             /* iPhone does not zoom in on 16px fields */
  .modal { width: calc(100vw - 16px) !important; max-width: none !important; max-height: calc(100vh - 16px); margin: 8px; }
  .modal .row { flex-wrap: wrap; }
  .row { flex-wrap: wrap; }
  .kx-barrow { grid-template-columns: 1fr auto; }
  .kx-barrow .kx-btrack { grid-column: 1 / -1; order: 3; }
  .login-card { width: calc(100vw - 24px); }
  .kx-tabs .btn { flex: 1 1 45%; }
}

/* v34 */
.kx-owner { font-size: 12px; color: #6b7280; font-weight: 400; white-space: normal; margin-top: 1px; }
.kx-pre { background: #f6f7f9; border: 1px solid #e3e6ea; border-radius: 6px; padding: 10px; font-size: 12px; white-space: pre-wrap; word-break: break-word; max-height: 45vh; overflow: auto; }

/* v35 */
.kx-follow { display: flex; gap: 8px; align-items: center; font-weight: 600; margin: 2px 0; }
.kx-grp { border-top: 1px solid #eceef1; margin-top: 8px; }
fieldset.kx-set[disabled] { opacity: .55; }
