/* Личный кабинет (cabinet): страницы входа и регистрации, список своих соревнований. Префикс классов — cb-.
   Цвета — из общей дизайн-системы (page-shell.css, переменные --sh-*). */

/* ---------- переменные ---------- */
.cb {
	--cb-error: var(--sh-red);
	--cb-error-soft: #fdecee;
}
.cb [hidden] { display: none !important; }

/* ---------- вход и регистрация ---------- */
.cb-auth { max-width: 26rem; margin: 2rem auto 0; }
.cb-auth__title { margin: 0 0 1.25rem; font-size: 1.5rem; text-align: center; }
.cb-form { display: flex; flex-direction: column; gap: 0.9rem; }
.cb-form input:not([type="checkbox"]):not([type="hidden"]) {
	width: 100%;
	min-height: 2.6rem;
	padding: 0.45rem 0.7rem;
	border: 1px solid var(--sh-line);
	border-radius: var(--sh-radius-sm);
	background: var(--sh-surface);
	color: var(--sh-ink);
	font: inherit;
	box-sizing: border-box;
}
.cb-form input:focus-visible { outline: none; border-color: var(--sh-blue); box-shadow: var(--sh-focus-ring); }
.cb-form .helptext,
.cb-form ul { margin: 0; padding-left: 1.1rem; color: var(--sh-faint); font-size: 0.78rem; }
.cb-field__error { color: var(--cb-error); font-size: 0.8rem; font-weight: 600; }
.cb-captcha { min-height: 102px; }
.cb-form__submit { justify-content: center; width: 100%; margin-top: 0.25rem; text-align: center; }
.cb-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.5rem;
	margin: 1rem 0 0.5rem;
	font-size: 0.9rem;
}
.cb-links a { color: var(--sh-blue); }

/* ---------- сообщения формы ---------- */
.cb-alert { margin: 0 0 1rem; padding: 0.75rem 1rem; border-radius: var(--sh-radius-sm); font-weight: 500; }
.cb-alert--error { background: var(--cb-error-soft); color: var(--cb-error); }

/* ---------- шапка кабинета ---------- */
.cb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.cb-head form { margin: 0; }
.cb-head__title { margin: 0; font-size: 2rem; line-height: 1.1; }
.cb-head__email { margin: 0.25rem 0 0; color: var(--sh-muted); overflow-wrap: anywhere; }
.cb-section { margin: 0 0 0.9rem; font-size: 1.1rem; }

/* ---------- плитки соревнований ---------- */
.cb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.cb-tile {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	min-height: 13rem;
	padding: 1rem;
	border: 1px solid var(--sh-line);
	border-radius: var(--sh-radius);
	background: var(--sh-surface);
	box-shadow: var(--sh-shadow);
	color: var(--sh-ink);
	text-decoration: none;
	animation: cc-rise 0.35s var(--sh-ease) both;
	transition: transform 0.2s var(--sh-ease), box-shadow 0.2s var(--sh-ease);
}
.cb-tile:hover { transform: translateY(-3px); box-shadow: var(--sh-shadow-hover); }
.cb-tile__link { position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.cb-tile__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.3rem; }
.cb-leaf {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 4.2rem;
	padding: 0.35rem 0.5rem;
	border-radius: var(--sh-radius-sm);
	background: var(--sh-navy);
	color: #fff;
}
.cb-leaf b { font-size: 1.7rem; line-height: 1; }
.cb-leaf span { font-size: 0.68rem; opacity: 0.85; white-space: nowrap; }
.cb-tile__name { margin: 0; font-size: 1.05rem; line-height: 1.25; overflow-wrap: anywhere; }
.cb-tile__dates { margin: 0; color: var(--sh-muted); font-size: 0.85rem; }
/* замечание модератора: заметная плашка с подписью */
.cb-remark {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	margin-top: 0.3rem;
	padding: 0.55rem 0.7rem;
	border-left: 3px solid var(--cb-error);
	border-radius: var(--sh-radius-sm);
	background: var(--cb-error-soft);
}
.cb-remark__title {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	color: var(--cb-error);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}
.cb-remark__title::before {
	display: grid;
	place-items: center;
	width: 1rem;
	height: 1rem;
	border-radius: 50%;
	background: currentColor;
	color: #fff;
	content: "!";
	font-size: 0.7rem;
	line-height: 1;
}
.cb-remark__text { margin: 0; color: var(--sh-ink); font-size: 0.88rem; line-height: 1.4; overflow-wrap: anywhere; }
.cb-remark--info { border-left-color: var(--sh-blue); background: var(--sh-blue-soft); }
.cb-remark--info .cb-remark__title { color: var(--sh-blue); }
.cb-tile__actions { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; padding-top: 0.5rem; }
.cb-tile--add {
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	border: 2px dashed var(--sh-line-strong);
	background: transparent;
	box-shadow: none;
	color: var(--sh-blue);
	font-weight: 600;
}
.cb-tile--add .cc-plus { width: 4rem; height: 4rem; }
.cb-tile--add:hover .cc-plus { transform: rotate(90deg) scale(1.08); background: var(--sh-blue); color: #fff; }

/* ---------- планшет ---------- */
@media (max-width: 900px) {
	.cb-tiles { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

/* ---------- телефон ---------- */
@media (max-width: 600px) {
	.cb-auth { margin-top: 0.5rem; }
	.cb-head { align-items: center; }
	.cb-head__title { font-size: 1.6rem; }
	.cb-tiles { grid-template-columns: 1fr; }
	.cb-tile { min-height: 0; }
	.cb-tile--add { flex-direction: row; min-height: 5rem; }
	.cb-tile--add .cc-plus { width: 3rem; height: 3rem; }
}
