@import url('fonts/montserrat.css');

/* -------------------------------------------------------------------------
   Competition admin — light SaaS shell
   Accent: polished steel (brushed metal) with light 3D bevel
   ------------------------------------------------------------------------- */

:root {
	--admin-bg: #eef2f6;
	--admin-surface: #ffffff;
	--admin-surface-muted: #f8fafc;
	--admin-border: #e2e8f0;
	--admin-border-strong: #cbd5e1;
	--admin-text: #0f172a;
	--admin-text-secondary: #475569;
	--admin-text-muted: #64748b;
	/* Polished steel — darker brushed metal */
	--admin-primary: #4a5360;
	--admin-primary-hover: #5c6674;
	--admin-primary-pressed: #2f3640;
	--admin-primary-soft: #d8dee6;
	--admin-steel-hi: #9aa3ae;
	--admin-steel-mid: #5c6674;
	--admin-steel-lo: #2f3640;
	--admin-steel-edge: #1a1f26;
	--admin-steel-gradient: linear-gradient(
		180deg,
		#8b949f 0%,
		#6b7582 10%,
		#4e5764 32%,
		#3a424c 48%,
		#2a3038 58%,
		#3f4854 72%,
		#5c6674 88%,
		#7a8491 100%
	);
	--admin-steel-gradient-hover: linear-gradient(
		180deg,
		#9aa3ae 0%,
		#7a8491 10%,
		#5c6674 32%,
		#4a5360 48%,
		#353c46 58%,
		#4e5764 72%,
		#6b7582 88%,
		#8b949f 100%
	);
	--admin-steel-gradient-pressed: linear-gradient(
		180deg,
		#3a424c 0%,
		#2a3038 35%,
		#1a1f26 60%,
		#2f3640 85%,
		#3a424c 100%
	);
	--admin-steel-3d:
		inset 0 1px 0 rgba(255, 255, 255, 0.35),
		inset 0 -1px 0 rgba(0, 0, 0, 0.55),
		inset 0 0 0 1px rgba(255, 255, 255, 0.08),
		0 1px 2px rgba(0, 0, 0, 0.28),
		0 3px 10px rgba(0, 0, 0, 0.22);
	--admin-steel-3d-hover:
		inset 0 1px 0 rgba(255, 255, 255, 0.45),
		inset 0 -1px 0 rgba(0, 0, 0, 0.5),
		inset 0 0 0 1px rgba(255, 255, 255, 0.12),
		0 2px 4px rgba(0, 0, 0, 0.25),
		0 6px 16px rgba(0, 0, 0, 0.22);
	--admin-steel-3d-pressed:
		inset 0 2px 5px rgba(0, 0, 0, 0.65),
		inset 0 1px 0 rgba(0, 0, 0, 0.4),
		inset 0 -1px 0 rgba(255, 255, 255, 0.1),
		0 1px 1px rgba(0, 0, 0, 0.2);
	--admin-accent: #3a424c;
	--admin-accent-soft: #d8dee6;
	--admin-warning: #d97706;
	--admin-warning-soft: #fef3c7;
	--admin-success: #16a34a;
	--admin-success-soft: #dcfce7;
	--admin-danger: #dc2626;
	--admin-danger-hover: #b91c1c;
	--admin-danger-soft: #fee2e2;
	--admin-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
	--admin-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
	--admin-shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.1);
	--admin-radius: 12px;
	--admin-radius-sm: 8px;
	--admin-radius-pill: 999px;
	--admin-font: 'Montserrat', "Trebuchet MS", Tahoma, Helvetica, Arial, sans-serif;
	--admin-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--admin-brushed-metal-bg:
		linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 18%),
		repeating-linear-gradient(
			0deg,
			rgba(255, 255, 255, 0.08) 0px,
			rgba(255, 255, 255, 0.08) 1px,
			rgba(0, 0, 0, 0.12) 1px,
			rgba(0, 0, 0, 0.12) 2px
		),
		linear-gradient(
			180deg,
			#3d444d 0%,
			#32373d 35%,
			#212529 70%,
			#181b1e 100%
		);
	--admin-brushed-metal-shadow:
		inset 0 1px 0 0 rgba(255, 255, 255, 0.35),
		inset 0 -1px 0 0 rgba(0, 0, 0, 0.8),
		inset 0 0 12px 0 rgba(0, 0, 0, 0.4),
		0 8px 20px -4px rgba(0, 0, 0, 0.6),
		0 2px 5px 0 rgba(0, 0, 0, 0.4);
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	background: var(--admin-bg);
}

body {
	margin: 0;
	padding: 0;
	min-height: 100vh;
	overflow-x: hidden;
	background:
		radial-gradient(1200px 480px at 8% -10%, rgba(148, 163, 184, 0.18), transparent 55%),
		radial-gradient(900px 420px at 96% 0%, rgba(100, 116, 139, 0.1), transparent 50%),
		var(--admin-bg);
	color: var(--admin-text);
	font-family: var(--admin-font);
	font-size: 14px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

input, select, textarea, button, optgroup, option {
	font-family: var(--admin-font);
}

td {
	font-family: var(--admin-font);
	font-size: 14px;
	color: var(--admin-text);
}

a:link,
a:visited {
	color: var(--admin-accent);
	transition: color 0.2s var(--admin-ease);
}

a:hover {
	color: var(--admin-primary);
	text-decoration: none;
}

a.button,
a.button:link,
a.button:visited,
a.button:hover,
a.button:active {
	color: #ffffff;
	text-decoration: none;
}

.href {
	color: var(--admin-accent);
	text-decoration: underline;
	cursor: pointer;
}

/* ---- Layout shell ---- */

.admin-shell {
	width: 100%;
	border-collapse: collapse;
	border-spacing: 0;
}

.admin-header {
	background-color: #212529 !important;
	background-image: var(--admin-brushed-metal-bg) !important;
	border-bottom: 5px solid rgb(26, 153, 0);
	box-shadow:
		inset 0 1px 0 0 rgba(255, 255, 255, 0.28),
		inset 0 -1px 0 0 rgba(0, 0, 0, 0.55),
		0 4px 16px rgba(0, 0, 0, 0.25);
	height: auto !important;
	padding: 0;
	vertical-align: top;
}

.admin-header-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 16px;
	padding: 8px 20px;
	position: relative;
}

.admin-header-inner::after {
	display: none;
}

.admin-content-wrap {
	padding: 28px 28px 40px !important;
	max-width: none;
}

/* ---- Brand / sitename ---- */

.sitename {
	display: inline-flex;
	align-items: center;
	color: #ffffff;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.01em;
	padding: 0;
	line-height: 1.25;
	border: 0;
	border-radius: 0;
	background: none;
	background-image: none;
	box-shadow: none;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
}

.sitename::before {
	display: none;
}

/* ---- Page heading ---- */

.contentheading {
	color: var(--admin-text);
	font-weight: 700;
	font-size: 18px;
	letter-spacing: -0.015em;
	padding: 4px 0 12px 15px;
	margin: 0px 0 10px;
	border-bottom: none;
	position: relative;
	line-height: 1.3;
	overflow: visible;
}

.contentheading-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
}

.contentheading-title {
	min-width: 0;
}

.contentheading-toggle {
	margin: 0;
	flex: 0 0 auto;
}

.contentheading-check {
	flex: 0 0 auto;
	margin: 0;
	text-decoration: none;
	white-space: nowrap;
	color: #ffffff !important;
}

a.contentheading-check:link,
a.contentheading-check:visited,
a.contentheading-check:hover,
a.contentheading-check:active {
	color: #ffffff !important;
	text-decoration: none;
}

.admin-switch-wrap {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	cursor: pointer;
	user-select: none;
	font-weight: 500;
	font-size: 13px;
	color: var(--admin-text-secondary);
	line-height: 1.2;
}

.admin-switch-text {
	white-space: nowrap;
}

.admin-switch {
	position: relative;
	display: inline-block;
	width: 42px;
	height: 24px;
	flex: 0 0 auto;
	font-size: 0;
}

.admin-switch input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}

.admin-switch-slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background: var(--admin-border-strong);
	border-radius: 24px;
	transition: background 0.2s ease, box-shadow 0.2s ease;
	box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.18);
}

.admin-switch-slider:before {
	content: '';
	position: absolute;
	height: 18px;
	width: 18px;
	left: 3px;
	top: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.2s ease;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.28);
}

.admin-switch input:checked + .admin-switch-slider {
	background: var(--admin-success);
	box-shadow: inset 0 1px 2px rgba(22, 163, 74, 0.35);
}

.admin-switch input:checked + .admin-switch-slider:before {
	transform: translateX(18px);
}

.admin-switch input:focus-visible + .admin-switch-slider {
	outline: 2px solid var(--admin-primary);
	outline-offset: 2px;
}

.copyright {
	color: var(--admin-text-muted);
}

.student_name {
	padding-top: 18px;
	padding-left: 20px;
	padding-right: 20px;
	white-space: nowrap;
	text-align: right;
}

/* ---- Top menu ---- */

.menu {
	padding: 0;
	white-space: nowrap;
}

.menu_right {
	position: absolute;
	right: 10px;
}

#menu {
	margin: 0;
	padding: 0;
	z-index: 30;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	list-style: none;
}

#menu li {
	margin: 0;
	padding: 0;
	list-style: none;
	float: none;
	font-family: var(--admin-font);
	font-weight: 600;
	font-size: 13px;
}

#menu li a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px;
	color: rgba(255, 255, 255, 0.88);
	text-align: center;
	text-decoration: none;
	border: 1px solid transparent;
	border-right: none;
	border-radius: var(--admin-radius-sm);
	background: transparent;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
	transition:
		background 0.2s var(--admin-ease),
		color 0.2s var(--admin-ease),
		border-color 0.2s var(--admin-ease),
		box-shadow 0.2s var(--admin-ease);
}

#menu li a:hover {
	background-color: rgba(255, 255, 255, 0.12);
	color: #ffffff;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

#menu li a.menu-link-alert,
#menu li a[style*="color:red"] {
	color: #fca5a5 !important;
}

#menu li a.menu-link-alert:hover,
#menu li a[style*="color:red"]:hover {
	background: rgba(220, 38, 38, 0.25);
	color: #fecaca !important;
}

#menu li a:has(select),
#menu li a:has(form) {
	padding: 4px 6px;
	background: rgba(0, 0, 0, 0.25);
	border-color: rgba(255, 255, 255, 0.12);
}

#menu select,
.admin-select {
	appearance: none;
	-webkit-appearance: none;
	height: 28px !important;
	min-width: 72px;
	padding: 0 28px 0 10px !important;
	margin: 0 !important;
	font-size: 12px !important;
	font-weight: 600;
	color: var(--admin-text);
	background-color: var(--admin-surface);
	background-image:
		linear-gradient(45deg, transparent 50%, var(--admin-text-muted) 50%),
		linear-gradient(135deg, var(--admin-text-muted) 50%, transparent 50%);
	background-position:
		calc(100% - 14px) calc(50% - 2px),
		calc(100% - 9px) calc(50% - 2px);
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
	border: 1px solid var(--admin-border);
	border-radius: 7px;
	cursor: pointer;
	transition: border-color 0.2s var(--admin-ease), box-shadow 0.2s var(--admin-ease);
}

#menu select:hover,
.admin-select:hover,
#menu select:focus,
.admin-select:focus {
	border-color: var(--admin-primary-hover);
	outline: none;
	box-shadow: 0 0 0 3px var(--admin-primary-soft);
}

#menu div {
	position: absolute;
	visibility: hidden;
	margin: 0 0 0 -1px;
	padding: 6px;
	border: 1px solid var(--admin-border);
	border-radius: var(--admin-radius-sm);
	background: var(--admin-surface);
	box-shadow: var(--admin-shadow);
}

#menu div a {
	position: relative;
	display: block;
	margin: 0;
	padding: 8px 12px;
	width: auto;
	white-space: nowrap;
	text-align: left;
	text-decoration: none;
	background: transparent;
	color: var(--admin-text);
	font: 600 12px/1.4 var(--admin-font);
	border: 0;
	border-radius: 6px;
}

#menu div a:hover {
	background: var(--admin-primary-soft);
	color: var(--admin-primary-pressed);
}

.news {
	padding: 15px 0 10px 0;
}

/* ---- Data tables ---- */

.table,
.table2,
.table3 {
	max-width: none;
	border: 0;
	border-collapse: separate;
	border-spacing: 0;
	background: var(--admin-surface);
	border-radius: var(--admin-radius);
	overflow: hidden;
	box-shadow: var(--admin-shadow-sm);
	outline: 1px solid var(--admin-border);
	margin-bottom: 16px;
}

.table th,
.table3 th {
	text-align: left;
	color: #ffffff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
	padding: 12px 16px;
	border: 0;
	border-radius: 0;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: none;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	background-color: #212529;
	background-image: var(--admin-brushed-metal-bg);
	box-shadow:
		inset 0 1px 0 0 rgba(255, 255, 255, 0.28),
		inset 0 -1px 0 0 rgba(0, 0, 0, 0.7);
}

.table td {
	background-color: var(--admin-surface);
	padding: 14px 16px;
	border: 0;
	border-bottom: 1px solid var(--admin-border);
	border-radius: 0;
	vertical-align: middle;
	transition: background-color 0.15s var(--admin-ease);
}

.table tr:last-child td {
	border-bottom: 0;
}

.table tr:hover td {
	background-color: var(--admin-surface-muted);
}

.table2 th {
	text-align: left;
	border: 0;
	border-radius: 0;
	padding: 14px 16px;
	color: var(--admin-text-secondary);
	font-weight: 600;
	background: var(--admin-surface-muted);
	border-bottom: 1px solid var(--admin-border);
}

.table2 td {
	background-color: var(--admin-surface);
	padding: 14px 16px;
	border: 0;
	border-bottom: 1px solid var(--admin-border);
	border-radius: 0;
}

.table2 tr:last-child td {
	border-bottom: 0;
}

.table3 th {
	padding: 12px 14px;
}

.table3 td {
	background-color: var(--admin-surface);
	padding: 10px 12px;
	border: 0;
	border-bottom: 1px solid var(--admin-border);
}

.table3 tr:last-child td {
	border-bottom: 0;
}

/* Nested editor tables stay lighter / less “card-in-card” */
form .table3,
.table .table3,
.table2 .table3 {
	box-shadow: none;
	outline: 1px solid var(--admin-border);
	border-radius: var(--admin-radius-sm);
}

/* ---- Form controls (admin density) ---- */

input.text,
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="url"],
textarea,
select:not(#menu select):not(.admin-select) {
	border: 1px solid var(--admin-border-strong);
	border-radius: var(--admin-radius-sm);
	background: var(--admin-surface);
	color: var(--admin-text);
	padding: 8px 12px;
	font-size: 14px;
	transition: border-color 0.2s var(--admin-ease), box-shadow 0.2s var(--admin-ease);
}

input.text {
	height: auto;
	min-height: 36px;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
	outline: none;
	border-color: var(--admin-primary-hover);
	box-shadow: 0 0 0 3px var(--admin-primary-soft);
}

/* ---- Buttons (brushed dark aluminum) ---- */

.button,
.button2,
.disabled_button,
.answer_later,
.points_nr {
	appearance: none;
	-webkit-appearance: none;
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	vertical-align: middle;
	padding: 0.55rem 1.15rem;
	margin: 4px 6px 4px 0;
	font-family: var(--admin-font);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.01em;
	text-transform: none;
	text-align: center;
	color: #ffffff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
	cursor: pointer;
	border-radius: 16px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	background-color: #212529;
	background-image: var(--admin-brushed-metal-bg);
	box-shadow:
		inset 0 1px 0 0 rgba(255, 255, 255, 0.35),
		inset 0 -1px 0 0 rgba(0, 0, 0, 0.8),
		inset 0 0 12px 0 rgba(0, 0, 0, 0.4),
		0 8px 20px -4px rgba(0, 0, 0, 0.6),
		0 2px 5px 0 rgba(0, 0, 0, 0.4);
	transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
	overflow: hidden;
	height: auto;
	min-height: 36px;
	transform: none;
	transform-style: flat;
}

.button:hover,
.button2:hover,
.answer_later:hover {
	filter: brightness(1.12);
	transform: translateY(-1px);
	box-shadow:
		inset 0 1px 0 0 rgba(255, 255, 255, 0.45),
		inset 0 -1px 0 0 rgba(0, 0, 0, 0.75),
		inset 0 0 12px 0 rgba(0, 0, 0, 0.3),
		0 12px 26px -4px rgba(0, 0, 0, 0.65),
		0 4px 8px 0 rgba(0, 0, 0, 0.45);
}

.button:active,
.button2:active,
.answer_later:active {
	transform: translateY(1.5px);
	filter: brightness(0.95);
	box-shadow:
		inset 0 2px 6px 0 rgba(0, 0, 0, 0.7),
		inset 0 1px 0 0 rgba(0, 0, 0, 0.5),
		inset 0 -1px 0 0 rgba(255, 255, 255, 0.12),
		0 2px 4px 0 rgba(0, 0, 0, 0.35);
}

.button.disabled,
.button2.disabled,
.disabled_button,
.button.disabled:hover,
.button2.disabled:hover {
	background-color: #3a3e44;
	background-image:
		linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 18%),
		repeating-linear-gradient(
			0deg,
			rgba(255, 255, 255, 0.06) 0px,
			rgba(255, 255, 255, 0.06) 1px,
			rgba(0, 0, 0, 0.12) 1px,
			rgba(0, 0, 0, 0.12) 2px
		),
		linear-gradient(180deg, #4a4f56 0%, #3a3e44 50%, #2e3238 100%);
	border-color: rgba(255, 255, 255, 0.1);
	color: #c8ccd2;
	text-shadow: none;
	cursor: default;
	transform: none;
	filter: none;
	opacity: 0.72;
	box-shadow:
		inset 0 1px 0 0 rgba(255, 255, 255, 0.15),
		inset 0 -1px 0 0 rgba(0, 0, 0, 0.5),
		0 2px 4px 0 rgba(0, 0, 0, 0.25);
}

/* Amber / yellow brushed metal */
.yellow_button,
.finish_button {
	border-color: rgba(255, 230, 150, 0.45) !important;
	background-color: #d97706 !important;
	background-image:
		linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0) 18%),
		repeating-linear-gradient(
			0deg,
			rgba(255, 240, 180, 0.18) 0px,
			rgba(255, 240, 180, 0.18) 1px,
			rgba(100, 50, 0, 0.14) 1px,
			rgba(100, 50, 0, 0.14) 2px
		),
		linear-gradient(
			180deg,
			#fbbf24 0%,
			#f59e0b 35%,
			#d97706 70%,
			#b45309 100%
		) !important;
	box-shadow:
		inset 0 1px 0 0 rgba(255, 250, 220, 0.55),
		inset 0 -1px 0 0 rgba(0, 0, 0, 0.55),
		inset 0 0 12px 0 rgba(120, 60, 0, 0.25),
		0 8px 20px -4px rgba(180, 83, 9, 0.45),
		0 2px 5px 0 rgba(0, 0, 0, 0.35) !important;
	color: #fff !important;
	text-shadow: 0 1px 2px rgba(80, 40, 0, 0.75);
}

.yellow_button:hover,
.finish_button:hover {
	filter: brightness(1.12);
	transform: translateY(-1px);
}

/* Gray brushed metal — secondary / skip */
.answer_later {
	border-color: rgba(255, 255, 255, 0.22) !important;
	background-color: #6b7280 !important;
	background-image:
		linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0) 18%),
		repeating-linear-gradient(
			0deg,
			rgba(255, 255, 255, 0.12) 0px,
			rgba(255, 255, 255, 0.12) 1px,
			rgba(0, 0, 0, 0.1) 1px,
			rgba(0, 0, 0, 0.1) 2px
		),
		linear-gradient(
			180deg,
			#9ca3af 0%,
			#6b7280 35%,
			#4b5563 70%,
			#374151 100%
		) !important;
	box-shadow:
		inset 0 1px 0 0 rgba(255, 255, 255, 0.4),
		inset 0 -1px 0 0 rgba(0, 0, 0, 0.55),
		inset 0 0 12px 0 rgba(0, 0, 0, 0.22),
		0 8px 20px -4px rgba(55, 65, 81, 0.4),
		0 2px 5px 0 rgba(0, 0, 0, 0.3) !important;
	color: #fff !important;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}

.answer_later:hover {
	filter: brightness(1.12);
	transform: translateY(-1px);
}

/* Red brushed metal — vivid red */
.red_button {
	border-color: rgba(255, 160, 150, 0.35) !important;
	background-color: #dc2626 !important;
	background-image:
		linear-gradient(180deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0) 18%),
		repeating-linear-gradient(
			0deg,
			rgba(255, 200, 190, 0.14) 0px,
			rgba(255, 200, 190, 0.14) 1px,
			rgba(80, 0, 0, 0.16) 1px,
			rgba(80, 0, 0, 0.16) 2px
		),
		linear-gradient(
			180deg,
			#ef4444 0%,
			#dc2626 35%,
			#b91c1c 70%,
			#7f1d1d 100%
		) !important;
	box-shadow:
		inset 0 1px 0 0 rgba(255, 220, 210, 0.45),
		inset 0 -1px 0 0 rgba(0, 0, 0, 0.75),
		inset 0 0 12px 0 rgba(80, 0, 0, 0.35),
		0 8px 20px -4px rgba(127, 29, 29, 0.55),
		0 2px 5px 0 rgba(0, 0, 0, 0.4) !important;
	color: #fff !important;
}

.red_button:hover {
	filter: brightness(1.12);
	transform: translateY(-1px);
}

/* Green brushed metal — success / save */
.green_button {
	border-color: rgba(180, 255, 190, 0.32) !important;
	background-color: #15803d !important;
	background-image:
		linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 18%),
		repeating-linear-gradient(
			0deg,
			rgba(200, 255, 210, 0.12) 0px,
			rgba(200, 255, 210, 0.12) 1px,
			rgba(0, 40, 0, 0.14) 1px,
			rgba(0, 40, 0, 0.14) 2px
		),
		linear-gradient(
			180deg,
			#22c55e 0%,
			#16a34a 35%,
			#15803d 70%,
			#14532d 100%
		) !important;
	box-shadow:
		inset 0 1px 0 0 rgba(210, 255, 220, 0.4),
		inset 0 -1px 0 0 rgba(0, 0, 0, 0.75),
		inset 0 0 12px 0 rgba(0, 40, 0, 0.35),
		0 8px 20px -4px rgba(20, 83, 45, 0.55),
		0 2px 5px 0 rgba(0, 0, 0, 0.4) !important;
	color: #fff !important;
}

.green_button:hover {
	filter: brightness(1.12);
	transform: translateY(-1px);
}

/* Compact icon / utility buttons inside editors */
.table3 button:not(.button):not(.button2),
#sentences button,
#ordering_table button {
	appearance: none;
	min-width: 36px;
	min-height: 36px;
	padding: 6px 10px;
	margin: 0 2px;
	border: 1px solid var(--admin-border);
	border-radius: 8px;
	background: var(--admin-surface-muted);
	color: var(--admin-text-secondary);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s var(--admin-ease), border-color 0.15s var(--admin-ease), color 0.15s var(--admin-ease);
}

.table3 button:not(.button):not(.button2):hover,
#sentences button:hover,
#ordering_table button:hover {
	background: var(--admin-steel-gradient-hover);
	border-color: var(--admin-steel-mid);
	color: var(--admin-steel-edge);
	box-shadow: var(--admin-steel-3d);
}

form {
	margin: 0;
	padding: 0;
}

.message {
	color: var(--admin-success);
	text-align: center;
	font-weight: 700;
	padding: 12px 16px;
	margin-bottom: 16px;
	background: var(--admin-success-soft);
	border: 1px solid #bbf7d0;
	border-radius: var(--admin-radius-sm);
}

.login_box {
	background-image: none;
	background: var(--admin-surface);
	height: auto;
	min-height: 170px;
	border: 1px solid var(--admin-border);
	border-radius: var(--admin-radius);
	box-shadow: var(--admin-shadow);
	padding: 24px;
}

.admin-login-wrap {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-sizing: border-box;
}

.admin-login-wrap .login_box {
	width: 100%;
	max-width: 420px;
}

.admin-login-wrap .login_box table {
	width: 100%;
}

.admin-login-wrap .login_box input[type="text"],
.admin-login-wrap .login_box input[type="password"] {
	width: 100%;
	box-sizing: border-box;
	min-height: 40px;
	padding: 8px 12px;
	border: 1px solid var(--admin-border);
	border-radius: var(--admin-radius-sm);
}

.login {
	color: var(--admin-text);
	font-weight: 700;
}

.login_title {
	color: var(--admin-text);
	font-size: 20px;
	font-weight: 700;
	padding-top: 4px;
	padding-bottom: 15px;
}

.previous {
	font-weight: normal;
	padding-left: 5px;
	padding-right: 5px;
	color: var(--admin-text-secondary);
}

.selected_page,
.next {
	font-weight: 700;
	padding-left: 5px;
	padding-right: 5px;
	border-left: 1px solid var(--admin-border);
	color: var(--admin-primary);
}

.next {
	font-weight: normal;
}

.page {
	color: var(--admin-text-secondary);
	font-weight: normal;
	padding-left: 5px;
	padding-right: 5px;
	border-left: 1px solid var(--admin-border);
}

.pages {
	margin: 16px 0 8px;
	text-align: left;
	width: 100%;
}

.pages a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 36px;
	height: 36px;
	padding: 0 10px;
	margin: 0 2px;
	border-radius: 8px;
	border: 1px solid var(--admin-border);
	background: var(--admin-surface);
	text-decoration: none;
	color: var(--admin-text-secondary);
	font-weight: 600;
}

.pages a:hover,
.pages .selected_page {
	background: var(--admin-steel-gradient);
	border-color: var(--admin-steel-mid);
	color: #ffffff;
	text-shadow: 0 1px 1px rgba(15, 23, 42, 0.35);
	box-shadow: var(--admin-steel-3d);
}

hr {
	border: 0;
	border-top: 1px solid var(--admin-border);
	color: var(--admin-border);
	margin: 24px 0;
}

.input_text {
	border: 1px solid var(--admin-border);
	color: var(--admin-text);
	background-color: var(--admin-surface-muted);
	margin: 0 1px;
	font-family: var(--admin-font);
	font-size: 16px;
	text-align: center;
	font-weight: bold;
	border-radius: 8px;
	padding: 6px 8px;
}
span.input_text {
	padding: 2px 0px;
}

.result {
	border-radius: var(--admin-radius);
	margin: 10px 3px;
	background-color: var(--admin-warning);
	color: #fff;
	padding: 12px 18px;
	width: 290px;
	text-align: center;
	font-size: 22px;
	font-weight: 700;
	box-shadow: var(--admin-shadow-sm);
}

.points {
	font-size: 18px;
	text-align: center;
	background-color: rgba(255, 255, 255, 0.5);
}

.correct {
	color: #059669;
}

.wrong {
	text-decoration: line-through;
	color: var(--admin-danger);
}

.wrong2 {
	color: var(--admin-danger);
}

.correct_answer {
	top: -22px;
	color: #059669;
	position: absolute;
	left: 2px;
	display: inline;
	white-space: nowrap;
	font-weight: normal;
}

.correct_answer2 {
	color: #059669;
	position: absolute;
	top: -18px;
	display: inline;
	white-space: nowrap;
	font-weight: normal;
}

.correct_answer3 {
	color: #059669;
	position: absolute;
	top: -18px;
	left: 13px;
	display: inline;
	white-space: nowrap;
	font-weight: bold;
}

.correct_answer4 {
	color: #059669;
	font-weight: normal;
}

.correct_answer_container {
	position: absolute;
	display: inline;
}

.ordering_numeral {
	font-weight: bold;
	width: 36px;
	min-width: 36px;
	padding-left: 4px;
	padding-right: 4px;
	text-align: center;
}

.text,
.text2 {
	margin: 0;
	padding: 0;
}

.finished {
	background-color: var(--admin-surface);
}

.msg a {
	position: absolute;
	right: 15px;
	top: 12px;
	color: var(--admin-text);
	font-family: var(--admin-font);
	font-size: 12px;
}

.help {
	cursor: help;
	background-image: url(images/help_icon.gif);
	background-position: right;
	background-repeat: no-repeat;
	padding-right: 20px;
}

.href {
	color: var(--admin-accent);
	text-decoration: underline;
	cursor: pointer;
}

.owl_competition {
	float: right;
	margin-right: 30px;
	margin-top: 35px;
}

.question_image {
	float: right;
	margin: 0px 0px 0px 25px;
	border: 5px solid #fcfcfc !important;
	background-color: var(--admin-surface);
	box-shadow: 0 4px 24px 10px rgba(15, 23, 42, 0.1);
	cursor: zoom-in;
	transition:
		transform 0.25s var(--admin-ease),
		box-shadow 0.25s var(--admin-ease);
	transform-style: flat;
	border-radius: var(--admin-radius);
}

.question_image:hover {
	transform: translateY(-2px) scale(1.02);
	box-shadow: 0 8px 32px 10px rgba(15, 23, 42, 0.14);
}

/* Video lives inside .question_image — frame on .lazy-video, not the wrapper */
.question_image.video-container {
	border: none !important;
	background: transparent;
	box-shadow: none;
	cursor: default;
	margin-bottom:15px;
}
.question_image.video-container:hover {
	transform: none;
	box-shadow: none;
}

.lazy-video {
	margin-top: 15px;
	border: 5px solid #fcfcfc !important;
	background-color: var(--admin-surface);
	box-shadow: 0 4px 24px 10px rgba(15, 23, 42, 0.1);
	border-radius: var(--admin-radius);
	display: block;
	box-sizing: border-box;
	cursor: pointer;
	transition:
		transform 0.25s var(--admin-ease),
		box-shadow 0.25s var(--admin-ease);
}
.lazy-video:hover {
	transform: translateY(-2px) scale(1.02);
	box-shadow: 0 8px 32px 10px rgba(15, 23, 42, 0.14);
}

.Wirisformula {
	vertical-align: middle;
}

.results_div {
	padding: 15px 0;
}

.results_div a {
	color: var(--admin-text-muted);
}

#saved {
	color: var(--admin-text-muted);
	font-weight: 700;
}

#image-drop-zone {
	border: 2px dashed var(--admin-border-strong);
	border-radius: var(--admin-radius);
	display: flex;
	justify-content: center;
	align-items: center;
	transition: border-color 0.25s var(--admin-ease), background 0.25s var(--admin-ease);
	text-align: center;
	padding: 28px;
	margin: 16px 0;
	cursor: grabbing;
	background: var(--admin-surface-muted);
	color: var(--admin-text-secondary);
}

#image-drop-zone:hover {
	border-color: var(--admin-primary-hover);
	background: var(--admin-primary-soft);
}

.rounded-block {
	background-color: var(--admin-surface);
	border: 1px solid var(--admin-border);
	border-radius: var(--admin-radius);
	padding: 20px;
	box-shadow: var(--admin-shadow-sm);
}

/* CKEditor 5 content images (public + admin preview) */
figure.image-style-align-left,
figure.image.image-style-wrap-left,
.image-style-align-left {
	float: left;
	margin-right: 1.5rem;
	margin-bottom: 1rem;
}

figure.image-style-align-right,
figure.image.image-style-wrap-right,
.image-style-align-right {
	float: right;
	margin-left: 1.5rem;
	margin-bottom: 1rem;
}

.image-style-side,
figure.image-style-side {
	float: right;
	margin-left: 1.5rem;
	margin-bottom: 1rem;
	max-width: 50%;
}

figure.image.image-style-align-center,
.image-style-align-center {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

figure.image {
	display: block;
	width: auto;
	max-width: 100%;
	box-sizing: border-box;
	min-width: 0;
}

figure.image img {
	display: block;
	width: auto;
	max-width: 100%;
	min-width: 0;
	height: auto;
	margin: 0;
}

figure.image.image_resized {
	max-width: 100%;
	box-sizing: border-box;
	min-width: 0;
}

figure.image.image_resized > img {
	width: 100%;
	max-width: 100%;
	height: auto;
}

/* ---- Motion: subtle presence ---- */

@media (prefers-reduced-motion: no-preference) {
	.admin-header-inner {
		animation: admin-header-in 0.45s var(--admin-ease) both;
	}

	.admin-content-wrap {
		animation: admin-content-in 0.5s var(--admin-ease) 0.05s both;
	}

	.contentheading::after {
		transform-origin: left center;
		animation: admin-underline-in 2s var(--admin-ease) 1s both;
	}
}

@keyframes admin-header-in {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes admin-content-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes admin-underline-in {
	from {
		transform: scaleX(0);
		opacity: 0;
	}
	to {
		transform: scaleX(1);
		opacity: 1;
	}
}

@media (max-width: 900px) {
	.admin-header-inner {
		padding: 6px 12px;
	}

	.admin-content-wrap {
		padding: 18px 14px 28px !important;
	}

	.sitename {
		font-size: 12px;
		padding: 0;
	}

	.contentheading {
		font-size: 16px;
	}

	.admin-switch-wrap {
		font-size: 12px;
		gap: 8px;
	}

	#menu {
		width: 100%;
	}
}
