/* CreeperPanel visualstyle.md tokens; ch-web-svelte visualstyles.md component rules.
   Vendor Adminer remains unchanged. All fonts and branding are served locally. */
@font-face {
  font-family: Inter;
  src: url("/assets/fonts/Inter_normal_100-900_latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Centra No2";
  src: url("/assets/fonts/CentraNo2-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --page: #1e2328;
  --panel: #262d33;
  --raised: #333b43;
  --control: #23292f;
  --line: #2b3138;
  --deep: #171c21;
  --stroke: #13171c;
  --button: #3b454e;
  --green: #12f21d;
  --blue: #0e87fb;
  --yellow: #f0db07;
  --pink: #d10056;
  --text: #f0f0f5;
  --muted: #98a1a9;
  --sidebar: 272px;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--page);
  color: var(--text);
  font:
    400 14px/20px Inter,
    sans-serif;
  letter-spacing: -0.02em;
}
body {
  padding: 0;
}
a,
a:visited {
  color: var(--text);
  text-decoration: none;
}
a:hover {
  color: var(--green);
  text-decoration: none;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
#content {
  margin: 0 0 0 var(--sidebar);
  padding: 32px 40px 48px;
  min-height: 100vh;
  max-width: none;
}
#breadcrumb {
  margin: 0 100px 24px 0;
  padding: 0;
  background: none;
  color: var(--muted);
  font:
    400 12px/16px Inter,
    sans-serif;
}
#breadcrumb a {
  color: var(--muted);
}
#breadcrumb a:hover {
  color: var(--text);
}
h2,
h3,
h4 {
  font-family: "Centra No2", Inter, sans-serif;
  color: var(--text);
  font-style: normal;
  font-weight: 700;
}
#content h2 {
  font-size: 32px;
  line-height: 40px;
  letter-spacing: -1.28px;
  margin: 0 0 24px;
  padding: 0;
  border: 0;
  background: none;
}
h3 {
  font-size: 20px;
  line-height: 28px;
  letter-spacing: -0.8px;
  margin: 32px 0 16px;
}
h4 {
  font-size: 16px;
  line-height: 24px;
  margin: 24px 0 12px;
}
#menu {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  height: 100vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  background: var(--deep);
  border-right: 1px solid var(--stroke);
  font:
    400 14px/20px Inter,
    sans-serif;
}
#menu h1 {
  order: -2;
  margin: 0;
  padding: 32px 24px 24px;
  background: none;
  border-bottom: 1px solid var(--line);
  font:
    700 16px/24px "Centra No2",
    sans-serif;
}
#menu #h1 {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  color: var(--text);
  font-style: normal;
  letter-spacing: -0.64px;
}
.ch-logo {
  width: 160px;
  height: 40px;
  object-fit: contain;
  object-position: left center;
}
.version,
#lang {
  display: none !important;
}
.ch-nav-label {
  order: -1;
  position: static;
  padding: 24px 24px 12px;
  color: var(--muted);
  font:
    500 12px/16px Inter,
    sans-serif;
  letter-spacing: 0.96px;
}
#menu > form {
  padding: 0 24px 24px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
#menu #dbs {
  margin: 0;
}
#menu select {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 40px;
  margin-top: 8px;
  background: var(--control);
  border: 1px solid var(--line);
  font-size: 14px;
  color: var(--text);
}
#menu > .links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 0 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
#menu > .links a {
  padding: 8px;
  border-radius: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
#menu > .links a:hover {
  background: var(--control);
  color: var(--text);
}
#tables {
  list-style: none;
  margin: 16px 12px 24px;
  padding: 0;
  border: 0;
}
#tables li {
  margin: 4px 0;
  padding: 0;
  border: 0;
}
#tables a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 500;
  line-height: 20px;
}
#tables a svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--muted);
}
#tables a:hover {
  color: var(--text);
  background: var(--control);
}
#tables a.active {
  background: var(--panel);
  border-color: var(--line);
  color: var(--text);
}
#tables a.active svg {
  color: var(--green);
}
.ch-connection {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: auto 24px 0;
  padding: 24px 0 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}
.ch-status-ring {
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--green);
  border-radius: 100px;
  background: var(--stroke);
  margin-top: 4px;
  flex-shrink: 0;
}
.ch-connection strong {
  display: block;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  margin-top: 4px;
}
.ch-sidebar-footer {
  padding: 0 24px 24px;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}
.ch-tabs {
  display: flex;
  align-items: center;
  gap: 24px;
  overflow-x: auto;
  white-space: nowrap;
  margin: 0 0 32px;
  border-bottom: 1px solid var(--line);
}
.ch-tabs a {
  padding: 0 0 12px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}
.ch-tabs a:hover {
  color: var(--text);
}
.ch-tabs a.active {
  color: var(--text);
  border-color: var(--green);
}
#content table {
  width: 100%;
  border: 1px solid var(--line);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  background: var(--control);
  color: var(--text);
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
  overflow: hidden;
}
#content th,
#content td {
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  color: var(--text);
  background: transparent;
  text-align: left;
}
#content th {
  background: var(--deep) !important;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0.96px;
  text-transform: uppercase;
}
#content th a {
  color: var(--muted);
}
#content tr:last-child td {
  border-bottom: 0;
}
#content tr:nth-child(even) td {
  background: var(--panel);
}
#content tr:hover td {
  background: var(--raised);
}
#content td a {
  color: var(--text);
}
#content td a:hover {
  color: var(--green);
}
#content table.layout {
  width: auto;
  overflow: visible;
  border: 0;
  background: transparent;
  border-radius: 0;
}
#content table.layout th,
#content table.layout td {
  background: none !important;
  border: 0;
  padding: 8px 16px 8px 0;
}
input,
select,
textarea,
button {
  font:
    400 14px/20px Inter,
    sans-serif;
  color: var(--text);
  border: 1px solid var(--line);
  background: var(--control);
  border-radius: 4px;
  padding: 8px 12px;
  box-shadow: none;
  transition:
    border-color 0.15s ease-in-out,
    background-color 0.15s ease-in-out;
}
input:hover,
select:hover,
textarea:hover {
  border-color: var(--button);
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--green);
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--green);
  width: 16px;
  height: 16px;
  vertical-align: middle;
  padding: 0;
  margin-right: 8px;
}
input[type="number"] {
  width: 80px;
}
input[type="file"] {
  padding: 8px;
}
textarea {
  max-width: 100%;
  min-height: 160px;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
}
input[type="submit"],
button,
.ch-button {
  font:
    800 12px/16px Inter,
    sans-serif;
  letter-spacing: -0.48px;
  text-transform: uppercase;
  min-height: 32px;
  padding: 8px 16px;
  background: var(--button);
  border: 1px solid transparent;
  color: var(--text);
  cursor: pointer;
  border-radius: 4px;
  box-shadow: none;
}
input[type="submit"]:hover,
button:hover {
  background: var(--raised);
  color: var(--text);
}
input[type="submit"][value="Select"],
input[type="submit"][value="Execute"],
input[type="submit"][value="Save"],
.ch-button {
  background: var(--green);
  color: var(--stroke);
}
input[type="submit"][value="Select"]:hover,
input[type="submit"][value="Execute"]:hover,
input[type="submit"][value="Save"]:hover,
.ch-button:hover {
  filter: brightness(0.8);
  color: var(--stroke);
}
button:disabled,
input:disabled {
  opacity: 0.35;
  cursor: default;
  filter: none;
}
input[type="submit"][value="Delete"],
input[type="submit"][value="Drop"],
input[type="submit"][value="Truncate"] {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
}
input[type="submit"][value="Delete"]:hover,
input[type="submit"][value="Drop"]:hover,
input[type="submit"][value="Truncate"]:hover {
  color: var(--pink);
  border-color: var(--pink);
}
fieldset {
  margin: 0 16px 24px 0;
  padding: 12px 16px 12px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}
legend {
  font:
    500 12px/16px Inter,
    sans-serif;
  color: var(--muted);
  padding: 0;
  margin-bottom: 4px;
}
fieldset fieldset {
  margin: 0;
  padding: 8px;
  border: 0;
}
#fieldset-select,
#fieldset-search,
#fieldset-sort {
  max-width: 100%;
}
.sqlarea,
pre {
  max-width: 100%;
  overflow: auto;
}
.sqlarea,
pre.jush-sql {
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--deep);
  font:
    13px/20px Consolas,
    monospace;
  color: var(--muted);
}
code {
  font-family: Consolas, monospace;
}
.jush {
  color: var(--text);
  background: var(--deep);
}
.jush a {
  color: var(--blue);
}
.jush-apo {
  color: var(--green);
}
.jush-num {
  color: var(--yellow);
}
.jush a.jush-sql {
  color: var(--blue);
}
#content > .links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0 0 24px;
  padding: 0;
  background: none;
  border: 0;
}
#content > .links a {
  color: var(--muted);
  font-weight: 500;
}
#content > .links a:hover {
  color: var(--text);
}
.message,
.error {
  padding: 16px;
  margin: 0 0 24px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  border-radius: 4px;
  background: var(--control);
  color: var(--text);
}
.error {
  border-left-color: var(--pink);
}
.error a {
  color: var(--text);
}
#logout {
  background: var(--button);
  color: var(--text);
}
.logout {
  background: none !important;
  color: var(--muted);
  position: absolute;
  top: 24px;
  right: 32px;
  border: 0 !important;
  padding: 0 !important;
  font-size: 12px;
}
.logout form {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logout p {
  margin: 0;
}
#foot {
  margin: 0;
  background: none;
}
.foot .logout {
  background: var(--page);
}
#help {
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
}
.js .column {
  background: var(--control);
}
.footer {
  color: var(--muted);
}
.ch-welcome {
  max-width: 640px;
  margin-top: 32px;
  padding: 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.ch-welcome h2 {
  font-size: 24px !important;
  line-height: 32px !important;
  letter-spacing: -0.96px !important;
}
.ch-welcome p {
  color: var(--muted);
  margin: 16px 0 24px;
}
.ch-button {
  display: inline-block;
}
.handoff-error main {
  max-width: 640px;
  margin: 12vh auto;
  padding: 32px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.handoff-error img {
  width: 160px;
}
.handoff-error h1 {
  font:
    700 24px/32px "Centra No2",
    sans-serif;
}
.handoff-error p {
  color: var(--muted);
}
@media (max-width: 1000px) {
  :root {
    --sidebar: 240px;
  }
  #content {
    padding: 24px;
  }
  #content table {
    font-size: 12px;
  }
  #content th,
  #content td {
    padding: 12px;
  }
  .ch-tabs {
    gap: 16px;
  }
}
@media (max-width: 720px) {
  #menu {
    position: relative;
    width: 100%;
    height: auto;
  }
  #menu h1 {
    padding: 24px;
  }
  #menu #h1 {
    flex-direction: row;
    align-items: center;
    gap: 24px;
  }
  .ch-logo {
    width: 128px;
    height: 32px;
  }
  .ch-nav-label,
  .ch-connection,
  .ch-sidebar-footer {
    display: none;
  }
  #menu > .links {
    grid-template-columns: repeat(4, 1fr);
    border-bottom: 0;
  }
  #menu > form {
    padding-bottom: 16px;
  }
  #tables {
    display: flex;
    overflow: auto;
    margin: 0 12px 16px;
    flex-shrink: 0;
  }
  #tables a {
    white-space: nowrap;
  }
  #content {
    margin: 0;
    padding: 24px 16px;
    overflow-x: auto;
  }
  #content h2 {
    font-size: 24px;
    line-height: 32px;
    letter-spacing: -0.96px;
  }
  #breadcrumb {
    margin-right: 0;
  }
  .logout {
    position: static;
    margin: 16px !important;
  }
  .ch-tabs {
    gap: 24px;
  }
  #content table {
    min-width: 560px;
  }
  #content table.layout {
    min-width: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* Remove the upstream positioning and alternating blue selection surfaces. */
#breadcrumb {
  position: static;
  left: auto;
  top: auto;
  width: auto;
}
#content tr {
  background: transparent !important;
}
#content tbody th {
  text-transform: none;
  letter-spacing: -0.02em;
  font:
    500 14px/20px Inter,
    sans-serif;
  color: var(--text);
  background: transparent !important;
}
#tables li a {
  background: transparent !important;
  box-shadow: none;
}
#tables li a:hover {
  background: var(--control) !important;
}
#tables li a.active {
  background: var(--panel) !important;
}
#content .footer {
  margin: 16px 0 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--control);
  box-shadow: none;
}
#content .footer > div {
  padding: 16px;
  background: transparent !important;
  box-shadow: none;
}
#content .footer fieldset {
  margin-bottom: 0;
}
.logout,
.logout p,
.logout form {
  background: transparent !important;
  box-shadow: none !important;
}

/* Inline diagnostic names are text, not highlighted code badges. */
#content code {
  background: transparent !important;
  border: 0;
  box-shadow: none;
}
#content code.jush-sqlstatus,
#content code.jush-sqlset {
  font:
    400 14px/20px Inter,
    sans-serif;
  color: var(--text);
}
#content code.jush-sqlstatus a,
#content code.jush-sqlset a {
  background: transparent !important;
  color: inherit;
}
/* One row colour, including row labels, sticky selection cells, and hover. */
#content table tbody tr {
  --row-bg: var(--control);
}
#content table tbody tr:nth-child(even) {
  --row-bg: var(--panel);
}
#content table tbody tr:hover,
#content table tbody tr.checked {
  --row-bg: var(--raised);
}
#content table tbody tr > th,
#content table tbody tr > td {
  background: var(--row-bg) !important;
}
#content table thead tr > th,
#content table thead tr > td {
  background: var(--deep) !important;
}
#content table.layout tr > th,
#content table.layout tr > td {
  background: transparent !important;
}
/* Compact account context and a secondary sign-out action. */
p.logout {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0;
  min-height: 40px;
  top: 24px;
  right: 40px;
}
p.logout > span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
  font:
    400 12px/16px Inter,
    sans-serif;
}
p.logout small {
  font:
    400 12px/16px Inter,
    sans-serif;
  color: var(--muted);
}
p.logout strong {
  font:
    500 12px/16px Inter,
    sans-serif;
  color: var(--text);
}
p.logout #logout {
  height: 32px;
  min-height: 32px;
  padding: 8px 12px;
  font:
    800 12px/16px Inter,
    sans-serif;
  border: 1px solid var(--line);
  background: var(--control);
}
p.logout #logout:hover {
  border-color: var(--button);
  background: var(--raised);
}
/* Scrolling is local to data, never the surrounding page. */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}
#content {
  min-width: 0;
  width: calc(100% - var(--sidebar));
}
.ch-table-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 0 24px;
}
.ch-table-scroll > table {
  width: max-content !important;
  min-width: 100%;
  max-width: none;
  margin: 0;
  border: 0 !important;
  border-radius: 0 !important;
}
#content h2 {
  overflow-wrap: anywhere;
}
@media (max-width: 720px) {
  #content {
    width: 100%;
  }
  p.logout {
    position: static;
    justify-content: flex-end;
    margin: 16px !important;
  }
}

/* Adminer sets body min-width:fit-content; that must not expand the shell. */
html,
body {
  min-width: 0 !important;
  width: 100%;
}
#content > div,
#content form,
#content .scrollable {
  min-width: 0;
  max-width: 100%;
}

/* Actions follow the table instead of floating over its final rows. */
#content .footer {
  position: static;
  bottom: auto;
  z-index: auto;
}
#content code[class^="jush-"] > * {
  background: transparent !important;
}
