html {
	color-scheme: light;
	--background: oklch(0.985 0.003 268);
	--foreground: oklch(0.19 0.025 268);
	--card: oklch(1 0 0);
	--popover: oklch(1 0 0);
	--primary: oklch(0.52 0.21 268);
	--primary-foreground: oklch(0.985 0.01 268);
	--secondary: oklch(0.955 0.008 268);
	--muted: oklch(0.955 0.008 268);
	--muted-foreground: oklch(0.51 0.022 268);
	--accent: oklch(0.948 0.016 268);
	--destructive: oklch(0.575 0.22 25);
	--success: oklch(0.52 0.135 155);
	--border: oklch(0.915 0.008 268);
	--input: oklch(0.89 0.01 268);
	--ring: oklch(0.6 0.17 268);
	--sidebar: oklch(0.97 0.006 268);
	--sidebar-accent: oklch(0.93 0.016 268);
	--sidebar-border: oklch(0.91 0.008 268);
	--chart-1: oklch(0.6 0.17 262);
	--chart-2: oklch(0.66 0.16 45);
	--chart-3: oklch(0.64 0.12 175);
	--chart-5: oklch(0.64 0.17 350);
	--chart-6: oklch(0.62 0.15 145);
	--chart-7: oklch(0.58 0.18 298);
	--shadow-color: oklch(0.25 0.05 268);
	--radius: 0.75rem;
	--radius-sm: calc(var(--radius) * 0.6);
	--radius-md: calc(var(--radius) * 0.8);
	--sidebar-width: 16rem;
	--font-sans: 'Inter Variable', Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
	--font-mono: 'JetBrains Mono Variable', 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
	--shadow-sm: 0 1px 2px 0 oklch(from var(--shadow-color) l c h / 0.06), 0 1px 3px 0 oklch(from var(--shadow-color) l c h / 0.08);
	--shadow-lg: 0 4px 6px -2px oklch(from var(--shadow-color) l c h / 0.06), 0 12px 20px -4px oklch(from var(--shadow-color) l c h / 0.12);

	--bg: var(--background);
	--fg: var(--foreground);
	--dim: var(--muted);
	--lit: var(--accent);
}

@media (prefers-color-scheme: dark) {
	html {
		color-scheme: dark;
		--background: oklch(0.155 0.018 268);
		--foreground: oklch(0.96 0.006 268);
		--card: oklch(0.195 0.02 268);
		--popover: oklch(0.215 0.022 268);
		--primary: oklch(0.72 0.15 268);
		--primary-foreground: oklch(0.18 0.05 268);
		--secondary: oklch(0.255 0.022 268);
		--muted: oklch(0.255 0.022 268);
		--muted-foreground: oklch(0.72 0.02 268);
		--accent: oklch(0.27 0.03 268);
		--destructive: oklch(0.68 0.19 22);
		--success: oklch(0.76 0.15 155);
		--border: oklch(0.28 0.02 268);
		--input: oklch(0.32 0.022 268);
		--ring: oklch(0.65 0.14 268);
		--sidebar: oklch(0.175 0.02 268);
		--sidebar-accent: oklch(0.245 0.026 268);
		--sidebar-border: oklch(0.255 0.02 268);
		--chart-1: oklch(0.7 0.15 262);
		--chart-2: oklch(0.72 0.14 45);
		--chart-3: oklch(0.72 0.11 175);
		--chart-5: oklch(0.72 0.15 350);
		--chart-6: oklch(0.72 0.14 145);
		--chart-7: oklch(0.7 0.15 298);
		--shadow-color: oklch(0.05 0.01 268);
	}
}

body {
	font: 0.875rem/1.5 var(--font-sans);
	font-feature-settings: 'cv11', 'ss03';
	color: var(--foreground);
	background: var(--background);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

::selection {
	background: color-mix(in oklch, var(--primary) 30%, transparent);
}

a,
a:visited {
	color: var(--primary);
}

a:link:hover,
a:visited:hover {
	color: var(--primary);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

:focus-visible {
	outline: 2px solid color-mix(in oklch, var(--ring) 60%, transparent);
	outline-offset: 2px;
}

h1 {
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--foreground);
	background: none;
	border: 0;
	padding: 1rem 1.25rem 0.75rem;
}

#h1,
#h1:visited {
	color: var(--foreground);
	font-style: normal;
	letter-spacing: -0.01em;
}

#h1:hover {
	text-decoration: none;
}

#logo {
	width: 1.25rem;
	height: 1.25rem;
	margin: 0 0.5rem 0 0;
	vertical-align: -0.25rem;
}

.version,
#version {
	color: var(--muted-foreground);
	font-size: 0.75rem;
	font-weight: 400;
}

h2 {
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: -0.02em;
	color: var(--foreground);
	background: none;
	border: 0;
	margin: 0.25rem 0 1rem;
	padding: 0;
}

h3 {
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	margin: 2rem 0 0;
}

p {
	margin: 0.75rem 0 0;
}

code {
	font-family: var(--font-mono);
	font-size: 0.8125rem;
	padding: 0.125rem 0.375rem;
	border-radius: var(--radius-sm);
	background: var(--muted);
}

pre,
textarea {
	font: 0.8125rem/1.6 var(--font-mono);
}

pre.jush,
pre code {
	background: var(--muted);
}

pre {
	padding: 0.75rem 1rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	overflow-x: auto;
}

pre code {
	padding: 0;
	background: none;
}

table {
	margin: 0.75rem 0 0;
	font-size: 0.8125rem;
	font-variant-numeric: tabular-nums;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	border-spacing: 0;
	background: var(--card);
	box-shadow: var(--shadow-sm);
}

td table {
	border-radius: var(--radius-sm);
	box-shadow: none;
}

table,
td,
th,
.js .column {
	border-color: var(--border);
}

td,
th {
	border-width: 0 0 1px;
	padding: 0.4375rem 0.75rem;
}

tbody tr:last-child > td,
tbody tr:last-child > th,
table > tr:last-child > td,
table > tr:last-child > th {
	border-bottom-width: 0;
}

th {
	background: none;
	font-weight: 500;
}

thead th,
thead td {
	background: var(--muted);
	color: var(--muted-foreground);
	font-size: 0.75rem;
	font-weight: 500;
	text-align: left;
	padding: 0.5rem 0.75rem;
}

thead th a,
thead th a:visited,
thead td a,
thead td a:visited {
	color: var(--muted-foreground);
}

thead th a:link:hover,
thead th a:visited:hover {
	color: var(--foreground);
}

thead tr:first-child > :first-child {
	border-top-left-radius: calc(var(--radius) - 1px);
}

thead tr:first-child > :last-child {
	border-top-right-radius: calc(var(--radius) - 1px);
}

tbody tr:last-child > :first-child {
	border-bottom-left-radius: calc(var(--radius) - 1px);
}

tbody tr:last-child > :last-child {
	border-bottom-right-radius: calc(var(--radius) - 1px);
}

sup {
	font-size: 0.625rem;
	margin-left: 0.125rem;
	opacity: 0.7;
}

.odds tbody tr,
.odds tbody tr:nth-child(2n) {
	background: none;
}

tbody tr:hover td,
tbody tr:hover th {
	background: color-mix(in oklch, var(--accent) 70%, transparent);
}

.js .checkable .checked td,
.js .checkable .checked th,
.js .checkable .checked:hover td,
.js .checkable .checked:hover th {
	background: color-mix(in oklch, var(--primary) 12%, var(--card));
	color: inherit;
}

.js .checkable .checked a {
	color: var(--primary);
}

#edit-fields tbody tr:hover td,
#edit-fields tbody tr:hover th {
	background: color-mix(in oklch, var(--accent) 70%, transparent);
}

.js .column {
	background: var(--popover);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-sm);
	padding: 0.125rem 0.375rem;
	margin-top: -0.25rem;
}

fieldset {
	padding: 0.5rem 0.75rem 0.75rem;
	margin: 0.75rem 0.5rem 0 0;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--card);
}

legend {
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--muted-foreground);
	padding: 0 0.375rem;
}

fieldset:has(> div.hidden) {
	padding-bottom: 0.25rem;
}

input.size {
	width: 5.5rem;
}

td[align='right'] a:not(:hover) {
	color: inherit;
}

input:not([type='checkbox'], [type='radio'], [type='submit'], [type='button'], [type='image'], [type='file'], [type='hidden']),
select,
textarea,
.sqlarea {
	font-family: inherit;
	font-size: 0.8125rem;
	color: var(--foreground);
	background: var(--background);
	border: 1px solid var(--input);
	border-radius: var(--radius-sm);
	padding: 0.3125rem 0.5rem;
}

select {
	padding-right: 0.25rem;
}

textarea,
.sqlarea {
	font-family: var(--font-mono);
	line-height: 1.6;
}

pre.sqlarea {
	padding: 0.625rem 0.75rem;
	min-height: 8rem;
	box-sizing: border-box;
	white-space: pre-wrap;
}

input:not([type='checkbox'], [type='radio'], [type='submit'], [type='button'], [type='image'], [type='file'], [type='hidden']):focus,
select:focus,
textarea:focus,
.sqlarea:focus {
	outline: none;
	border-color: var(--ring);
	box-shadow: 0 0 0 3px color-mix(in oklch, var(--ring) 25%, transparent);
}

input::placeholder,
textarea::placeholder {
	color: var(--muted-foreground);
}

input[type='checkbox'],
input[type='radio'] {
	accent-color: var(--primary);
	width: 0.9375rem;
	height: 0.9375rem;
	margin: 0 0.25rem 0 0;
}

input[type='submit'],
input[type='button'],
button:not(.icon) {
	font: 500 0.8125rem/1.25 var(--font-sans);
	color: var(--foreground);
	background: var(--secondary);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 0.375rem 0.75rem;
	cursor: pointer;
	box-shadow: none;
}

input[type='submit']:hover,
input[type='button']:hover,
button:not(.icon):hover {
	background: var(--accent);
	border-color: var(--input);
}

input[type='submit'].default,
input[type='submit'][name='login'] {
	color: var(--primary-foreground);
	background: var(--primary);
	border-color: var(--primary);
	box-shadow: var(--shadow-sm);
}

input[type='submit'].default:hover,
input[type='submit'][name='login']:hover {
	background: color-mix(in oklch, var(--primary) 88%, var(--foreground));
	border-color: color-mix(in oklch, var(--primary) 88%, var(--foreground));
}

input[type='submit'][name='drop'],
input[type='submit'][name='delete'],
input[type='submit'][name='truncate'] {
	color: var(--destructive);
}

input[type='submit'][name='drop']:hover:not(:disabled),
input[type='submit'][name='delete']:hover:not(:disabled),
input[type='submit'][name='truncate']:hover:not(:disabled) {
	color: oklch(0.985 0.01 268);
	background: var(--destructive);
	border-color: var(--destructive);
}

input:disabled,
select:disabled,
button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

input[type='submit']:disabled:hover,
input[type='button']:disabled:hover {
	background: var(--secondary);
	border-color: var(--border);
}

input.required,
input.maxlength {
	box-shadow: 0 0 0 1px var(--destructive);
}

.icon {
	width: 1.375rem;
	height: 1.375rem;
	border: 0;
	padding: 0;
	cursor: pointer;
	filter: none;
	background: var(--muted-foreground);
	-webkit-mask: var(--icon) center / 0.875rem no-repeat;
	mask: var(--icon) center / 0.875rem no-repeat;
}

.icon:hover {
	background: var(--foreground);
}

.icon-plus {
	--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round'%3E%3Cpath d='M8 3v10M3 8h10'/%3E%3C/svg%3E");
}

.icon-cross {
	--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round'%3E%3Cpath d='M4 4l8 8M12 4l-8 8'/%3E%3C/svg%3E");
}

.icon-cross:hover {
	background: var(--destructive);
}

.icon-move,
#menuopen .icon {
	--icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round'%3E%3Cpath d='M3 4.5h10M3 8h10M3 11.5h10'/%3E%3C/svg%3E");
}

.icon-plus,
.icon-cross,
.icon-move {
	background-image: none;
}

.error,
.message {
	padding: 0.625rem 0.875rem;
	margin: 0.75rem 0 0;
	border-radius: var(--radius-md);
	border: 1px solid;
}

.error {
	color: var(--destructive);
	background: color-mix(in oklch, var(--destructive) 8%, var(--background));
	border-color: color-mix(in oklch, var(--destructive) 30%, transparent);
}

.error b {
	background: none;
	font-weight: 600;
}

.message {
	color: var(--success);
	background: color-mix(in oklch, var(--success) 8%, var(--background));
	border-color: color-mix(in oklch, var(--success) 30%, transparent);
}

.message table {
	color: var(--foreground);
	background: var(--card);
}

.char {
	color: var(--chart-6);
}

.date {
	color: var(--chart-7);
}

.enum {
	color: var(--chart-3);
}

.binary {
	color: var(--chart-5);
}

.time {
	color: var(--muted-foreground);
	font-size: 0.75rem;
}

.active {
	font-weight: 600;
}

.links a {
	margin-right: 0;
}

#content > p.links,
#content > form > p.links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
}

#content p.links a {
	display: inline-block;
	padding: 0.3125rem 0.75rem;
	border-radius: var(--radius-sm);
	color: var(--muted-foreground);
	font-weight: 500;
}

#content p.links a:hover {
	color: var(--foreground);
	background: var(--accent);
	text-decoration: none;
}

#content p.links a.active {
	color: var(--foreground);
	background: var(--muted);
}

#content > h2 + p.links,
#content > h2 + div + p.links {
	padding-bottom: 0.75rem;
	margin-bottom: 0.25rem;
	border-bottom: 1px solid var(--border);
}

#breadcrumb {
	position: static;
	height: auto;
	margin: 0;
	padding: 0;
	line-height: 1.5;
	font-size: 0.8125rem;
	color: var(--muted-foreground);
	background: none;
	white-space: normal;
}

#breadcrumb a,
#breadcrumb a:visited {
	color: var(--muted-foreground);
}

#breadcrumb a:hover {
	color: var(--foreground);
}

.logout {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0;
	top: 0.875rem;
	right: 2rem;
	font-size: 0.8125rem;
	color: var(--muted-foreground);
	background: none;
	box-shadow: none;
}

#menu {
	margin: 0;
	background: var(--sidebar);
}

#menu p,
#logins,
#tables {
	padding: 0.75rem 1rem;
	border-color: var(--sidebar-border);
}

#menu h1 {
	border-bottom: 1px solid var(--sidebar-border);
}

#lang {
	position: static;
	padding: 0.75rem 1.25rem;
	font-size: 0.75rem;
	color: var(--muted-foreground);
}

#lang select {
	font-size: 0.75rem;
	padding: 0.125rem 0.25rem;
}

#dbs {
	overflow: visible;
	padding-inline: 1.25rem;
}

#dbs label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--muted-foreground);
}

#dbs select {
	flex: 1;
	min-width: 0;
}

#menu p.links {
	display: grid;
	gap: 0.125rem;
	padding: 0.5rem 0.75rem;
}

#menu p.links a,
#tables a.structure,
#tables a.select,
#logins a {
	display: block;
	padding: 0.3125rem 0.5rem;
	border-radius: var(--radius-sm);
	color: var(--foreground);
	background: none;
}

#menu p.links a:hover,
#tables li:hover a.structure,
#logins a:hover {
	background: var(--sidebar-accent);
	text-decoration: none;
}

#menu .active,
#menu a.active:visited {
	color: var(--primary);
	background: var(--sidebar-accent);
}

#tables {
	padding: 0.5rem 0.75rem;
	margin: 0;
	border-bottom: 0;
}

#tables li {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	position: relative;
}

#tables a.structure {
	order: -1;
	flex: 1;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	font-family: var(--font-mono);
	font-size: 0.8125rem;
	font-weight: 400;
}

#tables a.structure.active {
	font-weight: 500;
}

#tables a.select {
	position: absolute;
	right: 0.25rem;
	padding: 0.0625rem 0.375rem;
	font-size: 0.6875rem;
	font-weight: 500;
	color: var(--muted-foreground);
	background: var(--sidebar);
	border: 1px solid var(--sidebar-border);
	opacity: 0;
}

#tables li:hover a.select,
#tables a.select:focus-visible,
#tables a.select.active {
	opacity: 1;
}

#tables a.select:hover {
	color: var(--primary);
	border-color: var(--input);
	text-decoration: none;
}

#tables a.select.active {
	color: var(--primary);
}

#tables span {
	background: none;
}

.footer {
	margin: 1.5rem 0 0.5rem;
	box-shadow: none;
}

.footer > div {
	background: var(--background);
	padding: 0 0 0.75rem;
	border-top: 1px solid var(--border);
}

.footer fieldset {
	margin-top: 0.75rem;
}

.loadmore {
	margin-left: 0.5rem;
}

#help {
	font-family: var(--font-mono);
	font-size: 0.75rem;
	padding: 0.375rem 0.625rem;
	color: var(--foreground);
	background: var(--popover);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-lg);
}

:target {
	color: inherit;
	background: color-mix(in oklch, var(--primary) 12%, transparent);
}

#schema .table {
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	padding: 0.25rem 0.5rem;
	background: var(--card);
	box-shadow: var(--shadow-sm);
}

#schema div.table a {
	color: var(--primary);
}

.jush {
	--text-color: var(--foreground);
	--bg-color: var(--muted);
	--php-color: var(--foreground);
	--string-color: var(--chart-6);
	--string-plain-color: var(--chart-6);
	--keyword-color: var(--chart-7);
	--identifier-color: var(--chart-2);
	--value-color: var(--chart-5);
	--number-color: var(--chart-3);
	--attribute-color: var(--chart-3);
	--js-bg-color: transparent;
	--css-bg-color: transparent;
	--php-bg-color: transparent;
	--php-sql-bg-color: transparent;
}

.jush-htm_com,
.jush-com,
.jush-com_code,
.jush-one,
.jush-php_doc,
.jush-php_com,
.jush-php_one,
.jush-js_one,
.jush-js_doc {
	color: var(--muted-foreground);
}

code.jush {
	display: inline-block;
	padding: 0.25rem 0.5rem;
	border: 1px solid var(--border);
}

@media (min-width: 801px) {
	#menu {
		position: fixed;
		inset: 0 auto 0 0;
		width: var(--sidebar-width);
		display: flex;
		flex-direction: column;
		overflow-y: auto;
		border-right: 1px solid var(--sidebar-border);
	}

	#menu > form:has(#lang) {
		order: 1;
		margin-top: auto;
		border-top: 1px solid var(--sidebar-border);
	}

	#content {
		margin: 0 0 0 var(--sidebar-width);
		padding: 1.25rem 2rem 2rem;
	}

	.rtl #menu {
		inset: 0 0 0 auto;
		border-right: 0;
		border-left: 1px solid var(--sidebar-border);
	}

	.rtl #content {
		margin: 0 var(--sidebar-width) 0 0;
		padding: 1.25rem 2rem 2rem;
	}

	.rtl .logout {
		right: auto;
		left: 2rem;
	}
}

@media all and (max-width: 800px) {
	body {
		min-width: 0;
	}

	.scrollable {
		overflow-x: auto;
	}

	#content {
		margin: 0 !important;
		padding: 0.875rem 1rem 1.5rem;
	}

	#breadcrumb {
		padding-left: 2.5rem;
		min-height: 1.5rem;
	}

	.js #menuopen {
		top: 0.75rem;
		left: 0.75rem;
	}

	.js .logout {
		position: static;
		justify-content: flex-end;
		padding: 0.5rem 1rem 0;
		background: none;
		box-shadow: none;
	}

	#menu {
		width: auto;
		min-width: min(20rem, calc(100vw - 2rem));
		margin: 0.5rem;
		background: var(--sidebar);
		border: 1px solid var(--sidebar-border);
		border-radius: var(--radius);
		box-shadow: var(--shadow-lg);
		overflow: hidden;
	}

	.js #foot {
		top: 2.75rem;
		z-index: 2;
	}

	#tables a.select {
		opacity: 1;
	}
}
