:root {
	--bg-1: #0f2238;
	--bg-2: #1f6379;
	--card: #ffffff;
	--text: #122437;
	--muted: #5b6f83;
	--border: #d9e3ed;
	--focus: #66b7db;
	--primary: #0f9f7d;
	--primary-dark: #0c8468;
	--link: #0a6e9f;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
	margin: 0;
	padding: 24px;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
	background: linear-gradient(140deg, var(--bg-1), var(--bg-2));
	position: relative;
	overflow: hidden;
}

.page-center {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bg-shape {
	position: fixed;
	border-radius: 50%;
	pointer-events: none;
}

.bg-shape.s1 {
	left: -120px;
	bottom: -120px;
	width: 360px;
	height: 360px;
	background: radial-gradient(circle, rgba(255,255,255,.28), rgba(255,255,255,0) 72%);
}

.bg-shape.s2 {
	right: -90px;
	top: -80px;
	width: 280px;
	height: 280px;
	background: radial-gradient(circle, rgba(255,255,255,.20), rgba(255,255,255,0) 72%);
}

.login-card {
	width: min(430px, 95vw);
	background: var(--card);
	border-radius: 18px;
	padding: 28px;
	box-shadow: 0 24px 48px rgba(9, 22, 37, .28);
	border: 1px solid rgba(255,255,255,.5);
}

.brand {
	margin: 0;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: #2f6f8c;
}

h1 {
	margin: 6px 0;
	font-size: 30px;
	line-height: 1.1;
	color: var(--text);
}

.subtitle {
	margin: 0 0 18px;
	font-size: 14px;
	color: var(--muted);
}

.field { margin-bottom: 14px; }

.field label {
	display: block;
	margin-bottom: 7px;
	font-size: 13px;
	font-weight: 700;
	color: #2a4560;
}

.sc-input,
#row-language input,
#row-language select {
	width: 100%;
	height: 46px;
	padding: 0 13px;
	border: 1px solid var(--border);
	border-radius: 11px;
	font-size: 15px;
	color: #1a3550;
	background: #fcfeff;
	outline: none;
	transition: border-color .18s ease, box-shadow .18s ease;
}

.sc-input:focus,
#row-language input:focus,
#row-language select:focus {
	border-color: var(--focus);
	box-shadow: 0 0 0 4px rgba(102, 183, 219, .2);
}

.password-wrap { position: relative; }

.password-wrap .sc-input { padding-right: 90px; }

.toggle-pass {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	height: 30px;
	min-width: 74px;
	border: 0;
	border-radius: 8px;
	padding: 0 10px;
	background: #e8f2f9;
	color: #1f5778;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
}

#txtremember {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: var(--muted);
}

#txtremember input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: var(--primary);
	cursor: pointer;
}

.btn-login {
	width: 100%;
	height: 48px;
	border: 0;
	border-radius: 12px;
	background: linear-gradient(135deg, var(--primary), #13b691);
	color: #fff;
	font-size: 16px;
	font-weight: 800;
	letter-spacing: .2px;
	cursor: pointer;
	box-shadow: 0 10px 22px rgba(15, 159, 125, .33);
	transition: transform .12s ease, filter .12s ease, background .2s ease;
}

.btn-login:hover {
	transform: translateY(-1px);
	background: linear-gradient(135deg, var(--primary-dark), #0fa07f);
}

.assist-links {
	margin-top: 14px;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 10px 18px;
}

.assist-links a,
.assist-links button,
.assist-links input[type="button"] {
	border: 0;
	background: transparent;
	padding: 0;
	color: var(--link);
	font-size: 13px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
}

.assist-links a:hover,
.assist-links button:hover,
.assist-links input[type="button"]:hover {
	text-decoration: underline;
}

.sc-hide {
	display: none !important;
}

.swal2-container { z-index: 99999 !important; }

/* Aviso no topo, ao centro e maior (antes ficava pequeno no canto direito). */
.swal2-popup.swal2-toast.sc-toast {
	width: min(460px, calc(100vw - 24px)) !important;
	padding: 14px 18px !important;
	margin-top: 10px !important;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .28) !important;
}

.swal2-popup.swal2-toast.sc-toast .swal2-title {
	font-size: 17px !important;
	color: #111827 !important;
	font-weight: 700 !important;
}

.swal2-popup.swal2-toast.sc-toast .swal2-html-container {
	font-size: 15px !important;
	color: #374151 !important;
}

/* Erro dentro do cartão, acima do campo Usuário. */
.card-error {
	margin: 10px 0 14px;
	padding: 11px 13px;
	border-radius: 10px;
	background: #fdecec;
	border: 1px solid #f2b3b3;
	border-left: 5px solid #d92d20;
	color: #8f1414;
	font-size: 14px;
	line-height: 1.35;
}

.card-error strong {
	display: block;
	font-size: 15px;
	margin-bottom: 2px;
}

.card-error.is-shake {
	animation: sc-card-shake .38s ease-in-out;
}

@keyframes sc-card-shake {
	0%, 100% { transform: translateX(0); }
	20% { transform: translateX(-7px); }
	40% { transform: translateX(7px); }
	60% { transform: translateX(-4px); }
	80% { transform: translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
	.card-error.is-shake { animation: none; }
}

@media (max-width: 520px) {
	.login-card { padding: 22px; border-radius: 14px; }
	h1 { font-size: 26px; }
}
.brand-block {
	text-align: center;
	margin-bottom: 14px;
}

.brand-logo {
	display: block;
	max-width: 130px;
	max-height: 82px;
	width: auto;
	height: auto;
	margin: 0 auto 10px;
	object-fit: contain;
}

.brand-name {
	color: #2f6f8c;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: .2px;
}

.brand-entity {
	color: var(--muted);
	font-size: 15px;
	font-weight: 600;
	margin-top: 4px;
}

.license-msg {
	margin-top: 8px;
	padding: 8px 10px;
	border-radius: 9px;
	font-size: 13px;
	font-weight: 700;
}

.license-msg.is-warn {
	background: #fff7e6;
	color: #8a5a00;
	border: 1px solid #f2d491;
}

.license-msg.is-error {
	background: #fdecec;
	color: #a11616;
	border: 1px solid #f2b3b3;
}

/* Modelo antigo (agro e outros): o painel montado pelo onScriptInit pinta a
   mensagem de vermelho por id; estas regras ganham e deixam igual a caixa acima. */
#sigram-login-license-panel .sigram-login-message.license-msg {
	margin: 8px 0 0;
	padding: 8px 10px;
	border-radius: 9px;
	font-size: 13px;
	font-weight: 700;
}

#sigram-login-license-panel .sigram-login-message.license-msg.is-warn {
	background: #fff7e6;
	color: #8a5a00;
	border: 1px solid #f2d491;
}

#sigram-login-license-panel .sigram-login-message.license-msg.is-error {
	background: #fdecec;
	color: #a11616;
	border: 1px solid #f2b3b3;
}
