/* Nigle: tela de login do Roundcube (skin Elastic) */
body.task-login {
	background: #f3f5f8;
}

#layout.nigle-login {
	display: grid !important;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	min-height: 100vh;
}

/* painel da marca */
.nigle-brand {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	overflow: hidden;
	padding: 56px 64px 32px;
	background: radial-gradient(900px 500px at 20% -10%, #1d4b80 0%, transparent 60%),
		radial-gradient(700px 400px at 100% 110%, rgba(5, 183, 150, 0.3) 0%, transparent 60%),
		linear-gradient(160deg, #0d2240 0%, #081629 100%);
	color: #e8eef7;
}

.nigle-brand::before {
	content: "";
	position: absolute;
	inset: 0;
	background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
	background-size: 44px 44px;
	-webkit-mask-image: radial-gradient(circle at 40% 40%, #000 0%, transparent 75%);
	mask-image: radial-gradient(circle at 40% 40%, #000 0%, transparent 75%);
	pointer-events: none;
}

.nigle-brand-inner {
	position: relative;
	margin: auto 0;
	max-width: 520px;
}

.nigle-brand-logo {
	width: 76px;
	height: 95px;
	margin-bottom: 28px;
	filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.35));
}

.nigle-brand-logo svg,
.nigle-login-mark svg,
.nigle-brand-foot svg {
	display: block;
	width: 100%;
	height: 100%;
}

.nigle-brand-tag {
	display: inline-block;
	margin-bottom: 14px;
	padding: 5px 14px;
	border: 1px solid rgba(95, 227, 198, 0.35);
	border-radius: 999px;
	background: rgba(5, 183, 150, 0.12);
	color: #5fe3c6;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.nigle-brand-domain {
	margin: 0 0 10px;
	background: linear-gradient(90deg, #ffffff 0%, #5fe3c6 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	font-size: 2.6rem;
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.1;
	overflow-wrap: anywhere;
}

.nigle-brand-title {
	margin: 0 0 26px;
	color: #aebbd0;
	font-size: 1.15rem;
}

.nigle-brand ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.nigle-brand li {
	position: relative;
	margin-bottom: 12px;
	padding-left: 30px;
	color: #d5deeb;
}

.nigle-brand li::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 0;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: rgba(5, 183, 150, 0.2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%235fe3c6' stroke-width='2' d='M4 8.5l2.5 2.5L12 5.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.nigle-brand-foot {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: #7f8da5;
	font-size: 0.8rem;
}

.nigle-brand-foot svg {
	width: 12px;
	height: 15px;
}

/* lado do formulário */
#layout.nigle-login #layout-content {
	display: flex !important;
	flex-direction: column !important;
	align-items: center;
	justify-content: center;
	width: auto !important;
	max-width: none !important;
	min-width: 0 !important;
	height: auto !important;
	margin: 0 !important;
	padding: 40px 24px !important;
	background: #f3f5f8 !important;
	border: 0 !important;
}

#layout.nigle-login #logo {
	display: none !important;
}

#layout.nigle-login #login-form {
	top: auto !important;
	width: 100%;
	max-width: 420px;
	padding: 40px 36px 28px;
	border: 1px solid #e1e6ee;
	border-radius: 18px;
	background: #ffffff;
	box-shadow: 0 24px 60px rgba(13, 34, 64, 0.12);
}

.nigle-login-head {
	margin-bottom: 26px;
	text-align: center;
}

.nigle-login-mark {
	display: none;
	width: 44px;
	height: 55px;
	margin: 0 auto 14px;
}

.nigle-login-head h1 {
	margin: 0 0 6px;
	color: #0d2240;
	font-size: 1.6rem;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.nigle-login-head p {
	margin: 0;
	color: #4b5565;
	font-size: 0.95rem;
}

#layout.nigle-login #login-form table {
	width: 100%;
}

#layout.nigle-login #login-form .input-group {
	margin-bottom: 14px;
}

#layout.nigle-login #login-form .input-group-text {
	border-color: #d7dde7;
	border-radius: 12px 0 0 12px;
	background: #f7f9fb;
	color: #7f8da5;
}

#layout.nigle-login #login-form input.form-control {
	height: 52px;
	border-color: #d7dde7;
	border-radius: 0 12px 12px 0;
	font-size: 1rem;
}

#layout.nigle-login #login-form input.form-control:focus {
	border-color: #05b796;
	box-shadow: 0 0 0 4px rgba(5, 183, 150, 0.15);
}

#layout.nigle-login #rcmloginsubmit {
	height: 52px;
	margin-top: 6px;
	border: 0;
	border-radius: 12px;
	background: linear-gradient(90deg, #05b796, #04a586);
	box-shadow: 0 10px 24px rgba(5, 183, 150, 0.3);
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: none;
}

#layout.nigle-login #rcmloginsubmit:hover,
#layout.nigle-login #rcmloginsubmit:focus {
	background: linear-gradient(90deg, #06c7a3, #05b796);
}

#layout.nigle-login #login-footer {
	margin-top: 18px;
	color: #7f8da5;
	font-size: 0.8rem;
	text-align: center;
}

/* mensagens de erro do Roundcube */
body.task-login #messagestack {
	z-index: 100;
}

/* tablet e celular: a marca vira um topo compacto */
@media (max-width: 900px) {
	#layout.nigle-login {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto 1fr;
	}

	.nigle-brand {
		padding: 28px 24px;
	}

	.nigle-brand-logo,
	.nigle-brand ul,
	.nigle-brand-title,
	.nigle-brand-foot {
		display: none;
	}

	.nigle-brand-inner {
		margin: 0;
		text-align: center;
		max-width: none;
	}

	.nigle-brand-domain {
		margin: 0;
		font-size: 1.6rem;
	}

	.nigle-brand-tag {
		margin-bottom: 8px;
	}

	#layout.nigle-login #layout-content {
		justify-content: flex-start;
		padding: 24px 16px 40px !important;
	}

	#layout.nigle-login #login-form {
		margin: 0 auto !important;
		padding: 28px 22px 20px;
	}

	.nigle-login-mark {
		display: block;
	}
}

/* modo escuro do Roundcube */
html.dark-mode body.task-login,
html.dark-mode #layout.nigle-login #layout-content {
	background: #161b22 !important;
}

html.dark-mode #layout.nigle-login #login-form {
	border-color: #2b3440;
	background: #1f2630;
	box-shadow: none;
}

html.dark-mode .nigle-login-head h1 {
	color: #e8eef7;
}

html.dark-mode .nigle-login-head p,
html.dark-mode #layout.nigle-login #login-footer {
	color: #9aa4b2;
}
