/* FPPTI Jabar UI final override layer.
 * Intentionally plain CSS and loaded after all theme layers.
 */
:root{
  --olf-red:#004AAC;
  --olf-red-dark:#003F94;
  --olf-red-soft:#EFF6FF;
  --olf-ring:rgba(0,74,172,.14);
  --olf-text:#0F172A;
  --olf-muted:#64748B;
  --olf-line:#D7DEE7;
}

/* ---------- Consistent focus treatment ---------- */
html body input:not([type="checkbox"]):not([type="radio"]):focus,
html body input:not([type="checkbox"]):not([type="radio"]):focus-visible,
html body select:focus,
html body select:focus-visible,
html body textarea:focus,
html body textarea:focus-visible,
html body .openlib_journal_filter input:focus,
html body .openlib_discovery__form input:focus,
html body .openlib_discovery__form select:focus,
html body .openlib_search_form input:focus,
html body .openlib_search_form select:focus{
  border-color:var(--olf-red)!important;
  outline:0!important;
  box-shadow:0 0 0 3px var(--olf-ring)!important;
}
html body input:-webkit-autofill:focus{
  border-color:var(--olf-red)!important;
  -webkit-box-shadow:0 0 0 3px var(--olf-ring), inset 0 0 0 1000px #fff!important;
  box-shadow:0 0 0 3px var(--olf-ring), inset 0 0 0 1000px #fff!important;
}

/* ---------- Icon / text spacing ---------- */
html body .openlib_discovery__form button,
html body .openlib_search_form__submit,
html body .openlib_journal_actions a,
html body .openlib_journal_search,
html body .openlib_color_mode_toggle,
html body .openlib_password_toggle{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  gap:8px!important;
}
html body .openlib_discovery__form button .fa,
html body .openlib_search_form__submit .fa,
html body .openlib_journal_actions a .fa,
html body .openlib_journal_search .fa,
html body .openlib_color_mode_toggle .fa{
  flex:0 0 auto!important;
  margin:0!important;
}
html body .openlib_discovery__meta > span,
html body .openlib_journal_count{
  display:inline-flex!important;
  align-items:center!important;
}
html body .openlib_discovery__meta strong,
html body .openlib_journal_count #openlib-journal-count{
  display:inline-block!important;
  margin-right:6px!important;
}
html body .openlib_journal_filter{
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
}
html body .openlib_journal_filter .fa{
  flex:0 0 auto!important;
  margin:0!important;
}

/* ---------- Journal card buttons: real inset, never touch edges ---------- */
html body .openlib_journal_footer{
  box-sizing:border-box!important;
  width:100%!important;
  padding:13px 16px 15px!important;
}
html body .openlib_journal_actions{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:10px!important;
  box-sizing:border-box!important;
  width:100%!important;
  max-width:100%!important;
  margin:0!important;
  padding:0!important;
}
html body .openlib_journal_actions li{
  min-width:0!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
}
html body .openlib_journal_actions a{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:100%!important;
  min-height:40px!important;
  margin:0!important;
  padding:0 12px!important;
  border-radius:8px!important;
  font-size:12px!important;
  font-weight:750!important;
  line-height:1.2!important;
  white-space:nowrap!important;
  overflow:hidden!important;
}

/* ---------- Login / authentication ---------- */
html body .page_login{
  box-sizing:border-box!important;
  width:min(640px,calc(100% - 32px))!important;
  max-width:640px!important;
  margin:20px auto 34px!important;
  padding:30px 34px 32px!important;
  border:1px solid #E2E8F0!important;
  border-radius:16px!important;
  background:#fff!important;
  box-shadow:0 12px 34px rgba(15,23,42,.055)!important;
}
html body .page_login .cmp_breadcrumbs{display:none!important;}
html body .page_login > h1{
  margin:0 0 8px!important;
  color:var(--olf-text)!important;
  font-size:28px!important;
  font-weight:800!important;
  line-height:1.2!important;
  text-align:center!important;
  letter-spacing:-.025em!important;
}
html body .page_login > p{
  margin:0 0 22px!important;
  color:var(--olf-muted)!important;
  font-size:12px!important;
  line-height:1.55!important;
  text-align:center!important;
}
html body .page_login form,
html body .page_login .login,
html body .page_login fieldset.fields{
  min-width:0!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  outline:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
html body .page_login fieldset.fields > div{
  box-sizing:border-box!important;
  width:100%!important;
  margin:0!important;
  padding:0 0 18px!important;
}
html body .page_login label{
  display:block!important;
  width:100%!important;
  margin:0!important;
  color:#334155!important;
}
html body .page_login label > .label{
  display:block!important;
  margin:0 0 7px!important;
  color:#334155!important;
  font-size:12.5px!important;
  font-weight:750!important;
  line-height:1.35!important;
}
html body .page_login input[type="text"],
html body .page_login input[type="email"],
html body .page_login input[type="password"]{
  box-sizing:border-box!important;
  width:100%!important;
  height:48px!important;
  margin:0!important;
  padding:0 14px!important;
  border:1px solid #CBD5E1!important;
  border-radius:9px!important;
  background:#fff!important;
  color:#0F172A!important;
  font:500 14px/1.2 "Plus Jakarta Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  box-shadow:none!important;
}
html body .page_login .password > label > a,
html body .page_login .openlib_forgot_password{
  display:inline-block!important;
  margin:8px 0 0!important;
  color:var(--olf-red)!important;
  font-size:12px!important;
  font-weight:500!important;
  line-height:1.4!important;
  text-decoration:none!important;
}
html body .page_login .remember{
  padding:2px 0 20px!important;
}
html body .page_login .remember label{
  display:flex!important;
  align-items:center!important;
  gap:9px!important;
  font-size:12.5px!important;
  font-weight:600!important;
  line-height:1.35!important;
}
html body .page_login .remember input{
  flex:0 0 auto!important;
  width:15px!important;
  height:15px!important;
  margin:0!important;
}
html body .page_login .remember .label{
  display:inline!important;
  margin:0!important;
  font-size:12.5px!important;
  font-weight:600!important;
}
html body .page_login .buttons{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
  gap:12px!important;
  box-sizing:border-box!important;
  width:100%!important;
  margin:0!important;
  padding:0!important;
}
html body .page_login .buttons > *{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  height:44px!important;
  margin:0!important;
  padding:0 16px!important;
  border-radius:9px!important;
  font:750 13px/1 "Plus Jakarta Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  text-decoration:none!important;
}
html body .page_login .buttons .submit{
  border:1px solid var(--olf-red)!important;
  background:var(--olf-red)!important;
  color:#fff!important;
}
html body .page_login .buttons .submit:hover,
html body .page_login .buttons .submit:focus{
  border-color:var(--olf-red-dark)!important;
  background:var(--olf-red-dark)!important;
}
html body .page_login .buttons .register{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:1px solid #CBD5E1!important;
  background:#fff!important;
  color:#334155!important;
}
html body .page_login .buttons .register:hover,
html body .page_login .buttons .register:focus{
  border-color:#93C5FD!important;
  background:#F8FAFF!important;
  color:var(--olf-red)!important;
}

/* Password input with visible show/hide control */
html body .openlib_password_control{
  position:relative!important;
  display:block!important;
  width:100%!important;
}
html body .openlib_password_control input[type="password"],
html body .openlib_password_control input[type="text"]{
  padding-right:86px!important;
}
html body .openlib_password_toggle{
  position:absolute!important;
  top:50%!important;
  right:10px!important;
  z-index:3!important;
  transform:translateY(-50%)!important;
  min-width:auto!important;
  width:auto!important;
  height:30px!important;
  margin:0!important;
  padding:0 8px!important;
  border:0!important;
  border-radius:6px!important;
  background:transparent!important;
  color:#64748B!important;
  font:700 11.5px/1 "Plus Jakarta Sans",sans-serif!important;
  cursor:pointer!important;
  box-shadow:none!important;
}
html body .openlib_password_toggle:hover,
html body .openlib_password_toggle:focus{
  background:var(--olf-red-soft)!important;
  color:var(--olf-red)!important;
  outline:0!important;
  box-shadow:none!important;
}
html body .openlib_password_toggle .fa{
  width:14px!important;
  margin:0!important;
  text-align:center!important;
}

/* ---------- Register: same control rhythm ---------- */
html body .page_register input:not([type="checkbox"]):not([type="radio"]),
html body .page_register select,
html body .page_register textarea{
  box-sizing:border-box!important;
  width:100%!important;
  min-height:46px!important;
  padding:10px 13px!important;
  border:1px solid #CBD5E1!important;
  border-radius:9px!important;
  background:#fff!important;
  color:#0F172A!important;
  font:500 13.5px/1.35 "Plus Jakarta Sans",sans-serif!important;
}
html body .page_register label > .label{
  display:block!important;
  margin-bottom:7px!important;
  font-size:12.5px!important;
  font-weight:700!important;
}

/* ---------- Journal homepage media: prevent runaway images ---------- */
html body.openlib-journal-page .homepage_image,
html body.openlib-journal-page .page_index_journal .homepage_image{
  overflow:hidden!important;
  max-width:100%!important;
  margin:0 0 22px!important;
  border-radius:12px!important;
}
html body.openlib-journal-page .homepage_image img,
html body.openlib-journal-page .page_index_journal .homepage_image img{
  display:block!important;
  width:auto!important;
  max-width:100%!important;
  height:auto!important;
  max-height:420px!important;
  margin:0 auto!important;
  object-fit:contain!important;
}

/* ---------- Account dropdown must float instead of pushing layout ---------- */
html body #navigationUserWrapper .pkp_navigation_user > li{
  position:relative!important;
}
html body #navigationUserWrapper .pkp_navigation_user > li > ul,
html body #navigationUserWrapper .openlib-account-dropdown{
  position:absolute!important;
  top:calc(100% + 8px)!important;
  right:0!important;
  left:auto!important;
  z-index:9999!important;
  min-width:190px!important;
  margin:0!important;
}

/* ---------- Dark mode ---------- */
html[data-openlib-color-mode="dark"] body .page_login{
  border-color:#334155!important;
  background:#111827!important;
}
html[data-openlib-color-mode="dark"] body .page_login > h1,
html[data-openlib-color-mode="dark"] body .page_login label,
html[data-openlib-color-mode="dark"] body .page_login label > .label{
  color:#F8FAFC!important;
}
html[data-openlib-color-mode="dark"] body .page_login > p{color:#94A3B8!important;}
html[data-openlib-color-mode="dark"] body .page_login input[type="text"],
html[data-openlib-color-mode="dark"] body .page_login input[type="email"],
html[data-openlib-color-mode="dark"] body .page_login input[type="password"],
html[data-openlib-color-mode="dark"] body .openlib_password_control input[type="text"]{
  border-color:#475569!important;
  background:#0F172A!important;
  color:#F8FAFC!important;
}
html[data-openlib-color-mode="dark"] body .page_login .buttons .register{
  border-color:#475569!important;
  background:#0F172A!important;
  color:#E2E8F0!important;
}

@media(max-width:640px){
  html body .page_login{
    width:calc(100% - 24px)!important;
    padding:24px 18px 26px!important;
  }
  html body .page_login .buttons{grid-template-columns:1fr!important;}
}
