/* GameOn — админ / тэмцээний нийтлэг харанхуй зохиомж */
@import url("tokens.css");

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	-webkit-tap-highlight-color: transparent;
}

html,
body {
	min-height: 100%;
}

body.admin-body {
	background: var(--bg);
	color: var(--text);
	font-family: Arial, "Segoe UI", Helvetica, sans-serif;
	line-height: 1.4;
}

a {
	color: var(--yellow);
}

.topbar {
	position: sticky;
	top: 0;
	z-index: 20;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 0.5rem;
	color: var(--white);
	padding: 0.55rem 0.7rem;
	padding-top: calc(0.55rem + env(safe-area-inset-top));
}

.topbar .title {
	text-align: center;
	min-width: 0;
}

.topbar .title strong {
	display: block;
	font-size: clamp(0.95rem, 3.6vw, 1.2rem);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.topbar .title small {
	display: block;
	font-size: 0.75rem;
	opacity: 0.9;
	font-weight: 400;
}

.pill-btn {
	font-family: inherit;
	font-size: 0.85rem;
	padding: 0.35rem 0.8rem;
	border: 1.5px solid rgba(255, 255, 255, 0.85);
	border-radius: 2em;
	background: transparent;
	color: var(--white);
	cursor: pointer;
	white-space: nowrap;
	text-decoration: none;
}

.pill-btn.pill-danger {
	border-color: #f87171;
	color: #fecaca;
}

.wrap {
	max-width: 52rem;
	margin: 0 auto;
	padding: 0.9rem 0.85rem 3rem;
}

.section {
	border-bottom: 1px solid var(--line);
	padding: 1rem 0;
}

.section h2,
.section h3 {
	font-size: 1rem;
	margin-bottom: 0.65rem;
	font-weight: 700;
}

.muted {
	color: var(--muted);
	font-size: 0.85rem;
}

.flow-list {
	padding-left: 1.2rem;
	color: var(--muted);
	font-size: 0.9rem;
}

.flow-list li {
	margin: 0.25rem 0;
}

.flow-list .now {
	color: var(--yellow);
	font-weight: 700;
}

label.field .hint,
.hint {
	display: block;
	margin-top: 0.25rem;
	font-size: 0.75rem;
	color: #8a9a96;
	font-weight: 400;
}

.hint-inline {
	font-size: 0.78rem;
	color: #8a9a96;
	font-weight: 400;
}

.choice-row {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
	margin: 0.5rem 0;
}

.choice {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	padding: 0.55rem 0.7rem;
	border: 1px solid #444;
	border-radius: 0.4rem;
	background: rgba(255,255,255,0.03);
	cursor: pointer;
	font-size: 0.95rem;
}

.choice:has(input:checked) {
	border-color: var(--green-mid);
	background: rgba(0, 120, 90, 0.15);
}

.setup-tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0;
	margin: 0 0 0.55rem;
	border: 1px solid #c5d4ce;
	background: #fff;
}

.setup-tab {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0.7rem 0.5rem;
	cursor: pointer;
	font-size: 0.95rem;
	font-weight: 800;
	color: #0a1a16;
	background: #fff;
	border: 0;
	text-align: center;
}

.setup-tab + .setup-tab {
	border-left: 1px solid #c5d4ce;
}

.setup-tab input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.setup-tab:has(input:checked) {
	background: #0b2e28;
	color: #fff;
}

.format-preview {
	margin-top: 0.85rem;
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.fp-summary {
	font-size: 0.85rem;
	color: #9eb5ad;
	padding: 0.45rem 0.6rem;
	border-radius: 0.3rem;
	background: rgba(255,255,255,0.04);
}

.fp-summary b {
	color: #e8fff6;
}

.fp-block-title {
	font-size: 0.8rem;
	font-weight: 700;
	color: #c5ddd4;
	margin: 0 0 0.4rem;
	letter-spacing: 0.02em;
}

.fp-rr-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
	gap: 0.55rem;
}

.fp-rr-card {
	border: 1px solid #3a5550;
	border-radius: 0.35rem;
	overflow: hidden;
	background: #0d1614;
}

.fp-rr-card header {
	padding: 0.3rem 0.45rem;
	font-size: 0.78rem;
	font-weight: 700;
	background: #1a332c;
	color: var(--yellow, #f5c542);
}

.fp-rr-card table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.72rem;
}

.fp-rr-card th,
.fp-rr-card td {
	border-top: 1px solid #2a3f3a;
	padding: 0.22rem 0.35rem;
	text-align: center;
	color: #a8beb6;
}

.fp-rr-card th {
	color: #7a9088;
	font-weight: 600;
}

.fp-rr-card td.name {
	text-align: left;
	color: #d0e4dc;
}

.fp-rr-card td.diag {
	background: #15221e;
	color: #3a4a46;
}

.fp-se-wrap {
	display: flex;
	align-items: stretch;
	gap: 0;
	overflow-x: auto;
}

.fp-se {
	--fp-se-link: 1.15rem;
	--fp-se-line: #5a7a70;
	display: flex;
	gap: 0;
	align-items: stretch;
	min-width: max-content;
	padding: 0.15rem 0 0.35rem;
}

.fp-se-col {
	display: flex;
	flex-direction: column;
	min-width: 6.4rem;
	flex: 0 0 auto;
}

.fp-se-col .fp-se-head {
	font-size: 0.72rem;
	font-weight: 700;
	color: var(--yellow, #f5c542);
	text-align: center;
	margin-bottom: 0.35rem;
	min-height: 2.4rem;
	padding: 0 var(--fp-se-link);
	line-height: 1.25;
}

.fp-se-body {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.fp-se-item {
	position: relative;
	flex: 1;
	display: flex;
	align-items: center;
	padding: 0.25rem var(--fp-se-link);
	min-height: 4.2rem;
}

.fp-se-col:first-child .fp-se-item {
	padding-left: 0;
}

.fp-se-col:last-child .fp-se-item {
	padding-right: 0;
}

/* хэвтээ гарц — дараагийн тойрог руу */
.fp-se-col:not(:last-child) .fp-se-item::after {
	content: "";
	position: absolute;
	right: 0;
	top: 50%;
	width: var(--fp-se-link);
	height: 2px;
	background: var(--fp-se-line);
}

/* хос тоглолтын гол — босоо шугам */
.fp-se-col:not(:last-child) .fp-se-item:nth-child(odd)::before {
	content: "";
	position: absolute;
	right: 0;
	top: 50%;
	width: 2px;
	height: 100%;
	background: var(--fp-se-line);
}

.fp-se-body.single .fp-se-item:nth-child(odd)::before {
	display: none;
}

.fp-se-col:not(:first-child) .fp-se-item > .fp-se-match {
	position: relative;
}

.fp-se-col:not(:first-child) .fp-se-item > .fp-se-match::before {
	content: "";
	position: absolute;
	left: calc(-1 * var(--fp-se-link));
	top: 50%;
	width: var(--fp-se-link);
	height: 2px;
	background: var(--fp-se-line);
}

.fp-se-third {
	margin-left: 0.85rem;
	padding: 0.15rem 0 0.35rem 0.85rem;
	border-left: 1px dashed #3a5550;
	min-width: 6.4rem;
	flex: 0 0 auto;
}

.fp-se-third .fp-se-head {
	font-size: 0.72rem;
	font-weight: 700;
	color: var(--yellow, #f5c542);
	text-align: center;
	margin-bottom: 0.35rem;
	min-height: 2.4rem;
	line-height: 1.25;
}

.fp-se-match {
	width: 100%;
	border: 1px solid #3a5550;
	border-radius: 0.25rem;
	padding: 0.28rem 0.35rem;
	background: #0d1614;
	font-size: 0.7rem;
	color: #b8cfc6;
	box-sizing: border-box;
}

.fp-se-match .slot {
	padding: 0.12rem 0;
	border-bottom: 1px dashed #2a3f3a;
}

.fp-se-match .slot:last-child {
	border-bottom: 0;
}

.fp-se-match .vs {
	text-align: center;
	font-size: 0.62rem;
	color: #5a7068;
	padding: 0.08rem 0;
}

.fp-seed-scheme {
	margin-top: 0.45rem;
	padding: 0.5rem 0.6rem;
	border-radius: 0.3rem;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid #2a3f3a;
	font-size: 0.72rem;
	color: #9eb5ad;
	line-height: 1.45;
	white-space: pre-wrap;
	font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
}

.fp-seed-scheme strong {
	color: #e8fff6;
	font-family: inherit;
}

.fp-empty {
	font-size: 0.82rem;
	color: #7a9088;
	padding: 0.5rem 0;
}

.se-auto-size {
	margin: 0.55rem 0 0.75rem;
	padding: 0.55rem 0.7rem;
	border-radius: 0.35rem;
	background: rgba(0, 120, 90, 0.12);
	border: 1px solid #2a5a50;
	font-size: 0.92rem;
	color: #d7ebe4;
}

.se-auto-size strong {
	color: var(--yellow, #f5c542);
	font-size: 1.05rem;
}

.legs-by-round {
	margin-top: 0.35rem;
}

.legs-by-round .legs-rows {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.legs-by-round .legs-title {
	display: block;
	font-size: 0.95rem;
	color: var(--text);
}

.legs-by-round .leg-row {
	display: grid;
	grid-template-columns: minmax(6rem, 1fr) auto auto auto auto;
	gap: 0.45rem;
	align-items: center;
	margin: 0.45rem 0;
	font-size: 0.92rem;
	color: var(--text);
}

.legs-by-round .format-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.55rem;
	margin: 0.3rem 0;
	font-size: 0.86rem;
}

.legs-by-round .format-row .leg-tag {
	flex: 0 0 auto;
	min-width: 5.25rem;
	max-width: 7.5rem;
}

.legs-by-round .format-mode {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 0.45rem;
}

.legs-by-round .format-mode label {
	display: inline-flex;
	align-items: center;
	gap: 0.2rem;
	font-size: 0.86rem;
	font-weight: 600;
	color: var(--text);
	cursor: pointer;
	white-space: nowrap;
}

.legs-by-round .fmt-legs-only,
.legs-by-round .fmt-sets-only {
	display: inline-flex;
	flex: 1 1 auto;
	flex-wrap: nowrap;
	align-items: center;
	gap: 0.28rem;
	min-width: 0;
	color: var(--text);
}

.legs-by-round .fmt-sets-only.hidden,
.legs-by-round .fmt-legs-only.hidden {
	display: none;
}

.legs-by-round .fmt-set-legs {
	display: inline-flex;
	align-items: center;
	gap: 0.2rem;
	color: var(--muted);
	font-size: 0.82rem;
	white-space: nowrap;
}

.rr-format-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.55rem;
	margin: 0.35rem 0 0.5rem;
}

.rr-format-line {
	display: inline-flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 0.45rem 0.65rem;
	margin: 0;
	color: var(--text);
}

.rr-format-line label {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	font-weight: 600;
	color: var(--text);
	cursor: pointer;
	white-space: nowrap;
}

.format-fields {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.28rem;
	margin: 0;
	color: var(--text);
}

.format-fields.hidden {
	display: none;
}

.format-fields input[type="number"] {
	width: 2.65rem;
	min-width: 2.65rem;
	text-align: center;
	margin-top: 0;
	padding: 0.2rem 0.15rem;
}

.legs-by-round .leg-row .leg-tag {
	font-weight: 700;
	color: var(--yellow, #f5c542);
	letter-spacing: 0.02em;
}

.legs-by-round .leg-row:not(.format-row) input {
	margin-top: 0;
	text-align: center;
	width: 100%;
}

.legs-by-round .format-row input[type="number"] {
	width: 2.65rem;
	min-width: 2.65rem;
	max-width: 2.65rem;
	margin: 0;
	padding: 0.2rem 0.15rem;
	text-align: center;
}

.legs-rows:empty::before {
	content: "Хэмжээ сонгоод үеүүд энд гарна…";
	display: block;
	color: #8a9a96;
	font-size: 0.82rem;
	padding: 0.3rem 0;
}

label.field > span,
label.field > .req {
	display: inline;
}

.req {
	color: #ff8a80;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
textarea,
select {
	display: block;
	width: 100%;
	margin-top: 0.3rem;
	font-family: inherit;
	font-size: 1rem;
	padding: 0.55rem 0.65rem;
	border: 1px solid #666;
	border-radius: 0.35rem;
	background: #111;
	color: var(--text);
}

textarea {
	min-height: 5rem;
	resize: vertical;
}

.row2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.7rem;
}

.row3 {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 0.55rem;
	margin-top: 0.7rem;
}

.check {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	margin: 0.45rem 0;
	font-size: 0.92rem;
	cursor: pointer;
}

.check input {
	margin-top: 0.2rem;
}

.subbox {
	margin: 0.55rem 0 0.55rem 1.2rem;
	padding: 0.55rem 0.65rem;
	border-left: 3px solid var(--green-mid);
	background: rgba(255, 255, 255, 0.03);
}

#kind-row > #team-box {
	margin: 0 0 0 0.35rem;
	padding: 0.45rem 0.65rem;
}

.radio-line {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.5rem;
	margin: 0.4rem 0;
	font-size: 0.9rem;
}

.radio-line input[type="number"] {
	display: inline-block;
	width: 3.2rem;
	margin: 0;
	padding: 0.25rem 0.35rem;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: inherit;
	font-size: 1rem;
	padding: 0.75rem 1rem;
	border: 0;
	border-radius: 0.45rem;
	cursor: pointer;
	text-decoration: none;
	color: var(--white);
	width: 100%;
}

.btn + .btn {
	margin-top: 0.55rem;
}

.btn-blue {
	background: var(--blue);
}

.btn-orange {
	background: var(--orange);
}

.btn-red {
	background: var(--red);
}

.btn-pink {
	background: var(--pink);
	width: auto;
	min-width: 4.5rem;
	padding: 0.75rem 0.9rem;
}

.btn-white {
	background: var(--white);
	color: #222;
}

.btn-row {
	display: flex;
	gap: 0.5rem;
	margin-top: 0.55rem;
}

.btn-row .btn-blue {
	flex: 1;
}

.btn-row .btn-nav-side {
	flex: 0 0 auto;
	width: auto;
	min-width: 6.5rem;
}

.btn:disabled {
	opacity: 0.45;
	cursor: default;
}

.url-box {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.url-box input {
	font-size: 0.85rem;
}

.copy-btn {
	width: auto;
	align-self: flex-start;
	padding: 0.4rem 0.9rem;
	font-size: 0.9rem;
}

.footer-links {
	text-align: center;
	padding: 1.2rem 0 0.4rem;
	font-size: 0.85rem;
}

.footer-links a {
	margin: 0 0.2rem;
	color: var(--muted);
	text-decoration: none;
	font-size: 0.85rem;
}

.admin-footer-bar {
	padding: 0.75rem 0 1.25rem;
	text-align: center;
	border-top: 1px solid var(--line);
	margin-top: 0.5rem;
}

.admin-gate {
	position: fixed;
	inset: 0;
	z-index: 200;
	background: color-mix(in srgb, var(--chrome, #1a1a1a) 92%, transparent);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.admin-gate-card {
	background: #f2ebd4;
	color: #0a1a16;
	max-width: 22rem;
	width: 100%;
	border-radius: 0.5rem;
	padding: 1.25rem;
	border: 2px solid #9bb8ad;
	text-align: center;
}

.admin-gate-card h1 {
	font-size: 1.15rem;
	margin: 0 0 0.75rem;
	color: #0a1a16;
}

.admin-gate-card p,
#gate-msg {
	margin: 0;
	color: #243830;
	line-height: 1.45;
	font-size: 0.95rem;
}

.admin-gate-actions {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	margin-top: 1rem;
}

.admin-session h2 {
	margin-bottom: 0.65rem;
}

.admin-session-user {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.85rem;
	padding: 0.65rem 0.75rem;
	background: var(--cell-white, #fff);
	border: 1px solid var(--border, #7a8a84);
	border-radius: 0.45rem;
}

.admin-session-user .org-user-text strong {
	color: var(--text-dark, #0a1a16);
}

.admin-session-user .org-user-text span {
	color: var(--ink-dim, #4a635a);
}

.admin-session-user .org-user-photo {
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.admin-session-user .org-user-text {
	display: grid;
	gap: 0.15rem;
	min-width: 0;
}

.admin-session-user .org-prov {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	font-weight: 800;
	flex-shrink: 0;
}

.admin-session-user .org-prov-fb {
	background: #1877f2;
	color: #fff;
	font-size: 1.35rem;
}

.admin-session-user .org-prov-g {
	background: #fff;
	color: #ea4335;
	border: 1px solid #dadce0;
	font-family: Georgia, serif;
	font-size: 1.2rem;
}

.admin-session-user .org-prov-local {
	background: #0b2e28;
	color: #fff;
	font-size: 0.72rem;
}

.admin-logout-icon .org-logout-fb {
	color: #1877f2;
	font-size: 1.1rem;
	font-weight: 800;
}

.admin-logout-icon .org-logout-g {
	color: #ea4335;
	font-size: 1.1rem;
	font-weight: 800;
}

.admin-logout-icon .org-logout-local {
	color: #0b2e28;
	font-weight: 800;
}

.btn-admin-logout {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	width: 100%;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	padding: 0.75rem 1rem;
	border: 1px solid var(--border, #7a8a84);
	border-radius: 0.45rem;
	cursor: pointer;
	background: var(--white, #fff);
	color: var(--text-dark, #0a1a16);
}

.btn-admin-logout:hover {
	background: #f3f3f3;
}

.admin-logout-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.25rem;
}

.acl-co-list {
	list-style: none;
	padding: 0;
	margin: 0.5rem 0 1rem;
}

.acl-co-list li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.35rem 0;
	border-bottom: 1px solid var(--line);
	font-size: 0.9rem;
}

.acl-co-list button {
	font-size: 0.75rem;
	padding: 0.2rem 0.5rem;
}

.btn-footer-delete {
	width: 100%;
	max-width: 20rem;
	margin: 0 auto;
	display: block;
	font-size: 0.95rem;
}

/* Entry list */
.entry-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0.7rem 0;
}

.entry-table td {
	border-bottom: 1px solid var(--line);
	padding: 0.45rem 0.25rem;
	vertical-align: middle;
}

.entry-table .num {
	width: 2rem;
	color: var(--muted);
	text-align: center;
}

.entry-table input {
	margin: 0;
	border: 0;
	background: transparent;
	padding: 0.35rem 0.2rem;
	color: var(--text);
}

.entry-table .team-members {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	padding: 0.35rem 0.15rem;
}

.entry-table .team-member-input {
	border: 1px solid var(--line);
	border-radius: 0.3rem;
	background: var(--bg2, rgba(255, 255, 255, 0.06));
	padding: 0.4rem 0.5rem;
	color: var(--text);
	width: 100%;
}

.entry-table .team-entry-row td {
	vertical-align: top;
}

.entry-table td {
	position: relative;
}

.player-suggest {
	position: absolute;
	z-index: 30;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #c8ccd4;
	border-radius: 0.4rem;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
	overflow: hidden;
}

.player-suggest .ps-item {
	display: flex;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.5rem 0.65rem;
	border: 0;
	border-bottom: 1px solid #eceef2;
	background: #fff;
	color: #14161a;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.player-suggest .ps-item:last-child {
	border-bottom: 0;
}

.player-suggest .ps-item:hover,
.player-suggest .ps-item.is-active {
	background: #e8f0fe;
}

.player-suggest .ps-name {
	font-weight: 600;
}

.player-suggest .ps-meta {
	color: #4a5160;
	font-size: 0.85em;
	white-space: nowrap;
}

.entry-table input.is-linked {
	box-shadow: inset 3px 0 0 #1a7f37;
}

.entry-table .team-entry-row .num {
	padding-top: 0.7rem;
}

.icon-btn {
	font-family: inherit;
	font-size: 1rem;
	width: 2rem;
	height: 2rem;
	border: 0;
	border-radius: 0.3rem;
	background: transparent;
	color: var(--blue2);
	cursor: pointer;
}

.icon-btn.del {
	color: var(--red);
}

.entry-actions td {
	color: var(--blue2);
	cursor: pointer;
	padding: 0.7rem 0.4rem;
}

.entry-actions.dim td {
	color: var(--muted);
	cursor: default;
}

/* Cards on home */
.card-list {
	display: grid;
	gap: 0.7rem;
}

.card {
	background: var(--bg2);
	border: 1px solid var(--line);
	border-radius: 0.55rem;
	padding: 0.9rem;
}

.card h3 {
	font-size: 1.05rem;
	margin-bottom: 0.25rem;
}

.card .meta {
	color: var(--muted);
	font-size: 0.82rem;
	margin-bottom: 0.7rem;
}

.card-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.card-actions .btn {
	width: auto;
	padding: 0.45rem 0.8rem;
	font-size: 0.88rem;
	margin: 0;
}

/* ---------- нийтлэг навбар (archive / profile) ---------- */

.admin-header {
	position: sticky;
	top: 0;
	z-index: 30;
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 0.5rem;
	color: var(--white);
	padding: 0.55rem 0.75rem;
	padding-top: calc(0.55rem + env(safe-area-inset-top));
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-header .header-mid {
	text-align: center;
	min-width: 0;
}

.admin-header .title {
	font-weight: 800;
	font-size: clamp(0.9rem, 3.2vw, 1.1rem);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: #fff;
}

.admin-header .sub {
	font-size: 0.72rem;
	opacity: 0.85;
	color: rgba(255, 255, 255, 0.88);
}

.admin-header .pill-btn {
	font-family: inherit;
	font-size: 0.82rem;
	padding: 0.32rem 0.75rem;
	border: 1.5px solid rgba(255, 255, 255, 0.85);
	border-radius: 2em;
	background: transparent;
	color: #fff;
	cursor: pointer;
	white-space: nowrap;
	text-decoration: none;
}

.admin-header a.pill-btn:hover {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}

.empty {
	text-align: center;
	color: var(--muted);
	padding: 2rem 1rem;
}

.toast {
	position: fixed;
	left: 50%;
	bottom: 1.5rem;
	transform: translateX(-50%) translateY(1rem);
	background: rgba(0, 0, 0, 0.9);
	color: #fff;
	padding: 0.55rem 1rem;
	border-radius: 0.4rem;
	opacity: 0;
	pointer-events: none;
	transition: 0.18s;
	z-index: 50;
}

.toast.show {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

.topbar-end {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	justify-self: end;
}

.topbar-user-wrap {
	position: relative;
}

.topbar-user-wrap > summary {
	list-style: none;
}

.topbar-user-wrap > summary::-webkit-details-marker {
	display: none;
}

.topbar-user {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	max-width: 9.75rem;
	padding: 0.18rem 0.55rem 0.18rem 0.2rem;
	border: 1.5px solid rgba(255, 255, 255, 0.85);
	border-radius: 2em;
	background: transparent;
	color: #fff;
	cursor: pointer;
	font-family: inherit;
}

.topbar-user-name {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-size: 0.78rem;
	font-weight: 700;
	color: #fff;
}

.topbar-user-mark {
	display: flex;
	flex-shrink: 0;
}

.topbar-user .org-prov,
.topbar-user-photo {
	width: 1.55rem;
	height: 1.55rem;
	border-radius: 50%;
	object-fit: cover;
}

.topbar-user .org-prov {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 0.52rem;
	font-weight: 800;
}

.topbar-user .org-prov-local {
	background: #0b2e28;
	color: #fff;
}

.topbar-user .org-prov-fb {
	background: #1877f2;
	color: #fff;
	font-size: 0.95rem;
}

.topbar-user .org-prov-g {
	background: #fff;
	color: #ea4335;
	border: 1px solid #dadce0;
	font-family: Georgia, serif;
	font-size: 0.9rem;
}

.topbar-user-menu {
	position: absolute;
	right: 0;
	top: calc(100% + 0.35rem);
	min-width: 7.5rem;
	padding: 0.35rem;
	background: #fff;
	border: 1px solid #c5d4ce;
	z-index: 30;
}

.topbar-logout {
	width: 100%;
	padding: 0.45rem 0.6rem;
	border: 0;
	background: #fff;
	color: #0a1a16;
	font-family: inherit;
	font-size: 0.85rem;
	font-weight: 700;
	cursor: pointer;
	text-align: left;
}

.topbar-logout:hover {
	background: #f2ebd4;
}

#step-preparing:not([data-setup="pro"]) .manual-only {
	display: none !important;
}

.plan-choice {
	display: grid;
	gap: 0.5rem;
	margin-top: 0.4rem;
}

.plan-choice label {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
	padding: 0.7rem 0.85rem;
	border: 1px solid #c9c1aa;
	border-radius: 10px;
	background: #fff;
	color: #16181a;
	cursor: pointer;
}

.plan-choice label:has(input:checked) {
	border-color: #16181a;
	box-shadow: inset 0 0 0 1px #16181a;
}

.plan-choice input {
	margin-top: 0.2rem;
}

.plan-choice strong {
	display: block;
}

.plan-choice small {
	display: block;
	margin-top: 0.15rem;
	color: #3d4248;
	font-size: 0.82rem;
	line-height: 1.4;
}

body.ops-body a.btn,
body.ops-body a.btn:visited,
body.ops-body a.btn:hover {
	color: #fff;
}

body.ops-body #admin-main:has(#step-making:not(.hidden)) {
	max-width: 76rem;
}

body.ops-body #rr-editor {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(26rem, 1fr));
	gap: 0 1.25rem;
	align-items: start;
}

body.ops-body #rr-editor > .rr-toolbar {
	grid-column: 1 / -1;
}

body.ops-body #rr-editor .group-block {
	margin: 0.6rem 0 1rem;
	overflow-x: auto;
	overflow-y: hidden;
}

body.ops-body .rr-table td.name-cell {
	padding: 0;
	text-align: left;
	min-width: 9rem;
}

body.ops-body .rr-table select {
	display: block;
	width: 100%;
	min-width: 9rem;
	max-width: none;
	margin: 0;
	padding: 0.4rem 1.3rem 0.4rem 0.45rem;
	border: 0;
	border-radius: 0;
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23d6dcd9'/%3E%3C/svg%3E") no-repeat right 0.45rem center;
	color: #fff;
	font-size: 0.82rem;
	font-weight: 600;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
}

body.ops-body .rr-table select:focus {
	outline: 2px solid #4da3ff;
	outline-offset: -2px;
}

body.ops-body .rr-table select option,
body.ops-body .se-slot select option {
	background: #fff;
	color: #111;
}

body.ops-body .se-slot select {
	display: block;
	width: 100%;
	margin: 0;
	padding: 0.1rem 1.1rem 0.1rem 0.1rem;
	border: 0;
	border-radius: 0;
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23555'/%3E%3C/svg%3E") no-repeat right 0.2rem center;
	color: #111;
	font-size: 0.85rem;
	font-weight: 600;
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
}

body.ops-body #se-editor .se-slot {
	grid-template-columns: 2.4rem 1fr 2.2rem;
	gap: 0;
	align-items: stretch;
	padding: 0;
}

body.ops-body #se-editor .se-slot > .seed,
body.ops-body #se-editor .se-slot > .lg {
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
}

body.ops-body #se-editor .se-wrap {
	background: transparent;
	padding-left: 0;
	padding-right: 0;
	--se-linecolor: #4a525c;
}

body.ops-body #se-editor .se-match {
	border: 1px solid #5f6873;
	box-shadow: none;
	width: 15rem;
	min-width: 15rem;
	max-width: 15rem;
}

body.ops-body #se-editor .se-col {
	min-width: 0;
	flex: 0 0 auto;
}

body.ops-body #se-editor .se-slot > .nm {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

body.ops-body #se-editor .se-slot {
	border-bottom: 1px solid #8a939d;
}

body.ops-body #se-editor .se-match > .se-slot:nth-child(2) {
	border-bottom: 0;
}

body.ops-body #se-editor .se-ref {
	border-color: #6b7480;
	color: #3d4651;
}

body.ops-body .rr-table td,
body.ops-body .rr-table th {
	border-color: #8c8c8c;
}

body.ops-body #rr-editor .rr-table td {
	height: 2.2rem;
	min-width: 2.2rem;
	box-sizing: border-box;
	vertical-align: middle;
}

body.ops-body #rr-editor .rr-table td .match-ord {
	vertical-align: middle;
}

body.ops-body #se-editor .se-slot > .seed {
	border-right: 1px solid #8a939d;
	color: #3d4651;
}

body.ops-body #se-editor .se-slot > .lg {
	border-left: 1px solid #8a939d;
	color: #14161a;
	font-variant-numeric: tabular-nums;
}

body.ops-body #se-editor .se-slot > select,
body.ops-body #se-editor .se-slot > .nm {
	align-self: center;
	padding-left: 0.45rem;
}

body.ops-body #se-editor .se-wrap {
	overflow: visible;
	width: max-content;
	min-width: 100%;
	box-sizing: border-box;
}

body.ops-body #se-editor {
	overflow-x: auto;
	overflow-y: hidden;
}

.join-pass-line {
	color: #0a1a16;
	font-size: 0.95rem;
}
.join-pass-line strong {
	font-size: 1.15rem;
	letter-spacing: 0.06em;
	color: #0a1a16;
}

.reg-admin-list {
	margin: 0 0 0.75rem;
	padding-left: 1.2rem;
	color: #0a1a16;
	font-size: 0.92rem;
}

.reg-admin-list li {
	margin: 0.2rem 0;
}

#manual-entry-wrap {
	cursor: default;
}

#manual-entry-wrap summary {
	cursor: pointer;
	font-weight: 800;
	color: #0a1a16;
	margin-bottom: 0.65rem;
}

.simple-preview {
	margin-top: 0.85rem;
	padding: 0.75rem 0.8rem;
	background: #fff;
	border: 1px solid #c5d4ce;
}

.simple-preview-lead,
.simple-preview-ko {
	margin: 0;
	color: #0a1a16;
	font-size: 0.88rem;
}

.simple-preview-ko {
	margin-top: 0.65rem;
	font-weight: 700;
}

.simple-preview-groups {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin-top: 0.65rem;
}

.simple-gcard {
	display: grid;
	gap: 0.12rem;
	min-width: 5.6rem;
	padding: 0.45rem 0.55rem;
	background: #f2ebd4;
	border: 1px solid #c5d4ce;
	color: #0a1a16;
}

.simple-gcard strong {
	font-size: 0.82rem;
}

.simple-gcard span,
.simple-gcard em {
	font-size: 0.75rem;
	font-style: normal;
	color: #1a2e28;
}

.simple-ko-scheme {
	display: flex;
	gap: 0.65rem;
	overflow-x: auto;
	margin-top: 0.75rem;
	padding-top: 0.55rem;
	border-top: 1px solid #c5d4ce;
}

.simple-ko-round {
	display: flex;
	flex-direction: column;
	justify-content: space-around;
	gap: 0.4rem;
	min-width: 7.2rem;
	flex: 1;
}

.simple-ko-round-title {
	margin: 0;
	font-size: 0.75rem;
	font-weight: 800;
	color: #0a1a16;
}

.simple-ko-match {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 0.25rem;
	padding: 0.4rem 0.45rem;
	background: #f2ebd4;
	border: 1px solid #c5d4ce;
	color: #0a1a16;
	font-size: 0.78rem;
	font-weight: 700;
}

.simple-ko-match i {
	font-style: normal;
	font-size: 0.68rem;
	font-weight: 600;
	color: #1a2e28;
	text-align: center;
}

.simple-ko-match span {
	text-align: center;
}

.hidden {
	display: none !important;
}

@media (max-width: 520px) {
	.row2,
	.row3 {
		grid-template-columns: 1fr;
	}
}
