:root {
  --petrol: #004e69;
  --petrol-dark: #003d56;
  --green: #00714e;
  --green-2: #0d8158;
  --lime: #8bbf3f;
  --mint: #e5f3ed;
  --ink: #16323a;
  --muted: #697c80;
  --line: #d9e6e5;
  --bg: #f1f6f5;
  --red: #b9433e;
  --shadow: 0 24px 70px rgba(0, 61, 76, .12);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { color: var(--ink); font-family: 'DM Sans', sans-serif; }
button, input { font: inherit; }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(460px, .98fr) minmax(520px, 1.02fr); }
.auth-visual {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  isolation: isolate;
  background-color: var(--petrol-dark);
  background-image: url('assets/brand/engloba-portrait.png');
  background-repeat: no-repeat;
  background-position: center -26px;
  background-size: auto 155%;
}
.auth-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to bottom, transparent 56%, rgba(0, 58, 72, .15) 74%, rgba(0, 53, 66, .72) 100%);
}
.auth-visual::after {
  content: '';
  position: absolute;
  width: 430px;
  height: 430px;
  right: -220px;
  bottom: -230px;
  z-index: -1;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
  box-shadow: 0 0 0 58px rgba(255,255,255,.035), 0 0 0 118px rgba(255,255,255,.025);
}
.auth-art-caption {
  position: absolute;
  left: 44px;
  right: 44px;
  bottom: 30px;
  z-index: 2;
  max-width: 600px;
  padding: 15px 18px;
  border: 1px solid rgba(255,255,255,.42);
  border-radius: 16px;
  color: #fff;
  background: rgba(0, 60, 72, .56);
  backdrop-filter: blur(13px);
  font-size: 13px;
  line-height: 1.45;
  letter-spacing: .2px;
  box-shadow: 0 16px 40px rgba(0, 37, 48, .18);
}
.auth-art-caption b { color: #d8efaf; text-transform: uppercase; }

@media (max-height: 800px) and (min-width: 701px) {
  .auth-form-area { padding-top: 20px; padding-bottom: 16px; }
  .login-form { margin-top: 18px; gap: 14px; }
  .input-wrap,
  .login-submit { height: 48px; }
  .auth-help { margin-top: 16px; }
  .auth-form-area footer { margin-top: 12px; }
  .auth-art-caption { display: none; }
}

.auth-form-area {
  position: relative;
  min-width: 0;
  padding: 42px clamp(36px, 7vw, 108px) 28px;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0, rgba(139,191,63,.12), transparent 23rem),
    linear-gradient(145deg, #fff 0%, #f8fbfa 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-form-area::before,
.auth-form-area::after {
  content: '';
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(0,113,78,.08);
  border-radius: 50%;
}
.auth-form-area::before { width: 420px; height: 420px; right: -290px; top: -220px; }
.auth-form-area::after { width: 310px; height: 310px; right: -220px; top: -145px; }
.auth-form-wrap { position: relative; z-index: 1; width: min(430px, 100%); margin: auto; }

.form-eyebrow { color: var(--green); font-size: 9px; font-weight: 800; letter-spacing: 1.8px; }
h2 { margin: 9px 0 8px; font: 800 31px/1.15 'Manrope', sans-serif; letter-spacing: -.7px; }
.form-intro,
.profile-card-head p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.login-form,
.profile-form { margin-top: 25px; display: flex; flex-direction: column; gap: 18px; }
.auth-field label { margin-bottom: 7px; color: #334c51; display: block; font-size: 10px; font-weight: 700; }
.auth-field label b { color: var(--muted); font-weight: 400; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.label-row span { color: var(--muted); font-size: 8px; }
.input-wrap {
  height: 51px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  display: flex;
  align-items: center;
  transition: border .2s ease, box-shadow .2s ease;
}
.input-wrap:focus-within { border-color: var(--green); box-shadow: 0 0 0 4px rgba(0,113,78,.08); }
.input-wrap > span { width: 44px; color: var(--green); text-align: center; }
.input-wrap input { height: 100%; min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 12px; }
.input-wrap input::placeholder { color: #9baaaa; }
.password-toggle { width: 44px; height: 100%; border: 0; color: var(--muted); background: none; cursor: pointer; }
.remember-option {
  margin-top: -4px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #334c51;
  cursor: pointer;
}
.remember-option input {
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: var(--green);
  flex: 0 0 auto;
}
.remember-option span { display: grid; gap: 2px; }
.remember-option strong { font-size: 10px; }
.remember-option small { color: var(--muted); font-size: 8px; line-height: 1.4; }
.login-submit {
  height: 51px;
  padding: 0 18px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--petrol) 0%, var(--green) 100%);
  box-shadow: 0 13px 28px rgba(0, 91, 91, .2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.login-submit:hover { transform: translateY(-1px); box-shadow: 0 17px 34px rgba(0, 91, 91, .26); }
.login-submit span { color: #d8efaf; font-size: 17px; }
.auth-help,
.auth-form-area footer { margin-top: 25px; color: var(--muted); font-size: 9px; text-align: center; }
.auth-help a { color: var(--green); font-weight: 800; }
.auth-form-area footer span { margin: 0 5px; color: var(--lime); }
.alert { margin: 19px 0; padding: 12px 13px; border-radius: 11px; display: flex; align-items: center; gap: 9px; font-size: 10px; }
.alert > span { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; }
.alert-error { color: var(--red); background: #fbe8e6; }
.alert-error > span { color: #fff; background: var(--red); }
.alert-success { color: var(--green); background: var(--mint); }
.alert-success > span { color: #fff; background: var(--green); }
.alert-info { color: var(--petrol); background: #e7f1f4; }
.alert-info > span { color: #fff; background: var(--petrol); }

.profile-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 95% 15%, rgba(139,191,63,.12), transparent 25rem),
    var(--bg);
}
.profile-topbar {
  min-height: 90px;
  padding: 12px 5%;
  background: linear-gradient(120deg, var(--petrol-dark), var(--green));
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.profile-logo { margin: 0; color: #fff; }
.profile-logo img {
  width: 285px;
  padding: 7px 10px;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(0, 35, 48, .2);
}
.back-link {
  padding: 10px 13px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 11px;
  color: #fff;
  background: rgba(255,255,255,.08);
  text-decoration: none;
  font-size: 10px;
}
.profile-container { padding: 50px 20px; }
.profile-card {
  max-width: 880px;
  margin: auto;
  padding: 37px;
  border: 1px solid rgba(0,78,105,.1);
  border-radius: 22px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--shadow);
}
.profile-card-head { margin-bottom: 26px; display: flex; align-items: center; gap: 18px; }
.profile-card-head h1 { margin: 7px 0 5px; font: 800 27px/1.15 'Manrope', sans-serif; }
.large-avatar {
  width: 66px;
  height: 66px;
  flex: 0 0 auto;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(145deg, var(--petrol), var(--green));
  box-shadow: 0 12px 26px rgba(0,84,84,.18);
  display: grid;
  place-items: center;
  font-weight: 800;
}
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-divider { margin: 4px 0; padding-top: 13px; border-top: 1px solid var(--line); color: var(--green); font-size: 9px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.profile-actions { margin-top: 4px; display: flex; align-items: center; justify-content: flex-end; gap: 17px; }
.profile-actions .login-submit { width: 200px; }
.cancel-link { color: var(--muted); font-size: 10px; text-decoration: none; }

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: .9fr 1.1fr; }
  .auth-visual { background-position: center top; background-size: auto 110%; }
  .auth-form-area { padding-inline: 35px; }
  .auth-art-caption { left: 24px; right: 24px; bottom: 22px; }
}

@media (max-width: 760px) {
  .auth-shell { display: block; }
  .auth-visual { display: none; }
  .auth-form-area { min-height: 100vh; padding: 34px 24px 26px; }
  .profile-topbar { min-height: 78px; padding-inline: 18px; }
  .profile-logo img { width: 225px; }
  .profile-container { padding: 28px 14px; }
  .profile-card { padding: 26px 18px; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-actions { flex-direction: column-reverse; align-items: stretch; }
  .profile-actions .login-submit { width: 100%; }
  .cancel-link { text-align: center; }
}

@media (max-width: 430px) {
  h2 { font-size: 27px; }
  .label-row span { display: none; }
  .profile-logo img { width: 185px; padding: 6px 8px; }
  .back-link { padding: 9px; font-size: 9px; }
}
