body {
	margin: 0;
	color: #6a6f8c;
	background: #c8c8c8;
	font: 600 16px/18px 'Open Sans', sans-serif;
	height: 100vh;
}
*,
:after,
:before {
	box-sizing: border-box;
}
.clearfix:after,
.clearfix:before {
	content: '';
	display: table;
}
.clearfix:after {
	clear: both;
	display: block;
}
a {
	color: inherit;
	text-decoration: none;
}
.login-page {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100vh;
}

.login-wrap {
	width: 100%;
	max-width: 480px;
	position: relative;
	background: #496f89;
	box-shadow: 0 12px 15px 0 rgba(0, 0, 0, .24), 0 17px 50px 0 rgba(0, 0, 0, .19);
	border-radius: 10px;
	overflow: hidden;
}

.login-html {
	width: 100%;
	padding: 40px 30px;
	background: rgba(40, 57, 101, .9);
	position: relative;
}

.login-html .sign-in-htm,
.login-html .sign-up-htm {
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	position: absolute;
	transform: rotateY(180deg);
	backface-visibility: hidden;
	transition: all 0.4s linear;
}

.login-html .sign-in,
.login-html .sign-up,
.login-form .group .check {
	display: none;
}

.login-html .tab,
.login-form .group .label,
.login-form .group .button {
	text-transform: uppercase;
}

.login-html .tab {
	font-size: 22px;
	padding-bottom: 5px;
	margin: 0 15px 10px 0;
	display: inline-block;
	border-bottom: 2px solid transparent;
}

.login-html .sign-in:checked + .tab,
.login-html .sign-up:checked + .tab {
	color: #fff;
	border-color: #1161ee;
}

.login-form {
	min-height: 345px;
	position: relative;
	perspective: 1000px;
	transform-style: preserve-3d;
}

.login-form .group {
	margin-bottom: 15px;
}

.login-form .group .label,
.login-form .group .input,
.login-form .group .button {
	width: 100%;
	color: #fff;
	display: block;
}

.login-form .group .input,
.login-form .group .button {
	border: none;
	padding: 15px 20px;
	border-radius: 25px;
	background: rgba(255, 255, 255, .1);
}

.login-form .group .label {
	color: #aaa;
	font-size: 12px;
}

.login-form .group .button {
	background: #1161ee;
}

.login-form .group label .icon {
	width: 15px;
	height: 15px;
	border-radius: 2px;
	position: relative;
	display: inline-block;
	background: rgba(255, 255, 255, .1);
}

.login-form .group label .icon:before,
.login-form .group label .icon:after {
	content: '';
	width: 10px;
	height: 2px;
	background: #fff;
	position: absolute;
	transition: all .2s ease-in-out 0s;
}

.login-form .group label .icon:before {
	left: 3px;
	width: 5px;
	bottom: 6px;
	transform: scale(0) rotate(0);
}

.login-form .group label .icon:after {
	top: 6px;
	right: 0;
	transform: scale(0) rotate(0);
}

.login-form .group .check:checked + label {
	color: #fff;
}

.login-form .group .check:checked + label .icon {
	background: #1161ee;
}

.login-form .group .check:checked + label .icon:before {
	transform: scale(1) rotate(45deg);
}

.login-form .group .check:checked + label .icon:after {
	transform: scale(1) rotate(-45deg);
}

.login-html .sign-in:checked + .tab + .sign-up + .tab + .login-form .sign-in-htm {
	transform: rotate(0);
}

.login-html .sign-up:checked + .tab + .login-form .sign-up-htm {
	transform: rotate(0);
}

.hr {
	height: 2px;
	margin: 60px 0 50px 0;
	background: rgba(255, 255, 255, .2);
}

.error-message {
	color: red;
	font-size: 0.9em;
	margin-top: 4px;
	display: none;
}

.input.error {
	border: 2px solid red;
}

.modal {
	display: none;
	position: fixed;
	z-index: 9999;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	justify-content: center;
	align-items: center;
	font-family: "Segoe UI", sans-serif;
}

.modal-content {
	position: relative;
	background-color: #fdfdfd;
	padding: 30px 30px 20px;
	border-radius: 12px;
	width: 90%;
	max-width: 400px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
	text-align: center;
	animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
	from { opacity: 0; transform: translateY(-10px); }
	to { opacity: 1; transform: translateY(0); }
}

.close-button {
	position: absolute;
	top: 10px;
	right: 15px;
	font-size: 24px;
	color: #888;
	cursor: pointer;
	transition: color 0.2s ease;
}

.close-button:hover {
	color: #444;
}

.modal-title {
	margin-bottom: 20px;
	font-size: 20px;
	color: #333;
}

.modal-group {
	margin-bottom: 20px;
	text-align: left;
}

.modal-label {
	display: block;
	margin-bottom: 8px;
	font-weight: 500;
	color: #333;
	font-size: 14px;
}

.modal-input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 15px;
	box-sizing: border-box;
	transition: border-color 0.2s ease;
}

.modal-input:focus {
	outline: none;
	border-color: #007bff;
}

.modal-button {
	width: 100%;
	padding: 12px;
	background-color: #007bff;
	color: white;
	border: none;
	border-radius: 6px;
	font-size: 15px;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.modal-button:hover {
	background-color: #0056b3;
}

/* ===== Side-by-side layout for login (left) + intro (right) ===== */
.auth-layout{
    display:flex;
    align-items:center;         /* vertically align both cards */
    justify-content:center;     /* center the pair on the page */
    gap:8px;
    min-height:100vh;
    padding:24px 16px;
    flex-wrap:wrap;             /* stack on small screens */
}

/* The existing .login-page had full viewport height;
   neutralize it when inside the row layout */
.auth-layout .login-page{
    height:auto;
    display:flex;               /* keep inner centering */
    align-items:center;
    justify-content:center;
    flex: 1 1 420px;            /* grow but keep reasonable width */
}

/* Right-side intro card reuses your intro styles */
.intro-card{
    width:100%;
    max-width:520px;
    border-radius:12px;
    background: linear-gradient(135deg, rgba(40,57,101,0.95), rgba(73,111,137,0.9));
    box-shadow: 0 12px 15px rgba(0,0,0,.24), 0 17px 50px rgba(0,0,0,.19);
    padding:24px;
    color:#fff;
    flex: 1 1 420px;            /* similar flex to login card */
}

/* Keep your intro text styles */
.intro-lead{
    margin:0 0 14px;
    font-weight:600;
    color:#dfe6ff;
}
.intro-features{
    margin:0 0 14px 0;
    padding-left:18px;
    color:#e9efff;
}
.intro-features li{ margin:6px 0; }

/* Small screens: stack cleanly */
@media (max-width: 860px){
    .auth-layout{
        align-items:flex-start;   /* top-align when stacked */
        gap: 10px;
    }
    .intro-card{ max-width: 640px; }
}
@media (max-width: 640px){
    .intro-card{ padding:18px; }
    .auth-layout{ gap: 8px; }
}

/* Tighter spacing between columns */
.auth-layout{
    gap: 48px;
}

/* Remove the internal dead space: don't let the left column grow */
.auth-layout .login-page{
    flex: 0 0 480px;          /* exactly the card width */
    height: auto;
    align-items: center;
    justify-content: center;
}

/* Keep the right card fixed too, so gap stays tight */
.auth-layout .intro-card{
    flex: 0 0 520px;          /* its own card width */
}

/* On small screens, stack them again */
@media (max-width: 860px){
    .auth-layout{
        flex-direction: column;
        gap: 10px;
    }
    .auth-layout .login-page,
    .auth-layout .intro-card{
        flex: 1 1 auto;         /* allow full width when stacked */
        max-width: 640px;
    }
}

/* Admin edit question page*/
.admin-textarea {
    width: 100% !important;     /* override any global width constraints */
    min-width: 0;               /* allow shrinking within grid */
    box-sizing: border-box;     /* include padding in width */
    padding: 8px;
    min-height: 110px;
    resize: vertical;           /* let you grow/shrink as needed */
}

/* Make the two-column editor grid flexible and prevent min-content squeeze */
.admin-options-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
}

/* Defensive: some themes set max-width on textareas */
.admin-options-grid textarea {
    max-width: none !important;
}