/* Adminer — compact modern light theme + cards & components */

html {
	--bg: #f4f6f5;
	--fg: #14261c;
	--dim: #f8faf9;
	--lit: #e8f5ee;
}

body.adminer-modern {
	--page: #f4f6f5;
	--surface: #ffffff;
	--surface-2: #f8faf9;
	--surface-3: #f1f5f3;

	--text: #14261c;
	--text-secondary: #3f5248;
	--text-muted: #5f7368;
	--text-faint: #8fa196;

	--border: #dfe6e1;
	--border-strong: #c5d0c8;

	/* primary brand */
	--primary: #047336;
	--primary-hover: #035c2b;
	--primary-soft: #e8f5ee;
	--primary-border: #b8dfc8;
	--primary-ring: rgba(4, 115, 54, 0.18);

	--accent: var(--primary);
	--accent-hover: var(--primary-hover);
	--accent-soft: var(--primary-soft);
	--accent-ring: var(--primary-ring);

	--success: #047336;
	--success-bg: #e8f5ee;
	--success-border: #b8dfc8;

	--danger: #9b1c1c;
	--danger-hover: #7f1515;
	--danger-bg: #fdf0f0;
	--danger-border: #f0c4c4;

	--warning: #8a5a00;
	--warning-hover: #6f4800;
	--warning-bg: #fef8e8;
	--warning-border: #f0dfa0;

	--info: #0f5c4a;
	--info-bg: #e8f5f2;
	--info-border: #b8dfd4;

	--radius: 6px;
	--radius-sm: 4px;

	--shadow-card: 0 1px 2px rgba(17, 24, 39, 0.05);
	--shadow-sidebar: 1px 0 0 var(--border);

	--font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

	--bar-h: 1.75rem;
	--sidebar-w: 13.5rem;
	--shell-gap: 0.75rem;

	--ctrl-h: 1.35rem;
	--ctrl-pad-x: 0.35rem;

	color: var(--text);
	background: var(--page);
	font-family: var(--font);
	font-size: 12px;
	line-height: 1.35;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}

/* --- Card utility ------------------------------------------------------- */

body.adminer-modern .card,
body.adminer-modern fieldset,
body.adminer-modern table:not(.layout),
body.adminer-modern #content form table.layout,
body.adminer-modern pre.jush,
body.adminer-modern .error,
body.adminer-modern .message,
body.adminer-modern #help,
body.adminer-modern #schema .table {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-card);
}

body.adminer-modern fieldset legend {
	font-weight: 600;
	font-size: 0.92em;
	color: var(--text);
	padding: 0 0.25rem;
}

body.adminer-modern #content > .links {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 0.2rem;
	padding: 0.25rem;
	margin: 0.35rem 0.5rem 0.25rem 0;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-card);
}

/* login card: title + form */
body.adminer-modern #content > h2:first-of-type {
	background: var(--surface);
	border: 1px solid var(--border);
	border-bottom: 0;
	border-radius: var(--radius) var(--radius) 0 0;
	box-shadow: var(--shadow-card);
	padding: 0.35rem 0.5rem;
	margin: 0.35rem 0.5rem 0 0;
}

body.adminer-modern #content > h2:first-of-type + form table.layout,
body.adminer-modern #content > h2:first-of-type ~ form table.layout {
	margin-top: 0;
	border-top: 0;
	border-radius: 0 0 var(--radius) var(--radius);
	box-shadow: var(--shadow-card);
}

body.adminer-modern #content > h2:first-of-type + form > p,
body.adminer-modern #content > h2:first-of-type ~ form > p {
	margin-left: 0;
	padding: 0 0.15rem 0.35rem;
}

/* page title attached to main table */
body.adminer-modern #content > h2:not(:first-of-type) {
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-bottom: 0;
	border-radius: var(--radius) var(--radius) 0 0;
	padding: 0.25rem 0.4rem;
	margin: 0.35rem 0.5rem 0 0;
}

body.adminer-modern #content > h2:not(:first-of-type) + table,
body.adminer-modern #content > h2:not(:first-of-type) + form > table {
	margin-top: 0;
	border-top: 0;
	border-radius: 0 0 var(--radius) var(--radius);
}

/* --- Typography --------------------------------------------------------- */

body.adminer-modern a {
	color: var(--accent);
	text-decoration: none;
	font-weight: 500;
}

body.adminer-modern a:visited {
	color: #035c2b;
}

body.adminer-modern a:hover,
body.adminer-modern a:visited:hover {
	color: var(--accent-hover);
}

body.adminer-modern h1 {
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--text);
	background: var(--surface);
	border-bottom: 1px solid var(--border);
	padding: 0.35rem 0.5rem;
	margin: 0;
}

body.adminer-modern h2 {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--text);
	background: transparent;
	border: 0;
	padding: 0;
	margin: 0 0 0.35rem;
}

body.adminer-modern h3 {
	font-size: 0.85rem;
	font-weight: 600;
	margin: 0.5rem 0 0.2rem;
}

body.adminer-modern p {
	margin: 0.35rem 0.5rem 0 0;
	color: var(--text-secondary);
}

body.adminer-modern .version,
body.adminer-modern .time {
	color: var(--text-faint);
	font-size: 0.65rem;
}

/* --- Shared control base ------------------------------------------------ */

body.adminer-modern input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="image"]):not([type="hidden"]),
body.adminer-modern select,
body.adminer-modern textarea {
	font: inherit;
	color: var(--text);
	background: var(--surface);
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	min-height: var(--ctrl-h);
	padding: 0.1rem var(--ctrl-pad-x);
	box-sizing: border-box;
	transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

body.adminer-modern input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="hidden"]):hover,
body.adminer-modern select:hover,
body.adminer-modern textarea:hover {
	border-color: #9ca3af;
}

body.adminer-modern input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="hidden"]):focus,
body.adminer-modern select:focus,
body.adminer-modern textarea:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 2px var(--accent-ring);
}

body.adminer-modern input:disabled,
body.adminer-modern select:disabled,
body.adminer-modern textarea:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	background: var(--surface-2);
}

/* --- Text inputs -------------------------------------------------------- */

body.adminer-modern input[type="text"],
body.adminer-modern input[type="password"],
body.adminer-modern input[type="search"],
body.adminer-modern input[type="email"],
body.adminer-modern input[type="url"],
body.adminer-modern input[type="number"] {
	min-width: 4rem;
}

body.adminer-modern input[type="search"] {
	padding-left: 1.2rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Ccircle cx='5' cy='5' r='3.5'/%3E%3Cpath d='M8 8l2.5 2.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: 0.3rem center;
}

body.adminer-modern input.size {
	width: 4rem;
	text-align: right;
}

body.adminer-modern input.required,
body.adminer-modern input.maxlength {
	border-color: var(--danger);
	box-shadow: 0 0 0 1px rgba(185, 28, 28, 0.15);
}

/* --- Select ------------------------------------------------------------- */

body.adminer-modern select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 1.35rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.3rem center;
	background-color: var(--surface);
	cursor: pointer;
}

body.adminer-modern select:focus {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23047336' stroke-width='2'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
}

body.adminer-modern select option {
	background: var(--surface);
	color: var(--text);
}

/* --- Checkbox & radio --------------------------------------------------- */

body.adminer-modern {
	--check-size: 0.95rem;
	--check-size-table: 0.8rem;
	--check-radius: 3px;
	--check-border: #c5d0c8;
	--check-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.25 6.1 4.85 8.7 9.75 3.5' stroke='white' stroke-width='1.85' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	--check-dash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.75 6h6.5' stroke='%23047336' stroke-width='1.85' stroke-linecap='round'/%3E%3C/svg%3E");
}

body.adminer-modern input[type="checkbox"],
body.adminer-modern input[type="radio"] {
	appearance: none;
	-webkit-appearance: none;
	display: inline-block;
	width: var(--check-size);
	max-width: var(--check-size);
	height: var(--check-size);
	margin: 0;
	border: 1.5px solid var(--check-border);
	background-color: var(--surface);
	background-repeat: no-repeat;
	background-position: center;
	background-image: none;
	vertical-align: middle;
	cursor: pointer;
	flex-shrink: 0;
	position: relative;
	box-sizing: border-box;
	box-shadow:
		0 1px 2px rgba(17, 24, 39, 0.05),
		inset 0 1px 0 rgba(255, 255, 255, 0.85);
	transition:
		background-color 0.16s ease,
		border-color 0.16s ease,
		box-shadow 0.16s ease,
		transform 0.12s ease;
}

body.adminer-modern input[type="checkbox"] {
	border-radius: var(--check-radius);
}

body.adminer-modern input[type="radio"] {
	border-radius: 50%;
}

body.adminer-modern input[type="checkbox"]:hover,
body.adminer-modern input[type="radio"]:hover {
	border-color: var(--primary-border);
	background-color: var(--primary-soft);
	box-shadow:
		0 1px 3px rgba(4, 115, 54, 0.08),
		inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.adminer-modern input[type="checkbox"]:focus-visible,
body.adminer-modern input[type="radio"]:focus-visible {
	outline: none;
	border-color: var(--accent);
	box-shadow:
		0 0 0 3px var(--accent-ring),
		0 1px 2px rgba(17, 24, 39, 0.05);
}

body.adminer-modern input[type="checkbox"]:active,
body.adminer-modern input[type="radio"]:active {
	transform: scale(0.94);
}

body.adminer-modern input[type="checkbox"]:checked {
	background-color: var(--primary);
	background-image: var(--check-mark);
	background-size: 0.62rem;
	border-color: var(--primary);
	box-shadow:
		0 1px 2px rgba(4, 115, 54, 0.22),
		inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.adminer-modern input[type="checkbox"]:checked:hover {
	background-color: var(--primary-hover);
	border-color: var(--primary-hover);
}

body.adminer-modern input[type="checkbox"]:indeterminate {
	background-color: var(--primary-soft);
	background-image: var(--check-dash);
	background-size: 0.62rem;
	border-color: var(--primary-border);
	box-shadow: inset 0 0 0 1px rgba(4, 115, 54, 0.06);
}

body.adminer-modern input[type="radio"]:checked {
	border-color: var(--primary);
	background-color: var(--surface);
	background-image: none;
	box-shadow:
		0 1px 3px rgba(4, 115, 54, 0.14),
		inset 0 0 0 calc(var(--check-size) * 0.28) var(--primary);
}

body.adminer-modern input[type="radio"]:checked:hover {
	border-color: var(--primary-hover);
	box-shadow:
		0 1px 3px rgba(4, 115, 54, 0.18),
		inset 0 0 0 calc(var(--check-size) * 0.28) var(--primary-hover);
}

body.adminer-modern input[type="checkbox"]:disabled,
body.adminer-modern input[type="radio"]:disabled {
	opacity: 0.45;
	cursor: not-allowed;
	background-color: var(--surface-2);
	border-color: var(--border);
	box-shadow: none;
	transform: none;
}

body.adminer-modern input[type="checkbox"]:disabled:checked {
	background-color: #9ab8a6;
	border-color: #9ab8a6;
}

body.adminer-modern input[type="radio"]:disabled:checked {
	background-color: var(--surface-2);
	border-color: #9ab8a6;
	box-shadow: inset 0 0 0 calc(var(--check-size) * 0.28) #9ab8a6;
}

body.adminer-modern td > input[type="checkbox"],
body.adminer-modern th > input[type="checkbox"] {
	display: inline-block;
	width: var(--check-size-table);
	height: var(--check-size-table);
	margin: 0 0.2rem 0 0;
	vertical-align: middle;
}

body.adminer-modern td > input[type="radio"],
body.adminer-modern th > input[type="radio"] {
	display: inline-block;
	margin: 0 0.2rem 0 0;
	vertical-align: middle;
}

body.adminer-modern td:has(> input[type="checkbox"]),
body.adminer-modern th:has(> input[type="checkbox"]),
body.adminer-modern td:has(> input[type="radio"]),
body.adminer-modern th:has(> input[type="radio"]) {
	padding: 0.12rem 0.3rem;
	width: 1%;
	white-space: nowrap;
	vertical-align: middle;
}

body.adminer-modern td:has(> input[type="checkbox"]) > a,
body.adminer-modern th:has(> input[type="checkbox"]) > a,
body.adminer-modern td:has(> input[type="radio"]) > a,
body.adminer-modern th:has(> input[type="radio"]) > a {
	display: inline;
	vertical-align: middle;
	white-space: nowrap;
}

body.adminer-modern td > input[type="checkbox"]:checked,
body.adminer-modern th > input[type="checkbox"]:checked {
	background-size: 0.52rem;
}

body.adminer-modern td > input[type="checkbox"]:indeterminate,
body.adminer-modern th > input[type="checkbox"]:indeterminate {
	background-size: 0.52rem;
}

body.adminer-modern label:has(input[type="checkbox"]),
body.adminer-modern label:has(input[type="radio"]) {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	line-height: 1;
	padding: 0.08rem 0;
	border-radius: var(--radius-sm);
	transition: color 0.12s ease;
}

body.adminer-modern label:has(input[type="checkbox"]) input[type="checkbox"],
body.adminer-modern label:has(input[type="radio"]) input[type="radio"] {
	margin: 0;
	flex-shrink: 0;
	align-self: center;
}

body.adminer-modern label:has(input[type="checkbox"]:hover),
body.adminer-modern label:has(input[type="radio"]:hover) {
	color: var(--text);
}

body.adminer-modern label {
	display: inline-flex;
	align-items: center;
	gap: 0.2rem;
	line-height: 1;
	color: var(--text-secondary);
	font-size: inherit;
	cursor: pointer;
}

body.adminer-modern label.block {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	line-height: 1;
	width: 100%;
}

body.adminer-modern label.block input[type="checkbox"],
body.adminer-modern label.block input[type="radio"] {
	margin: 0;
	flex-shrink: 0;
	align-self: center;
}

body.adminer-modern label i {
	font-style: normal;
	color: var(--text-muted);
}

/* --- File input --------------------------------------------------------- */

body.adminer-modern input[type="file"] {
	padding: 0.15rem;
	font-size: 0.92em;
	background: var(--surface-2);
}

body.adminer-modern input[type="file"]::file-selector-button {
	margin-right: 0.35rem;
	padding: 0.15rem 0.45rem;
	border: 1px solid var(--border-strong);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--text-secondary);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

body.adminer-modern input[type="file"]::file-selector-button:hover {
	background: var(--accent-soft);
	border-color: var(--primary-border);
	color: var(--accent);
}

/* --- Buttons ------------------------------------------------------------ */

body.adminer-modern input[type="submit"],
body.adminer-modern input[type="button"],
body.adminer-modern button[type="submit"],
body.adminer-modern button.icon {
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	min-height: var(--ctrl-h);
	padding: 0.15rem 0.55rem;
	border-radius: var(--radius-sm);
	cursor: pointer;
	box-sizing: border-box;
	transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

body.adminer-modern input[type="button"],
body.adminer-modern input.default {
	background: var(--surface);
	color: var(--text-secondary);
	border: 1px solid var(--border-strong);
	box-shadow: var(--shadow-card);
}

body.adminer-modern input[type="button"]:hover,
body.adminer-modern input.default:hover {
	background: var(--accent-soft);
	border-color: var(--primary-border);
	color: var(--accent-hover);
}

body.adminer-modern input[type="submit"]:active,
body.adminer-modern button[type="submit"]:not(.icon):active {
	transform: translateY(1px);
}

/* primary (default submit) */
body.adminer-modern input[type="submit"]:not([name="drop"]):not([name="logout"]),
body.adminer-modern button[type="submit"]:not(.icon):not([name="drop"]) {
	background: var(--primary);
	color: #fff;
	border: 1px solid var(--primary);
}

body.adminer-modern input[type="submit"]:not([name="drop"]):not([name="logout"]):hover,
body.adminer-modern button[type="submit"]:not(.icon):not([name="drop"]):hover {
	background: var(--primary-hover);
	border-color: var(--primary-hover);
}

/* danger — drop, logout */
body.adminer-modern fieldset input[type="submit"][name="drop"],
body.adminer-modern input[type="submit"][value="Drop"],
body.adminer-modern .logout input[type="submit"],
body.adminer-modern input[type="submit"][name="logout"] {
	background: var(--danger-bg);
	color: var(--danger);
	border: 1px solid var(--danger-border);
	box-shadow: var(--shadow-card);
}

body.adminer-modern fieldset input[type="submit"][name="drop"]:hover,
body.adminer-modern input[type="submit"][value="Drop"]:hover,
body.adminer-modern .logout input[type="submit"]:hover,
body.adminer-modern input[type="submit"][name="logout"]:hover {
	background: #fae4e4;
	border-color: #e8a8a8;
	color: var(--danger-hover);
}

/* warning — truncate, destructive-ish */
body.adminer-modern input[type="submit"][value="Truncate"],
body.adminer-modern input[type="submit"][name="truncate"] {
	background: var(--warning-bg);
	color: var(--warning);
	border: 1px solid var(--warning-border);
}

body.adminer-modern input[type="submit"][value="Truncate"]:hover,
body.adminer-modern input[type="submit"][name="truncate"]:hover {
	background: #fdf0d4;
	border-color: #e8c878;
	color: var(--warning-hover);
}

/* info — secondary actions in forms */
body.adminer-modern input[type="submit"][value="Use"],
body.adminer-modern #dbs input[type="submit"] {
	background: var(--info-bg);
	color: var(--info);
	border: 1px solid var(--info-border);
}

body.adminer-modern input[type="submit"][value="Use"]:hover,
body.adminer-modern #dbs input[type="submit"]:hover {
	background: #d8efe9;
	border-color: #9dcec2;
	color: #0a4a3c;
}

/* --- Fieldset cards ----------------------------------------------------- */

body.adminer-modern fieldset {
	display: inline-block;
	vertical-align: top;
	padding: 0.35rem 0.45rem 0.45rem;
	margin: 0.35rem 0.35rem 0 0;
}

body.adminer-modern fieldset > div {
	margin-top: 0.2rem;
}

body.adminer-modern fieldset > div > div {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.2rem;
	margin-bottom: 0.2rem;
}

/* --- Textarea & code ---------------------------------------------------- */

body.adminer-modern textarea {
	min-height: 3rem;
	resize: vertical;
	line-height: 1.35;
	font-family: var(--mono);
}

body.adminer-modern code {
	font-family: var(--mono);
	font-size: 0.92em;
	background: var(--surface-3);
	border: 1px solid var(--border);
	border-radius: 3px;
	padding: 0 0.2rem;
}

body.adminer-modern pre {
	font-family: var(--mono);
	line-height: 1.35;
}

/* --- Tables (data cards) ------------------------------------------------ */

body.adminer-modern table {
	margin: 0.35rem 0 0 0;
	font-size: inherit;
	border-spacing: 0;
	overflow: hidden;
}

body.adminer-modern table,
body.adminer-modern td,
body.adminer-modern th,
body.adminer-modern .js .column {
	border-color: var(--border);
	border-style: solid;
}

body.adminer-modern td,
body.adminer-modern th {
	border-width: 0 0 1px 0;
	padding: 0.15rem 0.35rem;
	vertical-align: middle;
}

body.adminer-modern th {
	background: var(--surface-2);
	color: var(--text-muted);
	font-weight: 600;
	font-size: 0.92em;
	text-align: left;
}

body.adminer-modern thead th,
body.adminer-modern thead td {
	text-align: center;
	background: var(--surface-2);
}

body.adminer-modern tbody tr:last-child td,
body.adminer-modern tbody tr:last-child th {
	border-bottom: 0;
}

body.adminer-modern tbody tr:hover td,
body.adminer-modern tbody tr:hover th {
	background: #f3faf6;
}

body.adminer-modern .odds tbody tr {
	background: var(--surface);
}

body.adminer-modern .odds tbody tr:nth-child(2n) {
	background: var(--surface-2);
}

body.adminer-modern .js .checkable .checked td,
body.adminer-modern .js .checkable .checked th {
	background: var(--accent-soft);
}

body.adminer-modern .function,
body.adminer-modern .number,
body.adminer-modern .datetime {
	text-align: right;
	font-variant-numeric: tabular-nums;
}

body.adminer-modern .active {
	color: var(--accent);
	font-weight: 600;
}

body.adminer-modern .links a {
	display: inline-block;
	margin: 0;
	padding: 0.1rem 0.35rem;
	border-radius: var(--radius-sm);
	background: var(--surface-2);
	border: 1px solid var(--border);
	font-size: inherit;
}

body.adminer-modern .links a:hover {
	background: var(--accent-soft);
	border-color: var(--primary-border);
	color: var(--accent-hover);
}

body.adminer-modern .links a.active,
body.adminer-modern .links .active {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}

/* --- Alerts (cards) ----------------------------------------------------- */

body.adminer-modern .error {
	color: var(--danger);
	background: var(--danger-bg);
	border-color: var(--danger-border);
}

body.adminer-modern .message {
	color: var(--success);
	background: var(--success-bg);
	border-color: var(--success-border);
}

body.adminer-modern .error,
body.adminer-modern .message {
	padding: 0.3rem 0.45rem;
	margin: 0.35rem 0.5rem 0 0;
}

body.adminer-modern .error b {
	background: transparent;
	font-weight: 600;
}

body.adminer-modern .message table {
	margin: 0.25rem 0 0;
	box-shadow: none;
	border: 0;
}

/* --- Shell -------------------------------------------------------------- */

body.adminer-modern #content {
	margin: var(--bar-h) 0 0 calc(var(--sidebar-w) + var(--shell-gap));
	padding: 0.35rem 0.5rem 0.5rem 0;
	min-height: calc(100vh - var(--bar-h));
	width: calc(100vw - var(--sidebar-w) - var(--shell-gap));
	max-width: calc(100vw - var(--sidebar-w) - var(--shell-gap));
	box-sizing: border-box;
	overflow-x: hidden;
}

body.adminer-modern #content .scrollable {
	overflow-x: auto;
	max-width: 100%;
	-webkit-overflow-scrolling: touch;
}

body.adminer-modern #content > h2,
body.adminer-modern #content > h3,
body.adminer-modern #content > form,
body.adminer-modern #content > .links,
body.adminer-modern #content > p,
body.adminer-modern #content > .footer {
	max-width: 100%;
}

body.adminer-modern #breadcrumb {
	position: fixed;
	top: 0;
	left: calc(var(--sidebar-w) + var(--shell-gap));
	right: 0;
	z-index: 20;
	height: var(--bar-h);
	line-height: var(--bar-h);
	padding: 0 0.5rem;
	margin: 0;
	background: var(--surface);
	border-bottom: 1px solid var(--border);
	color: var(--text-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

body.adminer-modern #breadcrumb a {
	color: var(--text-secondary);
}

body.adminer-modern #menu {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	width: var(--sidebar-w);
	margin: 0;
	padding: 0 0 0.35rem;
	box-sizing: border-box;
	background: var(--surface);
	border-right: 1px solid var(--border);
	box-shadow: var(--shadow-sidebar);
	overflow: auto;
	z-index: 30;
}

body.adminer-modern #menu > p:first-child,
body.adminer-modern #menu h1 {
	padding: 0.35rem 0.5rem;
	margin: 0;
}

body.adminer-modern #menu p,
body.adminer-modern #logins,
body.adminer-modern #tables {
	padding: 0.3rem 0.4rem;
	margin: 0;
	border-bottom: 1px solid var(--border);
}

body.adminer-modern #logins li,
body.adminer-modern #tables li {
	list-style: none;
	margin: 0;
	line-height: 1.25;
}

body.adminer-modern #logins a {
	display: block;
	padding: 0.05rem 0.2rem;
	border-radius: 3px;
	color: var(--text-secondary);
	font-weight: 500;
}

body.adminer-modern #tables li {
	display: flex;
	align-items: center;
	gap: 0.2rem;
}

body.adminer-modern #tables a.select {
	display: inline-block;
	flex: 0 0 auto;
	font-size: 0.68em;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--text-faint);
	padding: 0.02rem 0.25rem;
	border: 1px solid var(--border);
	border-radius: 3px;
	background: var(--surface-2);
}

body.adminer-modern #tables a.select:hover,
body.adminer-modern #tables a.select.active {
	color: var(--accent);
	border-color: var(--primary-border);
	background: var(--accent-soft);
}

body.adminer-modern #tables a:not(.select),
body.adminer-modern #tables span {
	display: inline;
	flex: 1 1 auto;
	min-width: 0;
	padding: 0.05rem 0.15rem;
	border-radius: 3px;
	color: var(--text-secondary);
	font-weight: 500;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

body.adminer-modern #tables a:hover,
body.adminer-modern #logins a:hover {
	background: var(--accent-soft);
	color: var(--accent);
}

body.adminer-modern #tables .active {
	background: var(--accent-soft);
	color: var(--accent);
	font-weight: 600;
}

body.adminer-modern #h1 {
	font-weight: 700;
}

body.adminer-modern #version {
	color: var(--danger);
	font-weight: 600;
}

body.adminer-modern .logout {
	position: fixed;
	top: 0.15rem;
	right: 0.35rem;
	z-index: 40;
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
	display: flex;
	align-items: center;
	gap: 0.35rem;
}

body.adminer-modern .logout span {
	color: var(--text-secondary);
	max-width: 9rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

body.adminer-modern .logout input[type="submit"] {
	padding: 0.15rem 0.4rem;
	font-size: inherit;
}

body.adminer-modern .foot {
	position: static;
	margin: 0;
	box-shadow: none;
}

body.adminer-modern #foot .foot {
	display: none;
}

/* --- Login / auth layout ------------------------------------------------ */

body.adminer-modern #content:not(:has(#breadcrumb)) {
	margin: 0 !important;
	padding: 1.5rem 1rem;
	min-height: 100vh;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

body.adminer-modern #content:not(:has(#breadcrumb)) #menuopen {
	display: none !important;
}

body.adminer-modern #foot:not(:has(.logout)) #menu {
	display: none;
}

body.adminer-modern #content:not(:has(#breadcrumb)) > h2:first-of-type {
	width: 22rem;
	max-width: calc(100% - 2rem);
	margin: 0 auto;
	box-sizing: border-box;
}

body.adminer-modern #content:not(:has(#breadcrumb)) > h2:first-of-type ~ form {
	width: 22rem;
	max-width: calc(100% - 2rem);
	margin: 0 auto;
	align-self: center;
}

body.adminer-modern #content:not(:has(#breadcrumb)) > h2:first-of-type ~ form table.layout {
	width: 100%;
	max-width: none;
	border-radius: 0;
	margin-bottom: 0;
}

body.adminer-modern #content:not(:has(#breadcrumb)) form table.layout tr,
body.adminer-modern #content:not(:has(#breadcrumb)) form table.layout th,
body.adminer-modern #content:not(:has(#breadcrumb)) form table.layout td {
	border: 0;
}

body.adminer-modern #content:not(:has(#breadcrumb)) > h2:first-of-type ~ form > p {
	width: 100%;
	margin: 0;
	padding: 0.35rem 0.5rem 0.45rem;
	box-sizing: border-box;
	background: var(--surface);
	border: 1px solid var(--border);
	border-top: 0;
	border-radius: 0 0 var(--radius) var(--radius);
	box-shadow: var(--shadow-card);
}

/* --- Login card --------------------------------------------------------- */

body.adminer-modern #content:not(:has(#breadcrumb)) form table.layout {
	max-width: 22rem;
	margin: 0;
}

body.adminer-modern #content:not(:has(#breadcrumb)) form table.layout th {
	width: 5.5rem;
	background: var(--surface-2);
	color: var(--text-muted);
	font-weight: 600;
	vertical-align: middle;
}

body.adminer-modern #content:not(:has(#breadcrumb)) form table.layout td {
	padding: 0.25rem 0.35rem;
}

body.adminer-modern #content:not(:has(#breadcrumb)) form table.layout input {
	width: 100%;
}

/* --- Edit / insert record form ------------------------------------------ */

body.adminer-modern #content:has(#breadcrumb) > h2:first-of-type {
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-bottom: 0;
	border-radius: var(--radius) var(--radius) 0 0;
	padding: 0.25rem 0.4rem;
	margin: 0.35rem 0.5rem 0 0;
}

body.adminer-modern #content:has(#breadcrumb) > h2:first-of-type ~ form table.layout {
	max-width: none;
	width: 100%;
	margin: 0.35rem 0.5rem 0 0;
	table-layout: auto;
	border-top: 0;
	border-radius: 0 0 var(--radius) var(--radius);
	box-sizing: border-box;
}

body.adminer-modern #content:has(#breadcrumb) form table.layout tr {
	border-bottom: 1px solid var(--border);
}

body.adminer-modern #content:has(#breadcrumb) form table.layout tr:last-child {
	border-bottom: 0;
}

body.adminer-modern #content:has(#breadcrumb) form table.layout th {
	width: auto;
	min-width: 8.5rem;
	max-width: 16rem;
	background: var(--surface-2);
	color: var(--text-muted);
	font-weight: 600;
	vertical-align: middle;
	text-align: left;
	white-space: normal;
	word-break: break-word;
}

body.adminer-modern #content:has(#breadcrumb) form table.layout td {
	padding: 0.25rem 0.4rem;
	vertical-align: middle;
}

body.adminer-modern #content:has(#breadcrumb) form table.layout td.function {
	width: 1%;
	white-space: nowrap;
}

body.adminer-modern #content:has(#breadcrumb) form table.layout td:not(.function) {
	width: 99%;
}

body.adminer-modern #content:has(#breadcrumb) form table.layout td.function select {
	max-width: 11rem;
}

body.adminer-modern #content:has(#breadcrumb) form table.layout td:last-child input:not([type="checkbox"]):not([type="radio"]),
body.adminer-modern #content:has(#breadcrumb) form table.layout td:last-child textarea {
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

body.adminer-modern #content:has(#breadcrumb) form > p {
	margin: 0.35rem 0.5rem 0 0;
	padding: 0.35rem 0.45rem;
	background: var(--surface);
	border: 1px solid var(--border);
	border-top: 0;
	border-radius: 0 0 var(--radius) var(--radius);
	box-shadow: var(--shadow-card);
	display: flex;
	align-items: center;
	gap: 0.35rem;
	flex-wrap: wrap;
}

/* --- SQL card ----------------------------------------------------------- */

body.adminer-modern .sqlarea {
	width: 98%;
	min-height: 8rem;
	font-family: var(--mono);
	font-size: 0.92em;
	line-height: 1.35;
	border-radius: var(--radius);
	border: 1px solid #035c2b;
	background: #0a2e1c;
	color: #d8f3e4;
	padding: 0.35rem 0.45rem;
	box-shadow: var(--shadow-card);
}

body.adminer-modern .sqlarea:focus {
	border-color: #047336;
	box-shadow: 0 0 0 2px var(--primary-ring);
}

body.adminer-modern .sql-footer {
	margin-bottom: 0.75rem;
	color: var(--text-muted);
}

body.adminer-modern pre.jush {
	padding: 0.35rem 0.45rem;
}

/* --- Export / option rows (select + labels) ----------------------------- */

body.adminer-modern form table.layout td:has(> label) {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.75rem;
}

body.adminer-modern form table.layout td:has(> label) > select {
	flex: 0 0 auto;
}

body.adminer-modern form table.layout td:has(> label) > label {
	margin: 0;
}

body.adminer-modern form table:not(.layout) th:last-child,
body.adminer-modern form table:not(.layout) td:last-child {
	text-align: right;
}

body.adminer-modern form table:not(.layout) th:last-child label.block,
body.adminer-modern form table:not(.layout) td:last-child label.block {
	justify-content: flex-end;
	gap: 0.35rem;
}

body.adminer-modern #content form + p:has(a[href*="dump="]) {
	display: none;
}

/* --- Export / footer actions card --------------------------------------- */

body.adminer-modern .footer > div {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-card);
	padding: 0.35rem 0.45rem;
	margin: 0.35rem 0.5rem 0 0;
}

/* --- Icons -------------------------------------------------------------- */

body.adminer-modern button.icon {
	width: 1.1rem;
	height: 1.1rem;
	min-height: 1.1rem;
	padding: 0;
	background-color: var(--accent);
	border: 0;
	border-radius: 3px;
}

body.adminer-modern button.icon:hover {
	background-color: var(--accent-hover);
}

/* --- Misc --------------------------------------------------------------- */

body.adminer-modern .plugins {
	display: none !important;
}

body.adminer-modern :target {
	background: var(--warning-bg);
	border-radius: 3px;
	outline: 1px solid var(--warning-border);
}

body.adminer-modern #help {
	padding: 0.35rem;
	font-family: var(--mono);
	font-size: 0.92em;
}

body.adminer-modern #ajaxstatus {
	border-radius: var(--radius-sm);
	background: var(--info-bg);
	color: var(--info);
	padding: 0.1rem 0.25rem;
	font-weight: 600;
	border: 1px solid var(--info-border);
}

body.adminer-modern #dbs label {
	font-weight: 600;
	color: var(--text);
}

body.adminer-modern #dbs select,
body.adminer-modern #dbs input[type="text"] {
	min-width: 7rem;
}

/* --- Responsive --------------------------------------------------------- */

@media all and (max-width: 800px) {
	body.adminer-modern #content {
		margin-left: 0 !important;
		margin-top: var(--bar-h);
		padding-left: 0.35rem;
	}

	body.adminer-modern #content:not(:has(#breadcrumb)) {
		margin-top: 0 !important;
		padding: 1rem 0.75rem;
	}

	body.adminer-modern #breadcrumb {
		left: 0 !important;
	}

	body.adminer-modern #menu {
		position: absolute;
		top: var(--bar-h);
		bottom: auto;
		width: auto;
		min-width: 14rem;
		max-height: 70vh;
		border: 1px solid var(--border);
		border-radius: var(--radius);
		box-shadow: var(--shadow-card);
	}

	body.adminer-modern .logout {
		top: 0.1rem;
		right: 0.25rem;
	}
}

@media print {
	body.adminer-modern #menu,
	body.adminer-modern .logout {
		display: none;
	}

	body.adminer-modern #content {
		margin-left: 0.5em;
	}

	body.adminer-modern #breadcrumb {
		position: static;
	}
}
