/* ============================================================
   Login — Executive Management Dashboard RSD Mangusada
   ============================================================ */
body.auth {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 40px);
  background:
    radial-gradient(58% 48% at 10% 8%, #dceaff 0, transparent 62%),
    radial-gradient(44% 42% at 92% 90%, #e5f7ee 0, transparent 66%),
    linear-gradient(160deg, #f4f8ff, #e9f1fb 55%, #f8fbff);
  overflow-x: hidden;
}
body.auth::before { opacity: .3; }

.auth-shell {
  width: min(1180px, 100%);
  min-height: min(760px, calc(100dvh - 2 * clamp(16px, 3vw, 40px)));
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, .94fr);
  background: #fff;
  border-radius: 32px;
  overflow: hidden;
  box-shadow:
    0 42px 90px -24px rgba(8, 39, 96, .38),
    0 0 0 1px rgba(255, 255, 255, .85);
  animation: authIn .7s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes authIn {
  from { opacity: 0; transform: translateY(18px) scale(.99); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Panel branding ---------- */
.auth-brand {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  padding: clamp(26px, 3.2vw, 44px);
  color: #fff;
  overflow: hidden;
  background: #08225c;
}
.brand-photo { position: absolute; inset: 0; z-index: 0; }
.brand-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
  transform: scale(1.02);
}
.brand-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(155deg, rgba(5, 24, 66, .74) 0%, rgba(6, 31, 83, .88) 46%, rgba(5, 25, 68, .97) 100%),
    radial-gradient(60% 50% at 90% 10%, rgba(30, 111, 224, .34), transparent 70%);
}
.auth-brand::after {
  content: "";
  position: absolute;
  right: -24%;
  bottom: -42%;
  z-index: 0;
  width: 76%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(30, 111, 224, .4), transparent 68%);
  pointer-events: none;
}
.brand-top,
.brand-copy,
.brand-foot { position: relative; z-index: 1; }

.brand-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand-logos {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  padding: 7px 12px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 26px rgba(0, 0, 0, .18);
}
.brand-logos img { height: 38px; width: auto; }
.brand-logos .divider { width: 1px; height: 30px; background: #c7d7ec; }
.brand-badge {
  white-space: nowrap;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: #dceaff;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.brand-copy { max-width: 440px; }
.brand-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: #a9c8ff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.brand-eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: #f5b800;
}
.brand-copy h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(34px, 3.5vw, 48px);
  font-style: italic;
  font-weight: 700;
  letter-spacing: -.9px;
  line-height: 1.04;
}
.brand-copy h1 span { color: #ffd54a; }
.brand-tagline {
  max-width: 330px;
  margin: 20px 0 0;
  padding-left: 16px;
  border-left: 3px solid #f5b800;
  color: rgba(255, 255, 255, .84);
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.65;
}

.brand-foot {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .16);
}
.brand-stat { display: flex; flex-direction: column; gap: 2px; }
.brand-stat b { font-size: 20px; font-weight: 700; line-height: 1.1; }
.brand-stat span { color: rgba(255, 255, 255, .62); font-size: 11px; font-weight: 500; }
.brand-foot .divider { width: 1px; height: 34px; background: rgba(255, 255, 255, .2); }
.brand-note {
  max-width: 132px;
  margin: 0 0 0 auto;
  color: rgba(255, 255, 255, .55);
  font-size: 10.5px;
  line-height: 1.45;
  text-align: right;
}

/* ---------- Panel form ---------- */
.auth-panel {
  position: relative;
  display: grid;
  place-items: center;
  padding: clamp(30px, 4.5vw, 64px);
  background:
    radial-gradient(130% 95% at 102% -4%, rgba(30, 111, 224, .14) 0, transparent 60%),
    radial-gradient(90% 70% at -6% 104%, rgba(30, 111, 224, .09) 0, transparent 58%),
    linear-gradient(168deg, #fbfdff 0%, #f3f8ff 48%, #e9f2ff 100%);
}
.auth-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(60% 42% at 50% 0%, rgba(255, 255, 255, .85), transparent 70%);
}
.auth-card {
  width: min(100%, 388px);
  animation: cardIn .65s .15s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.auth-mobile-logos { display: none; }

.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #1e6fe0;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.auth-eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: #f5b800;
}
.auth-head h2 {
  margin: 0;
  color: #0b2f7a;
  font-size: clamp(26px, 2.6vw, 32px);
  font-weight: 700;
  letter-spacing: -.6px;
  line-height: 1.16;
}
.auth-head p {
  margin: 10px 0 0;
  color: #607697;
  font-size: 13px;
  line-height: 1.6;
}

.auth-resume {
  display: none;
  align-items: center;
  gap: 10px;
  margin: 20px 0 0;
  padding: 10px 12px;
  border: 1px solid #ffe3a3;
  border-radius: 12px;
  background: #fffaeb;
  color: #7a5200;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}
.auth-resume.on { display: flex; }
.auth-resume svg { flex: none; width: 17px; height: 17px; stroke: #b88300; }
.auth-resume a {
  margin-left: auto;
  color: #0b2f7a;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.auth-resume a:hover { text-decoration: underline; }

.auth-form { margin-top: 26px; }
.auth-form label {
  display: block;
  margin: 16px 0 7px;
  color: #52698f;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.auth-form label:first-child { margin-top: 0; }
.auth-field { position: relative; display: flex; align-items: center; }
.auth-field > svg {
  position: absolute;
  left: 14px;
  width: 20px;
  height: 20px;
  stroke: #6f86a8;
  stroke-width: 1.9;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.auth-field input {
  width: 100%;
  height: 52px;
  padding: 0 46px 0 44px;
  border: 1.5px solid #d7e2f2;
  border-radius: 14px;
  background: #f8fbff;
  color: #0b2f7a;
  font: inherit;
  font-size: 14.5px;
  font-weight: 500;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.auth-field input::placeholder { color: #93a6c2; font-weight: 400; }
.auth-field input:hover { border-color: #bfd3ea; }
.auth-field input:focus {
  outline: none;
  border-color: #1e6fe0;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(30, 111, 224, .12);
}
.auth-field input[aria-invalid="true"] {
  border-color: #e03a3a;
  background: #fff8f8;
}
.auth-field input[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 4px rgba(224, 58, 58, .12);
}

.auth-eye {
  position: absolute;
  right: 8px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #6f86a8;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.auth-eye:hover { background: #eaf2fd; color: #0b2f7a; }
.auth-eye:focus-visible { outline: 2px solid #1e6fe0; outline-offset: 2px; }
.auth-eye svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.auth-eye .eye-off { display: none; }
.auth-eye.is-visible .eye-open { display: none; }
.auth-eye.is-visible .eye-off { display: block; }

.auth-error {
  display: none;
  align-items: flex-start;
  gap: 8px;
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 1px solid #ffd1d6;
  border-radius: 11px;
  background: #fff1f2;
  color: #b42318;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.45;
}
.auth-error.on { display: flex; animation: nudge .3s ease; }
.auth-error svg { flex: none; width: 17px; height: 17px; margin-top: 1px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes nudge {
  25% { transform: translateX(-3px); }
  75% { transform: translateX(3px); }
}

.auth-submit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  margin-top: 18px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(100deg, #0b2f7a, #1e6fe0 72%);
  box-shadow: 0 16px 30px -12px rgba(11, 47, 122, .65);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, filter .2s;
}
.auth-submit .arrow { width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.auth-submit:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 20px 36px -12px rgba(11, 47, 122, .72); }
.auth-submit:hover .arrow { transform: translateX(3px); }
.auth-submit:active { transform: translateY(0) scale(.995); }
.auth-submit:focus-visible { outline: 3px solid rgba(30, 111, 224, .35); outline-offset: 2px; }
.auth-submit[disabled] { cursor: wait; filter: saturate(.85); }
.auth-submit .spinner { display: none; width: 18px; height: 18px; border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.auth-submit.loading .spinner { display: block; }
.auth-submit.loading .arrow { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth-demo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding: 11px 12px 11px 14px;
  border: 1px dashed #cfdff2;
  border-radius: 14px;
  background: #f8fbff;
}
.auth-demo .lbl {
  display: block;
  margin-bottom: 1px;
  color: #7b8fac;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.auth-demo code { color: #0b2f7a; font-family: inherit; font-size: 12.5px; font-weight: 700; }
.auth-demo button {
  flex: none;
  padding: 7px 11px;
  border: 1.5px solid #c9dcf3;
  border-radius: 9px;
  background: #fff;
  color: #1e5bb8;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}
.auth-demo button:hover { border-color: #1e6fe0; background: #eef6ff; transform: translateY(-1px); }
.auth-demo button:focus-visible { outline: 2px solid #1e6fe0; outline-offset: 2px; }

.auth-foot {
  margin: 20px 0 0;
  color: #8b9cb5;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

/* ---------- Responsif ---------- */
@media (max-width: 980px) {
  body.auth { place-items: start center; }
  .auth-shell {
    grid-template-columns: 1fr;
    max-width: 620px;
    min-height: 0;
    border-radius: 28px;
  }
  .auth-brand { min-height: 270px; gap: 22px; padding: 26px 28px; }
  .brand-copy h1 { font-size: clamp(30px, 6vw, 40px); }
  .brand-badge { display: none; }
  .brand-foot { display: none; }
  .auth-panel { padding: 32px 28px 40px; }
}

@media (max-width: 600px) {
  body.auth { padding: 0; background: #f4f8ff; }
  .auth-shell { min-height: 100dvh; border-radius: 0; box-shadow: none; }
  .auth-brand { min-height: 0; gap: 16px; padding: 18px 20px 22px; }
  .brand-logos { gap: 10px; padding: 6px 10px; border-radius: 12px; }
  .brand-logos img { height: 32px; }
  .brand-logos .divider { height: 26px; }
  .brand-eyebrow { display: none; }
  .brand-copy h1 { font-size: 25px; line-height: 1.1; }
  .brand-tagline { max-width: 310px; margin-top: 10px; padding-left: 10px; border-left-width: 2px; font-size: 12.5px; line-height: 1.55; }
  .auth-panel { padding: 26px 20px 34px; }
  .auth-head h2 { font-size: 25px; }
  .auth-form { margin-top: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-shell, .auth-card { animation: none; }
  .auth-error.on { animation: none; }
  .auth-submit, .auth-demo button, .auth-eye { transition: none; }
}
