/* Malino Portal login — Flatlogic-inspired, rebuilt for the Malino identity. */
body.malino-login-active {
  overflow: hidden;
  background: #fffaf5;
}

.malino-login-active .login-wrap {
  --login-ink: #1d1b1f;
  --login-muted: #746f78;
  --login-red: #ee4564;
  --login-red-dark: #d92f50;
  --login-amber: #ffb548;
  --login-soft: #fff4df;
  --login-line: #e9e2dc;
  position: relative !important;
  display: grid !important;
  grid-template-columns: minmax(420px, 43%) minmax(0, 57%) !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  width: 100% !important;
  min-height: 100svh !important;
  padding: 0 !important;
  overflow: hidden;
  color: var(--login-ink);
  background: #fffaf5 !important;
}

.malino-login-active .login-card {
  position: relative;
  z-index: 2;
  align-self: center;
  justify-self: center;
  width: min(390px, calc(100% - 72px)) !important;
  padding: 38px 0 34px !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  animation: malinoFormIn .72s cubic-bezier(.2,.8,.2,1) both;
}

.malino-login-active .login-card::before {
  content: "PORTAL OPERASIONAL";
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  margin-bottom: 22px;
  padding: 0 10px;
  border: 1px solid #ffd0d9;
  border-radius: 99px;
  color: var(--login-red-dark);
  background: #fff0f3;
  font: 800 9px/1 var(--font-mono, monospace);
  letter-spacing: .16em;
}

.malino-login-active .login-card .unit-top {
  margin: 0 0 22px !important;
  align-items: center;
  gap: 12px;
}

.malino-login-active .brand-logo {
  display: grid;
  place-items: center;
  width: 48px !important;
  height: 48px !important;
  border: 0 !important;
  border-radius: 14px !important;
  color: #fff !important;
  background: linear-gradient(145deg, var(--login-red), #ff6d5f) !important;
  box-shadow: 0 12px 28px rgba(238,69,100,.25);
  font-size: 23px !important;
  transform: rotate(-4deg);
}

.malino-login-active .brand-sub {
  color: #a06c17 !important;
  font-size: 9px !important;
  letter-spacing: .2em !important;
}

.malino-login-active .unit-top > div:last-child > div:last-child {
  color: var(--login-ink);
  font-size: 24px !important;
  letter-spacing: -.03em;
}

.login-welcome {
  margin: 0 0 27px;
}
.login-welcome h1 {
  margin: 0 0 8px;
  color: var(--login-ink);
  font: 700 clamp(31px, 3vw, 43px)/1.02 var(--font-head, sans-serif);
  letter-spacing: -.045em;
}
.login-welcome p {
  max-width: 330px;
  margin: 0;
  color: var(--login-muted);
  font: 500 14px/1.55 var(--font-body, sans-serif);
}

.malino-login-active .field-label {
  display: block;
  margin: 17px 0 8px !important;
  color: #4a454d !important;
  font: 800 10px/1 var(--font-mono, monospace) !important;
  letter-spacing: .16em !important;
}

.malino-login-active .pin-hidden {
  display: none !important;
}

.login-input-wrap {
  position: relative;
}

.login-input-icon {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 15px;
  width: 18px;
  height: 18px;
  color: #9a929b;
  transform: translateY(-50%);
  pointer-events: none;
}
.login-input-icon svg { width: 100%; height: 100%; }

.malino-login-active .field {
  width: 100% !important;
  height: 50px !important;
  padding: 0 48px 0 46px !important;
  border: 1px solid var(--login-line) !important;
  border-radius: 10px !important;
  outline: 0 !important;
  color: var(--login-ink) !important;
  background: #fff !important;
  box-shadow: 0 2px 0 rgba(29,27,31,.02) !important;
  font: 600 14px/1 var(--font-body, sans-serif) !important;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease !important;
}
.malino-login-active .field::placeholder { color: #aea7af; font-weight: 500; }
.malino-login-active .field:hover { border-color: #d5cbd0 !important; }
.malino-login-active .field:focus {
  border-color: var(--login-red) !important;
  box-shadow: 0 0 0 4px rgba(238,69,100,.11) !important;
  transform: translateY(-1px);
}

.malino-login-active .login-card.pin-only .login-input-wrap:not(.pin-hidden) .field {
  font-size: 18px !important;
  letter-spacing: .18em;
}

.malino-login-active .login-card.pin-only .login-input-wrap:not(.pin-hidden) .field::placeholder {
  font-size: 14px;
  letter-spacing: 0;
}

.password-toggle {
  position: absolute;
  z-index: 3;
  top: 50%;
  right: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  color: #8c858e;
  background: transparent;
  transform: translateY(-50%);
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
}
.password-toggle:hover { color: var(--login-red-dark); background: #fff0f3; }
.password-toggle svg { width: 18px; height: 18px; }

.login-security-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
  color: #8b848c;
  font-size: 11px;
}
.login-security-row span { display: inline-flex; align-items: center; gap: 6px; }
.login-security-row svg { width: 13px; height: 13px; color: #2f9e69; }
.login-security-row strong { color: var(--login-red-dark); font-weight: 700; }

.malino-login-active .login-btn {
  position: relative;
  width: 100% !important;
  height: 50px !important;
  margin-top: 23px !important;
  overflow: hidden;
  border: 0 !important;
  border-radius: 10px !important;
  color: #fff !important;
  background: linear-gradient(115deg, var(--login-red), #ff6c5e) !important;
  box-shadow: 0 13px 28px rgba(238,69,100,.23) !important;
  font: 800 12px/1 var(--font-head, sans-serif) !important;
  letter-spacing: .12em;
  text-transform: uppercase;
  transition: transform .2s ease, box-shadow .2s ease !important;
}
.malino-login-active .login-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform .55s ease;
}
.malino-login-active .login-btn:hover { transform: translateY(-2px); box-shadow: 0 17px 34px rgba(238,69,100,.3) !important; }
.malino-login-active .login-btn:hover::after { transform: translateX(120%); }
.malino-login-active .login-btn:active { transform: translateY(0); }
.malino-login-active .login-btn:disabled { opacity: .65; cursor: wait; }

.malino-login-active .login-err {
  margin-top: 12px !important;
  padding: 10px 12px;
  border: 1px solid #fecdd3;
  border-radius: 9px;
  color: #be123c !important;
  background: #fff1f2;
  font-weight: 700;
}

.malino-login-active .login-hint {
  margin-top: 22px !important;
  color: #aaa2aa !important;
  font: 500 10px/1.4 var(--font-mono, monospace) !important;
  text-align: left !important;
}

/* Original illustration: private multi-business portal, not copied from the reference. */
.login-showcase {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-width: 0;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 83% 12%, rgba(255,255,255,.9) 0 5%, transparent 5.2%),
    radial-gradient(circle at 10% 88%, rgba(255,255,255,.72) 0 10%, transparent 10.2%),
    linear-gradient(145deg, #fff0d7 0%, #ffe6d8 42%, #ffd7dc 100%);
}
.login-showcase::before,
.login-showcase::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 600px;
  height: 600px;
  border: 2px solid rgba(225,115,76,.15);
  border-radius: 45% 55% 60% 40%;
  animation: malinoOrbit 24s linear infinite;
}
.login-showcase::before { right: -260px; top: -300px; box-shadow: 0 0 0 34px rgba(255,255,255,.13), 0 0 0 68px rgba(225,115,76,.07); }
.login-showcase::after { left: -330px; bottom: -390px; width: 680px; height: 680px; animation-direction: reverse; animation-duration: 31s; }

.showcase-content {
  position: relative;
  width: min(690px, 87%);
  min-height: 470px;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 30px 26px;
}
.showcase-copy { position: relative; z-index: 3; max-width: 510px; margin-bottom: 22px; text-align: center; }
.showcase-kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 10px; color: #9a4b4e; font: 800 10px/1 var(--font-mono,monospace); letter-spacing: .16em; }
.showcase-kicker::before { content:""; width: 28px; height: 2px; background: var(--login-red,#ee4564); }
.showcase-copy h2 { margin: 0 0 10px; color: #2a2327; font: 750 clamp(31px, 3.5vw, 52px)/.98 var(--font-head,sans-serif); letter-spacing: -.055em; }
.showcase-copy p { margin: 0 auto; max-width: 450px; color: #765d61; font: 500 13px/1.55 var(--font-body,sans-serif); }

.portal-visual {
  position: relative;
  width: min(530px, 90%);
  height: 235px;
}
.portal-core {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 186px;
  height: 124px;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 25px;
  color: #fff;
  background: linear-gradient(145deg,#2b282b,#171517);
  box-shadow: 0 28px 50px rgba(104,56,55,.27), inset 0 1px 0 rgba(255,255,255,.12);
  transform: translate(-50%,-50%);
}
.portal-core::after { content:""; position:absolute; left:30px; right:30px; bottom:-12px; height:12px; border-radius:0 0 14px 14px; background:#514a4c; transform:perspective(60px) rotateX(-24deg); transform-origin:top; }
.core-mark { display:grid; place-items:center; width:58px; height:58px; border-radius:19px; background:linear-gradient(145deg,#ffb548,#ff765f); box-shadow:0 14px 26px rgba(255,127,80,.25); font:800 28px/1 var(--font-head,sans-serif); }
.core-label { position:absolute; bottom:14px; color:#a9a2a6; font:700 8px/1 var(--font-mono,monospace); letter-spacing:.16em; }

.unit-node {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 110px;
  padding: 9px 11px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 13px;
  color: #4c3c40;
  background: rgba(255,255,255,.76);
  box-shadow: 0 12px 28px rgba(137,76,65,.12);
  backdrop-filter: blur(10px);
  animation: malinoFloat 5s ease-in-out infinite;
}
.unit-node b { display:grid; place-items:center; width:27px; height:27px; border-radius:8px; color:#fff; font:800 9px/1 var(--font-head,sans-serif); }
.unit-node span { font:800 9px/1.2 var(--font-head,sans-serif); }
.unit-node small { display:block; margin-top:2px; color:#988185; font:600 7px/1 var(--font-mono,monospace); }
.node-bg { left:0; top:22px; }
.node-tgi { right:0; top:12px; animation-delay:-1.1s; }
.node-mks { left:22px; bottom:4px; animation-delay:-2.1s; }
.node-qsn { right:24px; bottom:0; animation-delay:-3.1s; }
.node-bg b { background:#c93950; }
.node-tgi b { color:#5d4512; background:#f5be3d; }
.node-mks b { background:#d85f93; }
.node-qsn b { background:#8f6fcb; }

.connector-map { position:absolute; inset:0; z-index:1; width:100%; height:100%; overflow:visible; }
.connector-map path { fill:none; stroke:rgba(93,72,76,.27); stroke-width:1.5; stroke-dasharray:5 7; animation:malinoDash 13s linear infinite; }

.showcase-status { display:flex; align-items:center; gap:8px; margin-top:13px; color:#735b5f; font:700 9px/1 var(--font-mono,monospace); letter-spacing:.06em; }
.showcase-status i { width:8px; height:8px; border-radius:50%; background:#38a169; box-shadow:0 0 0 5px rgba(56,161,105,.12); animation:malinoPulse 2s ease infinite; }

@keyframes malinoFormIn { from { opacity:0; transform:translateX(-22px); } to { opacity:1; transform:none; } }
@keyframes malinoFloat { 0%,100% { transform:translateY(0) rotate(-.6deg); } 50% { transform:translateY(-9px) rotate(.6deg); } }
@keyframes malinoOrbit { to { transform:rotate(360deg); } }
@keyframes malinoDash { to { stroke-dashoffset:-120; } }
@keyframes malinoPulse { 50% { box-shadow:0 0 0 9px rgba(56,161,105,0); } }

@media (max-height: 700px) and (min-width: 901px) {
  .malino-login-active .login-card { padding: 16px 0 !important; }
  .malino-login-active .login-card::before { min-height: 22px; margin-bottom: 11px; }
  .malino-login-active .login-card .unit-top { margin-bottom: 13px !important; }
  .login-welcome { margin-bottom: 14px; }
  .login-welcome h1 { margin-bottom: 5px; font-size: 34px; line-height: .98; }
  .login-welcome p { font-size: 12.5px; line-height: 1.4; }
  .malino-login-active .field-label { margin: 11px 0 6px !important; }
  .malino-login-active .field { height: 45px !important; }
  .login-security-row { margin-top: 8px; }
  .malino-login-active .login-btn { height: 46px !important; margin-top: 14px !important; }
  .malino-login-active .login-hint { margin-top: 13px !important; }
  .showcase-copy { margin-bottom: 12px; }
  .showcase-copy h2 { font-size: 42px; }
  .showcase-content { min-height: 430px; padding-block: 16px; }
  .portal-visual { height: 220px; }
}

@media (max-width: 900px) {
  body.malino-login-active { overflow:auto; }
  .malino-login-active .login-wrap {
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    padding:30px 18px !important;
    background:
      radial-gradient(circle at 92% 10%,rgba(238,69,100,.13),transparent 34%),
      radial-gradient(circle at 5% 90%,rgba(255,181,72,.2),transparent 32%),
      #fffaf5 !important;
  }
  .login-showcase { display:none; }
  .malino-login-active .login-card {
    width:min(420px,100%) !important;
    padding:28px !important;
    border:1px solid rgba(233,226,220,.9) !important;
    border-radius:22px !important;
    background:rgba(255,255,255,.88) !important;
    box-shadow:0 24px 60px rgba(73,48,50,.12) !important;
    backdrop-filter:blur(18px);
  }
}

@media (max-width: 440px) {
  .malino-login-active .login-wrap { padding:16px 12px !important; }
  .malino-login-active .login-card { padding:23px 20px !important; border-radius:19px !important; }
  .malino-login-active .login-card::before { margin-bottom:17px; }
  .malino-login-active .login-card .unit-top { margin-bottom:18px !important; }
  .login-welcome { margin-bottom:20px; }
  .login-welcome h1 { font-size:32px; }
  .login-security-row { align-items:flex-start; flex-direction:column; gap:5px; }
}

@media (prefers-reduced-motion: reduce) {
  .malino-login-active *, .malino-login-active *::before, .malino-login-active *::after {
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    scroll-behavior:auto !important;
  }
}
