/* Conturi — aliniat at.b-p: logo fundal (::before, fără opacity extra); temă pe variabile. */

:root {
	--albastru: #007cde;
	--albastru-inchis: #0066b8;
	--portocaliu: #ff8400;
	--portocaliu-inchis: #fe5b00;
	--gri: #585858;
	--hartie: #fffaf0;
	--alb: #ffffff;
	--ok: #0a7a3e;
	--formular-fundal: rgba(255, 250, 240, 0.72);
	--input-fundal: rgba(255, 255, 255, 0.82);
	--logo-url: url("/d/logo.svg");
}

* {
	box-sizing: border-box;
}

html, body {
	margin: 0;
	min-height: 100%;
}

body {
	font-family: system-ui, sans-serif;
	color: var(--gri);
	background-color: var(--hartie);
	line-height: 1.45;
}

/* Exact ca at.b-p — fără opacity pe layer (transparența vine din SVG + hartie) */
body::before {
	content: "";
	position: fixed;
	inset: 5%;
	background: var(--logo-url) no-repeat center / contain;
	pointer-events: none;
	z-index: 0;
}

/* Conectat: fără logo fundal; ascunde UI până confirmăm sesiunea (anti-flash) */
body.conectat::before {
	display: none;
}

body.asteapta-sesiune > main {
	visibility: hidden;
}

.pagina-centru {
	position: relative;
	z-index: 1;
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	padding-bottom: max(1rem, env(safe-area-inset-bottom));
	padding-left: max(1rem, env(safe-area-inset-left));
	padding-right: max(1rem, env(safe-area-inset-right));
}

.coloana-auth {
	width: 100%;
	max-width: 22rem;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.85rem;
}

.formular {
	width: 100%;
	max-width: 22rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	text-align: left;
	padding: 1.15rem 1rem;
	background: var(--formular-fundal);
	border-radius: 0.65rem;
	border: 1px solid rgba(0, 124, 222, 0.25);
}

.formular label {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--gri);
}

.formular input,
.formular select {
	font: inherit;
	font-size: 1rem;
	font-weight: 400;
	width: 100%;
	min-height: 2.75rem;
	padding: 0.65rem 0.75rem;
	border: 1px solid #c5d8ea;
	border-radius: 0.4rem;
	background: var(--input-fundal);
	color: var(--gri);
}

.formular input:focus,
.formular select:focus {
	outline: 2px solid var(--portocaliu);
	outline-offset: 1px;
	border-color: var(--albastru);
}

.formular button[type="submit"] {
	font: inherit;
	font-weight: 650;
	min-height: 2.75rem;
	padding: 0.65rem 1rem;
	border: 0;
	border-radius: 0.4rem;
	background: var(--albastru);
	color: var(--alb);
	cursor: pointer;
}

.formular button[type="submit"]:hover {
	background: var(--albastru-inchis);
}

.rand-parola {
	display: flex;
	gap: 0.35rem;
	align-items: stretch;
}

.rand-parola input {
	flex: 1;
	min-width: 0;
}

.buton-parola {
	width: 2.75rem;
	min-height: 2.75rem;
	flex-shrink: 0;
	margin: 0;
	padding: 0;
	border: 1px solid #c5d8ea;
	border-radius: 0.4rem;
	background-color: var(--input-fundal);
	background-position: center;
	background-repeat: no-repeat;
	background-size: 1.35rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23585858' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-7 11-7 11 7 11 7-4 7-11 7S1 12 1 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
	cursor: pointer;
}

.buton-parola.vizibil {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23585858' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.94 10.94 0 0 1 12 19c-7 0-11-7-11-7a21.8 21.8 0 0 1 5.06-5.94'/%3E%3Cpath d='M9.9 4.24A10.94 10.94 0 0 1 12 5c7 0 11 7 11 7a21.9 21.9 0 0 1-2.87 3.94'/%3E%3Cpath d='M14.12 14.12a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E");
}

.buton-genereaza {
	margin: 0.15rem 0 0;
	width: 100%;
	min-height: 2.75rem;
	font: inherit;
	font-size: 0.95rem;
	font-weight: 700;
	border: 1px solid var(--portocaliu);
	border-radius: 0.4rem;
	background: rgba(255, 132, 0, 0.12);
	color: var(--portocaliu-inchis);
	cursor: pointer;
}

.eroare-camp {
	min-height: 0.9rem;
	font-size: 0.8rem;
	font-weight: 500;
	color: var(--portocaliu-inchis);
}

.mesaj-formular {
	padding: 0.65rem 0.75rem;
	border-radius: 0.4rem;
	background: rgba(0, 124, 222, 0.15);
	color: var(--albastru);
	border: 1px solid rgba(0, 124, 222, 0.25);
	white-space: pre-wrap;
}

.mesaj-formular.ok {
	background: rgba(10, 122, 62, 0.14);
	color: var(--ok);
	border-color: rgba(10, 122, 62, 0.28);
}

.mesaj-formular.err {
	background: rgba(254, 91, 0, 0.15);
	color: var(--portocaliu-inchis);
	border-color: rgba(254, 91, 0, 0.35);
}

.legatura {
	font-size: 0.92rem;
	margin: 0;
	text-align: center;
}

.legatura a {
	color: var(--portocaliu);
}

.legatura a:hover {
	color: var(--portocaliu-inchis);
}

.reguli-parola {
	list-style: none;
	margin: 0.35rem 0 0;
	padding: 0;
	font-size: 0.78rem;
	font-weight: 400;
	line-height: 1.45;
}

.reguli-parola li {
	color: var(--gri, #585858);
	opacity: 0.75;
}

.reguli-parola li.ok {
	display: none;
}

.reguli-parola li.lipsa {
	color: var(--portocaliu-inchis);
	opacity: 1;
}

@keyframes pulsa-regula {
	0%, 100% { font-weight: 400; transform: scale(1); }
	50% { font-weight: 800; transform: scale(1.04); }
}

.reguli-parola li.pulsa {
	display: list-item;
	color: var(--portocaliu-inchis);
	opacity: 1;
	font-weight: 800;
	animation: pulsa-regula 0.4s ease 3;
}

.parola-puternica {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	margin: 0.35rem 0 0;
	padding: 0.55rem 0.75rem;
	border-radius: 0.4rem;
	text-align: center;
	font-size: 0.95rem;
	font-weight: 700;
	color: #0a7a3e;
	background: rgba(10, 122, 62, 0.14);
	border: 1px solid rgba(10, 122, 62, 0.35);
}

.parola-puternica[hidden] {
	display: none;
}

.parola-puternica::before {
	content: "";
	width: 1.4rem;
	height: 1.4rem;
	flex-shrink: 0;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230a7a3e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E") center / contain no-repeat;
}

.hint { font-size: 0.88rem; margin: 0 0 0.35rem; }

.cod-box {
	font-family: ui-monospace, monospace;
	background: rgba(0, 124, 222, 0.9);
	color: var(--alb);
	padding: 0.55rem 0.75rem;
	border-radius: 0.35rem;
	display: block;
	text-align: center;
	letter-spacing: 0.06em;
	font-size: 1.15rem;
	font-weight: 700;
	margin: 0.35rem 0 0.75rem;
}

.buton-primar {
	font: inherit;
	font-weight: 700;
	width: 100%;
	min-height: 2.75rem;
	padding: 0.65rem 1rem;
	border: 0;
	border-radius: 0.4rem;
	background: var(--albastru);
	color: var(--alb);
	cursor: pointer;
}

.buton-primar:hover {
	background: var(--albastru-inchis);
}

.modal {
	position: fixed;
	inset: 0;
	z-index: 30;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 1rem;
	padding-top: max(1.25rem, env(safe-area-inset-top));
	padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
	overflow: auto;
}

.modal[hidden] {
	display: none;
}

.modal-fond {
	position: fixed;
	inset: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(88, 88, 88, 0.48);
	cursor: pointer;
}

.modal-cutie {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 22rem;
	margin: 1.5rem 0 auto;
	padding: 1.1rem 0.95rem 1.2rem;
	background: var(--hartie);
	border: 1px solid rgba(0, 124, 222, 0.28);
	border-radius: 0.65rem;
	box-shadow: 0 10px 32px rgba(88, 88, 88, 0.28);
	display: flex;
	flex-direction: column;
	gap: 0.65rem;
}

.modal-cutie h2 {
	margin: 0 2rem 0 0;
	font-size: 1.15rem;
	color: var(--albastru);
}

.modal.modal-err .modal-cutie h2 {
	color: var(--portocaliu-inchis);
}

.modal.modal-ok .modal-cutie h2 {
	color: var(--ok);
}

.meta-modal {
	margin: 0;
	font-size: 0.92rem;
	word-break: break-word;
}

.modal-x {
	position: absolute;
	top: 0.35rem;
	right: 0.35rem;
	width: 2.1rem;
	height: 2.1rem;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	appearance: none;
	-webkit-appearance: none;
	background-color: transparent;
	background-position: center;
	background-repeat: no-repeat;
	background-size: 1.15rem;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FE5B00' stroke-width='2.2' stroke-linecap='round'%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3C/svg%3E");
	cursor: pointer;
}

body.modal-deschis {
	overflow: hidden;
}

.modal-trimite {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.rand-share-fallback {
	display: flex;
	gap: 0.5rem;
}

.rand-share-fallback .buton-secundar {
	flex: 1;
	text-align: center;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.5rem;
}

.card-verificare {
	width: 100%;
	margin-top: 1rem;
	padding: 1.15rem 1rem;
	background: var(--formular-fundal);
	border-radius: 0.65rem;
	border: 1px solid rgba(0, 124, 222, 0.25);
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.telefon-mare {
	margin: 0.15rem 0 0.5rem;
	font-size: 1.45rem;
	font-weight: 750;
	letter-spacing: 0.02em;
	color: var(--albastru);
	font-family: ui-monospace, monospace;
	word-break: break-all;
}

.bara-actiuni {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	align-items: center;
	justify-content: flex-end;
}

.pe-rand {
	display: flex;
	align-items: center;
	gap: 0.45rem;
	font-weight: 600;
	font-size: 0.95rem;
	cursor: pointer;
}

.pe-rand input {
	width: auto;
	min-height: 0;
}

/* Platformă (după login) */
.pagina-lata {
	justify-content: flex-start;
	align-items: stretch;
	max-width: 42rem;
	margin: 0 auto;
	width: 100%;
}

.pagina-lata .formular {
	max-width: none;
}

.bara-sus {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1rem;
	flex-wrap: wrap;
	width: 100%;
}

.logo-bara {
	display: block;
	height: 2.25rem;
	width: auto;
}

.buton-secundar {
	font: inherit;
	font-weight: 600;
	border: 1px solid var(--albastru);
	border-radius: 0.4rem;
	background: rgba(0, 124, 222, 0.12);
	color: var(--albastru);
	padding: 0.45rem 0.7rem;
	cursor: pointer;
}

.lista-parteneri {
	list-style: none;
	padding: 0;
	margin: 1rem 0;
	display: grid;
	gap: 0.5rem;
	width: 100%;
}

.lista-parteneri li {
	background: var(--formular-fundal);
	border: 1px solid rgba(0, 124, 222, 0.25);
	border-radius: 0.5rem;
	padding: 0.75rem 0.9rem;
	display: flex;
	justify-content: space-between;
	gap: 0.75rem;
	align-items: center;
}

h1 {
	font-size: 1.35rem;
	font-weight: 650;
	margin: 0 0 0.75rem;
	color: var(--gri);
	align-self: flex-start;
	width: 100%;
}

.snackbar-sesiune {
	position: fixed;
	z-index: 50;
	left: 50%;
	bottom: max(1rem, env(safe-area-inset-bottom));
	transform: translateX(-50%);
	width: min(22rem, calc(100vw - 1.5rem));
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	padding: 0.85rem 0.9rem;
	background: var(--hartie);
	border: 1px solid rgba(254, 91, 0, 0.45);
	border-radius: 0.65rem;
	box-shadow: 0 10px 28px rgba(88, 88, 88, 0.28);
}

.snackbar-sesiune[hidden] {
	display: none;
}

.snackbar-text {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 600;
	text-align: center;
	color: var(--portocaliu-inchis);
}

.snackbar-sesiune .buton-primar {
	width: 100%;
}
