/* The sign in page and the administration console. */

.admin-form {
	width: 360px;
	margin: 12px 0 20px 0;
}

.admin-form label, .admin-detail label {
	display: block;
	font-weight: 700;
	margin-top: 10px;
}

.admin-form input, .admin-form select, .admin-detail input, .admin-detail select,
.admin-detail textarea, .admin-list input[type="search"], .admin-create input, .admin-create select {
	box-sizing: border-box;
	width: 100%;
	padding: 6px 8px;
	font: inherit;
	border: 1px solid #b8b8b8;
	border-radius: 5px;
	background: white;
}

/* The search box is named by its id, which is what it takes to be narrower
   than the consoles make every input. */

.admin-toolbar {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 4px;
}

.admin-toolbar #account-search {
	flex: 0 1 320px;
	width: auto;
	min-width: 0;
}

.admin-toolbar .admin-count {
	margin-left: auto;
	white-space: nowrap;
}

.admin-detail textarea {
	height: 90px;
	resize: vertical;
}

.admin-button {
	margin-top: 12px;
	margin-right: 6px;
	padding: 6px 14px;
	font: inherit;
	font-weight: 500;
	color: white;
	background: #e07902;
	border: 1px solid #c66c04;
	border-radius: 5px;
	cursor: pointer;
}

.admin-button:hover {
	background: #c66c04;
}

.admin-button:disabled {
	opacity: 0.4;
	cursor: default;
}

.admin-button.plain {
	color: #c66c04;
	background: white;
}

.admin-button.danger {
	background: #b3261e;
	border-color: #8c1d18;
}

.admin-message {
	min-height: 20px;
	margin: 8px 0;
}

.admin-message.error {
	color: #b3261e;
}

.admin-count {
	opacity: 0.7;
}

.admin-empty {
	opacity: 0.7;
	font-style: italic;
}

.admin-table {
	width: 100%;
	margin: 10px 0;
	border-collapse: collapse;
}

.admin-table th {
	text-align: left;
	padding: 5px 8px;
	border-bottom: 2px solid #e07902;
}

.admin-table td {
	padding: 5px 8px;
	border-bottom: 1px solid #d8d8d8;
	overflow-wrap: anywhere;
	vertical-align: top;
}

/* The console's own table rules are roomier than this page wants, and its
   stylesheet is read after this one, so these are named by the content. */

#content .admin-table th {
	padding: 6px 8px;
}

#content .admin-table td {
	padding: 7px 8px;
}

/* A role and a date are short, and read badly broken over two lines. */

.admin-table th:nth-child(n+3), .admin-table td:nth-child(n+3) {
	white-space: nowrap;
	overflow-wrap: normal;
}

.admin-table tr.account-row {
	cursor: pointer;
}

.admin-table tr.account-row:hover, .admin-table tr.account-row.selected {
	background: #fceddc;
}

.admin-table tr.inactive td {
	opacity: 0.5;
}

.admin-tag {
	margin-left: 6px;
	padding: 1px 6px;
	font-size: 12px;
	color: white;
	background: #e07902;
	border-radius: 8px;
}

.admin-tag.off {
	background: #888;
}

.admin-columns {
	display: flex;
	gap: 24px;
	align-items: flex-start;
}

/* Each part of the page starts beneath the curve of the header rather than
   being squeezed beside it. */

.admin-section {
	clear: both;
	margin-top: 26px;
}

.admin-section > h2 {
	margin-top: 0;
}

/* The consoles, as tiles. They are inline blocks so that they run along the
   curve of the header like the text of any other page, one to a line where
   the curve is widest and four where it has gone. */

.console .admin-tools {
	margin: 14px 0 0 0;
	padding: 0;
	list-style: none;
	font-size: 0;
}

.console .admin-tools li {
	display: inline-block;
	box-sizing: border-box;
	vertical-align: top;
	width: 224px;
	min-height: 92px;
	margin: 0 12px 12px 0;
	padding: 9px 12px 10px 12px;
	font-size: 13px;
	line-height: 17px;
	background: white;
	border: 1px solid #d8d8d8;
	border-left: 3px solid #e07902;
	border-radius: 5px;
	transition: background .2s ease-out, border-color .2s ease-out;
}

.console .admin-tools li:hover {
	background: #fceddc;
	border-color: #e07902;
}

.console .admin-tools a {
	display: block;
	margin-bottom: 3px;
	font-size: 15px;
	font-weight: 700;
	font-style: normal;
	line-height: 20px;
	border-bottom: 0;
}

.console .admin-tools span {
	display: block;
	color: #666;
}

/* Adding an account, as one row of fields with its button at the end. */

.admin-create {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0 14px;
	padding: 4px 14px 6px 14px;
	background: #c0c0c024;
	border: 1px solid #b8b8b8;
	border-radius: 10px;
}

.admin-create .admin-field {
	flex: 1 1 160px;
	min-width: 0;
}

.admin-create .admin-field.wide {
	flex: 1.4 1 200px;
}

.admin-create .admin-field.narrow {
	flex: 0 0 130px;
}

.admin-create .admin-button {
	flex: 0 0 auto;
	min-height: 34px;
	margin: 12px 0 0 0;
}

.admin-create .admin-message {
	flex: 0 0 100%;
}

.admin-list {
	flex: 1 1 auto;
	min-width: 0;
}

.admin-detail {
	flex: 0 0 300px;
	box-sizing: border-box;
	padding: 4px 14px 10px 14px;
	background: #c0c0c024;
	border: 1px solid #b8b8b8;
	border-radius: 10px;
}

.admin-detail .admin-name {
	font-size: 20px;
	font-weight: 700;
	margin-top: 8px;
}

.admin-detail .admin-facts {
	margin: 4px 0;
	font-size: 13px;
	opacity: 0.8;
}

#content .admin-pager {
	justify-content: flex-start;
	padding-top: 4px;
	margin-bottom: 0;
}

.admin-pager .admin-button {
	margin: 0;
}

.admin-pager span {
	margin: 0 4px;
	opacity: 0.7;
}

/* The buttons of the account panel sit in a row and wrap together. */

.admin-detail .admin-button {
	margin-right: 4px;
}

.admin-detail .admin-tag {
	vertical-align: 2px;
}

/* The roles the list of accounts is narrowed to: a row of toggle buttons,
   each with how many accounts hold its role. */

.admin-roles {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	margin: 8px 0 6px 0;
}

.admin-roles button {
	padding: 3px 10px;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	line-height: 18px;
	color: #c66c04;
	background: white;
	border: 1px solid #b8b8b8;
	border-radius: 999px;
	cursor: pointer;
	transition: border-color .15s ease, background .15s ease;
}

.admin-roles button:hover {
	border-color: #e07902;
}

.admin-roles button.on {
	color: white;
	background: #e07902;
	border-color: #c66c04;
}

.admin-roles button span {
	display: inline-block;
	min-width: 16px;
	margin-left: 3px;
	padding: 0 5px;
	font-size: 12px;
	line-height: 16px;
	color: #555;
	background: #ececec;
	border-radius: 999px;
	text-align: center;
}

.admin-roles button.on span {
	color: #c66c04;
	background: white;
}

/* The sign in page: two tabs, Sign in and Sign up, over one narrow form, with
   the steps of making an account taking the form's place in their turn. */

.login {
	width: 360px;
	max-width: 100%;
	margin: 12px 0 30px 0;
	margin-left: calc(50% - 200px);
}

.login [hidden] {
	display: none !important;
}

.login-tabs {
	display: flex;
	gap: 2px;
	border-bottom: 1px solid #b8b8b8;
}

.login-tabs button {
	margin-bottom: -1px;
	padding: 5px 16px;
	font: inherit;
	font-weight: 700;
	color: #666;
	background: transparent;
	border: 1px solid transparent;
	border-bottom: 0;
	border-radius: 5px 5px 0 0;
	cursor: pointer;
}

.login-tabs button:hover {
	color: #222;
}

.login-tabs button.active {
	color: #222;
	background: white;
	border-color: #b8b8b8;
	border-top: 2px solid #e07902;
}

.login-view {
	padding: 6px 14px 10px 14px;
	background: white;
	border: 1px solid #b8b8b8;
	border-top: 0;
	border-radius: 0 0 5px 5px;
}

/* The form which asks for a password has no tabs above it, so it is closed
   along the top as well. */

#join-form.login-view {
	padding-top: 10px;
	border-top: 2px solid #e07902;
	border-radius: 5px;
}

/* What is said once a link has been sent, or cannot be used, is only words,
   and is not put in a box. */

.login-view.login-sent {
	padding: 0;
	background: none;
	border: 0;
	border-radius: 0;
}

.login-view label {
	display: block;
	margin: 10px 0 3px 0;
	font-size: 13px;
	font-weight: 700;
}

.login-view input {
	box-sizing: border-box;
	width: 100%;
	padding: 6px 8px;
	font: inherit;
	border: 1px solid #b8b8b8;
	border-radius: 5px;
	background: white;
}

.login-view h3 {
	margin: 0 0 4px 0;
	background: none;
}

.login-view p {
	margin: 6px 0;
}

.login-note {
	font-size: 13px;
	color: #555;
}

.login-view a {
	cursor: pointer;
}

/* The captcha: the picture, a button for a different one, and the box the
   numbers are typed into. */

.captcha-row {
	display: flex;
	align-items: center;
	gap: 6px;
}

.captcha-image {
	display: block;
	flex: none;
	width: 150px;
	height: 44px;
	border-radius: 5px;
	background: #2b2b2b;
}

.captcha-refresh {
	flex: none;
	width: 34px;
	height: 34px;
	padding: 0;
	font-size: 20px;
	line-height: 30px;
	color: #c66c04;
	background: white;
	border: 1px solid #b8b8b8;
	border-radius: 5px;
	cursor: pointer;
}

.captcha-refresh:hover {
	border-color: #e07902;
}

.login-view .captcha-input {
	flex: 1 1 auto;
	min-width: 0;
	letter-spacing: 0.15em;
}

/* The button which signs in, with the way to a new password beside it. */

.login-actions {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

.login-actions a {
	font-size: 13px;
}
